function Pool(t,e){for(var i=[],n=t;i.length0;){var n=e.pop();if(null!=t){var r=t.indexOf(n);-1!=r&&t.splice(r,1)}i.push(n)}e=null}},this.returnToPool=function(t){i.push(t)},this.clearPool=function(){UTILS.arrayUtils.clearArray(i)},this.destroyPool=function(){UTILS.arrayUtils.clearArray(destroyArray),i=null,n=null}}var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PIXI=t()}}(function(){return function t(e,i,n){function r(a,o){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!o&&l)return l(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[a]={exports:{}};e[a][0].call(u.exports,function(t){var i=e[a][1][t];return r(i||t)},u,u.exports,t,e,i,n)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a0)-(t<0)},i.abs=function(t){var e=t>>31;return(t^e)-e},i.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,i=(t>255)<<3,t>>>=i,e|=i,i=(t>15)<<2,t>>>=i,e|=i,i=(t>3)<<1,t>>>=i,(e|=i)|t>>1},i.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},i.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},i.countTrailingZeros=n,i.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},i.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},i.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var r=new Array(256);!function(t){for(var e=0;e<256;++e){var i=e,n=e,r=7;for(i>>>=1;i;i>>>=1)n<<=1,n|=1&i,--r;t[e]=n<>>8&255]<<16|r[t>>>16&255]<<8|r[t>>>24&255]},i.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},i.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},i.interleave3=function(t,e,i){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,i&=1023,i=4278190335&(i|i<<16),i=251719695&(i|i<<8),i=3272356035&(i|i<<4),i=1227133513&(i|i<<2),t|i<<2},i.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},i.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],2:[function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n=e&&e.length,s=n?e[0]*i:t.length,o=r(t,0,s,i,!0),l=[];if(!o)return l;var h,u,d,f,p,_,m;if(n&&(o=c(t,e,o,i)),t.length>80*i){h=d=t[0],u=f=t[1];for(var g=i;gd&&(d=p),_>f&&(f=_);m=Math.max(d-h,f-u)}return a(o,l,i,h,u,m),l}function r(t,e,i,n,r){var s,a;if(r===O(t,e,i,n)>0)for(s=e;s=e;s-=n)a=P(s,t[s],t[s+1],a);return a&&x(a,a.next)&&(M(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!x(n,n.next)&&0!==T(n.prev,n,n.next))n=n.next;else{if(M(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function a(t,e,i,n,r,c,d){if(t){!d&&c&&_(t,n,r,c);for(var f,p,m=t;t.prev!==t.next;)if(f=t.prev,p=t.next,c?l(t,n,r,c):o(t))e.push(f.i/i),e.push(t.i/i),e.push(p.i/i),M(t),t=p.next,m=p.next;else if((t=p)===m){d?1===d?a(t=h(t,e,i),e,i,n,r,c,2):2===d&&u(t,e,i,n,r,c):a(s(t),e,i,n,r,c,1);break}}}function o(t){var e=t.prev,i=t,n=t.next;if(T(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(y(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&T(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(t,e,i,n){var r=t.prev,s=t,a=t.next;if(T(r,s,a)>=0)return!1;for(var o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,u=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,c=g(o,l,e,i,n),d=g(h,u,e,i,n),f=t.nextZ;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&y(r.x,r.y,s.x,s.y,a.x,a.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&y(r.x,r.y,s.x,s.y,a.x,a.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function h(t,e,i){var n=t;do{var r=n.prev,s=n.next.next;!x(r,s)&&E(r,n,n.next,s)&&S(r,s)&&S(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),M(n),M(n.next),n=t=s),n=n.next}while(n!==t);return n}function u(t,e,i,n,r,o){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var u=A(l,h);return l=s(l,l.next),u=s(u,u.next),a(l,e,i,n,r,o),void a(u,e,i,n,r,o)}h=h.next}l=l.next}while(l!==t)}function c(t,e,i,n){var a,o,l,h=[];for(a=0,o=e.length;a=n.next.y){var o=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=r&&o>a){if(a=o,o===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&y(si.x)&&S(n,t)&&(i=n,d=l),n=n.next;return i}function _(t,e,i,n){var r=t;do{null===r.z&&(r.z=g(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,m(r)}function m(t){var e,i,n,r,s,a,o,l,h=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,n=i,o=0,e=0;e0||l>0&&n;)0===o?(r=n,n=n.nextZ,l--):0!==l&&n?i.z<=n.z?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,l--):(r=i,i=i.nextZ,o--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,h*=2}while(a>1);return t}function g(t,e,i,n,r){return t=32767*(t-i)/r,e=32767*(e-n)/r,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function v(t){var e=t,i=t;do{e.x=0&&(t-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(s-o)-(r-a)*(n-o)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!w(t,e)&&S(t,e)&&S(e,t)&&D(t,e)}function T(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,i,n){return!!(x(t,e)&&x(i,n)||x(t,n)&&x(i,e))||T(t,e,i)>0!=T(t,e,n)>0&&T(i,n,t)>0!=T(i,n,e)>0}function w(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&E(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function S(t,e){return T(t.prev,t,t.next)<0?T(t,e,t.next)>=0&&T(t,t.prev,e)>=0:T(t,e,t.prev)<0||T(t,t.next,e)<0}function D(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}function A(t,e){var i=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function P(t,e,i,n){var r=new C(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,i,n){for(var r=0,s=e,a=i-n;s0&&(n+=t[r-1].length,i.holes.push(n))}return i}},{}],3:[function(t,e,i){"use strict";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(){this._events=new n,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,o="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(o=!1)),s.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)a.call(t,e)&&i.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t,e){var i=o?o+t:t,n=this._events[i];if(e)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=new Array(s);r=t.byteLength?n.bufferSubData(this.type,e,t):n.bufferData(this.type,t,this.drawType),this.data=t},r.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},r.createVertexBuffer=function(t,e,i){return new r(t,t.ARRAY_BUFFER,e,i)},r.createIndexBuffer=function(t,e,i){return new r(t,t.ELEMENT_ARRAY_BUFFER,e,i)},r.create=function(t,e,i,n){return new r(t,e,i,n)},r.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=r},{}],7:[function(t,e,i){var n=t("./GLTexture"),r=function(t,e,i){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=i||100};r.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new n(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},r.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},r.prototype.clear=function(t,e,i,n){this.bind();var r=this.gl;r.clearColor(t,e,i,n),r.clear(r.COLOR_BUFFER_BIT)},r.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},r.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},r.prototype.resize=function(t,e){var i=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(i.bindRenderbuffer(i.RENDERBUFFER,this.stencil),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t,e))},r.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},r.createRGBA=function(t,e,i,s){var a=n.fromData(t,null,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new r(t,e,i);return o.enableTexture(a),o.unbind(),o},r.createFloat32=function(t,e,i,s){var a=new n.fromData(t,s,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new r(t,e,i);return o.enableTexture(a),o.unbind(),o},e.exports=r},{"./GLTexture":9}],8:[function(t,e,i){var n=t("./shader/compileProgram"),r=t("./shader/extractAttributes"),s=t("./shader/extractUniforms"),a=t("./shader/generateUniformAccessObject"),o=function(t,e,i){this.gl=t,this.program=n(t,e,i),this.attributes=r(t,this.program);var o=s(t,this.program);this.uniforms=a(t,o)};o.prototype.bind=function(){this.gl.useProgram(this.program)},o.prototype.destroy=function(){},e.exports=o},{"./shader/compileProgram":14,"./shader/extractAttributes":16,"./shader/extractUniforms":17,"./shader/generateUniformAccessObject":18}],9:[function(t,e,i){var n=function(t,e,i,n,r){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=i||-1,this.format=n||t.RGBA,this.type=r||t.UNSIGNED_BYTE};n.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var i=t.videoWidth||t.width,n=t.videoHeight||t.height;n!==this.height||i!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=i,this.height=n};var r=!1;n.prototype.uploadData=function(t,e,i){this.bind();var n=this.gl;if(t instanceof Float32Array){if(!r){if(!n.getExtension("OES_texture_float"))throw new Error("floating point textures not available");r=!0}this.type=n.FLOAT}else this.type=n.UNSIGNED_BYTE;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||i!==this.height?n.texImage2D(n.TEXTURE_2D,0,this.format,e,i,0,this.format,this.type,t||null):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e,i,this.format,this.type,t||null),this.width=e,this.height=i},n.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},n.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},n.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},n.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},n.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},n.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},n.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},n.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},n.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},n.fromSource=function(t,e,i){var r=new n(t);return r.premultiplyAlpha=i||!1,r.upload(e),r},n.fromData=function(t,e,i,r){var s=new n(t);return s.uploadData(e,i,r),s},e.exports=n},{}],10:[function(t,e,i){function n(t,e){if(this.nativeVaoExtension=null,n.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var i=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(i),attribState:new Array(i)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var r=t("./setVertexAttribArrays");n.prototype.constructor=n,e.exports=n,n.FORCE_NATIVE=!1,n.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},n.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},n.prototype.activate=function(){for(var t=this.gl,e=null,i=0;i=0;n--){var r=t[n];"."===r?t.splice(n,1):".."===r?(t.splice(n,1),i++):i&&(t.splice(n,1),i--)}if(e)for(;i--;i)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var i=[],n=0;n=-1&&!r;s--){var a=s>=0?arguments[s]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(i=a+"/"+i,r="/"===a.charAt(0))}return i=e(n(i.split("/"),function(t){return!!t}),!r).join("/"),(r?"/":"")+i||"."},i.normalize=function(t){var r=i.isAbsolute(t),s="/"===a(t,-1);return(t=e(n(t.split("/"),function(t){return!!t}),!r).join("/"))||r||(t="."),t&&s&&(t+="/"),(r?"/":"")+t},i.isAbsolute=function(t){return"/"===t.charAt(0)},i.join=function(){var t=Array.prototype.slice.call(arguments,0);return i.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},i.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[i];i--);return e>i?[]:t.slice(e,i-e+1)}t=i.resolve(t).substr(1),e=i.resolve(e).substr(1);for(var r=n(t.split("/")),s=n(e.split("/")),a=Math.min(r.length,s.length),o=a,l=0;l1)for(var i=1;i1&&(n=i[0]+"@",t=i[1]),n+s((t=t.replace(C,".")).split("."),e).join(".")}function o(t){for(var e,i,n=[],r=0,s=t.length;r=55296&&e<=56319&&r65535&&(e+=R((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=R(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function u(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function c(t,e,i){var n=0;for(t=i?L(t/w):t>>1,t+=L(t/e);t>I*x>>1;n+=b)t=L(t/I);return L(n+(I+1)*t/(t+E))}function d(t){var e,i,n,s,a,o,u,d,f,p,_=[],m=t.length,g=0,v=D,E=S;for((i=t.lastIndexOf(A))<0&&(i=0),n=0;n=128&&r("not-basic"),_.push(t.charCodeAt(n));for(s=i>0?i+1:0;s=m&&r("invalid-input"),((d=h(t.charCodeAt(s++)))>=b||d>L((y-g)/o))&&r("overflow"),g+=d*o,f=u<=E?T:u>=E+x?x:u-E,!(dL(y/(p=b-f))&&r("overflow"),o*=p;E=c(g-a,e=_.length+1,0==a),L(g/e)>y-v&&r("overflow"),v+=L(g/e),g%=e,_.splice(g++,0,v)}return l(_)}function f(t){var e,i,n,s,a,l,h,d,f,p,_,m,g,v,E,w=[];for(m=(t=o(t)).length,e=D,i=0,a=S,l=0;l=e&&_L((y-i)/(g=n+1))&&r("overflow"),i+=(h-e)*g,e=h,l=0;ly&&r("overflow"),_==e){for(d=i,f=b;p=f<=a?T:f>=a+x?x:f-a,!(d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=b-T,L=Math.floor,R=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:o,encode:l},decode:d,encode:f,toASCII:function(t){return a(t,function(t){return M.test(t)?"xn--"+f(t):t})},toUnicode:function(t){return a(t,function(t){return P.test(t)?d(t.slice(4).toLowerCase()):t})}},p&&_)if(e.exports==p)_.exports=g;else for(v in g)g.hasOwnProperty(v)&&(p[v]=g[v]);else n.punycode=g}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(t,e,i){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,i,s){e=e||"&",i=i||"=";var a={};if("string"!=typeof t||0===t.length)return a;var o=/\+/g;t=t.split(e);var l=1e3;s&&"number"==typeof s.maxKeys&&(l=s.maxKeys);var h=t.length;l>0&&h>l&&(h=l);for(var u=0;u=0?(c=_.substr(0,m),d=_.substr(m+1)):(c=_,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),n(a,f)?r(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],26:[function(t,e,i){"use strict";function n(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n",'"',"`"," ","\r","\n","\t"],c=["{","}","|","\\","^","`"].concat(u),d=["'"].concat(c),f=["%","/","?",";","#"].concat(d),p=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=t("querystring");n.prototype.parse=function(t,e,i){if(!a.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+(void 0===t?"undefined":_typeof2(t)));var n=t.indexOf("?"),r=-1!==n&&n127?R+="x":R+=L[j];if(!R.match(_)){var k=O.slice(0,D),B=O.slice(D+1),F=L.match(m);F&&(k.push(F[1]),B.unshift(F[2])),B.length&&(c="/"+B.join(".")+c),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=s.toASCII(this.hostname));var H=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+H,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!g[E])for(var D=0,I=d.length;D0)&&i.host.split("@"))&&(i.auth=C.shift(),i.host=i.hostname=C.shift())),i.search=t.search,i.query=t.query,a.isNull(i.pathname)&&a.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i;if(!x.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var S=x.slice(-1)[0],D=(i.host||t.host||x.length>1)&&("."===S||".."===S)||""===S,A=0,P=x.length;P>=0;P--)"."===(S=x[P])?x.splice(P,1):".."===S?(x.splice(P,1),A++):A&&(x.splice(P,1),A--);if(!b&&!T)for(;A--;A)x.unshift("..");!b||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),D&&"/"!==x.join("/").substr(-1)&&x.push("");var M=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(w){i.hostname=i.host=M?"":x.length?x.shift():"";var C=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");C&&(i.auth=C.shift(),i.host=i.hostname=C.shift())}return(b=b||i.host&&x.length)&&!M&&x.unshift(""),x.length?i.pathname=x.join("/"):(i.pathname=null,i.path=null),a.isNull(i.pathname)&&a.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},n.prototype.parseHost=function(){var t=this.host,e=l.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":29,punycode:24,querystring:27}],29:[function(t,e,i){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===(void 0===t?"undefined":_typeof2(t))&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],30:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof2(t)},a=n(t("mini-signals")),o=n(t("parse-uri")),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(t("./async")),h=n(t("./Resource")),u=/(#[\w\-]+)?$/,c=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;r(this,t),this.baseUrl=i,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=function(t,i){return e._loadResource(t,i)},this._queue=l.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new a.default,this.onError=new a.default,this.onLoad=new a.default,this.onStart=new a.default,this.onComplete=new a.default}return t.prototype.add=function(t,e,i,n){if(Array.isArray(t)){for(var r=0;r0){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=e.responseText,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(e.responseText),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(e.responseText,"text/xml")}else{var r=document.createElement("div");r.innerHTML=e.responseText,this.data=r}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||e.responseText;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,d||(d=document.createElement("a")),d.href=t;var i=!(t=(0,h.default)(d.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this._getExtension()]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this._getExtension()]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var i=t.indexOf("/");e=t.substring(i+1,t.indexOf(";",i))}else{var n=t.indexOf("?");-1!==n&&(t=t.substring(0,n)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},l(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();i.default=f,f.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},f.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},f.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},f.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},f._loadTypeMap={gif:f.LOAD_TYPE.IMAGE,png:f.LOAD_TYPE.IMAGE,bmp:f.LOAD_TYPE.IMAGE,jpg:f.LOAD_TYPE.IMAGE,jpeg:f.LOAD_TYPE.IMAGE,tif:f.LOAD_TYPE.IMAGE,tiff:f.LOAD_TYPE.IMAGE,webp:f.LOAD_TYPE.IMAGE,tga:f.LOAD_TYPE.IMAGE,svg:f.LOAD_TYPE.IMAGE,"svg+xml":f.LOAD_TYPE.IMAGE,mp3:f.LOAD_TYPE.AUDIO,ogg:f.LOAD_TYPE.AUDIO,wav:f.LOAD_TYPE.AUDIO,mp4:f.LOAD_TYPE.VIDEO,webm:f.LOAD_TYPE.VIDEO},f._xhrTypeMap={xhtml:f.XHR_RESPONSE_TYPE.DOCUMENT,html:f.XHR_RESPONSE_TYPE.DOCUMENT,htm:f.XHR_RESPONSE_TYPE.DOCUMENT,xml:f.XHR_RESPONSE_TYPE.DOCUMENT,tmx:f.XHR_RESPONSE_TYPE.DOCUMENT,svg:f.XHR_RESPONSE_TYPE.DOCUMENT,tsx:f.XHR_RESPONSE_TYPE.DOCUMENT,gif:f.XHR_RESPONSE_TYPE.BLOB,png:f.XHR_RESPONSE_TYPE.BLOB,bmp:f.XHR_RESPONSE_TYPE.BLOB,jpg:f.XHR_RESPONSE_TYPE.BLOB,jpeg:f.XHR_RESPONSE_TYPE.BLOB,tif:f.XHR_RESPONSE_TYPE.BLOB,tiff:f.XHR_RESPONSE_TYPE.BLOB,webp:f.XHR_RESPONSE_TYPE.BLOB,tga:f.XHR_RESPONSE_TYPE.BLOB,json:f.XHR_RESPONSE_TYPE.JSON,text:f.XHR_RESPONSE_TYPE.TEXT,txt:f.XHR_RESPONSE_TYPE.TEXT,ttf:f.XHR_RESPONSE_TYPE.BUFFER,otf:f.XHR_RESPONSE_TYPE.BUFFER},f.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":36,"parse-uri":37}],32:[function(t,e,i){"use strict";function n(){}function r(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}i.__esModule=!0,i.eachSeries=function(t,e,i){var n=0,r=t.length;!function s(a){a||n===r?i&&i(a):e(t[n++],s)}()},i.queue=function(t,e){function i(t,e,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(o.started=!0,null==t&&o.idle())setTimeout(function(){return o.drain()},1);else{var r={data:t,callback:"function"==typeof i?i:n};e?o._tasks.unshift(r):o._tasks.push(r),setTimeout(function(){return o.process()},1)}}function s(t){return function(){a-=1,t.callback.apply(t,arguments),null!=arguments[0]&&o.error(arguments[0],t.data),a<=o.concurrency-o.buffer&&o.unsaturated(),o.idle()&&o.drain(),o.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,o={_tasks:[],concurrency:e,saturated:n,unsaturated:n,buffer:e/4,empty:n,drain:n,error:n,started:!1,paused:!1,push:function(t,e){i(t,!1,e)},kill:function(){a=0,o.drain=n,o.started=!1,o._tasks=[]},unshift:function(t,e){i(t,!0,e)},process:function(){for(;!o.paused&&a>2,s[1]=(3&r[0])<<4|r[1]>>4,s[2]=(15&r[1])<<2|r[2]>>6,s[3]=63&r[2],i-(t.length-1)){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var o=0;o=0;i--)this.updateAccessibleObjects(e[i])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,i=t.height/this.renderer.height,n=this.div;n.style.left=t.left+"px",n.style.top=t.top+"px",n.style.width=this.renderer.width+"px",n.style.height=this.renderer.height+"px";for(var r=0;rthis.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=l+"px",e.style.height=l+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=c,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,i.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},i.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},i.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},i.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1}},{}],43:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=t("../math"),s=function(){function t(){n(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?r.Rectangle.EMPTY:(t=t||new r.Rectangle(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY,s=t[0],a=t[1];e=sn?s:n,r=a>r?a:r,s=t[2],a=t[3],e=sn?s:n,r=a>r?a:r,s=t[4],a=t[5],e=sn?s:n,r=a>r?a:r,s=t[6],a=t[7],e=sn?s:n,r=a>r?a:r,this.minX=e,this.minY=i,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,e,i,n,r){var s=t.worldTransform,a=s.a,o=s.b,l=s.c,h=s.d,u=s.tx,c=s.ty,d=this.minX,f=this.minY,p=this.maxX,_=this.maxY,m=a*e+l*i+u,g=o*e+h*i+c;d=mp?m:p,_=g>_?g:_,g=o*n+h*i+c,d=(m=a*n+l*i+u)p?m:p,_=g>_?g:_,g=o*e+h*r+c,d=(m=a*e+l*r+u)p?m:p,_=g>_?g:_,g=o*n+h*r+c,d=(m=a*n+l*r+u)p?m:p,_=g>_?g:_,this.minX=d,this.minY=f,this.maxX=p,this.maxY=_},t.prototype.addVertices=function(t,e,i,n){for(var r=t.worldTransform,s=r.a,a=r.b,o=r.c,l=r.d,h=r.tx,u=r.ty,c=this.minX,d=this.minY,f=this.maxX,p=this.maxY,_=i;_f?v:f,p=y>p?y:p}this.minX=c,this.minY=d,this.maxX=f,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minXn?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,r=t.maxXl?r:l,this.maxY=s>h?s:h}},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,r=t.maxXl?r:l,this.maxY=s>h?s:h}},t}();i.default=s},{"../math":66}],44:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i1)for(var i=0;ithis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),n=this.getChildIndex(e);this.children[i]=e,this.children[n]=t,this.onChildrenChange(i=this.children.length)throw new Error("The supplied index is out of bounds");var i=this.getChildIndex(t);(0,o.removeItems)(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var i=0;i0&&r<=n){s=this.children.splice(i,r);for(var a=0;au*o)}return this.dirty++,this},e.prototype.arc=function(t,e,i,n,r){var s=!(arguments.length<=5||void 0===arguments[5])&&arguments[5];if(n===r)return this;!s&&r<=n?r+=2*Math.PI:s&&n<=r&&(n+=2*Math.PI);var a=r-n,o=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var l=t+Math.cos(n)*i,h=e+Math.sin(n)*i,u=this.currentPath?this.currentPath.shape.points:null;u?u[u.length-2]===l&&u[u.length-1]===h||u.push(l,h):(this.moveTo(l,h),u=this.currentPath.shape.points);for(var c=a/(2*o),d=2*c,f=Math.cos(c),p=Math.sin(c),_=o-1,m=_%1/_,g=0;g<=_;++g){var v=c+n+d*(g+m*g),y=Math.cos(v),b=-Math.sin(v);u.push((f*y+p*b)*i+t,(f*-b+p*y)*i+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?1:arguments[1];return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,i,n){return this.drawShape(new d.Rectangle(t,e,i,n)),this},e.prototype.drawRoundedRect=function(t,e,i,n,r){return this.drawShape(new d.RoundedRectangle(t,e,i,n,r)),this},e.prototype.drawCircle=function(t,e,i){return this.drawShape(new d.Circle(t,e,i)),this},e.prototype.drawEllipse=function(t,e,i,n){return this.drawShape(new d.Ellipse(t,e,i,n)),this},e.prototype.drawPolygon=function(t){var e=t,i=!0;if(e instanceof d.Polygon&&(i=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===p.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var i=this.graphicsData[0].shape;if(!this._spriteRect){if(!e._SPRITE_TEXTURE){e._SPRITE_TEXTURE=l.default.create(10,10);var n=document.createElement("canvas");n.width=10,n.height=10;var r=n.getContext("2d");r.fillStyle="white",r.fillRect(0,0,10,10),e._SPRITE_TEXTURE=h.default.fromCanvas(n)}this._spriteRect=new c.default(e._SPRITE_TEXTURE)}if(16777215===this.tint)this._spriteRect.tint=this.graphicsData[0].fillColor;else{var s=T,a=x;(0,f.hex2rgb)(this.graphicsData[0].fillColor,s),(0,f.hex2rgb)(this.tint,a),s[0]*=a[0],s[1]*=a[1],s[2]*=a[2],this._spriteRect.tint=(0,f.rgb2hex)(s)}this._spriteRect.alpha=this.graphicsData[0].fillAlpha,this._spriteRect.worldAlpha=this.worldAlpha*this._spriteRect.alpha,e._SPRITE_TEXTURE._frame.width=i.width,e._SPRITE_TEXTURE._frame.height=i.height,this._spriteRect.transform.worldTransform=this.transform.worldTransform,this._spriteRect.anchor.set(-i.x/i.width,-i.y/i.height),this._spriteRect._onAnchorUpdate(),this._spriteRect._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,b);for(var e=this.graphicsData,i=0;ie?s+o:e,i=an?a+l:n;else if(c===p.SHAPES.CIRC)s=r.x,a=r.y,o=r.radius+d/2,l=r.radius+d/2,t=s-oe?s+o:e,i=a-ln?a+l:n;else if(c===p.SHAPES.ELIP)s=r.x,a=r.y,o=r.width+d/2,l=r.height+d/2,t=s-oe?s+o:e,i=a-ln?a+l:n;else for(var f=r.points,_=0,m=0,g=0,v=0,y=0,b=0,T=0,x=0,E=0;E+2e?T+y:e,i=x-bn?x+b:n)}else t=0,e=0,i=0,n=0;var w=this.boundsPadding;this._localBounds.minX=t-w,this._localBounds.maxX=e+2*w,this._localBounds.minY=i-w,this._localBounds.maxY=n+2*w},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new u.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===p.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length<=1||void 0===arguments[1]?1:arguments[1],i=this.getLocalBounds(),n=l.default.create(i.width,i.height,t,e);v||(v=new g.default),y.tx=-i.x,y.ty=-i.y,v.render(this,n,!1,y);var r=h.default.fromCanvas(n.baseTexture._canvasRenderTarget.canvas,t);return r.baseTexture.resolution=e,r.baseTexture.update(),r},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var i=0;iP?P:A,i.beginPath(),i.moveTo(E,w+A),i.lineTo(E,w+D-A),i.quadraticCurveTo(E,w+D,E+A,w+D),i.lineTo(E+S-A,w+D),i.quadraticCurveTo(E+S,w+D,E+S,w+D-A),i.lineTo(E+S,w+A),i.quadraticCurveTo(E+S,w,E+S-A,w),i.lineTo(E+A,w),i.quadraticCurveTo(E,w,E,w+A),i.closePath(),(l.fillColor||0===l.fillColor)&&(i.globalAlpha=l.fillAlpha*n,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),l.lineWidth&&(i.globalAlpha=l.lineAlpha*n,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,i=(t.tint>>8&255)/255,n=(255&t.tint)/255,r=0;r>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*n*255,s._lineTint=((o>>16&255)/255*e*255<<16)+((o>>8&255)/255*i*255<<8)+(255&o)/255*n*255}},t.prototype.renderPolygon=function(t,e,i){i.moveTo(t[0],t[1]);for(var n=1;n32e4)&&((i=this.graphicsDataPool.pop()||new c.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).reset(e),t.data.push(i)),i.dirty=!0,i},e}(h.default);i.default=g,u.default.registerPlugin("graphics",g)},{"../../const":42,"../../renderers/webgl/WebGLRenderer":80,"../../renderers/webgl/utils/ObjectRenderer":90,"../../utils":117,"./WebGLGraphicsData":54,"./shaders/PrimitiveShader":55,"./utils/buildCircle":56,"./utils/buildPoly":58,"./utils/buildRectangle":59,"./utils/buildRoundedRectangle":60}],54:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")),s=function(){function t(e,i,s){n(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=r.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=r.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.glPoints=null,this.glIndices=null,this.shader=i,this.vao=new r.default.VertexArrayObject(e,s).addIndex(this.indexBuffer).addAttribute(this.buffer,i.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,i.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();i.default=s},{"pixi-gl-core":12}],55:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(t){function e(i){return n(this,e),r(this,t.call(this,i,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return s(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("../../../Shader")).default);i.default=a},{"../../../Shader":41}],56:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){var i=t.shape,a=i.x,o=i.y,l=void 0,h=void 0;t.type===r.SHAPES.CIRC?(l=i.radius,h=i.radius):(l=i.width,h=i.height);var u=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(i.width+i.height)),c=2*Math.PI/u;if(t.fill){var d=(0,s.hex2rgb)(t.fillColor),f=t.fillAlpha,p=d[0]*f,_=d[1]*f,m=d[2]*f,g=e.points,v=e.indices,y=g.length/6;v.push(y);for(var b=0;b196*p*p?(C=D-P,O=A-M,C/=I=Math.sqrt(C*C+O*O),O/=I,C*=p,O*=p,h.push(x-C,E-O),h.push(g,v,y,m),h.push(x+C,E+O),h.push(g,v,y,m),h.push(x-C,E-O),h.push(g,v,y,m),d++):(h.push(U,X),h.push(g,v,y,m),h.push(x-(U-x),E-(X-E)),h.push(g,v,y,m))}}b=i[2*(c-2)],T=i[2*(c-2)+1],x=i[2*(c-1)],D=-(T-(E=i[2*(c-1)+1])),A=b-x,D/=I=Math.sqrt(D*D+A*A),A/=I,D*=p,A*=p,h.push(x-D,E-A),h.push(g,v,y,m),h.push(x+D,E+A),h.push(g,v,y,m),u.push(f);for(var G=0;G=6){for(var n=[],o=t.holes,l=0;l0&&(0,r.default)(t,e)};var r=n(t("./buildLine")),s=t("../../../utils"),a=n(t("earcut"))},{"../../../utils":117,"./buildLine":57,earcut:2}],59:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){var i=t.shape,s=i.x,a=i.y,o=i.width,l=i.height;if(t.fill){var h=(0,r.hex2rgb)(t.fillColor),u=t.fillAlpha,c=h[0]*u,d=h[1]*u,f=h[2]*u,p=e.points,_=e.indices,m=p.length/6;p.push(s,a),p.push(c,d,f,u),p.push(s+o,a),p.push(c,d,f,u),p.push(s,a+l),p.push(c,d,f,u),p.push(s+o,a+l),p.push(c,d,f,u),_.push(m,m,m+1,m+2,m+3,m+3)}if(t.lineWidth){var g=t.points;t.points=[s,a,s+o,a,s+o,a+l,s,a+l,s,a],(0,n.default)(t,e),t.points=g}};var n=function(t){return t&&t.__esModule?t:{default:t}}(t("./buildLine")),r=t("../../../utils")},{"../../../utils":117,"./buildLine":57}],60:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e,i,n,r,s){function a(t,e,i){return t+(e-t)*i}for(var o=arguments.length<=6||void 0===arguments[6]?[]:arguments[6],l=0,h=0,u=0,c=0,d=0,f=0,p=0,_=0;p<=20;++p)l=a(t,i,_=p/20),h=a(e,n,_),u=a(i,r,_),c=a(n,s,_),d=a(l,u,_),f=a(h,c,_),o.push(d,f);return o}i.__esModule=!0,i.default=function(t,e){var i=t.shape,n=i.x,l=i.y,h=i.width,u=i.height,c=i.radius,d=[];if(d.push(n,l+c),r(n,l+u-c,n,l+u,n+c,l+u,d),r(n+h-c,l+u,n+h,l+u,n+h,l+u-c,d),r(n+h,l+c,n+h,l,n+h-c,l,d),r(n+c,l,n,l,n,l+c+1e-10,d),t.fill){for(var f=(0,o.hex2rgb)(t.fillColor),p=t.fillAlpha,_=f[0]*p,m=f[1]*p,g=f[2]*p,v=e.points,y=e.indices,b=v.length/6,T=(0,s.default)(d,null,2),x=0,E=T.length;x0?1:0}i.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("./Matrix")),s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],a=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],o=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],l=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],h=[],u=[];!function(){for(var t=0;t<16;t++){var e=[];u.push(e);for(var i=0;i<16;i++)for(var c=n(s[t]*s[i]+o[t]*a[i]),d=n(a[t]*s[i]+l[t]*a[i]),f=n(s[t]*o[i]+o[t]*l[i]),p=n(a[t]*o[i]+l[t]*l[i]),_=0;_<16;_++)if(s[_]===c&&a[_]===d&&o[_]===f&&l[_]===p){e.push(_);break}}for(var m=0;m<16;m++){var g=new r.default;g.set(s[m],a[m],o[m],l[m],0,0),h.push(g)}}();var c={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return s[t]},uY:function(t){return a[t]},vX:function(t){return o[t]},vY:function(t){return l[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return u[t][e]},sub:function(t,e){return u[t][c.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?c.S:c.N:2*Math.abs(e)<=Math.abs(t)?t>0?c.E:c.W:e>0?t>0?c.SE:c.SW:t>0?c.NE:c.NW},matrixAppendRotationInv:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],n=arguments.length<=3||void 0===arguments[3]?0:arguments[3],r=h[c.inv(e)];r.tx=i,r.ty=n,t.append(r)}};i.default=c},{"./Matrix":63}],63:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(t,e){for(var i=0;i=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=s,t.skew.y=a),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(n*n+r*r),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=this.tx,s=t*n-e*i;return this.a=n/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-n*r)/s,this.ty=-(t*this.ty-e*r)/s,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();i.default=a},{"./Point":65}],64:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(t,e){for(var i=0;ie!=h>e&&t<(e-o)/(h-o)*(l-a)+a&&(i=!i)}return i},t}();i.default=a},{"../../const":42,"../Point":65}],70:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(t,e){for(var i=0;i=this.x&&t=this.y&&et.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(e){if(e!==t.EMPTY){var i=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);this.x=i,this.width=n-i,this.y=r,this.height=s-r}},r(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();i.default=a},{"../../const":42}],71:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=t("../../const"),s=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1],s=arguments.length<=2||void 0===arguments[2]?0:arguments[2],a=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?20:arguments[4];n(this,t),this.x=e,this.y=i,this.width=s,this.height=a,this.radius=o,this.type=r.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var i=t-(this.x+this.radius),n=e-(this.y+this.radius),r=this.radius*this.radius;if(i*i+n*n<=r)return!0;if((i=t-(this.x+this.width-this.radius))*i+n*n<=r)return!0;if(n=e-(this.y+this.height-this.radius),i*i+n*n<=r)return!0;if((i=t-(this.x+this.radius))*i+n*n<=r)return!0}return!1},t}();i.default=s},{"../../const":42}],72:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;iw?w:E,e.moveTo(y,b+E),e.lineTo(y,b+x-E),e.quadraticCurveTo(y,b+x,y+E,b+x),e.lineTo(y+T-E,b+x),e.quadraticCurveTo(y+T,b+x,y+T,b+x-E),e.lineTo(y+T,b+E),e.quadraticCurveTo(y+T,b,y+T-E,b),e.lineTo(y+E,b),e.quadraticCurveTo(y,b,y,b+E),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore()},t.prototype.destroy=function(){},t}();i.default=s},{"../../../const":42}],75:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(t,e){for(var i=0;ithis.checkCountMax&&(this.checkCount=0,this.run())},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,i=!1,n=0;nthis.maxIdle&&(t.destroyTexture(r,!0),e[n]=null,i=!0)}if(i){for(var s=0,a=0;a=0;i--)this.unload(t.children[i])},t}();i.default=a},{"../../const":42,"../../settings":97}],79:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=t("pixi-gl-core"),s=t("../../const"),a=function(t){return t&&t.__esModule?t:{default:t}}(t("./utils/RenderTarget")),o=t("../../utils"),l=function(){function t(e){n(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var i=this.gl,n=!!t._glRenderTargets;if(!t.hasLoaded)return null;var o=this.renderer.boundTextures;if(void 0===e){e=0;for(var l=0;l 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();i.default=h},{"../../../const":42,"../../../utils":117,"./extractUniformsFromSrc":83}],83:[function(t,e,i){"use strict";function n(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea)$"),i={},n=void 0,s=t.replace(/\s+/g," ").split(/\s*;\s*/),a=0;a-1){var l=o.split(" "),h=l[1],u=l[2],c=1;u.indexOf("[")>-1&&(u=(n=u.split(/\[|]/))[0],c*=Number(n[1])),u.match(e)||(i[u]={value:r(h,c),name:u,type:h})}}return i}i.__esModule=!0,i.default=function(t,e,i){var r=n(t),s=n(e);return Object.assign(r,s)};var r=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")).default.shader.defaultValue},{"pixi-gl-core":12}],84:[function(t,e,i){"use strict";i.__esModule=!0,i.calculateScreenSpaceMatrix=function(t,e,i){var n=t.identity();return n.translate(e.x/i.width,e.y/i.height),n.scale(i.width,i.height),n},i.calculateNormalizedScreenSpaceMatrix=function(t,e,i){var n=t.identity();n.translate(e.x/i.width,e.y/i.height);var r=i.width/e.width,s=i.height/e.height;return n.scale(r,s),n},i.calculateSpriteMatrix=function(t,e,i,r){var s=r.worldTransform.copy(n.Matrix.TEMP_MATRIX),a=r._texture.baseTexture,o=t.identity(),l=i.height/i.width;o.translate(e.x/i.width,e.y/i.height),o.scale(1,l);var h=i.width/a.width,u=i.height/a.height;return s.tx/=a.width*h,s.ty/=a.width*h,s.invert(),o.prepend(s),o.scale(1,1/l),o.scale(h,u),o.translate(r.anchor.x,r.anchor.y),o};var n=t("../../../math")},{"../../../math":66}],85:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(t){return t&&t.__esModule?t:{default:t}}(t("../Filter")),o=t("../../../../math"),l=(t("path"),function(t){function e(i){n(this,e);var s=new o.Matrix,a=r(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n // check clip! this will stop the mask bleeding out from the edges\n vec2 text = abs( vMaskCoord - 0.5 );\n text = step(0.5, text);\n\n float clip = 1.0 - max(text.y, text.x);\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return i.renderable=!1,a.maskSprite=i,a.maskMatrix=s,a}return s(e,t),e.prototype.apply=function(t,e,i){var n=this.maskSprite;this.uniforms.mask=n._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n),this.uniforms.alpha=n.worldAlpha,t.applyFilter(this,e,i)},e}(a.default));i.default=l},{"../../../../math":66,"../Filter":82,path:22}],86:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var o=n(t("./WebGLManager")),l=n(t("../utils/RenderTarget")),h=n(t("../utils/Quad")),u=t("../../../math"),c=n(t("../../../Shader")),d=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(t("../filters/filterTransforms")),f=n(t("bit-twiddle")),p=function t(){a(this,t),this.renderTarget=null,this.sourceFrame=new u.Rectangle,this.destinationFrame=new u.Rectangle,this.filters=[],this.target=null,this.resolution=1},_=function(t){function e(i){a(this,e);var n=r(this,t.call(this,i));return n.gl=n.renderer.gl,n.quad=new h.default(n.gl,i.state.attribState),n.shaderCache={},n.pool={},n.filterData=null,n}return s(e,t),e.prototype.pushFilter=function(t,e){var i=this.renderer,n=this.filterData;if(!n){n=this.renderer._activeRenderTarget.filterStack;var r=new p;r.sourceFrame=r.destinationFrame=this.renderer._activeRenderTarget.size,r.renderTarget=i._activeRenderTarget,this.renderer._activeRenderTarget.filterData=n={index:0,stack:[r]},this.filterData=n}var s=n.stack[++n.index];s||(s=n.stack[n.index]=new p);var a=e[0].resolution,o=0|e[0].padding,l=t.filterArea||t.getBounds(!0),h=s.sourceFrame,u=s.destinationFrame;h.x=(l.x*a|0)/a,h.y=(l.y*a|0)/a,h.width=(l.width*a|0)/a,h.height=(l.height*a|0)/a,n.stack[0].renderTarget.transform||h.fit(n.stack[0].destinationFrame),h.pad(o),u.width=h.width,u.height=h.height;var c=this.getPotRenderTarget(i.gl,h.width,h.height,a);s.target=t,s.filters=e,s.resolution=a,s.renderTarget=c,c.setFrame(u,h),i.bindRenderTarget(c),c.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],i=t.stack[t.index];this.quad.map(i.renderTarget.size,i.sourceFrame).upload();var n=i.filters;if(1===n.length)n[0].apply(this,i.renderTarget,e.renderTarget,!1),this.freePotRenderTarget(i.renderTarget);else{var r=i.renderTarget,s=this.getPotRenderTarget(this.renderer.gl,i.sourceFrame.width,i.sourceFrame.height,i.resolution);s.setFrame(i.destinationFrame,i.sourceFrame),s.clear();var a=0;for(a=0;a0&&(e+="\nelse "),in&&f.xr&&f.y>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(d.default);i.default=p},{"../const":42,"../display/Container":44,"../math":66,"../textures/Texture":109,"../utils":117}],99:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=n(t("../../renderers/canvas/CanvasRenderer")),a=t("../../const"),o=t("../../math"),l=n(t("./CanvasTinter")),h=new o.Matrix,u=function(){function t(e){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,i=this.renderer,n=e._frame.width,r=e._frame.height,s=t.transform.worldTransform,u=0,c=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(i.setBlendMode(t.blendMode),e.valid)){i.context.globalAlpha=t.worldAlpha;var d=e.baseTexture.scaleMode===a.SCALE_MODES.LINEAR;i.smoothProperty&&i.context[i.smoothProperty]!==d&&(i.context[i.smoothProperty]=d),e.trim?(u=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,c=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(u=(.5-t.anchor.x)*e.orig.width,c=(.5-t.anchor.y)*e.orig.height),e.rotate&&(s.copy(h),s=h,o.GroupD8.matrixAppendRotationInv(s,e.rotate,u,c),u=0,c=0),u-=n/2,c-=r/2,i.roundPixels?(i.context.setTransform(s.a,s.b,s.c,s.d,s.tx*i.resolution|0,s.ty*i.resolution|0),u|=0,c|=0):i.context.setTransform(s.a,s.b,s.c,s.d,s.tx*i.resolution,s.ty*i.resolution);var f=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=l.default.getTintedTexture(t,t.tint)),i.context.drawImage(t.tintedTexture,0,0,n*f,r*f,u*i.resolution,c*i.resolution,n*i.resolution,r*i.resolution)):i.context.drawImage(e.baseTexture.source,e._frame.x*f,e._frame.y*f,n*f,r*f,u*i.resolution,c*i.resolution,n*i.resolution,r*i.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();i.default=u,s.default.registerPlugin("sprite",u)},{"../../const":42,"../../math":66,"../../renderers/canvas/CanvasRenderer":73,"./CanvasTinter":100}],100:[function(t,e,i){"use strict";i.__esModule=!0;var n=t("../../utils"),r={getTintedTexture:function(t,e){var i=t.texture,n="#"+("00000"+(0|(e=r.roundColor(e))).toString(16)).substr(-6);if(i.tintCache=i.tintCache||{},i.tintCache[n])return i.tintCache[n];var s=r.canvas||document.createElement("canvas");if(r.tintMethod(i,e,s),r.convertTintToImage){var a=new Image;a.src=s.toDataURL(),i.tintCache[n]=a}else i.tintCache[n]=s,r.canvas=null;return s},tintWithMultiply:function(t,e,i){var n=i.getContext("2d"),r=t._frame.clone(),s=t.baseTexture.resolution;r.x*=s,r.y*=s,r.width*=s,r.height*=s,i.width=r.width,i.height=r.height,n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,r.width,r.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},tintWithOverlay:function(t,e,i){var n=i.getContext("2d"),r=t._frame.clone(),s=t.baseTexture.resolution;r.x*=s,r.y*=s,r.width*=s,r.height*=s,i.width=r.width,i.height=r.height,n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,r.width,r.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},tintWithPerPixel:function(t,e,i){var r=i.getContext("2d"),s=t._frame.clone(),a=t.baseTexture.resolution;s.x*=a,s.y*=a,s.width*=a,s.height*=a,i.width=s.width,i.height=s.height,r.globalCompositeOperation="copy",r.drawImage(t.baseTexture.source,s.x,s.y,s.width,s.height,0,0,s.width,s.height);for(var o=(0,n.hex2rgb)(e),l=o[0],h=o[1],u=o[2],c=r.getImageData(0,0,s.width,s.height),d=c.data,f=0;f=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,i=_.default.nextPow2(this.currentIndex),n=_.default.log2(i),r=this.buffers[n],s=this.sprites,a=this.groups,o=r.float32View,l=r.uint32View,h=this.boundTextures,u=this.renderer.boundTextures,c=this.renderer.textureGC.count,d=0,v=void 0,y=void 0,b=1,T=0,x=a[0],E=void 0,w=void 0,S=s[0].blendMode;x.textureCount=0,x.start=0,x.blend=S,m++;var D=void 0;for(D=0;D0&&(e+="\nelse "),i0?(this.context.shadowColor=i.dropShadowColor,this.context.shadowBlur=i.dropShadowBlur):this.context.fillStyle=i.dropShadowColor;for(var p=Math.cos(i.dropShadowAngle)*i.dropShadowDistance,_=Math.sin(i.dropShadowAngle)*i.dropShadowDistance,m=0;mn)for(var h=a[o].split(""),u=0;us?(e+="\n"+h[u],s=n-c):(0===u&&(e+=" "),e+=h[u],s-=c)}else{var d=l+this.context.measureText(" ").width;0===o||d>s?(o>0&&(e+="\n"),e+=a[o],s=n-l):(s-=d,e+=" "+a[o])}}r=0;n--){var r=i[n].trim();/([\"\'])[^\'\"]+\1/.test(r)||(r='"'+r+'"'),i[n]=r}return t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+e+" "+i.join(",")},e.calculateFontProperties=function(t){if(e.fontPropertiesCache[t])return e.fontPropertiesCache[t];var i={},n=e.fontPropertiesCanvas,r=e.fontPropertiesContext;r.font=t;var s=Math.ceil(r.measureText("|MÉq").width),a=Math.ceil(r.measureText("M").width),o=2*a;a=1.4*a|0,n.width=s,n.height=o,r.fillStyle="#f00",r.fillRect(0,0,s,o),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText("|MÉq",0,a);var l=r.getImageData(0,0,s,o).data,h=l.length,u=4*s,c=0,d=0,f=!1;for(c=0;ca;--c){for(var _=0;_0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(o.default);i.default=c},{"../settings":97,"./BaseTexture":107}],107:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":_typeof2(t)},l=t("../utils"),h=n(t("../settings")),u=n(t("eventemitter3")),c=n(t("../utils/determineCrossOrigin")),d=n(t("bit-twiddle")),f=function(t){function e(i,n,a){r(this,e);var o=s(this,t.call(this));return o.uid=(0,l.uid)(),o.touched=0,o.resolution=a||h.default.RESOLUTION,o.width=100,o.height=100,o.realWidth=100,o.realHeight=100,o.scaleMode=n||h.default.SCALE_MODE,o.hasLoaded=!1,o.isLoading=!1,o.source=null,o.origSource=null,o.imageType=null,o.sourceScale=1,o.premultipliedAlpha=!0,o.imageUrl=null,o.isPowerOfTwo=!1,o.mipmap=h.default.MIPMAP_TEXTURES,o.wrapMode=h.default.WRAP_MODE,o._glTextures={},o._enabled=0,o._virtalBoundId=-1,i&&o.loadSource(i),o}return a(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=d.default.isPow2(this.realWidth)&&d.default.isPow2(this.realHeight)),this.emit("update",this)},e.prototype.loadSource=function(t){var e=this,i=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,i&&this.source&&(this.source.onload=null,this.source.onerror=null);var n=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),n&&this.emit("loaded",this);else if(!t.getContext){var r=function(){e.isLoading=!0;var n=e;if(t.onload=function(){n._updateImageType(),t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n._sourceLoaded(),"svg"!==n.imageType?n.emit("loaded",n):n._loadSvgSource())},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===n.imageType)return n._loadSvgSource(),{v:void 0};e.isLoading=!1,t.width&&t.height?(e._sourceLoaded(),i&&e.emit("loaded",e)):i&&e.emit("error",e)}}();if("object"===(void 0===r?"undefined":o(r)))return r.v}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,l.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var i=t.subType.split("+")[0];if(!(e=(0,l.getUrlFileExtension)("."+i)))throw new Error("Invalid image type in data URI.")}else(e=(0,l.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,l.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var e=(0,l.getSvgSize)(t),i=e.width,n=e.height;if(!i||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(n*this.sourceScale),this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=d.default.isPow2(this.realWidth)&&d.default.isPow2(this.realHeight);var r=document.createElement("canvas");r.width=this.realWidth,r.height=this.realHeight,r._pixiId="canvas_"+(0,l.uid)(),r.getContext("2d").drawImage(this.source,0,0,i,n,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=r,l.BaseTextureCache[r._pixiId]=this,this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete l.BaseTextureCache[this.imageUrl],delete l.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source&&this.source._pixiId&&delete l.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,i,n,r){var s=l.BaseTextureCache[t];if(!s){var a=new Image;void 0===i&&0!==t.indexOf("data:")&&(a.crossOrigin=(0,c.default)(t)),(s=new e(a,n)).imageUrl=t,r&&(s.sourceScale=r),s.resolution=(0,l.getResolutionOfUrl)(t),a.src=t,l.BaseTextureCache[t]=s}return s},e.fromCanvas=function(t,i){t._pixiId||(t._pixiId="canvas_"+(0,l.uid)());var n=l.BaseTextureCache[t._pixiId];return n||(n=new e(t,i),l.BaseTextureCache[t._pixiId]=n),n},e}(u.default);i.default=f},{"../settings":97,"../utils":117,"../utils/determineCrossOrigin":116,"bit-twiddle":1,eventemitter3:3}],108:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=n(t("./BaseRenderTexture")),l=function(t){function e(i,n){r(this,e);var a=null;if(!(i instanceof o.default)){var l=arguments[1],h=arguments[2],u=arguments[3]||0,c=arguments[4]||1;a=arguments[0],n=null,i=new o.default(l,h,u,c)}var d=s(this,t.call(this,i,n));return d.legacyRenderer=a,d.valid=!0,d._updateUvs(),d}return a(e,t),e.prototype.resize=function(t,e,i){this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,i||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,i,n,r){return new e(new o.default(t,i,n,r))},e}(n(t("./Texture")).default);i.default=l},{"./BaseRenderTexture":106,"./Texture":109}],109:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;ithis.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(c.default);i.default=p,p.EMPTY=new p(new l.default),p.EMPTY.destroy=function(){},p.EMPTY.on=function(){},p.EMPTY.once=function(){},p.EMPTY.emit=function(){}},{"../math":66,"../utils":117,"./BaseTexture":107,"./TextureUvs":110,"./VideoBaseTexture":111,eventemitter3:3}],110:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("../math/GroupD8")),s=function(){function t(){n(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,i){var n=e.width,s=e.height;if(i){var a=t.width/2/n,o=t.height/2/s,l=t.x/n+a,h=t.y/s+o;i=r.default.add(i,r.default.NW),this.x0=l+a*r.default.uX(i),this.y0=h+o*r.default.uY(i),i=r.default.add(i,2),this.x1=l+a*r.default.uX(i),this.y1=h+o*r.default.uY(i),i=r.default.add(i,2),this.x2=l+a*r.default.uX(i),this.y2=h+o*r.default.uY(i),i=r.default.add(i,2),this.x3=l+a*r.default.uX(i),this.y3=h+o*r.default.uY(i)}else this.x0=t.x/n,this.y0=t.y/s,this.x1=(t.x+t.width)/n,this.y1=t.y/s,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/s,this.x3=t.x/n,this.y3=(t.y+t.height)/s;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();i.default=s},{"../math/GroupD8":62}],111:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var i=document.createElement("source");return i.src=t,i.type=e,i}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;i0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(u.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(u.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&u.shared.remove(this.update,this),this.source&&this.source._pixiId&&(delete h.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,i){t._pixiId||(t._pixiId="video_"+(0,h.uid)());var n=h.BaseTextureCache[t._pixiId];return n||(n=new e(t,i),h.BaseTextureCache[t._pixiId]=n),n},e.fromUrl=function(t,i){var n=document.createElement("video");if(n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline",""),Array.isArray(t))for(var r=0;rthis.lastTime?((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*a.default.TARGET_FPMS*this.speed,this._emitter.emit(l,this.deltaTime)):this.deltaTime=this.elapsedMS=0,this.lastTime=t},s(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,a.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();i.default=h},{"../settings":97,eventemitter3:3}],113:[function(t,e,i){"use strict";i.__esModule=!0,i.Ticker=i.shared=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("./Ticker")),r=new n.default;r.autoStart=!0,i.shared=r,i.Ticker=n.default},{"./Ticker":112}],114:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],115:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t){for(var e=6*t,i=new Uint16Array(e),n=0,r=0;n>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},i.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},i.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},i.getResolutionOfUrl=function(t,e){var i=s.default.RETINA_PREFIX.exec(t);return i?parseFloat(i[1]):void 0!==e?e:1},i.decomposeDataUri=function(t){var e=r.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]}},i.getUrlFileExtension=function(t){var e=r.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()},i.getSvgSize=function(t){var e=r.SVG_SIZE.exec(t),i={};return e&&(i[e[1]]=Math.round(parseFloat(e[3])),i[e[5]]=Math.round(parseFloat(e[7]))),i},i.skipHello=function(){u=!0},i.sayHello=function(t){if(!u){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+r.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console;u=!0}},i.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!i||!i.getContextAttributes().stencil);if(i){var r=i.getExtension("WEBGL_lose_context");r&&r.loseContext()}return i=null,n}catch(t){return!1}},i.sign=function(t){return 0===t?0:t<0?-1:1},i.removeItems=function(t,e,i){var n=t.length;if(!(e>=n||0===i)){for(var r=n-(i=e+i>n?n-e:i),s=e;s1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),i=-1;this._fontSize=26;for(var n=0;n-1&&i=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*r,this._currentTime+=r;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&this.updateTexture()},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(){this.stop(),t.prototype.destroy.call(this)},e.fromFrames=function(t){for(var i=[],n=0;n0&&n.x*i>this.maxWidth)o.utils.removeItems(r,c,p-c),p=c,c=-1,s.push(d),h=Math.max(h,d),u++,n.x=0,n.y+=t.lineHeight,a=null;else{var m=t.chars[_];m&&(a&&m.kerning[a]&&(n.x+=m.kerning[a]),r.push({texture:m.texture,line:u,charCode:_,position:new o.Point(n.x+m.xOffset,n.y+m.yOffset)}),l=n.x+(m.texture.width+m.xOffset),n.x+=m.xAdvance,f=Math.max(f,m.yOffset+m.texture.height),a=_)}}s.push(l),h=Math.max(h,l);for(var g=[],v=0;v<=u;v++){var y=0;"right"===this._font.align?y=h-s[v]:"center"===this._font.align&&(y=(h-s[v])/2),g.push(y)}for(var b=r.length,T=this.tint,x=0;x=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(o.Container);i.default=h,h.fonts={}},{"../core":61,"../core/math/ObservablePoint":64}],126:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(t,e){for(var i=0;in&&c.xr&&c.y=i&&(o=t-l-1),a+=h=h.replace("%value%",e[o]),a+="\n"}return s=s.replace("%blur%",a),s=s.replace("%size%",t)};var n={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},r=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],137:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){var i=Math.ceil(t/2),r=n,s="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var o=0;oe;)i-=2;return i}},{}],139:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i>16&255)/255,a=(i>>8&255)/255,o=(255&i)/255,l=((n=n||3375104)>>16&255)/255,h=(n>>8&255)/255,u=(255&n)/255,c=[.3,.59,.11,0,0,s,a,o,t,0,l,h,u,e,0,s-l,a-h,o-u,0,0];this._loadMatrix(c,r)},e.prototype.night=function(t,e){var i=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.predator=function(t,e){var i=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},a(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}}]),e}(o.Filter));i.default=l,l.prototype.grayscale=l.prototype.greyscale},{"../../core":61,path:22}],140:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return s(e,t),e}(a.Filter));i.default=o},{"../../core":61,path:22}],142:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var r=t("./fxaa/FXAAFilter");Object.defineProperty(i,"FXAAFilter",{enumerable:!0,get:function(){return n(r).default}});var s=t("./noise/NoiseFilter");Object.defineProperty(i,"NoiseFilter",{enumerable:!0,get:function(){return n(s).default}});var a=t("./displacement/DisplacementFilter");Object.defineProperty(i,"DisplacementFilter",{enumerable:!0,get:function(){return n(a).default}});var o=t("./blur/BlurFilter");Object.defineProperty(i,"BlurFilter",{enumerable:!0,get:function(){return n(o).default}});var l=t("./blur/BlurXFilter");Object.defineProperty(i,"BlurXFilter",{enumerable:!0,get:function(){return n(l).default}});var h=t("./blur/BlurYFilter");Object.defineProperty(i,"BlurYFilter",{enumerable:!0,get:function(){return n(h).default}});var u=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(i,"ColorMatrixFilter",{enumerable:!0,get:function(){return n(u).default}});var c=t("./void/VoidFilter");Object.defineProperty(i,"VoidFilter",{enumerable:!0,get:function(){return n(c).default}})},{"./blur/BlurFilter":133,"./blur/BlurXFilter":134,"./blur/BlurYFilter":135,"./colormatrix/ColorMatrixFilter":139,"./displacement/DisplacementFilter":140,"./fxaa/FXAAFilter":141,"./noise/NoiseFilter":143,"./void/VoidFilter":144}],143:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i=0;l--){var h=o[l];if(this.processInteractive(t,h,i,n,a)){if(!h.parent)continue;s=!0,a=!1,n=!1}}return r&&(n&&!s&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),s=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(s=e.containsPoint(t))),e.interactive&&(s&&!this.eventData.target&&(this.eventData.target=e,this.mouse.target=e,this.pointer.target=e),i(e,s))),s},e.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0);var e=2===t.button||3===t.which;this.emit(e?"rightdown":"mousedown",this.eventData)},e.prototype.processMouseDown=function(t,e){var i=this.mouse.originalEvent,n=2===i.button||3===i.which;e&&(t[n?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,n?"rightdown":"mousedown",this.eventData))},e.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0);var e=2===t.button||3===t.which;this.emit(e?"rightup":"mouseup",this.eventData)},e.prototype.processMouseUp=function(t,e){var i=this.mouse.originalEvent,n=2===i.button||3===i.which,r=n?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,n?"rightup":"mouseup",this.eventData),t[r]&&(t[r]=!1,this.dispatchEvent(t,n?"rightclick":"click",this.eventData))):t[r]&&(t[r]=!1,this.dispatchEvent(t,n?"rightupoutside":"mouseupoutside",this.eventData))},e.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.emit("mousemove",this.eventData),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},e.prototype.processMouseMove=function(t,e){this.processMouseOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"mousemove",this.eventData)},e.prototype.onMouseOut=function(t){this.mouseOverRenderer=!1,this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor=this.defaultCursorStyle,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1),this.emit("mouseout",this.eventData)},e.prototype.processMouseOverOut=function(t,e){e&&this.mouseOverRenderer?(t._mouseOver||(t._mouseOver=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._mouseOver&&(t._mouseOver=!1,this.dispatchEvent(t,"mouseout",this.eventData))},e.prototype.onMouseOver=function(t){this.mouseOverRenderer=!0,this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.emit("mouseover",this.eventData)},e.prototype.onPointerDown=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.autoPreventDefault&&(this.normalizeMouseEvents||this.normalizeTouchEvents)&&this.pointer.originalEvent.preventDefault(),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",this.eventData)},e.prototype.processPointerDown=function(t,e){e&&(t._pointerDown=!0,this.dispatchEvent(t,"pointerdown",this.eventData))},e.prototype.onPointerUp=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerUp,!0),this.emit("pointerup",this.eventData)},e.prototype.processPointerUp=function(t,e){e?(this.dispatchEvent(t,"pointerup",this.eventData),t._pointerDown&&(t._pointerDown=!1,this.dispatchEvent(t,"pointertap",this.eventData))):t._pointerDown&&(t._pointerDown=!1,this.dispatchEvent(t,"pointerupoutside",this.eventData))},e.prototype.onPointerMove=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",this.eventData)},e.prototype.processPointerMove=function(t,e){this.pointer.originalEvent.changedTouches||this.processPointerOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"pointermove",this.eventData)},e.prototype.onPointerOut=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",this.eventData)},e.prototype.processPointerOverOut=function(t,e){e&&this.mouseOverRenderer?t._pointerOver||(t._pointerOver=!0,this.dispatchEvent(t,"pointerover",this.eventData)):t._pointerOver&&(t._pointerOver=!1,this.dispatchEvent(t,"pointerout",this.eventData))},e.prototype.onPointerOver=function(t){this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.emit("pointerover",this.eventData)},e.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,i=e.length,n=0;n1&&(u=1);var c=Math.sqrt(n*n+r*r),d=this._texture.height/2;n/=c,r/=c,n*=d,r*=d,s[h]=l.x+n,s[h+1]=l.y+r,s[h+2]=l.x-n,s[h+3]=l.y-r,e=l}this.containerUpdateTransform()}},e}(a.default);i.default=l},{"../core":61,"./Mesh":155}],159:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(t("../../core")),s=function(t){return t&&t.__esModule?t:{default:t}}(t("../Mesh")),a=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,i=e.context,n=t.worldTransform,r=e.resolution;e.roundPixels?i.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r|0,n.ty*r|0):i.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r,n.ty*r),e.setBlendMode(t.blendMode),t.drawMode===s.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,i=0;i0){var w=t.canvasPadding/t.worldTransform.a,S=t.canvasPadding/t.worldTransform.d,D=(v+y+b)/3,A=(T+x+E)/3,P=v-D,M=T-A,C=Math.sqrt(P*P+M*M);v=D+P/C*(C+w),T=A+M/C*(C+S),M=x-A,y=D+(P=y-D)/(C=Math.sqrt(P*P+M*M))*(C+w),x=A+M/C*(C+S),M=E-A,b=D+(P=b-D)/(C=Math.sqrt(P*P+M*M))*(C+w),E=A+M/C*(C+S)}r.save(),r.beginPath(),r.moveTo(v,T),r.lineTo(y,x),r.lineTo(b,E),r.closePath(),r.clip();var O=d*m+_*p+f*g-m*p-_*f-d*g,I=v*m+_*b+y*g-m*b-_*y-v*g,L=d*y+v*p+f*b-y*p-v*f-d*b,R=d*m*b+_*y*p+v*f*g-v*m*p-_*f*b-d*y*g,j=T*m+_*E+x*g-m*E-_*x-T*g,N=d*x+T*p+f*E-x*p-T*f-d*E,k=d*m*E+_*x*p+T*f*g-T*m*p-_*f*E-d*x*g;r.transform(I/O,j/O,L/O,N/O,R/O,k/O),r.drawImage(h,0,0,u*l.resolution,c*l.resolution,0,0,u,c),r.restore()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,i=t.vertices,n=i.length/2;e.beginPath();for(var r=1;r16384&&(o=16384),o>i&&(o=i),l._properties=[!1,!0,!1,!1,!1],l._maxSize=i,l._batchSize=o,l._glBuffers={},l._bufferToUpdate=0,l.interactiveChildren=!1,l.blendMode=a.BLEND_MODES.NORMAL,l.roundPixels=!0,l.baseTexture=null,l.setProperties(s),l}return s(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);ei&&(s=i);var a=t._glBuffers[r.CONTEXT_UID];a||(a=t._glBuffers[r.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var o=r.gl,l=t.worldTransform.copy(this.tempMatrix);l.prepend(r._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=l.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var h=e[0]._texture.baseTexture;this.shader.uniforms.uSampler=r.bindTexture(h);for(var u=0,c=0;un&&(d=n);var f=a[c];f.uploadDynamic(e,u,d),t._bufferToUpdate===c&&(f.uploadStatic(e,u,d),t._bufferToUpdate=c+1),r.bindVao(f.vao),f.vao.draw(o.TRIANGLES,6*d)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,i=[],n=t._maxSize,r=t._batchSize,s=t._properties,a=0;a0?1:-1})},{}],168:[function(t,e,i){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(t("object-assign"));Object.assign||(Object.assign=n.default)},{"object-assign":5}],169:[function(t,e,i){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":167,"./Object.assign":168,"./requestAnimationFrame":170}],170:[function(t,e,i){(function(t){"use strict";Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),t.performance&&t.performance.now||function(){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}();for(var e=Date.now(),i=["ms","moz","webkit","o"],n=0;n=0;n--)this.add(t.children[n]);return this},t.prototype.destroy=function(){this.ticking&&u.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();i.default=c},{"../core":61,"./limiters/CountLimiter":174}],172:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(e instanceof l.BaseTexture){var i=e.source,n=0===i.width?t.canvas.width:Math.min(t.canvas.width,i.width),r=0===i.height?t.canvas.height:Math.min(t.canvas.height,i.height);return t.ctx.drawImage(i,0,0,n,r,0,0,t.canvas.width,t.canvas.height),!0}return!1}function o(t,e){if(t instanceof l.BaseTexture)return-1===e.indexOf(t)&&e.push(t),!0;if(t._texture&&t._texture instanceof l.Texture){var i=t._texture.baseTexture;return-1===e.indexOf(i)&&e.push(i),!0}return!1}i.__esModule=!0;var l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(t("../../core")),h=16,u=function(t){function e(i){n(this,e);var s=r(this,t.call(this,i));return s.uploadHookHelper=s,s.canvas=document.createElement("canvas"),s.canvas.width=h,s.canvas.height=h,s.ctx=s.canvas.getContext("2d"),s.register(o,a),s}return s(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(function(t){return t&&t.__esModule?t:{default:t}}(t("../BasePrepare")).default);i.default=u,l.CanvasRenderer.registerPlugin("prepare",u)},{"../../core":61,"../BasePrepare":171}],173:[function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var r=t("./webgl/WebGLPrepare");Object.defineProperty(i,"webgl",{enumerable:!0,get:function(){return n(r).default}});var s=t("./canvas/CanvasPrepare");Object.defineProperty(i,"canvas",{enumerable:!0,get:function(){return n(s).default}});var a=t("./BasePrepare");Object.defineProperty(i,"BasePrepare",{enumerable:!0,get:function(){return n(a).default}});var o=t("./limiters/CountLimiter");Object.defineProperty(i,"CountLimiter",{enumerable:!0,get:function(){return n(o).default}});var l=t("./limiters/TimeLimiter");Object.defineProperty(i,"TimeLimiter",{enumerable:!0,get:function(){return n(l).default}})},{"./BasePrepare":171,"./canvas/CanvasPrepare":172,"./limiters/CountLimiter":174,"./limiters/TimeLimiter":175,"./webgl/WebGLPrepare":176}],174:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(e){n(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();i.default=r},{}],175:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var r=function(){function t(e){n(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart.998){var a=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(a,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||s)for(var o,l=1/(1-r),h=this._firstPT;h;)o=h.s+h.c,h.c*=l,h.s=o-h.c,h=h._next;return this},h.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var n,r,s,o,l,h,u,c,d=this._dirty?this.totalDuration():this._totalDuration,f=this._time,p=this._totalTime,_=this._cycle,m=this._duration,g=this._rawPrevTime;if(t>=d-1e-7&&t>=0?(this._totalTime=d,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=m,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(n=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===m&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(g<0||t<=0&&t>=-1e-7||1e-10===g&&"isPause"!==this.data)&&g!==t&&(i=!0,g>1e-10&&(r="onReverseComplete")),this._rawPrevTime=c=!e||t||g===t?t:1e-10)):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==p||0===m&&g>0)&&(r="onReverseComplete",n=this._reversed),t<0&&(this._active=!1,0===m&&(this._initted||!this.vars.lazy||i)&&(g>=0&&(i=!0),this._rawPrevTime=c=!e||t||g===t?t:1e-10)),this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(o=m+this._repeatDelay,this._cycle=this._totalTime/o>>0,0!==this._cycle&&this._cycle===this._totalTime/o&&p<=t&&this._cycle--,this._time=this._totalTime-this._cycle*o,this._yoyo&&0!=(1&this._cycle)&&(this._time=m-this._time),this._time>m?this._time=m:this._time<0&&(this._time=0)),this._easeType?(l=this._time/m,h=this._easeType,u=this._easePower,(1===h||3===h&&l>=.5)&&(l=1-l),3===h&&(l*=2),1===u?l*=l:2===u?l*=l*l:3===u?l*=l*l*l:4===u&&(l*=l*l*l*l),1===h?this.ratio=1-l:2===h?this.ratio=l:this._time/m<.5?this.ratio=l/2:this.ratio=1-l/2):this.ratio=this._ease.getRatio(this._time/m)),f!==this._time||i||_!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=f,this._totalTime=p,this._rawPrevTime=g,this._cycle=_,a.lazyTweens.push(this),void(this._lazy=[t,e]);this._time&&!n?this.ratio=this._ease.getRatio(this._time/m):n&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==f&&t>=0&&(this._active=!0),0===p&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0===this._totalTime&&0!==m||e||this._callback("onStart"))),s=this._firstPT;s;)s.f?s.t[s.p](s.c*this.ratio+s.s):s.t[s.p]=s.c*this.ratio+s.s,s=s._next;this._onUpdate&&(t<0&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._totalTime!==p||r)&&this._callback("onUpdate")),this._cycle!==_&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),r&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===m&&1e-10===this._rawPrevTime&&1e-10!==c&&(this._rawPrevTime=0)))}else p!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},s.to=function(t,e,i){return new s(t,e,i)},s.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new s(t,e,i)},s.fromTo=function(t,e,i,n){return n.startAt=i,n.immediateRender=0!=n.immediateRender&&0!=i.immediateRender,new s(t,e,n)},s.staggerTo=s.allTo=function(t,e,a,h,c,d,f){h=h||0;var p,_,m,g,v=0,y=[],b=a.cycle,T=a.startAt&&a.startAt.cycle;for(l(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=n(t))),t=t||[],h<0&&((t=n(t)).reverse(),h*=-1),p=t.length-1,m=0;m<=p;m++){_={};for(g in a)_[g]=a[g];if(b&&(r(_,t,m),null!=_.duration&&(e=_.duration,delete _.duration)),T){T=_.startAt={};for(g in a.startAt)T[g]=a.startAt[g];r(_.startAt,t,m)}_.delay=v+(_.delay||0),m===p&&c&&(_.onComplete=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),c.apply(f||a.callbackScope||this,d||u)}),y[m]=new s(t[m],e,_),v+=h}return y},s.staggerFrom=s.allFrom=function(t,e,i,n,r,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,s.staggerTo(t,e,i,n,r,a,o)},s.staggerFromTo=s.allFromTo=function(t,e,i,n,r,a,o,l){return n.startAt=i,n.immediateRender=0!=n.immediateRender&&0!=i.immediateRender,s.staggerTo(t,e,n,r,a,o,l)},s.delayedCall=function(t,e,i,n,r){return new s(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:n,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:r,overwrite:0})},s.set=function(t,e){return new s(t,0,e)},s.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var c=function(t,e){for(var n=[],r=0,s=t._first;s;)s instanceof i?n[r++]=s:(e&&(n[r++]=s),r=(n=n.concat(c(s,e))).length),s=s._next;return n},d=s.getAllTweens=function(e){return c(t._rootTimeline,e).concat(c(t._rootFramesTimeline,e))};s.killAll=function(t,i,n,r){null==i&&(i=!0),null==n&&(n=!0);var s,a,o,l=d(0!=r),h=l.length,u=i&&n&&r;for(o=0;o-1;)s.killChildTweensOf(t[c],e);else{r=[];for(u in f)for(h=f[u].target.parentNode;h;)h===t&&(r=r.concat(f[u].tweens)),h=h.parentNode;for(d=r.length,c=0;c-1;)a=o[h],(l||a instanceof e||(s=a.target===a.vars.onComplete)&&n||i&&!s)&&a.paused(t)};return s.pauseAll=function(t,e,i){f(!0,t,e,i)},s.resumeAll=function(t,e,i){f(!1,t,e,i)},s.globalTimeScale=function(e){var n=t._rootTimeline,r=i.ticker.time;return arguments.length?(e=e||1e-10,n._startTime=r-(r-n._startTime)*n._timeScale/e,n=t._rootFramesTimeline,r=i.ticker.frame,n._startTime=r-(r-n._startTime)*n._timeScale/e,n._timeScale=t._rootTimeline._timeScale=e,e):n._timeScale},h.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},h.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},h.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},h.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},h.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},h.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},h.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},h.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},s},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var n=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,n,r=this.vars;for(n in r)i=r[n],o(i)&&-1!==i.join("").indexOf("{self}")&&(r[n]=this._swapSelfInParams(i));o(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=i._internals,s=n._internals={},a=r.isSelector,o=r.isArray,l=r.lazyTweens,h=r.lazyRender,u=_gsScope._gsDefine.globals,c=function(t){var e,i={};for(e in t)i[e]=t[e];return i},d=function(t,e,i){var n,r,s=t.cycle;for(n in s)r=s[n],t[n]="function"==typeof r?r(i,e[i]):r[i%r.length];delete t.cycle},f=s.pauseCallback=function(){},p=function(t){var e,i=[],n=t.length;for(e=0;e!==n;i.push(t[e++]));return i},_=n.prototype=new e;return n.version="1.19.1",_.constructor=n,_.kill()._gc=_._forcingPlayhead=_._hasPause=!1,_.to=function(t,e,n,r){var s=n.repeat&&u.TweenMax||i;return e?this.add(new s(t,e,n),r):this.set(t,n,r)},_.from=function(t,e,n,r){return this.add((n.repeat&&u.TweenMax||i).from(t,e,n),r)},_.fromTo=function(t,e,n,r,s){var a=r.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,n,r),s):this.set(t,r,s)},_.staggerTo=function(t,e,r,s,o,l,h,u){var f,_,m=new n({onComplete:l,onCompleteParams:h,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=r.cycle;for("string"==typeof t&&(t=i.selector(t)||t),a(t=t||[])&&(t=p(t)),(s=s||0)<0&&((t=p(t)).reverse(),s*=-1),_=0;_r._startTime;f._timeline;)p&&f._timeline.smoothChildTiming?f.totalTime(f._totalTime,!0):f._gc&&f._enabled(!0,!1),f=f._timeline;return this},_.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&o(e)){for(var n=e.length;--n>-1;)this.remove(e[n]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},_._remove=function(t,i){return e.prototype._remove.call(this,t,i),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},_.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},_.insert=_.insertMultiple=function(t,e,i,n){return this.add(t,e||0,i,n)},_.appendMultiple=function(t,e,i,n){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,n)},_.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},_.addPause=function(t,e,n,r){var s=i.delayedCall(0,f,n,r||this);return s.vars.onComplete=s.vars.onReverseComplete=e,s.data="isPause",this._hasPause=!0,this.add(s,t)},_.removeLabel=function(t){return delete this._labels[t],this},_.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},_._parseTimeOrLabel=function(e,i,n,r){var s;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&o(r)))for(s=r.length;--s>-1;)r[s]instanceof t&&r[s].timeline===this&&this.remove(r[s]);if("string"==typeof i)return this._parseTimeOrLabel(i,n&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,n);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(-1===(s=e.indexOf("=")))return null==this._labels[e]?n?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(s-1)+"1",10)*Number(e.substr(s+1)),e=s>1?this._parseTimeOrLabel(e.substr(0,s-1),0,n):this.duration()}return Number(e)+i},_.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},_.stop=function(){return this.paused(!0)},_.gotoAndPlay=function(t,e){return this.play(t,e)},_.gotoAndStop=function(t,e){return this.pause(t,e)},_.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var n,r,s,a,o,u,c,d=this._dirty?this.totalDuration():this._totalDuration,f=this._time,p=this._startTime,_=this._timeScale,m=this._paused;if(t>=d-1e-7&&t>=0)this._totalTime=this._time=d,this._reversed||this._hasPausedChild()||(r=!0,a="onComplete",o=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||this._rawPrevTime<0||1e-10===this._rawPrevTime)&&this._rawPrevTime!==t&&this._first&&(o=!0,this._rawPrevTime>1e-10&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,t=d+1e-4;else if(t<1e-7)if(this._totalTime=this._time=0,(0!==f||0===this._duration&&1e-10!==this._rawPrevTime&&(this._rawPrevTime>0||t<0&&this._rawPrevTime>=0))&&(a="onReverseComplete",r=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(o=r=!0,a="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(o=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&r)for(n=this._first;n&&0===n._startTime;)n._duration||(r=!1),n=n._next;t=0,this._initted||(o=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=f)for(n=this._first;n&&n._startTime<=t&&!u;)n._duration||"isPause"!==n.data||n.ratio||0===n._startTime&&0===this._rawPrevTime||(u=n),n=n._next;else for(n=this._last;n&&n._startTime>=t&&!u;)n._duration||"isPause"===n.data&&n._rawPrevTime>0&&(u=n),n=n._prev;u&&(this._time=t=u._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==f&&this._first||i||o||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==f&&t>0&&(this._active=!0),0===f&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(c=this._time)>=f)for(n=this._first;n&&(s=n._next,c===this._time&&(!this._paused||m));)(n._active||n._startTime<=c&&!n._paused&&!n._gc)&&(u===n&&this.pause(),n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=s;else for(n=this._last;n&&(s=n._prev,c===this._time&&(!this._paused||m));){if(n._active||n._startTime<=f&&!n._paused&&!n._gc){if(u===n){for(u=n._prev;u&&u.endTime()>this._time;)u.render(u._reversed?u.totalDuration()-(t-u._startTime)*u._timeScale:(t-u._startTime)*u._timeScale,e,i),u=u._prev;u=null,this.pause()}n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)}n=s}this._onUpdate&&(e||(l.length&&h(),this._callback("onUpdate"))),a&&(this._gc||p!==this._startTime&&_===this._timeScale||(0===this._time||d>=this.totalDuration())&&(r&&(l.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this._callback(a)))}},_._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof n&&t._hasPausedChild())return!0;t=t._next}return!1},_.getChildren=function(t,e,n,r){r=r||-9999999999;for(var s=[],a=this._first,o=0;a;)a._startTime-1;)(n[r].timeline===this||e&&this._contains(n[r]))&&(a[o++]=n[r]);return s&&this._enabled(!1,!0),a},_.recent=function(){return this._recent},_._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},_.shiftChildren=function(t,e,i){i=i||0;for(var n,r=this._first,s=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return this._uncache(!0)},_._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),n=i.length,r=!1;--n>-1;)i[n]._kill(t,e)&&(r=!0);return r},_.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},_.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},_._enabled=function(t,i){if(t===this._gc)for(var n=this._first;n;)n._enabled(t,!0),n=n._next;return e.prototype._enabled.call(this,t,i)},_.totalTime=function(e,i,n){this._forcingPlayhead=!0;var r=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},_.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},_.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,n=0,r=this._last,s=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>s&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):s=r._startTime,r._startTime<0&&!r._paused&&(n-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),s=0),(i=r._startTime+r._totalDuration/r._timeScale)>n&&(n=i),r=e;this._duration=this._totalDuration=n,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},_.paused=function(e){if(!e)for(var i=this._first,n=this._time;i;)i._startTime===n&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},_.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},_.rawTime=function(t){return t&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(t)-this._startTime)*this._timeScale},n},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var n=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},r=e._internals,s=r.lazyTweens,a=r.lazyRender,o=_gsScope._gsDefine.globals,l=new i(null,null,1,0),h=n.prototype=new t;return h.constructor=n,h.kill()._gc=!1,n.version="1.19.1",h.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},h.addCallback=function(t,i,n,r){return this.add(e.delayedCall(0,t,n,r),i)},h.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),n=i.length,r=this._parseTimeOrLabel(e);--n>-1;)i[n]._startTime===r&&i[n]._enabled(!1,!1);return this},h.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},h.tweenTo=function(t,i){i=i||{};var n,r,s,a={ease:l,useFrames:this.usesFrames(),immediateRender:!1},h=i.repeat&&o.TweenMax||e;for(r in i)a[r]=i[r];return a.time=this._parseTimeOrLabel(t),n=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,s=new h(this,n,a),a.onStart=function(){s.target.paused(!0),s.vars.time!==s.target.time()&&n===s.duration()&&s.duration(Math.abs(s.vars.time-s.target.time())/s.target._timeScale),i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||s,i.onStartParams||[])},s},h.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=!1!==i.immediateRender;var n=this.tweenTo(e,i);return n.duration(Math.abs(n.vars.time-t)/this._timeScale||.001)},h.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var n,r,o,l,h,u,c,d,f=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,_=this._time,m=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,b=this._paused,T=this._cycle;if(t>=f-1e-7&&t>=0)this._locked||(this._totalTime=f,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(r=!0,l="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||y<0||1e-10===y)&&y!==t&&this._first&&(h=!0,y>1e-10&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=p,t=p+1e-4);else if(t<1e-7)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==_||0===p&&1e-10!==y&&(y>0||t<0&&y>=0)&&!this._locked)&&(l="onReverseComplete",r=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=r=!0,l="onReverseComplete"):y>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=p||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&r)for(n=this._first;n&&0===n._startTime;)n._duration||(r=!1),n=n._next;t=0,this._initted||(h=!0)}else if(0===p&&y<0&&(h=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(u=p+this._repeatDelay,this._cycle=this._totalTime/u>>0,0!==this._cycle&&this._cycle===this._totalTime/u&&m<=t&&this._cycle--,this._time=this._totalTime-this._cycle*u,this._yoyo&&0!=(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,t=p+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e&&t=_||this._repeat&&T!==this._cycle)for(n=this._first;n&&n._startTime<=t&&!c;)n._duration||"isPause"!==n.data||n.ratio||0===n._startTime&&0===this._rawPrevTime||(c=n),n=n._next;else for(n=this._last;n&&n._startTime>=t&&!c;)n._duration||"isPause"===n.data&&n._rawPrevTime>0&&(c=n),n=n._prev;c&&(this._time=t=c._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==T&&!this._locked){var x=this._yoyo&&0!=(1&T),E=x===(this._yoyo&&0!=(1&this._cycle)),w=this._totalTime,S=this._cycle,D=this._rawPrevTime,A=this._time;if(this._totalTime=T*p,this._cycle0&&(this._active=!0),0===m&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(d=this._time)>=_)for(n=this._first;n&&(o=n._next,d===this._time&&(!this._paused||b));)(n._active||n._startTime<=this._time&&!n._paused&&!n._gc)&&(c===n&&this.pause(),n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=o;else for(n=this._last;n&&(o=n._prev,d===this._time&&(!this._paused||b));){if(n._active||n._startTime<=_&&!n._paused&&!n._gc){if(c===n){for(c=n._prev;c&&c.endTime()>this._time;)c.render(c._reversed?c.totalDuration()-(t-c._startTime)*c._timeScale:(t-c._startTime)*c._timeScale,e,i),c=c._prev;c=null,this.pause()}n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)}n=o}this._onUpdate&&(e||(s.length&&a(),this._callback("onUpdate"))),l&&(this._locked||this._gc||g!==this._startTime&&v===this._timeScale||(0===this._time||f>=this.totalDuration())&&(r&&(s.length&&a(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this._callback(l)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},h.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var n,r,s=[],a=this.getChildren(t,e,i),o=0,l=a.length;for(n=0;nt)return i[e].name;return null},h.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].timethis._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},h.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},h.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},h.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},h.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},n},!0),function(){var t=180/Math.PI,e=[],i=[],n=[],r={},s=_gsScope._gsDefine.globals,a=function(t,e,i,n){i===n&&(i=n-(n-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=n,this.da=n-t,this.ca=i-t,this.ba=e-t},o=function(t,e,i,n){var r={a:t},s={},a={},o={c:n},l=(t+e)/2,h=(e+i)/2,u=(i+n)/2,c=(l+h)/2,d=(h+u)/2,f=(d-c)/8;return r.b=l+(t-l)/4,s.b=c+f,r.c=s.a=(r.b+s.b)/2,s.c=a.a=(c+d)/2,a.b=d-f,o.b=u+(n-u)/4,a.c=o.a=(a.b+o.b)/2,[r,s,a,o]},l=function(t,r,s,a,l){var h,u,c,d,f,p,_,m,g,v,y,b,T,x=t.length-1,E=0,w=t[0].a;for(h=0;h-1;)"string"==typeof(d=t[l][n])&&"="===d.charAt(1)&&(t[l][n]=s[n]+Number(d.charAt(0)+d.substr(2)));if((o=t.length-2)<0)return f[0]=new a(t[0][n],0,0,t[o<-1?0:1][n]),f;for(l=0;l1){for(y=t[t.length-1],v=!0,d=T.length;--d>-1;)if(f=T[d],Math.abs(x[f]-y[f])>.05){v=!1;break}v&&(t=t.concat(),c&&t.unshift(c),t.push(t[1]),c=t[t.length-3])}for(e.length=i.length=n.length=0,d=T.length;--d>-1;)f=T[d],r[f]=-1!==u.indexOf(","+f+","),b[f]=h(t,f,r[f],c);for(d=e.length;--d>-1;)e[d]=Math.sqrt(e[d]),i[d]=Math.sqrt(i[d]);if(!o){for(d=T.length;--d>-1;)if(r[f])for(g=(p=b[T[d]]).length-1,_=0;_-1;)n[d]=Math.sqrt(n[d])}for(d=T.length,_=a?4:1;--d>-1;)p=b[f=T[d]],l(p,s,a,o,r[f]),v&&(p.splice(0,_),p.splice(p.length-_,_));return b},c=function(t,e,i){var n,r,s,o,l,h,u,c,d,f,p,_={},m="cubic"===(e=e||"soft")?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length-1;){for(_[d=v[h]]=l=[],f=0,c=t.length,u=0;u1&&u-1;)for(s=(d=t[_]).a,a=d.d-s,o=d.c-s,l=d.b-s,n=r=0,u=1;u<=i;u++)n=r-(r=((h=p*u)*h*a+3*(c=1-h)*(h*o+c*l))*h),e[f=_*i+u-1]=(e[f]||0)+n*n},f=function(t,e){var i,n,r,s,a=[],o=[],l=0,h=0,u=(e=e>>0||6)-1,c=[],f=[];for(i in t)d(t[i],a,e);for(r=a.length,n=0;n>0]=f,o[s]=h,l=0,f=[]);return{length:h,lengths:o,segments:c}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var n,r,s,a,o,l=e.values||[],h={},d=l[0],p=e.autoRotate||i.vars.orientToBezier;this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",!0===p?0:Number(p)||0]]:null;for(n in d)this._props.push(n);for(s=this._props.length;--s>-1;)n=this._props[s],this._overwriteProps.push(n),r=this._func[n]="function"==typeof t[n],h[n]=r?t[n.indexOf("set")||"function"!=typeof t["get"+n.substr(3)]?n:"get"+n.substr(3)]():parseFloat(t[n]),o||h[n]!==l[0][n]&&(o=h);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?u(l,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):c(l,e.type,h),this._segCount=this._beziers[n].length,this._timeRes){var _=f(this._beziers,this._timeRes);this._length=_.length,this._lengths=_.lengths,this._segments=_.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),s=p.length;--s>-1;){for(a=0;a<3;a++)n=p[s][a],this._func[n]="function"==typeof t[n]&&t[n.indexOf("set")||"function"!=typeof t["get"+n.substr(3)]?n:"get"+n.substr(3)];n=p[s][2],this._initialRotations[s]=(this._func[n]?this._func[n].call(this._target):this._target[n])||0,this._overwriteProps.push(n)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,n,r,s,a,o,l,h,u,c,d=this._segCount,f=this._func,p=this._target,_=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,c=this._curSeg,e*=this._length,r=this._li,e>this._l2&&r0){for(;r>0&&(this._l1=u[--r])>=e;);0===r&&ethis._s2&&r0){for(;r>0&&(this._s1=c[--r])>=e;);0===r&&e=1?d-1:d*e>>0)*(1/d))*d;for(n=1-o,r=this._props.length;--r>-1;)s=this._props[r],l=(o*o*(a=this._beziers[s][i]).da+3*n*(o*a.ca+n*a.ba))*o+a.a,this._mod[s]&&(l=this._mod[s](l,p)),f[s]?p[s](l):p[s]=l;if(this._autoRotate){var m,g,v,y,b,T,x,E=this._autoRotate;for(r=E.length;--r>-1;)s=E[r][2],T=E[r][3]||0,x=!0===E[r][4]?1:t,a=this._beziers[E[r][0]],m=this._beziers[E[r][1]],a&&m&&(a=a[i],m=m[i],g=a.a+(a.b-a.a)*o,g+=((y=a.b+(a.c-a.b)*o)-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=m.a+(m.b-m.a)*o,v+=((b=m.b+(m.c-m.b)*o)-v)*o,b+=(m.c+(m.d-m.c)*o-b)*o,l=_?Math.atan2(b-v,y-g)*x+T:this._initialRotations[r],this._mod[s]&&(l=this._mod[s](l,p)),f[s]?p[s](l):p[s]=l)}}}),_=p.prototype;p.bezierThrough=u,p.cubicToQuadratic=o,p._autoCSS=!0,p.quadraticToCubic=function(t,e,i){return new a(t,(2*e+t)/3,(2*e+i)/3,i)},p._cssRegister=function(){var t=s.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,n=e._setPluginRatio,r=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,s,a,o,l){e instanceof Array&&(e={values:e}),l=new p;var h,u,c,d=e.values,f=d.length-1,_=[],m={};if(f<0)return o;for(h=0;h<=f;h++)c=i(t,d[h],a,o,l,f!==h),_[h]=c.end;for(u in e)m[u]=e[u];return m.values=_,o=new r(t,"bezier",0,0,c.pt,2),o.data=c,o.plugin=l,o.setRatio=n,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(h=!0===m.autoRotate?0:Number(m.autoRotate),m.autoRotate=null!=c.end.left?[["left","top","rotation",h,!1]]:null!=c.end.x&&[["x","y","rotation",h,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),c.autoRotate=a._target._gsTransform,c.proxy.rotation=c.autoRotate.rotation||0,a._overwriteProps.push("rotation")),l._onInitTween(c.proxy,m,a._tween),o}})}},_._mod=function(t){for(var e,i=this._overwriteProps,n=i.length;--n>-1;)(e=t[i[n]])&&"function"==typeof e&&(this._mod[i[n]]=e)},_._kill=function(t){var e,i,n=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=n.length;--i>-1;)n[i]===e&&n.splice(i,1);if(n=this._autoRotate)for(i=n.length;--i>-1;)t[n[i][2]]&&n.splice(i,1);return this._super._kill.call(this,t)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,n,r,s,a=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=a.prototype.setRatio},o=_gsScope._gsDefine.globals,l={},h=a.prototype=new t("css");h.constructor=a,a.version="1.19.1",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",a.defaultSmoothOrigin=!0,h="px",a.suffixMap={top:h,right:h,bottom:h,left:h,width:h,height:h,fontSize:h,padding:h,margin:h,perspective:h,lineHeight:""};var u,c,d,f,p,_,m,g,v=/(?:\-|\.|\b)(\d|\.|e\-)+/g,y=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,b=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,T=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,x=/(?:\d|\-|\+|=|#|\.)*/g,E=/opacity *= *([^)]*)/i,w=/opacity:([^;]*)/i,S=/alpha\(opacity *=.+?\)/i,D=/^(rgb|hsl)/,A=/([A-Z])/g,P=/-([a-z])/gi,M=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(t,e){return e.toUpperCase()},O=/(?:Left|Right|Width)/i,I=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,L=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,R=/,(?=[^\)]*(?:\(|$))/gi,j=/[\s,\(]/i,N=Math.PI/180,k=180/Math.PI,B={},F={style:{}},H=_gsScope.document||{createElement:function(){return F}},U=function(t,e){return H.createElementNS?H.createElementNS(e||"http://www.w3.org/1999/xhtml",t):H.createElement(t)},X=U("div"),G=U("img"),V=a._internals={_specialProps:l},Y=(_gsScope.navigator||{}).userAgent||"",W=function(){var t=Y.indexOf("Android"),e=U("a");return d=-1!==Y.indexOf("Safari")&&-1===Y.indexOf("Chrome")&&(-1===t||parseFloat(Y.substr(t+8,2))>3),p=d&&parseFloat(Y.substr(Y.indexOf("Version/")+8,2))<6,f=-1!==Y.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Y)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Y))&&(_=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),q=function(t){return E.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},z=function(t){_gsScope.console},Z="",J="",K=function(t,e){var i,n,r=(e=e||X).style;if(void 0!==r[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],n=5;--n>-1&&void 0===r[i[n]+t];);return n>=0?(J=3===n?"ms":i[n],Z="-"+J.toLowerCase()+"-",J+t):null},Q=H.defaultView?H.defaultView.getComputedStyle:function(){},$=a.getStyle=function(t,e,i,n,r){var s;return W||"opacity"!==e?(!n&&t.style[e]?s=t.style[e]:(i=i||Q(t))?s=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(A,"-$1").toLowerCase()):t.currentStyle&&(s=t.currentStyle[e]),null==r||s&&"none"!==s&&"auto"!==s&&"auto auto"!==s?s:r):q(t)},tt=V.convertToPixels=function(t,i,n,r,s){if("px"===r||!r)return n;if("auto"===r||!n)return 0;var o,l,h,u=O.test(i),c=t,d=X.style,f=n<0,p=1===n;if(f&&(n=-n),p&&(n*=100),"%"===r&&-1!==i.indexOf("border"))o=n/100*(u?t.clientWidth:t.clientHeight);else{if(d.cssText="border:0 solid red;position:"+$(t,"position")+";line-height:0;","%"!==r&&c.appendChild&&"v"!==r.charAt(0)&&"rem"!==r)d[u?"borderLeftWidth":"borderTopWidth"]=n+r;else{if(c=t.parentNode||H.body,l=c._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*n/100;d[u?"width":"height"]=n+r}c.appendChild(X),o=parseFloat(X[u?"offsetWidth":"offsetHeight"]),c.removeChild(X),u&&"%"===r&&!1!==a.cacheWidths&&((l=c._gsCache=c._gsCache||{}).time=h,l.width=o/n*100),0!==o||s||(o=tt(t,i,n,r,!0))}return p&&(o/=100),f?-o:o},et=V.calculateOffset=function(t,e,i){if("absolute"!==$(t,"position",i))return 0;var n="left"===e?"Left":"Top",r=$(t,"margin"+n,i);return t["offset"+n]-(tt(t,e,parseFloat(r),r.replace(x,""))||0)},it=function(t,e){var i,n,r,s={};if(e=e||Q(t,null))if(i=e.length)for(;--i>-1;)-1!==(r=e[i]).indexOf("-transform")&&Mt!==r||(s[r.replace(P,C)]=e.getPropertyValue(r));else for(i in e)-1!==i.indexOf("Transform")&&Pt!==i||(s[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===s[i]&&(s[i.replace(P,C)]=e[i]);return W||(s.opacity=q(t)),n=Gt(t,e,!1),s.rotation=n.rotation,s.skewX=n.skewX,s.scaleX=n.scaleX,s.scaleY=n.scaleY,s.x=n.x,s.y=n.y,Ot&&(s.z=n.z,s.rotationX=n.rotationX,s.rotationY=n.rotationY,s.scaleZ=n.scaleZ),s.filters&&delete s.filters,s},nt=function(t,e,i,n,r){var s,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(s=i[a])||r&&r[a])&&-1===a.indexOf("Origin")&&("number"!=typeof s&&"string"!=typeof s||(l[a]="auto"!==s||"left"!==a&&"top"!==a?""!==s&&"auto"!==s&&"none"!==s||"string"!=typeof e[a]||""===e[a].replace(T,"")?s:0:et(t,a),void 0!==h[a]&&(o=new vt(h,a,h[a],o))));if(n)for(a in n)"className"!==a&&(l[a]=n[a]);return{difs:l,firstMPT:o}},rt={width:["Left","Right"],height:["Top","Bottom"]},st=["marginLeft","marginRight","marginTop","marginBottom"],at=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||Q(t))[e]||0;if(t.getCTM&&Ht(t))return t.getBBox()[e]||0;var n=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),r=rt[e],s=r.length;for(i=i||Q(t,null);--s>-1;)n-=parseFloat($(t,"padding"+r[s],i,!0))||0,n-=parseFloat($(t,"border"+r[s]+"Width",i,!0))||0;return n},ot=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,n=t.split(" "),r=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":n[0],s=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":n[1];if(n.length>3&&!e){for(n=t.split(", ").join(",").split(","),t=[],i=0;i2?" "+n[2]:""),e&&(e.oxp=-1!==r.indexOf("%"),e.oyp=-1!==s.indexOf("%"),e.oxr="="===r.charAt(1),e.oyr="="===s.charAt(1),e.ox=parseFloat(r.replace(T,"")),e.oy=parseFloat(s.replace(T,"")),e.v=t),e||t},lt=function(t,e){return"function"==typeof t&&(t=t(g,m)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},ht=function(t,e){return"function"==typeof t&&(t=t(g,m)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ut=function(t,e,i,n){var r,s,a,o,l;return"function"==typeof t&&(t=t(g,m)),null==t?o=e:"number"==typeof t?o=t:(r=360,s=t.split("_"),a=((l="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(s[0].substr(2)):parseFloat(s[0]))*(-1===t.indexOf("rad")?1:k)-(l?0:e),s.length&&(n&&(n[i]=e+a),-1!==t.indexOf("short")&&(a%=r)!==a%(r/2)&&(a=a<0?a+r:a-r),-1!==t.indexOf("_cw")&&a<0?a=(a+9999999999*r)%r-(a/r|0)*r:-1!==t.indexOf("ccw")&&a>0&&(a=(a-9999999999*r)%r-(a/r|0)*r)),o=e+a),o<1e-6&&o>-1e-6&&(o=0),o},ct={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},dt=function(t,e,i){return 255*(6*(t=t<0?t+1:t>1?t-1:t)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0},ft=a.parseColor=function(t,e){var i,n,r,s,a,o,l,h,u,c,d;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),ct[t])i=ct[t];else if("#"===t.charAt(0))4===t.length&&(t="#"+(n=t.charAt(1))+n+(r=t.charAt(2))+r+(s=t.charAt(3))+s),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=d=t.match(v),e){if(-1!==t.indexOf("="))return t.match(y)}else a=Number(i[0])%360/360,o=Number(i[1])/100,n=2*(l=Number(i[2])/100)-(r=l<=.5?l*(o+1):l+o-l*o),i.length>3&&(i[3]=Number(t[3])),i[0]=dt(a+1/3,n,r),i[1]=dt(a,n,r),i[2]=dt(a-1/3,n,r);else i=t.match(v)||ct.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=ct.black;return e&&!d&&(n=i[0]/255,r=i[1]/255,s=i[2]/255,l=((h=Math.max(n,r,s))+(u=Math.min(n,r,s)))/2,h===u?a=o=0:(c=h-u,o=l>.5?c/(2-h-u):c/(h+u),a=h===n?(r-s)/c+(r0?a[0].replace(v,""):"";return u?r=e?function(t){var e,d,f,p;if("number"==typeof t)t+=c;else if(n&&R.test(t)){for(p=t.replace(R,"|").split("|"),f=0;ff--)for(;++fd--)for(;++d>0];return r.parse(e,o,s,a)}},vt=(V._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,n,r,s,a=this.data,o=a.proxy,l=a.firstMPT;l;)e=o[l.v],l.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,s=1===t?"e":"b";l;){if((i=l.t).type){if(1===i.type){for(r=i.xs0+i.s+i.xs1,n=1;n0;)l="xn"+a,f[o=n.p+"_"+l]=n.data[l],d[o]=n[l],s||(h=new vt(n,l,o,h,n.rxp[l]));n=n._next}return{proxy:d,end:f,firstMPT:h,pt:u}},V.CSSPropTween=function(t,e,n,r,a,o,l,h,u,c,d){this.t=t,this.p=e,this.s=n,this.c=r,this.n=l||e,t instanceof yt||s.push(this.n),this.r=h,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===c?n:c,this.e=void 0===d?n+r:d,a&&(this._next=a,a._prev=this)}),bt=function(t,e,i,n,r,s){var a=new yt(t,e,i,n-i,r,-1,s);return a.b=i,a.e=a.xs0=n,a},Tt=a.parseComplex=function(t,e,i,n,r,s,o,l,h,c){i=i||s||"","function"==typeof n&&(n=n(g,m)),o=new yt(t,e,0,0,o,c?2:1,null,!1,l,i,n),n+="",r&&_t.test(n+i)&&(n=[i,n],a.colorStringFilter(n),i=n[0],n=n[1]);var d,f,p,_,b,T,x,E,w,S,D,A,P,M=i.split(", ").join(",").split(" "),C=n.split(", ").join(",").split(" "),O=M.length,I=!1!==u;for(-1===n.indexOf(",")&&-1===i.indexOf(",")||(M=M.join(" ").replace(R,", ").split(" "),C=C.join(" ").replace(R,", ").split(" "),O=M.length),O!==C.length&&(O=(M=(s||"").split(" ")).length),o.plugin=h,o.setRatio=c,_t.lastIndex=0,d=0;d6)&&!W&&0===b[3]?(o["xs"+o.l]+=o.l?" transparent":"transparent",o.e=o.e.split(C[d]).join("transparent")):(W||(w=!1),P?o.appendXtra(w?"hsla(":"hsl(",_[0],lt(b[0],_[0]),",",!1,!0).appendXtra("",_[1],lt(b[1],_[1]),"%,",!1).appendXtra("",_[2],lt(b[2],_[2]),w?"%,":"%"+A,!1):o.appendXtra(w?"rgba(":"rgb(",_[0],b[0]-_[0],",",!0,!0).appendXtra("",_[1],b[1]-_[1],",",!0).appendXtra("",_[2],b[2]-_[2],w?",":A,!0),w&&(_=_.length<4?1:_[3],o.appendXtra("",_,(b.length<4?1:b[3])-_,A,!1))),_t.lastIndex=0;else if(T=_.match(v)){if(!(x=b.match(y))||x.length!==T.length)return o;for(p=0,f=0;f0;)h["xn"+xt]=0,h["xs"+xt]="";h.xs0="",h._next=h._prev=h.xfirst=h.data=h.plugin=h.setRatio=h.rxp=null,h.appendXtra=function(t,e,i,n,r,s){var a=this,o=a.l;return a["xs"+o]+=s&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=n||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=r,a["xn"+o]=e,a.plugin||(a.xfirst=new yt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,r,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=r,a)):(a["xs"+o]+=e+(n||""),a)};var Et=function(t,e){e=e||{},this.p=e.prefix?K(t)||t:t,l[t]=l[this.p]=this,this.format=e.formatter||mt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},wt=V._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var n,r=t.split(","),s=e.defaultValue;for(i=i||[s],n=0;no.length?l.length:o.length,a=0;a-1;)s=Number(r[xt]),r[xt]=(a=s-(s|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+s:s;return e&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r},Gt=V.getTransform=function(t,i,n,r){if(t._gsTransform&&n&&!r)return t._gsTransform;var s,o,l,h,u,c,d=n?t._gsTransform||new It:new It,f=d.scaleX<0,p=Ot?parseFloat($(t,Ct,i,!1,"0 0 0").split(" ")[2])||d.zOrigin||0:0,_=parseFloat(a.defaultTransformPerspective)||0;if(d.svg=!(!t.getCTM||!Ht(t)),d.svg&&(kt(t,$(t,Ct,i,!1,"50% 50%")+"",d,t.getAttribute("data-svg-origin")),Dt=a.useSVGTransformAttr||Nt),(s=Xt(t))!==Ut){if(16===s.length){var m,g,v,y,b,T=s[0],x=s[1],E=s[2],w=s[3],S=s[4],D=s[5],A=s[6],P=s[7],M=s[8],C=s[9],O=s[10],I=s[12],L=s[13],R=s[14],j=s[11],N=Math.atan2(A,O);d.zOrigin&&(I=M*(R=-d.zOrigin)-s[12],L=C*R-s[13],R=O*R+d.zOrigin-s[14]),d.rotationX=N*k,N&&(m=S*(y=Math.cos(-N))+M*(b=Math.sin(-N)),g=D*y+C*b,v=A*y+O*b,M=S*-b+M*y,C=D*-b+C*y,O=A*-b+O*y,j=P*-b+j*y,S=m,D=g,A=v),N=Math.atan2(-E,O),d.rotationY=N*k,N&&(g=x*(y=Math.cos(-N))-C*(b=Math.sin(-N)),v=E*y-O*b,C=x*b+C*y,O=E*b+O*y,j=w*b+j*y,T=m=T*y-M*b,x=g,E=v),N=Math.atan2(x,T),d.rotation=N*k,N&&(T=T*(y=Math.cos(-N))+S*(b=Math.sin(-N)),g=x*y+D*b,D=x*-b+D*y,A=E*-b+A*y,x=g),d.rotationX&&Math.abs(d.rotationX)+Math.abs(d.rotation)>359.9&&(d.rotationX=d.rotation=0,d.rotationY=180-d.rotationY),d.scaleX=(1e5*Math.sqrt(T*T+x*x)+.5|0)/1e5,d.scaleY=(1e5*Math.sqrt(D*D+C*C)+.5|0)/1e5,d.scaleZ=(1e5*Math.sqrt(A*A+O*O)+.5|0)/1e5,d.rotationX||d.rotationY?d.skewX=0:(d.skewX=S||D?Math.atan2(S,D)*k+d.rotation:d.skewX||0,Math.abs(d.skewX)>90&&Math.abs(d.skewX)<270&&(f?(d.scaleX*=-1,d.skewX+=d.rotation<=0?180:-180,d.rotation+=d.rotation<=0?180:-180):(d.scaleY*=-1,d.skewX+=d.skewX<=0?180:-180))),d.perspective=j?1/(j<0?-j:j):0,d.x=I,d.y=L,d.z=R,d.svg&&(d.x-=d.xOrigin-(d.xOrigin*T-d.yOrigin*S),d.y-=d.yOrigin-(d.yOrigin*x-d.xOrigin*D))}else if(!Ot||r||!s.length||d.x!==s[4]||d.y!==s[5]||!d.rotationX&&!d.rotationY){var B=s.length>=6,F=B?s[0]:1,H=s[1]||0,U=s[2]||0,X=B?s[3]:1;d.x=s[4]||0,d.y=s[5]||0,l=Math.sqrt(F*F+H*H),h=Math.sqrt(X*X+U*U),u=F||H?Math.atan2(H,F)*k:d.rotation||0,c=U||X?Math.atan2(U,X)*k+u:d.skewX||0,Math.abs(c)>90&&Math.abs(c)<270&&(f?(l*=-1,c+=u<=0?180:-180,u+=u<=0?180:-180):(h*=-1,c+=c<=0?180:-180)),d.scaleX=l,d.scaleY=h,d.rotation=u,d.skewX=c,Ot&&(d.rotationX=d.rotationY=d.z=0,d.perspective=_,d.scaleZ=1),d.svg&&(d.x-=d.xOrigin-(d.xOrigin*F+d.yOrigin*U),d.y-=d.yOrigin-(d.xOrigin*H+d.yOrigin*X))}d.zOrigin=p;for(o in d)d[o]<2e-5&&d[o]>-2e-5&&(d[o]=0)}return n&&(t._gsTransform=d,d.svg&&(Dt&&t.style[Pt]?e.delayedCall(.001,function(){qt(t.style,Pt)}):!Dt&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),d},Vt=function(t){var e,i,n=this.data,r=-n.rotation*N,s=r+n.skewX*N,a=(Math.cos(r)*n.scaleX*1e5|0)/1e5,o=(Math.sin(r)*n.scaleX*1e5|0)/1e5,l=(Math.sin(s)*-n.scaleY*1e5|0)/1e5,h=(Math.cos(s)*n.scaleY*1e5|0)/1e5,u=this.t.style,c=this.t.currentStyle;if(c){i=o,o=-l,l=-i,e=c.filter,u.filter="";var d,f,p=this.t.offsetWidth,m=this.t.offsetHeight,g="absolute"!==c.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+o+", M21="+l+", M22="+h,y=n.x+p*n.xPercent/100,b=n.y+m*n.yPercent/100;if(null!=n.ox&&(y+=(d=(n.oxp?p*n.ox*.01:n.ox)-p/2)-(d*a+(f=(n.oyp?m*n.oy*.01:n.oy)-m/2)*o),b+=f-(d*l+f*h)),v+=g?", Dx="+((d=p/2)-(d*a+(f=m/2)*o)+y)+", Dy="+(f-(d*l+f*h)+b)+")":", sizingMethod='auto expand')",-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?u.filter=e.replace(L,v):u.filter=v+" "+e,0!==t&&1!==t||1===a&&0===o&&0===l&&1===h&&(g&&-1===v.indexOf("Dx=0, Dy=0")||E.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&u.removeAttribute("filter")),!g){var T,w,S,D=_<8?1:-1;for(d=n.ieOffsetX||0,f=n.ieOffsetY||0,n.ieOffsetX=Math.round((p-((a<0?-a:a)*p+(o<0?-o:o)*m))/2+y),n.ieOffsetY=Math.round((m-((h<0?-h:h)*m+(l<0?-l:l)*p))/2+b),xt=0;xt<4;xt++)S=(i=-1!==(T=c[w=st[xt]]).indexOf("px")?parseFloat(T):tt(this.t,w,parseFloat(T),T.replace(x,""))||0)!==n[w]?xt<2?-n.ieOffsetX:-n.ieOffsetY:xt<2?d-n.ieOffsetX:f-n.ieOffsetY,u[w]=(n[w]=Math.round(i-S*(0===xt||2===xt?1:D)))+"px"}}},Yt=V.set3DTransformRatio=V.setTransformRatio=function(t){var e,i,n,r,s,a,o,l,h,u,c,d,p,_,m,g,v,y,b,T,x,E=this.data,w=this.t.style,S=E.rotation,D=E.rotationX,A=E.rotationY,P=E.scaleX,M=E.scaleY,C=E.scaleZ,O=E.x,I=E.y,L=E.z,R=E.svg,j=E.perspective,k=E.force3D,B=E.skewY,F=E.skewX;if(B&&(F+=B,S+=B),!((1!==t&&0!==t||"auto"!==k||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&k||L||j||A||D||1!==C)||Dt&&R||!Ot)S||F||R?(S*=N,T=F*N,x=1e5,i=Math.cos(S)*P,s=Math.sin(S)*P,n=Math.sin(S-T)*-M,a=Math.cos(S-T)*M,T&&"simple"===E.skewType&&(e=Math.tan(T-B*N),n*=e=Math.sqrt(1+e*e),a*=e,B&&(e=Math.tan(B*N),i*=e=Math.sqrt(1+e*e),s*=e)),R&&(O+=E.xOrigin-(E.xOrigin*i+E.yOrigin*n)+E.xOffset,I+=E.yOrigin-(E.xOrigin*s+E.yOrigin*a)+E.yOffset,Dt&&(E.xPercent||E.yPercent)&&(m=this.t.getBBox(),O+=.01*E.xPercent*m.width,I+=.01*E.yPercent*m.height),O<(m=1e-6)&&O>-m&&(O=0),I-m&&(I=0)),b=(i*x|0)/x+","+(s*x|0)/x+","+(n*x|0)/x+","+(a*x|0)/x+","+O+","+I+")",R&&Dt?this.t.setAttribute("transform","matrix("+b):w[Pt]=(E.xPercent||E.yPercent?"translate("+E.xPercent+"%,"+E.yPercent+"%) matrix(":"matrix(")+b):w[Pt]=(E.xPercent||E.yPercent?"translate("+E.xPercent+"%,"+E.yPercent+"%) matrix(":"matrix(")+P+",0,0,"+M+","+O+","+I+")";else{if(f&&(P<(m=1e-4)&&P>-m&&(P=C=2e-5),M-m&&(M=C=2e-5),!j||E.z||E.rotationX||E.rotationY||(j=0)),S||F)S*=N,g=i=Math.cos(S),v=s=Math.sin(S),F&&(S-=F*N,g=Math.cos(S),v=Math.sin(S),"simple"===E.skewType&&(e=Math.tan((F-B)*N),g*=e=Math.sqrt(1+e*e),v*=e,E.skewY&&(e=Math.tan(B*N),i*=e=Math.sqrt(1+e*e),s*=e))),n=-v,a=g;else{if(!(A||D||1!==C||j||R))return void(w[Pt]=(E.xPercent||E.yPercent?"translate("+E.xPercent+"%,"+E.yPercent+"%) translate3d(":"translate3d(")+O+"px,"+I+"px,"+L+"px)"+(1!==P||1!==M?" scale("+P+","+M+")":""));i=a=1,n=s=0}u=1,r=o=l=h=c=d=0,p=j?-1/j:0,_=E.zOrigin,m=1e-6,",","0",(S=A*N)&&(g=Math.cos(S),l=-(v=Math.sin(S)),c=p*-v,r=i*v,o=s*v,u=g,p*=g,i*=g,s*=g),(S=D*N)&&(e=n*(g=Math.cos(S))+r*(v=Math.sin(S)),y=a*g+o*v,h=u*v,d=p*v,r=n*-v+r*g,o=a*-v+o*g,u*=g,p*=g,n=e,a=y),1!==C&&(r*=C,o*=C,u*=C,p*=C),1!==M&&(n*=M,a*=M,h*=M,d*=M),1!==P&&(i*=P,s*=P,l*=P,c*=P),(_||R)&&(_&&(O+=r*-_,I+=o*-_,L+=u*-_+_),R&&(O+=E.xOrigin-(E.xOrigin*i+E.yOrigin*n)+E.xOffset,I+=E.yOrigin-(E.xOrigin*s+E.yOrigin*a)+E.yOffset),O-m&&(O="0"),I-m&&(I="0"),L-m&&(L=0)),b=E.xPercent||E.yPercent?"translate("+E.xPercent+"%,"+E.yPercent+"%) matrix3d(":"matrix3d(",b+=(i-m?"0":i)+","+(s-m?"0":s)+","+(l-m?"0":l),b+=","+(c-m?"0":c)+","+(n-m?"0":n)+","+(a-m?"0":a),D||A||1!==C?(b+=","+(h-m?"0":h)+","+(d-m?"0":d)+","+(r-m?"0":r),b+=","+(o-m?"0":o)+","+(u-m?"0":u)+","+(p-m?"0":p)+","):b+=",0,0,0,0,1,0,",b+=O+","+I+","+L+","+(j?1+-L/j:1)+")",w[Pt]=b}};(h=It.prototype).x=h.y=h.z=h.skewX=h.skewY=h.rotation=h.rotationX=h.rotationY=h.zOrigin=h.xPercent=h.yPercent=h.xOffset=h.yOffset=0,h.scaleX=h.scaleY=h.scaleZ=1,wt("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,n,s,o,l){if(n._lastParsedTransform===l)return s;n._lastParsedTransform=l;var h,u=l.scale&&"function"==typeof l.scale?l.scale:0;"function"==typeof l[i]&&(h=l[i],l[i]=e),u&&(l.scale=u(g,t));var c,d,f,p,_,v,y,b,T,x=t._gsTransform,E=t.style,w=At.length,S=l,D={},A=Gt(t,r,!0,S.parseTransform),P=S.transform&&("function"==typeof S.transform?S.transform(g,m):S.transform);if(n._transform=A,P&&"string"==typeof P&&Pt)(d=X.style)[Pt]=P,d.display="block",d.position="absolute",H.body.appendChild(X),c=Gt(X,null,!1),A.svg&&(v=A.xOrigin,y=A.yOrigin,c.x-=A.xOffset,c.y-=A.yOffset,(S.transformOrigin||S.svgOrigin)&&(P={},kt(t,ot(S.transformOrigin),P,S.svgOrigin,S.smoothOrigin,!0),v=P.xOrigin,y=P.yOrigin,c.x-=P.xOffset-A.xOffset,c.y-=P.yOffset-A.yOffset),(v||y)&&(b=Xt(X,!0),c.x-=v-(v*b[0]+y*b[2]),c.y-=y-(v*b[1]+y*b[3]))),H.body.removeChild(X),c.perspective||(c.perspective=A.perspective),null!=S.xPercent&&(c.xPercent=ht(S.xPercent,A.xPercent)),null!=S.yPercent&&(c.yPercent=ht(S.yPercent,A.yPercent));else if("object"==typeof S){if(c={scaleX:ht(null!=S.scaleX?S.scaleX:S.scale,A.scaleX),scaleY:ht(null!=S.scaleY?S.scaleY:S.scale,A.scaleY),scaleZ:ht(S.scaleZ,A.scaleZ),x:ht(S.x,A.x),y:ht(S.y,A.y),z:ht(S.z,A.z),xPercent:ht(S.xPercent,A.xPercent),yPercent:ht(S.yPercent,A.yPercent),perspective:ht(S.transformPerspective,A.perspective)},null!=(_=S.directionalRotation))if("object"==typeof _)for(d in _)S[d]=_[d];else S.rotation=_;"string"==typeof S.x&&-1!==S.x.indexOf("%")&&(c.x=0,c.xPercent=ht(S.x,A.xPercent)),"string"==typeof S.y&&-1!==S.y.indexOf("%")&&(c.y=0,c.yPercent=ht(S.y,A.yPercent)),c.rotation=ut("rotation"in S?S.rotation:"shortRotation"in S?S.shortRotation+"_short":"rotationZ"in S?S.rotationZ:A.rotation,A.rotation,"rotation",D),Ot&&(c.rotationX=ut("rotationX"in S?S.rotationX:"shortRotationX"in S?S.shortRotationX+"_short":A.rotationX||0,A.rotationX,"rotationX",D),c.rotationY=ut("rotationY"in S?S.rotationY:"shortRotationY"in S?S.shortRotationY+"_short":A.rotationY||0,A.rotationY,"rotationY",D)),c.skewX=ut(S.skewX,A.skewX),c.skewY=ut(S.skewY,A.skewY)}for(Ot&&null!=S.force3D&&(A.force3D=S.force3D,p=!0),A.skewType=S.skewType||A.skewType||a.defaultSkewType,(f=A.force3D||A.z||A.rotationX||A.rotationY||c.z||c.rotationX||c.rotationY||c.perspective)||null==S.scale||(c.scaleZ=1);--w>-1;)((P=c[T=At[w]]-A[T])>1e-6||P<-1e-6||null!=S[T]||null!=B[T])&&(p=!0,s=new yt(A,T,A[T],P,s),T in D&&(s.e=D[T]),s.xs0=0,s.plugin=o,n._overwriteProps.push(s.n));return P=S.transformOrigin,A.svg&&(P||S.svgOrigin)&&(v=A.xOffset,y=A.yOffset,kt(t,ot(P),c,S.svgOrigin,S.smoothOrigin),s=bt(A,"xOrigin",(x?A:c).xOrigin,c.xOrigin,s,"transformOrigin"),s=bt(A,"yOrigin",(x?A:c).yOrigin,c.yOrigin,s,"transformOrigin"),v===A.xOffset&&y===A.yOffset||(s=bt(A,"xOffset",x?v:A.xOffset,A.xOffset,s,"transformOrigin"),s=bt(A,"yOffset",x?y:A.yOffset,A.yOffset,s,"transformOrigin")),P="0px 0px"),(P||Ot&&f&&A.zOrigin)&&(Pt?(p=!0,T=Ct,P=(P||$(t,T,r,!1,"50% 50%"))+"",(s=new yt(E,T,0,0,s,-1,"transformOrigin")).b=E[T],s.plugin=o,Ot?(d=A.zOrigin,P=P.split(" "),A.zOrigin=(P.length>2&&(0===d||"0px"!==P[2])?parseFloat(P[2]):d)||0,s.xs0=s.e=P[0]+" "+(P[1]||"50%")+" 0px",(s=new yt(A,"zOrigin",0,0,s,-1,s.n)).b=d,s.xs0=s.e=A.zOrigin):s.xs0=s.e=P):ot(P+"",A)),p&&(n._transformType=A.svg&&Dt||!f&&3!==this._transformType?2:3),h&&(l[i]=h),u&&(l.scale=u),s},prefix:!0}),wt("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),wt("borderRadius",{defaultValue:"0px",parser:function(t,e,i,s,a,o){e=this.format(e);var l,h,u,c,d,f,p,_,m,g,v,y,b,T,x,E,w=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],S=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),l=e.split(" "),h=0;h-1;)(u=-1!==(m=o[h]).indexOf("%"))!==(-1!==l[h].indexOf("%"))&&(c=0===h?t.offsetWidth-G.width:t.offsetHeight-G.height,o[h]=u?parseFloat(m)/100*c+"px":parseFloat(m)/c*100+"%");m=o.join(" ")}return this.parseComplex(t.style,m,g,s,a)},formatter:ot}),wt("backgroundSize",{defaultValue:"0 0",formatter:function(t){return t+="",ot(-1===t.indexOf(" ")?t+" "+t:t)}}),wt("perspective",{defaultValue:"0px",prefix:!0}),wt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),wt("transformStyle",{prefix:!0}),wt("backfaceVisibility",{prefix:!0}),wt("userSelect",{prefix:!0}),wt("margin",{parser:gt("marginTop,marginRight,marginBottom,marginLeft")}),wt("padding",{parser:gt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),wt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,n,s,a){var o,l,h;return _<9?(l=t.currentStyle,h=_<8?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format($(t,this.p,r,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,s,a)}}),wt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),wt("autoRound,strictUnits",{parser:function(t,e,i,n,r){return r}}),wt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,n,s,a){var o=$(t,"borderTopWidth",r,!1,"0px"),l=this.format(e).split(" "),h=l[0].replace(x,"");return"px"!==h&&(o=parseFloat(o)/tt(t,"borderTopWidth",1,h)+h),this.parseComplex(t.style,this.format(o+" "+$(t,"borderTopStyle",r,!1,"solid")+" "+$(t,"borderTopColor",r,!1,"#000")),l.join(" "),s,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(_t)||["#000"])[0]}}),wt("borderWidth",{parser:gt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),wt("float,cssFloat,styleFloat",{parser:function(t,e,i,n,r,s){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new yt(a,o,0,0,r,-1,i,!1,0,a[o],e)}});var Wt=function(t){var e,i=this.t,n=i.filter||$(this.data,"filter")||"",r=this.s+this.c*t|0;100===r&&(-1===n.indexOf("atrix(")&&-1===n.indexOf("radient(")&&-1===n.indexOf("oader(")?(i.removeAttribute("filter"),e=!$(this.data,"filter")):(i.filter=n.replace(S,""),e=!0)),e||(this.xn1&&(i.filter=n=n||"alpha(opacity="+r+")"),-1===n.indexOf("pacity")?0===r&&this.xn1||(i.filter=n+" alpha(opacity="+r+")"):i.filter=n.replace(E,"opacity="+r))};wt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,n,s,a){var o=parseFloat($(t,"opacity",r,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===$(t,"visibility",r)&&0!==e&&(o=0),W?s=new yt(l,"opacity",o,e-o,s):((s=new yt(l,"opacity",100*o,100*(e-o),s)).xn1=h?1:0,l.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=t,s.plugin=a,s.setRatio=Wt),h&&((s=new yt(l,"visibility",0,0,s,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",n._overwriteProps.push(s.n),n._overwriteProps.push(i)),s}});var qt=function(t,e){e&&(t.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),t.removeProperty(e.replace(A,"-$1").toLowerCase())):t.removeAttribute(e))},zt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:qt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};wt("className",{parser:function(t,e,n,s,a,o,l){var h,u,c,d,f,p=t.getAttribute("class")||"",_=t.style.cssText;if(a=s._classNamePT=new yt(t,n,0,0,a,2),a.setRatio=zt,a.pr=-11,i=!0,a.b=p,u=it(t,r),c=t._gsClassPT){for(d={},f=c.data;f;)d[f.p]=1,f=f._next;c.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=nt(t,u,it(t),l,d),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=_,a=a.xfirst=s.parse(t,h.difs,a,o)}});var Zt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,n,r,s,a=this.t.style,o=l.transform.parse;if("all"===this.e)a.cssText="",r=!0;else for(n=(e=this.e.split(" ").join("").split(",")).length;--n>-1;)i=e[n],l[i]&&(l[i].parse===o?r=!0:i="transformOrigin"===i?Ct:l[i].p),qt(a,i);r&&(qt(a,Pt),(s=this.t._gsTransform)&&(s.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(wt("clearProps",{parser:function(t,e,n,r,s){return s=new yt(t,n,0,0,s,2),s.setRatio=Zt,s.e=e,s.pr=-10,s.data=r._tween,i=!0,s}}),h="bezier,throwProps,physicsProps,physics2D".split(","),xt=h.length;xt--;)St(h[xt]);(h=a.prototype)._firstPT=h._lastParsedTransform=h._transform=null,h._onInitTween=function(t,e,o,h){if(!t.nodeType)return!1;this._target=m=t,this._tween=o,this._vars=e,g=h,u=e.autoRound,i=!1,n=e.suffixMap||a.suffixMap,r=Q(t,""),s=this._overwriteProps;var f,_,v,y,b,T,x,E,S,D=t.style;if(c&&""===D.zIndex&&("auto"!==(f=$(t,"zIndex",r))&&""!==f||this._addLazySet(D,"zIndex",0)),"string"==typeof e&&(y=D.cssText,f=it(t,r),D.cssText=y+";"+e,f=nt(t,f,it(t)).difs,!W&&w.test(e)&&(f.opacity=parseFloat(RegExp.$1)),e=f,D.cssText=y),e.className?this._firstPT=_=l.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=_=this.parse(t,e,null),this._transformType){for(S=3===this._transformType,Pt?d&&(c=!0,""===D.zIndex&&("auto"!==(x=$(t,"zIndex",r))&&""!==x||this._addLazySet(D,"zIndex",0)),p&&this._addLazySet(D,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(S?"visible":"hidden"))):D.zoom=1,v=_;v&&v._next;)v=v._next;E=new yt(t,"transform",0,0,null,2),this._linkCSSP(E,null,v),E.setRatio=Pt?Yt:Vt,E.data=this._transform||Gt(t,r,!0),E.tween=o,E.pr=-1,s.pop()}if(i){for(;_;){for(T=_._next,v=y;v&&v.pr>_.pr;)v=v._next;(_._prev=v?v._prev:b)?_._prev._next=_:y=_,(_._next=v)?v._prev=_:b=_,_=T}this._firstPT=y}return!0},h.parse=function(t,e,i,s){var a,o,h,c,d,f,p,_,v,y,b=t.style;for(a in e)"function"==typeof(f=e[a])&&(f=f(g,m)),(o=l[a])?i=o.parse(t,f,a,this,i,s,e):(d=$(t,a,r)+"",v="string"==typeof f,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||v&&D.test(f)?(v||(f=((f=ft(f)).length>3?"rgba(":"rgb(")+f.join(",")+")"),i=Tt(b,a,d,f,!0,"transparent",i,0,s)):v&&j.test(f)?i=Tt(b,a,d,f,!0,null,i,0,s):(p=(h=parseFloat(d))||0===h?d.substr((h+"").length):"",""!==d&&"auto"!==d||("width"===a||"height"===a?(h=at(t,a,r),p="px"):"left"===a||"top"===a?(h=et(t,a,r),p="px"):(h="opacity"!==a?0:1,p="")),(y=v&&"="===f.charAt(1))?(c=parseInt(f.charAt(0)+"1",10),f=f.substr(2),c*=parseFloat(f),_=f.replace(x,"")):(c=parseFloat(f),_=v?f.replace(x,""):""),""===_&&(_=a in n?n[a]:p),f=c||0===c?(y?c+h:c)+_:e[a],p!==_&&""!==_&&(c||0===c)&&h&&(h=tt(t,a,h,p),"%"===_?(h/=tt(t,a,100,"%")/100,!0!==e.strictUnits&&(d=h+"%")):"em"===_||"rem"===_||"vw"===_||"vh"===_?h/=tt(t,a,1,_):"px"!==_&&(c=tt(t,a,c,_),_="px"),y&&(c||0===c)&&(f=c+h+_)),y&&(c+=h),!h&&0!==h||!c&&0!==c?void 0!==b[a]&&(f||f+""!="NaN"&&null!=f)?(i=new yt(b,a,c||h||0,0,i,-1,a,!1,0,d,f)).xs0="none"!==f||"display"!==a&&-1===a.indexOf("Style")?f:d:z(e[a]):(i=new yt(b,a,h,c-h,i,0,a,!1!==u&&("px"===_||"zIndex"===a),0,d,f)).xs0=_)),s&&i&&!i.plugin&&(i.plugin=s);return i},h.setRatio=function(t){var e,i,n,r=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;r;){if(e=r.c*t+r.s,r.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),r.type)if(1===r.type)if(2===(n=r.l))r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2;else if(3===n)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3;else if(4===n)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4;else if(5===n)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4+r.xn4+r.xs5;else{for(i=r.xs0+e+r.xs1,n=1;n-1;)Kt(t[r],e,i);else for(r=(n=t.childNodes).length;--r>-1;)a=(s=n[r]).type,s.style&&(e.push(it(s)),i&&i.push(s)),1!==a&&9!==a&&11!==a||!s.childNodes.length||Kt(s,e,i)};return a.cascadeTo=function(t,i,n){var r,s,a,o,l=e.to(t,i,n),h=[l],u=[],c=[],d=[],f=e._internals.reservedProps;for(t=l._targets||l.target,Kt(t,u,d),l.render(i,!0,!0),Kt(t,c),l.render(0,!0,!0),l._enabled(!0),r=d.length;--r>-1;)if((s=nt(d[r],u[r],c[r])).firstMPT){s=s.difs;for(a in n)f[a]&&(s[a]=n[a]);o={};for(a in s)o[a]=u[r][a];h.push(e.fromTo(d[r],i,o,s))}return h},t.activate([a]),a},!0),function(){var t=function(t){for(;t;)t.f||t.blob||(t.m=Math.round),t=t._next},e=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}).prototype;e._onInitAllProps=function(){for(var e,i,n,r=this._tween,s=r.vars.roundProps.join?r.vars.roundProps:r.vars.roundProps.split(","),a=s.length,o={},l=r._propLookup.roundProps;--a>-1;)o[s[a]]=Math.round;for(a=s.length;--a>-1;)for(e=s[a],i=r._firstPT;i;)n=i._next,i.pg?i.t._mod(o):i.n===e&&(2===i.f&&i.t?t(i.t._firstPT):(this._add(i.t,e,i.s,i.c),n&&(n._prev=i._prev),i._prev?i._prev._next=n:r._firstPT===i&&(r._firstPT=n),i._next=i._prev=null,r._propLookup[e]=l)),i=n;return!1},e._add=function(t,e,i,n){this._addTween(t,e,i,i+n,e,Math.round),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(t,e,i,n){var r,s;if("function"!=typeof t.setAttribute)return!1;for(r in e)"function"==typeof(s=e[r])&&(s=s(n,t)),this._addTween(t,"setAttribute",t.getAttribute(r)+"",s+"",r,!1,r),this._overwriteProps.push(r);return!0}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(t,e,i,n){"object"!=typeof e&&(e={rotation:e}),this.finals={};var r,s,a,o,l,h,u=!0===e.useRadians?2*Math.PI:360;for(r in e)"useRadians"!==r&&("function"==typeof(o=e[r])&&(o=o(n,t)),s=(h=(o+"").split("_"))[0],a=parseFloat("function"!=typeof t[r]?t[r]:t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]()),l=(o=this.finals[r]="string"==typeof s&&"="===s.charAt(1)?a+parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)):Number(s)||0)-a,h.length&&(-1!==(s=h.join("_")).indexOf("short")&&(l%=u)!==l%(u/2)&&(l=l<0?l+u:l-u),-1!==s.indexOf("_cw")&&l<0?l=(l+9999999999*u)%u-(l/u|0)*u:-1!==s.indexOf("ccw")&&l>0&&(l=(l-9999999999*u)%u-(l/u|0)*u)),(l>1e-6||l<-1e-6)&&(this._addTween(t,r,a,a+l,r),this._overwriteProps.push(r)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,n,r=_gsScope.GreenSockGlobals||_gsScope,s=r.com.greensock,a=2*Math.PI,o=Math.PI/2,l=s._class,h=function(e,i){var n=l("easing."+e,function(){},!0),r=n.prototype=new t;return r.constructor=n,r.getRatio=i,n},u=t.register||function(){},c=function(t,e,i,n,r){var s=l("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new n},!0);return u(s,t),s},d=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},f=function(e,i){var n=l("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=n.prototype=new t;return r.constructor=n,r.getRatio=i,r.config=function(t){return new n(t)},n},p=c("Back",f("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),f("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),f("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),_=l("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),m=_.prototype=new t;return m.constructor=_,m.getRatio=function(t){var e=t+(.5-t)*this._p;return tthis._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},_.ease=new _(.7,.7),m.config=_.config=function(t,e,i){return new _(t,e,i)},e=l("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),m=e.prototype=new t,m.constructor=e,m.getRatio=function(t){return t<0?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},m.config=e.config=function(t){return new e(t)},i=l("easing.RoughEase",function(e){for(var i,n,r,s,a,o,l=(e=e||{}).taper||"none",h=[],u=0,c=0|(e.points||20),f=c,p=!1!==e.randomize,_=!0===e.clamp,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--f>-1;)i=p?Math.random():1/c*f,n=m?m.getRatio(i):i,r="none"===l?g:"out"===l?(s=1-i)*s*g:"in"===l?i*i*g:i<.5?(s=2*i)*s*.5*g:(s=2*(1-i))*s*.5*g,p?n+=Math.random()*r-.5*r:f%2?n+=.5*r:n-=.5*r,_&&(n>1?n=1:n<0&&(n=0)),h[u++]={x:i,y:n};for(h.sort(function(t,e){return t.x-e.x}),o=new d(1,1,null),f=c;--f>-1;)a=h[f],o=new d(a.x,a.y,o);this._prev=new d(0,0,0!==o.t?o:o.next)},!0),m=i.prototype=new t,m.constructor=i,m.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},m.config=function(t){return new i(t)},i.ease=new i,c("Bounce",h("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),h("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),h("BounceInOut",function(t){var e=t<.5;return(t=e?1-2*t:2*t-1)<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),c("Circ",h("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),h("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),h("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),n=function(e,i,n){var r=l("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||n)/(t<1?t:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),s=r.prototype=new t;return s.constructor=r,s.getRatio=i,s.config=function(t,e){return new r(t,e)},r},c("Elastic",n("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),n("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),n("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),c("Expo",h("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),h("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),h("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",h("SineOut",function(t){return Math.sin(t*o)}),h("SineIn",function(t){return 1-Math.cos(t*o)}),h("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),l("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),u(r.SlowMo,"SlowMo","ease,"),u(i,"RoughEase","ease,"),u(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i={},n=t.document,r=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!r.TweenLite){var s,a,o,l,h,u=function(t){var e,i=t.split("."),n=r;for(e=0;e-1;)(h=_[n[g]]||new m(n[g],[])).gsClass?(o[g]=h.gsClass,v--):l&&h.sc.push(this);if(0===v&&s){if(c=("com.greensock."+e).split("."),d=c.pop(),f=u(c.join("."))[d]=this.gsClass=s.apply(s,o),a)if(r[d]=i[d]=f,!(p="undefined"!=typeof module&&module.exports)&&"function"==typeof define&&define.amd)define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+e.split(".").pop(),[],function(){return f});else if(p)if("TweenMax"===e){module.exports=i.TweenMax=f;for(g in i)f[g]=i[g]}else i.TweenMax&&(i.TweenMax[d]=f);for(g=0;g-1;)for(s=l[h],r=n?v("easing."+s,null,!0):c.easing[s]||{},a=u.length;--a>-1;)o=u[a],T[s+"."+o]=T[o+s]=r[o]=t.getRatio?t:t[o]||new t};for((o=b.prototype)._calcEnd=!1,o.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,n=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?n*=n:2===i?n*=n*n:3===i?n*=n*n*n:4===i&&(n*=n*n*n*n),1===e?1-n:2===e?n:t<.5?n/2:1-n/2},a=(s=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--a>-1;)o=s[a]+",Power"+a,x(new b(null,null,1,a),o,"easeOut",!0),x(new b(null,null,2,a),o,"easeIn"+(0===a?",easeNone":"")),x(new b(null,null,3,a),o,"easeInOut");T.linear=c.easing.Linear.easeIn,T.swing=c.easing.Quad.easeInOut;var E=v("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(o=E.prototype).addEventListener=function(t,e,i,n,r){r=r||0;var s,a,o=this._listeners[t],u=0;for(this!==l||h||l.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;--a>-1;)(s=o[a]).c===e&&s.s===i?o.splice(a,1):0===u&&s.pr-1;)if(n[i].c===e)return void n.splice(i,1)},o.dispatchEvent=function(t){var e,i,n,r=this._listeners[t];if(r)for((e=r.length)>1&&(r=r.slice(0)),i=this._eventTarget;--e>-1;)(n=r[e])&&(n.up?n.c.call(n.s||i,{type:t,target:i}):n.c.call(n.s||i))};var w=t.requestAnimationFrame,S=t.cancelAnimationFrame,D=Date.now||function(){return(new Date).getTime()},A=D();for(a=(s=["ms","moz","webkit","o"]).length;--a>-1&&!w;)w=t[s[a]+"RequestAnimationFrame"],S=t[s[a]+"CancelAnimationFrame"]||t[s[a]+"CancelRequestAnimationFrame"];v("Ticker",function(t,e){var i,r,s,a,o,u=this,c=D(),d=!(!1===e||!w)&&"auto",p=500,_=33,m=function(t){var e,n,l=D()-A;l>p&&(c+=l-_),A+=l,u.time=(A-c)/1e3,e=u.time-o,(!i||e>0||!0===t)&&(u.frame++,o+=e+(e>=a?.004:a-e),n=!0),!0!==t&&(s=r(m)),n&&u.dispatchEvent("tick")};E.call(u),u.time=u.frame=0,u.tick=function(){m(!0)},u.lagSmoothing=function(t,e){p=t||1e10,_=Math.min(e,p,0)},u.sleep=function(){null!=s&&(d&&S?S(s):clearTimeout(s),r=f,s=null,u===l&&(h=!1))},u.wake=function(t){null!==s?u.sleep():t?c+=-A+(A=D()):u.frame>10&&(A=D()-p+5),r=0===i?f:d&&w?w:function(t){return setTimeout(t,1e3*(o-u.time)+1|0)},u===l&&(h=!0),m(2)},u.fps=function(t){if(!arguments.length)return i;a=1/((i=t)||60),o=this.time+a,u.wake()},u.useRAF=function(t){if(!arguments.length)return d;u.sleep(),d=t,u.fps(i)},u.fps(t),setTimeout(function(){"auto"===d&&u.frame<5&&"hidden"!==n.visibilityState&&u.useRAF(!1)},1500)}),(o=c.Ticker.prototype=new c.events.EventDispatcher).constructor=c.Ticker;var P=v("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,q){h||l.wake();var i=this.vars.useFrames?W:q;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});l=P.ticker=new c.Ticker,(o=P.prototype)._dirty=o._gc=o._initted=o._paused=!1,o._totalTime=o._time=0,o._rawPrevTime=-1,o._next=o._last=o._onUpdate=o._timeline=o.timeline=null,o._paused=!1;var M=function(){h&&D()-A>2e3&&l.wake(),setTimeout(M,2e3)};M(),o.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},o.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},o.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},o.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},o.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},o.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},o.render=function(t,e,i){},o.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},o.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t-1;)"{self}"===t[e]&&(i[e]=this);return i},o._callback=function(t){var e=this.vars,i=e[t],n=e[t+"Params"],r=e[t+"Scope"]||e.callbackScope||this;switch(n?n.length:0){case 0:i.call(r);break;case 1:i.call(r,n[0]);break;case 2:i.call(r,n[0],n[1]);break;default:i.apply(r,n)}},o.eventCallback=function(t,e,i,n){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=p(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=n),"onUpdate"===t&&(this._onUpdate=e)}return this},o.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},o.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:t,e)):this._time},o.totalTime=function(t,e,i){if(h||l.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var n=this._totalDuration,r=this._timeline;if(t>n&&!i&&(t=n),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?n-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(R.length&&Z(),this.render(t,e,!1),R.length&&Z())}return this},o.progress=o.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},o.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},o.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},o.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||1e-10,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},o.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},o.paused=function(t){if(!arguments.length)return this._paused;var e,i,n=this._timeline;return t!=this._paused&&n&&(h||t||l.wake(),i=(e=n.rawTime())-this._pauseTime,!t&&n.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=n.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var C=v("core.SimpleTimeline",function(t){P.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(o=C.prototype=new P).constructor=C,o.kill()._gc=!1,o._first=o._last=o._recent=null,o._sortChildren=!1,o.add=o.insert=function(t,e,i,n){var r,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),r=this._last,this._sortChildren)for(s=t._startTime;r&&r._startTime>s;)r=r._prev;return r?(t._next=r._next,r._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=r,this._recent=t,this._timeline&&this._uncache(!0),this},o._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},o.render=function(t,e,i){var n,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)n=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n},o.rawTime=function(){return h||l.wake(),this._totalTime};var O=v("TweenLite",function(e,i,n){if(P.call(this,i,n),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:O.selector(e)||e;var r,s,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?Y[O.defaultOverwrite]:"number"==typeof l?l>>0:Y[l],(o||e instanceof Array||e.push&&p(e))&&"number"!=typeof e[0])for(this._targets=a=d(e),this._propLookup=[],this._siblings=[],r=0;r1&&Q(s,this,null,1,this._siblings[r])):"string"==typeof(s=a[r--]=O.selector(s))&&a.splice(r+1,1):a.splice(r--,1);else this._propLookup={},this._siblings=J(e,this,!1),1===l&&this._siblings.length>1&&Q(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-1e-10,this.render(Math.min(0,-this._delay)))},!0),I=function(e){return e&&e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)},L=function(t,e){var i,n={};for(i in t)V[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!U[i]||U[i]&&U[i]._autoCSS)||(n[i]=t[i],delete t[i]);t.css=n};(o=O.prototype=new P).constructor=O,o.kill()._gc=!1,o.ratio=0,o._firstPT=o._targets=o._overwrittenProps=o._startAt=null,o._notifyPluginsOfEnabled=o._lazy=!1,O.version="1.19.1",O.defaultEase=o._ease=new b(null,null,1,1),O.defaultOverwrite="auto",O.ticker=l,O.autoSleep=120,O.lagSmoothing=function(t,e){l.lagSmoothing(t,e)},O.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(O.selector=i,i(e)):void 0===n?e:n.querySelectorAll?n.querySelectorAll(e):n.getElementById("#"===e.charAt(0)?e.substr(1):e)};var R=[],j={},N=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,k=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<1e-6&&e>-1e-6&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},B=function(t,e,i,n){var r,s,a,o,l,h,u,c=[],d=0,f="",p=0;for(c.start=t,c.end=e,t=c[0]=t+"",e=c[1]=e+"",i&&(i(c),t=c[0],e=c[1]),c.length=0,r=t.match(N)||[],s=e.match(N)||[],n&&(n._next=null,n.blob=1,c._firstPT=c._applyPT=n),l=s.length,o=0;o-1;)(t=R[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);R.length=0};q._startTime=l.time,W._startTime=l.frame,q._active=W._active=!0,setTimeout(Z,1),P._updateRoot=O.render=function(){var t,e,i;if(R.length&&Z(),q.render((l.time-q._startTime)*q._timeScale,!1,!1),W.render((l.frame-W._startTime)*W._timeScale,!1,!1),R.length&&Z(),l.frame>=z){z=l.frame+(parseInt(O.autoSleep,10)||120);for(i in X){for(t=(e=X[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete X[i]}if((!(i=q._first)||i._paused)&&O.autoSleep&&!W._first&&1===l._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||l.sleep()}}},l.addEventListener("tick",P._updateRoot);var J=function(t,e,i){var n,r,s=t._gsTweenID;if(X[s||(t._gsTweenID=s="t"+G++)]||(X[s]={target:t,tweens:[]}),e&&(n=X[s].tweens,n[r=n.length]=e,i))for(;--r>-1;)n[r]===e&&n.splice(r,1);return X[s].tweens},K=function(t,e,i,n){var r,s,a=t.vars.onOverwrite;return a&&(r=a(t,e,i,n)),(a=O.onOverwrite)&&(s=a(t,e,i,n)),!1!==r&&!1!==s},Q=function(t,e,i,n,r){var s,a,o,l;if(1===n||n>=4){for(l=r.length,s=0;s-1;)(o=r[s])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||$(e,0,f),0===$(o,h,f)&&(c[d++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((f||!o._initted)&&u-o._startTime<=2e-10||(c[d++]=o)));for(s=d;--s>-1;)if(o=c[s],2===n&&o._kill(i,t,e)&&(a=!0),2!==n||!o._firstPT&&o._initted){if(2!==n&&!K(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},$=function(t,e,i){for(var n=t._timeline,r=n._timeScale,s=t._startTime;n._timeline;){if(s+=n._startTime,r*=n._timeScale,n._paused)return-100;n=n._timeline}return(s/=r)>e?s-e:i&&s===e||!t._initted&&s-e<2e-10?1e-10:(s+=t.totalDuration()/t._timeScale/r)>e+1e-10?0:s-e-1e-10};o._init=function(){var t,e,i,n,r,s,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,u=a.ease;if(a.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(n in a.startAt)r[n]=a.startAt[n];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=h&&!1!==a.lazy,r.startAt=r.delay=null,this._startAt=O.to(this.target,0,r),h)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(h=!1),i={};for(n in a)V[n]&&"autoCSS"!==n||(i[n]=a[n]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=O.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof b?u:"function"==typeof u?new b(u,a.easeParams):T[u]||O.defaultEase:O.defaultEase,a.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(s=this._targets.length,t=0;t-1;)i[h._overwriteProps[o]]=this._firstPT;(h._priority||h._onInitAllProps)&&(l=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else i[a]=F.call(this,e,a,"get",c,a,0,null,this.vars.stringFilter,s);return r&&this._kill(r,e)?this._initProps(e,i,n,r,s):this._overwrite>1&&this._firstPT&&n.length>1&&Q(e,this,i,this._overwrite,n)?(this._kill(i,e),this._initProps(e,i,n,r,s)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(j[e._gsTweenID]=!0),l)},o.render=function(t,e,i){var n,r,s,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l-1e-7&&t>=0)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(n=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(h<0||t<=0&&t>=-1e-7||1e-10===h&&"isPause"!==this.data)&&h!==t&&(i=!0,h>1e-10&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:1e-10);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(r="onReverseComplete",n=this._reversed),t<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(1e-10!==h||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:1e-10)),this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/l,c=this._easeType,d=this._easePower;(1===c||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===d?u*=u:2===d?u*=u*u:3===d?u*=u*u*u:4===d&&(u*=u*u*u*u),this.ratio=1===c?1-u:2===c?u:t/l<.5?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,R.push(this),void(this._lazy=[t,e]);this._time&&!n?this.ratio=this._ease.getRatio(this._time/l):n&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||e||this._callback("onStart"))),s=this._firstPT;s;)s.f?s.t[s.p](s.c*this.ratio+s.s):s.t[s.p]=s.c*this.ratio+s.s,s=s._next;this._onUpdate&&(t<0&&this._startAt&&-1e-4!==t&&this._startAt.render(t,e,i),e||(this._time!==o||n||i)&&this._callback("onUpdate")),r&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,e,i),n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===l&&1e-10===this._rawPrevTime&&1e-10!==a&&(this._rawPrevTime=0)))}},o._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:O.selector(e)||e;var n,r,s,a,o,l,h,u,c,d=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((p(e)||I(e))&&"number"!=typeof e[0])for(n=e.length;--n>-1;)this._kill(t,e[n],i)&&(l=!0);else{if(this._targets){for(n=this._targets.length;--n>-1;)if(e===this._targets[n]){o=this._propLookup[n]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[n]=t?this._overwrittenProps[n]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,u=t!==r&&"all"!==r&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(O.onOverwrite||this.vars.onOverwrite)){for(s in h)o[s]&&(c||(c=[]),c.push(s));if((c||!t)&&!K(this,i,e,c))return!1}for(s in h)(a=o[s])&&(d&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[s]),u&&(r[s]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},o.invalidate=function(){return this._notifyPluginsOfEnabled&&O._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],P.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-1e-10,this.render(Math.min(0,-this._delay))),this},o._enabled=function(t,e){if(h||l.wake(),t&&this._gc){var i,n=this._targets;if(n)for(i=n.length;--i>-1;)this._siblings[i]=J(n[i],this,!0);else this._siblings=J(this.target,this,!0)}return P.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&O._onPluginEvent(t?"_onEnable":"_onDisable",this)},O.to=function(t,e,i){return new O(t,e,i)},O.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new O(t,e,i)},O.fromTo=function(t,e,i,n){return n.startAt=i,n.immediateRender=0!=n.immediateRender&&0!=i.immediateRender,new O(t,e,n)},O.delayedCall=function(t,e,i,n,r){return new O(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:n,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},O.set=function(t,e){return new O(t,0,e)},O.getTweensOf=function(t,e){if(null==t)return[];t="string"!=typeof t?t:O.selector(t)||t;var i,n,r,s;if((p(t)||I(t))&&"number"!=typeof t[0]){for(i=t.length,n=[];--i>-1;)n=n.concat(O.getTweensOf(t[i],e));for(i=n.length;--i>-1;)for(s=n[i],r=i;--r>-1;)s===n[r]&&n.splice(i,1)}else for(i=(n=J(t).concat()).length;--i>-1;)(n[i]._gc||e&&!n[i].isActive())&&n.splice(i,1);return n},O.killTweensOf=O.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var n=O.getTweensOf(t,e),r=n.length;--r>-1;)n[r]._kill(i,t)};var tt=v("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=tt.prototype},!0);if(o=tt.prototype,tt.version="1.19.0",tt.API=2,o._firstPT=null,o._addTween=F,o.setRatio=k,o._kill=function(t){var e,i=this._overwriteProps,n=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;n;)null!=t[n.n]&&(n._next&&(n._next._prev=n._prev),n._prev?(n._prev._next=n._next,n._prev=null):this._firstPT===n&&(this._firstPT=n._next)),n=n._next;return!1},o._mod=o._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},O._onPluginEvent=function(t,e){var i,n,r,s,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:s)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:s=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},tt.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===tt.API&&(U[(new t[e])._propName]=t[e]);return!0},g.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,n=t.priority||0,r=t.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=v("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){tt.call(this,i,n),this._overwriteProps=r||[]},!0===t.global),o=a.prototype=new tt(i);o.constructor=a,a.API=t.API;for(e in s)"function"==typeof t[e]&&(o[s[e]]=t[e]);return a.version=t.version,tt.activate([a]),a},s=t._gsQueue){for(a=0;a=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a1)))/4)-T((t-1901+e)/100)+T((t-1601+e)/400)};if((p=g.hasOwnProperty)||(p=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?p=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,p=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,p.call(this,t)}),_=function(t,e){var n,r,s,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(s in r)p.call(r,s)&&a++;return n=r=null,a?_=2==a?function(t,e){var i,n={},r="[object Function]"==v.call(t);for(i in t)r&&"prototype"==i||p.call(n,i)||!(n[i]=1)||!p.call(t,i)||e(i)}:function(t,e){var i,n,r="[object Function]"==v.call(t);for(i in t)r&&"prototype"==i||!p.call(t,i)||(n="constructor"===i)||e(i);(n||p.call(t,i="constructor"))&&e(i)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],_=function(t,e){var n,s,a="[object Function]"==v.call(t),o=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||p;for(n in t)a&&"prototype"==n||!o.call(t,n)||e(n);for(s=r.length;n=r[--s];o.call(t,n)&&e(n));}),_(t,e)},!s("json-stringify")){var w={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},S=function(t,e){return("000000"+(e||0)).slice(-t)},D=function(t){for(var e='"',i=0,n=t.length,r=!b||n>10,s=r&&(b?t.split(""):t);i-1/0&&o<1/0){if(E){for(d=T(o/864e5),h=T(d/365.2425)+1970-1;E(h+1,0)<=d;h++);for(u=T((d-E(h,0))/30.42);E(h,u+1)<=d;u++);d=1+d-E(h,u),g=T((f=(o%864e5+864e5)%864e5)/36e5)%24,y=T(f/6e4)%60,b=T(f/1e3)%60,x=f%1e3}else h=o.getUTCFullYear(),u=o.getUTCMonth(),d=o.getUTCDate(),g=o.getUTCHours(),y=o.getUTCMinutes(),b=o.getUTCSeconds(),x=o.getUTCMilliseconds();o=(h<=0||h>=1e4?(h<0?"-":"+")+S(6,h<0?-h:h):S(4,h))+"-"+S(2,u+1)+"-"+S(2,d)+"T"+S(2,g)+":"+S(2,y)+":"+S(2,b)+"."+S(3,x)+"Z"}else o=null;if(i&&(o=i.call(e,t,o)),null===o)return"null";if("[object Boolean]"==(l=v.call(o)))return""+o;if("[object Number]"==l)return o>-1/0&&o<1/0?""+o:"null";if("[object String]"==l)return D(""+o);if("object"==typeof o){for(C=a.length;C--;)if(a[C]===o)throw c();if(a.push(o),w=[],O=s,s+=r,"[object Array]"==l){for(M=0,C=o.length;M0)for(r="",n>10&&(n=10);r.length=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||I();t+=C("0x"+s.slice(e,P));break;default:I()}else{if(34==r)break;for(r=s.charCodeAt(P),e=P;r>=32&&92!=r&&34!=r;)r=s.charCodeAt(++P);t+=s.slice(e,P)}if(34==s.charCodeAt(P))return P++,t;I();default:if(e=P,45==r&&(n=!0,r=s.charCodeAt(++P)),r>=48&&r<=57){for(48==r&&(r=s.charCodeAt(P+1))>=48&&r<=57&&I(),n=!1;P=48&&r<=57;P++);if(46==s.charCodeAt(P)){for(i=++P;i=48&&r<=57;i++);i==P&&I(),P=i}if(101==(r=s.charCodeAt(P))||69==r){for(43!=(r=s.charCodeAt(++P))&&45!=r||P++,i=P;i=48&&r<=57;i++);i==P&&I(),P=i}return+s.slice(e,P)}if(n&&I(),"true"==s.slice(P,P+4))return P+=4,!0;if("false"==s.slice(P,P+5))return P+=5,!1;if("null"==s.slice(P,P+4))return P+=4,null;I()}return"$"},R=function(t){var e,i;if("$"==t&&I(),"string"==typeof t){if("@"==(b?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=L());i||(i=!0))i&&(","==t?"]"==(t=L())&&I():I()),","==t&&I(),e.push(R(t));return e}if("{"==t){for(e={};"}"!=(t=L());i||(i=!0))i&&(","==t?"}"==(t=L())&&I():I()),","!=t&&"string"==typeof t&&"@"==(b?t.charAt(0):t[0])&&":"==L()||I(),e[t.slice(1)]=R(L());return e}I()}return t},j=function(t,e,i){var n=N(t,e,i);n===m?delete t[e]:t[e]=n},N=function(t,e,i){var n,r=t[e];if("object"==typeof r&&r)if("[object Array]"==v.call(r))for(n=r.length;n--;)j(r,n,i);else _(r,function(t){j(r,t,i)});return i.call(t,e,r)};n.parse=function(t,e){var i,n;return P=0,M=""+t,i=R(L()),"$"!=L()&&I(),P=M=null,e&&"[object Function]"==v.call(e)?N((n={},n[""]=i,n),"",e):i}}}return n.runInContext=t,n}var e="function"==typeof define&&define.amd,i={function:!0,object:!0},n=i[typeof exports]&&exports&&!exports.nodeType&&exports,r=i[typeof window]&&window||this,s=n&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(r=s),n&&!e)t(r,n);else{var a=r.JSON,o=r.JSON3,l=!1,h=t(r,r.JSON3={noConflict:function(){return l||(l=!0,r.JSON=a,r.JSON3=o,a=o=null),h}});r.JSON={parse:h.parse,stringify:h.stringify}}e&&define(function(){return h})}.call(this),function(){var t={};t.appendToHead=function(e){t.getHead().appendChild(e)},t.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},t.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},createjs.DomUtils=t}(),function(){var t={};t.parseXML=function(t,e){var i=null;try{if(window.DOMParser){var n=new DOMParser;i=n.parseFromString(t,e)}}catch(t){}if(!i)try{(i=new ActiveXObject("Microsoft.XMLDOM")).async=!1,i.loadXML(t)}catch(t){i=null}return i},t.parseJSON=function(t){if(null==t)return null;try{return JSON.parse(t)}catch(t){throw t}},createjs.DataUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var n=new t;return n.src=e,n}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},createjs.LoadItem=i}(),function(){var t={};t.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,t.RELATIVE_PATT=/^[./]*?\//i,t.EXTENSION_PATT=/\/?[^/]+\.(\w{1,5})$/i,t.parseURI=function(e){var i={absolute:!1,relative:!1};if(null==e)return i;var n=e.indexOf("?");n>-1&&(e=e.substr(0,n));var r;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(r=e.match(t.EXTENSION_PATT))&&(i.extension=r[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var n in t)i.push(n+"="+escape(t[n]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],n=t.indexOf("?");if(-1!=n){var r=t.slice(n+1);i=i.concat(r.split("&"))}return-1!=n?t.slice(0,n)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},t.isCrossDomain=function(t){var e=document.createElement("a");e.href=t.src;var i=document.createElement("a");return i.href=location.href,""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname)},t.isLocal=function(t){var e=document.createElement("a");return e.href=t.src,""==e.hostname&&"file:"==e.protocol},t.isBinary=function(t){switch(t){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},t.isText=function(t){switch(t){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.AbstractLoader.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,this._item=t?createjs.LoadItem.create(t):null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher),i=t;i.POST="POST",i.GET="GET",i.BINARY="binary",i.CSS="css",i.IMAGE="image",i.JAVASCRIPT="javascript",i.JSON="json",i.JSONP="jsonp",i.MANIFEST="manifest",i.SOUND="sound",i.VIDEO="video",i.SPRITESHEET="spritesheet",i.SVG="svg",i.TEXT="text",i.XML="xml",e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.buildPath=function(t,e){return createjs.RequestUtils.buildPath(t,e)},e.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var e=createjs.extend(t,createjs.AbstractRequest);e.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},e._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},e._showTag=function(){this._tag.style.visibility=this._startTagVisibility},e._handleStalled=function(){},createjs.TagRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function(){var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),this._createXHR(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.load=function(){if(null!=this._request){null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}}else this._handleError()},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)this._handleError(e);else{if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(t){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===t.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);switch(t){case 404:case 0:return new Error(t)}return null},e._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=createjs.RequestUtils.isCrossDomain(t),i={},n=null;if(window.XMLHttpRequest)n=new XMLHttpRequest,e&&void 0===n.withCredentials&&window.XDomainRequest&&(n=new XDomainRequest);else{for(var r=0,a=s.ACTIVEX_VERSIONS.length;r0)return;var i=!1;if(e){for(;e.length;){var n=e.pop(),r=this.getResult(n);for(s=this._loadQueue.length-1;s>=0;s--)if((a=this._loadQueue[s].getItem()).id==n||a.src==n){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if((a=this._loadQueueBackup[s].getItem()).id==n||a.src==n){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(r)this._disposeItem(this.getItem(n));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==n||a.src==n){this._currentLoads.splice(s,1)[0].cancel(),i=!0;break}}}i&&this._loadNext()}else{this.close();for(var o in this._loadItemsById)this._disposeItem(this._loadItemsById[o]);this.init(this.preferXHR,this._basePath)}},e.reset=function(){this.close();for(var t in this._loadItemsById)this._disposeItem(this._loadItemsById[t]);for(var e=[],i=0,n=this._loadQueueBackup.length;i0&&this._loadNext()},e.loadFile=function(t,e,i){if(null!=t)this._addItem(t,null,i),!1!==e?this.setPaused(!1):this.setPaused(!0);else{var n=new createjs.ErrorEvent("PRELOAD_NO_FILE");this._sendError(n)}},e.loadManifest=function(t,e,n){var r=null,s=null;if(Array.isArray(t)){if(0==t.length){a=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(a)}r=t}else if("string"==typeof t)r=[{src:t,type:i.MANIFEST}];else{if("object"!=typeof t){a=new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(a)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var a=new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(a)}r=[t]}else void 0!==t.manifest&&(r=t.manifest,s=t.path)}for(var o=0,l=r.length;o=this._maxConnections);t++){var e=this._loadQueue[t];this._canStartLoad(e)&&(this._loadQueue.splice(t,1),t--,this._loadItem(e))}}},e._loadItem=function(t){t.on("fileload",this._handleFileLoad,this),t.on("progress",this._handleProgress,this),t.on("complete",this._handleFileComplete,this),t.on("error",this._handleError,this),t.on("fileerror",this._handleFileError,this),this._currentLoads.push(t),this._sendFileStart(t.getItem()),t.load()},e._handleFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleFileError=function(t){var e=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,t.item);this._sendError(e)},e._handleError=function(t){var e=t.target;this._numItemsLoaded++,this._finishOrderedItem(e,!0),this._updateProgress();var i=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,e.getItem());this._sendError(i),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(e),this._cleanLoadItem(e),this._loadNext())},e._handleFileComplete=function(t){var e=t.target,i=e.getItem(),n=e.getResult();this._loadedResults[i.id]=n;var r=e.getResult(!0);null!=r&&r!==n&&(this._loadedRawResults[i.id]=r),this._saveLoadedItems(e),this._removeLoadItem(e),this._finishOrderedItem(e)||this._processFinishedLoad(i,e),this._cleanLoadItem(e)},e._saveLoadedItems=function(t){var e=t.getLoadedItems();if(null!==e)for(var i=0;i0){for(var i=0,n=0,r=this._currentLoads.length;n-1||e.indexOf("Windows Phone")>-1,t.isFirefox=e.indexOf("Firefox")>-1,t.isOpera=null!=window.opera,t.isChrome=e.indexOf("Chrome")>-1,t.isIOS=(e.indexOf("iPod")>-1||e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1)&&!t.isWindowPhone,t.isAndroid=e.indexOf("Android")>-1&&!t.isWindowPhone,t.isBlackberry=e.indexOf("Blackberry")>-1,createjs.BrowserDetect=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n,r=(n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{})[t];return r&&this.removeEventListener(t,e,i),(r=n[t])?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,r),n&&t.remove()},s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a-1&&(e=e.substr(0,n));var r;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(r=e.match(t.EXTENSION_PATT))&&(i.extension=r[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var n in t)i.push(n+"="+escape(t[n]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],n=t.indexOf("?");if(-1!=n){var r=t.slice(n+1);i=i.concat(r.split("&"))}return-1!=n?t.slice(0,n)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},t.isCrossDomain=function(t){var e=document.createElement("a");e.href=t.src;var i=document.createElement("a");return i.href=location.href,""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname)},t.isLocal=function(t){var e=document.createElement("a");return e.href=t.src,""==e.hostname&&"file:"==e.protocol},t.isBinary=function(t){switch(t){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},t.isText=function(t){switch(t){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.AbstractLoader.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,this._item=t?createjs.LoadItem.create(t):null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher),i=t;i.POST="POST",i.GET="GET",i.BINARY="binary",i.CSS="css",i.IMAGE="image",i.JAVASCRIPT="javascript",i.JSON="json",i.JSONP="jsonp",i.MANIFEST="manifest",i.SOUND="sound",i.VIDEO="video",i.SPRITESHEET="spritesheet",i.SVG="svg",i.TEXT="text",i.XML="xml",e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.buildPath=function(t,e){return createjs.RequestUtils.buildPath(t,e)},e.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var e=createjs.extend(t,createjs.AbstractRequest);e.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},e._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},e._showTag=function(){this._tag.style.visibility=this._startTagVisibility},e._handleStalled=function(){},createjs.TagRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function(){var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),this._createXHR(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.load=function(){if(null!=this._request){null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}}else this._handleError()},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)this._handleError(e);else{if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(t){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===t.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);switch(t){case 404:case 0:return new Error(t)}return null},e._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=createjs.RequestUtils.isCrossDomain(t),i={},n=null;if(window.XMLHttpRequest)n=new XMLHttpRequest,e&&void 0===n.withCredentials&&window.XDomainRequest&&(n=new XDomainRequest);else{for(var r=0,a=s.ACTIVEX_VERSIONS.length;ri.alternateExtensions.length)return null;return{name:n,src:t=t.replace("."+e[5],"."+r),extension:r}},i._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},n=i.capabilities;for(var r in t)if(t.hasOwnProperty(r)&&n[r]){e.src=t[r],e.extension=r;break}if(!e.src)return!1;var s=e.src.lastIndexOf("/");return e.name=-1!=s?e.src.slice(s+1):e.src,e},i.play=function(t,e,n,r,s,a,o,l,h){var u;u=e instanceof Object||e instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(e):createjs.PlayPropsConfig.create({interrupt:e,delay:n,offset:r,loop:s,volume:a,pan:o,startTime:l,duration:h});var c=i.createInstance(t,u.startTime,u.duration);return i._playInstance(c,u)||c._playFailed(),c},i.createInstance=function(t,n,r){if(!i.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(t,n,r);var s=i._defaultPlayPropsHash[t];t=i._getSrcById(t);var a=i._parsePath(t.src),o=null;return null!=a&&null!=a.src?(e.create(a.src),null==n&&(n=t.startTime),o=i.activePlugin.create(a.src,n,r||t.duration),(s=s||i._defaultPlayPropsHash[a.src])&&o.applyPlayProps(s)):o=new createjs.DefaultSoundInstance(t,n,r),o.uniqueId=i._lastID++,o},i.stop=function(){for(var t=this._instances,e=t.length;e--;)t[e].stop()},i.setVolume=function(t){if(null==Number(t))return!1;if(t=Math.max(0,Math.min(1,t)),i._masterVolume=t,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(t))for(var e=this._instances,n=0,r=e.length;n-1&&this._instances.splice(n,1),!1}return!0},i._getSrcById=function(t){return i._idHash[t]||{src:t}},i._playFinished=function(t){e.remove(t);var i=createjs.indexOf(this._instances,t);i>-1&&this._instances.splice(i,1)},createjs.Sound=t,e.channels={},e.create=function(t,i){return null==e.get(t)&&(e.channels[t]=new e(t,i),!0)},e.removeSrc=function(t){var i=e.get(t);return null!=i&&(i._removeAll(),delete e.channels[t],!0)},e.removeAll=function(){for(var t in e.channels)e.channels[t]._removeAll();e.channels={}},e.add=function(t,i){var n=e.get(t.src);return null!=n&&n._add(t,i)},e.remove=function(t){var i=e.get(t.src);return null!=i&&(i._remove(t),!0)},e.maxPerChannel=function(){return n.maxDefault},e.get=function(t){return e.channels[t]};var n=e.prototype;n.constructor=e,n.src=null,n.max=null,n.maxDefault=100,n.length=0,n.init=function(t,e){this.src=t,this.max=e||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},n._get=function(t){return this._instances[t]},n._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},n._remove=function(t){var e=createjs.indexOf(this._instances,t);return-1!=e&&(this._instances.splice(e,1),this.length--,!0)},n._removeAll=function(){for(var t=this.length-1;t>=0;t--)this._instances[t].stop()},n._getSlot=function(e,i){var n,r;if(e!=t.INTERRUPT_NONE&&null==(r=this._get(0)))return!0;for(var s=0,a=this.max;sr.getPosition())&&(r=n))}return null!=r&&(r._interrupt(),this._remove(r),!0)},n.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t,e,i,n){this.EventDispatcher_constructor(),this.src=t,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this._pan=0,Object.defineProperty(this,"pan",{get:this.getPan,set:this.setPan}),this._startTime=Math.max(0,e||0),Object.defineProperty(this,"startTime",{get:this.getStartTime,set:this.setStartTime}),this._duration=Math.max(0,i||0),Object.defineProperty(this,"duration",{get:this.getDuration,set:this.setDuration}),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this.getPlaybackResource,set:this.setPlaybackResource}),!1!==n&&!0!==n&&this.setPlaybackResource(n),this._position=0,Object.defineProperty(this,"position",{get:this.getPosition,set:this.setPosition}),this._loop=0,Object.defineProperty(this,"loop",{get:this.getLoop,set:this.setLoop}),this._muted=!1,Object.defineProperty(this,"muted",{get:this.getMuted,set:this.setMuted}),this._paused=!1,Object.defineProperty(this,"paused",{get:this.getPaused,set:this.setPaused})},e=createjs.extend(t,createjs.EventDispatcher);e.play=function(t,e,i,n,r,s){var a;return a=t instanceof Object||t instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(t):createjs.PlayPropsConfig.create({interrupt:t,delay:e,offset:i,loop:n,volume:r,pan:s}),this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(a),void(this._paused&&this.setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,a),this)},e.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},e.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},e.applyPlayProps=function(t){return null!=t.offset&&this.setPosition(t.offset),null!=t.loop&&this.setLoop(t.loop),null!=t.volume&&this.setVolume(t.volume),null!=t.pan&&this.setPan(t.pan),null!=t.startTime&&(this.setStartTime(t.startTime),this.setDuration(t.duration)),this},e.toString=function(){return"[AbstractSoundInstance]"},e.getPaused=function(){return this._paused},e.setPaused=function(t){if(!(!0!==t&&!1!==t||this._paused==t||1==t&&this.playState!=createjs.Sound.PLAY_SUCCEEDED))return this._paused=t,t?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this},e.setVolume=function(t){return t==this._volume?this:(this._volume=Math.max(0,Math.min(1,t)),this._muted||this._updateVolume(),this)},e.getVolume=function(){return this._volume},e.setMuted=function(t){if(!0===t||!1===t)return this._muted=t,this._updateVolume(),this},e.getMuted=function(){return this._muted},e.setPan=function(t){return t==this._pan?this:(this._pan=Math.max(-1,Math.min(1,t)),this._updatePan(),this)},e.getPan=function(){return this._pan},e.getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},e.setPosition=function(t){return this._position=Math.max(0,t),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},e.getStartTime=function(){return this._startTime},e.setStartTime=function(t){return t==this._startTime?this:(this._startTime=Math.max(0,t||0),this._updateStartTime(),this)},e.getDuration=function(){return this._duration},e.setDuration=function(t){return t==this._duration?this:(this._duration=Math.max(0,t||0),this._updateDuration(),this)},e.setPlaybackResource=function(t){return this._playbackResource=t,0==this._duration&&this._setDurationFromSource(),this},e.getPlaybackResource=function(){return this._playbackResource},e.getLoop=function(){return this._loop},e.setLoop=function(t){null!=this._playbackResource&&(0!=this._loop&&0==t?this._removeLooping(t):0==this._loop&&0!=t&&this._addLooping(t)),this._loop=t},e._sendEvent=function(t){var e=new createjs.Event(t);this.dispatchEvent(e)},e._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},e._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},e._beginPlaying=function(t){return this.setPosition(t.offset),this.setLoop(t.loop),this.setVolume(t.volume),this.setPan(t.pan),null!=t.startTime&&(this.setStartTime(t.startTime),this.setDuration(t.duration)),null!=this._playbackResource&&this._positione&&(n=e),this.sourceNode=this._createAndPlayAudioNode(i.context.currentTime-e,n),this._playbackStartTime=this.sourceNode.startTime-n,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-n)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var n=i.context.createBufferSource();n.buffer=this.playbackResource,n.connect(this.panNode);var r=.001*this._duration;return n.startTime=Math.max(0,t+r),n.start(n.startTime,Math.max(0,e)+.001*this._startTime,r-Math.max(0,e)),n},e._pause=function(){this._position=1e3*(i.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},e._resume=function(){this._handleSoundReady()},e._updateVolume=function(){var t=this._muted?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},e._calculateCurrentPosition=function(){return 1e3*(i.context.currentTime-this._playbackStartTime)},e._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},e._handleLoop=function(){this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},e._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.AbstractPlugin_constructor(),this._panningModel=i._panningModel,this.context=i.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor(),this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain(),this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=i._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i._capabilities=null,i._panningModel="equalpower",i.context=null,i._scratchBuffer=null,i._unlocked=!1,i.isSupported=function(){var t=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return!("file:"==location.protocol&&!t&&!this._isFileXHRSupported())&&(i._generateCapabilities(),null!=i.context)},i.playEmptySound=function(){if(null!=i.context){var t=i.context.createBufferSource();t.buffer=i._scratchBuffer,t.connect(i.context.destination),t.start(0,0,0)}},i._isFileXHRSupported=function(){var t=!0,e=new XMLHttpRequest;try{e.open("GET","WebAudioPluginTest.fail",!1)}catch(e){return t=!1}e.onerror=function(){t=!1},e.onload=function(){t=404==this.status||200==this.status||0==this.status&&""!=this.response};try{e.send()}catch(e){t=!1}return t},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;if(null==i.context)if(window.AudioContext)i.context=new AudioContext;else{if(!window.webkitAudioContext)return null;i.context=new webkitAudioContext}null==i._scratchBuffer&&(i._scratchBuffer=i.context.createBuffer(1,1,22050)),i._compatibilitySetUp(),"ontouchstart"in window&&"running"!=i.context.state&&(i._unlock(),document.addEventListener("mousedown",i._unlock,!0),document.addEventListener("touchend",i._unlock,!0)),i._capabilities={panning:!0,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,n=createjs.Sound.EXTENSION_MAP,r=0,s=e.length;r4?p:e+8,a=[],l=0;l4?p:e+8,h(t,s,f-1);case 3:if(1==f)return t.getUint16(e+8,!r);for(s=f>2?p:e+8,a=[],l=0;l-1&&r.splice(s,1)}else this._listenerDict[t]&&(this._listenerDict[t].length=0);else this._listenerDict={}},hasEventListener:function(t){return this._listenerDict[t]},dispatchEvent:function(t){if(t&&t.type&&this._listenerDict[t.type])for(var e=this._listenerDict[t.type],i=e.slice(),n=0;n-1&&e.splice(s,1)}r.listener&&r.listener.call(r.thisObject||this,t)}},willTrigger:function(t){return this.hasEventListener(t)}},window.egret={getString:function(t){return egret_strings[t]||"no string code"},Event:Event,EventDispatcher:EventDispatcher,registerClass:function(t,e,i){var n=t.prototype;n.__class__=e;var r=[e];i&&(r=r.concat(i));var s=n.__types__;if(n.__types__)for(var a=s.length,o=0;o=0?h.setCurrentTime(h.totalTime*n):h.setCurrentTime(i),h.stop(),h},n.play=function(){this._animationDataList&&0!=this._animationDataList.length&&(this._lastAnimationState?this._isPlaying?this.gotoAndPlay(this._lastAnimationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))},n.stop=function(){this._isPlaying=!1},n.getState=function(t,e){void 0===e&&(e=0);for(var i=this._animationStateList.length;i--;){var n=this._animationStateList[i];if(n.name==t&&n.layer==e)return n}return null},n.hasAnimation=function(t){for(var e=this._animationDataList.length;e--;)if(this._animationDataList[e].name==t)return!0;return!1},n._advanceTime=function(t){if(this._isPlaying){var e=!1;t*=this._timeScale;for(var i=this._animationStateList.length;i--;){var n=this._animationStateList[i];n._advanceTime(t)?this.removeState(n):1!=n.fadeState&&(e=!0)}this._isFading=e}},n._updateAnimationStates=function(){for(var t=this._animationStateList.length;t--;)this._animationStateList[t]._updateTimelineStates()},n.addState=function(t){this._animationStateList.indexOf(t)<0&&(this._animationStateList.unshift(t),this._animationStateCount=this._animationStateList.length)},n.removeState=function(e){var i=this._animationStateList.indexOf(e);i>=0&&(this._animationStateList.splice(i,1),t.AnimationState._returnObject(e),this._lastAnimationState==e&&(this._animationStateList.length>0?this._lastAnimationState=this._animationStateList[0]:this._lastAnimationState=null),this._animationStateCount=this._animationStateList.length)},i(n,"movementList",function(){return this._animationList}),i(n,"movementID",function(){return this.lastAnimationName}),i(n,"lastAnimationState",function(){return this._lastAnimationState}),i(n,"lastAnimationName",function(){return this._lastAnimationState?this._lastAnimationState.name:null}),i(n,"animationList",function(){return this._animationList}),i(n,"isPlaying",function(){return this._isPlaying&&!this.isComplete}),i(n,"isComplete",function(){if(this._lastAnimationState){if(!this._lastAnimationState.isComplete)return!1;for(var t=this._animationStateList.length;t--;)if(!this._animationStateList[t].isComplete)return!1;return!0}return!0}),i(n,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(n,"animationDataList",function(){return this._animationDataList},function(t){this._animationDataList=t,this._animationList.length=0;for(var e=0,i=this._animationDataList.length;e=0},n.addBoneMask=function(t,e){if(void 0===e&&(e=!0),this.addBoneToBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var n=this._armature.getBones(!1),r=n.length;r--;){var s=n[r];i.contains(s)&&this.addBoneToBoneMask(s.name)}}return this._updateTimelineStates(),this},n.removeBoneMask=function(t,e){if(void 0===e&&(e=!0),this.removeBoneFromBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var n=this._armature.getBones(!1),r=n.length;r--;){var s=n[r];i.contains(s)&&this.removeBoneFromBoneMask(s.name)}}return this._updateTimelineStates(),this},n.removeAllMixingTransform=function(){return this._boneMasks.length=0,this._updateTimelineStates(),this},n.addBoneToBoneMask=function(t){this._clip.getTimeline(t)&&this._boneMasks.indexOf(t)<0&&this._boneMasks.push(t)},n.removeBoneFromBoneMask=function(t){var e=this._boneMasks.indexOf(t);e>=0&&this._boneMasks.splice(e,1)},n._updateTimelineStates=function(){for(var t,e,i,n=this._timelineStateList.length;n--;)t=this._timelineStateList[n],this._armature.getBone(t.name)||this.removeTimelineState(t);for(n=this._slotTimelineStateList.length;n--;)e=this._slotTimelineStateList[n],this._armature.getSlot(e.name)||this.removeSlotTimelineState(e);if(this._boneMasks.length>0){for(n=this._timelineStateList.length;n--;)t=this._timelineStateList[n],this._boneMasks.indexOf(t.name)<0&&this.removeTimelineState(t);for(n=0,i=this._boneMasks.length;nthis._fadeTotalTime/this._timeScale-(this._fadeCurrentTime-this._fadeBeginTime))return this}else for(var i=0,n=this._timelineStateList.length;i=0?t*this._timeScale:0,this.displayControl=!1,this},n._advanceTime=function(t){return t*=this._timeScale,this.advanceFadeTime(t),this._fadeWeight&&this.advanceTimelinesTime(t),this._isFadeOut&&1==this._fadeState},n.advanceFadeTime=function(e){var i=!1,n=!1;if(this._fadeBeginTime>=0){var r=this._fadeState;this._fadeCurrentTime+=e<0?-e:e,this._fadeCurrentTime>=this._fadeBeginTime+this._fadeTotalTime?(1!=this._fadeWeight&&0!=this._fadeWeight||(r=1,this._pausePlayheadInFade&&(this._pausePlayheadInFade=!1,this._currentTime=-1)),this._fadeWeight=this._isFadeOut?0:1):this._fadeCurrentTime>=this._fadeBeginTime?(r=0,this._fadeWeight=(this._fadeCurrentTime-this._fadeBeginTime)/this._fadeTotalTime*this._fadeTotalWeight,this._isFadeOut&&(this._fadeWeight=this._fadeTotalWeight-this._fadeWeight)):(r=-1,this._fadeWeight=this._isFadeOut?1:0),this._fadeState!=r&&(-1==this._fadeState&&(i=!0),1==r&&(n=!0),this._fadeState=r)}var s;i&&(this._isFadeOut?this._armature.hasEventListener(t.AnimationEvent.FADE_OUT)&&((s=new t.AnimationEvent(t.AnimationEvent.FADE_OUT)).animationState=this,this._armature._eventList.push(s)):(this.hideBones(),this._armature.hasEventListener(t.AnimationEvent.FADE_IN)&&((s=new t.AnimationEvent(t.AnimationEvent.FADE_IN)).animationState=this,this._armature._eventList.push(s)))),n&&(this._isFadeOut?this._armature.hasEventListener(t.AnimationEvent.FADE_OUT_COMPLETE)&&((s=new t.AnimationEvent(t.AnimationEvent.FADE_OUT_COMPLETE)).animationState=this,this._armature._eventList.push(s)):this._armature.hasEventListener(t.AnimationEvent.FADE_IN_COMPLETE)&&((s=new t.AnimationEvent(t.AnimationEvent.FADE_IN_COMPLETE)).animationState=this,this._armature._eventList.push(s)))},n.advanceTimelinesTime=function(e){this._isPlaying&&!this._pausePlayheadInFade&&(this._time+=e);var i=!1,n=!1,r=!1,s=!1,a=0,o=1e3*this._time;if(0==this._playTimes)s=!1,a=Math.ceil(Math.abs(o)/this._totalTime)||1,(o-=o>=0?Math.floor(o/this._totalTime)*this._totalTime:Math.ceil(o/this._totalTime)*this._totalTime)<0&&(o+=this._totalTime);else{var l=this._playTimes*this._totalTime;o>=l?(o=l,s=!0):o<=-l?(o=-l,s=!0):s=!1,o<0&&(o+=l),a=Math.ceil(o/this._totalTime)||1,o-=o>=0?Math.floor(o/this._totalTime)*this._totalTime:Math.ceil(o/this._totalTime)*this._totalTime,s&&(o=this._totalTime)}this._isComplete=s;var h=1e3*this._time/this._totalTime,u=0,c=0;for(u=0,c=this._timelineStateList.length;u0&&a>1&&(r=!0),this._currentPlayTimes=a),this._currentTime<0&&(i=!0),this._isComplete&&(n=!0),this._lastTime=this._currentTime,this._currentTime=o,this.updateMainTimeline(s));var f;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&((f=new t.AnimationEvent(t.AnimationEvent.START)).animationState=this,this._armature._eventList.push(f)),n?(this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&((f=new t.AnimationEvent(t.AnimationEvent.COMPLETE)).animationState=this,this._armature._eventList.push(f)),this.autoFadeOut&&this.fadeOut(this.fadeOutTime,!0)):r&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&((f=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE)).animationState=this,this._armature._eventList.push(f))},n.updateMainTimeline=function(t){var e=this._clip.frameList;if(e.length>0){for(var i,n,r=0,s=this._clip.frameList.length;r=this._currentFramePosition+this._currentFrameDuration||this._currentTime=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}n=e[this._currentFrameIndex],i&&this._armature._arriveAtFrame(i,null,this,!0),this._currentFrameDuration=n.duration,this._currentFramePosition=n.position,i=n}n&&this._armature._arriveAtFrame(n,null,this,!1)}},n.hideBones=function(){for(var t=0,e=this._clip.hideTimelineNameMap.length;t=0&&(this.fadeOutTime=e*this._timeScale),this},n.setWeight=function(t){return(isNaN(t)||t<0)&&(t=1),this.weight=t,this},n.setFrameTween=function(t,e){return this.autoTween=t,this.lastFrameAutoTween=e,this},n.setCurrentTime=function(t){return(t<0||isNaN(t))&&(t=0),this._time=t,this._currentTime=1e3*this._time,this},n.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},n.setPlayTimes=function(t){return void 0===t&&(t=0),Math.round(.001*this._totalTime*this._clip.frameRate)<2?this._playTimes=t<0?-1:1:this._playTimes=t<0?-t:t,this.autoFadeOut=t<0,this},i(n,"name",function(){return this._name}),i(n,"layer",function(){return this._layer}),i(n,"group",function(){return this._group}),i(n,"clip",function(){return this._clip}),i(n,"isComplete",function(){return this._isComplete}),i(n,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(n,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(n,"totalTime",function(){return.001*this._totalTime}),i(n,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),i(n,"fadeWeight",function(){return this._fadeWeight}),i(n,"fadeState",function(){return this._fadeState}),i(n,"fadeTotalTime",function(){return this._fadeTotalTime}),i(n,"timeScale",function(){return this._timeScale}),i(n,"playTimes",function(){return this._playTimes}),e._pool=[],e}();t.AnimationState=e,egret.registerClass(e,"dragonBones.AnimationState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._durationColor=new t.ColorTransform}__define;var i=e.prototype;return e._borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e._returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e._clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},i.clear=function(){this._slot&&(this._slot._removeState(this),this._slot=null),this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null},i._fadeIn=function(t,e,i){switch(this._slot=t,this._armature=this._slot.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this.name=i.name,this._totalTime=this._timelineData.duration,this._rawAnimationScale=this._animationState.clip.scale,this._isComplete=!1,this._blendEnabled=!1,this._tweenColor=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}this._slot._addState(this)},i._fadeOut=function(){},i._update=function(t){-1==this._updateMode?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},i.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,n=this._animationState.playTimes;if(0==n)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,(i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime)<0&&(i+=this._totalTime);else{var r=n*this._totalTime;i>=r?(i=r,this._isComplete=!0):i<=-r?(i=-r,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=r),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l=this._currentFramePosition+this._currentFrameDuration))break;if(++this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._slot._arriveAtFrame(s,this,this._animationState,!0),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._slot._arriveAtFrame(a,this,this._animationState,!1),this._blendEnabled=a.displayIndex>=0,this._blendEnabled?this.updateToNextFrame(e):(this._tweenEasing=NaN,this._tweenColor=!1)),this._blendEnabled&&this.updateTween()}},i.updateToNextFrame=function(t){void 0===t&&(t=0);var e=this._currentFrameIndex+1;e>=this._timelineData.frameList.length&&(e=0);var i=this._timelineData.frameList[this._currentFrameIndex],n=this._timelineData.frameList[e],r=!1;0==e&&(!this._animationState.lastFrameAutoTween||this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+t-this._timelineData.offset)*this._timelineData.scale>.999999)?(this._tweenEasing=NaN,r=!1):i.displayIndex<0||n.displayIndex<0?(this._tweenEasing=NaN,r=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=i.tweenEasing,this._tweenCurve=i.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?r=!1:(10==this._tweenEasing&&(this._tweenEasing=0),r=!0)):r=!0):(this._tweenEasing=i.tweenEasing,this._tweenCurve=i.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?r=!0:(this._tweenEasing=NaN,r=!1)),r?i.color&&n.color?(this._durationColor.alphaOffset=n.color.alphaOffset-i.color.alphaOffset,this._durationColor.redOffset=n.color.redOffset-i.color.redOffset,this._durationColor.greenOffset=n.color.greenOffset-i.color.greenOffset,this._durationColor.blueOffset=n.color.blueOffset-i.color.blueOffset,this._durationColor.alphaMultiplier=n.color.alphaMultiplier-i.color.alphaMultiplier,this._durationColor.redMultiplier=n.color.redMultiplier-i.color.redMultiplier,this._durationColor.greenMultiplier=n.color.greenMultiplier-i.color.greenMultiplier,this._durationColor.blueMultiplier=n.color.blueMultiplier-i.color.blueMultiplier,this._durationColor.alphaOffset||this._durationColor.redOffset||this._durationColor.greenOffset||this._durationColor.blueOffset||this._durationColor.alphaMultiplier||this._durationColor.redMultiplier||this._durationColor.greenMultiplier||this._durationColor.blueMultiplier?this._tweenColor=!0:this._tweenColor=!1):i.color?(this._tweenColor=!0,this._durationColor.alphaOffset=-i.color.alphaOffset,this._durationColor.redOffset=-i.color.redOffset,this._durationColor.greenOffset=-i.color.greenOffset,this._durationColor.blueOffset=-i.color.blueOffset,this._durationColor.alphaMultiplier=1-i.color.alphaMultiplier,this._durationColor.redMultiplier=1-i.color.redMultiplier,this._durationColor.greenMultiplier=1-i.color.greenMultiplier,this._durationColor.blueMultiplier=1-i.color.blueMultiplier):n.color?(this._tweenColor=!0,this._durationColor.alphaOffset=n.color.alphaOffset,this._durationColor.redOffset=n.color.redOffset,this._durationColor.greenOffset=n.color.greenOffset,this._durationColor.blueOffset=n.color.blueOffset,this._durationColor.alphaMultiplier=n.color.alphaMultiplier-1,this._durationColor.redMultiplier=n.color.redMultiplier-1,this._durationColor.greenMultiplier=n.color.greenMultiplier-1,this._durationColor.blueMultiplier=n.color.blueMultiplier-1):this._tweenColor=!1:this._tweenColor=!1,!this._tweenColor&&this._animationState.displayControl&&(i.color?this._slot._updateDisplayColor(i.color.alphaOffset,i.color.redOffset,i.color.greenOffset,i.color.blueOffset,i.color.alphaMultiplier,i.color.redMultiplier,i.color.greenMultiplier,i.color.blueMultiplier,!0):this._slot._isColorChanged&&this._slot._updateDisplayColor(0,0,0,0,1,1,1,1,!1))},i.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenColor&&this._animationState.displayControl){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing)),e.color?this._slot._updateDisplayColor(e.color.alphaOffset+this._durationColor.alphaOffset*i,e.color.redOffset+this._durationColor.redOffset*i,e.color.greenOffset+this._durationColor.greenOffset*i,e.color.blueOffset+this._durationColor.blueOffset*i,e.color.alphaMultiplier+this._durationColor.alphaMultiplier*i,e.color.redMultiplier+this._durationColor.redMultiplier*i,e.color.greenMultiplier+this._durationColor.greenMultiplier*i,e.color.blueMultiplier+this._durationColor.blueMultiplier*i,!0):this._slot._updateDisplayColor(this._durationColor.alphaOffset*i,this._durationColor.redOffset*i,this._durationColor.greenOffset*i,this._durationColor.blueOffset*i,1+this._durationColor.alphaMultiplier*i,1+this._durationColor.redMultiplier*i,1+this._durationColor.greenMultiplier*i,1+this._durationColor.blueMultiplier*i,!0)}},i.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._slot._arriveAtFrame(t,this,this._animationState,!1),this._isComplete=!0,this._tweenEasing=NaN,this._tweenColor=!1,this._blendEnabled=t.displayIndex>=0,this._blendEnabled&&this._animationState.displayControl&&(t.color?this._slot._updateDisplayColor(t.color.alphaOffset,t.color.redOffset,t.color.greenOffset,t.color.blueOffset,t.color.alphaMultiplier,t.color.redMultiplier,t.color.greenMultiplier,t.color.blueMultiplier,!0):this._slot._isColorChanged&&this._slot._updateDisplayColor(0,0,0,0,1,1,1,1,!1))},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.SlotTimelineState=e,egret.registerClass(e,"dragonBones.SlotTimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._lastTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._transform=new t.DBTransform,this._pivot=new t.Point,this._durationTransform=new t.DBTransform,this._durationPivot=new t.Point,this._durationColor=new t.ColorTransform}__define;var i=e.prototype;return e._borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e._returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e._clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},i.clear=function(){this._bone&&(this._bone._removeState(this),this._bone=null),this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null,this._originTransform=null,this._originPivot=null},i._fadeIn=function(t,e,i){switch(this._bone=t,this._armature=this._bone.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this._originTransform=this._timelineData.originTransform,this._originPivot=this._timelineData.originPivot,this.name=i.name,this._totalTime=this._timelineData.duration,this._rawAnimationScale=this._animationState.clip.scale,this._isComplete=!1,this._tweenTransform=!1,this._tweenScale=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._transform.x=0,this._transform.y=0,this._transform.scaleX=1,this._transform.scaleY=1,this._transform.skewX=0,this._transform.skewY=0,this._pivot.x=0,this._pivot.y=0,this._durationTransform.x=0,this._durationTransform.y=0,this._durationTransform.scaleX=1,this._durationTransform.scaleY=1,this._durationTransform.skewX=0,this._durationTransform.skewY=0,this._durationPivot.x=0,this._durationPivot.y=0,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}this._bone._addState(this)},i._fadeOut=function(){this._transform.skewX=t.TransformUtil.formatRadian(this._transform.skewX),this._transform.skewY=t.TransformUtil.formatRadian(this._transform.skewY)},i._update=function(t){-1==this._updateMode?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},i.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,n=this._animationState.playTimes;if(0==n)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,(i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime)<0&&(i+=this._totalTime);else{var r=n*this._totalTime;i>=r?(i=r,this._isComplete=!0):i<=-r?(i=-r,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=r),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._lastTime=this._currentTime,this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l=this._currentFramePosition+this._currentFrameDuration||this._currentTime=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._bone._arriveAtFrame(s,this,this._animationState,!0),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._bone._arriveAtFrame(a,this,this._animationState,!1),this.updateToNextFrame(e)),this.updateTween()}},i.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var n=this._timelineData.frameList[this._currentFrameIndex],r=this._timelineData.frameList[i],s=!1;0==i&&(!this._animationState.lastFrameAutoTween||this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999)?(this._tweenEasing=NaN,s=!1):n.displayIndex<0||r.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=r.transform.x-n.transform.x,this._durationTransform.y=r.transform.y-n.transform.y,this._durationTransform.skewX=r.transform.skewX-n.transform.skewX,this._durationTransform.skewY=r.transform.skewY-n.transform.skewY,this._durationTransform.scaleX=r.transform.scaleX-n.transform.scaleX+r.scaleOffset.x,this._durationTransform.scaleY=r.transform.scaleY-n.transform.scaleY+r.scaleOffset.y,this._durationTransform.normalizeRotation(),0==i&&(this._durationTransform.skewX=t.TransformUtil.formatRadian(this._durationTransform.skewX),this._durationTransform.skewY=t.TransformUtil.formatRadian(this._durationTransform.skewY)),this._durationPivot.x=r.pivot.x-n.pivot.x,this._durationPivot.y=r.pivot.y-n.pivot.y,this._durationTransform.x||this._durationTransform.y||this._durationTransform.skewX||this._durationTransform.skewY||this._durationTransform.scaleX||this._durationTransform.scaleY||this._durationPivot.x||this._durationPivot.y?(this._tweenTransform=!0,this._tweenScale=n.tweenScale):(this._tweenTransform=!1,this._tweenScale=!1)):(this._tweenTransform=!1,this._tweenScale=!1),this._tweenTransform?this._tweenScale||(this._animationState.additiveBlending?(this._transform.scaleX=n.transform.scaleX,this._transform.scaleY=n.transform.scaleY):(this._transform.scaleX=this._originTransform.scaleX*n.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*n.transform.scaleY)):(this._animationState.additiveBlending?(this._transform.x=n.transform.x,this._transform.y=n.transform.y,this._transform.skewX=n.transform.skewX,this._transform.skewY=n.transform.skewY,this._transform.scaleX=n.transform.scaleX,this._transform.scaleY=n.transform.scaleY,this._pivot.x=n.pivot.x,this._pivot.y=n.pivot.y):(this._transform.x=this._originTransform.x+n.transform.x,this._transform.y=this._originTransform.y+n.transform.y,this._transform.skewX=this._originTransform.skewX+n.transform.skewX,this._transform.skewY=this._originTransform.skewY+n.transform.skewY,this._transform.scaleX=this._originTransform.scaleX*n.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*n.transform.scaleY,this._pivot.x=this._originPivot.x+n.pivot.x,this._pivot.y=this._originPivot.y+n.pivot.y),this._bone.invalidUpdate())},i.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenTransform){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing));var n=e.transform,r=e.pivot;this._animationState.additiveBlending?(this._transform.x=n.x+this._durationTransform.x*i,this._transform.y=n.y+this._durationTransform.y*i,this._transform.skewX=n.skewX+this._durationTransform.skewX*i,this._transform.skewY=n.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=n.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=n.scaleY+this._durationTransform.scaleY*i),this._pivot.x=r.x+this._durationPivot.x*i,this._pivot.y=r.y+this._durationPivot.y*i):(this._transform.x=this._originTransform.x+n.x+this._durationTransform.x*i,this._transform.y=this._originTransform.y+n.y+this._durationTransform.y*i,this._transform.skewX=this._originTransform.skewX+n.skewX+this._durationTransform.skewX*i,this._transform.skewY=this._originTransform.skewY+n.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=this._originTransform.scaleX*n.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=this._originTransform.scaleY*n.scaleY+this._durationTransform.scaleY*i),this._pivot.x=this._originPivot.x+r.x+this._durationPivot.x*i,this._pivot.y=this._originPivot.y+r.y+this._durationPivot.y*i),this._bone.invalidUpdate()}},i.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._bone._arriveAtFrame(t,this,this._animationState,!1),this._isComplete=!0,this._tweenEasing=NaN,this._tweenTransform=!1,this._tweenScale=!1,this._tweenColor=!1,this._animationState.additiveBlending?(this._transform.x=t.transform.x,this._transform.y=t.transform.y,this._transform.skewX=t.transform.skewX,this._transform.skewY=t.transform.skewY,this._transform.scaleX=t.transform.scaleX,this._transform.scaleY=t.transform.scaleY,this._pivot.x=t.pivot.x,this._pivot.y=t.pivot.y):(this._transform.x=this._originTransform.x+t.transform.x,this._transform.y=this._originTransform.y+t.transform.y,this._transform.skewX=this._originTransform.skewX+t.transform.skewX,this._transform.skewY=this._originTransform.skewY+t.transform.skewY,this._transform.scaleX=this._originTransform.scaleX*t.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*t.transform.scaleY,this._pivot.x=this._originPivot.x+t.pivot.x,this._pivot.y=this._originPivot.y+t.pivot.y),this._bone.invalidUpdate()},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.TimelineState=e,egret.registerClass(e,"dragonBones.TimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e){void 0===t&&(t=-1),void 0===e&&(e=1),this._time=t>=0?t:.001*(new Date).getTime(),this._timeScale=isNaN(e)?1:e,this._animatableList=[]}var e=__define,i=t.prototype;return e(i,"time",function(){return this._time}),e(i,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i.contains=function(t){return this._animatableList.indexOf(t)>=0},i.add=function(t){t&&-1==this._animatableList.indexOf(t)&&this._animatableList.push(t)},i.remove=function(t){var e=this._animatableList.indexOf(t);e>=0&&(this._animatableList[e]=null)},i.clear=function(){this._animatableList.length=0},i.advanceTime=function(t){void 0===t&&(t=-1),t<0&&(t=.001*(new Date).getTime()-this._time),t*=this._timeScale,this._time+=t;var e=this._animatableList.length;if(0!=e){for(var i=0,n=0;n0){for(var n=0,a=this._eventList.length;n=0&&this._boneList.splice(e,1)},r._addSlotToSlotList=function(t){this._slotList.indexOf(t)<0&&(this._slotList[this._slotList.length]=t)},r._removeSlotFromSlotList=function(t){var e=this._slotList.indexOf(t);e>=0&&this._slotList.splice(e,1)},r.updateSlotsZOrder=function(){this._slotList.sort(this.sortSlot);for(var t=this._slotList.length;t--;){var e=this._slotList[t];e._isShowDisplay&&e._addDisplayToContainer(this._display)}this._slotsZOrderChanged=!1},r._updateAnimationAfterBoneListChanged=function(t){void 0===t&&(t=!0),t&&this.sortBoneList(),this._animation._updateAnimationStates()},r.sortBoneList=function(){var e=this._boneList.length;if(0!=e){for(var i=[];e--;){for(var n=0,r=this._boneList[e],s=r;s;)n++,s=s.parent;i[e]=[n,r]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this._boneList[e]=i[e][1];i.length=0}},r._arriveAtFrame=function(e,n,r,s){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var a=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);a.animationState=r,a.frameLabel=e.event,this._eventList.push(a)}if(e.sound&&i._soundManager.hasEventListener(t.SoundEvent.SOUND)){var o=new t.SoundEvent(t.SoundEvent.SOUND);o.armature=this,o.animationState=r,o.sound=e.sound,i._soundManager.dispatchEvent(o)}e.action&&r.displayControl&&this.animation.gotoAndPlay(e.action)},r.sortSlot=function(t,e){return t.zOrder0||this._parent&&this._parent._needUpdate>0){this._needUpdate=1,this.blendingTimeline();var i=this._updateGlobal(),n=i?i.parentGlobalTransform:null,r=i?i.parentGlobalTransformMatrix:null,s=0!=this._offset.x||0!=this._offset.y,a=0!=this._offset.scaleX||0!=this._offset.scaleY,o=0!=this._offset.skewX||0!=this._offset.skewY;s&&!this.applyOffsetTranslationToChild||a&&!this.applyOffsetScaleToChild||o&&!this.applyOffsetRotationToChild?(this._tempGlobalTransformForChild||(this._tempGlobalTransformForChild=new t.DBTransform),this._globalTransformForChild=this._tempGlobalTransformForChild,this._tempGlobalTransformMatrixForChild||(this._tempGlobalTransformMatrixForChild=new t.Matrix),this._globalTransformMatrixForChild=this._tempGlobalTransformMatrixForChild,this._globalTransformForChild.x=this._origin.x+this._tween.x,this._globalTransformForChild.y=this._origin.y+this._tween.y,this._globalTransformForChild.scaleX=this._origin.scaleX*this._tween.scaleX,this._globalTransformForChild.scaleY=this._origin.scaleY*this._tween.scaleY,this._globalTransformForChild.skewX=this._origin.skewX+this._tween.skewX,this._globalTransformForChild.skewY=this._origin.skewY+this._tween.skewY,this.applyOffsetTranslationToChild&&(this._globalTransformForChild.x+=this._offset.x,this._globalTransformForChild.y+=this._offset.y),this.applyOffsetScaleToChild&&(this._globalTransformForChild.scaleX*=this._offset.scaleX,this._globalTransformForChild.scaleY*=this._offset.scaleY),this.applyOffsetRotationToChild&&(this._globalTransformForChild.skewX+=this._offset.skewX,this._globalTransformForChild.skewY+=this._offset.skewY),t.TransformUtil.transformToMatrix(this._globalTransformForChild,this._globalTransformMatrixForChild,!0),r&&(this._globalTransformMatrixForChild.concat(r),t.TransformUtil.matrixToTransform(this._globalTransformMatrixForChild,this._globalTransformForChild,this._globalTransformForChild.scaleX*n.scaleX>=0,this._globalTransformForChild.scaleY*n.scaleY>=0))):(this._globalTransformForChild=this._global,this._globalTransformMatrixForChild=this._globalTransformMatrix)}},r._updateColor=function(t,e,i,n,r,s,a,o,l){for(var h=this._slotList.length,u=0;u=0&&this._timelineStateList.splice(e,1)},r._removeAllStates=function(){this._timelineStateList.length=0},r.blendingTimeline=function(){var t,e,i,n,r=this._timelineStateList.length;if(1==r)n=(t=this._timelineStateList[0])._animationState.weight*t._animationState.fadeWeight,t._weight=n,e=t._transform,i=t._pivot,this._tween.x=e.x*n,this._tween.y=e.y*n,this._tween.skewX=e.skewX*n,this._tween.skewY=e.skewY*n,this._tween.scaleX=1+(e.scaleX-1)*n,this._tween.scaleY=1+(e.scaleY-1)*n,this._tweenPivot.x=i.x*n,this._tweenPivot.y=i.y*n;else if(r>1){for(var s=0,a=0,o=0,l=0,h=1,u=1,c=0,d=0,f=1,p=0,_=this._timelineStateList[r-1]._animationState.layer,m=0;r--;){if(t=this._timelineStateList[r],m=t._animationState.layer,_!=m){if(p>=f){t._weight=0;break}f-=p}_=m,n=t._animationState.weight*t._animationState.fadeWeight*f,t._weight=n,n&&(e=t._transform,i=t._pivot,s+=e.x*n,a+=e.y*n,o+=e.skewX*n,l+=e.skewY*n,h+=(e.scaleX-1)*n,u+=(e.scaleY-1)*n,c+=i.x*n,d+=i.y*n,p+=n)}this._tween.x=s,this._tween.y=a,this._tween.skewX=o,this._tween.skewY=l,this._tween.scaleX=h,this._tween.scaleY=u,this._tweenPivot.x=c,this._tweenPivot.y=d}},r.sortState=function(t,e){return t._animationState.layer0?this._slotList[0]:null}),i._soundManager=t.SoundEventManager.getInstance(),i}(t.DBObject);t.Bone=e,egret.registerClass(e,"dragonBones.Bone")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){if(e.call(this),this._currentDisplayIndex=0,i!=this)throw new Error(egret.getString(4001));this._displayList=[],this._timelineStateList=[],this._currentDisplayIndex=-1,this._originZOrder=0,this._tweenZOrder=0,this._offsetZOrder=0,this._isShowDisplay=!1,this._colorTransform=new t.ColorTransform,this._displayDataList=null,this._currentDisplay=null,this.inheritRotation=!0,this.inheritScale=!0}__extends(i,e);var n=__define,r=i.prototype;return r.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},r.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayList.length=0,this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},r.sortState=function(t,e){return t._animationState.layer=0&&this._timelineStateList.splice(e,1)},r.setArmature=function(t){this._armature!=t&&(this._armature&&this._armature._removeSlotFromSlotList(this),this._armature=t,this._armature?(this._armature._addSlotToSlotList(this),this._armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this._armature.display)):this._removeDisplayFromContainer())},r._update=function(){this._parent._needUpdate<=0&&!this._needUpdate||(this._updateGlobal(),this._updateTransform(),this._needUpdate=!1)},r._calculateRelativeParentTransform=function(){this._global.scaleX=this._origin.scaleX*this._offset.scaleX,this._global.scaleY=this._origin.scaleY*this._offset.scaleY,this._global.skewX=this._origin.skewX+this._offset.skewX,this._global.skewY=this._origin.skewY+this._offset.skewY,this._global.x=this._origin.x+this._offset.x+this._parent._tweenPivot.x,this._global.y=this._origin.y+this._offset.y+this._parent._tweenPivot.y},r.updateChildArmatureAnimation=function(){this.childArmature&&(this._isShowDisplay?this._armature&&this._armature.animation.lastAnimationState&&this.childArmature.animation.hasAnimation(this._armature.animation.lastAnimationState.name)?this.childArmature.animation.gotoAndPlay(this._armature.animation.lastAnimationState.name):this.childArmature.animation.play():(this.childArmature.animation.stop(),this.childArmature.animation._lastAnimationState=null))},r._changeDisplay=function(t){if(void 0===t&&(t=0),t<0)this._isShowDisplay&&(this._isShowDisplay=!1,this._removeDisplayFromContainer(),this.updateChildArmatureAnimation());else if(this._displayList.length>0){var e=this._displayList.length;t>=e&&(t=e-1),this._currentDisplayIndex!=t?(this._isShowDisplay=!0,this._currentDisplayIndex=t,this._updateSlotDisplay(),this.updateChildArmatureAnimation(),this._displayDataList&&this._displayDataList.length>0&&this._currentDisplayIndex=0&&(isNaN(r.zOrder)||r.zOrder==this._tweenZOrder||(this._tweenZOrder=r.zOrder,this._armature._slotsZOrderChanged=!0)),t.action&&this.childArmature&&this.childArmature.animation.gotoAndPlay(t.action)}},r._updateGlobal=function(){this._calculateRelativeParentTransform(),t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0);var e=this._calculateParentTransform();return e&&(this._globalTransformMatrix.concat(e.parentGlobalTransformMatrix),t.TransformUtil.matrixToTransform(this._globalTransformMatrix,this._global,this._global.scaleX*e.parentGlobalTransform.scaleX>=0,this._global.scaleY*e.parentGlobalTransform.scaleY>=0)),e},r._resetToOrigin=function(){this._changeDisplay(this._originDisplayIndex),this._updateDisplayColor(0,0,0,0,1,1,1,1,!0)},i}(t.DBObject);t.Slot=e,egret.registerClass(e,"dragonBones.Slot")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.slotTimelineCacheList=[],this.slotTimelineCacheDic={},this.frameNum=0}__define;var i=e.prototype;return e.initWithAnimationData=function(i,n){var r=new e;r.name=i.name;for(var s,a,o,l,h=i.timelineList,u=0,c=h.length;u=o&&r.progress<1);this.cacheGeneratorArmature.enableEventDispatch=a,this.resetCacheGeneratorArmature(),this.cacheGeneratorArmature.enableCache=i}},i.resetCacheGeneratorArmature=function(){this.cacheGeneratorArmature.resetAnimation()},i.getAnimationCache=function(t){return this.animationCacheDic[t]},e}();t.AnimationCacheManager=e,egret.registerClass(e,"dragonBones.AnimationCacheManager")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.globalTransform=new t.DBTransform,this.globalTransformMatrix=new t.Matrix}__define;var i=e.prototype;return i.copy=function(t){this.globalTransform=t.globalTransform,this.globalTransformMatrix=t.globalTransformMatrix},i.clear=function(){this.globalTransform=e.ORIGIN_TRAMSFORM,this.globalTransformMatrix=e.ORIGIN_MATRIX},e.ORIGIN_TRAMSFORM=new t.DBTransform,e.ORIGIN_MATRIX=new t.Matrix,e}();t.FrameCache=e,egret.registerClass(e,"dragonBones.FrameCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.displayIndex=-1}__extends(e,t);__define;var i=e.prototype;return i.copy=function(e){t.prototype.copy.call(this,e),this.colorTransform=e.colorTransform,this.displayIndex=e.displayIndex},i.clear=function(){t.prototype.clear.call(this),this.colorTransform=null,this.displayIndex=-1},e}(t.FrameCache);t.SlotFrameCache=e,egret.registerClass(e,"dragonBones.SlotFrameCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.frameCacheList=new Array}__define;var e=t.prototype;return e.addFrame=function(){},e.update=function(t){void 0===t&&(t=0),this.currentFrameCache.copy(this.frameCacheList[t])},e.bindCacheUser=function(t){t.frameCache=this.currentFrameCache},t}();t.TimelineCache=e,egret.registerClass(e,"dragonBones.TimelineCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this)}__extends(i,e);__define;return i.prototype.addFrame=function(){var e=new t.SlotFrameCache;e.globalTransform.copy(this.cacheGenerator.global),e.globalTransformMatrix.copyFrom(this.cacheGenerator.globalTransformMatrix),this.cacheGenerator.colorChanged&&(e.colorTransform=t.ColorTransformUtil.cloneColor(this.cacheGenerator.colorTransform)),e.displayIndex=this.cacheGenerator.displayIndex,this.frameCacheList.push(e)},i}(t.TimelineCache);t.SlotTimelineCache=e,egret.registerClass(e,"dragonBones.SlotTimelineCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),t.call(this,e,i,n)}__extends(e,t);__define;return e}(egret.Event);t.Event=e,egret.registerClass(e,"dragonBones.Event")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);var i=__define,n=e.prototype;return i(e,"MOVEMENT_CHANGE",function(){return e.FADE_IN}),i(n,"movementID",function(){return this.animationName}),i(n,"armature",function(){return this.target}),i(n,"animationName",function(){return this.animationState.name}),e.FADE_IN="fadeIn",e.FADE_OUT="fadeOut",e.START="start",e.COMPLETE="complete",e.LOOP_COMPLETE="loopComplete",e.FADE_IN_COMPLETE="fadeInComplete",e.FADE_OUT_COMPLETE="fadeOutComplete",e}(t.Event);t.AnimationEvent=e,egret.registerClass(e,"dragonBones.AnimationEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e){t.call(this,e)}__extends(e,t);__define;return e.Z_ORDER_UPDATED="zOrderUpdated",e}(t.Event);t.ArmatureEvent=e,egret.registerClass(e,"dragonBones.ArmatureEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);var i=__define,n=e.prototype;return i(e,"MOVEMENT_FRAME_EVENT",function(){return e.ANIMATION_FRAME_EVENT}),i(n,"armature",function(){return this.target}),e.ANIMATION_FRAME_EVENT="animationFrameEvent",e.BONE_FRAME_EVENT="boneFrameEvent",e}(t.Event);t.FrameEvent=e,egret.registerClass(e,"dragonBones.FrameEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);__define;return e.SOUND="sound",e}(t.Event);t.SoundEvent=e,egret.registerClass(e,"dragonBones.SoundEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function n(t){if(e.call(this),this.dragonBonesDataDic={},this.textureAtlasDic={},t!=this)throw new Error(egret.getString(4001))}__extends(n,e);__define;var r=n.prototype;return r.dispose=function(t){if(void 0===t&&(t=!0),t){for(var e in this.dragonBonesDataDic)this.dragonBonesDataDic[e].dispose(),delete this.dragonBonesDataDic[e];for(var i in this.textureAtlasDic){var n=this.textureAtlasDic[i];if(n)for(var r=0,s=n.length;r0;)this.dispatchEvent(this._eventList.shift());this._lockDispose=!1,this._delayDispose&&this.dispose()},r.enableAnimationCache=function(e,i,n){void 0===i&&(i=null),void 0===n&&(n=!0);var r=t.AnimationCacheManager.initWithArmatureData(this.armatureData,e);if(i)for(var s=i.length,a=0;a=0||!e._frameCache&&e.displayIndex>=0)&&e._addDisplayToContainer(this._display)}this._slotsZOrderChanged=!1},r.sortBoneList=function(){var e=this.boneList.length;if(0!=e){for(var i=[];e--;){for(var n=0,r=this.boneList[e],s=r;s;)n++,s=s.parent;i[e]=[n,r]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this.boneList[e]=i[e][1];i.length=0}},r.arriveAtFrame=function(e,i){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var n=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);n.animationState=i,n.frameLabel=e.event,this._addEvent(n)}e.action&&this.animation.gotoAndPlay(e.action)},r.invalidUpdate=function(t){if(void 0===t&&(t=null),t){var e=this.getBone(t);e&&e.invalidUpdate()}else for(var i=this.boneList.length;i--;)this.boneList[i].invalidUpdate()},r.resetAnimation=function(){this.animation.animationState._resetTimelineStateList();for(var t=this.boneList.length,e=0;e0||this._parent&&this._parent._needUpdate>0)&&(this._needUpdate=1,this.blendingTimeline(),this._updateGlobal())},r._hideSlots=function(){for(var t=this.slotList.length,e=0;e0?this.slotList[0]:null}),i}(t.FastDBObject);t.FastBone=e,egret.registerClass(e,"dragonBones.FastBone")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){if(e.call(this),this._currentDisplayIndex=0,i!=this)throw new Error("Abstract class can not be instantiated!");this.hasChildArmature=!1,this._currentDisplayIndex=-1,this._originZOrder=0,this._tweenZOrder=0,this._offsetZOrder=0,this._colorTransform=new t.ColorTransform,this._isColorChanged=!1,this._displayDataList=null,this._currentDisplay=null,this.inheritRotation=!0,this.inheritScale=!0}__extends(i,e);var n=__define,r=i.prototype;return r.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},r.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},r.updateByCache=function(){e.prototype.updateByCache.call(this),this._updateTransform();var i=this._frameCache.colorTransform,n=null!=i;(this.colorChanged!=n||this.colorChanged&&n&&!t.ColorTransformUtil.isEqual(this._colorTransform,i))&&(i=i||t.ColorTransformUtil.originalColor,this._updateDisplayColor(i.alphaOffset,i.redOffset,i.greenOffset,i.blueOffset,i.alphaMultiplier,i.redMultiplier,i.greenMultiplier,i.blueMultiplier,n)),this._changeDisplayIndex(this._frameCache.displayIndex)},r._update=function(){this._parent._needUpdate<=0||(this._updateGlobal(),this._updateTransform())},r._calculateRelativeParentTransform=function(){this._global.copy(this._origin),this._global.x+=this._parent._tweenPivot.x,this._global.y+=this._parent._tweenPivot.y},r.initDisplayList=function(t){this._displayList=t},r.clearCurrentDisplay=function(){if(this.hasChildArmature){var t=this.childArmature;t&&t.resetAnimation()}var e=this._getDisplayIndex();return this._removeDisplayFromContainer(),e},r._changeDisplayIndex=function(t){if(void 0===t&&(t=0),this._currentDisplayIndex!=t){var e=-1;this._currentDisplayIndex>=0&&(e=this.clearCurrentDisplay()),this._currentDisplayIndex=t,this._currentDisplayIndex>=0&&(this._origin.copy(this._displayDataList[this._currentDisplayIndex].transform),this.initCurrentDisplay(e))}},r.changeSlotDisplay=function(t){var e=this.clearCurrentDisplay();this._displayList[this._currentDisplayIndex]=t,this.initCurrentDisplay(e)},r.initCurrentDisplay=function(e){void 0===e&&(e=0);var i=this._displayList[this._currentDisplayIndex];if(i?i instanceof t.FastArmature?this._currentDisplay=i.display:this._currentDisplay=i:this._currentDisplay=null,this._updateDisplay(this._currentDisplay),this._currentDisplay&&(-1!=e?this._addDisplayToContainer(this.armature.display,e):(this.armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this.armature.display)),this._blendMode&&this._updateDisplayBlendMode(this._blendMode),this._isColorChanged&&this._updateDisplayColor(this._colorTransform.alphaOffset,this._colorTransform.redOffset,this._colorTransform.greenOffset,this._colorTransform.blueOffset,this._colorTransform.alphaMultiplier,this._colorTransform.redMultiplier,this._colorTransform.greenMultiplier,this._colorTransform.blueMultiplier,!0),this._updateTransform(),i instanceof t.FastArmature)){var n=i;this.armature&&this.armature.animation.animationState&&n.animation.hasAnimation(this.armature.animation.animationState.name)?n.animation.gotoAndPlay(this.armature.animation.animationState.name):n.animation.play()}},n(r,"visible",void 0,function(t){this._visible!=t&&(this._visible=t,this._updateDisplayVisible(this._visible))}),n(r,"displayList",function(){return this._displayList},function(t){if(!t)throw new Error;var e=t[this._currentDisplayIndex],i=this._currentDisplayIndex>=0&&this._displayList[this._currentDisplayIndex]!=e;this._displayList=t,i&&this.changeSlotDisplay(e)}),n(r,"display",function(){return this._currentDisplay},function(t){this._currentDisplayIndex<0||this._displayList[this._currentDisplayIndex]!=t&&this.changeSlotDisplay(t)}),n(r,"childArmature",function(){return this._displayList[this._currentDisplayIndex]instanceof t.Armature||this._displayList[this._currentDisplayIndex]instanceof t.FastArmature?this._displayList[this._currentDisplayIndex]:null},function(t){this.display=t}),n(r,"zOrder",function(){return this._originZOrder+this._tweenZOrder+this._offsetZOrder},function(t){this.zOrder!=t&&(this._offsetZOrder=t-this._originZOrder-this._tweenZOrder,this.armature&&(this.armature._slotsZOrderChanged=!0))}),n(r,"blendMode",function(){return this._blendMode},function(t){this._blendMode!=t&&(this._blendMode=t,this._updateDisplayBlendMode(this._blendMode))}),n(r,"colorTransform",function(){return this._colorTransform}),n(r,"displayIndex",function(){return this._currentDisplayIndex}),n(r,"colorChanged",function(){return this._isColorChanged}),r._updateDisplay=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},r._getDisplayIndex=function(){throw new Error("Abstract method needs to be implemented in subclass!")},r._addDisplayToContainer=function(t,e){throw void 0===e&&(e=-1),new Error("Abstract method needs to be implemented in subclass!")},r._removeDisplayFromContainer=function(){throw new Error("Abstract method needs to be implemented in subclass!")},r._updateTransform=function(){throw new Error("Abstract method needs to be implemented in subclass!")},r._updateDisplayVisible=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},r._updateDisplayColor=function(t,e,i,n,r,s,a,o,l){void 0===l&&(l=!1),this._colorTransform.alphaOffset=t,this._colorTransform.redOffset=e,this._colorTransform.greenOffset=i,this._colorTransform.blueOffset=n,this._colorTransform.alphaMultiplier=r,this._colorTransform.redMultiplier=s,this._colorTransform.greenMultiplier=a,this._colorTransform.blueMultiplier=o,this._isColorChanged=l},r._updateDisplayBlendMode=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},r._arriveAtFrame=function(t,e){var i=t,n=i.displayIndex;if(this._changeDisplayIndex(n),this._updateDisplayVisible(i.visible),n>=0&&(isNaN(i.zOrder)||i.zOrder==this._tweenZOrder||(this._tweenZOrder=i.zOrder,this.armature._slotsZOrderChanged=!0)),t.action){var r=this.childArmature;r&&r.getAnimation().gotoAndPlay(t.action)}},r.hideSlots=function(){this._changeDisplayIndex(-1),this._removeDisplayFromContainer(),this._frameCache&&this._frameCache.clear()},r._updateGlobal=function(){this._calculateRelativeParentTransform(),t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0);var e=this._calculateParentTransform();return e&&(this._globalTransformMatrix.concat(e.parentGlobalTransformMatrix),t.TransformUtil.matrixToTransform(this._globalTransformMatrix,this._global,this._global.scaleX*e.parentGlobalTransform.scaleX>=0,this._global.scaleY*e.parentGlobalTransform.scaleY>=0)),e},r._resetToOrigin=function(){this._changeDisplayIndex(this._originDisplayIndex),this._updateDisplayColor(0,0,0,0,1,1,1,1,!0)},i}(t.FastDBObject);t.FastSlot=e,egret.registerClass(e,"dragonBones.FastSlot",["dragonBones.ISlotCacheGenerator","dragonBones.ICacheUser"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}__define;return t.prototype.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},t}();t.Point=e,egret.registerClass(e,"dragonBones.Point")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n}__define;return t}();t.Rectangle=e,egret.registerClass(e,"dragonBones.Rectangle")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}__define;return e.parseDragonBonesData=function(i){if(!i)throw new Error;var n=i[t.ConstValues.A_VERSION];if((n=n.toString()).toString()!=t.DragonBones.DATA_VERSION&&n.toString()!=t.DragonBones.PARENT_COORDINATE_DATA_VERSION&&"2.3"!=n.toString())throw new Error("Nonsupport version!");var r=e.getNumber(i,t.ConstValues.A_FRAME_RATE,0)||0,s=new t.DragonBonesData;s.name=i[t.ConstValues.A_NAME],s.isGlobal="0"!=i[t.ConstValues.A_IS_GLOBAL],e.tempDragonBonesData=s;for(var a=i[t.ConstValues.ARMATURE],o=0,l=a.length;o0&&(c=Math.min(c,r.frameList[r.frameList.length-1].duration)),r.lastFrameDuration=c,r},e.parseSlotTimeline=function(i,n,r){var s=new t.SlotTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.duration=n;for(var a=i[t.ConstValues.FRAME],o=0,l=a.length;o0&&p>0?((r=new t.Rectangle).x=e.getNumber(h,t.ConstValues.A_FRAME_X,0)/n,r.y=e.getNumber(h,t.ConstValues.A_FRAME_Y,0)/n,r.width=f,r.height=p):r=null,s[u]=new t.TextureData(c,r,d)}return s},e.parseDragonBonesData=function(i){if(!i)throw new Error;var n=i[t.ConstValues.A_VERSION];if((n=n.toString()).toString()==t.DragonBones.PARENT_COORDINATE_DATA_VERSION||"2.3"==n.toString())return t.Data3Parser.parseDragonBonesData(i);var r=e.getNumber(i,t.ConstValues.A_FRAME_RATE,0)||0,s=new t.DragonBonesData;s.name=i[t.ConstValues.A_NAME],s.isGlobal="0"!=i[t.ConstValues.A_IS_GLOBAL],e.tempDragonBonesData=s;for(var a=i[t.ConstValues.ARMATURE],o=0,l=a.length;o0&&(u=Math.min(u,f.frameList[f.frameList.length-1].duration)),r.addTimeline(f)}}var p=i[t.ConstValues.SLOT];if(p)for(a=0,o=p.length;a0&&(u=Math.min(u,m.frameList[m.frameList.length-1].duration),r.addSlotTimeline(m))}}return r.frameList.length>0&&(u=Math.min(u,r.frameList[r.frameList.length-1].duration)),r.lastFrameDuration=u,r},e.parseTransformTimeline=function(i,n,r){var s=new t.TransformTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.originPivot.x=e.getNumber(i,t.ConstValues.A_PIVOT_X,0)||0,s.originPivot.y=e.getNumber(i,t.ConstValues.A_PIVOT_Y,0)||0,s.duration=n;for(var a=i[t.ConstValues.FRAME],o=0,l=a.length;oe[0]?1:-1},t.sortBoneDataHelpArrayDescending=function(t,e){return t[0]>e[0]?-1:1},i.setSkinData=function(t){var e=0,i=this._slotDataList.length;for(e=0;e0)n=this._skinDataList[0];else for(e=0,i=this._skinDataList.length;e0)return this._skinDataList[0];for(var e=this._skinDataList.length;e--;)if(this._skinDataList[e].name==t)return this._skinDataList[e];return null},i.getAnimationData=function(t){for(var e=this._animationDataList.length;e--;)if(this._animationDataList[e].name==t)return this._animationDataList[e];return null},i.addBoneData=function(t){if(!t)throw new Error;if(!(this._boneDataList.indexOf(t)<0))throw new Error;this._boneDataList[this._boneDataList.length]=t},i.addSlotData=function(t){if(!t)throw new Error;if(!(this._slotDataList.indexOf(t)<0))throw new Error;this._slotDataList[this._slotDataList.length]=t},i.addSkinData=function(t){if(!t)throw new Error;if(!(this._skinDataList.indexOf(t)<0))throw new Error;this._skinDataList[this._skinDataList.length]=t},i.addAnimationData=function(t){if(!t)throw new Error;this._animationDataList.indexOf(t)<0&&(this._animationDataList[this._animationDataList.length]=t)},i.sortBoneDataList=function(){var e=this._boneDataList.length;if(0!=e){for(var i=[];e--;){for(var n=this._boneDataList[e],r=0,s=n;s;)r++,s=this.getBoneData(s.parent);i[e]=[r,n]}for(i.sort(t.sortBoneDataHelpArray),e=i.length;e--;)this._boneDataList[e]=i[e][1]}},e(i,"boneDataList",function(){return this._boneDataList}),e(i,"slotDataList",function(){return this._slotDataList}),e(i,"skinDataList",function(){return this._skinDataList}),e(i,"animationDataList",function(){return this._animationDataList}),t}();t.ArmatureData=e,egret.registerClass(e,"dragonBones.ArmatureData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.length=0,this.global=new t.DBTransform,this.transform=new t.DBTransform,this.inheritRotation=!0,this.inheritScale=!1}__define;return e.prototype.dispose=function(){this.global=null,this.transform=null},e}();t.BoneData=e,egret.registerClass(e,"dragonBones.BoneData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.alphaMultiplier=1,this.alphaOffset=0,this.blueMultiplier=1,this.blueOffset=0,this.greenMultiplier=1,this.greenOffset=0,this.redMultiplier=1,this.redOffset=0}__define;return t}();t.ColorTransform=e,egret.registerClass(e,"dragonBones.ColorTransform")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._dataChanged=!1,this._pointList=[],this.sampling=new Array(e.SamplingTimes);for(var i=0;i=t){if(0==i)return n.y*t/n.x;var r=this.sampling[i-1];return r.y+(n.y-r.y)*(t-r.x)/(n.x-r.x)}}return n.y+(1-n.y)*(t-n.x)/(1-n.x)},n.refreshSampling=function(){for(var t=0;t=0&&this._armatureDataList.splice(e,1)},i.removeArmatureDataByName=function(t){for(var e=this._armatureDataList.length;e--;)this._armatureDataList[e].name==t&&this._armatureDataList.splice(e,1)},i.getDisplayDataByName=function(t){return this._displayDataDictionary[t]},i.addDisplayData=function(t){this._displayDataDictionary[t.name]=t},i.removeDisplayDataByName=function(t){delete this._displayDataDictionary[t]},i.removeAllDisplayData=function(){for(var t in this._displayDataDictionary)delete this._displayDataDictionary[t]},t}();t.DragonBonesData=e,egret.registerClass(e,"dragonBones.DragonBonesData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.position=0,this.duration=0,this.position=0,this.duration=0}__define;return t.prototype.dispose=function(){},t}();t.Frame=e,egret.registerClass(e,"dragonBones.Frame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._slotDataList=[]}var e=__define,i=t.prototype;return i.dispose=function(){for(var t=this._slotDataList.length;t--;)this._slotDataList[t].dispose();this._slotDataList=null},i.getSlotData=function(t){for(var e=this._slotDataList.length;e--;)if(this._slotDataList[e].name==t)return this._slotDataList[e];return null},i.addSlotData=function(t){if(!t)throw new Error;if(!(this._slotDataList.indexOf(t)<0))throw new Error;this._slotDataList[this._slotDataList.length]=t},e(i,"slotDataList",function(){return this._slotDataList}),t}();t.SkinData=e,egret.registerClass(e,"dragonBones.SkinData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._displayDataList=[],this.zOrder=0}var e=__define,i=t.prototype;return i.dispose=function(){this._displayDataList.length=0},i.addDisplayData=function(t){if(!t)throw new Error;if(!(this._displayDataList.indexOf(t)<0))throw new Error;this._displayDataList[this._displayDataList.length]=t},i.getDisplayData=function(t){for(var e=this._displayDataList.length;e--;)if(this._displayDataList[e].name==t)return this._displayDataList[e];return null},e(i,"displayDataList",function(){return this._displayDataList}),t}();t.SlotData=e,egret.registerClass(e,"dragonBones.SlotData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.displayIndex=0,this.tweenEasing=10,this.displayIndex=0,this.visible=!0,this.zOrder=NaN}__extends(e,t);__define;return e.prototype.dispose=function(){t.prototype.dispose.call(this),this.color=null},e}(t.Frame);t.SlotFrame=e,egret.registerClass(e,"dragonBones.SlotFrame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.offset=0}__extends(e,t);__define;return e.prototype.dispose=function(){t.prototype.dispose.call(this)},e}(t.Timeline);t.SlotTimeline=e,egret.registerClass(e,"dragonBones.SlotTimeline")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.tweenRotate=0,this.displayIndex=0,this.tweenEasing=10,this.tweenRotate=0,this.tweenScale=!0,this.displayIndex=0,this.visible=!0,this.zOrder=NaN,this.global=new t.DBTransform,this.transform=new t.DBTransform,this.pivot=new t.Point,this.scaleOffset=new t.Point}__extends(i,e);__define;return i.prototype.dispose=function(){e.prototype.dispose.call(this),this.global=null,this.transform=null,this.pivot=null,this.scaleOffset=null,this.color=null},i}(t.Frame);t.TransformFrame=e,egret.registerClass(e,"dragonBones.TransformFrame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.originTransform=new t.DBTransform,this.originTransform.scaleX=1,this.originTransform.scaleY=1,this.originPivot=new t.Point,this.offset=0}__extends(i,e);__define;return i.prototype.dispose=function(){e.prototype.dispose.call(this),this.originTransform=null,this.originPivot=null},i}(t.Timeline);t.TransformTimeline=e,egret.registerClass(e,"dragonBones.TransformTimeline")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e,i){this.region=t,this.frame=e,this.rotated=i}__define;return t}();t.TextureData=e,egret.registerClass(e,"dragonBones.TextureData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}__define;return e.cloneColor=function(e){var i=new t.ColorTransform;return i.redMultiplier=e.redMultiplier,i.greenMultiplier=e.greenMultiplier,i.blueMultiplier=e.blueMultiplier,i.alphaMultiplier=e.alphaMultiplier,i.redOffset=e.redOffset,i.greenOffset=e.greenOffset,i.blueOffset=e.blueOffset,i.alphaOffset=e.alphaOffset,i},e.isEqual=function(t,e){return t.alphaOffset==e.alphaOffset&&t.redOffset==e.redOffset&&t.greenOffset==e.greenOffset&&t.blueOffset==e.blueOffset&&t.alphaMultiplier==e.alphaMultiplier&&t.redMultiplier==e.redMultiplier&&t.greenMultiplier==e.greenMultiplier&&t.blueMultiplier==e.blueMultiplier},e.minus=function(t,e,i){i.alphaOffset=t.alphaOffset-e.alphaOffset,i.redOffset=t.redOffset-e.redOffset,i.greenOffset=t.greenOffset-e.greenOffset,i.blueOffset=t.blueOffset-e.blueOffset,i.alphaMultiplier=t.alphaMultiplier-e.alphaMultiplier,i.redMultiplier=t.redMultiplier-e.redMultiplier,i.greenMultiplier=t.greenMultiplier-e.greenMultiplier,i.blueMultiplier=t.blueMultiplier-e.blueMultiplier},e.originalColor=new t.ColorTransform,e}();t.ColorTransformUtil=e,egret.registerClass(e,"dragonBones.ColorTransformUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){}__define;return t.ANGLE_TO_RADIAN=Math.PI/180,t.RADIAN_TO_ANGLE=180/Math.PI,t.DRAGON_BONES="dragonBones",t.ARMATURE="armature",t.SKIN="skin",t.BONE="bone",t.SLOT="slot",t.DISPLAY="display",t.ANIMATION="animation",t.TIMELINE="timeline",t.FRAME="frame",t.TRANSFORM="transform",t.COLOR_TRANSFORM="colorTransform",t.COLOR="color",t.RECTANGLE="rectangle",t.ELLIPSE="ellipse",t.TEXTURE_ATLAS="TextureAtlas",t.SUB_TEXTURE="SubTexture",t.A_ROTATED="rotated",t.A_FRAME_X="frameX",t.A_FRAME_Y="frameY",t.A_FRAME_WIDTH="frameWidth",t.A_FRAME_HEIGHT="frameHeight",t.A_VERSION="version",t.A_IMAGE_PATH="imagePath",t.A_FRAME_RATE="frameRate",t.A_NAME="name",t.A_IS_GLOBAL="isGlobal",t.A_PARENT="parent",t.A_LENGTH="length",t.A_TYPE="type",t.A_FADE_IN_TIME="fadeInTime",t.A_DURATION="duration",t.A_SCALE="scale",t.A_OFFSET="offset",t.A_LOOP="loop",t.A_PLAY_TIMES="playTimes",t.A_EVENT="event",t.A_EVENT_PARAMETERS="eventParameters",t.A_SOUND="sound",t.A_ACTION="action",t.A_HIDE="hide",t.A_AUTO_TWEEN="autoTween",t.A_TWEEN_EASING="tweenEasing",t.A_TWEEN_ROTATE="tweenRotate",t.A_TWEEN_SCALE="tweenScale",t.A_DISPLAY_INDEX="displayIndex",t.A_Z_ORDER="z",t.A_BLENDMODE="blendMode",t.A_WIDTH="width",t.A_HEIGHT="height",t.A_INHERIT_SCALE="inheritScale",t.A_INHERIT_ROTATION="inheritRotation",t.A_X="x",t.A_Y="y",t.A_SKEW_X="skX",t.A_SKEW_Y="skY",t.A_SCALE_X="scX",t.A_SCALE_Y="scY",t.A_PIVOT_X="pX",t.A_PIVOT_Y="pY",t.A_ALPHA_OFFSET="aO",t.A_RED_OFFSET="rO",t.A_GREEN_OFFSET="gO",t.A_BLUE_OFFSET="bO",t.A_ALPHA_MULTIPLIER="aM",t.A_RED_MULTIPLIER="rM",t.A_GREEN_MULTIPLIER="gM",t.A_BLUE_MULTIPLIER="bM",t.A_CURVE="curve",t.A_SCALE_X_OFFSET="scXOffset",t.A_SCALE_Y_OFFSET="scYOffset",t.A_SCALE_MODE="scaleMode",t.A_FIXED_ROTATION="fixedRotation",t}();t.ConstValues=e,egret.registerClass(e,"dragonBones.ConstValues")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}__define;return e.transformArmatureData=function(e){for(var i=e.boneDataList,n=i.length;n--;){var r=i[n];if(r.parent){var s=e.getBoneData(r.parent);s&&(r.transform.copy(r.global),t.TransformUtil.globalToLocal(r.transform,s.global))}}},e.transformArmatureDataAnimations=function(t){for(var i=t.animationDataList,n=i.length;n--;)e.transformAnimationData(i[n],t,!1)},e.transformRelativeAnimationData=function(t,e){},e.transformAnimationData=function(i,n,r){if(r){var s,a=n.getSkinData(null),o=n.boneDataList;a&&(s=a.slotDataList);for(var l=0;l0?(b<0&&(y.transform.skewX+=2*Math.PI,y.transform.skewY+=2*Math.PI),g.tweenRotate>1&&(y.transform.skewX+=2*Math.PI*(g.tweenRotate-1),y.transform.skewY+=2*Math.PI*(g.tweenRotate-1))):(b>0&&(y.transform.skewX-=2*Math.PI,y.transform.skewY-=2*Math.PI),g.tweenRotate<1&&(y.transform.skewX+=2*Math.PI*(g.tweenRotate+1),y.transform.skewY+=2*Math.PI*(g.tweenRotate+1))):(y.transform.skewX=g.transform.skewX+t.TransformUtil.formatRadian(y.transform.skewX-g.transform.skewX),y.transform.skewY=g.transform.skewY+t.TransformUtil.formatRadian(y.transform.skewY-g.transform.skewY))}g=y}if(c&&m){v=m.length;for(f=0;f=0,f.scaleY*u.scaleY>=0)):(u=new t.DBTransform).copy(f),t.TransformUtil.transformToMatrix(u,d,!0);t.TransformUtil.globalToLocal(s.transform,u)}}},e.getTimelineTransform=function(e,i,n,r){for(var s=e.frameList,a=s.length;a--;){var o=s[a];if(o.position<=i&&o.position+o.duration>i){if(a==s.length-1||i==o.position)n.copy(r?o.global:o.transform);else{var l=o.tweenEasing,h=(i-o.position)/o.duration;l&&10!=l&&(h=t.MathUtil.getEaseValue(h,l));var u=s[a+1],c=r?o.global:o.transform,d=r?u.global:u.transform;n.x=c.x+(d.x-c.x)*h,n.y=c.y+(d.y-c.y)*h,n.skewX=t.TransformUtil.formatRadian(c.skewX+(d.skewX-c.skewX)*h),n.skewY=t.TransformUtil.formatRadian(c.skewY+(d.skewY-c.skewY)*h),n.scaleX=c.scaleX+(d.scaleX-c.scaleX)*h,n.scaleY=c.scaleY+(d.scaleY-c.scaleY)*h}break}}},e.addHideTimeline=function(t,e,i){void 0===i&&(i=!1);for(var n=e.boneDataList,r=e.slotDataList,s=n.length;s--;){var a=n[s].name;t.getTimeline(a)||t.hideTimelineNameMap.indexOf(a)<0&&t.hideTimelineNameMap.push(a)}if(i){s=r.length;for(var o;s--;)o=r[s].name,t.getSlotTimeline(o)||t.hideSlotTimelineNameMap.indexOf(o)<0&&t.hideSlotTimelineNameMap.push(o)}},e}();t.DBDataUtil=e,egret.registerClass(e,"dragonBones.DBDataUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){}__define;return t.getEaseValue=function(e,i){var n=1;return i>1?(n=.5*(1-t.cos(e*Math.PI)),i-=1):i>0?n=1-Math.pow(1-e,2):i<0&&(i*=-1,n=Math.pow(e,2)),(n-e)*i+e},t.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.sin=function(e){e*=t.RADIAN_TO_ANGLE;var i=Math.floor(e),n=i+1,r=t.sinInt(i);return(e-i)*t.sinInt(n)+(n-e)*r},t.sinInt=function(t){return(t%=360)<0&&(t+=360),t<90?db_sin_map[t]:t<180?db_sin_map[180-t]:t<270?-db_sin_map[t-180]:-db_sin_map[360-t]},t.cos=function(e){return t.sin(Math.PI/2-e)},t.ANGLE_TO_RADIAN=Math.PI/180,t.RADIAN_TO_ANGLE=180/Math.PI,t}();t.MathUtil=e,egret.registerClass(e,"dragonBones.MathUtil")}(dragonBones||(dragonBones={}));for(var db_sin_map={},dbMathIndex=0;dbMathIndex<=90;dbMathIndex++)db_sin_map[dbMathIndex]=Math.sin(dbMathIndex*dragonBones.MathUtil.ANGLE_TO_RADIAN);var dragonBones;!function(t){var e=function(){function e(){}__define;return e.globalToLocal=function(t,i){e.transformToMatrix(t,e._helpTransformMatrix,!0),e.transformToMatrix(i,e._helpParentTransformMatrix,!0),e._helpParentTransformMatrix.invert(),e._helpTransformMatrix.concat(e._helpParentTransformMatrix),e.matrixToTransform(e._helpTransformMatrix,t,t.scaleX*i.scaleX>=0,t.scaleY*i.scaleY>=0)},e.transformToMatrix=function(e,i,n){void 0===n&&(n=!1),n?(i.a=e.scaleX*t.MathUtil.cos(e.skewY),i.b=e.scaleX*t.MathUtil.sin(e.skewY),i.c=-e.scaleY*t.MathUtil.sin(e.skewX),i.d=e.scaleY*t.MathUtil.cos(e.skewX),i.tx=e.x,i.ty=e.y):(i.a=t.MathUtil.cos(e.skewY),i.b=t.MathUtil.sin(e.skewY),i.c=-t.MathUtil.sin(e.skewX),i.d=t.MathUtil.cos(e.skewX),i.tx=e.x,i.ty=e.y)},e.matrixToTransform=function(t,e,i,n){e.x=t.tx,e.y=t.ty,e.scaleX=Math.sqrt(t.a*t.a+t.b*t.b)*(i?1:-1),e.scaleY=Math.sqrt(t.d*t.d+t.c*t.c)*(n?1:-1);var r=[];r[0]=Math.acos(t.d/e.scaleY),r[1]=-r[0],r[2]=Math.asin(-t.c/e.scaleY),r[3]=r[2]>=0?Math.PI-r[2]:r[2]-Math.PI,Number(r[0]).toFixed(4)==Number(r[2]).toFixed(4)||Number(r[0]).toFixed(4)==Number(r[3]).toFixed(4)?e.skewX=r[0]:e.skewX=r[1];var s=[];s[0]=Math.acos(t.a/e.scaleX),s[1]=-s[0],s[2]=Math.asin(t.b/e.scaleX),s[3]=s[2]>=0?Math.PI-s[2]:s[2]-Math.PI,Number(s[0]).toFixed(4)==Number(s[2]).toFixed(4)||Number(s[0]).toFixed(4)==Number(s[3]).toFixed(4)?e.skewY=s[0]:e.skewY=s[1]},e.formatRadian=function(t){return t>Math.PI&&(t-=e.DOUBLE_PI),t<-Math.PI&&(t+=e.DOUBLE_PI),t},e.normalizeRotation=function(t){return t=(t+Math.PI)%(2*Math.PI),(t=t>0?t:2*Math.PI+t)-Math.PI},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._helpTransformMatrix=new t.Matrix,e._helpParentTransformMatrix=new t.Matrix,e}();t.TransformUtil=e,egret.registerClass(e,"dragonBones.TransformUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(e){this.animationState=new t.FastAnimationState,this._armature=e,this.animationState._armature=e,this.animationList=[],this._animationDataObj={},this._isPlaying=!1,this._timeScale=1}var i=__define,n=e.prototype;return n.dispose=function(){this._armature&&(this._armature=null,this._animationDataList=null,this.animationList=null,this.animationState=null)},n.gotoAndPlay=function(t,e,i,n){if(void 0===e&&(e=-1),void 0===i&&(i=-1),void 0===n&&(n=NaN),!this._animationDataList)return null;var r=this._animationDataObj[t];if(!r)return null;this._isPlaying=!0,e=e<0?r.fadeTime<0?.3:r.fadeTime:e;var s;s=i<0?r.scale<0?1:r.scale:1e3*i/r.duration,n=isNaN(n)?r.playTimes:n,this.animationState._fadeIn(r,n,1/s,e),this._armature.enableCache&&this.animationCacheManager&&(this.animationState.animationCache=this.animationCacheManager.getAnimationCache(t));for(var a=this._armature.slotHasChildArmatureList.length;a--;){var o=this._armature.slotHasChildArmatureList[a].childArmature;o&&o.getAnimation().gotoAndPlay(t)}return this.animationState},n.gotoAndStop=function(t,e,i,n,r){return void 0===i&&(i=-1),void 0===n&&(n=0),void 0===r&&(r=-1),this.animationState.name!=t&&this.gotoAndPlay(t,n,r),i>=0?this.animationState.setCurrentTime(this.animationState.totalTime*i):this.animationState.setCurrentTime(e),this.animationState.stop(),this.animationState},n.play=function(){this._animationDataList&&(this.animationState.name?this._isPlaying?this.gotoAndPlay(this.animationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))},n.stop=function(){this._isPlaying=!1},n.advanceTime=function(t){this._isPlaying&&this.animationState._advanceTime(t*this._timeScale)},n.hasAnimation=function(t){return null!=this._animationDataObj[t]},i(n,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(n,"animationDataList",function(){return this._animationDataList},function(t){this._animationDataList=t,this.animationList.length=0;for(var e=this._animationDataList.length,i=0;i0,this._isPlaying=!0,this._armature.enableCache&&this.animationCache&&this._fading&&this._boneTimelineStateList&&this.updateTransformTimeline(this.progress),this._time=0,this._progress=0,this._updateTimelineStateList(),this.hideBones()},n._updateTimelineStateList=function(){this._resetTimelineStateList();for(var e,i=this.animationData.timelineList.length,n=0;n0){var c=t.FastSlotTimelineState.borrowObject();c.fadeIn(u,this,h),this._slotTimelineStateList.push(c)}}},n._advanceTime=function(t){if(t*=this._timeScale,this._fading&&(this._time+=t,this._progress=this._time/this._fadeTotalTime,this._progress>=1&&(this._progress=0,this._time=0,this._fading=!1)),this._fading){for(var e=this._boneTimelineStateList.length,i=0;i0&&a>1&&(n=!0),this._currentPlayTimes=a),this._currentTime<0&&(i=!0),this._isComplete&&(r=!0),this._lastTime=this._currentTime,this._currentTime=o,this.updateMainTimeline(s));var l;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&((l=new t.AnimationEvent(t.AnimationEvent.START)).animationState=this,this._armature._addEvent(l)),r?this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&((l=new t.AnimationEvent(t.AnimationEvent.COMPLETE)).animationState=this,this._armature._addEvent(l)):n&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&((l=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE)).animationState=this,this._armature._addEvent(l))},n.updateTransformTimeline=function(t){var e,i,n=this._boneTimelineStateList.length;if(this._isComplete){for(;n--;)(e=this._boneTimelineStateList[n]).update(t),this._isComplete=e._isComplete&&this._isComplete;for(n=this._slotTimelineStateList.length;n--;)(i=this._slotTimelineStateList[n]).update(t),this._isComplete=i._isComplete&&this._isComplete}else{for(;n--;)(e=this._boneTimelineStateList[n]).update(t);for(n=this._slotTimelineStateList.length;n--;)(i=this._slotTimelineStateList[n]).update(t)}},n.updateMainTimeline=function(t){var e=this.animationData.frameList;if(e.length>0){for(var i,n,r=0,s=this.animationData.frameList.length;r=this._currentFramePosition+this._currentFrameDuration||this._currentTime=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}n=e[this._currentFrameIndex],i&&this._armature.arriveAtFrame(i,this),this._currentFrameDuration=n.duration,this._currentFramePosition=n.position,i=n}n&&this._armature.arriveAtFrame(n,this)}},n.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},n.setPlayTimes=function(t){return void 0===t&&(t=0),Math.round(.001*this._totalTime*this.animationData.frameRate)<2?this._playTimes=1:this._playTimes=t,this},i(n,"playTimes",function(){return this._playTimes}),i(n,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(n,"isComplete",function(){return this._isComplete}),i(n,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(n,"totalTime",function(){return.001*this._totalTime}),i(n,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),n.isUseCache=function(){return this._armature.enableCache&&this.animationCache&&!this._fading},n.hideBones=function(){for(var t=this.animationData.hideTimelineNameMap.length,e=0;e0){this._bone._timelineState?this._transformToFadein.copy(this._bone._timelineState._transform):this._transformToFadein=new t.DBTransform;var r=this._timelineData.frameList[0];this._durationTransform.copy(r.transform),this._durationTransform.minus(this._transformToFadein)}this._bone._timelineState=this},i.updateFade=function(t){this._transform.x=this._transformToFadein.x+this._durationTransform.x*t,this._transform.y=this._transformToFadein.y+this._durationTransform.y*t,this._transform.scaleX=this._transformToFadein.scaleX*(1+(this._durationTransform.scaleX-1)*t),this._transform.scaleY=this._transformToFadein.scaleX*(1+(this._durationTransform.scaleY-1)*t),this._transform.rotation=this._transformToFadein.rotation+this._durationTransform.rotation*t,this._bone.invalidUpdate()},i.update=function(t){1==this._updateMode?(this._updateMode=0,this.updateSingleFrame()):-1==this._updateMode&&this.updateMultipleFrame(t)},i.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._bone.arriveAtFrame(t,this._animationState),this._isComplete=!0,this._tweenEasing=NaN,this._tweenTransform=!1,this._pivot.x=this._originPivot.x+t.pivot.x,this._pivot.y=this._originPivot.y+t.pivot.y,this._transform.copy(t.transform),this._bone.invalidUpdate()},i.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,n=this._animationState.playTimes;if(0==n)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,(i-=Math.floor(i/this._totalTime)*this._totalTime)<0&&(i+=this._totalTime);else{var r=n*this._totalTime;i>=r?(i=r,this._isComplete=!0):i<=-r?(i=-r,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=r),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=Math.floor(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._lastTime=this._currentTime,this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l=this._currentFramePosition+this._currentFrameDuration||this._currentTime=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._bone.arriveAtFrame(s,this._animationState),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._bone.arriveAtFrame(a,this._animationState),this.updateToNextFrame(e)),this._tweenTransform&&this.updateTween()}},i.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var n=this._timelineData.frameList[this._currentFrameIndex],r=this._timelineData.frameList[i],s=!1;0==i&&this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.animationData.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=r.transform.x-n.transform.x,this._durationTransform.y=r.transform.y-n.transform.y,this._durationTransform.skewX=r.transform.skewX-n.transform.skewX,this._durationTransform.skewY=r.transform.skewY-n.transform.skewY,this._durationTransform.scaleX=r.transform.scaleX-n.transform.scaleX+r.scaleOffset.x,this._durationTransform.scaleY=r.transform.scaleY-n.transform.scaleY+r.scaleOffset.y,this._durationPivot.x=r.pivot.x-n.pivot.x,this._durationPivot.y=r.pivot.y-n.pivot.y,this._durationTransform.normalizeRotation(),0==i&&(this._durationTransform.skewX=t.TransformUtil.formatRadian(this._durationTransform.skewX),this._durationTransform.skewY=t.TransformUtil.formatRadian(this._durationTransform.skewY)),this._durationTransform.x||this._durationTransform.y||this._durationTransform.skewX||this._durationTransform.skewY||1!=this._durationTransform.scaleX||1!=this._durationTransform.scaleY||this._durationPivot.x||this._durationPivot.y?this._tweenTransform=!0:this._tweenTransform=!1):this._tweenTransform=!1,this._tweenTransform||(this._transform.copy(n.transform),this._pivot.x=this._originPivot.x+n.pivot.x,this._pivot.y=this._originPivot.y+n.pivot.y,this._bone.invalidUpdate())},i.updateTween=function(){var e=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;this._tweenCurve?e=this._tweenCurve.getValueByProgress(e):this._tweenEasing&&(e=t.MathUtil.getEaseValue(e,this._tweenEasing));var i=this._timelineData.frameList[this._currentFrameIndex],n=i.transform,r=i.pivot;this._transform.x=n.x+this._durationTransform.x*e,this._transform.y=n.y+this._durationTransform.y*e,this._transform.skewX=n.skewX+this._durationTransform.skewX*e,this._transform.skewY=n.skewY+this._durationTransform.skewY*e,this._transform.scaleX=n.scaleX+this._durationTransform.scaleX*e,this._transform.scaleY=n.scaleY+this._durationTransform.scaleY*e,this._pivot.x=r.x+this._durationPivot.x*e,this._pivot.y=r.y+this._durationPivot.y*e,this._bone.invalidUpdate()},e._pool=[],e}();t.FastBoneTimelineState=e,egret.registerClass(e,"dragonBones.FastBoneTimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._durationColor=new t.ColorTransform}__define;var i=e.prototype;return e.borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e.returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e.clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},i.clear=function(){this._slot=null,this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null},i.fadeIn=function(t,e,i){switch(this._slot=t,this._armature=this._slot.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this.name=i.name,this._totalTime=this._timelineData.duration,this._isComplete=!1,this._blendEnabled=!1,this._tweenColor=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}},i.updateFade=function(t){},i.update=function(t){-1==this._updateMode?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},i.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,n=this._animationState.playTimes;if(0==n)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,(i-=Math.floor(i/this._totalTime)*this._totalTime)<0&&(i+=this._totalTime);else{var r=n*this._totalTime;i>=r?(i=r,this._isComplete=!0):i<=-r?(i=-r,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=r),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=Math.floor(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l=this._currentFramePosition+this._currentFrameDuration))break;if(++this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._slot._arriveAtFrame(s,this._animationState),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._slot._arriveAtFrame(a,this._animationState),this._blendEnabled=a.displayIndex>=0,this._blendEnabled?this.updateToNextFrame(e):(this._tweenEasing=NaN,this._tweenColor=!1)),this._blendEnabled&&this.updateTween()}},i.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var n=this._timelineData.frameList[this._currentFrameIndex],r=this._timelineData.frameList[i],s=!1;if(0==i&&this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999?(this._tweenEasing=NaN,s=!1):n.displayIndex<0||r.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.animationData.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=n.tweenEasing,this._tweenCurve=n.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s&&(n.color||r.color)?(t.ColorTransformUtil.minus(r.color||t.ColorTransformUtil.originalColor,n.color||t.ColorTransformUtil.originalColor,this._durationColor),this._tweenColor=0!=this._durationColor.alphaOffset||0!=this._durationColor.redOffset||0!=this._durationColor.greenOffset||0!=this._durationColor.blueOffset||0!=this._durationColor.alphaMultiplier||0!=this._durationColor.redMultiplier||0!=this._durationColor.greenMultiplier||0!=this._durationColor.blueMultiplier):this._tweenColor=!1,!this._tweenColor){var a,o;n.color?(a=n.color,o=!0):(a=t.ColorTransformUtil.originalColor,o=!1),(this._slot._isColorChanged||o)&&(t.ColorTransformUtil.isEqual(this._slot._colorTransform,a)||this._slot._updateDisplayColor(a.alphaOffset,a.redOffset,a.greenOffset,a.blueOffset,a.alphaMultiplier,a.redMultiplier,a.greenMultiplier,a.blueMultiplier,o))}},i.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenColor){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing)),e.color?this._slot._updateDisplayColor(e.color.alphaOffset+this._durationColor.alphaOffset*i,e.color.redOffset+this._durationColor.redOffset*i,e.color.greenOffset+this._durationColor.greenOffset*i,e.color.blueOffset+this._durationColor.blueOffset*i,e.color.alphaMultiplier+this._durationColor.alphaMultiplier*i,e.color.redMultiplier+this._durationColor.redMultiplier*i,e.color.greenMultiplier+this._durationColor.greenMultiplier*i,e.color.blueMultiplier+this._durationColor.blueMultiplier*i,!0):this._slot._updateDisplayColor(this._durationColor.alphaOffset*i,this._durationColor.redOffset*i,this._durationColor.greenOffset*i,this._durationColor.blueOffset*i,this._durationColor.alphaMultiplier*i+1,this._durationColor.redMultiplier*i+1,this._durationColor.greenMultiplier*i+1,this._durationColor.blueMultiplier*i+1,!0)}},i.updateSingleFrame=function(){var e=this._timelineData.frameList[0];if(this._slot._arriveAtFrame(e,this._animationState),this._isComplete=!0,this._tweenEasing=NaN,this._tweenColor=!1,this._blendEnabled=e.displayIndex>=0,this._blendEnabled){var i,n;e.color?(i=e.color,n=!0):(i=t.ColorTransformUtil.originalColor,n=!1),(this._slot._isColorChanged||n)&&(t.ColorTransformUtil.isEqual(this._slot._colorTransform,i)||this._slot._updateDisplayColor(i.alphaOffset,i.redOffset,i.greenOffset,i.blueOffset,i.alphaMultiplier,i.redMultiplier,i.greenMultiplier,i.blueMultiplier,n))}},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.FastSlotTimelineState=e,egret.registerClass(e,"dragonBones.FastSlotTimelineState")}(dragonBones||(dragonBones={})),function(){var t=dragonBones.DataParser,e=dragonBones.TextureData,i=function(t,e,i){this._textureDatas={},this.scale=i||1,this.texture=t,this.name=e.name,this.parseData(e)};i.rotatedDic={},i.prototype={constructor:i,getTexture:function(t){var e=this._textureDatas[t];return e&&(e.texture=this.texture,e.rotated&&(i.rotatedDic[t]=1)),e},dispose:function(){this.texture=null,this._textureDatas={}},getRegion:function(t){var i=this._textureDatas[t];return i&&i instanceof e?i.region:null},getFrame:function(t){var i=this._textureDatas[t];return i&&i instanceof e?i.frame:null},parseData:function(e){this._textureDatas=t.parseTextureAtlasData(e,this.scale)}},dragonBones.TextureAtlas=i}(),function(t){Math.PI;var e=dragonBones.TextureAtlas,i=function(){t.call(this,this),this._display=null};__extends(i,t,{dispose:function(){if(this._displayList)for(var e=this._displayList.length,i=0;i=0&&this._displayDataList[this._currentDisplayIndex]&&1==e.rotatedDic[this._displayDataList[this._currentDisplayIndex].name]&&(this._global.skewX-=1.57,this._global.skewY-=1.57)}}),dragonBones.PixiSlot=i}(dragonBones.Slot),function(t){var e=dragonBones.Armature,i=dragonBones.PixiSlot,n=function(){t.call(this,this)};__extends(n,t,{_generateArmature:function(){return new e(new PIXI.Container)},_generateSlot:function(){return new i},_generateDisplay:function(t,e,i,n){var r=t.getTexture(e),s=r.region;this._textureCache=this._textureCache||{},this._textureCache[t.texture.src]||(this._textureCache[t.texture.src]=new PIXI.BaseTexture(t.texture));var a=new PIXI.Texture(this._textureCache[t.texture.src],new PIXI.Rectangle(s.x,s.y,s.width,s.height)),o=new PIXI.Sprite(a);if(isNaN(i)||isNaN(n)){var l=t.getFrame(e);null!=l?(i=l.width/2,n=l.height/2):(i=r.region.width/2,n=r.region.height/2)}return o.pivot.x=i,o.pivot.y=n,o}}),dragonBones.PixiFactory=n}(dragonBones.BaseFactory),(EHDI=EHDI||Object.create(null)).aka={AutoDetectRenderer:PIXI.autoDetectRenderer,CanvasRenderer:PIXI.CanvasRenderer,GLRenderer:PIXI.WebGLRenderer,AbstractFilter:PIXI.Filter,Container:PIXI.Container,Sprite:PIXI.Sprite,AnimatedSprite:PIXI.extras.AnimatedSprite,PixiText:PIXI.Text,PixiFilters:PIXI.filters,TextureCache:PIXI.utils.TextureCache,Loader:PIXI.loader,Graphics:PIXI.Graphics,Ticker:PIXI.ticker,Rectangle:PIXI.Rectangle,TilingSprite:PIXI.extras.TilingSprite},EHDI.config={isTransition:!1},Object.defineProperties(PIXI.DisplayObject.prototype,{pivotX:{get:function(){return this.pivot.x},set:function(t){this.pivot.x=t}},pivotY:{get:function(){return this.pivot.y},set:function(t){this.pivot.y=t}},scaleX:{get:function(){return this.scale.x},set:function(t){this.scale.x=t}},scaleY:{get:function(){return this.scale.y},set:function(t){this.scale.y=t}}}),(EHDI=EHDI||Object.create(null)).displays=EHDI.displays||Object.create(null),EHDI.displays.Button=function(t){this.pointerUp=t,this.pointerDown=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1],this.mouseOver=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],this.disabledTexture=arguments.length<=3||void 0===arguments[3]?void 0:arguments[3],this.scaleOnPointerDown=arguments.length<=4||void 0===arguments[4]?void 0:arguments[4];var e=!1;this.onClickFunction=null,this.baseScale={x:1,y:1},PIXI.Sprite.call(this,t),this.sfx=null,this.isDisabled=function(){return e},this.setDisabled=function(t){e=t},this.interactive=!0,this.anchor.x=.5,this.anchor.y=.5,this.hitArea=new PIXI.Rectangle(.5*-this.width,.5*-this.height,this.width,this.height)},EHDI.displays.Button.prototype=Object.create(EHDI.aka.Sprite.prototype),EHDI.displays.Button.prototype.touchstart=function(t){!0!==this.isDisabled()&&(this.isTouched=!0,this.touchID=t.data.identifier,this.pointerDown&&(this.texture=this.pointerDown),this.customScale?(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.customScale.x,this.scale.y=this.customScale.y):this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown))},EHDI.displays.Button.prototype.touchend=function(t){!0!==this.isDisabled()&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.touchendoutside=function(t){this.touchID===t.data.identifier&&!0!==this.isDisabled()&&(this.pointerUp&&(this.texture=this.pointerUp),(this.customScale||this.scaleOnPointerDown)&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y),this.isTouched=!1)},EHDI.displays.Button.prototype.tap=function(t){!0!==this.isDisabled()&&!0!==EHDI.config.isTransition&&(this.onClickFunction&&this.isTouched&&this.onClickFunction.apply(null,this.onClickArgs),this.isTouched=!1)},EHDI.displays.Button.prototype.mouseover=function(t){!0!==this.isDisabled()&&this.mouseOver&&(this.texture=this.mouseOver)},EHDI.displays.Button.prototype.mouseout=function(t){!0!==this.isDisabled()&&(this.pointerUp&&(this.texture=this.pointerUp),(this.customScale||this.scaleOnPointerDown)&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.mousedown=function(t){!0!==this.isDisabled()&&(this.pointerDown&&(this.texture=this.pointerDown),this.customScale?(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.customScale.x,this.scale.y=this.customScale.y):this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown))},EHDI.displays.Button.prototype.mouseup=function(t){!0!==this.isDisabled()&&(this.pointerUp&&(this.texture=this.pointerUp),(this.customScale||this.scaleOnPointerDown)&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.click=function(t){!0!==this.isDisabled()&&!0!==EHDI.config.isTransition&&this.onClickFunction&&this.onClickFunction.apply(null,this.onClickArgs)},EHDI.displays.Button.prototype.mouseupoutside=function(t){!0!==this.isDisabled()&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.disable=function(t){this.setDisabled(t),this.disabledTexture&&t?(this.texture=this.disabledTexture,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)):this.pointerUp&&!t&&(this.texture=this.pointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.defaultSFX=null,EHDI.displays.Button.prototype.setSFX=function(t){this.sfx=t},EHDI.displays.Button.prototype.setOnClickFunction=function(t){this.onClickFunction=t,this.onClickArgs=arguments.length<=1||void 0===arguments[1]?[]:arguments[1]},EHDI.displays.Button.prototype.destroy=function(){delete this.pointerUp,delete this.pointerDown,delete this.mouseOver,delete this.disabledTexture,delete this.onClickFunction,delete this.baseScale,EHDI.aka.Sprite.prototype.destroy.apply(this,arguments)},EHDI.displays.Button.prototype.dispose=function(){delete this.pointerUp,delete this.pointerDown,delete this.mouseOver,delete this.disabledTexture,delete this.onClickFunction,delete this.baseScale,this.destroy({children:!0})},(EHDI=EHDI||Object.create(null)).displays=EHDI.displays||Object.create(null),EHDI.displays.TextSprite=function(t){EHDI.aka.PixiText.call(this,t.TEXT,t.STYLE)},EHDI.displays.TextSprite.prototype=Object.create(EHDI.aka.PixiText.prototype),(EHDI=EHDI||Object.create(null)).displays=EHDI.displays||Object.create(null),EHDI.displays.TextureRectangle=function(t,e,i){var n=new PIXI.Graphics;n._sprite=null,n._width=e,n._height=i,n._color=t;!function(t,e,i){n.clear(),n.beginFill(i),n.drawRect(0,0,t,e),n.endFill()}(n._width,n._height,n._color);var r=n.generateCanvasTexture(1);return n.destroy(),r},EHDI.displays.TextureCircle=function(t,e){var i=new PIXI.Graphics;i._sprite=null,i._radius=e,i._color=t;return function(t,e){i.clear(),i.beginFill(e),i.drawCircle(t,t,t),i.endFill()}(i._radius,i._color),i.generateCanvasTexture(1)},(EHDI=EHDI||Object.create(null)).displays=EHDI.displays||Object.create(null),EHDI.displays.ToggleButton=function(t,e,i,n){this.active=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],this.scaleOnPointerDown=arguments.length<=5||void 0===arguments[5]?1:arguments[5],this.baseScale={x:1,y:1},this.inactivePointerUp=t,this.inactivePointerDown=e,this.activePointerUp=i,this.activePointerDown=n,this.onClickFunction=null,!1===this.active?PIXI.Sprite.call(this,t):PIXI.Sprite.call(this,i),this.interactive=!0,this.anchor.x=.5,this.anchor.y=.5},EHDI.displays.ToggleButton.prototype=Object.create(PIXI.Sprite.prototype),EHDI.displays.ToggleButton.prototype.touchstart=function(t){!1===this.active?this.texture=this.inactivePointerDown:this.texture=this.activePointerDown,this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown)},EHDI.displays.ToggleButton.prototype.touchend=function(t){!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.touchendoutside=function(t){!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.tap=function(t){this.active=!this.active,!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y),this.onClickFunction&&this.onClickFunction(this.active)},EHDI.displays.ToggleButton.prototype.mouseout=function(t){!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.mousedown=function(t){!1===this.active?this.texture=this.inactivePointerDown:this.texture=this.activePointerDown,this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown)},EHDI.displays.ToggleButton.prototype.mouseup=function(t){!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.click=function(t){this.active=!this.active,!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y),this.onClickFunction&&this.onClickFunction(this.active)},EHDI.displays.ToggleButton.prototype.mouseupoutside=function(t){!1===this.active?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.Button.prototype.destroy=function(){delete this.pointerUp,delete this.pointerDown,delete this.mouseOver,delete this.disabledTexture,delete this.onClickFunction,delete this.baseScale,EHDI.aka.Sprite.prototype.destroy.apply(this,arguments)},EHDI.displays.ToggleButton.prototype.dispose=function(){delete this.inactivePointerUp,delete this.inactivePointerDown,delete this.activePointerUp,delete this.activePointerDown,delete this.onClickFunction,delete this.baseScale,this.destroy({children:!0})},EHDI.displays.ToggleButton.prototype.setOnClickFunction=function(t){this.onClickFunction=t},(EHDI=EHDI||Object.create(null)).CameraManager=function(t){var e,i=!1,n=t,r=null,s=!1,a=function(t,e){switch(t){case 3:e.rotation=Math.PI,e.position.set(e.width,e.height);break;case 6:e.rotation=.5*Math.PI,e.position.set(e.height,0);break;case 8:e.rotation=-.5*Math.PI,e.position.set(0,e.width)}},o=function(t){var e=document.getElementById("photo");e.click(),e.onchange=function(i){var n,r=i.target.files;if(r&&r.length>0){n=r[0];var s=function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var e=atob(t),i=e.length,n=new Uint8Array(i),r=0;r-1&&this.callbacks.splice(e,1)},EHDI.Event.prototype.clearCallbacks=function(){this.callbacks.length=0},EHDI.EventManager=function(){"use strict";"use restrict";var t=Object.create(null),e=Object.create(null),i=10;return Object.defineProperty(t,"maxListeners",{set:function(t){"number"==typeof t&&(i=t)},get:function(){return i}}),t.register=function(t){var i=new EHDI.Event(t);e[t]=i},t.unregister=function(t){if(!(t in e))throw new Error("event not found");e[t].clearCallbacks(),delete e[t]},t.dispatch=function(t,i){if(!(t in e))throw new Error("event is unregistered");for(var n=e[t].callbacks,r=0,s=n.length;r=i)throw new Error("max amount of listeners limit reached, maxListener: "+i);e[t].registerCallback(n)},t.removeListener=function(t,i){if(!(t in e))throw new Error("event is unregistered");e[t].callbacks.indexOf(i),e[t].unregisterCallback(i)},t},(EHDI=EHDI||Object.create(null)).JSONManager=function(t,e){"use strict";"use restrict";var i=t,n=e;return{setConfigData:function(t){void 0===i&&(i=t)},setLocaleData:function(t){void 0===n&&(n=t)},getLocale:function(t){return arguments.length<1?n.data:n.data[t]},getConfig:function(){return i}}},function(){"use strict";"use restrict";(EHDI=EHDI||Object.create(null)).Assets={images:EHDI.aka.TextureCache,fonts:[]},EHDI.LoadManager=function(){var t,e,i=["json","js","xml","txt"],n=["ogg","mp3","wav"],r=["ttf","woff","woff2","otf"],s=Object.create(null),a=[],o=[],l=[],h=null,u=[],c=!1,d=0,f=0,p=0,_=[],m=[],g=0;EHDI.Assets.fetch=function(e){var i=t.getResult(e);return i||(i=EHDI.aka.Loader.resources[e]||null),i};var v=function(){o.length=0,a.length=0,_.length=0,m.length=0},y=function(t,e){return t.filter(function(t){"string"!=typeof t&&(t=t.url);var i=t.split(".").pop();return-1!==e.indexOf(i)})},b=function(t){var e=t.split("/").pop().split("."),i=e[0],n=e[1];"ttf"===n&&(n="truetype"),"otf"===n&&(n="opentype"),"eot"===n&&(n="embedded-opentype");var r=document.createElement("style"),s="@font-face {font-family: '"+i+"'; src: url('"+t+"') format('"+n+"');";r.appendChild(document.createTextNode(s)),document.body.appendChild(r),EHDI.Assets.fonts.push(i)},T=function(t,e){d=f+t.progress*o.length/p},x=function(t,e,i){},E=function(t,e){v(),c=!1,l.length>0&&(l.length=0),"function"==typeof h&&h.apply(null,u)},w=function(t){var e=t.progress>1?1:t.progress;d=e*a.length/p*100,f=d},S=function(t){o.length<=0?E():e.add(o).load(E)},D=function(t){},A=function(e,i,n){var r,a,o,l,h,u,c,d;l=(a=(r=t.getResult(i)).locale).url,h=void 0!==a.lang?a.lang:"en",o=a.id+h,c=void 0===a.font[h]?a.font.default:a.font[h],d=[l+o+".json"],u=function(){e.setConfigData(r),e.setLocaleData(t.getResult(o)),"function"==typeof n&&n()},s.queueStrings(d),s.queueFonts(c),s.start(u)},P=function(){for(var e,i;_.length>0;)i=_.pop(),e=t.getItem(i),t.remove(e.id),"sound"===e.type&&createjs.Sound.removeSound(e.id);for(;m.length>0;)i=m.pop(),(e=EHDI.Assets.images[i]).destroy(!0);a.length>0?t.loadManifest(a):S()};return e=EHDI.aka.Loader,t=new createjs.LoadQueue,createjs.Sound.alternateExtensions=n,Object.defineProperty(EHDI.Assets,"cjAssets",{value:t,enumerable:!1}),t.installPlugin(createjs.Sound),t.addEventListener("progress",w),t.addEventListener("complete",S),t.addEventListener("error",D),e.on("progress",T),e.on("error",x),s.queueStrings=function(t){for(var e,i,n=[];t.length>0;)i=(e=t.pop()).split("/").pop().split(".")[0],n.push({id:i,src:e});a=a.concat(n)},s.queueFonts=function(t){for(var e;t.length>0;)(e=t.pop()).split("/").pop().split(".")[0],l.push(b(e))},s.queueAudios=function(t){for(var e,i,n=[];t.length>0;)"string"!=typeof(e=t.pop())?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],n.push({id:i,src:e});a=a.concat(n)},s.queueImages=function(t){for(var e,i,n=[];t.length>0;)"string"!=typeof(e=t.pop())?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],n.push({name:i,url:e});o=o.concat(n)},s.queueAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},a=y(t,r),o=y(t,n),l=y(t,i),h=e(t,a);h=e(h=e(h,l),o),s.queueFonts(a),s.queueAudios(o),s.queueStrings(l),s.queueImages(h)},s.loadConfig=function(t,e,i){if("string"!=typeof t)throw new Error("Invalid URL");if(void 0===e)throw new Error("needs JSONManager component");if(c)throw new Error("Load manager is currently running");var n=t.split("/").pop().split(".")[0];v(),s.queueStrings([t]),s.start(A,[e,n,i])},s.getProgress=function(){return d},s.start=function(t,i){if(c)throw new Error("EHDI Load manager is currently running");h=t,u=i,c=!0,d=0,f=0,p=a.length+o.length,g=_.length+m.length,e.reset(),P()},s.unloadAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},s=y(t,r),a=y(t,n),o=y(t,i),l=e(t,a);l=e(l=e(l,o),s),_=_.concat(a),_=_.concat(o),m=m.concat(l)},s}()}(),(EHDI=EHDI||Object.create(null)).ScaleManager=function(t,e,i,n,r){function s(){l=window.innerWidth/n,h=window.innerHeight/r,i===EHDI.ScaleManager.DOCKING.WIDTH?m=l:i===EHDI.ScaleManager.DOCKING.HEIGHT?m=h:i===EHDI.ScaleManager.DOCKING.AUTO?m=Math.min(l,h):i===EHDI.ScaleManager.DOCKING.FULLSCREEN&&(m=Math.max(l,h));var s=t.view;s.style.paddingLeft=0,s.style.paddingRight=0,s.style.paddingTop=0,s.style.paddingBottom=0,s.style.display="block",g=Math.floor(n*m),v=Math.floor(r*m),e.scale.x=e.scale.y=m,g>window.innerWidth?(EHDI.screen.xOffset=.5*(window.innerWidth-g),g=window.innerWidth,EHDI.screen.viewWidth=g/m):(EHDI.screen.viewWidth=window.innerWidth/m,EHDI.screen.viewWidth>n&&(EHDI.screen.viewWidth=n),EHDI.screen.xOffset=0),v>window.innerHeight?(EHDI.screen.yOffset=.5*(window.innerHeight-v),v=window.innerHeight,EHDI.screen.viewHeight=v/m):(EHDI.screen.viewHeight=window.innerHeight/m,EHDI.screen.viewHeight>r&&(EHDI.screen.viewHeight=r),EHDI.screen.yOffset=0),EHDI.screen.centerOrigin&&e.children.forEach(function(t){t.position.set(.5*EHDI.screen.viewWidth,.5*EHDI.screen.viewHeight)}),t.resize(g,v),o(),window.scrollTo(0,0),a(),p&&p()}function a(){return u=window.innerHeight>window.innerWidth?EHDI.ScaleManager.SCREEN_ORIENTATION.PORTRAIT:EHDI.ScaleManager.SCREEN_ORIENTATION.LANDSCAPE}function o(){var e=t.view;e.style.marginTop=0,e.style.marginBottom=0,e.style.marginLeft=0,e.style.marginRight=0,(i==EHDI.ScaleManager.DOCKING.HEIGHT||i==EHDI.ScaleManager.DOCKING.FULLSCREEN||i==EHDI.ScaleManager.DOCKING.AUTO&&g0;){var e=u.pop();"function"==typeof e.popUpWillDisappear&&e.popUpWillDisappear(),"function"==typeof c.popUpWillDisappear&&0===u.length&&c.popUpWillDisappear(),f.removeChild(e),"function"==typeof e.popUpDidDisappear&&e.popUpDidDisappear(),"function"==typeof c.popUpDidDisappear&&0===u.length&&c.popUpDidDisappear(),t&&e.destroy({children:!0})}},addNotification:function(t){p.addChild(t)},removeNotification:function(t,e){var i;p.children.indexOf(t)>-1&&(i=p.removeChild(t)),e&&i.destroy({children:!0}),i=null},popNofication:function(){return p.children.pop()},screenResize:function(){c&&"function"==typeof c.onScreenResize&&c.onScreenResize(),u.forEach(function(t){"function"==typeof t.onScreenResize&&t.onScreenResize()}),p.children.forEach(function(t){"function"==typeof t.onScreenResize&&t.onScreenResize()})}}},EHDI.scene.TransitionParameter=function(t,e){this.from=t,this.to=e},EHDI.scene.TransitionParameter.constructor=EHDI.scene.TransitionParameter,(EHDI=EHDI||Object.create(null)).SoundManager=function(t){var e=null,i=[],n=null,r=!1,s=!0,a=!0,o={bgm:1,sfx:1,vo:1},l=t||!0,h=function(){e&&(e.paused=!0),i.forEach(function(t){t.paused=!0}),n&&(n.paused=!0)},u=function(){a&&(e&&(e.paused=!1),i.forEach(function(t){t.paused=!1}),n&&(n.paused=!1))},c=function(){window.document.webkitHidden||window.document.hidden?h():u()},d=function(){window.addEventListener("blur",h),window.addEventListener("focus",u),window.addEventListener("pagehide",h),window.addEventListener("pageshow",u),window.addEventListener("webkitvisibilitychange",c),window.addEventListener("webkitvisibilitychange",c)},f=function(){window.removeEventListener("blur",h),window.removeEventListener("focus",u),window.removeEventListener("pagehide",h),window.removeEventListener("pageshow",u),window.removeEventListener("webkitvisibilitychange",c),window.removeEventListener("webkitvisibilitychange",c)};return l&&d(),{set enableInterrupt(t){"boolean"==typeof t&&l!==t&&((l=t)?d():f())},get enableInterrupt(){return l},set sfxVolume(t){"number"==typeof t&&(o.sfx=t,i&&i.forEach(function(t){t.volume=t.volume*o.sfx}))},get sfxVolume(){return o.sfx},set bgmVolume(t){"number"==typeof t&&(o.bgm=t,e&&(e.volume=e.volume*o.bgm))},get bgmVolume(){return o.bgm},set voVolume(t){"number"==typeof t&&(o.vo=t,n&&(n.volume=n.volume*o.vo))},get voVolume(){return o.vo},playBGM:function(t,i){if(i=i*o.bgm||o.bgm,"string"==typeof t)return e instanceof createjs.AbstractSoundInstance&&(e.stop(),e.destroy()),e=createjs.Sound.play(t,{loop:-1}),e.volume=i,e.muted=r,e;throw"pass string id of BGM to be played"},stopBGM:function(){e&&(e.stop(),e.destroy(),e=null)},pauseBGM:function(){e&&(e.paused=!0)},resumeBGM:function(){e&&(e.paused=!1)},playSFX:function(t,e){if(e=e*o.sfx||o.sfx,"string"==typeof t){var n=createjs.Sound.play(t);n.volume=e,n.muted=r,i.push(n);var s=n.on("complete",function(t){var e=i.indexOf(t.currentTarget);if(e>-1){var r=i.splice(e,1)[0];n.off("complete",s),r.destroy()}});return n}throw"pass string id of SFX to be played"},stopSFX:function(t){var e=i.indexOf(t);if(e>-1){var n=i.splice(e,1)[0];n.stop(),n.destroy()}},stopAllSFX:function(){i.forEach(function(t){t.stop(),t.destroy()}),i=[]},pauseAllSFX:function(){i.forEach(function(t){t.paused=!0})},resumeAllSFX:function(){i.forEach(function(t){t.paused=!1})},playVO:function(t,e){if(e=e*o.vo||o.vo,"string"==typeof t)return n=createjs.Sound.play(t),n.volume=e,n.muted=r,n;throw"pass string ID of VO to be played"},stopVO:function(){n&&(n.stop(),n.destroy())},pauseVO:function(){n&&(n.paused=!0)},resumeVO:function(){n&&(n.paused=!1)},setMute:function(){var t=arguments.length<=0||void 0===arguments[0]?!r:arguments[0];r=t,e&&(e.muted=r),i.forEach(function(t){t.muted=r}),n&&(n.muted=r)},getMuted:function(){return r},setDeactivate:function(){var t=arguments.length<=0||void 0===arguments[0]?!s:arguments[0];s=t,e&&(e.paused=!s),i.forEach(function(t){t.paused=!s}),n&&(n.muted=!s)},autoResumeToggle:function(t){a=t}}},(EHDI=EHDI||Object.create(null)).StorageManager=function(){"use strict";"use restrict";var t="game_data",e=!0,i=JSON.parse(localStorage.getItem(t)),n=function(){if(!e)return!1;var n;return null===i&&null!==t?(i=Object.create(null),n=JSON.stringify(i),localStorage.setItem(t,n),!0):null!==i};return(e=function(){try{return localStorage.setItem("t3st","1"),localStorage.removeItem("t3st"),!0}catch(t){return!1}}())?n():i=Object.create(null),{checkLocalData:n,setDataID:function(e){(arguments.length<0||"string"!=typeof e)&&(e="game_data"),t=e,n()},getDataID:function(){return t},getLocalInfo:function(t){if("string"!=typeof t)throw"invalid key";return void 0===i[t]?null:i[t]},setLocalInfo:function(e,r){if(arguments.length<2)throw"invalid parameters";if("string"!=typeof e)throw"invalid key";i[e]=r,n()&&localStorage.setItem(t,JSON.stringify(i))},deleteLocalInfo:function(e){if("string"!=typeof e)throw"invalid key";delete i[e],localStorage.setItem(t,JSON.stringify(i))},clearLocalData:function(){var n;i=Object.create(null),e&&(n=JSON.stringify(i),localStorage.setItem(t,n))}}},(EHDI=EHDI||Object.create(null)).UpdateManager=function(t,e){"use strict";var i,n,r,s,a,o=!1,l=[],h=0,u=function(){window.requestAnimationFrame(u);var t=new Date;n||(n=(new Date).getTime());var e=t-i,c=(t.getTime()-n)/1e3;if(h++,r=Math.floor(h/c),c>1&&(n=(new Date).getTime(),h=0),l.length>0)for(var d=0;d0){if(!(t instanceof PIXI.CanvasRenderer||t instanceof PIXI.WebGLRenderer))throw new Error("Please pass renderer as parameter");if(!(e instanceof PIXI.DisplayObject))throw new Error("Stage is not a display object");o=!0,s=t,a=e}return u(),{getFPS:function(){return r},setAutoRender:function(t){o=t},isAutoRendering:function(){return o},addFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");l.push(t)},hasFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");return l.indexOf(t)>-1},removeFrameListener:function(t){if("function"!=typeof t)throw"Callback must be a function";var e=l.indexOf(t);e>-1&&l.splice(e,1)},removeAllFrameListeners:function(){l.length=0}}},function(t){"use strict";t.BrowserInfo=t.BrowserInfo||Object.create(null);var e,i,n=window.navigator,r=t.BrowserInfo,s=n.userAgent;r.platformType=n.platform,r.platformVersion="",r.browserName=n.appName,r.browserVersion=n.appVersion,r.isMobileDevice=!1,r.isIOS=!1,r.deviceType="desktop",-1!==n.platform.indexOf("iPhone")?(r.isMobileDevice=!0,r.platformType="iPhone "+function(){var t=window.screen.height,e=window.screen.width;return 320===e&&480===t?"4":375===e&&667===t?"6":414===e&&736===t?"6+":320===e&&568===t?"5":t<=480?"1-3":" "}(),r.deviceType="phone",r.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),r.platformVersion=i.replace("_","."))):-1!=n.platform.indexOf("iPod")?(r.isMobileDevice=!0,r.platformType="iPod",r.deviceType="tablet",r.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),r.platformVersion=i.replace("_","."))):-1!=n.platform.indexOf("iPad")?(r.isMobileDevice=!0,r.platformType="iPad",r.deviceType="tablet",r.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),r.platformVersion=i.replace("_","."))):-1!=s.indexOf("Android")?(r.isMobileDevice=!0,r.platformType="Android",r.deviceType="tablet",e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),r.platformVersion=i.replace("_","."))):-1!=s.indexOf("Kindle")||-1!=s.indexOf("Silk")?(r.isMobileDevice=!0,r.platformType="Android",r.deviceType="tablet"):-1!=s.indexOf("IEMobile")?(r.isMobileDevice=!0,r.platformType="IEMobile",r.deviceType="phone",e=/IEMobile\/(\d+\.\d+)/g,-1!==s.search(e)&&(r.platformVersion=String(s.match(e)))):-1!=n.platform.indexOf("Win")?(r.platformType="Windows",r.deviceType="desktop"):-1!=n.platform.indexOf("Mac")?(r.platformType="MAC",r.deviceType="desktop",e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),r.platformVersion=i.replace("_","."))):-1!=n.platform.indexOf("Linux")&&(r.platformType="Linux",r.deviceType="desktop");var a=function(){var t,e=n.userAgent,i=e.match(/(crios|samsungbrowser|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(i[1]))return"IE "+((t=/\brv[ :]+(\d+)/g.exec(e)||[])[1]||"");if("Chrome"===i[1]&&null!=(t=e.match(/\b(OPR|Edge)\/(\d+)/))){if(-1!=t.indexOf("OPR"))return t.slice(1).join(" ").replace("OPR","Opera");if(-1!=t.indexOf("Edge"))return t.slice(1).join(" ").replace("Edge","Edge")}return i=i[2]?[i[1],i[2]]:[n.appName,n.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&i.splice(1,1,t[1]),i.join(" ")}();r.browserName=a.split(" ")[0],"CRIOS"===r.browserName.toUpperCase()&&(r.browserName="Chrome"),r.browserVersion=a.split(" ")[1],t.checkGLQuality=function(t){if(!t)throw new Error("pass renderer as parameters");var e=0,i=t.view.getContext("webgl")||t.view.getContext("experimental-webgl");if(!i)return"canvas";var n=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return n&&(e=i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),e>4?"gl-high":"gl-normal"}}(EHDI||Object.create(null)),(EHDI=EHDI||Object.create(null)).CollisionUtil=function(){},EHDI.CollisionUtil.rectToRect=function(t,e){return t.xe.x&&t.ye.y},EHDI.CollisionUtil.circleToRect=function(t,e){var i=Math.abs(t.x-e.x-.5*e.width),n=Math.abs(t.y-e.y-.5*e.height);if(i>.5*e.width+t.r)return!1;if(n>.5*e.height+t.r)return!1;if(i<=.5*e.width)return!0;if(n<=.5*e.height)return!0;var r=i-.5*e.width,s=n-.5*e.height;return r*r+s*s<=t.r*t.r},EHDI.CollisionUtil.circleToCircle=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)e)return n;if(te?Math.random()*(t-e)+e:Math.random()*(e-t)+t},EHDI.NumberUtil.getDigit=function(t){return t.toString().length},EHDI.NumberUtil.shuffleArray=function(t){for(var e=t.length-1;e>0;e--)!function(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}(t,function(t){return Math.floor(Math.random()*t)}(e+1),e)},(EHDI=EHDI||Object.create(null)).StressTest=function(t){var e=t,i=new PIXI.Container,n=document.createElement("canvas");n.width=n.height="500px",document.body.appendChild(n);var r={view:n,antialiasing:!1,transparent:!0,resolution:window.devicePixelRatio,autoResize:!0},s=new EHDI.aka.AutoDetectRenderer(500,500,r);s.view.style.position="absolute";var a=document.createElement("div");a.style.width=a.style.height="500px",a.style.background="#FFFFFF",document.body.appendChild(a),a.style.position="absolute",a.style.zIndex=2;var o,l,h,u=this,c=[],d=[];return this.update=function(){for(var t=Date.now(),n=0;n0){for(var e=[],i=0,n=this.scoreEffects.length;i10&&this.isRed?(this.isRed=!1,this.timerTxt.style={fontFamily:"proximanova-black",fill:16777215,fontSize:36},this.shakeTimeline&&(this.shakeTimeline.kill(),this.shakeTimeline=null)):this.timeLeft<10&&!this.isRed?(this.isRed=!0,this.timerTxt.style={fontFamily:"proximanova-black",fill:15539236,fontSize:36},this.shakeTimeline=new TimelineMax({repeat:-1}),this.shakeTimeline.to(this.timerTxt,.05,{x:.69*this.containerSprite.width,ease:Power0.easeNone}),this.shakeTimeline.to(this.timerTxt,.1,{x:.66*this.containerSprite.width,ease:Power0.easeNone}),this.shakeTimeline.to(this.timerTxt,.05,{x:.675*this.containerSprite.width,ease:Power0.easeNone})):this.timeLeft<=1&&(this.shakeTimeline&&this.shakeTimeline.kill(),EHDI.GAME.updateManager.removeFrameListener(this.timerUpdate),null!=this.onTimerDone&&this.onTimerDone())}},EHDI.components.Timer.prototype.addTime=function(t){this.timeLeft+=t,this.onTimeTimeline.restart(),this.onTimeTimeline.play()},EHDI.components.Timer.prototype.dispose=function(){this.shakeTimeline&&this.shakeTimeline.kill(),EHDI.GAME.updateManager.removeFrameListener(this.timerUpdate)},EHDI.components.Timer.prototype.toggleEffects=function(t){this.line.visible=t,this.sparkle.visible=t},EHDI.components.Timer.prototype.toggleFlash=function(t){this.flash.visible=t},EHDI.components.Timer.prototype.setTimerDoneCallback=function(t){this.onTimerDone=t};var EHDI=EHDI||Object.create(null),WAG=WAG||Object.create(null),UTILS=UTILS||Object.create(null),POOLS=POOLS||Object.create(null);WAG.GameEngine=function(){var t=EHDI.GAME.constants.gametimelimit;EHDI.aka.Container.call(this);var e,i,n,r,s,a,o,l,h,u,c=EHDI.GAME.constants.gameinitspeed,d=(EHDI.GAME.constants.gamefinalspeed-EHDI.GAME.constants.gameinitspeed)/t,f=new EHDI.aka.Container,p=[],_=[250,350,450,550],m=0,g=[1,null,null,null,null,2,null,null,null,null,0,null,null,null,null,1,null,null,1,null,null,1,null,null,null,null,2,null,null,2,null,null,2,null,null,null,null,0,null,null,0,null,null,null,null],v=0;this.init=function(){e=new PIXI.extras.TilingSprite(EHDI.Assets.images.bg_weeds,EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight()),this.addChild(e),this.addChild(f),i=0,m=1,n=EHDI.GAME.constants.spawndelay,r=!1,a=!1,o=0,h=0,u=0,l=EHDI.GAME.sceneManager.getStageWidth(),this.scoreEffects=new EHDI.components.ScoreEffectManager,this.scoreEffects.init(f)},this.fieldClicked=function(){a=!0},this.gameStart=function(){s=EHDI.GAME.pauseButton,this.addInteraction(),this.bindedLoop=y.bind(this),EHDI.GAME.updateManager.addFrameListener(this.bindedLoop)};var y=function(u){if(!s.isPaused&&!s.isEndGame)if((i+=u)>=t||r)this.gameOver();else{if((v+=u)>=1e3&&(v-=1e3,EHDI.scene.GameScene.scoreHolder.addScore(10),this.scoreEffects.popScore(-1*f.x+650,100,10)),h=u*c,c+=u*d,f.x-=h,o+=h,e.tilePosition.x-=h,l+=h,m=i/3e4,(n-=u)<=0&&(n=EHDI.GAME.constants.spawndelay,b()),p.length>0){for(var _=[],g=0,y=p.length;gEHDI.GAME.saveData.highScore&&(EHDI.GAME.saveData.highScore=t,EHDI.sbGame.saveGameData(EHDI.GAME.saveData,"DEFAULT",function(){})),EHDI.sbGame.end(t)}};var b=function(){if(g.length>0)T(g.shift());else{for(var t=[],e=Math.floor(Math.random()*(Math.ceil(m)+1)),i=0;ithis.maxPages&&(this.pageNumber=1);var e=new EHDI.aka.Sprite(EHDI.Assets.images[this.filePaths[this.pageNumber-1]]);e.anchor.set(.5,.5),e.position.set(0,.15*-this.bg.height),this.upcomingPage.addChild(e);this.messages[this.pageNumber-1];var i=new EHDI.displays.TextSprite(this.messages[this.pageNumber-1]);i.style.wordWrap=!0,i.style.wordWrapWidth=.9*e.width,i.anchor.set(.5,0),i.position.set(0,.05*this.bg.height),this.upcomingPage.addChild(i),this.transitionTimeline=new TimelineMax,this.transitionTimeline.to(this.upcomingPage,.5,{alpha:1}),this.transitionTimeline.to(this.page,.5,{alpha:0},0),this.transitionTimeline.add(this.endTransition.bind(this)),this.bg.addChild(this.upcomingPage)},EHDI.popup.PausePopUp.prototype.endTransition=function(){this.page.destroy({children:!0}),this.page=this.upcomingPage,this.upcomingPage=null,this.page.alpa=1};var EHDI=EHDI||Object.create(null),WAG=WAG||Object.create(null);EHDI.scene.GameScene=function(){EHDI.aka.Container.call(this),EHDI.scene.GameScene.game=new WAG.GameEngine,EHDI.scene.GameScene.timer=new EHDI.components.Timer,EHDI.scene.GameScene.timer.timeLeft=EHDI.GAME.constants.gametimelimit/1e3,EHDI.scene.GameScene.timer.x=280,EHDI.scene.GameScene.timer.y=5,EHDI.GAME.pauseButton=new EHDI.components.pauseButton},EHDI.scene.GameScene.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.scene.GameScene.prototype.screenWillAppear=function(){EHDI.scene.GameScene.game.init(),this.addChild(EHDI.scene.GameScene.game),EHDI.scene.GameScene.scoreHolder=EHDI.components.ScoreManager(this),EHDI.scene.GameScene.scoreHolder.setXY(10,5),this.addChild(EHDI.scene.GameScene.timer),this.addChild(EHDI.GAME.pauseButton)},EHDI.scene.GameScene.prototype.screenDidAppear=function(){EHDI.scene.GameScene.game.gameStart();var t=EHDI.GAME.saveData;t.isFirstTimePlay&&(t.isFirstTimePlay=!1,EHDI.sbGame.saveGameData(EHDI.GAME.saveData,"DEFAULT",function(){}),EHDI.GAME.pauseButton.isPaused=!0,EHDI.GAME.sceneManager.pushPopUp(new EHDI.popup.PausePopUp,{y:new EHDI.scene.TransitionParameter(-EHDI.GAME.sceneManager.getStageHeight(),.5*EHDI.GAME.sceneManager.getStageHeight()),duration:.25}))},EHDI.scene.GameScene.prototype.screenDidDisappear=function(){},(EHDI=EHDI||Object.create(null)).scene=EHDI.scene||Object.create(null),EHDI.scene.TitleScene=function(){EHDI.aka.Container.call(this)},EHDI.scene.TitleScene.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.scene.TitleScene.prototype.screenWillAppear=function(){var t=new PIXI.extras.TilingSprite(EHDI.Assets.images.bg_logo_weeds,EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight());this.addChild(t)},EHDI.scene.TitleScene.prototype.screenDidAppear=function(){this.title=new EHDI.aka.Sprite(EHDI.Assets.images.logo_weeds1),this.title.anchor.set(.5,.5),this.title.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.5*EHDI.GAME.sceneManager.getStageHeight()),this.spark=new EHDI.aka.Sprite(EHDI.Assets.images.logo_weeds2),this.spark.anchor.set(.5,.5),this.spark.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.5*EHDI.GAME.sceneManager.getStageHeight()),this.spark.alpha=0,this.gizmo=new EHDI.aka.Sprite(EHDI.Assets.images.gizmo_weeds),this.gizmo.anchor.set(.5,.75),this.gizmo.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.45*EHDI.GAME.sceneManager.getStageHeight()),this.addChild(this.spark),this.addChild(this.gizmo),this.addChild(this.title),this.sound=new EHDI.displays.ToggleButton(EHDI.Assets.images.btn_audio1,EHDI.Assets.images.btn_audio3,EHDI.Assets.images.btn_audio2,EHDI.Assets.images.btn_audio4,EHDI.GAME.soundManager.getMuted()),this.sound.setOnClickFunction(this.toggleAudio),this.sound.position.set(.1*EHDI.GAME.sceneManager.getStageWidth(),.09*EHDI.GAME.sceneManager.getStageHeight()),this.addChild(this.sound),this.highScoreHolder=new EHDI.components.HighScoreHolder(this,EHDI.GAME.saveData.highScore),this.highScoreHolder.setXY(.723*EHDI.GAME.sceneManager.getStageWidth(),.0417*EHDI.GAME.sceneManager.getStageHeight()),this.playBtn=new EHDI.displays.Button(EHDI.Assets.images.btn_play,EHDI.Assets.images.btn_play2,null,null),this.playBtn.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.85*EHDI.GAME.sceneManager.getStageHeight()),this.addChild(this.playBtn),this.playBtn.setOnClickFunction(this.startGame),this.playTxt=new EHDI.displays.TextSprite(EHDI.GAME.jsonManager.getLocale("BTN_PLAY")),this.playTxt.anchor.set(.75,.5),this.playBtn.addChild(this.playTxt);this.tl=new TimelineMax({repeat:0}),this.tl.from(this.title,1,{scaleX:0,scaleY:0,ease:Elastic.easeOut}),this.tl.from(this.gizmo,.5,{scaleX:0,scaleY:0,ease:Back.easeOut}),this.tl.from(this.playBtn,.25,{scaleX:0,scaleY:0,ease:Back.easeOut}),this.tl.add(function(){this.tl.kill(),this.tl=null,this.tl2=new TimelineMax({repeat:-1,yoyo:!0}),this.tl2.to(this.spark,1,{alpha:1,ease:Bounce.easeIn})}.bind(this)),EHDI.GAME.bgm||(EHDI.GAME.soundManager.autoResumeToggle(!0),EHDI.GAME.bgm=EHDI.GAME.soundManager.playBGM("bgm"))},EHDI.scene.TitleScene.prototype.toggleAudio=function(t){EHDI.GAME.soundManager.setMute(t),EHDI.GAME.soundManager.playSFX("button_sfx");var e=EHDI.GAME.storageManager.getLocalInfo(EHDI.GAME.id);e.isMuted=t,EHDI.GAME.storageManager.setLocalInfo(EHDI.GAME.id,e)},EHDI.scene.TitleScene.prototype.startGame=function(){EHDI.GAME.soundManager.playSFX("button_sfx"),EHDI.GAME.sceneManager.changeScene(new EHDI.scene.GameScene,{x:new EHDI.scene.TransitionParameter(-EHDI.GAME.sceneManager.getStageWidth(),0),duration:.25})},EHDI.scene.TitleScene.prototype.screenDidDisappear=function(){this.destroy({children:!0})},EHDI.onWindowLoad=function(){EHDI.GAME=Object.create(null),EHDI.GAME.id=gameId,EHDI.GAME.language="en",EHDI.GAME.constants=EHDI.GAME.constants||Object.create(null),Object.defineProperties(EHDI.GAME.constants,{boundHeight:{value:600},boundWidth:{value:1024},gametimelimit:{value:6e4},gameinitspeed:{value:.1875},gamefinalspeed:{value:1},spawndelay:{value:300}}),EHDI.sbGame=new SuperbookGame(EHDI.GAME.id,"state",EHDI.init),EHDI.sbGame.renderGameArea();var t=EHDI.sbGame.getVendorGameElement();EHDI.canvas=document.createElement("canvas"),EHDI.canvas.id="game-canvas",EHDI.canvas.width=t.style.width,EHDI.canvas.height=t.style.height,t.appendChild(EHDI.canvas),EHDI.sbGame.start()},EHDI.init=function(){EHDI.GAME.sceneManager=EHDI.SceneManager(1024,600);var t=function(){var t=EHDI.sbGame.getVendorGameElement(),e=EHDI.GAME.sceneManager.defaultWidth,i=EHDI.GAME.sceneManager.defaultHeight,n=t.offsetWidth/EHDI.GAME.sceneManager.defaultWidth,r=t.offsetHeight/EHDI.GAME.sceneManager.defaultHeight,s=Math.min(n,r);e=Math.ceil(e*s),i=Math.ceil(i*s);var a=EHDI.GAME.sceneManager.getStage();a.scale.x=a.scale.y=s,EHDI.GAME.sceneManager.getRenderer().resize(e,i);var o=EHDI.GAME.sceneManager.getRenderer().view;if(o.style.paddingLeft=0,o.style.paddingRight=0,o.style.paddingTop=0,o.style.paddingBottom=0,o.style.display="block",o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.right=0,o.style.bottom=0,eparseInt(t[1],10)}else d=!1;return d}function l(){return null===p&&(p=!!document.fonts),p}function h(){if(null===f){var t=document.createElement("div");try{t.style.font="condensed 100px sans-serif"}catch(t){}f=""!==t.style.font}return f}function u(t,e){return[t.style,t.weight,h()?t.stretch:"","100px",e].join(" ")}var c=null,d=null,f=null,p=null;a.prototype.load=function(t,r){var a=this,h=t||"BESbswy",d=0,f=r||3e3,p=(new Date).getTime();return new Promise(function(t,r){if(l()&&!o()){var _=new Promise(function(t,e){function i(){(new Date).getTime()-p>=f?e():document.fonts.load(u(a,'"'+a.family+'"'),h).then(function(e){1<=e.length?t():setTimeout(i,25)},function(){e()})}i()}),m=new Promise(function(t,e){d=setTimeout(e,f)});Promise.race([m,_]).then(function(){clearTimeout(d),t(a)},function(){r(a)})}else e(function(){function e(){var e;(e=-1!=g&&-1!=v||-1!=g&&-1!=y||-1!=v&&-1!=y)&&((e=g!=v&&g!=y&&v!=y)||(null===c&&(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),c=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))),e=c&&(g==b&&v==b&&y==b||g==T&&v==T&&y==T||g==x&&v==x&&y==x)),e=!e),e&&(E.parentNode&&E.parentNode.removeChild(E),clearTimeout(d),t(a))}function o(){if((new Date).getTime()-p>=f)E.parentNode&&E.parentNode.removeChild(E),r(a);else{var t=document.hidden;!0!==t&&void 0!==t||(g=l.a.offsetWidth,v=_.a.offsetWidth,y=m.a.offsetWidth,e()),d=setTimeout(o,50)}}var l=new i(h),_=new i(h),m=new i(h),g=-1,v=-1,y=-1,b=-1,T=-1,x=-1,E=document.createElement("div");E.dir="ltr",n(l,u(a,"sans-serif")),n(_,u(a,"serif")),n(m,u(a,"monospace")),E.appendChild(l.a),E.appendChild(_.a),E.appendChild(m.a),document.body.appendChild(E),b=l.a.offsetWidth,T=_.a.offsetWidth,x=m.a.offsetWidth,o(),s(l,function(t){g=t,e()}),n(l,u(a,'"'+a.family+'",sans-serif')),s(_,function(t){v=t,e()}),n(_,u(a,'"'+a.family+'",serif')),s(m,function(t){y=t,e()}),n(m,u(a,'"'+a.family+'",monospace'))})})},"object"==typeof module?module.exports=a:(window.FontFaceObserver=a,window.FontFaceObserver.prototype.load=a.prototype.load)}();var EHDI=function(t){return t.DBoneFactory=function(){var t=Object.create(null),e=!0,i=[],n=(Object.create(null),function(e){dragonBones.WorldClock.clock.advanceTime(e*t.dtMultiplier)});return t.dtMultiplier=.001,Object.defineProperty(t,"enableClock",{set:function(t){(e=t)&&!EHDI.GAME.updateManager.hasFrameListener(n)&&EHDI.GAME.updateManager.addFrameListener(n),!e&&EHDI.GAME.updateManager.hasFrameListener(n)&&EHDI.GAME.updateManager.removeFrameListener(n)},get:function(){return e}}),t.createArmature=function(e){var n=t.PixiFactory.buildArmature(e);return dragonBones.WorldClock.clock.add(n),i.push(n),n},t.destroyArmature=function(t){var e=i.indexOf(t);if(e>-1){var n=i.splice(e,1)[0];dragonBones.WorldClock.clock.remove(n),n.dispose()}},t.destroyAllArmature=function(){for(;i.length>0;){var t=i.pop();dragonBones.WorldClock.clock.remove(t),t.dispose()}},t.start=function(e,i,n){t.PixiFactory=new dragonBones.PixiFactory,t.addToFactory(e,i,n),t.enableClock=!0},t.addToFactory=function(e,i,n){var r=EHDI.Assets.images[e].baseTexture.source,s=EHDI.Assets.fetch(i),a=EHDI.Assets.fetch(n);t.PixiFactory.addTextureAtlas(new dragonBones.TextureAtlas(r,s)),t.PixiFactory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(a))},t}(),t}(EHDI||Object.create(null));(EHDI=EHDI||Object.create(null)).debugUtils=EHDI.debugUtils||Object.create(null),EHDI.debugUtils.debugUtilsContainer=function(t){EHDI.aka.Container.call(this);var e=new EHDI.debugUtils.FPSDisplay;e.anchor.y=1,e.position.set(0,EHDI.GAME.sceneManager.getStageHeight()),this.addChild(e);var i=new EHDI.aka.PixiText(t,{fontFamily:"sans-serif",fill:16777215,dropShadow:!0,fontSize:32});i.anchor.x=1,i.anchor.y=1,i.position.set(EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight()),this.addChild(i)},EHDI.debugUtils.debugUtilsContainer.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.debugUtils.FPSDisplay=function(){this.fps=EHDI.GAME.updateManager.getFPS(),EHDI.aka.PixiText.call(this,"FPS : "+this.fps,{fontFamily:"sans-serif",fill:16777215,dropShadow:!0,fontSize:32}),EHDI.GAME.updateManager.addFrameListener(this.updateMe.bind(this))},EHDI.debugUtils.FPSDisplay.prototype=Object.create(EHDI.aka.PixiText.prototype),EHDI.debugUtils.FPSDisplay.prototype.updateMe=function(){this.fps!==EHDI.GAME.updateManager.getFPS()&&(this.text="FPS :"+EHDI.GAME.updateManager.getFPS())},(EHDI=EHDI||Object.create(null)).interactions=EHDI.interactions||Object.create(null),EHDI.interactions.Keyboard=function(t){var e={};e.code=t,e.isDown=!1,e.isUp=!0,e.press=null,e.release=null,e.downHandler=function(t){t.keyCode===e.code&&(e.isUp&&e.press&&e.press(),e.isDown=!0,e.isUp=!1)},e.upHandler=function(t){t.keyCode===e.code&&(e.isDown&&e.release&&e.release(),e.isUp=!0,e.isDown=!1)};var i=e.downHandler.bind(e),n=e.upHandler.bind(e);return window.addEventListener("keydown",i,!1),window.addEventListener("keyup",n,!1),e.dispose=function(){window.removeEventListener("keydown",i),window.removeEventListener("keyup",n)},e},EHDI.interactions.ArrowControl=function(t,e){if(void 0===typeof e)throw new Error("Indicate speed in which you whant the sprite to move");var i=EHDI.interactions.Keyboard(38),n=EHDI.interactions.Keyboard(39),r=EHDI.interactions.Keyboard(40),s=EHDI.interactions.Keyboard(37);s.press=function(){t.vx=-e},s.release=function(){n.isDown||(t.vx=0)},n.press=function(){t.vx=e},n.release=function(){s.isDown||(t.vx=0)},i.press=function(){t.vy=-e},i.release=function(){r.isDown||(t.vy=0)},r.press=function(){t.vy=e},r.release=function(){i.isDown||(t.vy=0)}},(UTILS=UTILS||Object.create(null)).arrayUtils=UTILS.arrayUtils||Object.create(null),UTILS.arrayUtils.removeFromArray=function(t,e){if(null!=t&&null!=e){for(;e.length>0;){var i=e.pop(),n=t.indexOf(i);-1!=n&&(t=t.splice(n,1))}e=null}},UTILS.arrayUtils.clearArray=function(t){if(null!=t)for(;t.lenghth>0;)t.pop()},UTILS.arrayUtils.destroyArray=function(t){if(null!=t){for(;t.lenghth>0;){var e=t.pop();null!=e.dispose&&e.dispose(),null!=e.destroy&&e.destroy()}t=null}},UTILS.arrayUtils.shuffleArray=function(t,e){if(null!=t){Number.isNaN(e)&&(e=100);for(var i=0;i