!function(t){if("object"==typeof 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,r){function n(a,o){if(!i[a]){if(!e[a]){var h="function"==typeof require&&require;if(!o&&h)return h(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[a]={exports:{}};e[a][0].call(u.exports,function(t){var i=e[a][1][t];return n(i||t)},u,u.exports,t,e,i,r)}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=r,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 n=new Array(256);!function(t){for(var e=0;e<256;++e){var i=e,r=e,n=7;for(i>>>=1;i;i>>>=1)r<<=1,r|=1&i,--n;t[e]=r<>>8&255]<<16|n[t>>>16&255]<<8|n[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>>>r(t)+1}},{}],2:[function(t,e,i){"use strict";function r(t,e,i){i=i||2;var r=e&&e.length,s=r?e[0]*i:t.length,o=n(t,0,s,i,!0),h=[];if(!o)return h;var l,u,d,p,f,_,m;if(r&&(o=c(t,e,o,i)),t.length>80*i){l=d=t[0],u=p=t[1];for(var g=i;gd&&(d=f),_>p&&(p=_);m=Math.max(d-l,p-u)}return a(o,h,i,l,u,m),h}function n(t,e,i,r,n){var s,a;if(n===O(t,e,i,r)>0)for(s=e;s=e;s-=r)a=A(s,t[s],t[s+1],a);return a&&E(a,a.next)&&(I(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,r=t;do{if(i=!1,r.steiner||!E(r,r.next)&&0!==T(r.prev,r,r.next))r=r.next;else{if(I(r),(r=e=r.prev)===r.next)return null;i=!0}}while(i||r!==e);return e}function a(t,e,i,r,n,c,d){if(t){!d&&c&&_(t,r,n,c);for(var p,f,m=t;t.prev!==t.next;)if(p=t.prev,f=t.next,c?h(t,r,n,c):o(t))e.push(p.i/i),e.push(t.i/i),e.push(f.i/i),I(t),t=f.next,m=f.next;else if((t=f)===m){d?1===d?a(t=l(t,e,i),e,i,r,n,c,2):2===d&&u(t,e,i,r,n,c):a(s(t),e,i,r,n,c,1);break}}}function o(t){var e=t.prev,i=t,r=t.next;if(T(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(y(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&T(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,i,r){var n=t.prev,s=t,a=t.next;if(T(n,s,a)>=0)return!1;for(var o=n.xs.x?n.x>a.x?n.x:a.x:s.x>a.x?s.x:a.x,u=n.y>s.y?n.y>a.y?n.y:a.y:s.y>a.y?s.y:a.y,c=g(o,h,e,i,r),d=g(l,u,e,i,r),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&y(n.x,n.y,s.x,s.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&y(n.x,n.y,s.x,s.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var r=t;do{var n=r.prev,s=r.next.next;!E(n,s)&&x(n,r,r.next,s)&&S(n,s)&&S(s,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(s.i/i),I(r),I(r.next),r=t=s),r=r.next}while(r!==t);return r}function u(t,e,i,r,n,o){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&b(h,l)){var u=P(h,l);return h=s(h,h.next),u=s(u,u.next),a(h,e,i,r,n,o),void a(u,e,i,r,n,o)}l=l.next}h=h.next}while(h!==t)}function c(t,e,i,r){var a,o,h,l=[];for(a=0,o=e.length;a=r.next.y){var o=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=n&&o>a){if(a=o,o===n){if(s===r.y)return r;if(s===r.next.y)return r.next}i=r.x=r.x&&r.x>=u&&y(si.x)&&S(r,t)&&(i=r,d=h),r=r.next;return i}function _(t,e,i,r){var n=t;do{null===n.z&&(n.z=g(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,m(n)}function m(t){var e,i,r,n,s,a,o,h,l=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,r=i,o=0,e=0;e0||h>0&&r;)0===o?(n=r,r=r.nextZ,h--):0!==h&&r?i.z<=r.z?(n=i,i=i.nextZ,o--):(n=r,r=r.nextZ,h--):(n=i,i=i.nextZ,o--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;i=r}s.nextZ=null,l*=2}while(a>1);return t}function g(t,e,i,r,n){return t=32767*(t-i)/n,e=32767*(e-r)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function v(t){var e=t,i=t;do{e.x=0&&(t-a)*(r-o)-(i-a)*(e-o)>=0&&(i-a)*(s-o)-(n-a)*(r-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 E(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,r){return!!(E(t,e)&&E(i,r)||E(t,r)&&E(i,e))||T(t,e,i)>0!=T(t,e,r)>0&&T(i,r,t)>0!=T(i,r,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&&x(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,r=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&n<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}function P(t,e){var i=new C(t.i,t.x,t.y),r=new C(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,s.next=r,r.prev=s,r}function A(t,e,i,r){var n=new C(t,e,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function I(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function 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,r){for(var n=0,s=e,a=i-r;s0&&(r+=t[n-1].length,i.holes.push(r))}return i}},{}],3:[function(t,e,i){"use strict";function r(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,o="~";Object.create&&(r.prototype=Object.create(null),(new r).__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,r=this._events[i];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,a=new Array(s);n=t.byteLength?r.bufferSubData(this.type,e,t):r.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,i){return new n(t,t.ARRAY_BUFFER,e,i)},n.createIndexBuffer=function(t,e,i){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,i)},n.create=function(t,e,i,r){return new n(t,e,i,r)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],7:[function(t,e,i){var r=t("./GLTexture"),n=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};n.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new r(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},n.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},n.prototype.clear=function(t,e,i,r){this.bind();var n=this.gl;n.clearColor(t,e,i,r),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},n.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},n.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},n.prototype.resize=function(t,e){var 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))},n.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},n.createRGBA=function(t,e,i,s){var a=r.fromData(t,null,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new n(t,e,i);return o.enableTexture(a),o.unbind(),o},n.createFloat32=function(t,e,i,s){var a=new r.fromData(t,s,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new n(t,e,i);return o.enableTexture(a),o.unbind(),o},e.exports=n},{"./GLTexture":9}],8:[function(t,e,i){var r=t("./shader/compileProgram"),n=t("./shader/extractAttributes"),s=t("./shader/extractUniforms"),a=t("./shader/setPrecision"),o=t("./shader/generateUniformAccessObject"),h=function(t,e,i,h,l){this.gl=t,h&&(e=a(e,h),i=a(i,h)),this.program=r(t,e,i,l),this.attributes=n(t,this.program),this.uniformData=s(t,this.program),this.uniforms=o(t,this.uniformData)};h.prototype.bind=function(){this.gl.useProgram(this.program)},h.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},e.exports=h},{"./shader/compileProgram":14,"./shader/extractAttributes":16,"./shader/extractUniforms":17,"./shader/generateUniformAccessObject":18,"./shader/setPrecision":22}],9:[function(t,e,i){var r=function(t,e,i,r,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=i||-1,this.format=r||t.RGBA,this.type=n||t.UNSIGNED_BYTE};r.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,r=t.videoHeight||t.height;r!==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=r};var n=!1;r.prototype.uploadData=function(t,e,i){this.bind();var r=this.gl;if(t instanceof Float32Array){if(!n){if(!r.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=r.FLOAT}else this.type=this.type||r.UNSIGNED_BYTE;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||i!==this.height?r.texImage2D(r.TEXTURE_2D,0,this.format,e,i,0,this.format,this.type,t||null):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e,i,this.format,this.type,t||null),this.width=e,this.height=i},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.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)},r.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},r.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)},r.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)},r.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)},r.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},r.fromSource=function(t,e,i){var n=new r(t);return n.premultiplyAlpha=i||!1,n.upload(e),n},r.fromData=function(t,e,i,n){var s=new r(t);return s.uploadData(e,i,n),s},e.exports=r},{}],10:[function(t,e,i){function r(t,e){if(this.nativeVaoExtension=null,r.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 n=t("./setVertexAttribArrays");r.prototype.constructor=r,e.exports=r,r.FORCE_NATIVE=!1,r.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},r.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},r.prototype.activate=function(){for(var t=this.gl,e=null,i=0;i=0;r--){var n=t[r];"."===n?t.splice(r,1):".."===n?(t.splice(r,1),i++):i&&(t.splice(r,1),i--)}if(e)for(;i--;i)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var i=[],r=0;r=-1&&!n;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,n="/"===a.charAt(0))}return i=e(r(i.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+i||"."},i.normalize=function(t){var n=i.isAbsolute(t),s="/"===a(t,-1);return(t=e(r(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&s&&(t+="/"),(n?"/":"")+t},i.isAbsolute=function(t){return"/"===t.charAt(0)},i.join=function(){var t=Array.prototype.slice.call(arguments,0);return i.normalize(r(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 r(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 n=r(t.split("/")),s=r(e.split("/")),a=Math.min(n.length,s.length),o=a,h=0;h1)for(var i=1;i1&&(r=i[0]+"@",t=i[1]),r+s((t=t.replace(C,".")).split("."),e).join(".")}function o(t){for(var e,i,r=[],n=0,s=t.length;n=55296&&e<=56319&&n65535&&(e+=R((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=R(t)}).join("")}function l(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 r=0;for(t=i?L(t/w):t>>1,t+=L(t/e);t>M*E>>1;r+=b)t=L(t/M);return L(r+(M+1)*t/(t+x))}function d(t){var e,i,r,s,a,o,u,d,p,f,_=[],m=t.length,g=0,v=D,x=S;for((i=t.lastIndexOf(P))<0&&(i=0),r=0;r=128&&n("not-basic"),_.push(t.charCodeAt(r));for(s=i>0?i+1:0;s=m&&n("invalid-input"),((d=l(t.charCodeAt(s++)))>=b||d>L((y-g)/o))&&n("overflow"),g+=d*o,p=u<=x?T:u>=x+E?E:u-x,!(dL(y/(f=b-p))&&n("overflow"),o*=f;x=c(g-a,e=_.length+1,0==a),L(g/e)>y-v&&n("overflow"),v+=L(g/e),g%=e,_.splice(g++,0,v)}return h(_)}function p(t){var e,i,r,s,a,h,l,d,p,f,_,m,g,v,x,w=[];for(m=(t=o(t)).length,e=D,i=0,a=S,h=0;h=e&&_L((y-i)/(g=r+1))&&n("overflow"),i+=(l-e)*g,e=l,h=0;hy&&n("overflow"),_==e){for(d=i,p=b;f=p<=a?T:p>=a+E?E:p-a,!(d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=b-T,L=Math.floor,R=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:o,encode:h},decode:d,encode:p,toASCII:function(t){return a(t,function(t){return I.test(t)?"xn--"+p(t):t})},toUnicode:function(t){return a(t,function(t){return A.test(t)?d(t.slice(4).toLowerCase()):t})}},f&&_)if(e.exports==f)_.exports=g;else for(v in g)g.hasOwnProperty(v)&&(f[v]=g[v]);else r.punycode=g}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],26:[function(t,e,i){"use strict";function r(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 h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var l=t.length;h>0&&l>h&&(l=h);for(var u=0;u=0?(c=_.substr(0,m),d=_.substr(m+1)):(c=_,d=""),p=decodeURIComponent(c),f=decodeURIComponent(d),r(a,p)?n(a[p])?a[p].push(f):a[p]=[a[p],f]:a[p]=f}return a};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],27:[function(t,e,i){"use strict";function r(t,e){if(t.map)return t.map(e);for(var i=[],r=0;r",'"',"`"," ","\r","\n","\t"],c=["{","}","|","\\","^","`"].concat(u),d=["'"].concat(c),p=["%","/","?",";","#"].concat(d),f=["/","?","#"],_=/^[+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");r.prototype.parse=function(t,e,i){if(!a.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),n=-1!==r&&r127?R+="x":R+=L[j];if(!R.match(_)){var k=O.slice(0,D),H=O.slice(D+1),F=L.match(m);F&&(k.push(F[1]),H.unshift(F[2])),H.length&&(c="/"+H.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 B=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+B,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!g[x])for(var D=0,M=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(!E.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var S=E.slice(-1)[0],D=(i.host||t.host||E.length>1)&&("."===S||".."===S)||""===S,P=0,A=E.length;A>=0;A--)"."===(S=E[A])?E.splice(A,1):".."===S?(E.splice(A,1),P++):P&&(E.splice(A,1),P--);if(!b&&!T)for(;P--;P)E.unshift("..");!b||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),D&&"/"!==E.join("/").substr(-1)&&E.push("");var I=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(w){i.hostname=i.host=I?"":E.length?E.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&&E.length)&&!I&&E.unshift(""),E.length?i.pathname=E.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},r.prototype.parseHost=function(){var t=this.host,e=h.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":30,punycode:25,querystring:28}],30:[function(t,e,i){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],31:[function(t,e,i){"use strict";e.exports=function(t,e,i){var r,n=t.length;if(!(e>=n||0===i)){var s=n-(i=e+i>n?n-e:i);for(r=e;r0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;n(this,t),this.baseUrl=i,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,i){return e._loadResource(t,i)},this._queue=h.queue(this._boundLoadResource,r),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,r){if(Array.isArray(t)){for(var n=0;n0?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=i,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(i),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(i,"text/xml")}else{var s=document.createElement("div");s.innerHTML=i,this.data=s}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||i;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,l.default)(d.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&r===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||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 r=t.indexOf("?"),n=t.indexOf("#"),s=Math.min(r>-1?r:t.length,n>-1?n:t.length);e=(t=t.substring(0,s)).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"}},h(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=p,p.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},p.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},p.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},p.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},p._loadTypeMap={gif:p.LOAD_TYPE.IMAGE,png:p.LOAD_TYPE.IMAGE,bmp:p.LOAD_TYPE.IMAGE,jpg:p.LOAD_TYPE.IMAGE,jpeg:p.LOAD_TYPE.IMAGE,tif:p.LOAD_TYPE.IMAGE,tiff:p.LOAD_TYPE.IMAGE,webp:p.LOAD_TYPE.IMAGE,tga:p.LOAD_TYPE.IMAGE,svg:p.LOAD_TYPE.IMAGE,"svg+xml":p.LOAD_TYPE.IMAGE,mp3:p.LOAD_TYPE.AUDIO,ogg:p.LOAD_TYPE.AUDIO,wav:p.LOAD_TYPE.AUDIO,mp4:p.LOAD_TYPE.VIDEO,webm:p.LOAD_TYPE.VIDEO},p._xhrTypeMap={xhtml:p.XHR_RESPONSE_TYPE.DOCUMENT,html:p.XHR_RESPONSE_TYPE.DOCUMENT,htm:p.XHR_RESPONSE_TYPE.DOCUMENT,xml:p.XHR_RESPONSE_TYPE.DOCUMENT,tmx:p.XHR_RESPONSE_TYPE.DOCUMENT,svg:p.XHR_RESPONSE_TYPE.DOCUMENT,tsx:p.XHR_RESPONSE_TYPE.DOCUMENT,gif:p.XHR_RESPONSE_TYPE.BLOB,png:p.XHR_RESPONSE_TYPE.BLOB,bmp:p.XHR_RESPONSE_TYPE.BLOB,jpg:p.XHR_RESPONSE_TYPE.BLOB,jpeg:p.XHR_RESPONSE_TYPE.BLOB,tif:p.XHR_RESPONSE_TYPE.BLOB,tiff:p.XHR_RESPONSE_TYPE.BLOB,webp:p.XHR_RESPONSE_TYPE.BLOB,tga:p.XHR_RESPONSE_TYPE.BLOB,json:p.XHR_RESPONSE_TYPE.JSON,text:p.XHR_RESPONSE_TYPE.TEXT,txt:p.XHR_RESPONSE_TYPE.TEXT,ttf:p.XHR_RESPONSE_TYPE.BUFFER,otf:p.XHR_RESPONSE_TYPE.BUFFER},p.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":38,"parse-uri":39}],34:[function(t,e,i){"use strict";function r(){}function n(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,r){var n=0,s=t.length;!function a(o){o||n===s?i&&i(o):r?setTimeout(function(){e(t[n++],a)},1):e(t[n++],a)}()},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 n={data:t,callback:"function"==typeof i?i:r};e?o._tasks.unshift(n):o._tasks.push(n),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:r,unsaturated:r,buffer:e/4,empty:r,drain:r,error:r,started:!1,paused:!1,push:function(t,e){i(t,!1,e)},kill:function(){a=0,o.drain=r,o.started=!1,o._tasks=[]},unshift:function(t,e){i(t,!0,e)},process:function(){for(;!o.paused&&a>2,s[1]=(3&n[0])<<4|n[1]>>4,s[2]=(15&n[1])<<2|n[2]>>6,s[3]=63&n[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,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var n=0;nthis.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=h+"px",e.style.height=h+"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},i.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../math"),s=function(){function t(){r(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?n.Rectangle.EMPTY:(t=t||new n.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,r=this.maxX,n=this.maxY,s=t[0],a=t[1];e=sr?s:r,n=a>n?a:n,s=t[2],a=t[3],e=sr?s:r,n=a>n?a:n,s=t[4],a=t[5],e=sr?s:r,n=a>n?a:n,s=t[6],a=t[7],e=sr?s:r,n=a>n?a:n,this.minX=e,this.minY=i,this.maxX=r,this.maxY=n},t.prototype.addFrame=function(t,e,i,r,n){var s=t.worldTransform,a=s.a,o=s.b,h=s.c,l=s.d,u=s.tx,c=s.ty,d=this.minX,p=this.minY,f=this.maxX,_=this.maxY,m=a*e+h*i+u,g=o*e+l*i+c;d=mf?m:f,_=g>_?g:_,g=o*r+l*i+c,d=(m=a*r+h*i+u)f?m:f,_=g>_?g:_,g=o*e+l*n+c,d=(m=a*e+h*n+u)f?m:f,_=g>_?g:_,g=o*r+l*n+c,d=(m=a*r+h*n+u)f?m:f,_=g>_?g:_,this.minX=d,this.minY=p,this.maxX=f,this.maxY=_},t.prototype.addVertices=function(t,e,i,r){for(var n=t.worldTransform,s=n.a,a=n.b,o=n.c,h=n.d,l=n.tx,u=n.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,_=i;_p?v:p,f=y>f?y:f}this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},t.prototype.addBounds=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY;this.minX=t.minXr?t.maxX:r,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,n=t.maxXh?n:h,this.maxY=s>l?s:l}},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,n=t.maxXh?n:h,this.maxY=s>l?s:l}},t}();i.default=s},{"../math":70}],48:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),r=this.getChildIndex(e);this.children[i]=e,this.children[r]=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&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],i=t,r="number"==typeof e?e:this.children.length,n=r-i,s=void 0;if(n>0&&n<=r){s=this.children.splice(i,n);for(var a=0;a2&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,i,r){return e&&(t=e.toGlobal(t,i,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=i||1,this.scale.y=r||1,this.rotation=n,this.skew.x=s,this.skew.y=a,this.pivot.x=o,this.pivot.y=h,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},o(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(h.default);i.default=_,_.prototype.displayObjectUpdateTransform=_.prototype.updateTransform},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,eventemitter3:3}],50:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];n(this,e);var r=s(this,t.call(this));return r.fillAlpha=1,r.lineWidth=0,r.nativeLines=i,r.lineColor=0,r.graphicsData=[],r.tint=16777215,r._prevTint=16777215,r.blendMode=f.BLEND_MODES.NORMAL,r.currentPath=null,r._webGL={},r.isMask=!1,r.boundsPadding=0,r._localBounds=new _.default,r.dirty=0,r.fastRectDirty=-1,r.clearDirty=0,r.boundsDirty=-1,r.cachedSpriteDirty=!1,r._spriteRect=null,r._fastRect=!1,r}return a(e,t),e.prototype.clone=function(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this.currentPath)if(this.currentPath.shape.points.length){var r=new d.Polygon(this.currentPath.shape.points.slice(-2));r.closed=!1,this.drawShape(r)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var i=new d.Polygon([t,e]);return i.closed=!1,this.drawShape(i),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,i,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n=this.currentPath.shape.points,s=0,a=0;0===n.length&&this.moveTo(0,0);for(var o=n[n.length-2],h=n[n.length-1],l=1;l<=20;++l){var u=l/20;s=o+(t-o)*u,a=h+(e-h)*u,n.push(s+(t+(i-t)*u-s)*u,a+(e+(r-e)*u-a)*u)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,i,r,n,s){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,o=a[a.length-2],h=a[a.length-1];return a.length-=2,(0,m.default)(o,h,t,e,i,r,n,s,a),this.dirty++,this},e.prototype.arcTo=function(t,e,i,r,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var s=this.currentPath.shape.points,a=s[s.length-2],o=s[s.length-1]-e,h=a-t,l=r-e,u=i-t,c=Math.abs(o*u-h*l);if(c<1e-8||0===n)s[s.length-2]===t&&s[s.length-1]===e||s.push(t,e);else{var d=o*o+h*h,p=l*l+u*u,f=o*l+h*u,_=n*Math.sqrt(d)/c,m=n*Math.sqrt(p)/c,g=_*f/d,v=m*f/p,y=_*u+m*h,b=_*l+m*o,T=h*(m+g),E=o*(m+g),x=u*(_+v),w=l*(_+v),S=Math.atan2(E-b,T-y),D=Math.atan2(w-b,x-y);this.arc(y+t,b+e,n,S,D,h*l>u*o)}return this.dirty++,this},e.prototype.arc=function(t,e,i,r,n){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(r===n)return this;!s&&n<=r?n+=2*Math.PI:s&&r<=n&&(r+=2*Math.PI);var a=n-r,o=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var h=t+Math.cos(r)*i,l=e+Math.sin(r)*i,u=this.currentPath?this.currentPath.shape.points:null;u?u[u.length-2]===h&&u[u.length-1]===l||u.push(h,l):(this.moveTo(h,l),u=this.currentPath.shape.points);for(var c=a/(2*o),d=2*c,p=Math.cos(c),f=Math.sin(c),_=o-1,m=_%1/_,g=0;g<=_;++g){var v=c+r+d*(g+m*g),y=Math.cos(v),b=-Math.sin(v);u.push((p*y+f*b)*i+t,(p*-b+f*y)*i+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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,r){return this.drawShape(new d.Rectangle(t,e,i,r)),this},e.prototype.drawRoundedRect=function(t,e,i,r,n){return this.drawShape(new d.RoundedRectangle(t,e,i,r,n)),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,r){return this.drawShape(new d.Ellipse(t,e,i,r)),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 r=0;r0)&&(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===f.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 e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new c.default(new l.default(l.default.WHITE)));var i=this._spriteRect;if(16777215===this.tint)i.tint=this.graphicsData[0].fillColor;else{var r=T,n=E;(0,p.hex2rgb)(this.graphicsData[0].fillColor,r),(0,p.hex2rgb)(this.tint,n),r[0]*=n[0],r[1]*=n[1],r[2]*=n[2],i.tint=(0,p.rgb2hex)(r)}i.alpha=this.graphicsData[0].fillAlpha,i.worldAlpha=this.worldAlpha*i.alpha,i.blendMode=this.blendMode,i._texture._frame.width=e.width,i._texture._frame.height=e.height,i.transform.worldTransform=this.transform.worldTransform,i.anchor.set(-e.x/e.width,-e.y/e.height),i._onAnchorUpdate(),i._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=ar?a+h:r;else if(c===f.SHAPES.CIRC)s=n.x,a=n.y,o=n.radius+d/2,h=n.radius+d/2,t=s-oe?s+o:e,i=a-hr?a+h:r;else if(c===f.SHAPES.ELIP)s=n.x,a=n.y,o=n.width+d/2,h=n.height+d/2,t=s-oe?s+o:e,i=a-hr?a+h:r;else for(var p=n.points,_=0,m=0,g=0,v=0,y=0,b=0,T=0,E=0,x=0;x+2e?T+y:e,i=E-br?E+b:r)}else t=0,e=0,i=0,r=0;var w=this.boundsPadding;this._localBounds.minX=t-w,this._localBounds.maxX=e+w,this._localBounds.minY=i-w,this._localBounds.maxY=r+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,this.nativeLines,t);return this.graphicsData.push(e),e.type===f.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]?arguments[1]:1,i=this.getLocalBounds(),r=h.default.create(i.width,i.height,t,e);v||(v=new g.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(y),y.invert(),y.tx-=i.x,y.ty-=i.y,v.render(this,r,!0,y);var n=l.default.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t,"graphics");return n.baseTexture.resolution=e,n.baseTexture.update(),n},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var i=0;iA?A:P,i.beginPath(),i.moveTo(x,w+P),i.lineTo(x,w+D-P),i.quadraticCurveTo(x,w+D,x+P,w+D),i.lineTo(x+S-P,w+D),i.quadraticCurveTo(x+S,w+D,x+S,w+D-P),i.lineTo(x+S,w+P),i.quadraticCurveTo(x+S,w,x+S-P,w),i.lineTo(x+P,w),i.quadraticCurveTo(x,w,x,w+P),i.closePath(),(h.fillColor||0===h.fillColor)&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,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,r=(255&t.tint)/255,n=0;n>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*r*255,s._lineTint=((o>>16&255)/255*e*255<<16)+((o>>8&255)/255*i*255<<8)+(255&o)/255*r*255}},t.prototype.renderPolygon=function(t,e,i){i.moveTo(t[0],t[1]);for(var r=1;r8&&void 0!==arguments[8]?arguments[8]:[],l=0,u=0,c=0,d=0,p=0;h.push(t,e);for(var f=1,_=0;f<=20;++f)c=(u=(l=1-(_=f/20))*l)*l,p=(d=_*_)*_,h.push(c*t+3*u*_*i+3*l*d*n+p*a,c*e+3*u*_*r+3*l*d*s+p*o);return h}},{}],57:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../utils"),h=t("../../const"),l=r(t("../../renderers/webgl/utils/ObjectRenderer")),u=r(t("../../renderers/webgl/WebGLRenderer")),c=r(t("./WebGLGraphicsData")),d=r(t("./shaders/PrimitiveShader")),p=r(t("./utils/buildPoly")),f=r(t("./utils/buildRectangle")),_=r(t("./utils/buildRoundedRectangle")),m=r(t("./utils/buildCircle")),g=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));return r.graphicsDataPool=[],r.primitiveShader=null,r.gl=i.gl,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new d.default(this.gl)},e.prototype.destroy=function(){l.default.prototype.destroy.call(this);for(var t=0;t32e4)&&((r=this.graphicsDataPool.pop()||new c.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=i,r.reset(e),t.data.push(r)),r.dirty=!0,r},e}(l.default);i.default=g,u.default.registerPlugin("graphics",g)},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":124,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")),s=function(){function t(e,i,s){r(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=n.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=i,this.vao=new n.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}],59:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(t){function e(i){return r(this,e),n(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":44}],60:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e,i){var a=t.shape,o=a.x,h=a.y,l=void 0,u=void 0;if(t.type===n.SHAPES.CIRC?(l=a.radius,u=a.radius):(l=a.width,u=a.height),0!==l&&0!==u){var c=Math.floor(30*Math.sqrt(a.radius))||Math.floor(15*Math.sqrt(a.width+a.height)),d=2*Math.PI/c;if(t.fill){var p=(0,s.hex2rgb)(t.fillColor),f=t.fillAlpha,_=p[0]*f,m=p[1]*f,g=p[2]*f,v=e.points,y=e.indices,b=v.length/6;y.push(b);for(var T=0;T196*f*f?(C=D-A,O=P-I,C/=M=Math.sqrt(C*C+O*O),O/=M,C*=f,O*=f,l.push(E-C,x-O),l.push(g,v,y,m),l.push(E+C,x+O),l.push(g,v,y,m),l.push(E-C,x-O),l.push(g,v,y,m),d++):(l.push(U,X),l.push(g,v,y,m),l.push(E-(U-E),x-(X-x)),l.push(g,v,y,m))}}b=i[2*(c-2)],T=i[2*(c-2)+1],E=i[2*(c-1)],D=-(T-(x=i[2*(c-1)+1])),P=b-E,D/=M=Math.sqrt(D*D+P*P),P/=M,D*=f,P*=f,l.push(E-D,x-P),l.push(g,v,y,m),l.push(E+D,x+P),l.push(g,v,y,m),u.push(p);for(var G=0;G=6){for(var o=[],h=t.holes,l=0;l0&&(0,n.default)(t,e,i)};var n=r(t("./buildLine")),s=t("../../../utils"),a=r(t("earcut"))},{"../../../utils":124,"./buildLine":61,earcut:2}],63:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e,i){var s=t.shape,a=s.x,o=s.y,h=s.width,l=s.height;if(t.fill){var u=(0,n.hex2rgb)(t.fillColor),c=t.fillAlpha,d=u[0]*c,p=u[1]*c,f=u[2]*c,_=e.points,m=e.indices,g=_.length/6;_.push(a,o),_.push(d,p,f,c),_.push(a+h,o),_.push(d,p,f,c),_.push(a,o+l),_.push(d,p,f,c),_.push(a+h,o+l),_.push(d,p,f,c),m.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var v=t.points;t.points=[a,o,a+h,o,a+h,o+l,a,o+l,a,o],(0,r.default)(t,e,i),t.points=v}};var r=function(t){return t&&t.__esModule?t:{default:t}}(t("./buildLine")),n=t("../../../utils")},{"../../../utils":124,"./buildLine":61}],64:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e,i){return t+(e-t)*i}function s(t,e,i,r,s,a){for(var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],h=0,l=0,u=0,c=0,d=0,p=0,f=0,_=0;f<=20;++f)h=n(t,i,_=f/20),l=n(e,r,_),u=n(i,s,_),c=n(r,a,_),d=n(h,u,_),p=n(l,c,_),o.push(d,p);return o}i.__esModule=!0,i.default=function(t,e,i){var r=t.shape,n=r.x,l=r.y,u=r.width,c=r.height,d=r.radius,p=[];if(p.push(n,l+d),s(n,l+c-d,n,l+c,n+d,l+c,p),s(n+u-d,l+c,n+u,l+c,n+u,l+c-d,p),s(n+u,l+d,n+u,l,n+u-d,l,p),s(n+d,l,n,l,n,l+d+1e-10,p),t.fill){for(var f=(0,h.hex2rgb)(t.fillColor),_=t.fillAlpha,m=f[0]*_,g=f[1]*_,v=f[2]*_,y=e.points,b=e.indices,T=y.length/6,E=(0,a.default)(p,null,2),x=0,w=E.length;x0?1:0}i.__esModule=!0;var n=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],h=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],l=[],u=[];!function(){for(var t=0;t<16;t++){var e=[];u.push(e);for(var i=0;i<16;i++)for(var c=r(s[t]*s[i]+o[t]*a[i]),d=r(a[t]*s[i]+h[t]*a[i]),p=r(s[t]*o[i]+o[t]*h[i]),f=r(a[t]*o[i]+h[t]*h[i]),_=0;_<16;_++)if(s[_]===c&&a[_]===d&&o[_]===p&&h[_]===f){e.push(_);break}}for(var m=0;m<16;m++){var g=new n.default;g.set(s[m],a[m],o[m],h[m],0,0),l.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 h[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]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=l[c.inv(e)];n.tx=i,n.ty=r,t.append(n)}};i.default=c},{"./Matrix":67}],67:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;r(this,t),this.a=e,this.b=i,this.c=n,this.d=s,this.tx=a,this.ty=o,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,i,r,n,s){return this.a=t,this.b=e,this.c=i,this.d=r,this.tx=n,this.ty=s,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},t.prototype.apply=function(t,e){e=e||new s.default;var i=t.x,r=t.y;return e.x=this.a*i+this.c*r+this.tx,e.y=this.b*i+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new s.default;var i=1/(this.a*this.d+this.c*-this.b),r=t.x,n=t.y;return e.x=this.d*i*r+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*n+-this.b*i*r+(-this.ty*this.a+this.tx*this.b)*i,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),r=this.a,n=this.c,s=this.tx;return this.a=r*e-this.b*i,this.b=r*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=s*e-this.ty*i,this.ty=s*i+this.ty*e,this},t.prototype.append=function(t){var e=this.a,i=this.b,r=this.c,n=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*r,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,i,r,n,s,a,o,h){var l=Math.sin(a),u=Math.cos(a),c=Math.cos(h),d=Math.sin(h),p=-Math.sin(o),f=Math.cos(o),_=u*n,m=l*n,g=-l*s,v=u*s;return this.a=c*_+d*g,this.b=c*m+d*v,this.c=p*_+f*g,this.d=p*m+f*v,this.tx=t+(i*_+r*g),this.ty=e+(i*m+r*v),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var i=this.a,r=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,i=this.b,r=this.c,n=this.d,s=-Math.atan2(-r,n),a=Math.atan2(i,e);return Math.abs(s+a)<1e-5?(t.rotation=a,e<0&&n>=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(r*r+n*n),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,r=this.d,n=this.tx,s=t*r-e*i;return this.a=r/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-r*n)/s,this.ty=-(t*this.ty-e*n)/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},n(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();i.default=a},{"./Point":69}],68:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this._x=n,this._y=s,this.cb=e,this.scope=i}return t.prototype.set=function(t,e){var i=t||0,r=e||(0!==e?i:0);this._x===i&&this._y===r||(this._x=i,this._y=r,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();i.default=s},{}],69:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=i}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();i.default=n},{}],70:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./Point");Object.defineProperty(i,"Point",{enumerable:!0,get:function(){return r(n).default}});var s=t("./ObservablePoint");Object.defineProperty(i,"ObservablePoint",{enumerable:!0,get:function(){return r(s).default}});var a=t("./Matrix");Object.defineProperty(i,"Matrix",{enumerable:!0,get:function(){return r(a).default}});var o=t("./GroupD8");Object.defineProperty(i,"GroupD8",{enumerable:!0,get:function(){return r(o).default}});var h=t("./shapes/Circle");Object.defineProperty(i,"Circle",{enumerable:!0,get:function(){return r(h).default}});var l=t("./shapes/Ellipse");Object.defineProperty(i,"Ellipse",{enumerable:!0,get:function(){return r(l).default}});var u=t("./shapes/Polygon");Object.defineProperty(i,"Polygon",{enumerable:!0,get:function(){return r(u).default}});var c=t("./shapes/Rectangle");Object.defineProperty(i,"Rectangle",{enumerable:!0,get:function(){return r(c).default}});var d=t("./shapes/RoundedRectangle");Object.defineProperty(i,"RoundedRectangle",{enumerable:!0,get:function(){return r(d).default}})},{"./GroupD8":66,"./Matrix":67,"./ObservablePoint":68,"./Point":69,"./shapes/Circle":71,"./shapes/Ellipse":72,"./shapes/Polygon":73,"./shapes/Rectangle":74,"./shapes/RoundedRectangle":75}],71:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("./Rectangle")),s=t("../../const"),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r(this,t),this.x=e,this.y=i,this.radius=n,this.type=s.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var i=this.radius*this.radius,r=this.x-t,n=this.y-e;return r*=r,n*=n,r+n<=i},t.prototype.getBounds=function(){return new n.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();i.default=a},{"../../const":46,"./Rectangle":74}],72:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("./Rectangle")),s=t("../../const"),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=e,this.y=i,this.width=n,this.height=a,this.type=s.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var i=(t-this.x)/this.width,r=(e-this.y)/this.height;return i*=i,r*=r,i+r<=1},t.prototype.getBounds=function(){return new n.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();i.default=a},{"../../const":46,"./Rectangle":74}],73:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("../Point")),s=t("../../const"),a=function(){function t(){for(var e=arguments.length,i=Array(e),a=0;ae!=l>e&&t<(e-o)/(l-o)*(h-a)+a&&(i=!i)}return i},t}();i.default=a},{"../../const":46,"../Point":69}],74:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=Number(e),this.y=Number(i),this.width=Number(n),this.height=Number(a),this.type=s.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.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(t){var e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=i-e,this.y=r,this.height=n-r},n(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":46}],75:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;r(this,t),this.x=e,this.y=i,this.width=s,this.height=a,this.radius=o,this.type=n.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),r=e-(this.y+this.radius),n=this.radius*this.radius;if(i*i+r*r<=n)return!0;if((i=t-(this.x+this.width-this.radius))*i+r*r<=n)return!0;if(r=e-(this.y+this.height-this.radius),i*i+r*r<=n)return!0;if((i=t-(this.x+this.radius))*i+r*r<=n)return!0}return!1},t}();i.default=s},{"../../const":46}],76:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;iw?w:x,e.moveTo(y,b+x),e.lineTo(y,b+E-x),e.quadraticCurveTo(y,b+E,y+x,b+E),e.lineTo(y+T-x,b+E),e.quadraticCurveTo(y+T,b+E,y+T,b+E-x),e.lineTo(y+T,b+x),e.quadraticCurveTo(y+T,b,y+T-x,b),e.lineTo(y+x,b),e.quadraticCurveTo(y,b,y,b+x),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore()},t.prototype.destroy=function(){},t}();i.default=s},{"../../../const":46}],79:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return(0,n.default)()?(t[r.BLEND_MODES.NORMAL]="source-over",t[r.BLEND_MODES.ADD]="lighter",t[r.BLEND_MODES.MULTIPLY]="multiply",t[r.BLEND_MODES.SCREEN]="screen",t[r.BLEND_MODES.OVERLAY]="overlay",t[r.BLEND_MODES.DARKEN]="darken",t[r.BLEND_MODES.LIGHTEN]="lighten",t[r.BLEND_MODES.COLOR_DODGE]="color-dodge",t[r.BLEND_MODES.COLOR_BURN]="color-burn",t[r.BLEND_MODES.HARD_LIGHT]="hard-light",t[r.BLEND_MODES.SOFT_LIGHT]="soft-light",t[r.BLEND_MODES.DIFFERENCE]="difference",t[r.BLEND_MODES.EXCLUSION]="exclusion",t[r.BLEND_MODES.HUE]="hue",t[r.BLEND_MODES.SATURATION]="saturate",t[r.BLEND_MODES.COLOR]="color",t[r.BLEND_MODES.LUMINOSITY]="luminosity"):(t[r.BLEND_MODES.NORMAL]="source-over",t[r.BLEND_MODES.ADD]="lighter",t[r.BLEND_MODES.MULTIPLY]="source-over",t[r.BLEND_MODES.SCREEN]="source-over",t[r.BLEND_MODES.OVERLAY]="source-over",t[r.BLEND_MODES.DARKEN]="source-over",t[r.BLEND_MODES.LIGHTEN]="source-over",t[r.BLEND_MODES.COLOR_DODGE]="source-over",t[r.BLEND_MODES.COLOR_BURN]="source-over",t[r.BLEND_MODES.HARD_LIGHT]="source-over",t[r.BLEND_MODES.SOFT_LIGHT]="source-over",t[r.BLEND_MODES.DIFFERENCE]="source-over",t[r.BLEND_MODES.EXCLUSION]="source-over",t[r.BLEND_MODES.HUE]="source-over",t[r.BLEND_MODES.SATURATION]="source-over",t[r.BLEND_MODES.COLOR]="source-over",t[r.BLEND_MODES.LUMINOSITY]="source-over"),t[r.BLEND_MODES.NORMAL_NPM]=t[r.BLEND_MODES.NORMAL],t[r.BLEND_MODES.ADD_NPM]=t[r.BLEND_MODES.ADD],t[r.BLEND_MODES.SCREEN_NPM]=t[r.BLEND_MODES.SCREEN],t};var r=t("../../../const"),n=function(t){return t&&t.__esModule?t:{default:t}}(t("./canUseNewCanvasBlendModes"))},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../../const"),s=function(t){return t&&t.__esModule?t:{default:t}}(t("../../settings")),a=function(){function t(e){r(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=s.default.GC_MAX_IDLE,this.checkCountMax=s.default.GC_MAX_CHECK_COUNT,this.mode=s.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==n.GC_MODES.MANUAL&&++this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,i=!1,r=0;rthis.maxIdle&&(t.destroyTexture(n,!0),e[r]=null,i=!0)}if(i){for(var s=0,a=0;a=0;i--)this.unload(t.children[i])},t}();i.default=a},{"../../const":46,"../../settings":101}],83:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("pixi-gl-core"),s=t("../../const"),a=function(t){return t&&t.__esModule?t:{default:t}}(t("./utils/RenderTarget")),o=t("../../utils"),h=function(){function t(e){r(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,r=!!t._glRenderTargets;if(!t.hasLoaded)return null;var o=this.renderer.boundTextures;if(void 0===e){e=0;for(var h=0;h 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=c},{"../../../const":46,"../../../settings":101,"../../../utils":124,"./extractUniformsFromSrc":87}],87:[function(t,e,i){"use strict";function r(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),i={},r=void 0,s=t.replace(/\s+/g," ").split(/\s*;\s*/),a=0;a-1){var h=o.split(" "),l=h[1],u=h[2],c=1;u.indexOf("[")>-1&&(u=(r=u.split(/\[|]/))[0],c*=Number(r[1])),u.match(e)||(i[u]={value:n(l,c),name:u,type:l})}}return i}i.__esModule=!0,i.default=function(t,e,i){var n=r(t),s=r(e);return Object.assign(n,s)};var n=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")).default.shader.defaultValue},{"pixi-gl-core":12}],88:[function(t,e,i){"use strict";i.__esModule=!0,i.calculateScreenSpaceMatrix=function(t,e,i){var r=t.identity();return r.translate(e.x/i.width,e.y/i.height),r.scale(i.width,i.height),r},i.calculateNormalizedScreenSpaceMatrix=function(t,e,i){var r=t.identity();r.translate(e.x/i.width,e.y/i.height);var n=i.width/e.width,s=i.height/e.height;return r.scale(n,s),r},i.calculateSpriteMatrix=function(t,e,i,n){var s=n.worldTransform.copy(r.Matrix.TEMP_MATRIX),a=n._texture.baseTexture,o=t.identity(),h=i.height/i.width;o.translate(e.x/i.width,e.y/i.height),o.scale(1,h);var l=i.width/a.width,u=i.height/a.height;return s.tx/=a.width*l,s.ty/=a.width*l,s.invert(),o.prepend(s),o.scale(1,1/h),o.scale(l,u),o.translate(n.anchor.x,n.anchor.y),o};var r=t("../../../math")},{"../../../math":70}],89:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(t){return t&&t.__esModule?t:{default:t}}(t("../Filter")),o=t("../../../../math"),h=(t("path"),function(t){function e(i){r(this,e);var s=new o.Matrix,a=n(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 r=this.maskSprite;this.uniforms.mask=r._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,r),this.uniforms.alpha=r.worldAlpha,t.applyFilter(this,e,i)},e}(a.default));i.default=h},{"../../../../math":70,"../Filter":86,path:23}],90:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var o=r(t("./WebGLManager")),h=r(t("../utils/RenderTarget")),l=r(t("../utils/Quad")),u=t("../../../math"),c=r(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")),p=r(t("bit-twiddle")),f=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 r=n(this,t.call(this,i));return r.gl=r.renderer.gl,r.quad=new l.default(r.gl,i.state.attribState),r.shaderCache={},r.pool={},r.filterData=null,r}return s(e,t),e.prototype.pushFilter=function(t,e){var i=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var n=new f;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=i._activeRenderTarget,this.renderer._activeRenderTarget.filterData=r={index:0,stack:[n]},this.filterData=r}var s=r.stack[++r.index];s||(s=r.stack[r.index]=new f);var a=e[0].resolution,o=0|e[0].padding,h=t.filterArea||t.getBounds(!0),l=s.sourceFrame,u=s.destinationFrame;l.x=(h.x*a|0)/a,l.y=(h.y*a|0)/a,l.width=(h.width*a|0)/a,l.height=(h.height*a|0)/a,r.stack[0].renderTarget.transform||e[0].autoFit&&l.fit(r.stack[0].destinationFrame),l.pad(o),u.width=l.width,u.height=l.height;var c=this.getPotRenderTarget(i.gl,l.width,l.height,a);s.target=t,s.filters=e,s.resolution=a,s.renderTarget=c,c.setFrame(u,l),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 r=i.filters;if(1===r.length)r[0].apply(this,i.renderTarget,e.renderTarget,!1,i),this.freePotRenderTarget(i.renderTarget);else{var n=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 "),i1&&void 0!==arguments[1]?arguments[1]:[];return e[r.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[r.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[r.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[r.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[r.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e};var r=t("../../../const")},{"../../../const":46}],99:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[r.DRAW_MODES.POINTS]=t.POINTS,e[r.DRAW_MODES.LINES]=t.LINES,e[r.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[r.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[r.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[r.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[r.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e};var r=t("../../../const")},{"../../../const":46}],100:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},{}],101:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=r(t("./utils/maxRecommendedTextures")),s=r(t("./utils/canUploadSameBuffer"));i.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,n.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,s.default)()}},{"./utils/canUploadSameBuffer":121,"./utils/maxRecommendedTextures":126}],102:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;i=r&&p.x=n&&p.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,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(d.default);i.default=f},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":124}],103:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=r(t("../../renderers/canvas/CanvasRenderer")),a=t("../../const"),o=t("../../math"),h=r(t("./CanvasTinter")),l=new o.Matrix,u=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,i=this.renderer,r=e._frame.width,n=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(l),s=l,o.GroupD8.matrixAppendRotationInv(s,e.rotate,u,c),u=0,c=0),u-=r/2,c-=n/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 p=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=h.default.getTintedTexture(t,t.tint)),i.context.drawImage(t.tintedTexture,0,0,r*p,n*p,u*i.resolution,c*i.resolution,r*i.resolution,n*i.resolution)):i.context.drawImage(e.baseTexture.source,e._frame.x*p,e._frame.y*p,r*p,n*p,u*i.resolution,c*i.resolution,r*i.resolution,n*i.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();i.default=u,s.default.registerPlugin("sprite",u)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(t,e,i){"use strict";i.__esModule=!0;var r=t("../../utils"),n={getTintedTexture:function(t,e){var i=t._texture,r="#"+("00000"+(0|(e=n.roundColor(e))).toString(16)).substr(-6);i.tintCache=i.tintCache||{};var s=i.tintCache[r],a=void 0;if(s){if(s.tintId===i._updateID)return i.tintCache[r];a=i.tintCache[r]}else a=n.canvas||document.createElement("canvas");if(n.tintMethod(i,e,a),a.tintId=i._updateID,n.convertTintToImage){var o=new Image;o.src=a.toDataURL(),i.tintCache[r]=o}else i.tintCache[r]=a,n.canvas=null;return a},tintWithMultiply:function(t,e,i){var r=i.getContext("2d"),n=t._frame.clone(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,i.width=Math.ceil(n.width),i.height=Math.ceil(n.height),r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,n.width,n.height),r.globalCompositeOperation="multiply",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithOverlay:function(t,e,i){var r=i.getContext("2d"),n=t._frame.clone(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,i.width=Math.ceil(n.width),i.height=Math.ceil(n.height),r.globalCompositeOperation="copy",r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,n.width,n.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithPerPixel:function(t,e,i){var n=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=Math.ceil(s.width),i.height=Math.ceil(s.height),n.globalCompositeOperation="copy",n.drawImage(t.baseTexture.source,s.x,s.y,s.width,s.height,0,0,s.width,s.height);for(var o=(0,r.hex2rgb)(e),h=o[0],l=o[1],u=o[2],c=n.getImageData(0,0,s.width,s.height),d=c.data,p=0;p=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=m.default.nextPow2(this.currentIndex),r=m.default.log2(i),n=this.buffers[r],s=this.sprites,a=this.groups,o=n.float32View,h=n.uint32View,l=this.boundTextures,u=this.renderer.boundTextures,c=this.renderer.textureGC.count,d=0,y=void 0,b=void 0,T=1,E=0,x=a[0],w=void 0,S=void 0,D=f.premultiplyBlendMode[s[0]._texture.baseTexture.premultipliedAlpha?1:0][s[0].blendMode];x.textureCount=0,x.start=0,x.blend=D,g++;var P=void 0;for(P=0;P0&&(e+="\nelse "),i0&&(i.shadowColor=e.dropShadowColor);for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,f=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,m=0;m3&&void 0!==arguments[3]&&arguments[3],n=this._style.letterSpacing;if(0!==n)for(var s=String.prototype.split.call(t,""),a=e,o=0,h="";o3&&void 0!==arguments[3]?arguments[3]:t._canvas;r=r||i.wordWrap;var s=i.toFontString(),a=t.measureFont(s),o=n.getContext("2d");o.font=s;for(var h=(r?t.wordWrap(e,i,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length),u=0,c=0;c2&&void 0!==arguments[2]?arguments[2]:t._canvas).getContext("2d"),n="",s=e.split("\n"),a=i.wordWrapWidth,o={},h=0;ha)for(var p=u[c].split(""),f=0;fl?(n+="\n"+_,l=a-m):(0===f&&(n+=" "),n+=_,l-=m)}else{var g=d+r.measureText(" ").width;0===c||g>l?(c>0&&(n+="\n"),n+=u[c],l=a-d):(l-=g,n+=" "+u[c])}}ha;--c){for(var _=0;_=0;i--){var r=e[i].trim();/([\"\'])[^\'\"]+\1/.test(r)||(r='"'+r+'"'),e[i]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},o(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=s(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=s(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){a(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=s(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();i.default=c},{"../const":46,"../utils":124}],111:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=r(t("./BaseTexture")),h=r(t("../settings")),l=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments[2],o=arguments[3];n(this,e);var l=s(this,t.call(this,null,a));return l.resolution=o||h.default.RESOLUTION,l.width=i,l.height=r,l.realWidth=l.width*l.resolution,l.realHeight=l.height*l.resolution,l.scaleMode=void 0!==a?a:h.default.SCALE_MODE,l.hasLoaded=!0,l._glRenderTargets={},l._canvasRenderTarget=null,l.valid=!1,l}return a(e,t),e.prototype.resize=function(t,e){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(o.default);i.default=l},{"../settings":101,"./BaseTexture":112}],112:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../utils"),h=r(t("../settings")),l=r(t("eventemitter3")),u=r(t("../utils/determineCrossOrigin")),c=r(t("bit-twiddle")),d=function(t){function e(i,r,a){n(this,e);var l=s(this,t.call(this));return l.uid=(0,o.uid)(),l.touched=0,l.resolution=a||h.default.RESOLUTION,l.width=100,l.height=100,l.realWidth=100,l.realHeight=100,l.scaleMode=void 0!==r?r:h.default.SCALE_MODE,l.hasLoaded=!1,l.isLoading=!1,l.source=null,l.origSource=null,l.imageType=null,l.sourceScale=1,l.premultipliedAlpha=!0,l.imageUrl=null,l.isPowerOfTwo=!1,l.mipmap=h.default.MIPMAP_TEXTURES,l.wrapMode=h.default.WRAP_MODE,l._glTextures={},l._enabled=0,l._virtalBoundId=-1,l._destroyed=!1,l.textureCacheIds=[],i&&l.loadSource(i),l}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._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=c.default.isPow2(this.realWidth)&&c.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var i=!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(),i&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var r=this;if(t.onload=function(){r._updateImageType(),t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r._sourceLoaded(),"svg"!==r.imageType?r.emit("loaded",r):r._loadSvgSource())},t.onerror=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===r.imageType)return void r._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,o.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var i=t.subType.split("+")[0];if(!(e=(0,o.getUrlFileExtension)("."+i)))throw new Error("Invalid image type in data URI.")}else(e=(0,o.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,o.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 i=(0,o.getSvgSize)(t),r=i.width,n=i.height;if(!r||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(r*this.sourceScale),this.realHeight=Math.round(n*this.sourceScale),this._updateDimensions();var s=document.createElement("canvas");s.width=this.realWidth,s.height=this.realHeight,s._pixiId="canvas_"+(0,o.uid)(),s.getContext("2d").drawImage(this.source,0,0,r,n,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=s,e.addToCache(this,s._pixiId),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 o.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},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,r,n){var s=o.BaseTextureCache[t];if(!s){var a=new Image;void 0===i&&0!==t.indexOf("data:")?a.crossOrigin=(0,u.default)(t):i&&(a.crossOrigin="string"==typeof i?i:"anonymous"),(s=new e(a,r)).imageUrl=t,n&&(s.sourceScale=n),s.resolution=(0,o.getResolutionOfUrl)(t),a.src=t,e.addToCache(s,t)}return s},e.fromCanvas=function(t,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=r+"_"+(0,o.uid)());var n=o.BaseTextureCache[t._pixiId];return n||(n=new e(t,i),e.addToCache(n,t._pixiId)),n},e.from=function(t,i,r){if("string"==typeof t)return e.fromImage(t,void 0,i,r);if(t instanceof HTMLImageElement){var n=t.src,s=o.BaseTextureCache[n];return s||((s=new e(t,i)).imageUrl=n,r&&(s.sourceScale=r),s.resolution=(0,o.getResolutionOfUrl)(n),e.addToCache(s,n)),s}return t instanceof HTMLCanvasElement?e.fromCanvas(t,i):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),o.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),o.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=o.BaseTextureCache[t];if(e){var i=e.textureCacheIds.indexOf(t);return i>-1&&e.textureCacheIds.splice(i,1),delete o.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r0&&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,r,n){return new e(new o.default(t,i,r,n))},e}(r(t("./Texture")).default);i.default=h},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.baseTexture=e,this.textures={},this.data=i,this.resolution=this._updateResolution(n||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return n(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,i=(0,a.getResolutionOfUrl)(t,null);return null===i&&(i=void 0!==e?parseFloat(e):1),1!==i&&(this.baseTexture.resolution=i,this.baseTexture.update()),i},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var i=e,r=t.BATCH_SIZE;i-e0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();i.default=o},{"../":65,"../utils":124}],115:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}i.__esModule=!0;var h=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(l.default.fromCanvas(t,i,r))},e.fromVideo=function(t,i){return"string"==typeof t?e.fromVideoUrl(t,i):new e(u.default.fromVideo(t,i))},e.fromVideoUrl=function(t,i){return new e(u.default.fromUrl(t,i))},e.from=function(t){if("string"==typeof t){var i=f.TextureCache[t];return i||(null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t))}return t instanceof HTMLImageElement?new e(l.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,_.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof l.default?new e(t):t},e.fromLoader=function(t,i,r){var n=new l.default(t,void 0,(0,f.getResolutionOfUrl)(i)),s=new e(n);return n.imageUrl=i,r||(r=i),l.default.addToCache(s.baseTexture,r),e.addToCache(s,r),r!==i&&(l.default.addToCache(s.baseTexture,i),e.addToCache(s,i)),s},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),f.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),f.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=f.TextureCache[t];if(e){var i=e.textureCacheIds.indexOf(t);return i>-1&&e.textureCacheIds.splice(i,1),delete f.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: X: "+t.x+" + "+t.width+" = "+(t.x+t.width)+" > "+this.baseTexture.width+" Y: "+t.y+" + "+t.height+" = "+(t.y+t.height)+" > "+this.baseTexture.height);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}(d.default);i.default=m,m.EMPTY=new m(new l.default),o(m.EMPTY),o(m.EMPTY.baseTexture),m.WHITE=function(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new m(new l.default(t))}(),o(m.WHITE),o(m.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":124,"./BaseTexture":112,"./TextureUvs":116,"./VideoBaseTexture":117,eventemitter3:3}],116:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("../math/GroupD8")),s=function(){function t(){r(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 r=e.width,s=e.height;if(i){var a=t.width/2/r,o=t.height/2/s,h=t.x/r+a,l=t.y/s+o;i=n.default.add(i,n.default.NW),this.x0=h+a*n.default.uX(i),this.y0=l+o*n.default.uY(i),i=n.default.add(i,2),this.x1=h+a*n.default.uX(i),this.y1=l+o*n.default.uY(i),i=n.default.add(i,2),this.x2=h+a*n.default.uX(i),this.y2=l+o*n.default.uY(i),i=n.default.add(i,2),this.x3=h+a*n.default.uX(i),this.y3=l+o*n.default.uY(i)}else this.x0=t.x/r,this.y0=t.y/s,this.x1=(t.x+t.width)/r,this.y1=t.y/s,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/s,this.x3=t.x/r,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":66}],117:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var 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,c.UPDATE_PRIORITY.HIGH),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&&(h.default.removeFromCache(this.source._pixiId),delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,i){t._pixiId||(t._pixiId="video_"+(0,l.uid)());var r=l.BaseTextureCache[t._pixiId];return r||(r=new e(t,i),h.default.addToCache(r,t._pixiId)),r},e.fromUrl=function(t,i){var r=document.createElement("video");if(r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),Array.isArray(t))for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new h.default(t,e,i))},t.prototype.addOnce=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new h.default(t,e,i,!0))},t.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*a.default.TARGET_FPMS*this.speed;for(var i=this._head,r=i.next;r;)r=r.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else 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=l},{"../const":46,"../settings":101,"./TickerListener":119}],119:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r(this,t),this.fn=e,this.context=i,this.priority=n,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.previous;return this.next=t?null:e,this.previous=null,e},t}();i.default=n},{}],120:[function(t,e,i){"use strict";i.__esModule=!0,i.Ticker=i.shared=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("./Ticker")),n=new r.default;n.autoStart=!0,n.destroy=function(){},i.shared=n,i.Ticker=r.default},{"./Ticker":118}],121:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],122:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t){for(var e=6*t,i=new Uint16Array(e),r=0,n=0;r1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,n||(n=document.createElement("a")),n.href=t;var i=!(t=r.default.parse(n.href)).port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&i&&t.protocol===e.protocol?"":"anonymous"};var r=function(t){return t&&t.__esModule?t:{default:t}}(t("url")),n=void 0},{url:29}],124:[function(t,e,i){"use strict";function r(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}function n(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0,i.premultiplyBlendMode=i.BaseTextureCache=i.TextureCache=i.mixins=i.pluginTarget=i.EventEmitter=i.removeItems=i.isMobile=void 0,i.uid=function(){return++p},i.hex2rgb=function(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},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]|0)},i.getResolutionOfUrl=function(t,e){var i=a.default.RETINA_PREFIX.exec(t);return i?parseFloat(i[1]):void 0!==e?e:1},i.decomposeDataUri=function(t){var e=s.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=s.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()},i.getSvgSize=function(t){var e=s.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(){f=!0},i.sayHello=function(t){if(!f){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+s.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+s.VERSION+" - "+t+" - http://www.pixijs.com/");f=!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),r=!(!i||!i.getContextAttributes().stencil);if(i){var n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,r}catch(t){return!1}},i.sign=function(t){return 0===t?0:t<0?-1:1},i.destroyTextureCache=function(){var t=void 0;for(t in _)_[t].destroy();for(t in m)m[t].destroy()},i.clearTextureCache=function(){var t=void 0;for(t in _)delete _[t];for(t in m)delete m[t]},i.correctBlendMode=function(t,e){return g[e?1:0][t]},i.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var i=t>>16&255,r=t>>8&255,n=255&t;return i=i*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(255*e<<24)+(i<<16)+(r<<8)+n},i.premultiplyRgba=function(t,e,i,r){return i=i||new Float32Array(4),r||void 0===r?(i[0]=t[0]*e,i[1]=t[1]*e,i[2]=t[2]*e):(i[0]=t[0],i[1]=t[1],i[2]=t[2]),i[3]=e,i},i.premultiplyTintToRgba=function(t,e,i,r){return i=i||new Float32Array(4),i[0]=(t>>16&255)/255,i[1]=(t>>8&255)/255,i[2]=(255&t)/255,(r||void 0===r)&&(i[0]*=e,i[1]*=e,i[2]*=e),i[3]=e,i};var s=t("../const"),a=n(t("../settings")),o=n(t("eventemitter3")),h=n(t("./pluginTarget")),l=r(t("./mixin")),u=r(t("ismobilejs")),c=n(t("remove-array-items")),d=n(t("./mapPremultipliedBlendModes")),p=0,f=!1;i.isMobile=u,i.removeItems=c.default,i.EventEmitter=o.default,i.pluginTarget=h.default,i.mixins=l;var _=i.TextureCache=Object.create(null),m=i.BaseTextureCache=Object.create(null),g=i.premultiplyBlendMode=(0,d.default)()},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":125,"./mixin":127,"./pluginTarget":128,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],125:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(){for(var t=[],e=[],i=0;i<32;i++)t[i]=i,e[i]=i;t[r.BLEND_MODES.NORMAL_NPM]=r.BLEND_MODES.NORMAL,t[r.BLEND_MODES.ADD_NPM]=r.BLEND_MODES.ADD,t[r.BLEND_MODES.SCREEN_NPM]=r.BLEND_MODES.SCREEN,e[r.BLEND_MODES.NORMAL]=r.BLEND_MODES.NORMAL_NPM,e[r.BLEND_MODES.ADD]=r.BLEND_MODES.ADD_NPM,e[r.BLEND_MODES.SCREEN]=r.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(e),n.push(t),n};var r=t("../const")},{"../const":46}],126:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t){return r.default.tablet||r.default.phone?4:t};var r=function(t){return t&&t.__esModule?t:{default:t}}(t("ismobilejs"))},{ismobilejs:4}],127:[function(t,e,i){"use strict";function r(t,e){if(t&&e)for(var i=Object.keys(e),r=0;r1?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];)r-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei&&this.onLoop()),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(e){this.stop(),t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var i=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:{};n(this,e);var a=s(this,t.call(this));return a._textWidth=0,a._textHeight=0,a._glyphs=[],a._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},a.font=r.font,a._text=i,a._maxWidth=0,a._maxLineHeight=0,a._anchor=new l.default(function(){a.dirty=!0},a,0,0),a.dirty=!1,a.updateText(),a}return a(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],i=this._font.size/t.size,r=new h.Point,n=[],s=[],a=null,o=0,l=0,u=0,c=-1,d=0,p=0,f=0,_=0;_0&&r.x*i>this._maxWidth)h.utils.removeItems(n,c-p,_-c),_=c,c=-1,++p,s.push(d),l=Math.max(l,d),u++,r.x=0,r.y+=t.lineHeight,a=null;else{var g=t.chars[m];g&&(a&&g.kerning[a]&&(r.x+=g.kerning[a]),n.push({texture:g.texture,line:u,charCode:m,position:new h.Point(r.x+g.xOffset,r.y+g.yOffset)}),o=r.x+(g.texture.width+g.xOffset),r.x+=g.xAdvance,f=Math.max(f,g.yOffset+g.texture.height),a=m)}}s.push(o),l=Math.max(l,o);for(var v=[],y=0;y<=u;y++){var b=0;"right"===this._font.align?b=l-s[y]:"center"===this._font.align&&(b=(l-s[y])/2),v.push(b)}for(var T=n.length,E=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:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(h.Container);i.default=c,c.fonts={}},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101}],136:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:100,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;n(this,e);var o=s(this,t.call(this,i));return o.tileTransform=new h.TransformStatic,o._width=r,o._height=a,o._canvasPattern=null,o.uvTransform=i.transform||new u.default(i),o.pluginName="tilingSprite",o.uvRespectAnchor=!1,o}return a(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture)},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var i=t.context,r=this.worldTransform,n=t.resolution,s=e.baseTexture,a=s.resolution,o=this.tilePosition.x/this.tileScale.x%e._frame.width*a,u=this.tilePosition.y/this.tileScale.y%e._frame.height*a;if(!this._canvasPattern){var c=new h.CanvasRenderTarget(e._frame.width,e._frame.height,a);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=l.default.getTintedTexture(this,this.tint)),c.context.drawImage(this.tintedTexture,0,0)):c.context.drawImage(s.source,-e._frame.x*a,-e._frame.y*a),this._canvasPattern=c.context.createPattern(c.canvas,"repeat")}i.globalAlpha=this.worldAlpha,i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),t.setBlendMode(this.blendMode),i.fillStyle=this._canvasPattern,i.scale(this.tileScale.x/a,this.tileScale.y/a);var d=this.anchor.x*-this._width,p=this.anchor.y*-this._height;this.uvRespectAnchor?(i.translate(o,u),i.fillRect(-o+d,-u+p,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a)):(i.translate(o+d,u+p),i.fillRect(-o,-u,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new h.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,c);var e=this._width,i=this._height,r=-e*this.anchor._x;if(c.x>=r&&c.x=n&&c.y0&&void 0!==arguments[0]?arguments[0]:new r.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":65}],141:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0,i.BitmapText=i.TilingSpriteRenderer=i.TilingSprite=i.TextureTransform=i.AnimatedSprite=void 0;var n=t("./AnimatedSprite");Object.defineProperty(i,"AnimatedSprite",{enumerable:!0,get:function(){return r(n).default}});var s=t("./TextureTransform");Object.defineProperty(i,"TextureTransform",{enumerable:!0,get:function(){return r(s).default}});var a=t("./TilingSprite");Object.defineProperty(i,"TilingSprite",{enumerable:!0,get:function(){return r(a).default}});var o=t("./webgl/TilingSpriteRenderer");Object.defineProperty(i,"TilingSpriteRenderer",{enumerable:!0,get:function(){return r(o).default}});var h=t("./BitmapText");Object.defineProperty(i,"BitmapText",{enumerable:!0,get:function(){return r(h).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition")},{"./AnimatedSprite":134,"./BitmapText":135,"./TextureTransform":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=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")),o=t("../../core/const"),h=(t("path"),new a.Matrix),l=function(t){function e(i){r(this,e);var s=n(this,t.call(this,i));return s.shader=null,s.simpleShader=null,s.quad=null,s}return s(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new a.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new a.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new a.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,i=this.quad;e.bindVao(i.vao);var r=i.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((r=i.uvs)[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y),i.upload();var n=t._texture,s=n.baseTexture,l=t.tileTransform.localTransform,u=t.uvTransform,c=s.isPowerOfTwo&&n.frame.width===s.width&&n.frame.height===s.height;c&&(s._glTextures[e.CONTEXT_UID]?c=s.wrapMode!==o.WRAP_MODES.CLAMP:s.wrapMode===o.WRAP_MODES.CLAMP&&(s.wrapMode=o.WRAP_MODES.REPEAT));var d=c?this.simpleShader:this.shader;e.bindShader(d);var p=n.width,f=n.height,_=t._width,m=t._height;h.set(l.a*p/_,l.b*p/m,l.c*f/_,l.d*f/m,l.tx/_,l.ty/m),h.invert(),c?h.prepend(u.mapCoord):(d.uniforms.uMapCoord=u.mapCoord.toArray(!0),d.uniforms.uClampFrame=u.uClampFrame,d.uniforms.uClampOffset=u.uClampOffset),d.uniforms.uTransform=h.toArray(!0),d.uniforms.uColor=a.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,d.uniforms.uColor,s.premultipliedAlpha),d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=e.bindTexture(n),e.setBlendMode(a.utils.correctBlendMode(t.blendMode,s.premultipliedAlpha)),i.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(a.ObjectRenderer);i.default=l,a.WebGLRenderer.registerPlugin("tilingSprite",l)},{"../../core":65,"../../core/const":46,path:23}],143:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=function(){function t(t,e){for(var i=0;i=i&&(o=t-h-1),a+=l=l.replace("%value%",e[o]),a+="\n"}return s=s.replace("%blur%",a),s=s.replace("%size%",t)};var r={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},n=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],147:[function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){var i=Math.ceil(t/2),n=r,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}},{}],149:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return i.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],i.alpha=1,i}return s(e,t),e.prototype._loadMatrix=function(t){var e=t;arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this._multiply(e,this.uniforms.m,t),e=this._colorMatrix(e)),this.uniforms.m=e},e.prototype._multiply=function(t,e,i){return t[0]=e[0]*i[0]+e[1]*i[5]+e[2]*i[10]+e[3]*i[15],t[1]=e[0]*i[1]+e[1]*i[6]+e[2]*i[11]+e[3]*i[16],t[2]=e[0]*i[2]+e[1]*i[7]+e[2]*i[12]+e[3]*i[17],t[3]=e[0]*i[3]+e[1]*i[8]+e[2]*i[13]+e[3]*i[18],t[4]=e[0]*i[4]+e[1]*i[9]+e[2]*i[14]+e[3]*i[19]+e[4],t[5]=e[5]*i[0]+e[6]*i[5]+e[7]*i[10]+e[8]*i[15],t[6]=e[5]*i[1]+e[6]*i[6]+e[7]*i[11]+e[8]*i[16],t[7]=e[5]*i[2]+e[6]*i[7]+e[7]*i[12]+e[8]*i[17],t[8]=e[5]*i[3]+e[6]*i[8]+e[7]*i[13]+e[8]*i[18],t[9]=e[5]*i[4]+e[6]*i[9]+e[7]*i[14]+e[8]*i[19]+e[9],t[10]=e[10]*i[0]+e[11]*i[5]+e[12]*i[10]+e[13]*i[15],t[11]=e[10]*i[1]+e[11]*i[6]+e[12]*i[11]+e[13]*i[16],t[12]=e[10]*i[2]+e[11]*i[7]+e[12]*i[12]+e[13]*i[17],t[13]=e[10]*i[3]+e[11]*i[8]+e[12]*i[13]+e[13]*i[18],t[14]=e[10]*i[4]+e[11]*i[9]+e[12]*i[14]+e[13]*i[19]+e[14],t[15]=e[15]*i[0]+e[16]*i[5]+e[17]*i[10]+e[18]*i[15],t[16]=e[15]*i[1]+e[16]*i[6]+e[17]*i[11]+e[18]*i[16],t[17]=e[15]*i[2]+e[16]*i[7]+e[17]*i[12]+e[18]*i[17],t[18]=e[15]*i[3]+e[16]*i[8]+e[17]*i[13]+e[18]*i[18],t[19]=e[15]*i[4]+e[16]*i[9]+e[17]*i[14]+e[18]*i[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var i=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.greyscale=function(t,e){var i=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var i=Math.cos(t),r=Math.sin(t),n=1/3,s=(0,Math.sqrt)(n),a=[i+(1-i)*n,n*(1-i)-s*r,n*(1-i)+s*r,0,0,n*(1-i)+s*r,i+n*(1-i),n*(1-i)-s*r,0,0,n*(1-i)-s*r,n*(1-i)+s*r,i+n*(1-i),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var i=(t||0)+1,r=-.5*(i-1),n=[i,0,0,0,r,0,i,0,0,r,0,0,i,0,r,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],i=2*t/3+1,r=-.5*(i-1),n=[i,r,r,0,0,r,i,r,0,0,r,r,i,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.colorTone=function(t,e,i,r,n){t=t||.2,e=e||.15;var s=((i=i||16770432)>>16&255)/255,a=(i>>8&255)/255,o=(255&i)/255,h=((r=r||3375104)>>16&255)/255,l=(r>>8&255)/255,u=(255&r)/255,c=[.3,.59,.11,0,0,s,a,o,t,0,h,l,u,e,0,s-h,a-l,o-u,0,0];this._loadMatrix(c,n)},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}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(o.Filter));i.default=h,h.prototype.grayscale=h.prototype.greyscale},{"../../core":65,path:23}],150:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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":65,path:23}],152:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./fxaa/FXAAFilter");Object.defineProperty(i,"FXAAFilter",{enumerable:!0,get:function(){return r(n).default}});var s=t("./noise/NoiseFilter");Object.defineProperty(i,"NoiseFilter",{enumerable:!0,get:function(){return r(s).default}});var a=t("./displacement/DisplacementFilter");Object.defineProperty(i,"DisplacementFilter",{enumerable:!0,get:function(){return r(a).default}});var o=t("./blur/BlurFilter");Object.defineProperty(i,"BlurFilter",{enumerable:!0,get:function(){return r(o).default}});var h=t("./blur/BlurXFilter");Object.defineProperty(i,"BlurXFilter",{enumerable:!0,get:function(){return r(h).default}});var l=t("./blur/BlurYFilter");Object.defineProperty(i,"BlurYFilter",{enumerable:!0,get:function(){return r(l).default}});var u=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(i,"ColorMatrixFilter",{enumerable:!0,get:function(){return r(u).default}});var c=t("./void/VoidFilter");Object.defineProperty(i,"VoidFilter",{enumerable:!0,get:function(){return r(c).default}})},{"./blur/BlurFilter":143,"./blur/BlurXFilter":144,"./blur/BlurYFilter":145,"./colormatrix/ColorMatrixFilter":149,"./displacement/DisplacementFilter":150,"./fxaa/FXAAFilter":151,"./noise/NoiseFilter":153,"./void/VoidFilter":154}],153:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:.5,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();r(this,e);var a=n(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return a.noise=i,a.seed=s,a}return s(e,t),a(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(o.Filter));i.default=h},{"../../core":65,path:23}],154:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var a=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")),o=(t("path"),function(t){function e(){r(this,e);var i=n(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"));return i.glShaderKey="void",i}return s(e,t),e}(a.Filter));i.default=o},{"../../core":65,path:23}],155:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(h.ticker.shared.add(this.update,this,h.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(h.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime=0;l--){var u=h[l],c=this.processInteractive(t,u,i,r,o);if(c){if(!u.parent)continue;o=!1,c&&(t.target&&(r=!1),a=!0)}}return n&&(r&&!t.target&&(e.hitArea?(e.worldTransform.applyInverse(s,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(a=!0)):e.containsPoint&&e.containsPoint(s)&&(a=!0)),e.interactive&&(a&&!t.target&&(t.target=e),i&&i(t,e,!!a))),a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var i=e.length,r=0;r1&&(u=1);var c=Math.sqrt(r*r+n*n),d=this._texture.height/2;r/=c,n/=c,r*=d,n*=d,s[l]=h.x+r,s[l+1]=h.y+n,s[l+2]=h.x-r,s[l+3]=h.y-n,e=h}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(function(t){return t&&t.__esModule?t:{default:t}}(t("./Mesh")).default);i.default=a},{"./Mesh":166}],170:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=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){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,i=e.context,r=t.worldTransform,n=e.resolution;e.roundPixels?i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),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 S=t.canvasPadding/t.worldTransform.a,D=t.canvasPadding/t.worldTransform.d,P=(y+b+T)/3,A=(E+x+w)/3,I=y-P,C=E-A,O=Math.sqrt(I*I+C*C);y=P+I/O*(O+S),E=A+C/O*(O+D),C=x-A,b=P+(I=b-P)/(O=Math.sqrt(I*I+C*C))*(O+S),x=A+C/O*(O+D),C=w-A,T=P+(I=T-P)/(O=Math.sqrt(I*I+C*C))*(O+S),w=A+C/O*(O+D)}n.save(),n.beginPath(),n.moveTo(y,E),n.lineTo(b,x),n.lineTo(T,w),n.closePath(),n.clip();var M=d*m+_*f+p*g-m*f-_*p-d*g,L=y*m+_*T+b*g-m*T-_*b-y*g,R=d*b+y*f+p*T-b*f-y*p-d*T,j=d*m*T+_*b*f+y*p*g-y*m*f-_*p*T-d*b*g,N=E*m+_*w+x*g-m*w-_*x-E*g,k=d*x+E*f+p*w-x*f-E*p-d*w,H=d*m*w+_*x*f+E*p*g-E*m*f-_*p*w-d*x*g;n.transform(L/M,N/M,R/M,k/M,j/M,H/M),n.drawImage(l,0,0,u*h.resolution,c*h.resolution,0,0,u,c),n.restore()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,i=t.vertices,r=i.length/2;e.beginPath();for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:1500,s=arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384;r(this,e);var h=n(this,t.call(this));return a>16384&&(a=16384),a>i&&(a=i),h._properties=[!1,!0,!1,!1,!1],h._maxSize=i,h._batchSize=a,h._glBuffers={},h._bufferToUpdate=0,h.interactiveChildren=!1,h.blendMode=o.BLEND_MODES.NORMAL,h.roundPixels=!0,h.baseTexture=null,h.setProperties(s),h._tint=0,h.tintRgb=new Float32Array(4),h.tint=16777215,h}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[n.CONTEXT_UID];a||(a=t._glBuffers[n.CONTEXT_UID]=this.generateBuffers(t));var h=e[0]._texture.baseTexture;this.renderer.setBlendMode(o.utils.correctBlendMode(t.blendMode,h.premultipliedAlpha));var l=n.gl,u=t.worldTransform.copy(this.tempMatrix);u.prepend(n._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=u.toArray(!0),this.shader.uniforms.uColor=o.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.premultipliedAlpha),this.shader.uniforms.uSampler=n.bindTexture(h);for(var c=0,d=0;cr&&(p=r);var f=a[d];f.uploadDynamic(e,c,p),t._bufferToUpdate===d&&(f.uploadStatic(e,c,p),t._bufferToUpdate=d+1),n.bindVao(f.vao),f.vao.draw(l.TRIANGLES,6*p)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,i=[],r=t._maxSize,n=t._batchSize,s=t._properties,a=0;a0?1:-1})},{}],179:[function(t,e,i){"use strict";var r=function(t){return t&&t.__esModule?t:{default:t}}(t("object-assign"));Object.assign||(Object.assign=r.default)},{"object-assign":5}],180:[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":178,"./Object.assign":179,"./requestAnimationFrame":181}],181:[function(t,e,i){(function(t){"use strict";if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var i=Date.now(),r=["ms","moz","webkit","o"],n=0;n=0;r--)this.add(t.children[r]);return this},t.prototype.destroy=function(){this.ticking&&p.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=f},{"../core":65,"./limiters/CountLimiter":185}],183:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(e instanceof o.BaseTexture){var i=e.source,r=0===i.width?t.canvas.width:Math.min(t.canvas.width,i.width),n=0===i.height?t.canvas.height:Math.min(t.canvas.height,i.height);return t.ctx.drawImage(i,0,0,r,n,0,0,t.canvas.width,t.canvas.height),!0}return!1}i.__esModule=!0;var o=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,l=function(t){function e(i){r(this,e);var s=n(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.registerUploadHook(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=l,o.CanvasRenderer.registerPlugin("prepare",l)},{"../../core":65,"../BasePrepare":182}],184:[function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./webgl/WebGLPrepare");Object.defineProperty(i,"webgl",{enumerable:!0,get:function(){return r(n).default}});var s=t("./canvas/CanvasPrepare");Object.defineProperty(i,"canvas",{enumerable:!0,get:function(){return r(s).default}});var a=t("./BasePrepare");Object.defineProperty(i,"BasePrepare",{enumerable:!0,get:function(){return r(a).default}});var o=t("./limiters/CountLimiter");Object.defineProperty(i,"CountLimiter",{enumerable:!0,get:function(){return r(o).default}});var h=t("./limiters/TimeLimiter");Object.defineProperty(i,"TimeLimiter",{enumerable:!0,get:function(){return r(h).default}})},{"./BasePrepare":182,"./canvas/CanvasPrepare":183,"./limiters/CountLimiter":185,"./limiters/TimeLimiter":186,"./webgl/WebGLPrepare":187}],185:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(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=n},{}],186:[function(t,e,i){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(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,h=1/(1-n),l=this._firstPT;l;)o=l.s+l.c,l.c*=h,l.s=o-l.c,l=l._next;return this},l.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var r,n,s,o,h,l,u,c,d=this._dirty?this.totalDuration():this._totalDuration,p=this._time,f=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||(r=!0,n="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&&(n="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!==f||0===m&&g>0)&&(n="onReverseComplete",r=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&&f<=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?(h=this._time/m,l=this._easeType,u=this._easePower,(1===l||3===l&&h>=.5)&&(h=1-h),3===l&&(h*=2),1===u?h*=h:2===u?h*=h*h:3===u?h*=h*h*h:4===u&&(h*=h*h*h*h),1===l?this.ratio=1-h:2===l?this.ratio=h:this._time/m<.5?this.ratio=h/2:this.ratio=1-h/2):this.ratio=this._ease.getRatio(this._time/m)),p!==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=p,this._totalTime=f,this._rawPrevTime=g,this._cycle=_,a.lazyTweens.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/m):r&&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!==p&&t>=0&&(this._active=!0),0===f&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):n||(n="_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!==f||n)&&this._callback("onUpdate")),this._cycle!==_&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),n&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===m&&1e-10===this._rawPrevTime&&1e-10!==c&&(this._rawPrevTime=0)))}else f!==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,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new s(t,e,r)},s.staggerTo=s.allTo=function(t,e,a,l,c,d,p){l=l||0;var f,_,m,g,v=0,y=[],b=a.cycle,T=a.startAt&&a.startAt.cycle;for(h(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=r(t))),t=t||[],l<0&&((t=r(t)).reverse(),l*=-1),f=t.length-1,m=0;m<=f;m++){_={};for(g in a)_[g]=a[g];if(b&&(n(_,t,m),null!=_.duration&&(e=_.duration,delete _.duration)),T){T=_.startAt={};for(g in a.startAt)T[g]=a.startAt[g];n(_.startAt,t,m)}_.delay=v+(_.delay||0),m===f&&c&&(_.onComplete=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),c.apply(p||a.callbackScope||this,d||u)}),y[m]=new s(t[m],e,_),v+=l}return y},s.staggerFrom=s.allFrom=function(t,e,i,r,n,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,s.staggerTo(t,e,i,r,n,a,o)},s.staggerFromTo=s.allFromTo=function(t,e,i,r,n,a,o,h){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,s.staggerTo(t,e,r,n,a,o,h)},s.delayedCall=function(t,e,i,r,n){return new s(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:n,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 r=[],n=0,s=t._first;s;)s instanceof i?r[n++]=s:(e&&(r[n++]=s),n=(r=r.concat(c(s,e))).length),s=s._next;return r},d=s.getAllTweens=function(e){return c(t._rootTimeline,e).concat(c(t._rootFramesTimeline,e))};s.killAll=function(t,i,r,n){null==i&&(i=!0),null==r&&(r=!0);var s,a,o,h=d(0!=n),l=h.length,u=i&&r&&n;for(o=0;o-1;)s.killChildTweensOf(t[c],e);else{n=[];for(u in p)for(l=p[u].target.parentNode;l;)l===t&&(n=n.concat(p[u].tweens)),l=l.parentNode;for(d=n.length,c=0;c-1;)a=o[l],(h||a instanceof e||(s=a.target===a.vars.onComplete)&&r||i&&!s)&&a.paused(t)};return s.pauseAll=function(t,e,i){p(!0,t,e,i)},s.resumeAll=function(t,e,i){p(!1,t,e,i)},s.globalTimeScale=function(e){var r=t._rootTimeline,n=i.ticker.time;return arguments.length?(e=e||1e-10,r._startTime=n-(n-r._startTime)*r._timeScale/e,r=t._rootFramesTimeline,n=i.ticker.frame,r._startTime=n-(n-r._startTime)*r._timeScale/e,r._timeScale=t._rootTimeline._timeScale=e,e):r._timeScale},l.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()},l.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},l.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},l.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},l.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)},l.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},l.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},l.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 r=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,r,n=this.vars;for(r in n)i=n[r],o(i)&&-1!==i.join("").indexOf("{self}")&&(n[r]=this._swapSelfInParams(i));o(n.tweens)&&this.add(n.tweens,0,n.align,n.stagger)},n=i._internals,s=r._internals={},a=n.isSelector,o=n.isArray,h=n.lazyTweens,l=n.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 r,n,s=t.cycle;for(r in s)n=s[r],t[r]="function"==typeof n?n(i,e[i]):n[i%n.length];delete t.cycle},p=s.pauseCallback=function(){},f=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},_=r.prototype=new e;return r.version="1.19.1",_.constructor=r,_.kill()._gc=_._forcingPlayhead=_._hasPause=!1,_.to=function(t,e,r,n){var s=r.repeat&&u.TweenMax||i;return e?this.add(new s(t,e,r),n):this.set(t,r,n)},_.from=function(t,e,r,n){return this.add((r.repeat&&u.TweenMax||i).from(t,e,r),n)},_.fromTo=function(t,e,r,n,s){var a=n.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,r,n),s):this.set(t,n,s)},_.staggerTo=function(t,e,n,s,o,h,l,u){var p,_,m=new r({onComplete:h,onCompleteParams:l,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=n.cycle;for("string"==typeof t&&(t=i.selector(t)||t),a(t=t||[])&&(t=f(t)),(s=s||0)<0&&((t=f(t)).reverse(),s*=-1),_=0;_n._startTime;p._timeline;)f&&p._timeline.smoothChildTiming?p.totalTime(p._totalTime,!0):p._gc&&p._enabled(!0,!1),p=p._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 r=e.length;--r>-1;)this.remove(e[r]);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,r){return this.add(t,e||0,i,r)},_.appendMultiple=function(t,e,i,r){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,r)},_.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},_.addPause=function(t,e,r,n){var s=i.delayedCall(0,p,r,n||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,r,n){var s;if(n instanceof t&&n.timeline===this)this.remove(n);else if(n&&(n instanceof Array||n.push&&o(n)))for(s=n.length;--s>-1;)n[s]instanceof t&&n[s].timeline===this&&this.remove(n[s]);if("string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,r);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]?r?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,r):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 r,n,s,a,o,u,c,d=this._dirty?this.totalDuration():this._totalDuration,p=this._time,f=this._startTime,_=this._timeScale,m=this._paused;if(t>=d-1e-7&&t>=0)this._totalTime=this._time=d,this._reversed||this._hasPausedChild()||(n=!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!==p||0===this._duration&&1e-10!==this._rawPrevTime&&(this._rawPrevTime>0||t<0&&this._rawPrevTime>=0))&&(a="onReverseComplete",n=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(o=n=!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&&n)for(r=this._first;r&&0===r._startTime;)r._duration||(n=!1),r=r._next;t=0,this._initted||(o=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=p)for(r=this._first;r&&r._startTime<=t&&!u;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(u=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!u;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(u=r),r=r._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!==p&&this._first||i||o||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==p&&t>0&&(this._active=!0),0===p&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(c=this._time)>=p)for(r=this._first;r&&(s=r._next,c===this._time&&(!this._paused||m));)(r._active||r._startTime<=c&&!r._paused&&!r._gc)&&(u===r&&this.pause(),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=s;else for(r=this._last;r&&(s=r._prev,c===this._time&&(!this._paused||m));){if(r._active||r._startTime<=p&&!r._paused&&!r._gc){if(u===r){for(u=r._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()}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=s}this._onUpdate&&(e||(h.length&&l(),this._callback("onUpdate"))),a&&(this._gc||f!==this._startTime&&_===this._timeScale||(0===this._time||d>=this.totalDuration())&&(n&&(h.length&&l(),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 r&&t._hasPausedChild())return!0;t=t._next}return!1},_.getChildren=function(t,e,r,n){n=n||-9999999999;for(var s=[],a=this._first,o=0;a;)a._startTime-1;)(r[n].timeline===this||e&&this._contains(r[n]))&&(a[o++]=r[n]);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 r,n=this._first,s=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(r in s)s[r]>=i&&(s[r]+=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),r=i.length,n=!1;--r>-1;)i[r]._kill(t,e)&&(n=!0);return n},_.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 r=this._first;r;)r._enabled(t,!0),r=r._next;return e.prototype._enabled.call(this,t,i)},_.totalTime=function(e,i,r){this._forcingPlayhead=!0;var n=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,n},_.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,r=0,n=this._last,s=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>s&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):s=n._startTime,n._startTime<0&&!n._paused&&(r-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),s=0),(i=n._startTime+n._totalDuration/n._timeScale)>r&&(r=i),n=e;this._duration=this._totalDuration=r,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,r=this._time;i;)i._startTime===r&&"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},r},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var r=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},n=e._internals,s=n.lazyTweens,a=n.lazyRender,o=_gsScope._gsDefine.globals,h=new i(null,null,1,0),l=r.prototype=new t;return l.constructor=r,l.kill()._gc=!1,r.version="1.19.1",l.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)},l.addCallback=function(t,i,r,n){return this.add(e.delayedCall(0,t,r,n),i)},l.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),r=i.length,n=this._parseTimeOrLabel(e);--r>-1;)i[r]._startTime===n&&i[r]._enabled(!1,!1);return this},l.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},l.tweenTo=function(t,i){i=i||{};var r,n,s,a={ease:h,useFrames:this.usesFrames(),immediateRender:!1},l=i.repeat&&o.TweenMax||e;for(n in i)a[n]=i[n];return a.time=this._parseTimeOrLabel(t),r=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,s=new l(this,r,a),a.onStart=function(){s.target.paused(!0),s.vars.time!==s.target.time()&&r===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},l.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 r=this.tweenTo(e,i);return r.duration(Math.abs(r.vars.time-t)/this._timeScale||.001)},l.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,n,o,h,l,u,c,d,p=this._dirty?this.totalDuration():this._totalDuration,f=this._duration,_=this._time,m=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,b=this._paused,T=this._cycle;if(t>=p-1e-7&&t>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(n=!0,h="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||y<0||1e-10===y)&&y!==t&&this._first&&(l=!0,y>1e-10&&(h="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=f,t=f+1e-4);else if(t<1e-7)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==_||0===f&&1e-10!==y&&(y>0||t<0&&y>=0)&&!this._locked)&&(h="onReverseComplete",n=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=n=!0,h="onReverseComplete"):y>=0&&this._first&&(l=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=f||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&n)for(r=this._first;r&&0===r._startTime;)r._duration||(n=!1),r=r._next;t=0,this._initted||(l=!0)}else if(0===f&&y<0&&(l=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(u=f+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=f-this._time),this._time>f?(this._time=f,t=f+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e&&t=_||this._repeat&&T!==this._cycle)for(r=this._first;r&&r._startTime<=t&&!c;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(c=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!c;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(c=r),r=r._prev;c&&(this._time=t=c._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==T&&!this._locked){var E=this._yoyo&&0!=(1&T),x=E===(this._yoyo&&0!=(1&this._cycle)),w=this._totalTime,S=this._cycle,D=this._rawPrevTime,P=this._time;if(this._totalTime=T*f,this._cycle0&&(this._active=!0),0===m&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(d=this._time)>=_)for(r=this._first;r&&(o=r._next,d===this._time&&(!this._paused||b));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(c===r&&this.pause(),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=o;else for(r=this._last;r&&(o=r._prev,d===this._time&&(!this._paused||b));){if(r._active||r._startTime<=_&&!r._paused&&!r._gc){if(c===r){for(c=r._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()}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=o}this._onUpdate&&(e||(s.length&&a(),this._callback("onUpdate"))),h&&(this._locked||this._gc||g!==this._startTime&&v===this._timeScale||(0===this._time||p>=this.totalDuration())&&(n&&(s.length&&a(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[h]&&this._callback(h)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},l.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var r,n,s=[],a=this.getChildren(t,e,i),o=0,h=a.length;for(r=0;rt)return i[e].name;return null},l.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},l.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},l.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},l.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},l.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},r},!0),function(){var t=180/Math.PI,e=[],i=[],r=[],n={},s=_gsScope._gsDefine.globals,a=function(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t},o=function(t,e,i,r){var n={a:t},s={},a={},o={c:r},h=(t+e)/2,l=(e+i)/2,u=(i+r)/2,c=(h+l)/2,d=(l+u)/2,p=(d-c)/8;return n.b=h+(t-h)/4,s.b=c+p,n.c=s.a=(n.b+s.b)/2,s.c=a.a=(c+d)/2,a.b=d-p,o.b=u+(r-u)/4,a.c=o.a=(a.b+o.b)/2,[n,s,a,o]},h=function(t,n,s,a,h){var l,u,c,d,p,f,_,m,g,v,y,b,T,E=t.length-1,x=0,w=t[0].a;for(l=0;l-1;)"string"==typeof(d=t[h][r])&&"="===d.charAt(1)&&(t[h][r]=s[r]+Number(d.charAt(0)+d.substr(2)));if((o=t.length-2)<0)return p[0]=new a(t[0][r],0,0,t[o<-1?0:1][r]),p;for(h=0;h1){for(y=t[t.length-1],v=!0,d=T.length;--d>-1;)if(p=T[d],Math.abs(E[p]-y[p])>.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=r.length=0,d=T.length;--d>-1;)p=T[d],n[p]=-1!==u.indexOf(","+p+","),b[p]=l(t,p,n[p],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(n[p])for(g=(f=b[T[d]]).length-1,_=0;_-1;)r[d]=Math.sqrt(r[d])}for(d=T.length,_=a?4:1;--d>-1;)f=b[p=T[d]],h(f,s,a,o,n[p]),v&&(f.splice(0,_),f.splice(f.length-_,_));return b},c=function(t,e,i){var r,n,s,o,h,l,u,c,d,p,f,_={},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[l]]=h=[],p=0,c=t.length,u=0;u1&&u-1;)for(s=(d=t[_]).a,a=d.d-s,o=d.c-s,h=d.b-s,r=n=0,u=1;u<=i;u++)r=n-(n=((l=f*u)*l*a+3*(c=1-l)*(l*o+c*h))*l),e[p=_*i+u-1]=(e[p]||0)+r*r},p=function(t,e){var i,r,n,s,a=[],o=[],h=0,l=0,u=(e=e>>0||6)-1,c=[],p=[];for(i in t)d(t[i],a,e);for(n=a.length,r=0;r>0]=p,o[s]=l,h=0,p=[]);return{length:l,lengths:o,segments:c}},f=_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 r,n,s,a,o,h=e.values||[],l={},d=h[0],f=e.autoRotate||i.vars.orientToBezier;this._autoRotate=f?f instanceof Array?f:[["x","y","rotation",!0===f?0:Number(f)||0]]:null;for(r in d)this._props.push(r);for(s=this._props.length;--s>-1;)r=this._props[s],this._overwriteProps.push(r),n=this._func[r]="function"==typeof t[r],l[r]=n?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),o||l[r]!==h[0][r]&&(o=l);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?u(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):c(h,e.type,l),this._segCount=this._beziers[r].length,this._timeRes){var _=p(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(f=this._autoRotate)for(this._initialRotations=[],f[0]instanceof Array||(this._autoRotate=f=[f]),s=f.length;--s>-1;){for(a=0;a<3;a++)r=f[s][a],this._func[r]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];r=f[s][2],this._initialRotations[s]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,r,n,s,a,o,h,l,u,c,d=this._segCount,p=this._func,f=this._target,_=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,c=this._curSeg,e*=this._length,n=this._li,e>this._l2&&n0){for(;n>0&&(this._l1=u[--n])>=e;);0===n&&ethis._s2&&n0){for(;n>0&&(this._s1=c[--n])>=e;);0===n&&e=1?d-1:d*e>>0)*(1/d))*d;for(r=1-o,n=this._props.length;--n>-1;)s=this._props[n],h=(o*o*(a=this._beziers[s][i]).da+3*r*(o*a.ca+r*a.ba))*o+a.a,this._mod[s]&&(h=this._mod[s](h,f)),p[s]?f[s](h):f[s]=h;if(this._autoRotate){var m,g,v,y,b,T,E,x=this._autoRotate;for(n=x.length;--n>-1;)s=x[n][2],T=x[n][3]||0,E=!0===x[n][4]?1:t,a=this._beziers[x[n][0]],m=this._beziers[x[n][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,h=_?Math.atan2(b-v,y-g)*E+T:this._initialRotations[n],this._mod[s]&&(h=this._mod[s](h,f)),p[s]?f[s](h):f[s]=h)}}}),_=f.prototype;f.bezierThrough=u,f.cubicToQuadratic=o,f._autoCSS=!0,f.quadraticToCubic=function(t,e,i){return new a(t,(2*e+t)/3,(2*e+i)/3,i)},f._cssRegister=function(){var t=s.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,r=e._setPluginRatio,n=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,s,a,o,h){e instanceof Array&&(e={values:e}),h=new f;var l,u,c,d=e.values,p=d.length-1,_=[],m={};if(p<0)return o;for(l=0;l<=p;l++)c=i(t,d[l],a,o,h,p!==l),_[l]=c.end;for(u in e)m[u]=e[u];return m.values=_,o=new n(t,"bezier",0,0,c.pt,2),o.data=c,o.plugin=h,o.setRatio=r,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(l=!0===m.autoRotate?0:Number(m.autoRotate),m.autoRotate=null!=c.end.left?[["left","top","rotation",l,!1]]:null!=c.end.x&&[["x","y","rotation",l,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),c.autoRotate=a._target._gsTransform,c.proxy.rotation=c.autoRotate.rotation||0,a._overwriteProps.push("rotation")),h._onInitTween(c.proxy,m,a._tween),o}})}},_._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;--r>-1;)(e=t[i[r]])&&"function"==typeof e&&(this._mod[i[r]]=e)},_._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;--i>-1;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;--i>-1;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,n,s,a=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=a.prototype.setRatio},o=_gsScope._gsDefine.globals,h={},l=a.prototype=new t("css");l.constructor=a,a.version="1.19.1",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",a.defaultSmoothOrigin=!0,l="px",a.suffixMap={top:l,right:l,bottom:l,left:l,width:l,height:l,fontSize:l,padding:l,margin:l,perspective:l,lineHeight:""};var u,c,d,p,f,_,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,E=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,w=/opacity:([^;]*)/i,S=/alpha\(opacity *=.+?\)/i,D=/^(rgb|hsl)/,P=/([A-Z])/g,A=/-([a-z])/gi,I=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(t,e){return e.toUpperCase()},O=/(?:Left|Right|Width)/i,M=/(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,H={},F={style:{}},B=_gsScope.document||{createElement:function(){return F}},U=function(t,e){return B.createElementNS?B.createElementNS(e||"http://www.w3.org/1999/xhtml",t):B.createElement(t)},X=U("div"),G=U("img"),Y=a._internals={_specialProps:h},V=(_gsScope.navigator||{}).userAgent||"",W=function(){var t=V.indexOf("Android"),e=U("a");return d=-1!==V.indexOf("Safari")&&-1===V.indexOf("Chrome")&&(-1===t||parseFloat(V.substr(t+8,2))>3),f=d&&parseFloat(V.substr(V.indexOf("Version/")+8,2))<6,p=-1!==V.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(V)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(V))&&(_=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),q=function(t){return x.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},z=function(t){_gsScope.console&&console.log(t)},J="",Q="",Z=function(t,e){var i,r,n=(e=e||X).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===n[i[r]+t];);return r>=0?(Q=3===r?"ms":i[r],J="-"+Q.toLowerCase()+"-",Q+t):null},K=B.defaultView?B.defaultView.getComputedStyle:function(){},$=a.getStyle=function(t,e,i,r,n){var s;return W||"opacity"!==e?(!r&&t.style[e]?s=t.style[e]:(i=i||K(t))?s=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(P,"-$1").toLowerCase()):t.currentStyle&&(s=t.currentStyle[e]),null==n||s&&"none"!==s&&"auto"!==s&&"auto auto"!==s?s:n):q(t)},tt=Y.convertToPixels=function(t,i,r,n,s){if("px"===n||!n)return r;if("auto"===n||!r)return 0;var o,h,l,u=O.test(i),c=t,d=X.style,p=r<0,f=1===r;if(p&&(r=-r),f&&(r*=100),"%"===n&&-1!==i.indexOf("border"))o=r/100*(u?t.clientWidth:t.clientHeight);else{if(d.cssText="border:0 solid red;position:"+$(t,"position")+";line-height:0;","%"!==n&&c.appendChild&&"v"!==n.charAt(0)&&"rem"!==n)d[u?"borderLeftWidth":"borderTopWidth"]=r+n;else{if(c=t.parentNode||B.body,h=c._gsCache,l=e.ticker.frame,h&&u&&h.time===l)return h.width*r/100;d[u?"width":"height"]=r+n}c.appendChild(X),o=parseFloat(X[u?"offsetWidth":"offsetHeight"]),c.removeChild(X),u&&"%"===n&&!1!==a.cacheWidths&&((h=c._gsCache=c._gsCache||{}).time=l,h.width=o/r*100),0!==o||s||(o=tt(t,i,r,n,!0))}return f&&(o/=100),p?-o:o},et=Y.calculateOffset=function(t,e,i){if("absolute"!==$(t,"position",i))return 0;var r="left"===e?"Left":"Top",n=$(t,"margin"+r,i);return t["offset"+r]-(tt(t,e,parseFloat(n),n.replace(E,""))||0)},it=function(t,e){var i,r,n,s={};if(e=e||K(t,null))if(i=e.length)for(;--i>-1;)-1!==(n=e[i]).indexOf("-transform")&&It!==n||(s[n.replace(A,C)]=e.getPropertyValue(n));else for(i in e)-1!==i.indexOf("Transform")&&At!==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(A,C)]=e[i]);return W||(s.opacity=q(t)),r=Gt(t,e,!1),s.rotation=r.rotation,s.skewX=r.skewX,s.scaleX=r.scaleX,s.scaleY=r.scaleY,s.x=r.x,s.y=r.y,Ot&&(s.z=r.z,s.rotationX=r.rotationX,s.rotationY=r.rotationY,s.scaleZ=r.scaleZ),s.filters&&delete s.filters,s},rt=function(t,e,i,r,n){var s,a,o,h={},l=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(s=i[a])||n&&n[a])&&-1===a.indexOf("Origin")&&("number"!=typeof s&&"string"!=typeof s||(h[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!==l[a]&&(o=new vt(l,a,l[a],o))));if(r)for(a in r)"className"!==a&&(h[a]=r[a]);return{difs:h,firstMPT:o}},nt={width:["Left","Right"],height:["Top","Bottom"]},st=["marginLeft","marginRight","marginTop","marginBottom"],at=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||K(t))[e]||0;if(t.getCTM&&Bt(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),n=nt[e],s=n.length;for(i=i||K(t,null);--s>-1;)r-=parseFloat($(t,"padding"+n[s],i,!0))||0,r-=parseFloat($(t,"border"+n[s]+"Width",i,!0))||0;return r},ot=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,r=t.split(" "),n=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":r[0],s=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":r[1];if(r.length>3&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i2?" "+r[2]:""),e&&(e.oxp=-1!==n.indexOf("%"),e.oyp=-1!==s.indexOf("%"),e.oxr="="===n.charAt(1),e.oyr="="===s.charAt(1),e.ox=parseFloat(n.replace(T,"")),e.oy=parseFloat(s.replace(T,"")),e.v=t),e||t},ht=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},lt=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,r){var n,s,a,o,h;return"function"==typeof t&&(t=t(g,m)),null==t?o=e:"number"==typeof t?o=t:(n=360,s=t.split("_"),a=((h="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(s[0].substr(2)):parseFloat(s[0]))*(-1===t.indexOf("rad")?1:k)-(h?0:e),s.length&&(r&&(r[i]=e+a),-1!==t.indexOf("short")&&(a%=n)!==a%(n/2)&&(a=a<0?a+n:a-n),-1!==t.indexOf("_cw")&&a<0?a=(a+9999999999*n)%n-(a/n|0)*n:-1!==t.indexOf("ccw")&&a>0&&(a=(a-9999999999*n)%n-(a/n|0)*n)),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},pt=a.parseColor=function(t,e){var i,r,n,s,a,o,h,l,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="#"+(r=t.charAt(1))+r+(n=t.charAt(2))+n+(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,r=2*(h=Number(i[2])/100)-(n=h<=.5?h*(o+1):h+o-h*o),i.length>3&&(i[3]=Number(t[3])),i[0]=dt(a+1/3,r,n),i[1]=dt(a,r,n),i[2]=dt(a-1/3,r,n);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&&(r=i[0]/255,n=i[1]/255,s=i[2]/255,h=((l=Math.max(r,n,s))+(u=Math.min(r,n,s)))/2,l===u?a=o=0:(c=l-u,o=h>.5?c/(2-l-u):c/(l+u),a=l===r?(n-s)/c+(n0?a[0].replace(v,""):"";return u?n=e?function(t){var e,d,p,f;if("number"==typeof t)t+=c;else if(r&&R.test(t)){for(f=t.replace(R,"|").split("|"),p=0;pp--)for(;++pd--)for(;++d>0];return n.parse(e,o,s,a)}},vt=(Y._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,n,s,a=this.data,o=a.proxy,h=a.firstMPT;h;)e=o[h.v],h.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),h.t[h.p]=e,h=h._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(h=a.firstMPT,s=1===t?"e":"b";h;){if((i=h.t).type){if(1===i.type){for(n=i.xs0+i.s+i.xs1,r=1;r0;)h="xn"+a,p[o=r.p+"_"+h]=r.data[h],d[o]=r[h],s||(l=new vt(r,h,o,l,r.rxp[h]));r=r._next}return{proxy:d,end:p,firstMPT:l,pt:u}},Y.CSSPropTween=function(t,e,r,n,a,o,h,l,u,c,d){this.t=t,this.p=e,this.s=r,this.c=n,this.n=h||e,t instanceof yt||s.push(this.n),this.r=l,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===c?r:c,this.e=void 0===d?r+n:d,a&&(this._next=a,a._prev=this)}),bt=function(t,e,i,r,n,s){var a=new yt(t,e,i,r-i,n,-1,s);return a.b=i,a.e=a.xs0=r,a},Tt=a.parseComplex=function(t,e,i,r,n,s,o,h,l,c){i=i||s||"","function"==typeof r&&(r=r(g,m)),o=new yt(t,e,0,0,o,c?2:1,null,!1,h,i,r),r+="",n&&_t.test(r+i)&&(r=[i,r],a.colorStringFilter(r),i=r[0],r=r[1]);var d,p,f,_,b,T,E,x,w,S,D,P,A,I=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),O=I.length,M=!1!==u;for(-1===r.indexOf(",")&&-1===i.indexOf(",")||(I=I.join(" ").replace(R,", ").split(" "),C=C.join(" ").replace(R,", ").split(" "),O=I.length),O!==C.length&&(O=(I=(s||"").split(" ")).length),o.plugin=l,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),A?o.appendXtra(w?"hsla(":"hsl(",_[0],ht(b[0],_[0]),",",!1,!0).appendXtra("",_[1],ht(b[1],_[1]),"%,",!1).appendXtra("",_[2],ht(b[2],_[2]),w?"%,":"%"+P,!1):o.appendXtra(w?"rgba(":"rgb(",_[0],b[0]-_[0],",",!0,!0).appendXtra("",_[1],b[1]-_[1],",",!0).appendXtra("",_[2],b[2]-_[2],w?",":P,!0),w&&(_=_.length<4?1:_[3],o.appendXtra("",_,(b.length<4?1:b[3])-_,P,!1))),_t.lastIndex=0;else if(T=_.match(v)){if(!(E=b.match(y))||E.length!==T.length)return o;for(f=0,p=0;p0;)l["xn"+Et]=0,l["xs"+Et]="";l.xs0="",l._next=l._prev=l.xfirst=l.data=l.plugin=l.setRatio=l.rxp=null,l.appendXtra=function(t,e,i,r,n,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]=r||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=n,a["xn"+o]=e,a.plugin||(a.xfirst=new yt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,n,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=n,a)):(a["xs"+o]+=e+(r||""),a)};var xt=function(t,e){e=e||{},this.p=e.prefix?Z(t)||t:t,h[t]=h[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=Y._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,n=t.split(","),s=e.defaultValue;for(i=i||[s],r=0;ro.length?h.length:o.length,a=0;a-1;)s=Number(n[Et]),n[Et]=(a=s-(s|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+s:s;return e&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n},Gt=Y.getTransform=function(t,i,r,n){if(t._gsTransform&&r&&!n)return t._gsTransform;var s,o,h,l,u,c,d=r?t._gsTransform||new Mt:new Mt,p=d.scaleX<0,f=Ot?parseFloat($(t,Ct,i,!1,"0 0 0").split(" ")[2])||d.zOrigin||0:0,_=parseFloat(a.defaultTransformPerspective)||0;if(d.svg=!(!t.getCTM||!Bt(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],E=s[1],x=s[2],w=s[3],S=s[4],D=s[5],P=s[6],A=s[7],I=s[8],C=s[9],O=s[10],M=s[12],L=s[13],R=s[14],j=s[11],N=Math.atan2(P,O);d.zOrigin&&(M=I*(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))+I*(b=Math.sin(-N)),g=D*y+C*b,v=P*y+O*b,I=S*-b+I*y,C=D*-b+C*y,O=P*-b+O*y,j=A*-b+j*y,S=m,D=g,P=v),N=Math.atan2(-x,O),d.rotationY=N*k,N&&(g=E*(y=Math.cos(-N))-C*(b=Math.sin(-N)),v=x*y-O*b,C=E*b+C*y,O=x*b+O*y,j=w*b+j*y,T=m=T*y-I*b,E=g,x=v),N=Math.atan2(E,T),d.rotation=N*k,N&&(T=T*(y=Math.cos(-N))+S*(b=Math.sin(-N)),g=E*y+D*b,D=E*-b+D*y,P=x*-b+P*y,E=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+E*E)+.5|0)/1e5,d.scaleY=(1e5*Math.sqrt(D*D+C*C)+.5|0)/1e5,d.scaleZ=(1e5*Math.sqrt(P*P+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&&(p?(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=M,d.y=L,d.z=R,d.svg&&(d.x-=d.xOrigin-(d.xOrigin*T-d.yOrigin*S),d.y-=d.yOrigin-(d.yOrigin*E-d.xOrigin*D))}else if(!Ot||n||!s.length||d.x!==s[4]||d.y!==s[5]||!d.rotationX&&!d.rotationY){var H=s.length>=6,F=H?s[0]:1,B=s[1]||0,U=s[2]||0,X=H?s[3]:1;d.x=s[4]||0,d.y=s[5]||0,h=Math.sqrt(F*F+B*B),l=Math.sqrt(X*X+U*U),u=F||B?Math.atan2(B,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&&(p?(h*=-1,c+=u<=0?180:-180,u+=u<=0?180:-180):(l*=-1,c+=c<=0?180:-180)),d.scaleX=h,d.scaleY=l,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*B+d.yOrigin*X))}d.zOrigin=f;for(o in d)d[o]<2e-5&&d[o]>-2e-5&&(d[o]=0)}return r&&(t._gsTransform=d,d.svg&&(Dt&&t.style[At]?e.delayedCall(.001,function(){qt(t.style,At)}):!Dt&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),d},Yt=function(t){var e,i,r=this.data,n=-r.rotation*N,s=n+r.skewX*N,a=(Math.cos(n)*r.scaleX*1e5|0)/1e5,o=(Math.sin(n)*r.scaleX*1e5|0)/1e5,h=(Math.sin(s)*-r.scaleY*1e5|0)/1e5,l=(Math.cos(s)*r.scaleY*1e5|0)/1e5,u=this.t.style,c=this.t.currentStyle;if(c){i=o,o=-h,h=-i,e=c.filter,u.filter="";var d,p,f=this.t.offsetWidth,m=this.t.offsetHeight,g="absolute"!==c.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+o+", M21="+h+", M22="+l,y=r.x+f*r.xPercent/100,b=r.y+m*r.yPercent/100;if(null!=r.ox&&(y+=(d=(r.oxp?f*r.ox*.01:r.ox)-f/2)-(d*a+(p=(r.oyp?m*r.oy*.01:r.oy)-m/2)*o),b+=p-(d*h+p*l)),v+=g?", Dx="+((d=f/2)-(d*a+(p=m/2)*o)+y)+", Dy="+(p-(d*h+p*l)+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===h&&1===l&&(g&&-1===v.indexOf("Dx=0, Dy=0")||x.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=r.ieOffsetX||0,p=r.ieOffsetY||0,r.ieOffsetX=Math.round((f-((a<0?-a:a)*f+(o<0?-o:o)*m))/2+y),r.ieOffsetY=Math.round((m-((l<0?-l:l)*m+(h<0?-h:h)*f))/2+b),Et=0;Et<4;Et++)S=(i=-1!==(T=c[w=st[Et]]).indexOf("px")?parseFloat(T):tt(this.t,w,parseFloat(T),T.replace(E,""))||0)!==r[w]?Et<2?-r.ieOffsetX:-r.ieOffsetY:Et<2?d-r.ieOffsetX:p-r.ieOffsetY,u[w]=(r[w]=Math.round(i-S*(0===Et||2===Et?1:D)))+"px"}}},Vt=Y.set3DTransformRatio=Y.setTransformRatio=function(t){var e,i,r,n,s,a,o,h,l,u,c,d,f,_,m,g,v,y,b,T,E,x=this.data,w=this.t.style,S=x.rotation,D=x.rotationX,P=x.rotationY,A=x.scaleX,I=x.scaleY,C=x.scaleZ,O=x.x,M=x.y,L=x.z,R=x.svg,j=x.perspective,k=x.force3D,H=x.skewY,F=x.skewX;if(H&&(F+=H,S+=H),!((1!==t&&0!==t||"auto"!==k||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&k||L||j||P||D||1!==C)||Dt&&R||!Ot)S||F||R?(S*=N,T=F*N,E=1e5,i=Math.cos(S)*A,s=Math.sin(S)*A,r=Math.sin(S-T)*-I,a=Math.cos(S-T)*I,T&&"simple"===x.skewType&&(e=Math.tan(T-H*N),r*=e=Math.sqrt(1+e*e),a*=e,H&&(e=Math.tan(H*N),i*=e=Math.sqrt(1+e*e),s*=e)),R&&(O+=x.xOrigin-(x.xOrigin*i+x.yOrigin*r)+x.xOffset,M+=x.yOrigin-(x.xOrigin*s+x.yOrigin*a)+x.yOffset,Dt&&(x.xPercent||x.yPercent)&&(m=this.t.getBBox(),O+=.01*x.xPercent*m.width,M+=.01*x.yPercent*m.height),O<(m=1e-6)&&O>-m&&(O=0),M-m&&(M=0)),b=(i*E|0)/E+","+(s*E|0)/E+","+(r*E|0)/E+","+(a*E|0)/E+","+O+","+M+")",R&&Dt?this.t.setAttribute("transform","matrix("+b):w[At]=(x.xPercent||x.yPercent?"translate("+x.xPercent+"%,"+x.yPercent+"%) matrix(":"matrix(")+b):w[At]=(x.xPercent||x.yPercent?"translate("+x.xPercent+"%,"+x.yPercent+"%) matrix(":"matrix(")+A+",0,0,"+I+","+O+","+M+")";else{if(p&&(A<(m=1e-4)&&A>-m&&(A=C=2e-5),I-m&&(I=C=2e-5),!j||x.z||x.rotationX||x.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"===x.skewType&&(e=Math.tan((F-H)*N),g*=e=Math.sqrt(1+e*e),v*=e,x.skewY&&(e=Math.tan(H*N),i*=e=Math.sqrt(1+e*e),s*=e))),r=-v,a=g;else{if(!(P||D||1!==C||j||R))return void(w[At]=(x.xPercent||x.yPercent?"translate("+x.xPercent+"%,"+x.yPercent+"%) translate3d(":"translate3d(")+O+"px,"+M+"px,"+L+"px)"+(1!==A||1!==I?" scale("+A+","+I+")":""));i=a=1,r=s=0}u=1,n=o=h=l=c=d=0,f=j?-1/j:0,_=x.zOrigin,m=1e-6,",","0",(S=P*N)&&(g=Math.cos(S),h=-(v=Math.sin(S)),c=f*-v,n=i*v,o=s*v,u=g,f*=g,i*=g,s*=g),(S=D*N)&&(e=r*(g=Math.cos(S))+n*(v=Math.sin(S)),y=a*g+o*v,l=u*v,d=f*v,n=r*-v+n*g,o=a*-v+o*g,u*=g,f*=g,r=e,a=y),1!==C&&(n*=C,o*=C,u*=C,f*=C),1!==I&&(r*=I,a*=I,l*=I,d*=I),1!==A&&(i*=A,s*=A,h*=A,c*=A),(_||R)&&(_&&(O+=n*-_,M+=o*-_,L+=u*-_+_),R&&(O+=x.xOrigin-(x.xOrigin*i+x.yOrigin*r)+x.xOffset,M+=x.yOrigin-(x.xOrigin*s+x.yOrigin*a)+x.yOffset),O-m&&(O="0"),M-m&&(M="0"),L-m&&(L=0)),b=x.xPercent||x.yPercent?"translate("+x.xPercent+"%,"+x.yPercent+"%) matrix3d(":"matrix3d(",b+=(i-m?"0":i)+","+(s-m?"0":s)+","+(h-m?"0":h),b+=","+(c-m?"0":c)+","+(r-m?"0":r)+","+(a-m?"0":a),D||P||1!==C?(b+=","+(l-m?"0":l)+","+(d-m?"0":d)+","+(n-m?"0":n),b+=","+(o-m?"0":o)+","+(u-m?"0":u)+","+(f-m?"0":f)+","):b+=",0,0,0,0,1,0,",b+=O+","+M+","+L+","+(j?1+-L/j:1)+")",w[At]=b}};(l=Mt.prototype).x=l.y=l.z=l.skewX=l.skewY=l.rotation=l.rotationX=l.rotationY=l.zOrigin=l.xPercent=l.yPercent=l.xOffset=l.yOffset=0,l.scaleX=l.scaleY=l.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,r,s,o,h){if(r._lastParsedTransform===h)return s;r._lastParsedTransform=h;var l,u=h.scale&&"function"==typeof h.scale?h.scale:0;"function"==typeof h[i]&&(l=h[i],h[i]=e),u&&(h.scale=u(g,t));var c,d,p,f,_,v,y,b,T,E=t._gsTransform,x=t.style,w=Pt.length,S=h,D={},P=Gt(t,n,!0,S.parseTransform),A=S.transform&&("function"==typeof S.transform?S.transform(g,m):S.transform);if(r._transform=P,A&&"string"==typeof A&&At)(d=X.style)[At]=A,d.display="block",d.position="absolute",B.body.appendChild(X),c=Gt(X,null,!1),P.svg&&(v=P.xOrigin,y=P.yOrigin,c.x-=P.xOffset,c.y-=P.yOffset,(S.transformOrigin||S.svgOrigin)&&(A={},kt(t,ot(S.transformOrigin),A,S.svgOrigin,S.smoothOrigin,!0),v=A.xOrigin,y=A.yOrigin,c.x-=A.xOffset-P.xOffset,c.y-=A.yOffset-P.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]))),B.body.removeChild(X),c.perspective||(c.perspective=P.perspective),null!=S.xPercent&&(c.xPercent=lt(S.xPercent,P.xPercent)),null!=S.yPercent&&(c.yPercent=lt(S.yPercent,P.yPercent));else if("object"==typeof S){if(c={scaleX:lt(null!=S.scaleX?S.scaleX:S.scale,P.scaleX),scaleY:lt(null!=S.scaleY?S.scaleY:S.scale,P.scaleY),scaleZ:lt(S.scaleZ,P.scaleZ),x:lt(S.x,P.x),y:lt(S.y,P.y),z:lt(S.z,P.z),xPercent:lt(S.xPercent,P.xPercent),yPercent:lt(S.yPercent,P.yPercent),perspective:lt(S.transformPerspective,P.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=lt(S.x,P.xPercent)),"string"==typeof S.y&&-1!==S.y.indexOf("%")&&(c.y=0,c.yPercent=lt(S.y,P.yPercent)),c.rotation=ut("rotation"in S?S.rotation:"shortRotation"in S?S.shortRotation+"_short":"rotationZ"in S?S.rotationZ:P.rotation,P.rotation,"rotation",D),Ot&&(c.rotationX=ut("rotationX"in S?S.rotationX:"shortRotationX"in S?S.shortRotationX+"_short":P.rotationX||0,P.rotationX,"rotationX",D),c.rotationY=ut("rotationY"in S?S.rotationY:"shortRotationY"in S?S.shortRotationY+"_short":P.rotationY||0,P.rotationY,"rotationY",D)),c.skewX=ut(S.skewX,P.skewX),c.skewY=ut(S.skewY,P.skewY)}for(Ot&&null!=S.force3D&&(P.force3D=S.force3D,f=!0),P.skewType=S.skewType||P.skewType||a.defaultSkewType,(p=P.force3D||P.z||P.rotationX||P.rotationY||c.z||c.rotationX||c.rotationY||c.perspective)||null==S.scale||(c.scaleZ=1);--w>-1;)((A=c[T=Pt[w]]-P[T])>1e-6||A<-1e-6||null!=S[T]||null!=H[T])&&(f=!0,s=new yt(P,T,P[T],A,s),T in D&&(s.e=D[T]),s.xs0=0,s.plugin=o,r._overwriteProps.push(s.n));return A=S.transformOrigin,P.svg&&(A||S.svgOrigin)&&(v=P.xOffset,y=P.yOffset,kt(t,ot(A),c,S.svgOrigin,S.smoothOrigin),s=bt(P,"xOrigin",(E?P:c).xOrigin,c.xOrigin,s,"transformOrigin"),s=bt(P,"yOrigin",(E?P:c).yOrigin,c.yOrigin,s,"transformOrigin"),v===P.xOffset&&y===P.yOffset||(s=bt(P,"xOffset",E?v:P.xOffset,P.xOffset,s,"transformOrigin"),s=bt(P,"yOffset",E?y:P.yOffset,P.yOffset,s,"transformOrigin")),A="0px 0px"),(A||Ot&&p&&P.zOrigin)&&(At?(f=!0,T=Ct,A=(A||$(t,T,n,!1,"50% 50%"))+"",(s=new yt(x,T,0,0,s,-1,"transformOrigin")).b=x[T],s.plugin=o,Ot?(d=P.zOrigin,A=A.split(" "),P.zOrigin=(A.length>2&&(0===d||"0px"!==A[2])?parseFloat(A[2]):d)||0,s.xs0=s.e=A[0]+" "+(A[1]||"50%")+" 0px",(s=new yt(P,"zOrigin",0,0,s,-1,s.n)).b=d,s.xs0=s.e=P.zOrigin):s.xs0=s.e=A):ot(A+"",P)),f&&(r._transformType=P.svg&&Dt||!p&&3!==this._transformType?2:3),l&&(h[i]=l),u&&(h.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 h,l,u,c,d,p,f,_,m,g,v,y,b,T,E,x,w=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],S=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),h=e.split(" "),l=0;l-1;)(u=-1!==(m=o[l]).indexOf("%"))!==(-1!==h[l].indexOf("%"))&&(c=0===l?t.offsetWidth-G.width:t.offsetHeight-G.height,o[l]=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,r,s,a){var o,h,l;return _<9?(h=t.currentStyle,l=_<8?" ":",",o="rect("+h.clipTop+l+h.clipRight+l+h.clipBottom+l+h.clipLeft+")",e=this.format(e).split(",").join(l)):(o=this.format($(t,this.p,n,!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,r,n){return n}}),wt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,s,a){var o=$(t,"borderTopWidth",n,!1,"0px"),h=this.format(e).split(" "),l=h[0].replace(E,"");return"px"!==l&&(o=parseFloat(o)/tt(t,"borderTopWidth",1,l)+l),this.parseComplex(t.style,this.format(o+" "+$(t,"borderTopStyle",n,!1,"solid")+" "+$(t,"borderTopColor",n,!1,"#000")),h.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,r,n,s){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new yt(a,o,0,0,n,-1,i,!1,0,a[o],e)}});var Wt=function(t){var e,i=this.t,r=i.filter||$(this.data,"filter")||"",n=this.s+this.c*t|0;100===n&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),e=!$(this.data,"filter")):(i.filter=r.replace(S,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+n+")"),-1===r.indexOf("pacity")?0===n&&this.xn1||(i.filter=r+" alpha(opacity="+n+")"):i.filter=r.replace(x,"opacity="+n))};wt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,s,a){var o=parseFloat($(t,"opacity",n,!1,"1")),h=t.style,l="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),l&&1===o&&"hidden"===$(t,"visibility",n)&&0!==e&&(o=0),W?s=new yt(h,"opacity",o,e-o,s):((s=new yt(h,"opacity",100*o,100*(e-o),s)).xn1=l?1:0,h.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),l&&((s=new yt(h,"visibility",0,0,s,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",r._overwriteProps.push(s.n),r._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(P,"-$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,r,s,a,o,h){var l,u,c,d,p,f=t.getAttribute("class")||"",_=t.style.cssText;if(a=s._classNamePT=new yt(t,r,0,0,a,2),a.setRatio=zt,a.pr=-11,i=!0,a.b=f,u=it(t,n),c=t._gsClassPT){for(d={},p=c.data;p;)d[p.p]=1,p=p._next;c.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:f.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),l=rt(t,u,it(t),h,d),t.setAttribute("class",f),a.data=l.firstMPT,t.style.cssText=_,a=a.xfirst=s.parse(t,l.difs,a,o)}});var Jt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,n,s,a=this.t.style,o=h.transform.parse;if("all"===this.e)a.cssText="",n=!0;else for(r=(e=this.e.split(" ").join("").split(",")).length;--r>-1;)i=e[r],h[i]&&(h[i].parse===o?n=!0:i="transformOrigin"===i?Ct:h[i].p),qt(a,i);n&&(qt(a,At),(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,r,n,s){return s=new yt(t,r,0,0,s,2),s.setRatio=Jt,s.e=e,s.pr=-10,s.data=n._tween,i=!0,s}}),l="bezier,throwProps,physicsProps,physics2D".split(","),Et=l.length;Et--;)St(l[Et]);(l=a.prototype)._firstPT=l._lastParsedTransform=l._transform=null,l._onInitTween=function(t,e,o,l){if(!t.nodeType)return!1;this._target=m=t,this._tween=o,this._vars=e,g=l,u=e.autoRound,i=!1,r=e.suffixMap||a.suffixMap,n=K(t,""),s=this._overwriteProps;var p,_,v,y,b,T,E,x,S,D=t.style;if(c&&""===D.zIndex&&("auto"!==(p=$(t,"zIndex",n))&&""!==p||this._addLazySet(D,"zIndex",0)),"string"==typeof e&&(y=D.cssText,p=it(t,n),D.cssText=y+";"+e,p=rt(t,p,it(t)).difs,!W&&w.test(e)&&(p.opacity=parseFloat(RegExp.$1)),e=p,D.cssText=y),e.className?this._firstPT=_=h.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=_=this.parse(t,e,null),this._transformType){for(S=3===this._transformType,At?d&&(c=!0,""===D.zIndex&&("auto"!==(E=$(t,"zIndex",n))&&""!==E||this._addLazySet(D,"zIndex",0)),f&&this._addLazySet(D,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(S?"visible":"hidden"))):D.zoom=1,v=_;v&&v._next;)v=v._next;x=new yt(t,"transform",0,0,null,2),this._linkCSSP(x,null,v),x.setRatio=At?Vt:Yt,x.data=this._transform||Gt(t,n,!0),x.tween=o,x.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},l.parse=function(t,e,i,s){var a,o,l,c,d,p,f,_,v,y,b=t.style;for(a in e)"function"==typeof(p=e[a])&&(p=p(g,m)),(o=h[a])?i=o.parse(t,p,a,this,i,s,e):(d=$(t,a,n)+"",v="string"==typeof p,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||v&&D.test(p)?(v||(p=((p=pt(p)).length>3?"rgba(":"rgb(")+p.join(",")+")"),i=Tt(b,a,d,p,!0,"transparent",i,0,s)):v&&j.test(p)?i=Tt(b,a,d,p,!0,null,i,0,s):(f=(l=parseFloat(d))||0===l?d.substr((l+"").length):"",""!==d&&"auto"!==d||("width"===a||"height"===a?(l=at(t,a,n),f="px"):"left"===a||"top"===a?(l=et(t,a,n),f="px"):(l="opacity"!==a?0:1,f="")),(y=v&&"="===p.charAt(1))?(c=parseInt(p.charAt(0)+"1",10),p=p.substr(2),c*=parseFloat(p),_=p.replace(E,"")):(c=parseFloat(p),_=v?p.replace(E,""):""),""===_&&(_=a in r?r[a]:f),p=c||0===c?(y?c+l:c)+_:e[a],f!==_&&""!==_&&(c||0===c)&&l&&(l=tt(t,a,l,f),"%"===_?(l/=tt(t,a,100,"%")/100,!0!==e.strictUnits&&(d=l+"%")):"em"===_||"rem"===_||"vw"===_||"vh"===_?l/=tt(t,a,1,_):"px"!==_&&(c=tt(t,a,c,_),_="px"),y&&(c||0===c)&&(p=c+l+_)),y&&(c+=l),!l&&0!==l||!c&&0!==c?void 0!==b[a]&&(p||p+""!="NaN"&&null!=p)?(i=new yt(b,a,c||l||0,0,i,-1,a,!1,0,d,p)).xs0="none"!==p||"display"!==a&&-1===a.indexOf("Style")?p:d:z("invalid "+a+" tween value: "+e[a]):(i=new yt(b,a,l,c-l,i,0,a,!1!==u&&("px"===_||"zIndex"===a),0,d,p)).xs0=_)),s&&i&&!i.plugin&&(i.plugin=s);return i},l.setRatio=function(t){var e,i,r,n=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(;n;){if(e=n.c*t+n.s,n.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),n.type)if(1===n.type)if(2===(r=n.l))n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2;else if(3===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3;else if(4===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4;else if(5===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4+n.xn4+n.xs5;else{for(i=n.xs0+e+n.xs1,r=1;r-1;)Zt(t[n],e,i);else for(n=(r=t.childNodes).length;--n>-1;)a=(s=r[n]).type,s.style&&(e.push(it(s)),i&&i.push(s)),1!==a&&9!==a&&11!==a||!s.childNodes.length||Zt(s,e,i)};return a.cascadeTo=function(t,i,r){var n,s,a,o,h=e.to(t,i,r),l=[h],u=[],c=[],d=[],p=e._internals.reservedProps;for(t=h._targets||h.target,Zt(t,u,d),h.render(i,!0,!0),Zt(t,c),h.render(0,!0,!0),h._enabled(!0),n=d.length;--n>-1;)if((s=rt(d[n],u[n],c[n])).firstMPT){s=s.difs;for(a in r)p[a]&&(s[a]=r[a]);o={};for(a in s)o[a]=u[n][a];l.push(e.fromTo(d[n],i,o,s))}return l},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,r,n=this._tween,s=n.vars.roundProps.join?n.vars.roundProps:n.vars.roundProps.split(","),a=s.length,o={},h=n._propLookup.roundProps;--a>-1;)o[s[a]]=Math.round;for(a=s.length;--a>-1;)for(e=s[a],i=n._firstPT;i;)r=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),r&&(r._prev=i._prev),i._prev?i._prev._next=r:n._firstPT===i&&(n._firstPT=r),i._next=i._prev=null,n._propLookup[e]=h)),i=r;return!1},e._add=function(t,e,i,r){this._addTween(t,e,i,i+r,e,Math.round),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(t,e,i,r){var n,s;if("function"!=typeof t.setAttribute)return!1;for(n in e)"function"==typeof(s=e[n])&&(s=s(r,t)),this._addTween(t,"setAttribute",t.getAttribute(n)+"",s+"",n,!1,n),this._overwriteProps.push(n);return!0}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(t,e,i,r){"object"!=typeof e&&(e={rotation:e}),this.finals={};var n,s,a,o,h,l,u=!0===e.useRadians?2*Math.PI:360;for(n in e)"useRadians"!==n&&("function"==typeof(o=e[n])&&(o=o(r,t)),s=(l=(o+"").split("_"))[0],a=parseFloat("function"!=typeof t[n]?t[n]:t[n.indexOf("set")||"function"!=typeof t["get"+n.substr(3)]?n:"get"+n.substr(3)]()),h=(o=this.finals[n]="string"==typeof s&&"="===s.charAt(1)?a+parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)):Number(s)||0)-a,l.length&&(-1!==(s=l.join("_")).indexOf("short")&&(h%=u)!==h%(u/2)&&(h=h<0?h+u:h-u),-1!==s.indexOf("_cw")&&h<0?h=(h+9999999999*u)%u-(h/u|0)*u:-1!==s.indexOf("ccw")&&h>0&&(h=(h-9999999999*u)%u-(h/u|0)*u)),(h>1e-6||h<-1e-6)&&(this._addTween(t,n,a,a+h,n),this._overwriteProps.push(n)));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,r,n=_gsScope.GreenSockGlobals||_gsScope,s=n.com.greensock,a=2*Math.PI,o=Math.PI/2,h=s._class,l=function(e,i){var r=h("easing."+e,function(){},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,r},u=t.register||function(){},c=function(t,e,i,r,n){var s=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!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)},p=function(e,i){var r=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t){return new r(t)},r},f=c("Back",p("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),p("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),p("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)})),_=h("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=h("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=h("easing.RoughEase",function(e){for(var i,r,n,s,a,o,h=(e=e||{}).taper||"none",l=[],u=0,c=0|(e.points||20),p=c,f=!1!==e.randomize,_=!0===e.clamp,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--p>-1;)i=f?Math.random():1/c*p,r=m?m.getRatio(i):i,n="none"===h?g:"out"===h?(s=1-i)*s*g:"in"===h?i*i*g:i<.5?(s=2*i)*s*.5*g:(s=2*(1-i))*s*.5*g,f?r+=Math.random()*n-.5*n:p%2?r+=.5*n:r-=.5*n,_&&(r>1?r=1:r<0&&(r=0)),l[u++]={x:i,y:r};for(l.sort(function(t,e){return t.x-e.x}),o=new d(1,1,null),p=c;--p>-1;)a=l[p],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",l("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}),l("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)}),l("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",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),r=function(e,i,r){var n=h("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||r)/(t<1?t:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),s=n.prototype=new t;return s.constructor=n,s.getRatio=i,s.config=function(t,e){return new n(t,e)},n},c("Elastic",r("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),r("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),r("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",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return 1-Math.cos(t*o)}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),u(n.SlowMo,"SlowMo","ease,"),u(i,"RoughEase","ease,"),u(e,"SteppedEase","ease,"),f},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i={},r=t.document,n=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!n.TweenLite){var s,a,o,h,l,u=function(t){var e,i=t.split("."),r=n;for(e=0;e-1;)(l=_[r[g]]||new m(r[g],[])).gsClass?(o[g]=l.gsClass,v--):h&&l.sc.push(this);if(0===v&&s){if(c=("com.greensock."+e).split("."),d=c.pop(),p=u(c.join("."))[d]=this.gsClass=s.apply(s,o),a)if(n[d]=i[d]=p,!(f="undefined"!=typeof module&&module.exports)&&"function"==typeof define&&define.amd)define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+e.split(".").pop(),[],function(){return p});else if(f)if("TweenMax"===e){module.exports=i.TweenMax=p;for(g in i)p[g]=i[g]}else i.TweenMax&&(i.TweenMax[d]=p);for(g=0;g-1;)for(s=h[l],n=r?v("easing."+s,null,!0):c.easing[s]||{},a=u.length;--a>-1;)o=u[a],T[s+"."+o]=T[o+s]=n[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,r=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:t<.5?r/2:1-r/2},a=(s=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--a>-1;)o=s[a]+",Power"+a,E(new b(null,null,1,a),o,"easeOut",!0),E(new b(null,null,2,a),o,"easeIn"+(0===a?",easeNone":"")),E(new b(null,null,3,a),o,"easeInOut");T.linear=c.easing.Linear.easeIn,T.swing=c.easing.Quad.easeInOut;var x=v("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(o=x.prototype).addEventListener=function(t,e,i,r,n){n=n||0;var s,a,o=this._listeners[t],u=0;for(this!==h||l||h.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(r[i].c===e)return void r.splice(i,1)},o.dispatchEvent=function(t){var e,i,r,n=this._listeners[t];if(n)for((e=n.length)>1&&(n=n.slice(0)),i=this._eventTarget;--e>-1;)(r=n[e])&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};var w=t.requestAnimationFrame,S=t.cancelAnimationFrame,D=Date.now||function(){return(new Date).getTime()},P=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,n,s,a,o,u=this,c=D(),d=!(!1===e||!w)&&"auto",f=500,_=33,m=function(t){var e,r,h=D()-P;h>f&&(c+=h-_),P+=h,u.time=(P-c)/1e3,e=u.time-o,(!i||e>0||!0===t)&&(u.frame++,o+=e+(e>=a?.004:a-e),r=!0),!0!==t&&(s=n(m)),r&&u.dispatchEvent("tick")};x.call(u),u.time=u.frame=0,u.tick=function(){m(!0)},u.lagSmoothing=function(t,e){f=t||1e10,_=Math.min(e,f,0)},u.sleep=function(){null!=s&&(d&&S?S(s):clearTimeout(s),n=p,s=null,u===h&&(l=!1))},u.wake=function(t){null!==s?u.sleep():t?c+=-P+(P=D()):u.frame>10&&(P=D()-f+5),n=0===i?p:d&&w?w:function(t){return setTimeout(t,1e3*(o-u.time)+1|0)},u===h&&(l=!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"!==r.visibilityState&&u.useRAF(!1)},1500)}),(o=c.Ticker.prototype=new c.events.EventDispatcher).constructor=c.Ticker;var A=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){l||h.wake();var i=this.vars.useFrames?W:q;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});h=A.ticker=new c.Ticker,(o=A.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 I=function(){l&&D()-P>2e3&&h.wake(),setTimeout(I,2e3)};I(),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],r=e[t+"Params"],n=e[t+"Scope"]||e.callbackScope||this;switch(r?r.length:0){case 0:i.call(n);break;case 1:i.call(n,r[0]);break;case 2:i.call(n,r[0],r[1]);break;default:i.apply(n,r)}},o.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+"Params"]=f(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,n[t+"Scope"]=r),"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(l||h.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,n=this._timeline;if(t>r&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:n._time)-(this._reversed?r-t:t)/this._timeScale,n._dirty||this._uncache(!1),n._timeline)for(;n._timeline;)n._timeline._time!==(n._startTime+n._totalTime)/n._timeScale&&n.totalTime(n._totalTime,!0),n=n._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(R.length&&J(),this.render(t,e,!1),R.length&&J())}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,r=this._timeline;return t!=this._paused&&r&&(l||t||h.wake(),i=(e=r.rawTime())-this._pauseTime,!t&&r.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=r.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){A.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(o=C.prototype=new A).constructor=C,o.kill()._gc=!1,o._first=o._last=o._recent=null,o._sortChildren=!1,o.add=o.insert=function(t,e,i,r){var n,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),n=this._last,this._sortChildren)for(s=t._startTime;n&&n._startTime>s;)n=n._prev;return n?(t._next=n._next,n._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=n,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 r,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)r=n._next,(n._active||t>=n._startTime&&!n._paused)&&(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=r},o.rawTime=function(){return l||h.wake(),this._totalTime};var O=v("TweenLite",function(e,i,r){if(A.call(this,i,r),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 n,s,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),h=this.vars.overwrite;if(this._overwrite=h=null==h?V[O.defaultOverwrite]:"number"==typeof h?h>>0:V[h],(o||e instanceof Array||e.push&&f(e))&&"number"!=typeof e[0])for(this._targets=a=d(e),this._propLookup=[],this._siblings=[],n=0;n1&&K(s,this,null,1,this._siblings[n])):"string"==typeof(s=a[n--]=O.selector(s))&&a.splice(n+1,1):a.splice(n--,1);else this._propLookup={},this._siblings=Q(e,this,!1),1===h&&this._siblings.length>1&&K(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),M=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,r={};for(i in t)Y[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)||(r[i]=t[i],delete t[i]);t.css=r};(o=O.prototype=new A).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=h,O.autoSleep=120,O.lagSmoothing=function(t,e){h.lagSmoothing(t,e)},O.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(O.selector=i,i(e)):void 0===r?e:r.querySelectorAll?r.querySelectorAll(e):r.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},H=function(t,e,i,r){var n,s,a,o,h,l,u,c=[],d=0,p="",f=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,n=t.match(N)||[],s=e.match(N)||[],r&&(r._next=null,r.blob=1,c._firstPT=c._applyPT=r),h=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=h.time,W._startTime=h.frame,q._active=W._active=!0,setTimeout(J,1),A._updateRoot=O.render=function(){var t,e,i;if(R.length&&J(),q.render((h.time-q._startTime)*q._timeScale,!1,!1),W.render((h.frame-W._startTime)*W._timeScale,!1,!1),R.length&&J(),h.frame>=z){z=h.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===h._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||h.sleep()}}},h.addEventListener("tick",A._updateRoot);var Q=function(t,e,i){var r,n,s=t._gsTweenID;if(X[s||(t._gsTweenID=s="t"+G++)]||(X[s]={target:t,tweens:[]}),e&&(r=X[s].tweens,r[n=r.length]=e,i))for(;--n>-1;)r[n]===e&&r.splice(n,1);return X[s].tweens},Z=function(t,e,i,r){var n,s,a=t.vars.onOverwrite;return a&&(n=a(t,e,i,r)),(a=O.onOverwrite)&&(s=a(t,e,i,r)),!1!==n&&!1!==s},K=function(t,e,i,r,n){var s,a,o,h;if(1===r||r>=4){for(h=n.length,s=0;s-1;)(o=n[s])===e||o._gc||o._paused||(o._timeline!==e._timeline?(l=l||$(e,0,p),0===$(o,l,p)&&(c[d++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((p||!o._initted)&&u-o._startTime<=2e-10||(c[d++]=o)));for(s=d;--s>-1;)if(o=c[s],2===r&&o._kill(i,t,e)&&(a=!0),2!==r||!o._firstPT&&o._initted){if(2!==r&&!Z(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},$=function(t,e,i){for(var r=t._timeline,n=r._timeScale,s=t._startTime;r._timeline;){if(s+=r._startTime,n*=r._timeScale,r._paused)return-100;r=r._timeline}return(s/=n)>e?s-e:i&&s===e||!t._initted&&s-e<2e-10?1e-10:(s+=t.totalDuration()/t._timeScale/n)>e+1e-10?0:s-e-1e-10};o._init=function(){var t,e,i,r,n,s,a=this.vars,o=this._overwrittenProps,h=this._duration,l=!!a.immediateRender,u=a.ease;if(a.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={};for(r in a.startAt)n[r]=a.startAt[r];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==a.lazy,n.startAt=n.delay=null,this._startAt=O.to(this.target,0,n),l)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(a.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(l=!1),i={};for(r in a)Y[r]&&"autoCSS"!==r||(i[r]=a[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=l&&!1!==a.lazy,i.immediateRender=l,this._startAt=O.to(this.target,0,i),l){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[l._overwriteProps[o]]=this._firstPT;(l._priority||l._onInitAllProps)&&(h=!0),(l._onDisable||l._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 n&&this._kill(n,e)?this._initProps(e,i,r,n,s):this._overwrite>1&&this._firstPT&&r.length>1&&K(e,this,i,this._overwrite,r)?(this._kill(i,e),this._initProps(e,i,r,n,s)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(j[e._gsTweenID]=!0),h)},o.render=function(t,e,i){var r,n,s,a,o=this._time,h=this._duration,l=this._rawPrevTime;if(t>=h-1e-7&&t>=0)this._totalTime=this._time=h,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,n="onComplete",i=i||this._timeline.autoRemoveChildren),0===h&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(l<0||t<=0&&t>=-1e-7||1e-10===l&&"isPause"!==this.data)&&l!==t&&(i=!0,l>1e-10&&(n="onReverseComplete")),this._rawPrevTime=a=!e||t||l===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===h&&l>0)&&(n="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===h&&(this._initted||!this.vars.lazy||i)&&(l>=0&&(1e-10!==l||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||l===t?t:1e-10)),this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/h,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/h<.5?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/h);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=l,R.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/h):r&&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):n||(n="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==h||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||r||i)&&this._callback("onUpdate")),n&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===h&&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 r,n,s,a,o,h,l,u,c,d=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((f(e)||M(e))&&"number"!=typeof e[0])for(r=e.length;--r>-1;)this._kill(t,e[r],i)&&(h=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(e===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],n=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,n=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(l=t||o,u=t!==n&&"all"!==n&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(O.onOverwrite||this.vars.onOverwrite)){for(s in l)o[s]&&(c||(c=[]),c.push(s));if((c||!t)&&!Z(this,i,e,c))return!1}for(s in l)(a=o[s])&&(d&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,h=!0),a.pg&&a.t._kill(l)&&(h=!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&&(n[s]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return h},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?{}:[],A.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(l||h.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;--i>-1;)this._siblings[i]=Q(r[i],this,!0);else this._siblings=Q(this.target,this,!0)}return A.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,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new O(t,e,r)},O.delayedCall=function(t,e,i,r,n){return new O(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:n,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,r,n,s;if((f(t)||M(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];--i>-1;)r=r.concat(O.getTweensOf(t[i],e));for(i=r.length;--i>-1;)for(s=r[i],n=i;--n>-1;)s===r[n]&&r.splice(i,1)}else for(i=(r=Q(t).concat()).length;--i>-1;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r},O.killTweensOf=O.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=O.getTweensOf(t,e),n=r.length;--n>-1;)r[n]._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,r=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(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._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,r,n,s,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:s)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:s=o,o=a}o=e._firstPT=n}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,r=t.priority||0,n=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,r),this._overwriteProps=n||[]},!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((f=g.hasOwnProperty)||(f=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?f=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,f=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,f.call(this,t)}),_=function(t,e){var r,n,s,a=0;(r=function(){this.valueOf=0}).prototype.valueOf=0,n=new r;for(s in n)f.call(n,s)&&a++;return r=n=null,a?_=2==a?function(t,e){var i,r={},n="[object Function]"==v.call(t);for(i in t)n&&"prototype"==i||f.call(r,i)||!(r[i]=1)||!f.call(t,i)||e(i)}:function(t,e){var i,r,n="[object Function]"==v.call(t);for(i in t)n&&"prototype"==i||!f.call(t,i)||(r="constructor"===i)||e(i);(r||f.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],_=function(t,e){var r,s,a="[object Function]"==v.call(t),o=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||f;for(r in t)a&&"prototype"==r||!o.call(t,r)||e(r);for(s=n.length;r=n[--s];o.call(t,r)&&e(r));}),_(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,r=t.length,n=!b||r>10,s=n&&(b?t.split(""):t);i-1/0&&o<1/0){if(x){for(d=T(o/864e5),l=T(d/365.2425)+1970-1;x(l+1,0)<=d;l++);for(u=T((d-x(l,0))/30.42);x(l,u+1)<=d;u++);d=1+d-x(l,u),g=T((p=(o%864e5+864e5)%864e5)/36e5)%24,y=T(p/6e4)%60,b=T(p/1e3)%60,E=p%1e3}else l=o.getUTCFullYear(),u=o.getUTCMonth(),d=o.getUTCDate(),g=o.getUTCHours(),y=o.getUTCMinutes(),b=o.getUTCSeconds(),E=o.getUTCMilliseconds();o=(l<=0||l>=1e4?(l<0?"-":"+")+S(6,l<0?-l:l):S(4,l))+"-"+S(2,u+1)+"-"+S(2,d)+"T"+S(2,g)+":"+S(2,y)+":"+S(2,b)+"."+S(3,E)+"Z"}else o=null;if(i&&(o=i.call(e,t,o)),null===o)return"null";if("[object Boolean]"==(h=v.call(o)))return""+o;if("[object Number]"==h)return o>-1/0&&o<1/0?""+o:"null";if("[object String]"==h)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+=n,"[object Array]"==h){for(I=0,C=o.length;I0)for(n="",r>10&&(r=10);n.length=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70||M();t+=C("0x"+s.slice(e,A));break;default:M()}else{if(34==n)break;for(n=s.charCodeAt(A),e=A;n>=32&&92!=n&&34!=n;)n=s.charCodeAt(++A);t+=s.slice(e,A)}if(34==s.charCodeAt(A))return A++,t;M();default:if(e=A,45==n&&(r=!0,n=s.charCodeAt(++A)),n>=48&&n<=57){for(48==n&&(n=s.charCodeAt(A+1))>=48&&n<=57&&M(),r=!1;A=48&&n<=57;A++);if(46==s.charCodeAt(A)){for(i=++A;i=48&&n<=57;i++);i==A&&M(),A=i}if(101==(n=s.charCodeAt(A))||69==n){for(43!=(n=s.charCodeAt(++A))&&45!=n||A++,i=A;i=48&&n<=57;i++);i==A&&M(),A=i}return+s.slice(e,A)}if(r&&M(),"true"==s.slice(A,A+4))return A+=4,!0;if("false"==s.slice(A,A+5))return A+=5,!1;if("null"==s.slice(A,A+4))return A+=4,null;M()}return"$"},R=function(t){var e,i;if("$"==t&&M(),"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())&&M():M()),","==t&&M(),e.push(R(t));return e}if("{"==t){for(e={};"}"!=(t=L());i||(i=!0))i&&(","==t?"}"==(t=L())&&M():M()),","!=t&&"string"==typeof t&&"@"==(b?t.charAt(0):t[0])&&":"==L()||M(),e[t.slice(1)]=R(L());return e}M()}return t},j=function(t,e,i){var r=N(t,e,i);r===m?delete t[e]:t[e]=r},N=function(t,e,i){var r,n=t[e];if("object"==typeof n&&n)if("[object Array]"==v.call(n))for(r=n.length;r--;)j(n,r,i);else _(n,function(t){j(n,t,i)});return i.call(t,e,n)};r.parse=function(t,e){var i,r;return A=0,I=""+t,i=R(L()),"$"!=L()&&M(),A=I=null,e&&"[object Function]"==v.call(e)?N((r={},r[""]=i,r),"",e):i}}}return r.runInContext=t,r}var e="function"==typeof define&&define.amd,i={function:!0,object:!0},r=i[typeof exports]&&exports&&!exports.nodeType&&exports,n=i[typeof window]&&window||this,s=r&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(n=s),r&&!e)t(n,r);else{var a=n.JSON,o=n.JSON3,h=!1,l=t(n,n.JSON3={noConflict:function(){return h||(h=!0,n.JSON=a,n.JSON3=o,a=o=null),l}});n.JSON={parse:l.parse,stringify:l.stringify}}e&&define(function(){return l})}.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 r=new DOMParser;i=r.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 r=new t;return r.src=e,r}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 r=e.indexOf("?");r>-1&&(e=e.substr(0,r));var n;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var r in t)i.push(r+"="+escape(t[r]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],r=t.indexOf("?");if(-1!=r){var n=t.slice(r+1);i=i.concat(n.split("&"))}return-1!=r?t.slice(0,r)+"?"+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={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;n0)return;var i=!1;if(e){for(;e.length;){var r=e.pop(),n=this.getResult(r);for(s=this._loadQueue.length-1;s>=0;s--)if((a=this._loadQueue[s].getItem()).id==r||a.src==r){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if((a=this._loadQueueBackup[s].getItem()).id==r||a.src==r){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(n)this._disposeItem(this.getItem(r));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==r||a.src==r){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,r=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 r=new createjs.ErrorEvent("PRELOAD_NO_FILE");this._sendError(r)}},e.loadManifest=function(t,e,r){var n=null,s=null;if(Array.isArray(t)){if(0==t.length){a=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(a)}n=t}else if("string"==typeof t)n=[{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)}n=[t]}else void 0!==t.manifest&&(n=t.manifest,s=t.path)}for(var o=0,h=n.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(),r=e.getResult();this._loadedResults[i.id]=r;var n=e.getResult(!0);null!=n&&n!==r&&(this._loadedRawResults[i.id]=n),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,r=0,n=this._currentLoads.length;r-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 r,n=(r=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{})[t];return n&&this.removeEventListener(t,e,i),(n=r[t])?n.push(e):r[t]=[e],e},e.on=function(t,e,i,r,n,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,n),r&&t.remove()},s)},e.removeEventListener=function(t,e,i){var r=i?this._captureListeners:this._listeners;if(r){var n=r[t];if(n)for(var s=0,a=n.length;s=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a-1&&(e=e.substr(0,r));var n;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var r in t)i.push(r+"="+escape(t[r]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],r=t.indexOf("?");if(-1!=r){var n=t.slice(r+1);i=i.concat(n.split("&"))}return-1!=r?t.slice(0,r)+"?"+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={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;ni.alternateExtensions.length)return null;return{name:r,src:t=t.replace("."+e[5],"."+n),extension:n}},i._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},r=i.capabilities;for(var n in t)if(t.hasOwnProperty(n)&&r[n]){e.src=t[n],e.extension=n;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,r,n,s,a,o,h,l){var u;u=e instanceof Object||e instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(e):createjs.PlayPropsConfig.create({interrupt:e,delay:r,offset:n,loop:s,volume:a,pan:o,startTime:h,duration:l});var c=i.createInstance(t,u.startTime,u.duration);return i._playInstance(c,u)||c._playFailed(),c},i.createInstance=function(t,r,n){if(!i.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(t,r,n);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==r&&(r=t.startTime),o=i.activePlugin.create(a.src,r,n||t.duration),(s=s||i._defaultPlayPropsHash[a.src])&&o.applyPlayProps(s)):o=new createjs.DefaultSoundInstance(t,r,n),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,r=0,n=e.length;r-1&&this._instances.splice(r,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 r=e.get(t.src);return null!=r&&r._add(t,i)},e.remove=function(t){var i=e.get(t.src);return null!=i&&(i._remove(t),!0)},e.maxPerChannel=function(){return r.maxDefault},e.get=function(t){return e.channels[t]};var r=e.prototype;r.constructor=e,r.src=null,r.max=null,r.maxDefault=100,r.length=0,r.init=function(t,e){this.src=t,this.max=e||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},r._get=function(t){return this._instances[t]},r._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},r._remove=function(t){var e=createjs.indexOf(this._instances,t);return-1!=e&&(this._instances.splice(e,1),this.length--,!0)},r._removeAll=function(){for(var t=this.length-1;t>=0;t--)this._instances[t].stop()},r._getSlot=function(e,i){var r,n;if(e!=t.INTERRUPT_NONE&&null==(n=this._get(0)))return!0;for(var s=0,a=this.max;sn.getPosition())&&(n=r))}return null!=n&&(n._interrupt(),this._remove(n),!0)},r.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t,e,i,r){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!==r&&!0!==r&&this.setPlaybackResource(r),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,r,n,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:r,volume:n,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&&(r=e),this.sourceNode=this._createAndPlayAudioNode(i.context.currentTime-e,r),this._playbackStartTime=this.sourceNode.startTime-r,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-r)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var r=i.context.createBufferSource();r.buffer=this.playbackResource,r.connect(this.panNode);var n=.001*this._duration;return r.startTime=t+n,r.start(r.startTime,e+.001*this._startTime,n-e),r},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,r=createjs.Sound.EXTENSION_MAP,n=0,s=e.length;ni;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=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 r,n=(r=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{})[t];return n&&this.removeEventListener(t,e,i),(n=r[t])?n.push(e):r[t]=[e],e},e.on=function(t,e,i,r,n,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,n),r&&t.remove()},s)},e.removeEventListener=function(t,e,i){var r=i?this._captureListeners:this._listeners;if(r){var n=r[t];if(n)for(var s=0,a=n.length;a>s;s++)if(n[s]==e){1==a?delete r[t]:n.splice(s,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var r=this._listeners;if(!(e||r&&r[t]))return!0;t=new createjs.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(t){}if(t.bubbles&&this.parent){for(var n=this,s=[n];n.parent;)s.push(n=n.parent);var a,o=s.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;o>a&&!t.propagationStopped;a++)s[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){for(var e=this;e;){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,r=1==e?this._captureListeners:this._listeners;if(t&&r){var n=r[t.type];if(!n||!(i=n.length))return;try{t.currentTarget=this}catch(t){}try{t.eventPhase=e}catch(t){}t.removed=!1,n=n.slice();for(var s=0;i>s&&!t.immediatePropagationStopped;s++){var a=n[s];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}},createjs.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Ticker cannot be instantiated."}t.RAF_SYNCHED="synched",t.RAF="raf",t.TIMEOUT="timeout",t.useRAF=!1,t.timingMode=null,t.maxDelta=0,t.paused=!1,t.removeEventListener=null,t.removeAllEventListeners=null,t.dispatchEvent=null,t.hasEventListener=null,t._listeners=null,createjs.EventDispatcher.initialize(t),t._addEventListener=t.addEventListener,t.addEventListener=function(){return!t._inited&&t.init(),t._addEventListener.apply(t,arguments)},t._inited=!1,t._startTime=0,t._pausedTime=0,t._ticks=0,t._pausedTicks=0,t._interval=50,t._lastTime=0,t._times=null,t._tickTimes=null,t._timerId=null,t._raf=!0,t.setInterval=function(e){t._interval=e,t._inited&&t._setupTick()},t.getInterval=function(){return t._interval},t.setFPS=function(e){t.setInterval(1e3/e)},t.getFPS=function(){return 1e3/t._interval};try{Object.defineProperties(t,{interval:{get:t.getInterval,set:t.setInterval},framerate:{get:t.getFPS,set:t.setFPS}})}catch(t){console.log(t)}t.init=function(){t._inited||(t._inited=!0,t._times=[],t._tickTimes=[],t._startTime=t._getTime(),t._times.push(t._lastTime=0),t.interval=t._interval)},t.reset=function(){if(t._raf){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;e&&e(t._timerId)}else clearTimeout(t._timerId);t.removeAllEventListeners("tick"),t._timerId=t._times=t._tickTimes=null,t._startTime=t._lastTime=t._ticks=0,t._inited=!1},t.getMeasuredTickTime=function(e){var i=0,r=t._tickTimes;if(!r||r.length<1)return-1;e=Math.min(r.length,e||0|t.getFPS());for(var n=0;e>n;n++)i+=r[n];return i/e},t.getMeasuredFPS=function(e){var i=t._times;return!i||i.length<2?-1:(e=Math.min(i.length-1,e||0|t.getFPS()),1e3/((i[0]-i[e])/e))},t.setPaused=function(e){t.paused=e},t.getPaused=function(){return t.paused},t.getTime=function(e){return t._startTime?t._getTime()-(e?t._pausedTime:0):-1},t.getEventTime=function(e){return t._startTime?(t._lastTime||t._startTime)-(e?t._pausedTime:0):-1},t.getTicks=function(e){return t._ticks-(e?t._pausedTicks:0)},t._handleSynch=function(){t._timerId=null,t._setupTick(),t._getTime()-t._lastTime>=.97*(t._interval-1)&&t._tick()},t._handleRAF=function(){t._timerId=null,t._setupTick(),t._tick()},t._handleTimeout=function(){t._timerId=null,t._setupTick(),t._tick()},t._setupTick=function(){if(null==t._timerId){var e=t.timingMode||t.useRAF&&t.RAF_SYNCHED;if(e==t.RAF_SYNCHED||e==t.RAF){var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(i)return t._timerId=i(e==t.RAF?t._handleRAF:t._handleSynch),void(t._raf=!0)}t._raf=!1,t._timerId=setTimeout(t._handleTimeout,t._interval)}},t._tick=function(){var e=t.paused,i=t._getTime(),r=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=r),t.hasEventListener("tick")){var n=new createjs.Event("tick"),s=t.maxDelta;n.delta=s&&r>s?s:r,n.paused=e,n.time=i,n.runTime=i-t._pausedTime,t.dispatchEvent(n)}for(t._tickTimes.unshift(t._getTime()-i);t._tickTimes.length>100;)t._tickTimes.pop();for(t._times.unshift(i);t._times.length>100;)t._times.pop()};var e=window.performance&&(performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow);t._getTime=function(){return(e&&e.call(performance)||(new Date).getTime())-t._startTime},createjs.Ticker=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"UID cannot be instantiated"}t._nextID=0,t.get=function(){return t._nextID++},createjs.UID=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r,n,s,a,o,h,l,u){this.Event_constructor(t,e,i),this.stageX=r,this.stageY=n,this.rawX=null==h?r:h,this.rawY=null==l?n:l,this.nativeEvent=s,this.pointerID=a,this.primary=!!o,this.relatedTarget=u}var e=createjs.extend(t,createjs.Event);e._get_localX=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).x},e._get_localY=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).y},e._get_isTouch=function(){return-1!==this.pointerID};try{Object.defineProperties(e,{localX:{get:e._get_localX},localY:{get:e._get_localY},isTouch:{get:e._get_isTouch}})}catch(t){}e.clone=function(){return new t(this.type,this.bubbles,this.cancelable,this.stageX,this.stageY,this.nativeEvent,this.pointerID,this.primary,this.rawX,this.rawY)},e.toString=function(){return"[MouseEvent (type="+this.type+" stageX="+this.stageX+" stageY="+this.stageY+")]"},createjs.MouseEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r,n,s){this.setValues(t,e,i,r,n,s)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,r,n,s){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==r?1:r,this.tx=n||0,this.ty=s||0,this},e.append=function(t,e,i,r,n,s){var a=this.a,o=this.b,h=this.c,l=this.d;return(1!=t||0!=e||0!=i||1!=r)&&(this.a=a*t+h*e,this.b=o*t+l*e,this.c=a*i+h*r,this.d=o*i+l*r),this.tx=a*n+h*s+this.tx,this.ty=o*n+l*s+this.ty,this},e.prepend=function(t,e,i,r,n,s){var a=this.a,o=this.c,h=this.tx;return this.a=t*a+i*this.b,this.b=e*a+r*this.b,this.c=t*o+i*this.d,this.d=e*o+r*this.d,this.tx=t*h+i*this.ty+n,this.ty=e*h+r*this.ty+s,this},e.appendMatrix=function(t){return this.append(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.prependMatrix=function(t){return this.prepend(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.appendTransform=function(e,i,r,n,s,a,o,h,l){if(s%360)var u=s*t.DEG_TO_RAD,c=Math.cos(u),d=Math.sin(u);else c=1,d=0;return a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.append(Math.cos(o),Math.sin(o),-Math.sin(a),Math.cos(a),e,i),this.append(c*r,d*r,-d*n,c*n,0,0)):this.append(c*r,d*r,-d*n,c*n,e,i),(h||l)&&(this.tx-=h*this.a+l*this.c,this.ty-=h*this.b+l*this.d),this},e.prependTransform=function(e,i,r,n,s,a,o,h,l){if(s%360)var u=s*t.DEG_TO_RAD,c=Math.cos(u),d=Math.sin(u);else c=1,d=0;return(h||l)&&(this.tx-=h,this.ty-=l),a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.prepend(c*r,d*r,-d*n,c*n,0,0),this.prepend(Math.cos(o),Math.sin(o),-Math.sin(a),Math.cos(a),e,i)):this.prepend(c*r,d*r,-d*n,c*n,e,i),this},e.rotate=function(e){e*=t.DEG_TO_RAD;var i=Math.cos(e),r=Math.sin(e),n=this.a,s=this.b;return this.a=n*i+this.c*r,this.b=s*i+this.d*r,this.c=-n*r+this.c*i,this.d=-s*r+this.d*i,this},e.skew=function(e,i){return e*=t.DEG_TO_RAD,i*=t.DEG_TO_RAD,this.append(Math.cos(i),Math.sin(i),-Math.sin(e),Math.cos(e),0,0),this},e.scale=function(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this},e.translate=function(t,e){return this.tx+=this.a*t+this.c*e,this.ty+=this.b*t+this.d*e,this},e.identity=function(){return this.a=this.d=1,this.b=this.c=this.tx=this.ty=0,this},e.invert=function(){var t=this.a,e=this.b,i=this.c,r=this.d,n=this.tx,s=t*r-e*i;return this.a=r/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-r*n)/s,this.ty=-(t*this.ty-e*n)/s,this},e.isIdentity=function(){return 0===this.tx&&0===this.ty&&1===this.a&&0===this.b&&0===this.c&&1===this.d},e.equals=function(t){return this.tx===t.tx&&this.ty===t.ty&&this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d},e.transformPoint=function(t,e,i){return i=i||{},i.x=t*this.a+e*this.c+this.tx,i.y=t*this.b+e*this.d+this.ty,i},e.decompose=function(e){null==e&&(e={}),e.x=this.tx,e.y=this.ty,e.scaleX=Math.sqrt(this.a*this.a+this.b*this.b),e.scaleY=Math.sqrt(this.c*this.c+this.d*this.d);var i=Math.atan2(-this.c,this.d),r=Math.atan2(this.b,this.a);return 1e-5>Math.abs(1-i/r)?(e.rotation=r/t.DEG_TO_RAD,this.a<0&&this.d>=0&&(e.rotation+=e.rotation<=0?180:-180),e.skewX=e.skewY=0):(e.skewX=i/t.DEG_TO_RAD,e.skewY=r/t.DEG_TO_RAD),e},e.copy=function(t){return this.setValues(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.tx,this.ty)},e.toString=function(){return"[Matrix2D (a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+")]"},t.identity=new t,createjs.Matrix2D=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r,n){this.setValues(t,e,i,r,n)}var e=t.prototype;e.setValues=function(t,e,i,r,n){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=r,this.matrix=n||this.matrix&&this.matrix.identity()||new createjs.Matrix2D,this},e.append=function(t,e,i,r,n){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=r||this.compositeOperation,this.visible=this.visible&&t,n&&this.matrix.appendMatrix(n),this},e.prepend=function(t,e,i,r,n){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||r,this.visible=this.visible&&t,n&&this.matrix.prependMatrix(n),this},e.identity=function(){return this.visible=!0,this.alpha=1,this.shadow=this.compositeOperation=null,this.matrix.identity(),this},e.clone=function(){return new t(this.alpha,this.shadow,this.compositeOperation,this.visible,this.matrix.clone())},createjs.DisplayProps=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.setValues(t,e)}var e=t.prototype;e.setValues=function(t,e){return this.x=t||0,this.y=e||0,this},e.copy=function(t){return this.x=t.x,this.y=t.y,this},e.clone=function(){return new t(this.x,this.y)},e.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},createjs.Point=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r){this.setValues(t,e,i,r)}var e=t.prototype;e.setValues=function(t,e,i,r){return this.x=t||0,this.y=e||0,this.width=i||0,this.height=r||0,this},e.extend=function(t,e,i,r){return i=i||0,r=r||0,t+i>this.x+this.width&&(this.width=t+i-this.x),e+r>this.y+this.height&&(this.height=e+r-this.y),t=this.x&&t+i<=this.x+this.width&&e>=this.y&&e+r<=this.y+this.height},e.union=function(t){return this.clone().extend(t.x,t.y,t.width,t.height)},e.intersection=function(e){var i=e.x,r=e.y,n=i+e.width,s=r+e.height;return this.x>i&&(i=this.x),this.y>r&&(r=this.y),this.x+this.width=n||r>=s?null:new t(i,r,n-i,s-r)},e.intersects=function(t){return t.x<=this.x+this.width&&this.x<=t.x+t.width&&t.y<=this.y+this.height&&this.y<=t.y+t.height},e.isEmpty=function(){return this.width<=0||this.height<=0},e.clone=function(){return new t(this.x,this.y,this.width,this.height)},e.toString=function(){return"[Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")]"},createjs.Rectangle=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r,n,s,a){t.addEventListener&&(this.target=t,this.overLabel=null==i?"over":i,this.outLabel=null==e?"out":e,this.downLabel=null==r?"down":r,this.play=n,this._isPressed=!1,this._isOver=!1,this._enabled=!1,t.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),s&&(a&&(s.actionsEnabled=!1,s.gotoAndStop&&s.gotoAndStop(a)),t.hitArea=s))}var e=t.prototype;e.setEnabled=function(t){if(t!=this._enabled){var e=this.target;this._enabled=t,t?(e.cursor="pointer",e.addEventListener("rollover",this),e.addEventListener("rollout",this),e.addEventListener("mousedown",this),e.addEventListener("pressup",this),e._reset&&(e.__reset=e._reset,e._reset=this._reset)):(e.cursor=null,e.removeEventListener("rollover",this),e.removeEventListener("rollout",this),e.removeEventListener("mousedown",this),e.removeEventListener("pressup",this),e.__reset&&(e._reset=e.__reset,delete e.__reset))}},e.getEnabled=function(){return this._enabled};try{Object.defineProperties(e,{enabled:{get:e.getEnabled,set:e.setEnabled}})}catch(t){}e.toString=function(){return"[ButtonHelper]"},e.handleEvent=function(t){var e,i=this.target,r=t.type;"mousedown"==r?(this._isPressed=!0,e=this.downLabel):"pressup"==r?(this._isPressed=!1,e=this._isOver?this.overLabel:this.outLabel):"rollover"==r?(this._isOver=!0,e=this._isPressed?this.downLabel:this.overLabel):(this._isOver=!1,e=this._isPressed?this.overLabel:this.outLabel),this.play?i.gotoAndPlay&&i.gotoAndPlay(e):i.gotoAndStop&&i.gotoAndStop(e)},e._reset=function(){var t=this.paused;this.__reset(),this.paused=t},createjs.ButtonHelper=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r){this.color=t||"black",this.offsetX=e||0,this.offsetY=i||0,this.blur=r||0}var e=t.prototype;t.identity=new t("transparent",0,0,0),e.toString=function(){return"[Shadow]"},e.clone=function(){return new t(this.color,this.offsetX,this.offsetY,this.blur)},createjs.Shadow=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.EventDispatcher_constructor(),this.complete=!0,this.framerate=0,this._animations=null,this._frames=null,this._images=null,this._data=null,this._loadCount=0,this._frameHeight=0,this._frameWidth=0,this._numFrames=0,this._regX=0,this._regY=0,this._spacing=0,this._margin=0,this._parseData(t)}var e=createjs.extend(t,createjs.EventDispatcher);e.getAnimations=function(){return this._animations.slice()};try{Object.defineProperties(e,{animations:{get:e.getAnimations}})}catch(t){}e.getNumFrames=function(t){if(null==t)return this._frames?this._frames.length:this._numFrames||0;var e=this._data[t];return null==e?0:e.frames.length},e.getAnimation=function(t){return this._data[t]},e.getFrame=function(t){var e;return this._frames&&(e=this._frames[t])?e:null},e.getFrameBounds=function(t,e){var i=this.getFrame(t);return i?(e||new createjs.Rectangle).setValues(-i.regX,-i.regY,i.rect.width,i.rect.height):null},e.toString=function(){return"[SpriteSheet]"},e.clone=function(){throw"SpriteSheet cannot be cloned."},e._parseData=function(t){var e,i,r,n;if(null!=t){if(this.framerate=t.framerate||0,t.images&&(i=t.images.length)>0)for(n=this._images=[],e=0;i>e;e++){var s=t.images[e];if("string"==typeof s){var a=s;(s=document.createElement("img")).src=a}n.push(s),s.getContext||s.naturalWidth||(this._loadCount++,this.complete=!1,function(t,e){s.onload=function(){t._handleImageLoad(e)}}(this,a),function(t,e){s.onerror=function(){t._handleImageError(e)}}(this,a))}if(null==t.frames);else if(Array.isArray(t.frames))for(this._frames=[],n=t.frames,e=0,i=n.length;i>e;e++){var o=n[e];this._frames.push({image:this._images[o[4]?o[4]:0],rect:new createjs.Rectangle(o[0],o[1],o[2],o[3]),regX:o[5]||0,regY:o[6]||0})}else r=t.frames,this._frameWidth=r.width,this._frameHeight=r.height,this._regX=r.regX||0,this._regY=r.regY||0,this._spacing=r.spacing||0,this._margin=r.margin||0,this._numFrames=r.count,0==this._loadCount&&this._calculateFrames();if(this._animations=[],null!=(r=t.animations)){this._data={};var h;for(h in r){var l={name:h},u=r[h];if("number"==typeof u)n=l.frames=[u];else if(Array.isArray(u))if(1==u.length)l.frames=[u[0]];else for(l.speed=u[3],l.next=u[2],n=l.frames=[],e=u[0];e<=u[1];e++)n.push(e);else{l.speed=u.speed,l.next=u.next;var c=u.frames;n=l.frames="number"==typeof c?[c]:c.slice(0)}(!0===l.next||void 0===l.next)&&(l.next=h),(!1===l.next||n.length<2&&l.next==h)&&(l.next=null),l.speed||(l.speed=1),this._animations.push(h),this._data[h]=l}}}},e._handleImageLoad=function(t){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},e._handleImageError=function(t){var e=new createjs.Event("error");e.src=t,this.dispatchEvent(e),0==--this._loadCount&&this.dispatchEvent("complete")},e._calculateFrames=function(){if(!this._frames&&0!=this._frameWidth){this._frames=[];var t=this._numFrames||1e5,e=0,i=this._frameWidth,r=this._frameHeight,n=this._spacing,s=this._margin;t:for(var a=0,o=this._images;a=c;){for(var d=s;l-s-i>=d;){if(e>=t)break t;e++,this._frames.push({image:h,rect:new createjs.Rectangle(d,c,i,r),regX:this._regX,regY:this._regY}),d+=i+n}c+=r+n}this._numFrames=e}},createjs.SpriteSheet=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.command=null,this._stroke=null,this._strokeStyle=null,this._oldStrokeStyle=null,this._strokeDash=null,this._oldStrokeDash=null,this._strokeIgnoreScale=!1,this._fill=null,this._instructions=[],this._commitIndex=0,this._activeInstructions=[],this._dirty=!1,this._storeIndex=0,this.clear()}var e=t.prototype,i=t;t.getRGB=function(t,e,i,r){return null!=t&&null==i&&(r=e,i=255&t,e=t>>8&255,t=t>>16&255),null==r?"rgb("+t+","+e+","+i+")":"rgba("+t+","+e+","+i+","+r+")"},t.getHSL=function(t,e,i,r){return null==r?"hsl("+t%360+","+e+"%,"+i+"%)":"hsla("+t%360+","+e+"%,"+i+"%,"+r+")"},t.BASE_64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63},t.STROKE_CAPS_MAP=["butt","round","square"],t.STROKE_JOINTS_MAP=["miter","round","bevel"];var r=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");r.getContext&&(t._ctx=r.getContext("2d"),r.width=r.height=1),e.getInstructions=function(){return this._updateInstructions(),this._instructions};try{Object.defineProperties(e,{instructions:{get:e.getInstructions}})}catch(t){}e.isEmpty=function(){return!(this._instructions.length||this._activeInstructions.length)},e.draw=function(t,e){this._updateInstructions();for(var i=this._instructions,r=this._storeIndex,n=i.length;n>r;r++)i[r].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,r=this._storeIndex,n=i.length;n>r;r++)!1!==(e=i[r]).path&&e.exec(t)},e.moveTo=function(t,e){return this.append(new i.MoveTo(t,e),!0)},e.lineTo=function(t,e){return this.append(new i.LineTo(t,e))},e.arcTo=function(t,e,r,n,s){return this.append(new i.ArcTo(t,e,r,n,s))},e.arc=function(t,e,r,n,s,a){return this.append(new i.Arc(t,e,r,n,s,a))},e.quadraticCurveTo=function(t,e,r,n){return this.append(new i.QuadraticCurveTo(t,e,r,n))},e.bezierCurveTo=function(t,e,r,n,s,a){return this.append(new i.BezierCurveTo(t,e,r,n,s,a))},e.rect=function(t,e,r,n){return this.append(new i.Rect(t,e,r,n))},e.closePath=function(){return this._activeInstructions.length?this.append(new i.ClosePath):this},e.clear=function(){return this._instructions.length=this._activeInstructions.length=this._commitIndex=0,this._strokeStyle=this._oldStrokeStyle=this._stroke=this._fill=this._strokeDash=this._oldStrokeDash=null,this._dirty=this._strokeIgnoreScale=!1,this},e.beginFill=function(t){return this._setFill(t?new i.Fill(t):null)},e.beginLinearGradientFill=function(t,e,r,n,s,a){return this._setFill((new i.Fill).linearGradient(t,e,r,n,s,a))},e.beginRadialGradientFill=function(t,e,r,n,s,a,o,h){return this._setFill((new i.Fill).radialGradient(t,e,r,n,s,a,o,h))},e.beginBitmapFill=function(t,e,r){return this._setFill(new i.Fill(null,r).bitmap(t,e))},e.endFill=function(){return this.beginFill()},e.setStrokeStyle=function(t,e,r,n,s){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,r,n,s),this._stroke&&(this._stroke.ignoreScale=s),this._strokeIgnoreScale=s,this},e.setStrokeDash=function(t,e){return this._updateInstructions(!0),this._strokeDash=this.command=new i.StrokeDash(t,e),this},e.beginStroke=function(t){return this._setStroke(t?new i.Stroke(t):null)},e.beginLinearGradientStroke=function(t,e,r,n,s,a){return this._setStroke((new i.Stroke).linearGradient(t,e,r,n,s,a))},e.beginRadialGradientStroke=function(t,e,r,n,s,a,o,h){return this._setStroke((new i.Stroke).radialGradient(t,e,r,n,s,a,o,h))},e.beginBitmapStroke=function(t,e){return this._setStroke((new i.Stroke).bitmap(t,e))},e.endStroke=function(){return this.beginStroke()},e.curveTo=e.quadraticCurveTo,e.drawRect=e.rect,e.drawRoundRect=function(t,e,i,r,n){return this.drawRoundRectComplex(t,e,i,r,n,n,n,n)},e.drawRoundRectComplex=function(t,e,r,n,s,a,o,h){return this.append(new i.RoundRect(t,e,r,n,s,a,o,h))},e.drawCircle=function(t,e,r){return this.append(new i.Circle(t,e,r))},e.drawEllipse=function(t,e,r,n){return this.append(new i.Ellipse(t,e,r,n))},e.drawPolyStar=function(t,e,r,n,s,a){return this.append(new i.PolyStar(t,e,r,n,s,a))},e.append=function(t,e){return this._activeInstructions.push(t),this.command=t,e||(this._dirty=!0),this},e.decodePath=function(e){for(var i=[this.moveTo,this.lineTo,this.quadraticCurveTo,this.bezierCurveTo,this.closePath],r=[2,2,4,6,0],n=0,s=e.length,a=[],o=0,h=0,l=t.BASE_64;s>n;){var u=e.charAt(n),c=l[u],d=c>>3,p=i[d];if(!p||3&c)throw"bad path data (@"+n+"): "+u;var f=r[d];d||(o=h=0),a.length=0,n++;for(var _=2+(c>>2&1),m=0;f>m;m++){var g=l[e.charAt(n)],v=g>>5?-1:1;g=(31&g)<<6|l[e.charAt(n+1)],3==_&&(g=g<<6|l[e.charAt(n+2)]),g=v*g/10,m%2?o=g+=o:h=g+=h,a[m]=g,n+=_}p.apply(this,a)}return this},e.store=function(){return this._updateInstructions(!0),this._storeIndex=this._instructions.length,this},e.unstore=function(){return this._storeIndex=0,this},e.clone=function(){var e=new t;return e.command=this.command,e._stroke=this._stroke,e._strokeStyle=this._strokeStyle,e._strokeDash=this._strokeDash,e._strokeIgnoreScale=this._strokeIgnoreScale,e._fill=this._fill,e._instructions=this._instructions.slice(),e._commitIndex=this._commitIndex,e._activeInstructions=this._activeInstructions.slice(),e._dirty=this._dirty,e._storeIndex=this._storeIndex,e},e.toString=function(){return"[Graphics]"},e.mt=e.moveTo,e.lt=e.lineTo,e.at=e.arcTo,e.bt=e.bezierCurveTo,e.qt=e.quadraticCurveTo,e.a=e.arc,e.r=e.rect,e.cp=e.closePath,e.c=e.clear,e.f=e.beginFill,e.lf=e.beginLinearGradientFill,e.rf=e.beginRadialGradientFill,e.bf=e.beginBitmapFill,e.ef=e.endFill,e.ss=e.setStrokeStyle,e.sd=e.setStrokeDash,e.s=e.beginStroke,e.ls=e.beginLinearGradientStroke,e.rs=e.beginRadialGradientStroke,e.bs=e.beginBitmapStroke,e.es=e.endStroke,e.dr=e.drawRect,e.rr=e.drawRoundRect,e.rc=e.drawRoundRectComplex,e.dc=e.drawCircle,e.de=e.drawEllipse,e.dp=e.drawPolyStar,e.p=e.decodePath,e._updateInstructions=function(e){var i=this._instructions,r=this._activeInstructions,n=this._commitIndex;if(this._dirty&&r.length){i.length=n,i.push(t.beginCmd);var s=r.length,a=i.length;i.length=a+s;for(var o=0;s>o;o++)i[o+a]=r[o];this._fill&&i.push(this._fill),this._stroke&&(this._strokeDash!==this._oldStrokeDash&&(this._oldStrokeDash=this._strokeDash,i.push(this._strokeDash)),this._strokeStyle!==this._oldStrokeStyle&&(this._oldStrokeStyle=this._strokeStyle,i.push(this._strokeStyle)),i.push(this._stroke)),this._dirty=!1}e&&(r.length=0,this._commitIndex=i.length)},e._setFill=function(t){return this._updateInstructions(!0),this.command=this._fill=t,this},e._setStroke=function(t){return this._updateInstructions(!0),(this.command=this._stroke=t)&&(t.ignoreScale=this._strokeIgnoreScale),this},(i.LineTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.lineTo(this.x,this.y)},(i.MoveTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.moveTo(this.x,this.y)},(i.ArcTo=function(t,e,i,r,n){this.x1=t,this.y1=e,this.x2=i,this.y2=r,this.radius=n}).prototype.exec=function(t){t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(i.Arc=function(t,e,i,r,n,s){this.x=t,this.y=e,this.radius=i,this.startAngle=r,this.endAngle=n,this.anticlockwise=!!s}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.anticlockwise)},(i.QuadraticCurveTo=function(t,e,i,r){this.cpx=t,this.cpy=e,this.x=i,this.y=r}).prototype.exec=function(t){t.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(i.BezierCurveTo=function(t,e,i,r,n,s){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=r,this.x=n,this.y=s}).prototype.exec=function(t){t.bezierCurveTo(this.cp1x,this.cp1y,this.cp2x,this.cp2y,this.x,this.y)},(i.Rect=function(t,e,i,r){this.x=t,this.y=e,this.w=i,this.h=r}).prototype.exec=function(t){t.rect(this.x,this.y,this.w,this.h)},(i.ClosePath=function(){}).prototype.exec=function(t){t.closePath()},(i.BeginPath=function(){}).prototype.exec=function(t){t.beginPath()},(e=(i.Fill=function(t,e){this.style=t,this.matrix=e}).prototype).exec=function(t){if(this.style){t.fillStyle=this.style;var e=this.matrix;e&&(t.save(),t.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),t.fill(),e&&t.restore()}},e.linearGradient=function(e,i,r,n,s,a){for(var o=this.style=t._ctx.createLinearGradient(r,n,s,a),h=0,l=e.length;l>h;h++)o.addColorStop(i[h],e[h]);return o.props={colors:e,ratios:i,x0:r,y0:n,x1:s,y1:a,type:"linear"},this},e.radialGradient=function(e,i,r,n,s,a,o,h){for(var l=this.style=t._ctx.createRadialGradient(r,n,s,a,o,h),u=0,c=e.length;c>u;u++)l.addColorStop(i[u],e[u]);return l.props={colors:e,ratios:i,x0:r,y0:n,r0:s,x1:a,y1:o,r1:h,type:"radial"},this},e.bitmap=function(e,i){return(e.naturalWidth||e.getContext||e.readyState>=2)&&((this.style=t._ctx.createPattern(e,i||"")).props={image:e,repetition:i,type:"bitmap"}),this},e.path=!1,(e=(i.Stroke=function(t,e){this.style=t,this.ignoreScale=e}).prototype).exec=function(t){this.style&&(t.strokeStyle=this.style,this.ignoreScale&&(t.save(),t.setTransform(1,0,0,1,0,0)),t.stroke(),this.ignoreScale&&t.restore())},e.linearGradient=i.Fill.prototype.linearGradient,e.radialGradient=i.Fill.prototype.radialGradient,e.bitmap=i.Fill.prototype.bitmap,e.path=!1,(e=(i.StrokeStyle=function(t,e,i,r,n){this.width=t,this.caps=e,this.joints=i,this.miterLimit=r,this.ignoreScale=n}).prototype).exec=function(e){e.lineWidth=null==this.width?"1":this.width,e.lineCap=null==this.caps?"butt":isNaN(this.caps)?this.caps:t.STROKE_CAPS_MAP[this.caps],e.lineJoin=null==this.joints?"miter":isNaN(this.joints)?this.joints:t.STROKE_JOINTS_MAP[this.joints],e.miterLimit=null==this.miterLimit?"10":this.miterLimit,e.ignoreScale=null!=this.ignoreScale&&this.ignoreScale},e.path=!1,(i.StrokeDash=function(t,e){this.segments=t,this.offset=e||0}).prototype.exec=function(t){t.setLineDash&&(t.setLineDash(this.segments||i.StrokeDash.EMPTY_SEGMENTS),t.lineDashOffset=this.offset||0)},i.StrokeDash.EMPTY_SEGMENTS=[],(i.RoundRect=function(t,e,i,r,n,s,a,o){this.x=t,this.y=e,this.w=i,this.h=r,this.radiusTL=n,this.radiusTR=s,this.radiusBR=a,this.radiusBL=o}).prototype.exec=function(t){var e=(l>h?h:l)/2,i=0,r=0,n=0,s=0,a=this.x,o=this.y,h=this.w,l=this.h,u=this.radiusTL,c=this.radiusTR,d=this.radiusBR,p=this.radiusBL;0>u&&(u*=i=-1),u>e&&(u=e),0>c&&(c*=r=-1),c>e&&(c=e),0>d&&(d*=n=-1),d>e&&(d=e),0>p&&(p*=s=-1),p>e&&(p=e),t.moveTo(a+h-c,o),t.arcTo(a+h+c*r,o-c*r,a+h,o+c,c),t.lineTo(a+h,o+l-d),t.arcTo(a+h+d*n,o+l+d*n,a+h-d,o+l,d),t.lineTo(a+p,o+l),t.arcTo(a-p*s,o+l+p*s,a,o+l-p,p),t.lineTo(a,o+u),t.arcTo(a-u*i,o-u*i,a+u,o,u),t.closePath()},(i.Circle=function(t,e,i){this.x=t,this.y=e,this.radius=i}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,0,2*Math.PI)},(i.Ellipse=function(t,e,i,r){this.x=t,this.y=e,this.w=i,this.h=r}).prototype.exec=function(t){var e=this.x,i=this.y,r=this.w,n=this.h,s=.5522848,a=r/2*s,o=n/2*s,h=e+r,l=i+n,u=e+r/2,c=i+n/2;t.moveTo(e,c),t.bezierCurveTo(e,c-o,u-a,i,u,i),t.bezierCurveTo(u+a,i,h,c-o,h,c),t.bezierCurveTo(h,c+o,u+a,l,u,l),t.bezierCurveTo(u-a,l,e,c+o,e,c)},(i.PolyStar=function(t,e,i,r,n,s){this.x=t,this.y=e,this.radius=i,this.sides=r,this.pointSize=n,this.angle=s}).prototype.exec=function(t){var e=this.x,i=this.y,r=this.radius,n=(this.angle||0)/180*Math.PI,s=this.sides,a=1-(this.pointSize||0),o=Math.PI/s;t.moveTo(e+Math.cos(n)*r,i+Math.sin(n)*r);for(var h=0;s>h;h++)n+=o,1!=a&&t.lineTo(e+Math.cos(n)*r*a,i+Math.sin(n)*r*a),n+=o,t.lineTo(e+Math.cos(n)*r,i+Math.sin(n)*r);t.closePath()},t.beginCmd=new i.BeginPath,createjs.Graphics=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.cacheID=0,this.id=createjs.UID.get(),this.mouseEnabled=!0,this.tickEnabled=!0,this.name=null,this.parent=null,this.regX=0,this.regY=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.skewX=0,this.skewY=0,this.shadow=null,this.visible=!0,this.x=0,this.y=0,this.transformMatrix=null,this.compositeOperation=null,this.snapToPixel=!0,this.filters=null,this.mask=null,this.hitArea=null,this.cursor=null,this._cacheOffsetX=0,this._cacheOffsetY=0,this._filterOffsetX=0,this._filterOffsetY=0,this._cacheScale=1,this._cacheDataURLID=0,this._cacheDataURL=null,this._props=new createjs.DisplayProps,this._rectangle=new createjs.Rectangle,this._bounds=null}var e=createjs.extend(t,createjs.EventDispatcher);t._MOUSE_EVENTS=["click","dblclick","mousedown","mouseout","mouseover","pressmove","pressup","rollout","rollover"],t.suppressCrossDomainErrors=!1,t._snapToPixelEnabled=!1;var i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");i.getContext&&(t._hitTestCanvas=i,t._hitTestContext=i.getContext("2d"),i.width=i.height=1),t._nextCacheID=1,e.getStage=function(){for(var t=this,e=createjs.Stage;t.parent;)t=t.parent;return t instanceof e?t:null};try{Object.defineProperties(e,{stage:{get:e.getStage}})}catch(t){}e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){var i=this.cacheCanvas;if(e||!i)return!1;var r=this._cacheScale;return t.drawImage(i,this._cacheOffsetX+this._filterOffsetX,this._cacheOffsetY+this._filterOffsetY,i.width/r,i.height/r),!0},e.updateContext=function(e){var i=this,r=i.mask,n=i._props.matrix;r&&r.graphics&&!r.graphics.isEmpty()&&(r.getMatrix(n),e.transform(n.a,n.b,n.c,n.d,n.tx,n.ty),r.graphics.drawAsPath(e),e.clip(),n.invert(),e.transform(n.a,n.b,n.c,n.d,n.tx,n.ty)),this.getMatrix(n);var s=n.tx,a=n.ty;t._snapToPixelEnabled&&i.snapToPixel&&(s=s+(0>s?-.5:.5)|0,a=a+(0>a?-.5:.5)|0),e.transform(n.a,n.b,n.c,n.d,s,a),e.globalAlpha*=i.alpha,i.compositeOperation&&(e.globalCompositeOperation=i.compositeOperation),i.shadow&&this._applyShadow(e,i.shadow)},e.cache=function(t,e,i,r,n){n=n||1,this.cacheCanvas||(this.cacheCanvas=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")),this._cacheWidth=i,this._cacheHeight=r,this._cacheOffsetX=t,this._cacheOffsetY=e,this._cacheScale=n,this.updateCache()},e.updateCache=function(e){var i=this.cacheCanvas;if(!i)throw"cache() must be called before updateCache()";var r=this._cacheScale,n=this._cacheOffsetX*r,s=this._cacheOffsetY*r,a=this._cacheWidth,o=this._cacheHeight,h=i.getContext("2d"),l=this._getFilterBounds();n+=this._filterOffsetX=l.x,s+=this._filterOffsetY=l.y,a=Math.ceil(a*r)+l.width,o=Math.ceil(o*r)+l.height,a!=i.width||o!=i.height?(i.width=a,i.height=o):e||h.clearRect(0,0,a+1,o+1),h.save(),h.globalCompositeOperation=e,h.setTransform(r,0,0,r,-n,-s),this.draw(h,!0),this._applyFilters(),h.restore(),this.cacheID=t._nextCacheID++},e.uncache=function(){this._cacheDataURL=this.cacheCanvas=null,this.cacheID=this._cacheOffsetX=this._cacheOffsetY=this._filterOffsetX=this._filterOffsetY=0,this._cacheScale=1},e.getCacheDataURL=function(){return this.cacheCanvas?(this.cacheID!=this._cacheDataURLID&&(this._cacheDataURL=this.cacheCanvas.toDataURL()),this._cacheDataURL):null},e.localToGlobal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).transformPoint(t,e,i||new createjs.Point)},e.globalToLocal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t,e,i||new createjs.Point)},e.localToLocal=function(t,e,i,r){return r=this.localToGlobal(t,e,r),i.globalToLocal(r.x,r.y,r)},e.setTransform=function(t,e,i,r,n,s,a,o,h){return this.x=t||0,this.y=e||0,this.scaleX=null==i?1:i,this.scaleY=null==r?1:r,this.rotation=n||0,this.skewX=s||0,this.skewY=a||0,this.regX=o||0,this.regY=h||0,this},e.getMatrix=function(t){var e=this,i=t&&t.identity()||new createjs.Matrix2D;return e.transformMatrix?i.copy(e.transformMatrix):i.appendTransform(e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.skewX,e.skewY,e.regX,e.regY)},e.getConcatenatedMatrix=function(t){for(var e=this,i=this.getMatrix(t);e=e.parent;)i.prependMatrix(e.getMatrix(e._props.matrix));return i},e.getConcatenatedDisplayProps=function(t){t=t?t.identity():new createjs.DisplayProps;var e=this,i=e.getMatrix(t.matrix);do{t.prepend(e.visible,e.alpha,e.shadow,e.compositeOperation),e!=this&&i.prependMatrix(e.getMatrix(e._props.matrix))}while(e=e.parent);return t},e.hitTest=function(e,i){var r=t._hitTestContext;r.setTransform(1,0,0,1,-e,-i),this.draw(r);var n=this._testHit(r);return r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,2,2),n},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.getBounds=function(){if(this._bounds)return this._rectangle.copy(this._bounds);var t=this.cacheCanvas;if(t){var e=this._cacheScale;return this._rectangle.setValues(this._cacheOffsetX,this._cacheOffsetY,t.width/e,t.height/e)}return null},e.getTransformedBounds=function(){return this._getBounds()},e.setBounds=function(t,e,i,r){null==t&&(this._bounds=t),this._bounds=(this._bounds||new createjs.Rectangle).setValues(t,e,i,r)},e.clone=function(){return this._cloneProps(new t)},e.toString=function(){return"[DisplayObject (name="+this.name+")]"},e._cloneProps=function(t){return t.alpha=this.alpha,t.mouseEnabled=this.mouseEnabled,t.tickEnabled=this.tickEnabled,t.name=this.name,t.regX=this.regX,t.regY=this.regY,t.rotation=this.rotation,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shadow=this.shadow,t.skewX=this.skewX,t.skewY=this.skewY,t.visible=this.visible,t.x=this.x,t.y=this.y,t.compositeOperation=this.compositeOperation,t.snapToPixel=this.snapToPixel,t.filters=null==this.filters?null:this.filters.slice(0),t.mask=this.mask,t.hitArea=this.hitArea,t.cursor=this.cursor,t._bounds=this._bounds,t},e._applyShadow=function(t,e){e=e||Shadow.identity,t.shadowColor=e.color,t.shadowOffsetX=e.offsetX,t.shadowOffsetY=e.offsetY,t.shadowBlur=e.blur},e._tick=function(t){var e=this._listeners;e&&e.tick&&(t.target=null,t.propagationStopped=t.immediatePropagationStopped=!1,this.dispatchEvent(t))},e._testHit=function(e){try{var i=e.getImageData(0,0,1,1).data[3]>1}catch(e){if(!t.suppressCrossDomainErrors)throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."}return i},e._applyFilters=function(){if(this.filters&&0!=this.filters.length&&this.cacheCanvas)for(var t=this.filters.length,e=this.cacheCanvas.getContext("2d"),i=this.cacheCanvas.width,r=this.cacheCanvas.height,n=0;t>n;n++)this.filters[n].applyFilter(e,0,0,i,r)},e._getFilterBounds=function(t){var e,i=this.filters,r=this._rectangle.setValues(0,0,0,0);if(!i||!(e=i.length))return r;for(var n=0;e>n;n++){var s=this.filters[n];s.getBounds&&s.getBounds(r)}return r},e._getBounds=function(t,e){return this._transformBounds(this.getBounds(),t,e)},e._transformBounds=function(t,e,i){if(!t)return t;var r=t.x,n=t.y,s=t.width,a=t.height,o=this._props.matrix;o=i?o.identity():this.getMatrix(o),(r||n)&&o.appendTransform(0,0,1,1,0,0,0,-r,-n),e&&o.prependMatrix(e);var h=s*o.a,l=s*o.b,u=a*o.c,c=a*o.d,d=o.tx,p=o.ty,f=d,_=d,m=p,g=p;return(r=h+d)_&&(_=r),(r=h+u+d)_&&(_=r),(r=u+d)_&&(_=r),(n=l+p)g&&(g=n),(n=l+c+p)g&&(g=n),(n=c+p)g&&(g=n),t.setValues(f,m,_-f,g-m)},e._hasMouseEventListener=function(){for(var e=t._MOUSE_EVENTS,i=0,r=e.length;r>i;i++)if(this.hasEventListener(e[i]))return!0;return!!this.cursor},createjs.DisplayObject=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var e=createjs.extend(t,createjs.DisplayObject);e.getNumChildren=function(){return this.children.length};try{Object.defineProperties(e,{numChildren:{get:e.getNumChildren}})}catch(t){}e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;for(var i=this.children.slice(),r=0,n=i.length;n>r;r++){var s=i[r];s.isVisible()&&(t.save(),s.updateContext(t),s.draw(t),t.restore())}return!0},e.addChild=function(t){if(null==t)return t;var e=arguments.length;if(e>1){for(var i=0;e>i;i++)this.addChild(arguments[i]);return arguments[e-1]}return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.push(t),t.dispatchEvent("added"),t},e.addChildAt=function(t,e){var i=arguments.length,r=arguments[i-1];if(0>r||r>this.children.length)return arguments[i-2];if(i>2){for(var n=0;i-1>n;n++)this.addChildAt(arguments[n],r+n);return arguments[i-2]}return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),t.dispatchEvent("added"),t},e.removeChild=function(t){var e=arguments.length;if(e>1){for(var i=!0,r=0;e>r;r++)i=i&&this.removeChild(arguments[r]);return i}return this.removeChildAt(createjs.indexOf(this.children,t))},e.removeChildAt=function(t){var e=arguments.length;if(e>1){for(var i=[],r=0;e>r;r++)i[r]=arguments[r];i.sort(function(t,e){return e-t});for(var n=!0,r=0;e>r;r++)n=n&&this.removeChildAt(i[r]);return n}if(0>t||t>this.children.length-1)return!1;var s=this.children[t];return s&&(s.parent=null),this.children.splice(t,1),s.dispatchEvent("removed"),!0},e.removeAllChildren=function(){for(var t=this.children;t.length;)this.removeChildAt(0)},e.getChildAt=function(t){return this.children[t]},e.getChildByName=function(t){for(var e=this.children,i=0,r=e.length;r>i;i++)if(e[i].name==t)return e[i];return null},e.sortChildren=function(t){this.children.sort(t)},e.getChildIndex=function(t){return createjs.indexOf(this.children,t)},e.swapChildrenAt=function(t,e){var i=this.children,r=i[t],n=i[e];r&&n&&(i[t]=n,i[e]=r)},e.swapChildren=function(t,e){for(var i,r,n=this.children,s=0,a=n.length;a>s&&(n[s]==t&&(i=s),n[s]==e&&(r=s),null==i||null==r);s++);s!=a&&(n[i]=e,n[r]=t)},e.setChildIndex=function(t,e){var i=this.children,r=i.length;if(!(t.parent!=this||0>e||e>=r)){for(var n=0;r>n&&i[n]!=t;n++);n!=r&&n!=e&&(i.splice(n,1),i.splice(e,0,t))}},e.contains=function(t){for(;t;){if(t==this)return!0;t=t.parent}return!1},e.hitTest=function(t,e){return null!=this.getObjectUnderPoint(t,e)},e.getObjectsUnderPoint=function(t,e,i){var r=[],n=this.localToGlobal(t,e);return this._getObjectsUnderPoint(n.x,n.y,r,i>0,1==i),r},e.getObjectUnderPoint=function(t,e,i){var r=this.localToGlobal(t,e);return this._getObjectsUnderPoint(r.x,r.y,null,i>0,1==i)},e.getBounds=function(){return this._getBounds(null,!0)},e.getTransformedBounds=function(){return this._getBounds()},e.clone=function(e){var i=this._cloneProps(new t);return e&&this._cloneChildren(i),i},e.toString=function(){return"[Container (name="+this.name+")]"},e._tick=function(t){if(this.tickChildren)for(var e=this.children.length-1;e>=0;e--){var i=this.children[e];i.tickEnabled&&i._tick&&i._tick(t)}this.DisplayObject__tick(t)},e._cloneChildren=function(t){t.children.length&&t.removeAllChildren();for(var e=t.children,i=0,r=this.children.length;r>i;i++){var n=this.children[i].clone(!0);n.parent=t,e.push(n)}},e._getObjectsUnderPoint=function(e,i,r,n,s,a){if(!(a=a||0)&&!this._testMask(this,e,i))return null;var o,h=createjs.DisplayObject._hitTestContext;s=s||n&&this._hasMouseEventListener();for(var l=this.children,u=l.length-1;u>=0;u--){var c=l[u],d=c.hitArea;if(c.visible&&(d||c.isVisible())&&(!n||c.mouseEnabled)&&(d||this._testMask(c,e,i)))if(!d&&c instanceof t){var p=c._getObjectsUnderPoint(e,i,r,n,s,a+1);if(!r&&p)return n&&!this.mouseChildren?this:p}else{if(n&&!s&&!c._hasMouseEventListener())continue;var f=c.getConcatenatedDisplayProps(c._props);if(o=f.matrix,d&&(o.appendMatrix(d.getMatrix(d._props.matrix)),f.alpha=d.alpha),h.globalAlpha=f.alpha,h.setTransform(o.a,o.b,o.c,o.d,o.tx-e,o.ty-i),(d||c).draw(h),!this._testHit(h))continue;if(h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,2,2),!r)return n&&!this.mouseChildren?this:c;r.push(c)}}return null},e._testMask=function(t,e,i){var r=t.mask;if(!r||!r.graphics||r.graphics.isEmpty())return!0;var n=this._props.matrix,s=t.parent;n=s?s.getConcatenatedMatrix(n):n.identity(),n=r.getMatrix(r._props.matrix).prependMatrix(n);var a=createjs.DisplayObject._hitTestContext;return a.setTransform(n.a,n.b,n.c,n.d,n.tx-e,n.ty-i),r.graphics.drawAsPath(a),a.fillStyle="#000",a.fill(),!!this._testHit(a)&&(a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,2,2),!0)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();if(i)return this._transformBounds(i,t,e);var r=this._props.matrix;r=e?r.identity():this.getMatrix(r),t&&r.prependMatrix(t);for(var n=this.children.length,s=null,a=0;n>a;a++){var o=this.children[a];o.visible&&(i=o._getBounds(r))&&(s?s.extend(i.x,i.y,i.width,i.height):s=i.clone())}return s},createjs.Container=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof t?document.getElementById(t):t,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var e=createjs.extend(t,createjs.Container);e._get_nextStage=function(){return this._nextStage},e._set_nextStage=function(t){this._nextStage&&(this._nextStage._prevStage=null),t&&(t._prevStage=this),this._nextStage=t};try{Object.defineProperties(e,{nextStage:{get:e._get_nextStage,set:e._set_nextStage}})}catch(t){}e.update=function(t){if(this.canvas&&(this.tickOnUpdate&&this.tick(t),!1!==this.dispatchEvent("drawstart",!1,!0))){createjs.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var e=this.drawRect,i=this.canvas.getContext("2d");i.setTransform(1,0,0,1,0,0),this.autoClear&&(e?i.clearRect(e.x,e.y,e.width,e.height):i.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),i.save(),this.drawRect&&(i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()),this.updateContext(i),this.draw(i,!1),i.restore(),this.dispatchEvent("drawend")}},e.tick=function(t){if(this.tickEnabled&&!1!==this.dispatchEvent("tickstart",!1,!0)){var e=new createjs.Event("tick");if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);this._tick(e),this.dispatchEvent("tickend")}},e.handleEvent=function(t){"tick"==t.type&&this.update(t)},e.clear=function(){if(this.canvas){var t=this.canvas.getContext("2d");t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},e.toDataURL=function(t,e){var i,r=this.canvas.getContext("2d"),n=this.canvas.width,s=this.canvas.height;if(t){i=r.getImageData(0,0,n,s);var a=r.globalCompositeOperation;r.globalCompositeOperation="destination-over",r.fillStyle=t,r.fillRect(0,0,n,s)}var o=this.canvas.toDataURL(e||"image/png");return t&&(r.putImageData(i,0,0),r.globalCompositeOperation=a),o},e.enableMouseOver=function(t){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==t&&this._testMouseOver(!0)),null==t)t=20;else if(0>=t)return;var e=this;this._mouseOverIntervalID=setInterval(function(){e._testMouseOver()},1e3/Math.min(50,t))},e.enableDOMEvents=function(t){null==t&&(t=!0);var e,i,r=this._eventListeners;if(!t&&r){for(e in r)(i=r[e]).t.removeEventListener(e,i.f,!1);this._eventListeners=null}else if(t&&!r&&this.canvas){var n=window.addEventListener?window:document,s=this;(r=this._eventListeners={}).mouseup={t:n,f:function(t){s._handleMouseUp(t)}},r.mousemove={t:n,f:function(t){s._handleMouseMove(t)}},r.dblclick={t:this.canvas,f:function(t){s._handleDoubleClick(t)}},r.mousedown={t:this.canvas,f:function(t){s._handleMouseDown(t)}};for(e in r)(i=r[e]).t.addEventListener(e,i.f,!1)}},e.clone=function(){throw"Stage cannot be cloned."},e.toString=function(){return"[Stage (name="+this.name+")]"},e._getElementRect=function(t){var e;try{e=t.getBoundingClientRect()}catch(i){e={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}var i=(window.pageXOffset||document.scrollLeft||0)-(document.clientLeft||document.body.clientLeft||0),r=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),n=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,s=parseInt(n.paddingLeft)+parseInt(n.borderLeftWidth),a=parseInt(n.paddingTop)+parseInt(n.borderTopWidth),o=parseInt(n.paddingRight)+parseInt(n.borderRightWidth),h=parseInt(n.paddingBottom)+parseInt(n.borderBottomWidth);return{left:e.left+i+s,right:e.right+i-o,top:e.top+r+a,bottom:e.bottom+r-h}},e._getPointerData=function(t){var e=this._pointerData[t];return e||(e=this._pointerData[t]={x:0,y:0}),e},e._handleMouseMove=function(t){t||(t=window.event),this._handlePointerMove(-1,t,t.pageX,t.pageY)},e._handlePointerMove=function(t,e,i,r,n){if((!this._prevStage||void 0!==n)&&this.canvas){var s=this._nextStage,a=this._getPointerData(t),o=a.inBounds;this._updatePointerPosition(t,e,i,r),(o||a.inBounds||this.mouseMoveOutside)&&(-1===t&&a.inBounds==!o&&this._dispatchMouseEvent(this,o?"mouseleave":"mouseenter",!1,t,a,e),this._dispatchMouseEvent(this,"stagemousemove",!1,t,a,e),this._dispatchMouseEvent(a.target,"pressmove",!0,t,a,e)),s&&s._handlePointerMove(t,e,i,r,null)}},e._updatePointerPosition=function(t,e,i,r){var n=this._getElementRect(this.canvas);i-=n.left,r-=n.top;var s=this.canvas.width,a=this.canvas.height;i/=(n.right-n.left)/s,r/=(n.bottom-n.top)/a;var o=this._getPointerData(t);(o.inBounds=i>=0&&r>=0&&s-1>=i&&a-1>=r)?(o.x=i,o.y=r):this.mouseMoveOutside&&(o.x=0>i?0:i>s-1?s-1:i,o.y=0>r?0:r>a-1?a-1:r),o.posEvtObj=e,o.rawX=i,o.rawY=r,(t===this._primaryPointerID||-1===t)&&(this.mouseX=o.x,this.mouseY=o.y,this.mouseInBounds=o.inBounds)},e._handleMouseUp=function(t){this._handlePointerUp(-1,t,!1)},e._handlePointerUp=function(t,e,i,r){var n=this._nextStage,s=this._getPointerData(t);if(!this._prevStage||void 0!==r){var a=null,o=s.target;r||!o&&!n||(a=this._getObjectsUnderPoint(s.x,s.y,null,!0)),s.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,t,s,e,a),s.down=!1),a==o&&this._dispatchMouseEvent(o,"click",!0,t,s,e),this._dispatchMouseEvent(o,"pressup",!0,t,s,e),i?(t==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[t]):s.target=null,n&&n._handlePointerUp(t,e,i,r||a&&this)}},e._handleMouseDown=function(t){this._handlePointerDown(-1,t,t.pageX,t.pageY)},e._handlePointerDown=function(t,e,i,r,n){this.preventSelection&&e.preventDefault(),(null==this._primaryPointerID||-1===t)&&(this._primaryPointerID=t),null!=r&&this._updatePointerPosition(t,e,i,r);var s=null,a=this._nextStage,o=this._getPointerData(t);n||(s=o.target=this._getObjectsUnderPoint(o.x,o.y,null,!0)),o.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,t,o,e,s),o.down=!0),this._dispatchMouseEvent(s,"mousedown",!0,t,o,e),a&&a._handlePointerDown(t,e,i,r,n||s&&this)},e._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var r=this._nextStage;if(!this._mouseOverIntervalID)return void(r&&r._testMouseOver(t,e,i));var n=this._getPointerData(-1);if(n&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var s,a,o,h=n.posEvtObj,l=i||h&&h.target==this.canvas,u=null,c=-1,d="";!e&&(t||this.mouseInBounds&&l)&&(u=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var p=this._mouseOverTarget||[],f=p[p.length-1],_=this._mouseOverTarget=[];for(s=u;s;)_.unshift(s),d||(d=s.cursor),s=s.parent;for(this.canvas.style.cursor=d,!e&&i&&(i.canvas.style.cursor=d),a=0,o=_.length;o>a&&_[a]==p[a];a++)c=a;for(f!=u&&this._dispatchMouseEvent(f,"mouseout",!0,-1,n,h,u),a=p.length-1;a>c;a--)this._dispatchMouseEvent(p[a],"rollout",!1,-1,n,h,u);for(a=_.length-1;a>c;a--)this._dispatchMouseEvent(_[a],"rollover",!1,-1,n,h,f);f!=u&&this._dispatchMouseEvent(u,"mouseover",!0,-1,n,h,f),r&&r._testMouseOver(t,e||u&&this,i||l&&this)}}},e._handleDoubleClick=function(t,e){var i=null,r=this._nextStage,n=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(n.x,n.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,n,t)),r&&r._handleDoubleClick(t,e||i&&this)},e._dispatchMouseEvent=function(t,e,i,r,n,s,a){if(t&&(i||t.hasEventListener(e))){var o=new createjs.MouseEvent(e,i,!1,n.x,n.y,s,r,r===this._primaryPointerID||-1===r,n.rawX,n.rawY,a);t.dispatchEvent(o)}},createjs.Stage=createjs.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),"string"==typeof t?(this.image=document.createElement("img"),this.image.src=t):this.image=t,this.sourceRect=null}var e=createjs.extend(t,createjs.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.image,e=this.cacheCanvas||t&&(t.naturalWidth||t.getContext||t.readyState>=2);return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&e)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e)||!this.image)return!0;var i=this.image,r=this.sourceRect;if(r){var n=r.x,s=r.y,a=n+r.width,o=s+r.height,h=0,l=0,u=i.width,c=i.height;0>n&&(h-=n,n=0),a>u&&(a=u),0>s&&(l-=s,s=0),o>c&&(o=c),t.drawImage(i,n,s,a-n,o-s,h,l,a-n,o-s)}else t.drawImage(i,0,0);return!0},e.getBounds=function(){var t=this.DisplayObject_getBounds();if(t)return t;var e=this.image,i=this.sourceRect||e;return e&&(e.naturalWidth||e.getContext||e.readyState>=2)?this._rectangle.setValues(0,0,i.width,i.height):null},e.clone=function(){var e=new t(this.image);return this.sourceRect&&(e.sourceRect=this.sourceRect.clone()),this._cloneProps(e),e},e.toString=function(){return"[Bitmap (name="+this.name+")]"},createjs.Bitmap=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.DisplayObject_constructor(),this.currentFrame=0,this.currentAnimation=null,this.paused=!0,this.spriteSheet=t,this.currentAnimationFrame=0,this.framerate=0,this._animation=null,this._currentFrame=null,this._skipAdvance=!1,null!=e&&this.gotoAndPlay(e)}var e=createjs.extend(t,createjs.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet.complete;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;this._normalizeFrame();var i=this.spriteSheet.getFrame(0|this._currentFrame);if(!i)return!1;var r=i.rect;return r.width&&r.height&&t.drawImage(i.image,r.x,r.y,r.width,r.height,-i.regX,-i.regY,r.width,r.height),!0},e.play=function(){this.paused=!1},e.stop=function(){this.paused=!0},e.gotoAndPlay=function(t){this.paused=!1,this._skipAdvance=!0,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.advance=function(t){var e=this.framerate||this.spriteSheet.framerate,i=e&&null!=t?t/(1e3/e):1;this._normalizeFrame(i)},e.getBounds=function(){return this.DisplayObject_getBounds()||this.spriteSheet.getFrameBounds(this.currentFrame,this._rectangle)},e.clone=function(){return this._cloneProps(new t(this.spriteSheet))},e.toString=function(){return"[Sprite (name="+this.name+")]"},e._cloneProps=function(t){return this.DisplayObject__cloneProps(t),t.currentFrame=this.currentFrame,t.currentAnimation=this.currentAnimation,t.paused=this.paused,t.currentAnimationFrame=this.currentAnimationFrame,t.framerate=this.framerate,t._animation=this._animation,t._currentFrame=this._currentFrame,t._skipAdvance=this._skipAdvance,t},e._tick=function(t){this.paused||(this._skipAdvance||this.advance(t&&t.delta),this._skipAdvance=!1),this.DisplayObject__tick(t)},e._normalizeFrame=function(t){t=t||0;var e,i=this._animation,r=this.paused,n=this._currentFrame;if(i){var s=i.speed||1,a=this.currentAnimationFrame;if(e=i.frames.length,a+t*s>=e){var o=i.next;if(this._dispatchAnimationEnd(i,n,r,o,e-1))return;if(o)return this._goto(o,t-(e-a)/s);this.paused=!0,a=i.frames.length-1}else a+=t*s;this.currentAnimationFrame=a,this._currentFrame=i.frames[0|a]}else if(n=this._currentFrame+=t,e=this.spriteSheet.getNumFrames(),n>=e&&e>0&&!this._dispatchAnimationEnd(i,n,r,e-1)&&(this._currentFrame-=e)>=e)return this._normalizeFrame();n=0|this._currentFrame,this.currentFrame!=n&&(this.currentFrame=n,this.dispatchEvent("change"))},e._dispatchAnimationEnd=function(t,e,i,r,n){var s=t?t.name:null;if(this.hasEventListener("animationend")){var a=new createjs.Event("animationend");a.name=s,a.next=r,this.dispatchEvent(a)}var o=this._animation!=t||this._currentFrame!=e;return o||i||!this.paused||(this.currentAnimationFrame=n,o=!0),o},e._goto=function(t,e){if(this.currentAnimationFrame=0,isNaN(t)){var i=this.spriteSheet.getAnimation(t);i&&(this._animation=i,this.currentAnimation=t,this._normalizeFrame(e))}else this.currentAnimation=this._animation=null,this._currentFrame=t,this._normalizeFrame()},createjs.Sprite=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.DisplayObject_constructor(),this.graphics=t||new createjs.Graphics}var e=createjs.extend(t,createjs.DisplayObject);e.isVisible=function(){var t=this.cacheCanvas||this.graphics&&!this.graphics.isEmpty();return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){return!!this.DisplayObject_draw(t,e)||(this.graphics.draw(t,this),!0)},e.clone=function(e){var i=e&&this.graphics?this.graphics.clone():this.graphics;return this._cloneProps(new t(i))},e.toString=function(){return"[Shape (name="+this.name+")]"},createjs.Shape=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.DisplayObject_constructor(),this.text=t,this.font=e,this.color=i,this.textAlign="left",this.textBaseline="top",this.maxWidth=null,this.outline=0,this.lineHeight=0,this.lineWidth=null}var e=createjs.extend(t,createjs.DisplayObject),i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");i.getContext&&(t._workingContext=i.getContext("2d"),i.width=i.height=1),t.H_OFFSETS={start:0,left:0,center:-.5,end:-1,right:-1},t.V_OFFSETS={top:0,hanging:-.01,middle:-.4,alphabetic:-.8,ideographic:-.85,bottom:-1},e.isVisible=function(){var t=this.cacheCanvas||null!=this.text&&""!==this.text;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;var i=this.color||"#000";return this.outline?(t.strokeStyle=i,t.lineWidth=1*this.outline):t.fillStyle=i,this._drawText(this._prepContext(t)),!0},e.getMeasuredWidth=function(){return this._getMeasuredWidth(this.text)},e.getMeasuredLineHeight=function(){return 1.2*this._getMeasuredWidth("M")},e.getMeasuredHeight=function(){return this._drawText(null,{}).height},e.getBounds=function(){var e=this.DisplayObject_getBounds();if(e)return e;if(null==this.text||""===this.text)return null;var i=this._drawText(null,{}),r=this.maxWidth&&this.maxWidthl;l++){var c=h[l],d=null;if(null!=this.lineWidth&&(d=e.measureText(c).width)>this.lineWidth){var p=c.split(/(\s)/);c=p[0],d=e.measureText(c).width;for(var f=1,_=p.length;_>f;f+=2){var m=e.measureText(p[f]+p[f+1]).width;d+m>this.lineWidth?(n&&this._drawTextLine(e,c,o*s),r&&r.push(c),d>a&&(a=d),c=p[f+1],d=e.measureText(c).width,o++):(c+=p[f]+p[f+1],d+=m)}}n&&this._drawTextLine(e,c,o*s),r&&r.push(c),i&&null==d&&(d=e.measureText(c).width),d>a&&(a=d),o++}return i&&(i.width=a,i.height=o*s),n||e.restore(),i},e._drawTextLine=function(t,e,i){this.outline?t.strokeText(e,0,i,this.maxWidth||65535):t.fillText(e,0,i,this.maxWidth||65535)},e._getMeasuredWidth=function(e){var i=t._workingContext;i.save();var r=this._prepContext(i).measureText(e).width;return i.restore(),r},createjs.Text=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.Container_constructor(),this.text=t||"",this.spriteSheet=e,this.lineHeight=0,this.letterSpacing=0,this.spaceWidth=0,this._oldProps={text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0}}var e=createjs.extend(t,createjs.Container);t.maxPoolSize=100,t._spritePool=[],e.draw=function(t,e){this.DisplayObject_draw(t,e)||(this._updateText(),this.Container_draw(t,e))},e.getBounds=function(){return this._updateText(),this.Container_getBounds()},e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet&&this.spriteSheet.complete&&this.text;return!!(this.visible&&this.alpha>0&&0!==this.scaleX&&0!==this.scaleY&&t)},e.clone=function(){return this._cloneProps(new t(this.text,this.spriteSheet))},e.addChild=e.addChildAt=e.removeChild=e.removeChildAt=e.removeAllChildren=function(){},e._cloneProps=function(t){return this.Container__cloneProps(t),t.lineHeight=this.lineHeight,t.letterSpacing=this.letterSpacing,t.spaceWidth=this.spaceWidth,t},e._getFrameIndex=function(t,e){var i,r=e.getAnimation(t);return r||(t!=(i=t.toUpperCase())||t!=(i=t.toLowerCase())||(i=null),i&&(r=e.getAnimation(i))),r&&r.frames[0]},e._getFrame=function(t,e){var i=this._getFrameIndex(t,e);return null==i?i:e.getFrame(i)},e._getLineHeight=function(t){var e=this._getFrame("1",t)||this._getFrame("T",t)||this._getFrame("L",t)||t.getFrame(0);return e?e.rect.height:1},e._getSpaceWidth=function(t){var e=this._getFrame("1",t)||this._getFrame("l",t)||this._getFrame("e",t)||this._getFrame("a",t)||t.getFrame(0);return e?e.rect.width:1},e._updateText=function(){var e,i=0,r=0,n=this._oldProps,s=!1,a=this.spaceWidth,o=this.lineHeight,h=this.spriteSheet,l=t._spritePool,u=this.children,c=0,d=u.length;for(var p in n)n[p]!=this[p]&&(n[p]=this[p],s=!0);if(s){var f=!!this._getFrame(" ",h);f||a||(a=this._getSpaceWidth(h)),o||(o=this._getLineHeight(h));for(var _=0,m=this.text.length;m>_;_++){var g=this.text.charAt(_);if(" "!=g||f)if("\n"!=g&&"\r"!=g){var v=this._getFrameIndex(g,h);null!=v&&(d>c?e=u[c]:(u.push(e=l.length?l.pop():new createjs.Sprite),e.parent=this,d++),e.spriteSheet=h,e.gotoAndStop(v),e.x=i,e.y=r,c++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==g&&"\n"==this.text.charAt(_+1)&&_++,i=0,r+=o;else i+=a}for(;d>c;)l.push(e=u.pop()),e.parent=null,d--;l.length>t.maxPoolSize&&(l.length=t.maxPoolSize)}},createjs.BitmapText=createjs.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){"use strict";function t(e,i,r,n){this.Container_constructor(),!t.inited&&t.init(),this.mode=e||t.INDEPENDENT,this.startPosition=i||0,this.loop=r,this.currentFrame=0,this.timeline=new createjs.Timeline(null,n,{paused:!0,position:i,useTicks:!0}),this.paused=!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||null,this.framerate=null,this._synchOffset=0,this._prevPos=-1,this._prevPosition=0,this._t=0,this._managed={}}function e(){throw"MovieClipPlugin cannot be instantiated."}var i=createjs.extend(t,createjs.Container);t.INDEPENDENT="independent",t.SINGLE_FRAME="single",t.SYNCHED="synched",t.inited=!1,t.init=function(){t.inited||(e.install(),t.inited=!0)},i.getLabels=function(){return this.timeline.getLabels()},i.getCurrentLabel=function(){return this._updateTimeline(),this.timeline.getCurrentLabel()},i.getDuration=function(){return this.timeline.duration};try{Object.defineProperties(i,{labels:{get:i.getLabels},currentLabel:{get:i.getCurrentLabel},totalFrames:{get:i.getDuration},duration:{get:i.getDuration}})}catch(t){}i.initialize=t,i.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},i.draw=function(t,e){return!!this.DisplayObject_draw(t,e)||(this._updateTimeline(),this.Container_draw(t,e),!0)},i.play=function(){this.paused=!1},i.stop=function(){this.paused=!0},i.gotoAndPlay=function(t){this.paused=!1,this._goto(t)},i.gotoAndStop=function(t){this.paused=!0,this._goto(t)},i.advance=function(e){var i=t.INDEPENDENT;if(this.mode==i){for(var r=this,n=r.framerate;(r=r.parent)&&null==n;)r.mode==i&&(n=r._framerate);this._framerate=n;var s=null!=n&&-1!=n&&null!=e?e/(1e3/n)+this._t:1,a=0|s;for(this._t=s-a;!this.paused&&a--;)this._prevPosition=this._prevPos<0?0:this._prevPosition+1,this._updateTimeline()}},i.clone=function(){throw"MovieClip cannot be cloned."},i.toString=function(){return"[MovieClip (name="+this.name+")]"},i._tick=function(t){this.advance(t&&t.delta),this.Container__tick(t)},i._goto=function(t){var e=this.timeline.resolve(t);null!=e&&(-1==this._prevPos&&(this._prevPos=NaN),this._prevPosition=e,this._t=0,this._updateTimeline())},i._reset=function(){this._prevPos=-1,this._t=this.currentFrame=0,this.paused=!1},i._updateTimeline=function(){var e=this.timeline,i=this.mode!=t.INDEPENDENT;e.loop=null==this.loop||this.loop;var r=i?this.startPosition+(this.mode==t.SINGLE_FRAME?0:this._synchOffset):this._prevPos<0?0:this._prevPosition,n=i||!this.actionsEnabled?createjs.Tween.NONE:null;if(this.currentFrame=e._calcPosition(r),e.setPosition(r,n),this._prevPosition=e._prevPosition,this._prevPos!=e._prevPos){this.currentFrame=this._prevPos=e._prevPos;for(var s in this._managed)this._managed[s]=1;for(var a=e._tweens,o=0,h=a.length;h>o;o++){var l=a[o],u=l._target;if(u!=this&&!l.passive){var c=l._stepPosition;u instanceof createjs.DisplayObject?this._addManagedChild(u,c):this._setState(u.state,c)}}var d=this.children;for(o=d.length-1;o>=0;o--){var p=d[o].id;1==this._managed[p]&&(this.removeChildAt(o),delete this._managed[p])}}},i._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var r=t[i],n=r.t,s=r.p;for(var a in s)n[a]=s[a];this._addManagedChild(n,e)}},i._addManagedChild=function(e,i){e._off||(this.addChildAt(e,0),e instanceof t&&(e._synchOffset=i,e.mode==t.INDEPENDENT&&e.autoReset&&!this._managed[e.id]&&e._reset()),this._managed[e.id]=2)},i._getBounds=function(t,e){var i=this.DisplayObject_getBounds();return i||(this._updateTimeline(),this.frameBounds&&(i=this._rectangle.copy(this.frameBounds[this.currentFrame]))),i?this._transformBounds(i,t,e):this.Container__getBounds(t,e)},createjs.MovieClip=createjs.promote(t,"Container"),e.priority=100,e.install=function(){createjs.Tween.installPlugin(e,["startPosition"])},e.init=function(t,e,i){return i},e.step=function(){},e.tween=function(e,i,r,n,s,a,o,h){return e.target instanceof t?1==a?s[i]:n[i]:r}}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"SpriteSheetUtils cannot be instantiated"}var e=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");e.getContext&&(t._workingCanvas=e,t._workingContext=e.getContext("2d"),e.width=e.height=1),t.addFlippedFrames=function(e,i,r,n){if(i||r||n){var s=0;i&&t._flip(e,++s,!0,!1),r&&t._flip(e,++s,!1,!0),n&&t._flip(e,++s,!0,!0)}},t.extractFrame=function(e,i){isNaN(i)&&(i=e.getAnimation(i).frames[0]);var r=e.getFrame(i);if(!r)return null;var n=r.rect,s=t._workingCanvas;s.width=n.width,s.height=n.height,t._workingContext.drawImage(r.image,n.x,n.y,n.width,n.height,0,0,n.width,n.height);var a=document.createElement("img");return a.src=s.toDataURL("image/png"),a},t.mergeAlpha=function(t,e,i){i||(i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")),i.width=Math.max(e.width,t.width),i.height=Math.max(e.height,t.height);var r=i.getContext("2d");return r.save(),r.drawImage(t,0,0),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),r.restore(),i},t._flip=function(e,i,r,n){for(var s=e._images,a=t._workingCanvas,o=t._workingContext,h=s.length/i,l=0;h>l;l++){var u=s[l];u.__tmp=l,o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width+1,a.height+1),a.width=u.width,a.height=u.height,o.setTransform(r?-1:1,0,0,n?-1:1,r?u.width:0,n?u.height:0),o.drawImage(u,0,0);var c=document.createElement("img");c.src=a.toDataURL("image/png"),c.width=u.width,c.height=u.height,s.push(c)}var d=e._frames,p=d.length/i;for(l=0;p>l;l++){var f=(u=d[l]).rect.clone(),_={image:c=s[u.image.__tmp+h*i],rect:f,regX:u.regX,regY:u.regY};r&&(f.x=c.width-f.x-f.width,_.regX=f.width-u.regX),n&&(f.y=c.height-f.y-f.height,_.regY=f.height-u.regY),d.push(_)}var m="_"+(r?"h":"")+(n?"v":""),g=e._animations,v=e._data,y=g.length/i;for(l=0;y>l;l++){var b=g[l],T={name:b+m,speed:(u=v[b]).speed,next:u.next,frames:[]};u.next&&(T.next+=m);for(var E=0,x=(d=u.frames).length;x>E;E++)T.frames.push(d[E]+p*i);v[T.name]=T,g.push(T.name)}},createjs.SpriteSheetUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.EventDispatcher_constructor(),this.maxWidth=2048,this.maxHeight=2048,this.spriteSheet=null,this.scale=1,this.padding=1,this.timeSlice=.3,this.progress=-1,this.framerate=t||0,this._frames=[],this._animations={},this._data=null,this._nextFrameIndex=0,this._index=0,this._timerID=null,this._scale=1}var e=createjs.extend(t,createjs.EventDispatcher);t.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",t.ERR_RUNNING="a build is already running",e.addFrame=function(e,i,r,n,s){if(this._data)throw t.ERR_RUNNING;var a=i||e.bounds||e.nominalBounds;return!a&&e.getBounds&&(a=e.getBounds()),a?(r=r||1,this._frames.push({source:e,sourceRect:a,scale:r,funct:n,data:s,index:this._frames.length,height:a.height*r})-1):null},e.addAnimation=function(e,i,r,n){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:r,speed:n}},e.addMovieClip=function(e,i,r,n,s,a){if(this._data)throw t.ERR_RUNNING;var o=e.frameBounds,h=i||e.bounds||e.nominalBounds;if(!h&&e.getBounds&&(h=e.getBounds()),h||o){var l,u,c=this._frames.length,d=e.timeline.duration;for(l=0;d>l;l++){var p=o&&o[l]?o[l]:h;this.addFrame(e,p,r,this._setupMovieClipFrame,{i:l,f:n,d:s})}var f=e.timeline._labels,_=[];for(var m in f)_.push({index:f[m],label:m});if(_.length)for(_.sort(function(t,e){return t.index-e.index}),l=0,u=_.length;u>l;l++){for(var g=_[l].label,v=c+_[l].index,y=c+(l==u-1?d:_[l+1].index),b=[],T=v;y>T;T++)b.push(T);(!a||(g=a(g,e,v,y)))&&this.addAnimation(g,b,!0)}}},e.build=function(){if(this._data)throw t.ERR_RUNNING;for(this._startBuild();this._drawNext(););return this._endBuild(),this.spriteSheet},e.buildAsync=function(e){if(this._data)throw t.ERR_RUNNING;this.timeSlice=e,this._startBuild();var i=this;this._timerID=setTimeout(function(){i._run()},50-50*Math.max(.01,Math.min(.99,this.timeSlice||.3)))},e.stopAsync=function(){clearTimeout(this._timerID),this._data=null},e.clone=function(){throw"SpriteSheetBuilder cannot be cloned."},e.toString=function(){return"[SpriteSheetBuilder]"},e._startBuild=function(){var e=this.padding||0;this.progress=0,this.spriteSheet=null,this._index=0,this._scale=this.scale;var i=[];this._data={images:[],frames:i,framerate:this.framerate,animations:this._animations};var r=this._frames.slice();if(r.sort(function(t,e){return t.height<=e.height?-1:1}),r[r.length-1].height+2*e>this.maxHeight)throw t.ERR_DIMENSIONS;for(var n=0,s=0,a=0;r.length;){var o=this._fillRow(r,n,a,i,e);if(o.w>s&&(s=o.w),n+=o.h,!o.h||!r.length){var h=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");h.width=this._getSize(s,this.maxWidth),h.height=this._getSize(n,this.maxHeight),this._data.images[a]=h,o.h||(s=n=0,a++)}}},e._setupMovieClipFrame=function(t,e){var i=t.actionsEnabled;t.actionsEnabled=!1,t.gotoAndStop(e.i),t.actionsEnabled=i,e.f&&e.f(t,e.d,e.i)},e._getSize=function(t,e){for(var i=4;Math.pow(2,++i)=0;u--){var c=e[u],d=this._scale*c.scale,p=c.sourceRect,f=c.source,_=Math.floor(d*p.x-s),m=Math.floor(d*p.y-s),g=Math.ceil(d*p.height+2*s),v=Math.ceil(d*p.width+2*s);if(v>a)throw t.ERR_DIMENSIONS;g>o||h+v>a||(c.img=r,c.rect=new createjs.Rectangle(h,i,v,g),l=l||g,e.splice(u,1),n[c.index]=[h,i,v,g,r,Math.round(-_+d*f.regX-s),Math.round(-m+d*f.regY-s)],h+=v)}return{w:h,h:l}},e._endBuild=function(){this.spriteSheet=new createjs.SpriteSheet(this._data),this._data=null,this.progress=1,this.dispatchEvent("complete")},e._run=function(){for(var t=50*Math.max(.01,Math.min(.99,this.timeSlice||.3)),e=(new Date).getTime()+t,i=!1;e>(new Date).getTime();)if(!this._drawNext()){i=!0;break}if(i)this._endBuild();else{var r=this;this._timerID=setTimeout(function(){r._run()},50-t)}var n=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var s=new createjs.Event("progress");s.progress=n,this.dispatchEvent(s)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,r=t.sourceRect,n=this._data.images[t.img].getContext("2d");return t.funct&&t.funct(t.source,t.data),n.save(),n.beginPath(),n.rect(i.x,i.y,i.width,i.height),n.clip(),n.translate(Math.ceil(i.x-r.x*e),Math.ceil(i.y-r.y*e)),n.scale(e,e),t.source.draw(n),n.restore(),++this._indext)&&(t=0),(isNaN(e)||0>e)&&(e=0),(isNaN(i)||1>i)&&(i=1),this.blurX=0|t,this.blurY=0|e,this.quality=0|i}var e=createjs.extend(t,createjs.Filter);t.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],t.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],e.getBounds=function(t){var e=0|this.blurX,i=0|this.blurY;if(0>=e&&0>=i)return t;var r=Math.pow(this.quality,.2);return(t||new createjs.Rectangle).pad(e*r+1,i*r+1,e*r+1,i*r+1)},e.clone=function(){return new t(this.blurX,this.blurY,this.quality)},e.toString=function(){return"[BlurFilter]"},e._applyFilter=function(e){var i=this.blurX>>1;if(isNaN(i)||0>i)return!1;var r=this.blurY>>1;if(isNaN(r)||0>r)return!1;if(0==i&&0==r)return!1;var n=this.quality;(isNaN(n)||1>n)&&(n=1),(n|=0)>3&&(n=3),1>n&&(n=1);var s=e.data,a=0,o=0,h=0,l=0,u=0,c=0,d=0,p=0,f=0,_=0,m=0,g=0,v=0,y=0,b=0,T=i+i+1|0,E=r+r+1|0,x=0|e.width,w=0|e.height,S=x-1|0,D=w-1|0,P=i+1|0,A=r+1|0,I={r:0,b:0,g:0,a:0},C=I;for(h=1;T>h;h++)C=C.n={r:0,b:0,g:0,a:0};C.n=I;var O={r:0,b:0,g:0,a:0},M=O;for(h=1;E>h;h++)M=M.n={r:0,b:0,g:0,a:0};M.n=O;for(var L=null,R=0|t.MUL_TABLE[i],j=0|t.SHG_TABLE[i],N=0|t.MUL_TABLE[r],k=0|t.SHG_TABLE[r];n-- >0;){d=c=0;var H=R,F=j;for(o=w;--o>-1;){for(p=P*(g=s[0|c]),f=P*(v=s[c+1|0]),_=P*(y=s[c+2|0]),m=P*(b=s[c+3|0]),C=I,h=P;--h>-1;)C.r=g,C.g=v,C.b=y,C.a=b,C=C.n;for(h=1;P>h;h++)l=c+((h>S?S:h)<<2)|0,p+=C.r=s[l],f+=C.g=s[l+1],_+=C.b=s[l+2],m+=C.a=s[l+3],C=C.n;for(L=I,a=0;x>a;a++)s[c++]=p*H>>>F,s[c++]=f*H>>>F,s[c++]=_*H>>>F,s[c++]=m*H>>>F,l=d+((l=a+i+1)a;a++){for(p=A*(g=s[c=a<<2|0])|0,f=A*(v=s[c+1|0])|0,_=A*(y=s[c+2|0])|0,m=A*(b=s[c+3|0])|0,M=O,h=0;A>h;h++)M.r=g,M.g=v,M.b=y,M.a=b,M=M.n;for(u=x,h=1;r>=h;h++)c=u+a<<2,p+=M.r=s[c],f+=M.g=s[c+1],_+=M.b=s[c+2],m+=M.a=s[c+3],M=M.n,D>h&&(u+=x);if(c=a,L=O,n>0)for(o=0;w>o;o++)l=c<<2,s[l+3]=b=m*H>>>F,b>0?(s[l]=p*H>>>F,s[l+1]=f*H>>>F,s[l+2]=_*H>>>F):s[l]=s[l+1]=s[l+2]=0,l=a+((l=o+A)o;o++)l=c<<2,s[l+3]=b=m*H>>>F,b>0?(b=255/b,s[l]=(p*H>>>F)*b,s[l+1]=(f*H>>>F)*b,s[l+2]=(_*H>>>F)*b):s[l]=s[l+1]=s[l+2]=0,l=a+((l=o+A)r;r+=4)e[r+3]=i[r]||0;return!0},e._prepAlphaMap=function(){if(!this.alphaMap)return!1;if(this.alphaMap==this._alphaMap&&this._mapData)return!0;this._mapData=null;var t,e=this._alphaMap=this.alphaMap,i=e;e instanceof HTMLCanvasElement?t=i.getContext("2d"):(i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas"),i.width=e.width,i.height=e.height,(t=i.getContext("2d")).drawImage(e,0,0));try{var r=t.getImageData(0,0,e.width,e.height)}catch(t){return!1}return this._mapData=r.data,!0},createjs.AlphaMapFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.mask=t}var e=createjs.extend(t,createjs.Filter);e.applyFilter=function(t,e,i,r,n,s,a,o){return!this.mask||(s=s||t,null==a&&(a=e),null==o&&(o=i),s.save(),t==s&&(s.globalCompositeOperation="destination-in",s.drawImage(this.mask,a,o),s.restore(),!0))},e.clone=function(){return new t(this.mask)},e.toString=function(){return"[AlphaMaskFilter]"},createjs.AlphaMaskFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r,n,s,a,o){this.redMultiplier=null!=t?t:1,this.greenMultiplier=null!=e?e:1,this.blueMultiplier=null!=i?i:1,this.alphaMultiplier=null!=r?r:1,this.redOffset=n||0,this.greenOffset=s||0,this.blueOffset=a||0,this.alphaOffset=o||0}var e=createjs.extend(t,createjs.Filter);e.toString=function(){return"[ColorFilter]"},e.clone=function(){return new t(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},e._applyFilter=function(t){for(var e=t.data,i=e.length,r=0;i>r;r+=4)e[r]=e[r]*this.redMultiplier+this.redOffset,e[r+1]=e[r+1]*this.greenMultiplier+this.greenOffset,e[r+2]=e[r+2]*this.blueMultiplier+this.blueOffset,e[r+3]=e[r+3]*this.alphaMultiplier+this.alphaOffset;return!0},createjs.ColorFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r){this.setColor(t,e,i,r)}var e=t.prototype;t.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],t.IDENTITY_MATRIX=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t.LENGTH=t.IDENTITY_MATRIX.length,e.setColor=function(t,e,i,r){return this.reset().adjustColor(t,e,i,r)},e.reset=function(){return this.copy(t.IDENTITY_MATRIX)},e.adjustColor=function(t,e,i,r){return this.adjustHue(r),this.adjustContrast(e),this.adjustBrightness(t),this.adjustSaturation(i)},e.adjustBrightness=function(t){return 0==t||isNaN(t)?this:(t=this._cleanValue(t,255),this._multiplyMatrix([1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1]),this)},e.adjustContrast=function(e){if(0==e||isNaN(e))return this;var i;return 0>(e=this._cleanValue(e,100))?i=127+e/100*127:(i=e%1,i=0==i?t.DELTA_INDEX[e]:t.DELTA_INDEX[e<<0]*(1-i)+t.DELTA_INDEX[1+(e<<0)]*i,i=127*i+127),this._multiplyMatrix([i/127,0,0,0,.5*(127-i),0,i/127,0,0,.5*(127-i),0,0,i/127,0,.5*(127-i),0,0,0,1,0,0,0,0,0,1]),this},e.adjustSaturation=function(t){if(0==t||isNaN(t))return this;var e=1+((t=this._cleanValue(t,100))>0?3*t/100:t/100),i=.3086,r=.6094,n=.082;return this._multiplyMatrix([i*(1-e)+e,r*(1-e),n*(1-e),0,0,i*(1-e),r*(1-e)+e,n*(1-e),0,0,i*(1-e),r*(1-e),n*(1-e)+e,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.adjustHue=function(t){if(0==t||isNaN(t))return this;t=this._cleanValue(t,180)/180*Math.PI;var e=Math.cos(t),i=Math.sin(t),r=.213,n=.715,s=.072;return this._multiplyMatrix([r+e*(1-r)+i*-r,n+e*-n+i*-n,s+e*-s+i*(1-s),0,0,r+e*-r+.143*i,n+e*(1-n)+.14*i,s+e*-s+-.283*i,0,0,r+e*-r+-.787*i,n+e*-n+i*n,s+e*(1-s)+i*s,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.concat=function(e){return(e=this._fixMatrix(e)).length!=t.LENGTH?this:(this._multiplyMatrix(e),this)},e.clone=function(){return(new t).copy(this)},e.toArray=function(){for(var e=[],i=0,r=t.LENGTH;r>i;i++)e[i]=this[i];return e},e.copy=function(e){for(var i=t.LENGTH,r=0;i>r;r++)this[r]=e[r];return this},e.toString=function(){return"[ColorMatrix]"},e._multiplyMatrix=function(t){var e,i,r,n=[];for(e=0;5>e;e++){for(i=0;5>i;i++)n[i]=this[i+5*e];for(i=0;5>i;i++){var s=0;for(r=0;5>r;r++)s+=t[i+5*r]*n[r];this[i+5*e]=s}}},e._cleanValue=function(t,e){return Math.min(e,Math.max(-e,t))},e._fixMatrix=function(e){return e instanceof t&&(e=e.toArray()),e.lengtht.LENGTH&&(e=e.slice(0,t.LENGTH)),e},createjs.ColorMatrix=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.matrix=t}var e=createjs.extend(t,createjs.Filter);e.toString=function(){return"[ColorMatrixFilter]"},e.clone=function(){return new t(this.matrix)},e._applyFilter=function(t){for(var e,i,r,n,s=t.data,a=s.length,o=this.matrix,h=o[0],l=o[1],u=o[2],c=o[3],d=o[4],p=o[5],f=o[6],_=o[7],m=o[8],g=o[9],v=o[10],y=o[11],b=o[12],T=o[13],E=o[14],x=o[15],w=o[16],S=o[17],D=o[18],P=o[19],A=0;a>A;A+=4)e=s[A],i=s[A+1],r=s[A+2],n=s[A+3],s[A]=e*h+i*l+r*u+n*c+d,s[A+1]=e*p+i*f+r*_+n*m+g,s[A+2]=e*v+i*y+r*b+n*T+E,s[A+3]=e*x+i*w+r*S+n*D+P;return!0},createjs.ColorMatrixFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Touch cannot be instantiated"}t.isSupported=function(){return!!("ontouchstart"in window||window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>0||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>0)},t.enable=function(e,i,r){return!!(e&&e.canvas&&t.isSupported())&&(!!e.__touch||(e.__touch={pointers:{},multitouch:!i,preventDefault:!r,count:0},"ontouchstart"in window?t._IOS_enable(e):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&t._IE_enable(e),!0))},t.disable=function(e){e&&("ontouchstart"in window?t._IOS_disable(e):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&t._IE_disable(e),delete e.__touch)},t._IOS_enable=function(e){var i=e.canvas,r=e.__touch.f=function(i){t._IOS_handleEvent(e,i)};i.addEventListener("touchstart",r,!1),i.addEventListener("touchmove",r,!1),i.addEventListener("touchend",r,!1),i.addEventListener("touchcancel",r,!1)},t._IOS_disable=function(t){var e=t.canvas;if(e){var i=t.__touch.f;e.removeEventListener("touchstart",i,!1),e.removeEventListener("touchmove",i,!1),e.removeEventListener("touchend",i,!1),e.removeEventListener("touchcancel",i,!1)}},t._IOS_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();for(var i=e.changedTouches,r=e.type,n=0,s=i.length;s>n;n++){var a=i[n],o=a.identifier;a.target==t.canvas&&("touchstart"==r?this._handleStart(t,o,e,a.pageX,a.pageY):"touchmove"==r?this._handleMove(t,o,e,a.pageX,a.pageY):("touchend"==r||"touchcancel"==r)&&this._handleEnd(t,o,e))}}},t._IE_enable=function(e){var i=e.canvas,r=e.__touch.f=function(i){t._IE_handleEvent(e,i)};void 0===window.navigator.pointerEnabled?(i.addEventListener("MSPointerDown",r,!1),window.addEventListener("MSPointerMove",r,!1),window.addEventListener("MSPointerUp",r,!1),window.addEventListener("MSPointerCancel",r,!1),e.__touch.preventDefault&&(i.style.msTouchAction="none")):(i.addEventListener("pointerdown",r,!1),window.addEventListener("pointermove",r,!1),window.addEventListener("pointerup",r,!1),window.addEventListener("pointercancel",r,!1),e.__touch.preventDefault&&(i.style.touchAction="none")),e.__touch.activeIDs={}},t._IE_disable=function(t){var e=t.__touch.f;void 0===window.navigator.pointerEnabled?(window.removeEventListener("MSPointerMove",e,!1),window.removeEventListener("MSPointerUp",e,!1),window.removeEventListener("MSPointerCancel",e,!1),t.canvas&&t.canvas.removeEventListener("MSPointerDown",e,!1)):(window.removeEventListener("pointermove",e,!1),window.removeEventListener("pointerup",e,!1),window.removeEventListener("pointercancel",e,!1),t.canvas&&t.canvas.removeEventListener("pointerdown",e,!1))},t._IE_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();var i=e.type,r=e.pointerId,n=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;n[r]=!0,this._handleStart(t,r,e,e.pageX,e.pageY)}else n[r]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,r,e,e.pageX,e.pageY):("MSPointerUp"==i||"MSPointerCancel"==i||"pointerup"==i||"pointercancel"==i)&&(delete n[r],this._handleEnd(t,r,e)))}},t._handleStart=function(t,e,i,r,n){var s=t.__touch;if(s.multitouch||!s.count){var a=s.pointers;a[e]||(a[e]=!0,s.count++,t._handlePointerDown(e,i,r,n))}},t._handleMove=function(t,e,i,r,n){t.__touch.pointers[e]&&t._handlePointerMove(e,i,r,n)},t._handleEnd=function(t,e,i){var r=t.__touch,n=r.pointers;n[e]&&(r.count--,t._handlePointerUp(e,i,!0),delete n[e])},createjs.Touch=t}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.EaselJS=createjs.EaselJS||{};t.version="0.8.2",t.buildDate="Thu, 26 Nov 2015 20:44:34 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.PreloadJS=createjs.PreloadJS||{};t.version="0.6.2",t.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}}}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}createjs.extend(t,createjs.Event).clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(t){"use strict";function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}createjs.extend(e,createjs.Event).clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),function(){function t(e,r){function s(t){if(s[t]!==m)return s[t];var e;if("bug-string-char-index"==t)e="a"!="a"[0];else if("json"==t)e=s("json-stringify")&&s("json-parse");else{var i,n='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var h=r.stringify,u="function"==typeof h&&y;if(u){(i=function(){return 1}).toJSON=i;try{u="0"===h(0)&&"0"===h(new a)&&'""'==h(new o)&&h(v)===m&&h(m)===m&&h()===m&&"1"===h(i)&&"[1]"==h([i])&&"[null]"==h([m])&&"null"==h(null)&&"[null,null,null]"==h([m,v,null])&&h({a:[i,!0,!1,null,"\0\b\n\f\r\t"]})==n&&"1"===h(null,i)&&"[\n 1,\n 2\n]"==h([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==h(new l(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==h(new l(864e13))&&'"-000001-01-01T00:00:00.000Z"'==h(new l(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==h(new l(-1))}catch(t){u=!1}}e=u}if("json-parse"==t){var c=r.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){var d=5==(i=c(n)).a.length&&1===i.a[0];if(d){try{d=!c('"\t"')}catch(t){}if(d)try{d=1!==c("01")}catch(t){}if(d)try{d=1!==c("1.")}catch(t){}}}}catch(t){d=!1}e=d}}return s[t]=!!e}e||(e=n.Object()),r||(r=n.Object());var a=e.Number||n.Number,o=e.String||n.String,h=e.Object||n.Object,l=e.Date||n.Date,u=e.SyntaxError||n.SyntaxError,c=e.TypeError||n.TypeError,d=e.Math||n.Math,p=e.JSON||n.JSON;"object"==typeof p&&p&&(r.stringify=p.stringify,r.parse=p.parse);var f,_,m,g=h.prototype,v=g.toString,y=new l(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(t){}if(!s("json")){var b="[object Function]",T="[object Number]",E="[object String]",x="[object Array]",w=s("bug-string-char-index");if(!y)var S=d.floor,D=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(t,e){return D[e]+365*(t-1970)+S((t-1969+(e=+(e>1)))/4)-S((t-1901+e)/100)+S((t-1601+e)/400)};if((f=g.hasOwnProperty)||(f=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?f=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,f=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,f.call(this,t)}),_=function(t,e){var r,n,s,a=0;(r=function(){this.valueOf=0}).prototype.valueOf=0,n=new r;for(s in n)f.call(n,s)&&a++;return r=n=null,a?_=2==a?function(t,e){var i,r={},n=v.call(t)==b;for(i in t)n&&"prototype"==i||f.call(r,i)||!(r[i]=1)||!f.call(t,i)||e(i)}:function(t,e){var i,r,n=v.call(t)==b;for(i in t)n&&"prototype"==i||!f.call(t,i)||(r="constructor"===i)||e(i);(r||f.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],_=function(t,e){var r,s,a=v.call(t)==b,o=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||f;for(r in t)a&&"prototype"==r||!o.call(t,r)||e(r);for(s=n.length;r=n[--s];o.call(t,r)&&e(r));}),_(t,e)},!s("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I=function(t,e){return("000000"+(e||0)).slice(-t)},C=function(t){for(var e='"',i=0,r=t.length,n=!w||r>10,s=n&&(w?t.split(""):t);r>i;i++){var a=t.charCodeAt(i);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=A[a];break;default:if(32>a){e+="\\u00"+I(2,a.toString(16));break}e+=n?s[i]:t.charAt(i)}}return e+'"'},O=function(t,e,i,r,n,s,a){var o,h,l,u,d,p,g,y,b,w,D,A,M,L,R,j;try{o=e[t]}catch(t){}if("object"==typeof o&&o)if("[object Date]"!=(h=v.call(o))||f.call(o,"toJSON"))"function"==typeof o.toJSON&&(h!=T&&h!=E&&h!=x||f.call(o,"toJSON"))&&(o=o.toJSON(t));else if(o>-1/0&&1/0>o){if(P){for(d=S(o/864e5),l=S(d/365.2425)+1970-1;P(l+1,0)<=d;l++);for(u=S((d-P(l,0))/30.42);P(l,u+1)<=d;u++);d=1+d-P(l,u),g=S((p=(o%864e5+864e5)%864e5)/36e5)%24,y=S(p/6e4)%60,b=S(p/1e3)%60,w=p%1e3}else l=o.getUTCFullYear(),u=o.getUTCMonth(),d=o.getUTCDate(),g=o.getUTCHours(),y=o.getUTCMinutes(),b=o.getUTCSeconds(),w=o.getUTCMilliseconds();o=(0>=l||l>=1e4?(0>l?"-":"+")+I(6,0>l?-l:l):I(4,l))+"-"+I(2,u+1)+"-"+I(2,d)+"T"+I(2,g)+":"+I(2,y)+":"+I(2,b)+"."+I(3,w)+"Z"}else o=null;if(i&&(o=i.call(e,t,o)),null===o)return"null";if("[object Boolean]"==(h=v.call(o)))return""+o;if(h==T)return o>-1/0&&1/0>o?""+o:"null";if(h==E)return C(""+o);if("object"==typeof o){for(L=a.length;L--;)if(a[L]===o)throw c();if(a.push(o),D=[],R=s,s+=n,h==x){for(M=0,L=o.length;L>M;M++)A=O(M,o,i,r,n,s,a),D.push(A===m?"null":A);j=D.length?n?"[\n"+s+D.join(",\n"+s)+"\n"+R+"]":"["+D.join(",")+"]":"[]"}else _(r||o,function(t){var e=O(t,o,i,r,n,s,a);e!==m&&D.push(C(t)+":"+(n?" ":"")+e)}),j=D.length?n?"{\n"+s+D.join(",\n"+s)+"\n"+R+"}":"{"+D.join(",")+"}":"{}";return a.pop(),j}};r.stringify=function(t,e,r){var n,s,a,o;if(i[typeof e]&&e)if((o=v.call(e))==b)s=e;else if(o==x){a={};for(var h,l=0,u=e.length;u>l;h=e[l++],((o=v.call(h))==E||o==T)&&(a[h]=1));}if(r)if((o=v.call(r))==T){if((r-=r%1)>0)for(n="",r>10&&(r=10);n.lengthM;)switch(n=s.charCodeAt(M)){case 9:case 10:case 13:case 32:M++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=w?s.charAt(M):s[M],M++,t;case 34:for(t="@",M++;a>M;)if(32>(n=s.charCodeAt(M)))N();else if(92==n)switch(n=s.charCodeAt(++M)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=j[n],M++;break;case 117:for(e=++M,i=M+4;i>M;M++)(n=s.charCodeAt(M))>=48&&57>=n||n>=97&&102>=n||n>=65&&70>=n||N();t+=R("0x"+s.slice(e,M));break;default:N()}else{if(34==n)break;for(n=s.charCodeAt(M),e=M;n>=32&&92!=n&&34!=n;)n=s.charCodeAt(++M);t+=s.slice(e,M)}if(34==s.charCodeAt(M))return M++,t;N();default:if(e=M,45==n&&(r=!0,n=s.charCodeAt(++M)),n>=48&&57>=n){for(48==n&&(n=s.charCodeAt(M+1))>=48&&57>=n&&N(),r=!1;a>M&&(n=s.charCodeAt(M))>=48&&57>=n;M++);if(46==s.charCodeAt(M)){for(i=++M;a>i&&(n=s.charCodeAt(i))>=48&&57>=n;i++);i==M&&N(),M=i}if(101==(n=s.charCodeAt(M))||69==n){for((43==(n=s.charCodeAt(++M))||45==n)&&M++,i=M;a>i&&(n=s.charCodeAt(i))>=48&&57>=n;i++);i==M&&N(),M=i}return+s.slice(e,M)}if(r&&N(),"true"==s.slice(M,M+4))return M+=4,!0;if("false"==s.slice(M,M+5))return M+=5,!1;if("null"==s.slice(M,M+4))return M+=4,null;N()}return"$"},H=function(t){var e,i;if("$"==t&&N(),"string"==typeof t){if("@"==(w?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=k());i||(i=!0))i&&(","==t?"]"==(t=k())&&N():N()),","==t&&N(),e.push(H(t));return e}if("{"==t){for(e={};"}"!=(t=k());i||(i=!0))i&&(","==t?"}"==(t=k())&&N():N()),(","==t||"string"!=typeof t||"@"!=(w?t.charAt(0):t[0])||":"!=k())&&N(),e[t.slice(1)]=H(k());return e}N()}return t},F=function(t,e,i){var r=B(t,e,i);r===m?delete t[e]:t[e]=r},B=function(t,e,i){var r,n=t[e];if("object"==typeof n&&n)if(v.call(n)==x)for(r=n.length;r--;)F(n,r,i);else _(n,function(t){F(n,t,i)});return i.call(t,e,n)};r.parse=function(t,e){var i,r;return M=0,L=""+t,i=H(k()),"$"!=k()&&N(),M=L=null,e&&v.call(e)==b?B((r={},r[""]=i,r),"",e):i}}}return r.runInContext=t,r}var e="function"==typeof define&&define.amd,i={function:!0,object:!0},r=i[typeof exports]&&exports&&!exports.nodeType&&exports,n=i[typeof window]&&window||this,s=r&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(n=s),r&&!e)t(n,r);else{var a=n.JSON,o=n.JSON3,h=!1,l=t(n,n.JSON3={noConflict:function(){return h||(h=!0,n.JSON=a,n.JSON3=o,a=o=null),l}});n.JSON={parse:l.parse,stringify:l.stringify}}e&&define(function(){return l})}.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 r=new DOMParser;i=r.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 r=new t;return r.src=e,r}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 r=e.indexOf("?");r>-1&&(e=e.substr(0,r));var n;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var r in t)i.push(r+"="+escape(t[r]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],r=t.indexOf("?");if(-1!=r){var n=t.slice(r+1);i=i.concat(n.split("&"))}return-1!=r?t.slice(0,r)+"?"+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)return void this._handleError(e);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={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;a>n;n++){var o=s.ACTIVEX_VERSIONS[n];try{r=new ActiveXObject(o);break}catch(t){}}if(null==r)return!1}null==t.mimeType&&createjs.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),this._xhrLevel="string"==typeof r.responseType?2:1;var h=null;if(h=t.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(t.src,t.values):t.src,r.open(t.method||createjs.AbstractLoader.GET,h,!0),e&&r instanceof XMLHttpRequest&&1==this._xhrLevel&&(i.Origin=location.origin),t.values&&t.method==createjs.AbstractLoader.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var l in t.headers)i[l]=t.headers[l];for(l in i)r.setRequestHeader(l,i[l]);return r instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(r.withCredentials=t.withCredentials),this._request=r,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[createjs.ImageLoader,createjs.JavaScriptLoader,createjs.CSSLoader,createjs.JSONLoader,createjs.JSONPLoader,createjs.SoundLoader,createjs.ManifestLoader,createjs.SpriteSheetLoader,createjs.XMLLoader,createjs.SVGLoader,createjs.BinaryLoader,createjs.VideoLoader,createjs.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(t,e,i)}var e=createjs.extend(t,createjs.AbstractLoader),i=t;e.init=function(t,e,i){this.useXHR=!0,this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(t),this._paused=!1,this._basePath=e,this._crossOrigin=i,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=NaN},i.loadTimeout=8e3,i.LOAD_TIMEOUT=0,i.BINARY=createjs.AbstractLoader.BINARY,i.CSS=createjs.AbstractLoader.CSS,i.IMAGE=createjs.AbstractLoader.IMAGE,i.JAVASCRIPT=createjs.AbstractLoader.JAVASCRIPT,i.JSON=createjs.AbstractLoader.JSON,i.JSONP=createjs.AbstractLoader.JSONP,i.MANIFEST=createjs.AbstractLoader.MANIFEST,i.SOUND=createjs.AbstractLoader.SOUND,i.VIDEO=createjs.AbstractLoader.VIDEO,i.SVG=createjs.AbstractLoader.SVG,i.TEXT=createjs.AbstractLoader.TEXT,i.XML=createjs.AbstractLoader.XML,i.POST=createjs.AbstractLoader.POST,i.GET=createjs.AbstractLoader.GET,e.registerLoader=function(t){if(!t||!t.canLoadItem)throw new Error("loader is of an incorrect type.");if(-1!=this._availableLoaders.indexOf(t))throw new Error("loader already exists.");this._availableLoaders.unshift(t)},e.unregisterLoader=function(t){var e=this._availableLoaders.indexOf(t);-1!=e&&e0)return;var i=!1;if(e){for(;e.length;){var r=e.pop(),n=this.getResult(r);for(s=this._loadQueue.length-1;s>=0;s--)if((a=this._loadQueue[s].getItem()).id==r||a.src==r){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if((a=this._loadQueueBackup[s].getItem()).id==r||a.src==r){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(n)this._disposeItem(this.getItem(r));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==r||a.src==r){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,r=this._loadQueueBackup.length;r>i;i++)e.push(this._loadQueueBackup[i].getItem());this.loadManifest(e,!1)},e.installPlugin=function(t){if(null!=t&&null!=t.getPreloadHandlers){this._plugins.push(t);var e=t.getPreloadHandlers();if(e.scope=t,null!=e.types)for(var i=0,r=e.types.length;r>i;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,r=e.extensions.length;r>i;i++)this._extensionCallbacks[e.extensions[i]]=e}},e.setMaxConnections=function(t){this._maxConnections=t,!this._paused&&this._loadQueue.length>0&&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 r=new createjs.ErrorEvent("PRELOAD_NO_FILE");this._sendError(r)}},e.loadManifest=function(t,e,r){var n=null,s=null;if(Array.isArray(t)){if(0==t.length){a=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(a)}n=t}else if("string"==typeof t)n=[{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)}n=[t]}else void 0!==t.manifest&&(n=t.manifest,s=t.path)}for(var o=0,h=n.length;h>o;o++)this._addItem(n[o],s,r);!1!==e?this.setPaused(!1):this.setPaused(!0)},e.load=function(){this.setPaused(!1)},e.getItem=function(t){return this._loadItemsById[t]||this._loadItemsBySrc[t]},e.getResult=function(t,e){var i=this._loadItemsById[t]||this._loadItemsBySrc[t];if(null==i)return null;var r=i.id;return e&&this._loadedRawResults[r]?this._loadedRawResults[r]:this._loadedResults[r]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var r=this._loadItemsById[i],n=this.getResult(i);(!0!==t||null!=n)&&e.push({item:r,result:n,rawResult:this.getResult(i,!0)})}return e},e.setPaused=function(t){this._paused=t,this._paused||this._loadNext()},e.close=function(){for(;this._currentLoads.length;)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=NaN},e._addItem=function(t,e,i){var r=this._createLoadItem(t,e,i);if(null!=r){var n=this._createLoader(r);null!=n&&("plugins"in n&&(n.plugins=this._plugins),r._loader=n,this._loadQueue.push(n),this._loadQueueBackup.push(n),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&r.type==createjs.LoadQueue.JAVASCRIPT||!0===r.maintainOrder)&&(this._scriptOrder.push(r),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var r=createjs.LoadItem.create(t);if(null==r)return null;var n="",s=i||this._basePath;if(r.src instanceof Object){if(!r.type)return null;if(e){n=e;h=createjs.RequestUtils.parseURI(e);null==s||h.absolute||h.relative||(n=s+n)}else null!=s&&(n=s)}else{var a=createjs.RequestUtils.parseURI(r.src);a.extension&&(r.ext=a.extension),null==r.type&&(r.type=createjs.RequestUtils.getTypeByExtension(r.ext));var o=r.src;if(!a.absolute&&!a.relative)if(e){n=e;var h=createjs.RequestUtils.parseURI(e);o=e+o,null==s||h.absolute||h.relative||(n=s+n)}else null!=s&&(n=s);r.src=n+r.src}r.path=n,(void 0===r.id||null===r.id||""===r.id)&&(r.id=o);var l=this._typeCallbacks[r.type]||this._extensionCallbacks[r.ext];if(l){var u=l.callback.call(l.scope,r,this);if(!1===u)return null;!0===u||null!=u&&(r._loader=u),null!=(a=createjs.RequestUtils.parseURI(r.src)).extension&&(r.ext=a.extension)}return this._loadItemsById[r.id]=r,this._loadItemsBySrc[r.src]=r,null==r.crossOrigin&&(r.crossOrigin=this._crossOrigin),r},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i=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(),r=e.getResult();this._loadedResults[i.id]=r;var n=e.getResult(!0);null!=n&&n!==r&&(this._loadedRawResults[i.id]=n),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;ie;e++){var i=this._loadedScripts[e];if(null===i)break;if(!0!==i){var r=this._loadedResults[i.id];i.type==createjs.LoadQueue.JAVASCRIPT&&createjs.DomUtils.appendToHead(r);var n=i._loader;this._processFinishedLoad(i,n),this._loadedScripts[e]=!0}}},e._processFinishedLoad=function(t,e){if(this._numItemsLoaded++,!this.maintainScriptOrder&&t.type==createjs.LoadQueue.JAVASCRIPT){var i=e.getTag();createjs.DomUtils.appendToHead(i)}this._updateProgress(),this._sendFileComplete(t,e),this._loadNext()},e._canStartLoad=function(t){if(!this.maintainScriptOrder||t.preferXHR)return!0;var e=t.getItem();if(e.type!=createjs.LoadQueue.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;for(var i=this._scriptOrder.indexOf(e),r=0;i>r;){if(null==this._loadedScripts[r])return!1;r++}return this._currentlyLoadingScript=!0,!0},e._removeLoadItem=function(t){for(var e=this._currentLoads.length,i=0;e>i;i++)if(this._currentLoads[i]==t){this._currentLoads.splice(i,1);break}},e._cleanLoadItem=function(t){var e=t.getItem();e&&delete e._loader},e._handleProgress=function(t){var e=t.target;this._sendFileProgress(e.getItem(),e.progress),this._updateProgress()},e._updateProgress=function(){var t=this._numItemsLoaded/this._numItems,e=this._numItems-this._numItemsLoaded;if(e>0){for(var i=0,r=0,n=this._currentLoads.length;n>r;r++)i+=this._currentLoads[r].progress;t+=i/e*(e/this._numItems)}this._lastProgress!=t&&(this._sendProgress(t),this._lastProgress=t)},e._disposeItem=function(t){delete this._loadedResults[t.id],delete this._loadedRawResults[t.id],delete this._loadItemsById[t.id],delete this._loadItemsBySrc[t.src]},e._sendFileProgress=function(t,e){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var i=new createjs.Event("fileprogress");i.progress=e,i.loaded=e,i.total=1,i.item=t,this.dispatchEvent(i)}},e._sendFileComplete=function(t,e){if(!this._isCanceled()&&!this._paused){var i=new createjs.Event("fileload");i.loader=e,i.item=t,i.result=this._loadedResults[t.id],i.rawResult=this._loadedRawResults[t.id],t.completeHandler&&t.completeHandler(i),this.hasEventListener("fileload")&&this.dispatchEvent(i)}},e._sendFileStart=function(t){var e=new createjs.Event("filestart");e.item=t,this.hasEventListener("filestart")&&this.dispatchEvent(e)},e.toString=function(){return"[PreloadJS LoadQueue]"},createjs.LoadQueue=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.TEXT)}(createjs.extend(t,createjs.AbstractLoader),t).canLoadItem=function(t){return t.type==createjs.AbstractLoader.TEXT},createjs.TextLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.BINARY),this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.BINARY},e._updateXHR=function(t){t.loader.setResponseType("arraybuffer")},createjs.BinaryLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",this._tag=e?document.createElement("style"):document.createElement("link"),this._tag.rel="stylesheet",this._tag.type="text/css"}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.CSS},e._formatResult=function(t){if(this._preferXHR){var e=t.getTag();if(e.styleSheet)e.styleSheet.cssText=t.getResult(!0);else{var i=document.createTextNode(t.getResult(!0));e.appendChild(i)}}else e=this._tag;return createjs.DomUtils.appendToHead(e),e},createjs.CSSLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",createjs.RequestUtils.isImageTag(t)?this._tag=t:createjs.RequestUtils.isImageTag(t.src)?this._tag=t.src:createjs.RequestUtils.isImageTag(t.tag)&&(this._tag=t.tag),null!=this._tag?this._preferXHR=!1:this._tag=document.createElement("img"),this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.IMAGE},e.load=function(){if(""!=this._tag.src&&this._tag.complete)this._sendComplete();else{var t=this._item.crossOrigin;1==t&&(t="Anonymous"),null==t||createjs.RequestUtils.isLocal(this._item.src)||(this._tag.crossOrigin=t),this.AbstractLoader_load()}},e._updateXHR=function(t){t.loader.mimeType="text/plain; charset=x-user-defined-binary",t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){return this._formatImage},e._formatImage=function(t,e){var i=this._tag,r=window.URL||window.webkitURL;if(this._preferXHR)if(r){var n=r.createObjectURL(this.getResult(!0));i.src=n,i.addEventListener("load",this._cleanUpURL,!1),i.addEventListener("error",this._cleanUpURL,!1)}else i.src=this._item.src;i.complete?t(i):(i.onload=createjs.proxy(function(){t(this._tag)},this),i.onerror=createjs.proxy(function(){e(_this._tag)},this))},e._cleanUpURL=function(t){(window.URL||window.webkitURL).revokeObjectURL(t.target.src)},createjs.ImageLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(document.createElement("script"))}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JAVASCRIPT},e._formatResult=function(t){var e=t.getTag();return this._preferXHR&&(e.text=t.getResult(!0)),e},createjs.JavaScriptLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.JSON),this.resultFormatter=this._formatResult}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JSON},e._formatResult=function(t){var e=null;try{e=createjs.DataUtils.parseJSON(t.getResult(!0))}catch(t){var i=new createjs.ErrorEvent("JSON_FORMAT",null,t);return this._sendError(i),t}return e},createjs.JSONLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!1,createjs.AbstractLoader.JSONP),this.setTag(document.createElement("script")),this.getTag().type="text/javascript"}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JSONP},e.cancel=function(){this.AbstractLoader_cancel(),this._dispose()},e.load=function(){if(null==this._item.callback)throw new Error("callback is required for loading JSONP requests.");if(null!=window[this._item.callback])throw new Error("JSONP callback '"+this._item.callback+"' already exists on window. You need to specify a different callback or re-name the current one.");window[this._item.callback]=createjs.proxy(this._handleLoad,this),window.document.body.appendChild(this._tag),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag.src=this._item.src},e._handleLoad=function(t){this._result=this._rawResult=t,this._sendComplete(),this._dispose()},e._handleTimeout=function(){this._dispose(),this.dispatchEvent(new createjs.ErrorEvent("timeout"))},e._dispose=function(){window.document.body.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},createjs.JSONPLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,null,createjs.AbstractLoader.MANIFEST),this.plugins=null,this._manifestQueue=null}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.MANIFEST_PROGRESS=.25,i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.MANIFEST},e.load=function(){this.AbstractLoader_load()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new createjs.JSONPLoader(this._item):new createjs.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.MANIFEST_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.MANIFEST_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._loadManifest=function(t){if(t&&t.manifest){var e=this._manifestQueue=new createjs.LoadQueue;e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("complete",this._handleManifestComplete,this,!0),e.on("error",this._handleManifestError,this,!0);for(var i=0,r=this.plugins.length;r>i;i++)e.installPlugin(this.plugins[i]);e.loadManifest(t)}else this._sendComplete()},e._handleManifestFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleManifestComplete=function(t){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.MANIFEST_PROGRESS)+i.MANIFEST_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.ManifestLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(t)?this._tag=t:createjs.RequestUtils.isAudioTag(t.src)?this._tag=t:createjs.RequestUtils.isAudioTag(t.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=createjs.extend(t,createjs.AbstractMediaLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SOUND},e._createTag=function(t){var e=document.createElement("audio");return e.autoplay=!1,e.preload="none",e.src=t,e},createjs.SoundLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.AbstractLoader.VIDEO),createjs.RequestUtils.isVideoTag(t)||createjs.RequestUtils.isVideoTag(t.src)?(this.setTag(createjs.RequestUtils.isVideoTag(t)?t:t.src),this._preferXHR=!1):this.setTag(this._createTag())}var e=t;createjs.extend(t,createjs.AbstractMediaLoader)._createTag=function(){return document.createElement("video")},e.canLoadItem=function(t){return t.type==createjs.AbstractLoader.VIDEO},createjs.VideoLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.SPRITESHEET),this._manifestQueue=null}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.SPRITESHEET_PROGRESS=.25,i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SPRITESHEET},e.destroy=function(){this.AbstractLoader_destroy,this._manifestQueue.close()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new createjs.JSONPLoader(this._item):new createjs.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.SPRITESHEET_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e._loadManifest=function(t){if(t&&t.images){var e=this._manifestQueue=new createjs.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);e.on("complete",this._handleManifestComplete,this,!0),e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("error",this._handleManifestError,this,!0),e.loadManifest(t.images)}},e._handleManifestFileLoad=function(t){var e=t.result;if(null!=e){var i=this.getResult().images;i[i.indexOf(t.item.src)]=e}},e._handleManifestComplete=function(t){this._result=new createjs.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.SPRITESHEET_PROGRESS)+i.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.SpriteSheetLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",e?this.setTag(document.createElement("svg")):(this.setTag(document.createElement("object")),this.getTag().type="image/svg+xml")}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SVG},e._formatResult=function(t){var e=createjs.DataUtils.parseXML(t.getResult(!0),"text/xml"),i=t.getTag();return!this._preferXHR&&document.body.contains(i)&&document.body.removeChild(i),null!=e.documentElement?(i.appendChild(e.documentElement),i.style.visibility="visible",i):e},createjs.SVGLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.XML),this.resultFormatter=this._formatResult}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.AbstractLoader.XML},e._formatResult=function(t){return createjs.DataUtils.parseXML(t.getResult(!0),"text/xml")},createjs.XMLLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=createjs.SoundJS=createjs.SoundJS||{};t.version="0.6.2",t.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.indexOf=function(t,e){"use strict";for(var i=0,r=t.length;r>i;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}}}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"BrowserDetect cannot be instantiated"}var e=t.agent=window.navigator.userAgent;t.isWindowPhone=e.indexOf("IEMobile")>-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";var t=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},e=t.prototype={},i=t;i.create=function(t){if(t instanceof i||t instanceof Object){var e=new createjs.PlayPropsConfig;return e.set(t),e}throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=i}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Sound cannot be instantiated"}function e(t,e){this.init(t,e)}var i=t;i.INTERRUPT_ANY="any",i.INTERRUPT_EARLY="early",i.INTERRUPT_LATE="late",i.INTERRUPT_NONE="none",i.PLAY_INITED="playInited",i.PLAY_SUCCEEDED="playSucceeded",i.PLAY_INTERRUPTED="playInterrupted",i.PLAY_FINISHED="playFinished",i.PLAY_FAILED="playFailed",i.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],i.EXTENSION_MAP={m4a:"mp4"},i.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,i.defaultInterruptBehavior=i.INTERRUPT_NONE,i.alternateExtensions=[],i.activePlugin=null,i._masterVolume=1,Object.defineProperty(i,"volume",{get:function(){return this._masterVolume},set: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,r=0,n=e.length;n>r;r++)e[r].setMasterVolume(t)}}),i._masterMute=!1,Object.defineProperty(i,"muted",{get:function(){return this._masterMute},set:function(t){if(null==t)return!1;if(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t))for(var e=this._instances,i=0,r=e.length;r>i;i++)e[i].setMasterMute(t);return!0}}),Object.defineProperty(i,"capabilities",{get:function(){return null==i.activePlugin?null:i.activePlugin._capabilities},set:function(t){return!1}}),i._pluginsRegistered=!1,i._lastID=0,i._instances=[],i._idHash={},i._preloadHash={},i._defaultPlayPropsHash={},i.addEventListener=null,i.removeEventListener=null,i.removeAllEventListeners=null,i.dispatchEvent=null,i.hasEventListener=null,i._listeners=null,createjs.EventDispatcher.initialize(i),i.getPreloadHandlers=function(){return{callback:createjs.proxy(i.initLoad,i),types:["sound"],extensions:i.SUPPORTED_EXTENSIONS}},i._handleLoadComplete=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var r=0,n=i._preloadHash[e].length;n>r;r++){var s=i._preloadHash[e][r];i._preloadHash[e][r]=!0,i.hasEventListener("fileload")&&((t=new createjs.Event("fileload")).src=s.src,t.id=s.id,t.data=s.data,t.sprite=s.sprite,i.dispatchEvent(t))}},i._handleLoadError=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var r=0,n=i._preloadHash[e].length;n>r;r++){var s=i._preloadHash[e][r];i._preloadHash[e][r]=!1,i.hasEventListener("fileerror")&&((t=new createjs.Event("fileerror")).src=s.src,t.id=s.id,t.data=s.data,t.sprite=s.sprite,i.dispatchEvent(t))}},i._registerPlugin=function(t){return!!t.isSupported()&&(i.activePlugin=new t,!0)},i.registerPlugins=function(t){i._pluginsRegistered=!0;for(var e=0,r=t.length;r>e;e++)if(i._registerPlugin(t[e]))return!0;return!1},i.initializeDefaultPlugins=function(){return null!=i.activePlugin||!i._pluginsRegistered&&!!i.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])},i.isReady=function(){return null!=i.activePlugin},i.getCapabilities=function(){return null==i.activePlugin?null:i.activePlugin._capabilities},i.getCapability=function(t){return null==i.activePlugin?null:i.activePlugin._capabilities[t]},i.initLoad=function(t){return i._registerSound(t)},i._registerSound=function(t){if(!i.initializeDefaultPlugins())return!1;var r;if(t.src instanceof Object?(r=i._parseSrc(t.src),r.src=t.path+r.src):r=i._parsePath(t.src),null==r)return!1;t.src=r.src,t.type="sound";var n=t.data,s=null;if(null!=n&&(isNaN(n.channels)?isNaN(n)||(s=parseInt(n)):s=parseInt(n.channels),n.audioSprite))for(var a,o=n.audioSprite.length;o--;)a=n.audioSprite[o],i._idHash[a.id]={src:t.src,startTime:parseInt(a.startTime),duration:parseInt(a.duration)},a.defaultPlayProps&&(i._defaultPlayPropsHash[a.id]=createjs.PlayPropsConfig.create(a.defaultPlayProps));null!=t.id&&(i._idHash[t.id]={src:t.src});var h=i.activePlugin.register(t);return e.create(t.src,s),null!=n&&isNaN(n)?t.data.channels=s||e.maxPerChannel():t.data=s||e.maxPerChannel(),h.type&&(t.type=h.type),t.defaultPlayProps&&(i._defaultPlayPropsHash[t.src]=createjs.PlayPropsConfig.create(t.defaultPlayProps)),h},i.registerSound=function(t,e,r,n,s){var a={src:t,id:e,data:r,defaultPlayProps:s};t instanceof Object&&t.src&&(n=e,a=t),(a=createjs.LoadItem.create(a)).path=n,null==n||a.src instanceof Object||(a.src=n+t);var o=i._registerSound(a);if(!o)return!1;if(i._preloadHash[a.src]||(i._preloadHash[a.src]=[]),i._preloadHash[a.src].push(a),1==i._preloadHash[a.src].length)o.on("complete",createjs.proxy(this._handleLoadComplete,this)),o.on("error",createjs.proxy(this._handleLoadError,this)),i.activePlugin.preload(o);else if(1==i._preloadHash[a.src][0])return!0;return a},i.registerSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,n=t.length;n>r;r++)i[r]=createjs.Sound.registerSound(t[r].src,t[r].id,t[r].data,e,t[r].defaultPlayProps);return i},i.removeSound=function(t,r){if(null==i.activePlugin)return!1;t instanceof Object&&t.src&&(t=t.src);var n;if(t instanceof Object?n=i._parseSrc(t):(t=i._getSrcById(t).src,n=i._parsePath(t)),null==n)return!1;t=n.src,null!=r&&(t=r+t);for(var s in i._idHash)i._idHash[s].src==t&&delete i._idHash[s];return e.removeSrc(t),delete i._preloadHash[t],i.activePlugin.removeSound(t),!0},i.removeSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,n=t.length;n>r;r++)i[r]=createjs.Sound.removeSound(t[r].src,e);return i},i.removeAllSounds=function(){i._idHash={},i._preloadHash={},e.removeAll(),i.activePlugin&&i.activePlugin.removeAllSounds()},i.loadComplete=function(t){if(!i.isReady())return!1;var e=i._parsePath(t);return t=e?i._getSrcById(e.src).src:i._getSrcById(t).src,void 0!=i._preloadHash[t]&&1==i._preloadHash[t][0]},i._parsePath=function(t){"string"!=typeof t&&(t=t.toString());var e=t.match(i.FILE_PATTERN);if(null==e)return!1;for(var r=e[4],n=e[5],s=i.capabilities,a=0;!s[n];)if(n=i.alternateExtensions[a++],a>i.alternateExtensions.length)return null;return{name:r,src:t=t.replace("."+e[5],"."+n),extension:n}},i._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},r=i.capabilities;for(var n in t)if(t.hasOwnProperty(n)&&r[n]){e.src=t[n],e.extension=n;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,r,n,s,a,o,h,l){var u;u=e instanceof Object||e instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(e):createjs.PlayPropsConfig.create({interrupt:e,delay:r,offset:n,loop:s,volume:a,pan:o,startTime:h,duration:l});var c=i.createInstance(t,u.startTime,u.duration);return i._playInstance(c,u)||c._playFailed(),c},i.createInstance=function(t,r,n){if(!i.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(t,r,n);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==r&&(r=t.startTime),o=i.activePlugin.create(a.src,r,n||t.duration),(s=s||i._defaultPlayPropsHash[a.src])&&o.applyPlayProps(s)):o=new createjs.DefaultSoundInstance(t,r,n),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,r=0,n=e.length;n>r;r++)e[r].setMasterVolume(t)},i.getVolume=function(){return this._masterVolume},i.setMute=function(t){if(null==t)return!1;if(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t))for(var e=this._instances,i=0,r=e.length;r>i;i++)e[i].setMasterMute(t);return!0},i.getMute=function(){return this._masterMute},i.setDefaultPlayProps=function(t,e){t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]=createjs.PlayPropsConfig.create(e)},i.getDefaultPlayProps=function(t){return t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]},i._playInstance=function(t,e){var r=i._defaultPlayPropsHash[t.src]||{};if(null==e.interrupt&&(e.interrupt=r.interrupt||i.defaultInterruptBehavior),null==e.delay&&(e.delay=r.delay||0),null==e.offset&&(e.offset=t.getPosition()),null==e.loop&&(e.loop=t.loop),null==e.volume&&(e.volume=t.volume),null==e.pan&&(e.pan=t.pan),0==e.delay){if(!i._beginPlaying(t,e))return!1}else{var n=setTimeout(function(){i._beginPlaying(t,e)},e.delay);t.delayTimeoutId=n}return this._instances.push(t),!0},i._beginPlaying=function(t,i){if(!e.add(t,i.interrupt))return!1;if(!t._beginPlaying(i)){var r=createjs.indexOf(this._instances,t);return r>-1&&this._instances.splice(r,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 r=e.get(t.src);return null!=r&&r._add(t,i)},e.remove=function(t){var i=e.get(t.src);return null!=i&&(i._remove(t),!0)},e.maxPerChannel=function(){return r.maxDefault},e.get=function(t){return e.channels[t]};var r=e.prototype;r.constructor=e,r.src=null,r.max=null,r.maxDefault=100,r.length=0,r.init=function(t,e){this.src=t,this.max=e||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},r._get=function(t){return this._instances[t]},r._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},r._remove=function(t){var e=createjs.indexOf(this._instances,t);return-1!=e&&(this._instances.splice(e,1),this.length--,!0)},r._removeAll=function(){for(var t=this.length-1;t>=0;t--)this._instances[t].stop()},r._getSlot=function(e,i){var r,n;if(e!=t.INTERRUPT_NONE&&null==(n=this._get(0)))return!0;for(var s=0,a=this.max;a>s;s++){if(null==(r=this._get(s)))return!0;if(r.playState==t.PLAY_FINISHED||r.playState==t.PLAY_INTERRUPTED||r.playState==t.PLAY_FAILED){n=r;break}e!=t.INTERRUPT_NONE&&(e==t.INTERRUPT_EARLY&&r.getPosition()n.getPosition())&&(n=r)}return null!=n&&(n._interrupt(),this._remove(n),!0)},r.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t,e,i,r){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!==r&&!0!==r&&this.setPlaybackResource(r),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,r,n,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:r,volume:n,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){return!0!==t&&!1!==t||this._paused==t||1==t&&this.playState!=createjs.Sound.PLAY_SUCCEEDED?void 0:(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){return!0===t||!1===t?(this._muted=t,this._updateVolume(),this):void 0},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._positioni;i++)this._soundInstances[e][i].setPlaybackResource(this._audioSources[e])},e._handlePreloadError=function(t){},e._updateVolume=function(){},createjs.AbstractPlugin=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.SOUND)}var e=createjs.extend(t,createjs.AbstractLoader);t.context=null,e.toString=function(){return"[WebAudioLoader]"},e._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},e._sendComplete=function(e){t.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},e._handleAudioDecoded=function(t){this._result=t,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,r,n){this.AbstractSoundInstance_constructor(t,e,r,n),this.gainNode=i.context.createGain(),this.panNode=i.context.createPanner(),this.panNode.panningModel=i._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var e=createjs.extend(t,createjs.AbstractSoundInstance),i=t;i.context=null,i._scratchBuffer=null,i.destinationNode=null,i._panningModel="equalpower",e.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},e.toString=function(){return"[WebAudioSoundInstance]"},e._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},e._removeLooping=function(t){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},e._addLooping=function(t){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},e._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},e._cleanUpAudioNode=function(t){if(t){t.stop(0),t.disconnect(0);try{t.buffer=i._scratchBuffer}catch(t){}t=null}return t},e._handleSoundReady=function(t){this.gainNode.connect(i.destinationNode);var e=.001*this._duration,r=.001*this._position;r>e&&(r=e),this.sourceNode=this._createAndPlayAudioNode(i.context.currentTime-e,r),this._playbackStartTime=this.sourceNode.startTime-r,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-r)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var r=i.context.createBufferSource();r.buffer=this.playbackResource,r.connect(this.panNode);var n=.001*this._duration;return r.startTime=t+n,r.start(r.startTime,e+.001*this._startTime,n-e),r},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,r=createjs.Sound.EXTENSION_MAP,n=0,s=e.length;s>n;n++){var a=e[n],o=r[a]||a;i._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)}i.context.destination.numberOfChannels<2&&(i._capabilities.panning=!1)}},i._compatibilitySetUp=function(){if(i._panningModel="equalpower",!i.context.createGain){i.context.createGain=i.context.createGainNode;var t=i.context.createBufferSource();t.__proto__.start=t.__proto__.noteGrainOn,t.__proto__.stop=t.__proto__.noteOff,i._panningModel=0}},i._unlock=function(){i._unlocked||(i.playEmptySound(),"running"==i.context.state&&(document.removeEventListener("mousedown",i._unlock,!0),document.removeEventListener("touchend",i._unlock,!0),i._unlocked=!0))},e.toString=function(){return"[WebAudioPlugin]"},e._addPropsToClasses=function(){var t=this._soundInstanceClass;t.context=this.context,t._scratchBuffer=i._scratchBuffer,t.destinationNode=this.gainNode,t._panningModel=this._panningModel,this._loaderClass.context=this.context},e._updateVolume=function(){var t=createjs.Sound._masterMute?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},createjs.WebAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"HTMLAudioTagPool cannot be instantiated"}function e(t){this._tags=[]}var i=t;i._tags={},i._tagPool=new e,i._tagUsed={},i.get=function(t){var e=i._tags[t];return null==e?(e=i._tags[t]=i._tagPool.get(),e.src=t):i._tagUsed[t]?(e=i._tagPool.get(),e.src=t):i._tagUsed[t]=!0,e},i.set=function(t,e){e==i._tags[t]?i._tagUsed[t]=!1:i._tagPool.set(e)},i.remove=function(t){var e=i._tags[t];return null!=e&&(i._tagPool.set(e),delete i._tags[t],delete i._tagUsed[t],!0)},i.getDuration=function(t){var e=i._tags[t];return null!=e&&e.duration?1e3*e.duration:0},createjs.HTMLAudioTagPool=t;var r=e.prototype;r.constructor=e,r.get=function(){var t;return null==(t=0==this._tags.length?this._createTag():this._tags.pop()).parentNode&&document.body.appendChild(t),t},r.set=function(t){-1==createjs.indexOf(this._tags,t)&&(this._tags.src=null,this._tags.push(t))},r.toString=function(){return"[TagPool]"},r._createTag=function(){var t=document.createElement("audio");return t.autoplay=!1,t.preload="none",t}}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,r){this.AbstractSoundInstance_constructor(t,e,i,r),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),i?this._audioSpriteStopTime=.001*(e+i):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var e=createjs.extend(t,createjs.AbstractSoundInstance);e.setMasterVolume=function(t){this._updateVolume()},e.setMasterMute=function(t){this._updateVolume()},e.toString=function(){return"[HTMLAudioSoundInstance]"},e._removeLooping=function(){null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._addLooping=function(){null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},e._handleCleanUp=function(){var t=this._playbackResource;if(null!=t){t.pause(),t.loop=!1,t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{t.currentTime=this._startTime}catch(t){}createjs.HTMLAudioTagPool.set(this.src,t),this._playbackResource=null}},e._beginPlaying=function(t){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(t)},e._handleSoundReady=function(t){if(4!==this._playbackResource.readyState){var e=this._playbackResource;return e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),e.preload="auto",void e.load()}this._updateVolume(),this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play()},e._handleTagReady=function(t){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady()},e._pause=function(){this._playbackResource.pause()},e._resume=function(){this._playbackResource.play()},e._updateVolume=function(){if(null!=this._playbackResource){var t=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;t!=this._playbackResource.volume&&(this._playbackResource.volume=t)}},e._calculateCurrentPosition=function(){return 1e3*this._playbackResource.currentTime-this._startTime},e._updatePosition=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(t){this._handleSetPositionSeek(null)}},e._handleSetPositionSeek=function(t){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._handleAudioSpriteLoop=function(t){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause(),0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play(),this._sendEvent("loop")))},e._handleLoop=function(t){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._updateStartTime=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._updateDuration=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._setDurationFromSource=function(){this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.AbstractPlugin_constructor(),this.defaultNumChannels=2,this._capabilities=i._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i.MAX_INSTANCES=30,i._AUDIO_READY="canplaythrough",i._AUDIO_ENDED="ended",i._AUDIO_SEEKED="seeked",i._AUDIO_STALLED="stalled",i._TIME_UPDATE="timeupdate",i._capabilities=null,i.isSupported=function(){return i._generateCapabilities(),null!=i._capabilities},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;i._capabilities={panning:!1,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,r=createjs.Sound.EXTENSION_MAP,n=0,s=e.length;s>n;n++){var a=e[n],o=r[a]||a;i._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)}}},e.register=function(t){var e=createjs.HTMLAudioTagPool.get(t.src),i=this.AbstractPlugin_register(t);return i.setTag(e),i},e.removeSound=function(t){this.AbstractPlugin_removeSound(t),createjs.HTMLAudioTagPool.remove(t)},e.create=function(t,e,i){var r=this.AbstractPlugin_create(t,e,i);return r.setPlaybackResource(null),r},e.toString=function(){return"[HTMLAudioPlugin]"},e.setVolume=e.getVolume=e.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function t(e,i,r){this.ignoreGlobalPause=!1,this.loop=!1,this.duration=0,this.pluginData=r||{},this.target=e,this.position=null,this.passive=!1,this._paused=!1,this._curQueueProps={},this._initQueueProps={},this._steps=[],this._actions=[],this._prevPosition=0,this._stepPosition=0,this._prevPos=-1,this._target=e,this._useTicks=!1,this._inited=!1,this._registered=!1,i&&(this._useTicks=i.useTicks,this.ignoreGlobalPause=i.ignoreGlobalPause,this.loop=i.loop,i.onChange&&this.addEventListener("change",i.onChange),i.override&&t.removeTweens(e)),i&&i.paused?this._paused=!0:createjs.Tween._register(this,!0),i&&null!=i.position&&this.setPosition(i.position,t.NONE)}var e=createjs.extend(t,createjs.EventDispatcher);t.NONE=0,t.LOOP=1,t.REVERSE=2,t.IGNORE={},t._tweens=[],t._plugins={},t.get=function(e,i,r,n){return n&&t.removeTweens(e),new t(e,i,r)},t.tick=function(e,i){for(var r=t._tweens.slice(),n=r.length-1;n>=0;n--){var s=r[n];i&&!s.ignoreGlobalPause||s._paused||s.tick(s._useTicks?1:e)}},t.handleEvent=function(t){"tick"==t.type&&this.tick(t.delta,t.paused)},t.removeTweens=function(e){if(e.tweenjs_count){for(var i=t._tweens,r=i.length-1;r>=0;r--){var n=i[r];n._target==e&&(n._paused=!0,i.splice(r,1))}e.tweenjs_count=0}},t.removeAllTweens=function(){for(var e=t._tweens,i=0,r=e.length;r>i;i++){var n=e[i];n._paused=!0,n.target&&(n.target.tweenjs_count=0)}e.length=0},t.hasActiveTweens=function(e){return e?null!=e.tweenjs_count&&!!e.tweenjs_count:t._tweens&&!!t._tweens.length},t.installPlugin=function(e,i){var r=e.priority;null==r&&(e.priority=r=0);for(var n=0,s=i.length,a=t._plugins;s>n;n++){var o=i[n];if(a[o]){for(var h=a[o],l=0,u=h.length;u>l&&!(r=t)return this;var i=this._cloneProps(this._curQueueProps);return this._addStep({d:t,p0:i,e:this._linearEase,p1:i,v:e})},e.to=function(t,e,i){return(isNaN(e)||0>e)&&(e=0),this._addStep({d:e||0,p0:this._cloneProps(this._curQueueProps),e:i,p1:this._cloneProps(this._appendQueueProps(t))})},e.call=function(t,e,i){return this._addAction({f:t,p:e||[this],o:i||this._target})},e.set=function(t,e){return this._addAction({f:this._set,o:this,p:[t,e||this._target]})},e.play=function(t){return t||(t=this),this.call(t.setPaused,[!1],t)},e.pause=function(t){return t||(t=this),this.call(t.setPaused,[!0],t)},e.setPosition=function(t,e){0>t&&(t=0),null==e&&(e=1);var i=t,r=!1;if(i>=this.duration&&(this.loop?i%=this.duration:(i=this.duration,r=!0)),i==this._prevPos)return r;var n=this._prevPos;if(this.position=this._prevPos=i,this._prevPosition=t,this._target)if(r)this._updateTargetProps(null,1);else if(this._steps.length>0){for(var s=0,a=this._steps.length;a>s&&!(this._steps[s].t>i);s++);var o=this._steps[s-1];this._updateTargetProps(o,(this._stepPosition=i-o.t)/o.d)}return 0!=e&&this._actions.length>0&&(this._useTicks?this._runActions(i,i):1==e&&n>i?(n!=this.duration&&this._runActions(n,this.duration),this._runActions(0,i,!0)):this._runActions(n,i)),r&&this.setPaused(!0),this.dispatchEvent("change"),r},e.tick=function(t){this._paused||this.setPosition(this._prevPosition+t)},e.setPaused=function(e){return this._paused===!!e?this:(this._paused=!!e,t._register(this,!e),this)},e.w=e.wait,e.t=e.to,e.c=e.call,e.s=e.set,e.toString=function(){return"[Tween]"},e.clone=function(){throw"Tween can not be cloned."},e._updateTargetProps=function(e,i){var r,n,s,a,o,h;if(e||1!=i){if(this.passive=!!e.v,this.passive)return;e.e&&(i=e.e(i,0,1,1)),r=e.p0,n=e.p1}else this.passive=!1,r=n=this._curQueueProps;for(var l in this._initQueueProps){null==(a=r[l])&&(r[l]=a=this._initQueueProps[l]),null==(o=n[l])&&(n[l]=o=a),s=a==o||0==i||1==i||"number"!=typeof a?1==i?o:a:a+(o-a)*i;var u=!1;if(h=t._plugins[l])for(var c=0,d=h.length;d>c;c++){var p=h[c].tween(this,l,s,r,n,i,!!e&&r==n,!e);p==t.IGNORE?u=!0:s=p}u||(this._target[l]=s)}},e._runActions=function(t,e,i){var r=t,n=e,s=-1,a=this._actions.length,o=1;for(t>e&&(r=e,n=t,s=a,a=o=-1);(s+=o)!=a;){var h=this._actions[s],l=h.t;(l==n||l>r&&n>l||i&&l==t)&&h.f.apply(h.o,h.p)}},e._appendQueueProps=function(e){var i,r,n,s,a;for(var o in e)if(void 0===this._initQueueProps[o]){if(r=this._target[o],i=t._plugins[o])for(n=0,s=i.length;s>n;n++)r=i[n].init(this,o,r);this._initQueueProps[o]=this._curQueueProps[o]=void 0===r?null:r}else r=this._curQueueProps[o];for(var o in e){if(r=this._curQueueProps[o],i=t._plugins[o])for(a=a||{},n=0,s=i.length;s>n;n++)i[n].step&&i[n].step(this,o,r,e[o],a);this._curQueueProps[o]=e[o]}return a&&this._appendQueueProps(a),this._curQueueProps},e._cloneProps=function(t){var e={};for(var i in t)e[i]=t[i];return e},e._addStep=function(t){return t.d>0&&(this._steps.push(t),t.t=this.duration,this.duration+=t.d),this},e._addAction=function(t){return t.t=this.duration,this._actions.push(t),this},e._set=function(t,e){for(var i in t)e[i]=t[i]},createjs.Tween=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.EventDispatcher_constructor(),this.ignoreGlobalPause=!1,this.duration=0,this.loop=!1,this.position=null,this._paused=!1,this._tweens=[],this._labels=null,this._labelList=null,this._prevPosition=0,this._prevPos=-1,this._useTicks=!1,this._registered=!1,i&&(this._useTicks=i.useTicks,this.loop=i.loop,this.ignoreGlobalPause=i.ignoreGlobalPause,i.onChange&&this.addEventListener("change",i.onChange)),t&&this.addTween.apply(this,t),this.setLabels(e),i&&i.paused?this._paused=!0:createjs.Tween._register(this,!0),i&&null!=i.position&&this.setPosition(i.position,createjs.Tween.NONE)}var e=createjs.extend(t,createjs.EventDispatcher);e.addTween=function(t){var e=arguments.length;if(e>1){for(var i=0;e>i;i++)this.addTween(arguments[i]);return arguments[0]}return 0==e?null:(this.removeTween(t),this._tweens.push(t),t.setPaused(!0),t._paused=!1,t._useTicks=this._useTicks,t.duration>this.duration&&(this.duration=t.duration),this._prevPos>=0&&t.setPosition(this._prevPos,createjs.Tween.NONE),t)},e.removeTween=function(t){var e=arguments.length;if(e>1){for(var i=!0,r=0;e>r;r++)i=i&&this.removeTween(arguments[r]);return i}if(0==e)return!1;for(var n=this._tweens,r=n.length;r--;)if(n[r]==t)return n.splice(r,1),t.duration>=this.duration&&this.updateDuration(),!0;return!1},e.addLabel=function(t,e){this._labels[t]=e;var i=this._labelList;if(i){for(var r=0,n=i.length;n>r&&!(er&&!(e=this.duration;if(i==this._prevPos)return r;this._prevPosition=t,this.position=this._prevPos=i;for(var n=0,s=this._tweens.length;s>n;n++)if(this._tweens[n].setPosition(i,e),i!=this._prevPos)return!1;return r&&this.setPaused(!0),this.dispatchEvent("change"),r},e.setPaused=function(t){this._paused=!!t,createjs.Tween._register(this,!t)},e.updateDuration=function(){this.duration=0;for(var t=0,e=this._tweens.length;e>t;t++){var i=this._tweens[t];i.duration>this.duration&&(this.duration=i.duration)}},e.tick=function(t){this.setPosition(this._prevPosition+t)},e.resolve=function(t){var e=Number(t);return isNaN(e)&&(e=this._labels[t]),e},e.toString=function(){return"[Timeline]"},e.clone=function(){throw"Timeline can not be cloned."},e._goto=function(t){var e=this.resolve(t);null!=e&&this.setPosition(e)},e._calcPosition=function(t){return 0>t?0:tt&&(t=-1),t>1&&(t=1),function(e){return 0==t?e:0>t?e*(e*-t+1+t):e*((2-e)*t+(1-t))}},t.getPowIn=function(t){return function(e){return Math.pow(e,t)}},t.getPowOut=function(t){return function(e){return 1-Math.pow(1-e,t)}},t.getPowInOut=function(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}},t.quadIn=t.getPowIn(2),t.quadOut=t.getPowOut(2),t.quadInOut=t.getPowInOut(2),t.cubicIn=t.getPowIn(3),t.cubicOut=t.getPowOut(3),t.cubicInOut=t.getPowInOut(3),t.quartIn=t.getPowIn(4),t.quartOut=t.getPowOut(4),t.quartInOut=t.getPowInOut(4),t.quintIn=t.getPowIn(5),t.quintOut=t.getPowOut(5),t.quintInOut=t.getPowInOut(5),t.sineIn=function(t){return 1-Math.cos(t*Math.PI/2)},t.sineOut=function(t){return Math.sin(t*Math.PI/2)},t.sineInOut=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getBackIn=function(t){return function(e){return e*e*((t+1)*e-t)}},t.backIn=t.getBackIn(1.7),t.getBackOut=function(t){return function(e){return--e*e*((t+1)*e+t)+1}},t.backOut=t.getBackOut(1.7),t.getBackInOut=function(t){return t*=1.525,function(e){return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},t.backInOut=t.getBackInOut(1.7),t.circIn=function(t){return-(Math.sqrt(1-t*t)-1)},t.circOut=function(t){return Math.sqrt(1- --t*t)},t.circInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},t.bounceIn=function(e){return 1-t.bounceOut(1-e)},t.bounceOut=function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},t.bounceInOut=function(e){return.5>e?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5},t.getElasticIn=function(t,e){var i=2*Math.PI;return function(r){if(0==r||1==r)return r;var n=e/i*Math.asin(1/t);return-t*Math.pow(2,10*(r-=1))*Math.sin((r-n)*i/e)}},t.elasticIn=t.getElasticIn(1,.3),t.getElasticOut=function(t,e){var i=2*Math.PI;return function(r){if(0==r||1==r)return r;var n=e/i*Math.asin(1/t);return t*Math.pow(2,-10*r)*Math.sin((r-n)*i/e)+1}},t.elasticOut=t.getElasticOut(1,.3),t.getElasticInOut=function(t,e){var i=2*Math.PI;return function(r){var n=e/i*Math.asin(1/t);return(r*=2)<1?t*Math.pow(2,10*(r-=1))*Math.sin((r-n)*i/e)*-.5:t*Math.pow(2,-10*(r-=1))*Math.sin((r-n)*i/e)*.5+1}},t.elasticInOut=t.getElasticInOut(1,.3*1.5),createjs.Ease=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"MotionGuidePlugin cannot be instantiated."}t.priority=0,t.install=function(){return createjs.Tween.installPlugin(t,["guide","x","y","rotation"]),createjs.Tween.IGNORE},t.init=function(t,e,i){var r=t.target;return r.hasOwnProperty("x")||(r.x=0),r.hasOwnProperty("y")||(r.y=0),r.hasOwnProperty("rotation")||(r.rotation=0),"rotation"==e&&(t.__needsRot=!0),"guide"==e?null:i},t.step=function(e,i,r,n,s){if("rotation"==i&&(e.__rotGlobalS=r,e.__rotGlobalE=n,t.testRotData(e,s)),"guide"!=i)return n;var a,o=n;o.hasOwnProperty("path")||(o.path=[]);var h=o.path;if(o.hasOwnProperty("end")||(o.end=1),o.hasOwnProperty("start")||(o.start=r&&r.hasOwnProperty("end")&&r.path===h?r.end:0),o.hasOwnProperty("_segments")&&o._length)return n;var l=h.length;if(!(l>=6&&(l-2)%4==0))throw"invalid 'path' data, please see documentation for valid paths";o._segments=[],o._length=0;for(var u=2;l>u;u+=4){for(var c,d,p=h[u-2],f=h[u-1],_=h[u+0],m=h[u+1],g=h[u+2],v=h[u+3],y=p,b=f,T=0,E=[],x=1;10>=x;x++){var w=x/10,S=1-w;c=S*S*p+2*S*w*_+w*w*g,d=S*S*f+2*S*w*m+w*w*v,T+=E[E.push(Math.sqrt((a=c-y)*a+(a=d-b)*a))-1],y=c,b=d}o._segments.push(T),o._segments.push(E),o._length+=T}a=o.orient,o.orient=!0;var D={};return t.calc(o,o.start,D),e.__rotPathS=Number(D.rotation.toFixed(5)),t.calc(o,o.end,D),e.__rotPathE=Number(D.rotation.toFixed(5)),o.orient=!1,t.calc(o,o.end,s),o.orient=a,o.orient?(e.__guideData=o,t.testRotData(e,s),n):n},t.testRotData=function(t,e){if(void 0===t.__rotGlobalS||void 0===t.__rotGlobalE){if(t.__needsRot)return;void 0!==t._curQueueProps.rotation?t.__rotGlobalS=t.__rotGlobalE=t._curQueueProps.rotation:t.__rotGlobalS=t.__rotGlobalE=e.rotation=t.target.rotation||0}if(void 0!==t.__guideData){var i=t.__guideData,r=t.__rotGlobalE-t.__rotGlobalS,n=t.__rotPathE-t.__rotPathS,s=r-n;if("auto"==i.orient)s>180?s-=360:-180>s&&(s+=360);else if("cw"==i.orient){for(;0>s;)s+=360;0==s&&r>0&&180!=r&&(s+=360)}else if("ccw"==i.orient){for(s=r-(n>180?360-n:n);s>0;)s-=360;0==s&&0>r&&-180!=r&&(s-=360)}i.rotDelta=s,i.rotOffS=t.__rotGlobalS-t.__rotPathS,t.__rotGlobalS=t.__rotGlobalE=t.__guideData=t.__needsRot=void 0}},t.tween=function(e,i,r,n,s,a,o,h){var l=s.guide;if(void 0==l||l===n.guide)return r;if(l.lastRatio!=a){var u=(l.end-l.start)*(o?l.end:a)+l.start;switch(t.calc(l,u,e.target),l.orient){case"cw":case"ccw":case"auto":e.target.rotation+=l.rotOffS+l.rotDelta*a;break;case"fixed":default:e.target.rotation+=l.rotOffS}l.lastRatio=a}return"rotation"!=i||l.orient&&"false"!=l.orient?e.target[i]:r},t.calc=function(t,e,i){if(void 0==t._segments)throw"Missing critical pre-calculated information, please file a bug";void 0==i&&(i={x:0,y:0,rotation:0});for(var r=t._segments,n=t.path,s=t._length*e,a=r.length-2,o=0;s>r[o]&&a>o;)s-=r[o],o+=2;var h=r[o+1],l=0;for(a=h.length-1;s>h[l]&&a>l;)s-=h[l],l++;var u=l/++a+s/(a*h[l]);o=2*o+2;var c=1-u;return i.x=c*c*n[o-2]+2*c*u*n[o+0]+u*u*n[o+2],i.y=c*c*n[o-1]+2*c*u*n[o+1]+u*u*n[o+3],t.orient&&(i.rotation=57.2957795*Math.atan2((n[o+1]-n[o-1])*c+(n[o+3]-n[o+1])*u,(n[o+0]-n[o-2])*c+(n[o+2]-n[o+0])*u)),i},createjs.MotionGuidePlugin=t}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.TweenJS=createjs.TweenJS||{};t.version="0.6.2",t.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),!window.egret){var egret_strings={4001:"Abstract class can not be instantiated!",4002:"Unnamed data!",4003:"Nonsupport version!"},Event=function(t,e,i,r){this.type=t,this.bubbles=e||!1,this.cancelable=i||!1,this.data=r},EventDispatcher=function(t){this._listenerDict={}};EventDispatcher.prototype={constructor:EventDispatcher,addEventListener:function(t,e,i,r,n,s){this._listenerDict[t]||(this._listenerDict[t]=[]),this._listenerDict[t].push({listener:e,thisObject:i,useCapture:r,priority:n,once:s})},once:function(t,e,i,r,n){this.addEventListener(t,e,i,r,n,!0)},removeEventListener:function(t,e,i,r){if(t)if(e){var n=this._listenerDict[t],s=n.indexOf(e);s>-1&&n.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(),r=0;r-1&&e.splice(s,1)}n.listener&&n.listener.call(n.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 r=t.prototype;r.__class__=e;var n=[e];i&&(n=n.concat(i));var s=r.__types__;if(r.__types__)for(var a=s.length,o=0;o=0?l.setCurrentTime(l.totalTime*r):l.setCurrentTime(i),l.stop(),l},r.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))},r.stop=function(){this._isPlaying=!1},r.getState=function(t,e){void 0===e&&(e=0);for(var i=this._animationStateList.length;i--;){var r=this._animationStateList[i];if(r.name==t&&r.layer==e)return r}return null},r.hasAnimation=function(t){for(var e=this._animationDataList.length;e--;)if(this._animationDataList[e].name==t)return!0;return!1},r._advanceTime=function(t){if(this._isPlaying){var e=!1;t*=this._timeScale;for(var i=this._animationStateList.length;i--;){var r=this._animationStateList[i];r._advanceTime(t)?this.removeState(r):1!=r.fadeState&&(e=!0)}this._isFading=e}},r._updateAnimationStates=function(){for(var t=this._animationStateList.length;t--;)this._animationStateList[t]._updateTimelineStates()},r.addState=function(t){this._animationStateList.indexOf(t)<0&&(this._animationStateList.unshift(t),this._animationStateCount=this._animationStateList.length)},r.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(r,"movementList",function(){return this._animationList}),i(r,"movementID",function(){return this.lastAnimationName}),i(r,"lastAnimationState",function(){return this._lastAnimationState}),i(r,"lastAnimationName",function(){return this._lastAnimationState?this._lastAnimationState.name:null}),i(r,"animationList",function(){return this._animationList}),i(r,"isPlaying",function(){return this._isPlaying&&!this.isComplete}),i(r,"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(r,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(r,"animationDataList",function(){return this._animationDataList},function(t){this._animationDataList=t,this._animationList.length=0;for(var e=0,i=this._animationDataList.length;e=0},r.addBoneMask=function(t,e){if(void 0===e&&(e=!0),this.addBoneToBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var r=this._armature.getBones(!1),n=r.length;n--;){var s=r[n];i.contains(s)&&this.addBoneToBoneMask(s.name)}}return this._updateTimelineStates(),this},r.removeBoneMask=function(t,e){if(void 0===e&&(e=!0),this.removeBoneFromBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var r=this._armature.getBones(!1),n=r.length;n--;){var s=r[n];i.contains(s)&&this.removeBoneFromBoneMask(s.name)}}return this._updateTimelineStates(),this},r.removeAllMixingTransform=function(){return this._boneMasks.length=0,this._updateTimelineStates(),this},r.addBoneToBoneMask=function(t){this._clip.getTimeline(t)&&this._boneMasks.indexOf(t)<0&&this._boneMasks.push(t)},r.removeBoneFromBoneMask=function(t){var e=this._boneMasks.indexOf(t);e>=0&&this._boneMasks.splice(e,1)},r._updateTimelineStates=function(){for(var t,e,i,r=this._timelineStateList.length;r--;)t=this._timelineStateList[r],this._armature.getBone(t.name)||this.removeTimelineState(t);for(r=this._slotTimelineStateList.length;r--;)e=this._slotTimelineStateList[r],this._armature.getSlot(e.name)||this.removeSlotTimelineState(e);if(this._boneMasks.length>0){for(r=this._timelineStateList.length;r--;)t=this._timelineStateList[r],this._boneMasks.indexOf(t.name)<0&&this.removeTimelineState(t);for(r=0,i=this._boneMasks.length;rthis._fadeTotalTime/this._timeScale-(this._fadeCurrentTime-this._fadeBeginTime))return this}else for(var i=0,r=this._timelineStateList.length;i=0?t*this._timeScale:0,this.displayControl=!1,this},r._advanceTime=function(t){return t*=this._timeScale,this.advanceFadeTime(t),this._fadeWeight&&this.advanceTimelinesTime(t),this._isFadeOut&&1==this._fadeState},r.advanceFadeTime=function(e){var i=!1,r=!1;if(this._fadeBeginTime>=0){var n=this._fadeState;this._fadeCurrentTime+=e<0?-e:e,this._fadeCurrentTime>=this._fadeBeginTime+this._fadeTotalTime?(1!=this._fadeWeight&&0!=this._fadeWeight||(n=1,this._pausePlayheadInFade&&(this._pausePlayheadInFade=!1,this._currentTime=-1)),this._fadeWeight=this._isFadeOut?0:1):this._fadeCurrentTime>=this._fadeBeginTime?(n=0,this._fadeWeight=(this._fadeCurrentTime-this._fadeBeginTime)/this._fadeTotalTime*this._fadeTotalWeight,this._isFadeOut&&(this._fadeWeight=this._fadeTotalWeight-this._fadeWeight)):(n=-1,this._fadeWeight=this._isFadeOut?1:0),this._fadeState!=n&&(-1==this._fadeState&&(i=!0),1==n&&(r=!0),this._fadeState=n)}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)))),r&&(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)))},r.advanceTimelinesTime=function(e){this._isPlaying&&!this._pausePlayheadInFade&&(this._time+=e);var i=!1,r=!1,n=!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 h=this._playTimes*this._totalTime;o>=h?(o=h,s=!0):o<=-h?(o=-h,s=!0):s=!1,o<0&&(o+=h),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 l=1e3*this._time/this._totalTime,u=0,c=0;for(u=0,c=this._timelineStateList.length;u0&&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 p;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&((p=new t.AnimationEvent(t.AnimationEvent.START)).animationState=this,this._armature._eventList.push(p)),r?(this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&((p=new t.AnimationEvent(t.AnimationEvent.COMPLETE)).animationState=this,this._armature._eventList.push(p)),this.autoFadeOut&&this.fadeOut(this.fadeOutTime,!0)):n&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&((p=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE)).animationState=this,this._armature._eventList.push(p))},r.updateMainTimeline=function(t){var e=this._clip.frameList;if(e.length>0){for(var i,r,n=0,s=this._clip.frameList.length;n=this._currentFramePosition+this._currentFrameDuration||this._currentTime=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}r=e[this._currentFrameIndex],i&&this._armature._arriveAtFrame(i,null,this,!0),this._currentFrameDuration=r.duration,this._currentFramePosition=r.position,i=r}r&&this._armature._arriveAtFrame(r,null,this,!1)}},r.hideBones=function(){for(var t=0,e=this._clip.hideTimelineNameMap.length;t=0&&(this.fadeOutTime=e*this._timeScale),this},r.setWeight=function(t){return(isNaN(t)||t<0)&&(t=1),this.weight=t,this},r.setFrameTween=function(t,e){return this.autoTween=t,this.lastFrameAutoTween=e,this},r.setCurrentTime=function(t){return(t<0||isNaN(t))&&(t=0),this._time=t,this._currentTime=1e3*this._time,this},r.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},r.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(r,"name",function(){return this._name}),i(r,"layer",function(){return this._layer}),i(r,"group",function(){return this._group}),i(r,"clip",function(){return this._clip}),i(r,"isComplete",function(){return this._isComplete}),i(r,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(r,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(r,"totalTime",function(){return.001*this._totalTime}),i(r,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),i(r,"fadeWeight",function(){return this._fadeWeight}),i(r,"fadeState",function(){return this._fadeState}),i(r,"fadeTotalTime",function(){return this._fadeTotalTime}),i(r,"timeScale",function(){return this._timeScale}),i(r,"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,r=this._animationState.playTimes;if(0==r)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 n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),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,h=0,l=this._timelineData.frameList.length;h=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],r=this._timelineData.frameList[e],n=!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,n=!1):i.displayIndex<0||r.displayIndex<0?(this._tweenEasing=NaN,n=!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?n=!1:(10==this._tweenEasing&&(this._tweenEasing=0),n=!0)):n=!0):(this._tweenEasing=i.tweenEasing,this._tweenCurve=i.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?n=!0:(this._tweenEasing=NaN,n=!1)),n?i.color&&r.color?(this._durationColor.alphaOffset=r.color.alphaOffset-i.color.alphaOffset,this._durationColor.redOffset=r.color.redOffset-i.color.redOffset,this._durationColor.greenOffset=r.color.greenOffset-i.color.greenOffset,this._durationColor.blueOffset=r.color.blueOffset-i.color.blueOffset,this._durationColor.alphaMultiplier=r.color.alphaMultiplier-i.color.alphaMultiplier,this._durationColor.redMultiplier=r.color.redMultiplier-i.color.redMultiplier,this._durationColor.greenMultiplier=r.color.greenMultiplier-i.color.greenMultiplier,this._durationColor.blueMultiplier=r.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):r.color?(this._tweenColor=!0,this._durationColor.alphaOffset=r.color.alphaOffset,this._durationColor.redOffset=r.color.redOffset,this._durationColor.greenOffset=r.color.greenOffset,this._durationColor.blueOffset=r.color.blueOffset,this._durationColor.alphaMultiplier=r.color.alphaMultiplier-1,this._durationColor.redMultiplier=r.color.redMultiplier-1,this._durationColor.greenMultiplier=r.color.greenMultiplier-1,this._durationColor.blueMultiplier=r.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,r=this._animationState.playTimes;if(0==r)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 n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),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,h=0,l=this._timelineData.frameList.length;h=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 r=this._timelineData.frameList[this._currentFrameIndex],n=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):r.displayIndex<0||n.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=n.transform.x-r.transform.x,this._durationTransform.y=n.transform.y-r.transform.y,this._durationTransform.skewX=n.transform.skewX-r.transform.skewX,this._durationTransform.skewY=n.transform.skewY-r.transform.skewY,this._durationTransform.scaleX=n.transform.scaleX-r.transform.scaleX+n.scaleOffset.x,this._durationTransform.scaleY=n.transform.scaleY-r.transform.scaleY+n.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=n.pivot.x-r.pivot.x,this._durationPivot.y=n.pivot.y-r.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=r.tweenScale):(this._tweenTransform=!1,this._tweenScale=!1)):(this._tweenTransform=!1,this._tweenScale=!1),this._tweenTransform?this._tweenScale||(this._animationState.additiveBlending?(this._transform.scaleX=r.transform.scaleX,this._transform.scaleY=r.transform.scaleY):(this._transform.scaleX=this._originTransform.scaleX*r.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*r.transform.scaleY)):(this._animationState.additiveBlending?(this._transform.x=r.transform.x,this._transform.y=r.transform.y,this._transform.skewX=r.transform.skewX,this._transform.skewY=r.transform.skewY,this._transform.scaleX=r.transform.scaleX,this._transform.scaleY=r.transform.scaleY,this._pivot.x=r.pivot.x,this._pivot.y=r.pivot.y):(this._transform.x=this._originTransform.x+r.transform.x,this._transform.y=this._originTransform.y+r.transform.y,this._transform.skewX=this._originTransform.skewX+r.transform.skewX,this._transform.skewY=this._originTransform.skewY+r.transform.skewY,this._transform.scaleX=this._originTransform.scaleX*r.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*r.transform.scaleY,this._pivot.x=this._originPivot.x+r.pivot.x,this._pivot.y=this._originPivot.y+r.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 r=e.transform,n=e.pivot;this._animationState.additiveBlending?(this._transform.x=r.x+this._durationTransform.x*i,this._transform.y=r.y+this._durationTransform.y*i,this._transform.skewX=r.skewX+this._durationTransform.skewX*i,this._transform.skewY=r.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=r.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=r.scaleY+this._durationTransform.scaleY*i),this._pivot.x=n.x+this._durationPivot.x*i,this._pivot.y=n.y+this._durationPivot.y*i):(this._transform.x=this._originTransform.x+r.x+this._durationTransform.x*i,this._transform.y=this._originTransform.y+r.y+this._durationTransform.y*i,this._transform.skewX=this._originTransform.skewX+r.skewX+this._durationTransform.skewX*i,this._transform.skewY=this._originTransform.skewY+r.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=this._originTransform.scaleX*r.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=this._originTransform.scaleY*r.scaleY+this._durationTransform.scaleY*i),this._pivot.x=this._originPivot.x+n.x+this._durationPivot.x*i,this._pivot.y=this._originPivot.y+n.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,r=0;r0){for(var r=0,a=this._eventList.length;r=0&&this._boneList.splice(e,1)},n._addSlotToSlotList=function(t){this._slotList.indexOf(t)<0&&(this._slotList[this._slotList.length]=t)},n._removeSlotFromSlotList=function(t){var e=this._slotList.indexOf(t);e>=0&&this._slotList.splice(e,1)},n.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},n._updateAnimationAfterBoneListChanged=function(t){void 0===t&&(t=!0),t&&this.sortBoneList(),this._animation._updateAnimationStates()},n.sortBoneList=function(){var e=this._boneList.length;if(0!=e){for(var i=[];e--;){for(var r=0,n=this._boneList[e],s=n;s;)r++,s=s.parent;i[e]=[r,n]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this._boneList[e]=i[e][1];i.length=0}},n._arriveAtFrame=function(e,r,n,s){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var a=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);a.animationState=n,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=n,o.sound=e.sound,i._soundManager.dispatchEvent(o)}e.action&&n.displayControl&&this.animation.gotoAndPlay(e.action)},n.sortSlot=function(t,e){return t.zOrder0||this._parent&&this._parent._needUpdate>0){this._needUpdate=1,this.blendingTimeline();var i=this._updateGlobal(),r=i?i.parentGlobalTransform:null,n=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),n&&(this._globalTransformMatrixForChild.concat(n),t.TransformUtil.matrixToTransform(this._globalTransformMatrixForChild,this._globalTransformForChild,this._globalTransformForChild.scaleX*r.scaleX>=0,this._globalTransformForChild.scaleY*r.scaleY>=0))):(this._globalTransformForChild=this._global,this._globalTransformMatrixForChild=this._globalTransformMatrix)}},n._updateColor=function(t,e,i,r,n,s,a,o,h){for(var l=this._slotList.length,u=0;u=0&&this._timelineStateList.splice(e,1)},n._removeAllStates=function(){this._timelineStateList.length=0},n.blendingTimeline=function(){var t,e,i,r,n=this._timelineStateList.length;if(1==n)r=(t=this._timelineStateList[0])._animationState.weight*t._animationState.fadeWeight,t._weight=r,e=t._transform,i=t._pivot,this._tween.x=e.x*r,this._tween.y=e.y*r,this._tween.skewX=e.skewX*r,this._tween.skewY=e.skewY*r,this._tween.scaleX=1+(e.scaleX-1)*r,this._tween.scaleY=1+(e.scaleY-1)*r,this._tweenPivot.x=i.x*r,this._tweenPivot.y=i.y*r;else if(n>1){for(var s=0,a=0,o=0,h=0,l=1,u=1,c=0,d=0,p=1,f=0,_=this._timelineStateList[n-1]._animationState.layer,m=0;n--;){if(t=this._timelineStateList[n],m=t._animationState.layer,_!=m){if(f>=p){t._weight=0;break}p-=f}_=m,r=t._animationState.weight*t._animationState.fadeWeight*p,t._weight=r,r&&(e=t._transform,i=t._pivot,s+=e.x*r,a+=e.y*r,o+=e.skewX*r,h+=e.skewY*r,l+=(e.scaleX-1)*r,u+=(e.scaleY-1)*r,c+=i.x*r,d+=i.y*r,f+=r)}this._tween.x=s,this._tween.y=a,this._tween.skewX=o,this._tween.skewY=h,this._tween.scaleX=l,this._tween.scaleY=u,this._tweenPivot.x=c,this._tweenPivot.y=d}},n.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 r=__define,n=i.prototype;return n.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},n.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayList.length=0,this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},n.sortState=function(t,e){return t._animationState.layer=0&&this._timelineStateList.splice(e,1)},n.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())},n._update=function(){this._parent._needUpdate<=0&&!this._needUpdate||(this._updateGlobal(),this._updateTransform(),this._needUpdate=!1)},n._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},n.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))},n._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(n.zOrder)||n.zOrder==this._tweenZOrder||(this._tweenZOrder=n.zOrder,this._armature._slotsZOrderChanged=!0)),t.action&&this.childArmature&&this.childArmature.animation.gotoAndPlay(t.action)}},n._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},n._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,r){var n=new e;n.name=i.name;for(var s,a,o,h,l=i.timelineList,u=0,c=l.length;u=o&&n.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,r){void 0===i&&(i=!1),void 0===r&&(r=!1),t.call(this,e,i,r)}__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,r=e.prototype;return i(e,"MOVEMENT_CHANGE",function(){return e.FADE_IN}),i(r,"movementID",function(){return this.animationName}),i(r,"armature",function(){return this.target}),i(r,"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,r=e.prototype;return i(e,"MOVEMENT_FRAME_EVENT",function(){return e.ANIMATION_FRAME_EVENT}),i(r,"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 r(t){if(e.call(this),this.dragonBonesDataDic={},this.textureAtlasDic={},t!=this)throw new Error(egret.getString(4001))}__extends(r,e);__define;var n=r.prototype;return n.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 r=this.textureAtlasDic[i];if(r)for(var n=0,s=r.length;n0;)this.dispatchEvent(this._eventList.shift());this._lockDispose=!1,this._delayDispose&&this.dispose()},n.enableAnimationCache=function(e,i,r){void 0===i&&(i=null),void 0===r&&(r=!0);var n=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},n.sortBoneList=function(){var e=this.boneList.length;if(0!=e){for(var i=[];e--;){for(var r=0,n=this.boneList[e],s=n;s;)r++,s=s.parent;i[e]=[r,n]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this.boneList[e]=i[e][1];i.length=0}},n.arriveAtFrame=function(e,i){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var r=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);r.animationState=i,r.frameLabel=e.event,this._addEvent(r)}e.action&&this.animation.gotoAndPlay(e.action)},n.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()},n.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())},n._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 r=__define,n=i.prototype;return n.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},n.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},n.updateByCache=function(){e.prototype.updateByCache.call(this),this._updateTransform();var i=this._frameCache.colorTransform,r=null!=i;(this.colorChanged!=r||this.colorChanged&&r&&!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,r)),this._changeDisplayIndex(this._frameCache.displayIndex)},n._update=function(){this._parent._needUpdate<=0||(this._updateGlobal(),this._updateTransform())},n._calculateRelativeParentTransform=function(){this._global.copy(this._origin),this._global.x+=this._parent._tweenPivot.x,this._global.y+=this._parent._tweenPivot.y},n.initDisplayList=function(t){this._displayList=t},n.clearCurrentDisplay=function(){if(this.hasChildArmature){var t=this.childArmature;t&&t.resetAnimation()}var e=this._getDisplayIndex();return this._removeDisplayFromContainer(),e},n._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))}},n.changeSlotDisplay=function(t){var e=this.clearCurrentDisplay();this._displayList[this._currentDisplayIndex]=t,this.initCurrentDisplay(e)},n.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 r=i;this.armature&&this.armature.animation.animationState&&r.animation.hasAnimation(this.armature.animation.animationState.name)?r.animation.gotoAndPlay(this.armature.animation.animationState.name):r.animation.play()}},r(n,"visible",void 0,function(t){this._visible!=t&&(this._visible=t,this._updateDisplayVisible(this._visible))}),r(n,"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)}),r(n,"display",function(){return this._currentDisplay},function(t){this._currentDisplayIndex<0||this._displayList[this._currentDisplayIndex]!=t&&this.changeSlotDisplay(t)}),r(n,"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}),r(n,"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))}),r(n,"blendMode",function(){return this._blendMode},function(t){this._blendMode!=t&&(this._blendMode=t,this._updateDisplayBlendMode(this._blendMode))}),r(n,"colorTransform",function(){return this._colorTransform}),r(n,"displayIndex",function(){return this._currentDisplayIndex}),r(n,"colorChanged",function(){return this._isColorChanged}),n._updateDisplay=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},n._getDisplayIndex=function(){throw new Error("Abstract method needs to be implemented in subclass!")},n._addDisplayToContainer=function(t,e){throw void 0===e&&(e=-1),new Error("Abstract method needs to be implemented in subclass!")},n._removeDisplayFromContainer=function(){throw new Error("Abstract method needs to be implemented in subclass!")},n._updateTransform=function(){throw new Error("Abstract method needs to be implemented in subclass!")},n._updateDisplayVisible=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},n._updateDisplayColor=function(t,e,i,r,n,s,a,o,h){void 0===h&&(h=!1),this._colorTransform.alphaOffset=t,this._colorTransform.redOffset=e,this._colorTransform.greenOffset=i,this._colorTransform.blueOffset=r,this._colorTransform.alphaMultiplier=n,this._colorTransform.redMultiplier=s,this._colorTransform.greenMultiplier=a,this._colorTransform.blueMultiplier=o,this._isColorChanged=h},n._updateDisplayBlendMode=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},n._arriveAtFrame=function(t,e){var i=t,r=i.displayIndex;if(this._changeDisplayIndex(r),this._updateDisplayVisible(i.visible),r>=0&&(isNaN(i.zOrder)||i.zOrder==this._tweenZOrder||(this._tweenZOrder=i.zOrder,this.armature._slotsZOrderChanged=!0)),t.action){var n=this.childArmature;n&&n.getAnimation().gotoAndPlay(t.action)}},n.hideSlots=function(){this._changeDisplayIndex(-1),this._removeDisplayFromContainer(),this._frameCache&&this._frameCache.clear()},n._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},n._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,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),this.x=t,this.y=e,this.width=i,this.height=r}__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 r=i[t.ConstValues.A_VERSION];if((r=r.toString()).toString()!=t.DragonBones.DATA_VERSION&&r.toString()!=t.DragonBones.PARENT_COORDINATE_DATA_VERSION&&"2.3"!=r.toString())throw new Error("Nonsupport version!");var n=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,h=a.length;o0&&(c=Math.min(c,n.frameList[n.frameList.length-1].duration)),n.lastFrameDuration=c,n},e.parseSlotTimeline=function(i,r,n){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=r;for(var a=i[t.ConstValues.FRAME],o=0,h=a.length;o0&&f>0?((n=new t.Rectangle).x=e.getNumber(l,t.ConstValues.A_FRAME_X,0)/r,n.y=e.getNumber(l,t.ConstValues.A_FRAME_Y,0)/r,n.width=p,n.height=f):n=null,s[u]=new t.TextureData(c,n,d)}return s},e.parseDragonBonesData=function(i){if(!i)throw new Error;var r=i[t.ConstValues.A_VERSION];if((r=r.toString()).toString()==t.DragonBones.PARENT_COORDINATE_DATA_VERSION||"2.3"==r.toString())return t.Data3Parser.parseDragonBonesData(i);var n=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,h=a.length;o0&&(u=Math.min(u,p.frameList[p.frameList.length-1].duration)),n.addTimeline(p)}}var f=i[t.ConstValues.SLOT];if(f)for(a=0,o=f.length;a0&&(u=Math.min(u,m.frameList[m.frameList.length-1].duration),n.addSlotTimeline(m))}}return n.frameList.length>0&&(u=Math.min(u,n.frameList[n.frameList.length-1].duration)),n.lastFrameDuration=u,n},e.parseTransformTimeline=function(i,r,n){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=r;for(var a=i[t.ConstValues.FRAME],o=0,h=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)r=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 r=this._boneDataList[e],n=0,s=r;s;)n++,s=this.getBoneData(s.parent);i[e]=[n,r]}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 r.y*t/r.x;var n=this.sampling[i-1];return n.y+(r.y-n.y)*(t-n.x)/(r.x-n.x)}}return r.y+(1-r.y)*(t-r.x)/(1-r.x)},r.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,r=i.length;r--;){var n=i[r];if(n.parent){var s=e.getBoneData(n.parent);s&&(n.transform.copy(n.global),t.TransformUtil.globalToLocal(n.transform,s.global))}}},e.transformArmatureDataAnimations=function(t){for(var i=t.animationDataList,r=i.length;r--;)e.transformAnimationData(i[r],t,!1)},e.transformRelativeAnimationData=function(t,e){},e.transformAnimationData=function(i,r,n){if(n){var s,a=r.getSkinData(null),o=r.boneDataList;a&&(s=a.slotDataList);for(var h=0;h0?(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(p=0;p=0,p.scaleY*u.scaleY>=0)):(u=new t.DBTransform).copy(p),t.TransformUtil.transformToMatrix(u,d,!0);t.TransformUtil.globalToLocal(s.transform,u)}}},e.getTimelineTransform=function(e,i,r,n){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)r.copy(n?o.global:o.transform);else{var h=o.tweenEasing,l=(i-o.position)/o.duration;h&&10!=h&&(l=t.MathUtil.getEaseValue(l,h));var u=s[a+1],c=n?o.global:o.transform,d=n?u.global:u.transform;r.x=c.x+(d.x-c.x)*l,r.y=c.y+(d.y-c.y)*l,r.skewX=t.TransformUtil.formatRadian(c.skewX+(d.skewX-c.skewX)*l),r.skewY=t.TransformUtil.formatRadian(c.skewY+(d.skewY-c.skewY)*l),r.scaleX=c.scaleX+(d.scaleX-c.scaleX)*l,r.scaleY=c.scaleY+(d.scaleY-c.scaleY)*l}break}}},e.addHideTimeline=function(t,e,i){void 0===i&&(i=!1);for(var r=e.boneDataList,n=e.slotDataList,s=r.length;s--;){var a=r[s].name;t.getTimeline(a)||t.hideTimelineNameMap.indexOf(a)<0&&t.hideTimelineNameMap.push(a)}if(i){s=n.length;for(var o;s--;)o=n[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 r=1;return i>1?(r=.5*(1-t.cos(e*Math.PI)),i-=1):i>0?r=1-Math.pow(1-e,2):i<0&&(i*=-1,r=Math.pow(e,2)),(r-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),r=i+1,n=t.sinInt(i);return(e-i)*t.sinInt(r)+(r-e)*n},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,r){void 0===r&&(r=!1),r?(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,r){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)*(r?1:-1);var n=[];n[0]=Math.acos(t.d/e.scaleY),n[1]=-n[0],n[2]=Math.asin(-t.c/e.scaleY),n[3]=n[2]>=0?Math.PI-n[2]:n[2]-Math.PI,Number(n[0]).toFixed(4)==Number(n[2]).toFixed(4)||Number(n[0]).toFixed(4)==Number(n[3]).toFixed(4)?e.skewX=n[0]:e.skewX=n[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,r=e.prototype;return r.dispose=function(){this._armature&&(this._armature=null,this._animationDataList=null,this.animationList=null,this.animationState=null)},r.gotoAndPlay=function(t,e,i,r){if(void 0===e&&(e=-1),void 0===i&&(i=-1),void 0===r&&(r=NaN),!this._animationDataList)return null;var n=this._animationDataObj[t];if(!n)return null;this._isPlaying=!0,e=e<0?n.fadeTime<0?.3:n.fadeTime:e;var s;s=i<0?n.scale<0?1:n.scale:1e3*i/n.duration,r=isNaN(r)?n.playTimes:r,this.animationState._fadeIn(n,r,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},r.gotoAndStop=function(t,e,i,r,n){return void 0===i&&(i=-1),void 0===r&&(r=0),void 0===n&&(n=-1),this.animationState.name!=t&&this.gotoAndPlay(t,r,n),i>=0?this.animationState.setCurrentTime(this.animationState.totalTime*i):this.animationState.setCurrentTime(e),this.animationState.stop(),this.animationState},r.play=function(){this._animationDataList&&(this.animationState.name?this._isPlaying?this.gotoAndPlay(this.animationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))},r.stop=function(){this._isPlaying=!1},r.advanceTime=function(t){this._isPlaying&&this.animationState._advanceTime(t*this._timeScale)},r.hasAnimation=function(t){return null!=this._animationDataObj[t]},i(r,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(r,"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()},r._updateTimelineStateList=function(){this._resetTimelineStateList();for(var e,i=this.animationData.timelineList.length,r=0;r0){var c=t.FastSlotTimelineState.borrowObject();c.fadeIn(u,this,l),this._slotTimelineStateList.push(c)}}},r._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&&(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 h;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&((h=new t.AnimationEvent(t.AnimationEvent.START)).animationState=this,this._armature._addEvent(h)),n?this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&((h=new t.AnimationEvent(t.AnimationEvent.COMPLETE)).animationState=this,this._armature._addEvent(h)):r&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&((h=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE)).animationState=this,this._armature._addEvent(h))},r.updateTransformTimeline=function(t){var e,i,r=this._boneTimelineStateList.length;if(this._isComplete){for(;r--;)(e=this._boneTimelineStateList[r]).update(t),this._isComplete=e._isComplete&&this._isComplete;for(r=this._slotTimelineStateList.length;r--;)(i=this._slotTimelineStateList[r]).update(t),this._isComplete=i._isComplete&&this._isComplete}else{for(;r--;)(e=this._boneTimelineStateList[r]).update(t);for(r=this._slotTimelineStateList.length;r--;)(i=this._slotTimelineStateList[r]).update(t)}},r.updateMainTimeline=function(t){var e=this.animationData.frameList;if(e.length>0){for(var i,r,n=0,s=this.animationData.frameList.length;n=this._currentFramePosition+this._currentFrameDuration||this._currentTime=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}r=e[this._currentFrameIndex],i&&this._armature.arriveAtFrame(i,this),this._currentFrameDuration=r.duration,this._currentFramePosition=r.position,i=r}r&&this._armature.arriveAtFrame(r,this)}},r.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},r.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(r,"playTimes",function(){return this._playTimes}),i(r,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(r,"isComplete",function(){return this._isComplete}),i(r,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(r,"totalTime",function(){return.001*this._totalTime}),i(r,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),r.isUseCache=function(){return this._armature.enableCache&&this.animationCache&&!this._fading},r.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 n=this._timelineData.frameList[0];this._durationTransform.copy(n.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,r=this._animationState.playTimes;if(0==r)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 n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),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,h=0,l=this._timelineData.frameList.length;h=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 r=this._timelineData.frameList[this._currentFrameIndex],n=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=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=n.transform.x-r.transform.x,this._durationTransform.y=n.transform.y-r.transform.y,this._durationTransform.skewX=n.transform.skewX-r.transform.skewX,this._durationTransform.skewY=n.transform.skewY-r.transform.skewY,this._durationTransform.scaleX=n.transform.scaleX-r.transform.scaleX+n.scaleOffset.x,this._durationTransform.scaleY=n.transform.scaleY-r.transform.scaleY+n.scaleOffset.y,this._durationPivot.x=n.pivot.x-r.pivot.x,this._durationPivot.y=n.pivot.y-r.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(r.transform),this._pivot.x=this._originPivot.x+r.pivot.x,this._pivot.y=this._originPivot.y+r.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],r=i.transform,n=i.pivot;this._transform.x=r.x+this._durationTransform.x*e,this._transform.y=r.y+this._durationTransform.y*e,this._transform.skewX=r.skewX+this._durationTransform.skewX*e,this._transform.skewY=r.skewY+this._durationTransform.skewY*e,this._transform.scaleX=r.scaleX+this._durationTransform.scaleX*e,this._transform.scaleY=r.scaleY+this._durationTransform.scaleY*e,this._pivot.x=n.x+this._durationPivot.x*e,this._pivot.y=n.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,r=this._animationState.playTimes;if(0==r)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 n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),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,h=0,l=this._timelineData.frameList.length;h=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 r=this._timelineData.frameList[this._currentFrameIndex],n=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):r.displayIndex<0||n.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.animationData.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s&&(r.color||n.color)?(t.ColorTransformUtil.minus(n.color||t.ColorTransformUtil.originalColor,r.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;r.color?(a=r.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,r;e.color?(i=e.color,r=!0):(i=t.ColorTransformUtil.originalColor,r=!1),(this._slot._isColorChanged||r)&&(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,r))}},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,r=function(){t.call(this,this)};__extends(r,t,{_generateArmature:function(){return new e(new PIXI.Container)},_generateSlot:function(){return new i},_generateDisplay:function(t,e,i,r){var n=t.getTexture(e),s=n.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(r)){var h=t.getFrame(e);null!=h?(i=h.width/2,r=h.height/2):(i=n.region.width/2,r=n.region.height/2)}return o.pivot.x=i,o.pivot.y=r,o}}),dragonBones.PixiFactory=r}(dragonBones.BaseFactory);var EHDI=EHDI||Object.create(null);EHDI.onWindowLoad=function(){EHDI.GAME=Object.create(null),EHDI.GAME.id=GAMEID,EHDI.GAME.language="en",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),console.log("Is WebGL Supported = "+PIXI.utils.isWebGLSupported());var t=function(){var t,e,i,r,n=EHDI.sbGame.getVendorGameElement(),s=n.offsetWidth/EHDI.GAME.sceneManager.defaultWidth,a=n.offsetHeight/EHDI.GAME.sceneManager.defaultHeight,o=Math.min(s,a);if(t=Math.ceil(EHDI.GAME.sceneManager.defaultWidth*o),e=Math.ceil(EHDI.GAME.sceneManager.defaultHeight*o),i=EHDI.GAME.sceneManager.getStage(),i.scale.x=i.scale.y=o,EHDI.GAME.sceneManager.getRenderer().resize(t,e),r=EHDI.GAME.sceneManager.getRenderer().view,r.style.paddingLeft=0,r.style.paddingRight=0,r.style.paddingTop=0,r.style.paddingBottom=0,r.style.display="block",r.style.position="absolute",r.style.top=0,r.style.left=0,r.style.right=0,r.style.bottom=0,t10&&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,console.log("start"),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<=0&&(this.shakeTimeline&&this.shakeTimeline.kill(),EHDI.GAME.updateManager.removeFrameListener(this.timerUpdate),EHDI.GAME.gameScene.endGame()))},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=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.Animation=function(){},EHDI.game.Animation.prototype.init=function(t,e){this._animationPath=t,this._skeletonData,this._factory,this._armature,this._animationFactory=EHDI.GetAnimationFactory(),this._animationFactory.addAnimation(t),null==this._skeletonData&&(this._skeletonData=EHDI.Assets.fetch(t+"_ske")),null==this._factory&&(this._factory=this._animationFactory.getFactory()),null==this._armature&&(this._armature=void 0==e?this._factory.buildArmature(this._skeletonData.armature[0].name):this._factory.buildArmature(e),dragonBones.WorldClock.clock.add(this._armature))},EHDI.game.Animation.prototype.rebuildArmature=function(t){dragonBones.WorldClock.clock.remove(this._armature),this._armature.dispose(),this._armature=null,this._armature=this._factory.buildArmature(t),dragonBones.WorldClock.clock.add(this._armature)},EHDI.game.Animation.prototype.getArmature=function(){return this._armature},EHDI.game.Animation.prototype.changeAnimation=function(t){this._armature.animation.movementID!=this._animationPath+"_"+t&&this._armature.animation.gotoAndPlay(this._animationPath+"_"+t)},EHDI.game.Animation.prototype.changeAnimation2=function(t){this._armature.animation.gotoAndPlay(t)},EHDI.game.Animation.prototype.play=function(){this._armature.animation.play()},EHDI.game.Animation.prototype.stop=function(){this._armature.animation.stop()},EHDI.game.Animation.prototype.getDisplay=function(){return this._armature.getDisplay()},EHDI.game.Animation.prototype.reset=function(){null!=this._skeletonData&&(this._skeletonData=null),null!=this._factory&&(this._factory=null),null!=this._armature&&(null!=this._armature.getDisplay().parent&&this._armature.getDisplay().parent.removeChild(this._armature.getDisplay()),this._armature=null)},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.CharacterStateEnum={IDLE:0,FLY:1,FALL:2},EHDI.game.Character=function(){EHDI.aka.Container.call(this)},EHDI.game.Character.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Character.prototype.init=function(){this._characterStartingX=230,this._characterStartingY=200,this._baseSpeed=.2,this._currentSpeed,this._jumpVelY=-14,this._currentVelY,this._gravity=.8,this._animation,this._collided=!1,this.tl1,this.tl2,this._timer,this._currentState=EHDI.game.CharacterStateEnum.IDLE,this._hitbox,void 0==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(40,40,40,0,255),this.addChild(this._hitbox)),void 0==this._animation&&(this._animation=new EHDI.game.Animation,this._animation.init("dove_anim"),this.addChild(this._animation.getDisplay())),void 0==this._timer&&(this._timer=new EHDI.util.Time),this.x=this._characterStartingX,this.y=this._characterStartingY,this.rotation=0},EHDI.game.Character.prototype.stopAnimation=function(){this._animation.stop()},EHDI.game.Character.prototype.collided=function(){this._collided=!0,this._animation.changeAnimation2("dove_hit"),this._animation.play(),this.tl1=TweenLite.to(this,1,{x:this.x-100}),this.tl2=TweenLite.to(this,1,{y:this.y-20,ease:Back.easeOut,onComplete:this.collidedAnimationCompleted.bind(this)})},EHDI.game.Character.prototype.collidedAnimationCompleted=function(){this.emit("ANIMATION_COMPLETED")},EHDI.game.Character.prototype.reset=function(){null!=this.tl1&&(this.tl1.kill(),this.tl1=null),null!=this.tl2&&(this.tl2.kill(),this.tl2=null),null!=this.tl3&&(this.tl3.kill(),this.tl3=null)},EHDI.game.Character.prototype.isCollided=function(){return this._collided},EHDI.game.Character.prototype.getHitbox=function(){return this._hitbox},EHDI.game.Character.prototype.stateManager=function(t){this.currentState!=t&&(this._currentState=t)},EHDI.game.Character.prototype.start=function(){this._currentSpeed=this._baseSpeed,this._currentVelY=0,this.stateManager(EHDI.game.CharacterStateEnum.FALL),this._animation.changeAnimation("fly"),this._animation.play()},EHDI.game.Character.prototype.fly=function(){this._timer.getTimeInSeconds()>=1&&(EHDI.GAME.soundManager.playSFX("wing_flap"),this._timer.reset()),this._currentVelY=this._jumpVelY,this.stateManager(EHDI.game.CharacterStateEnum.FLY)},EHDI.game.Character.prototype.fall=function(){this.stateManager(EHDI.game.CharacterStateEnum.FALL)},EHDI.game.Character.prototype.getSpeed=function(){return this._currentSpeed},EHDI.game.Character.prototype.updateSpeed=function(t){null!=this.tl3&&(this.tl3.kill(),this.tl3=null);var e;e=1==t?this._baseSpeed:2==t?1.3*this._baseSpeed:3==t?1.8*this._baseSpeed:4==t?2.2*this._baseSpeed:5==t?2.6*this._baseSpeed:6==t?3*this._baseSpeed:0,this.tl3=TweenLite.to(this,.5,{_currentSpeed:e,ease:Sine.easeIn})},EHDI.game.Character.prototype.update=function(t){this._collided||(this.y<450?this._currentVelY+=this._gravity:this._currentVelY>0&&(this._currentVelY*=.6),this._currentState==EHDI.game.CharacterStateEnum.FLY&&this._currentVelY>0&&this.fall(),this._currentVelY>40&&(this._currentVelY=40),this.y<100&&this._currentVelY<0?this._currentVelY=0:this.y<140&&this._currentVelY<0?this._currentVelY=.2*this._currentVelY:this.y<160&&this._currentVelY<0&&(this._currentVelY=.5*this._currentVelY),this.y+=this._currentVelY,this._hitbox.update(this.x,this.y))},EHDI.game.Character.prototype.getCharacterState=function(){return this._currentState},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.Cloud=function(){EHDI.aka.Container.call(this)},EHDI.game.Cloud.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Cloud.prototype.init=function(t){this._cloudTexture,this._cloudSprite,this._cloudLightningTexture,this._cloudLightning,this._speed,this._lightningCount,this._lightningCountDelay,this._lightningCountAppearDelay,this._ligtningOn,null==this._cloudLightningTexture&&(this._cloudLightningTexture=EHDI.Assets.images["lightning"+(t+1)]),null==this._cloudTexture&&(this._cloudTexture=EHDI.Assets.images["flood_cloud"+(t+1)]),null==this._cloudLightning&&(this._cloudLightning=EHDI.GetGlobalPool().spritePool.get(),this._cloudLightning.texture=this._cloudLightningTexture,this._cloudLightning.x=.5*-this._cloudLightning.width,this._cloudLightning.y=.9*this._cloudTexture.height,this._cloudLightning.visible=!1,this.addChild(this._cloudLightning)),null==this._cloudSprite&&(this._cloudSprite=EHDI.GetGlobalPool().spritePool.get(),this._cloudSprite.texture=this._cloudTexture,this._cloudSprite.x=.5*-this._cloudSprite.width,this.addChild(this._cloudSprite)),this._speed=.01*Math.random()+.02,this._lightningCount=0,this._lightningCountAppearDelay=400,this.randomizeLighningCountDelay(),this._ligtningOn=!1},EHDI.game.Cloud.prototype.randomizeLighningCountDelay=function(){this._lightningCountDelay=1e3+3e3*Math.random()},EHDI.game.Cloud.prototype.update=function(t){this.x-=this._speed*t,this._lightningCount+=t,this._ligtningOn?this._lightningCount>=this._lightningCountAppearDelay&&(this._lightningCount=0,this._ligtningOn=!1,this._cloudLightning.visible=!1):this._lightningCount>=this._lightningCountDelay&&(this._lightningCount=0,this.randomizeLighningCountDelay(),this._ligtningOn=!0,this._cloudLightning.visible=!0,this._cloudLightning.x=150*Math.random()-75-.5*this._cloudLightning.width,Math.random()>=.5?this._cloudLightning.scale.x=1:this._cloudLightning.scale.x=-1),this.x<=-500&&(this.x=1500+this.x+500)},EHDI.game.Cloud.prototype.getSpeed=function(){return this._speed},(EHDI=EHDI||Object.create(null)).ColTypeEnum={COL1:0,COL2:1,COL3:2,COL4:3,COL5:4,COL6:5,COL7:6,COL8:7,COL9:8,COL10:9},EHDI.game=EHDI.game||Object.create(null),EHDI.game.Collectible=function(){EHDI.aka.Container.call(this),this.init()},EHDI.game.Collectible.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Collectible.prototype.init=function(){this._type,this._hitbox,this._animation,void 0==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(30,30,60,0,526344),this.addChild(this._hitbox))},EHDI.game.Collectible.prototype.getAnimationPath=function(){return this._type==EHDI.ColTypeEnum.COL1?"deer":this._colTypeEnum==EHDI.ColTypeEnum.COL2?"donkey":this._colTypeEnum==EHDI.ColTypeEnum.COL3?"gazelle":this._colTypeEnum==EHDI.ColTypeEnum.COL4?"goat":this._colTypeEnum==EHDI.ColTypeEnum.COL5?"goat2":this._colTypeEnum==EHDI.ColTypeEnum.COL6?"horse":this._colTypeEnum==EHDI.ColTypeEnum.COL7?"horse2":this._colTypeEnum==EHDI.ColTypeEnum.COL8?"lamb":this._colTypeEnum==EHDI.ColTypeEnum.COL9?"ram":"sheep"},EHDI.game.Collectible.prototype.reset=function(){null!=this._animation&&(EHDI.GetGlobalPool().animationPool.return(this._animation),this._animation=null)},EHDI.game.Collectible.prototype.setup=function(t,e,i){this._colTypeEnum=t,this._colX=e,this._colY=i,this.x=e,this.y=i,this._type=this.getAnimationPath(),this._hitbox.update(this.x,this.y),null==this._animation&&(this._animation=EHDI.GetGlobalPool().animationPool.get(),this._animation.init(this.getAnimationPath()),this._animation.changeAnimation("idle"),this.addChild(this._animation.getDisplay()))},EHDI.game.Collectible.prototype.getRightX=function(){return this.x+this._hitbox._right},EHDI.game.Collectible.prototype.getLeftX=function(){return this.x-this._hitbox._left},EHDI.game.Collectible.prototype.getHitbox=function(){return this._hitbox},EHDI.game.Collectible.prototype.getAnimation=function(){var t=this._animation;return this.removeChild(this._animation),this._animation=null,t},EHDI.game.Collectible.prototype.getType=function(){return this._type},EHDI.game.Collectible.prototype.update=function(t){this.x=t+this._colX,this._hitbox.update(this.x,this.y)},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.Effect=function(){},EHDI.game.Effect.prototype.init=function(t){this._animationPath=t,this._textureData,this._skeletonData,this._textureImage,this._factory,this._armature,this._completeCallback,this._completeCallbackEnabled,null==this._textureData&&(this._textureData=EHDI.Assets.fetch(t+"_tex")),null==this._skeletonData&&(this._skeletonData=EHDI.Assets.fetch(t+"_ske")),null==this._textureImage&&(this._textureImage=EHDI.Assets.images[t+"_tex"].baseTexture.source),null==this._factory&&(this._factory=new dragonBones.PixiFactory,this._factory.addTextureAtlas(new dragonBones.TextureAtlas(this._textureImage,this._textureData)),this._factory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(this._skeletonData))),null==this._armature&&(this._armature=this._factory.buildArmature(this._skeletonData.armature[0].name),dragonBones.WorldClock.clock.add(this._armature))},EHDI.game.Effect.prototype.getArmature=function(){return this._armature},EHDI.game.Effect.prototype.changeAnimation=function(t,e){void 0==e?this._armature.animation.gotoAndPlay(this._animationPath,-1,-1,!t):this._armature.animation.gotoAndPlay(e,-1,-1,!t)},EHDI.game.Effect.prototype.play=function(){this._armature.animation.play()},EHDI.game.Effect.prototype.stop=function(){this._armature.animation.stop()},EHDI.game.Effect.prototype.getDisplay=function(){return this._armature.getDisplay()},EHDI.game.Effect.prototype.updatePos=function(t,e){this._armature.getDisplay().x=t,this._armature.getDisplay().y=e},EHDI.game.Effect.prototype.addCompleteCallback=function(t){this._completeCallbackEnabled=!0,this._completeCallback=t,this._armature.addEventListener("complete",this._handler_onComplete.bind(this))},EHDI.game.Effect.prototype._handler_onComplete=function(t){null!=this._completeCallback&&this._completeCallback()},EHDI.game.Effect.prototype.reset=function(){null!=this._textureData&&(this.textureData=null),null!=this._skeletonData&&(this._skeletonData=null),null!=this._textureImage&&(this._textureImage=null),null!=this._factory&&(this._factory=null),this._completeCallbackEnabled&&(this._armature.removeEventListener("complete",this._handler_onComplete),this._completeCallbackEnabled=!1,this._completeCallback=null),null!=this._armature&&(null!=this._armature.getDisplay().parent&&this._armature.getDisplay().parent.removeChild(this._armature.getDisplay()),this._armature=null)},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.Hitbox=function(t,e,i,r,n){if(EHDI.aka.Container.call(this),"number"!=typeof t||"number"!=typeof e||"number"!=typeof i||"number"!=typeof r)throw new Error("Invalid Hitbox Parameter");this.init(t,e,i,r),this.addGraphics(n)},EHDI.game.Hitbox.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Hitbox.prototype.init=function(t,e,i,r){this._left=t,this._right=e,this._top=i,this._bottom=r,this._width=t+e,this._height=i+r,this._halfWidth=this._width/2,this._halfHeight=this._height/2,this._centerX=this._halfWidth-t,this._centerY=this._halfHeight-i,this._updatedCenterX=0,this._updatedCenterY=0,this._globalLeftX=0,this._globalRightX=0,this._globalTopY=0,this._globalBottomY=0},EHDI.game.Hitbox.prototype.addGraphics=function(t){this._graphics=new EHDI.aka.Graphics,this._graphics.beginFill(t),this._graphics.drawRect(-this._left,-this._top,this._left+this._right,this._top+this._bottom),this._graphics.endFill()},EHDI.game.Hitbox.prototype.update=function(t,e){this._updatedCenterX=t+this._centerX,this._updatedCenterY=e+this._centerY,this._globalLeftX=this._updatedCenterX-this._halfWidth,this._globalRightX=this._updatedCenterX+this._halfWidth,this._globalTopY=this._updatedCenterY-this._halfHeight,this._globalBottomY=this._updatedCenterY+this._halfHeight},EHDI.game.Hitbox.prototype.getGlobalLeftX=function(){return this._globalLeftX},EHDI.game.Hitbox.prototype.getGlobalRightX=function(){return this._globalRightX},EHDI.game.Hitbox.prototype.getGlobalTopY=function(){return this._globalTopY},EHDI.game.Hitbox.prototype.getGlobalBottomY=function(){return this._globalBottomY},EHDI.game.Hitbox.prototype.getWidth=function(){return this._width},EHDI.game.Hitbox.prototype.getHeight=function(){return this._height},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.ObstacleType={WOOD1:0,WOOD2:1,WOOD3:2},EHDI.game.Obstacle=function(){EHDI.aka.Container.call(this)},EHDI.game.Obstacle.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Obstacle.prototype.init=function(){this._obstacleTexture,this._obstacleSprite;var t=Math.random();this._type=t<.33?EHDI.game.ObstacleType.WOOD1:t<.66?EHDI.game.ObstacleType.WOOD2:EHDI.game.ObstacleType.WOOD3,this._hitbox,null==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(30,30,190,0,255),this.addChild(this._hitbox)),this._obstacleTexture=EHDI.Assets.images[this.getObstacleTexturePath()],null==this._obstacleSprite&&(this._obstacleSprite=new EHDI.aka.Sprite,this._obstacleSprite.anchor.x=.5,this._obstacleSprite.anchor.y=1,this.addChild(this._obstacleSprite)),this._obstacleSprite.texture=this._obstacleTexture},EHDI.game.Obstacle.prototype.getHitbox=function(){return this._hitbox},EHDI.game.Obstacle.prototype.start=function(){this.x=1200,this.y=600},EHDI.game.Obstacle.prototype.getObstacleTexturePath=function(){return this._type==EHDI.game.ObstacleType.WOOD1?"obstacle":this._type==EHDI.game.ObstacleType.WOOD2?"obstacle_tree01":"obstacle_tree02"},EHDI.game.Obstacle.prototype.update=function(t,e){this.x-=e*t,this._hitbox.update(this.x,this.y)},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.PTypeEnum={PA3:100,PA5:101,PA7:102,PB4:200,PB6:201,PC4:300,PC5:301,PD4:400,PD6:401,PE1:500},EHDI.game.Platform=function(){EHDI.aka.Container.call(this)},EHDI.game.Platform.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Platform.prototype.init=function(t,e,i){this._type=t,this.x=e,this.y=i,this.hWidth=this.getPlatformWidth(),this._assetRight=0,this._assetLeft=0,this._arcEntranceWidth=380,this._platformXPos,this._platformWidth,this._texture,this._sprite,this._hitbox,this.initHitboxVal(),this.initSprite(),void 0==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(0,this.hWidth,this.hHeight,0,this._hColor),this._hitbox.alpha=.4,this.addChild(this._hitbox)),this._platformWidth=this._hitbox.getWidth()+this._assetRight+this._assetLeft,this._platformXPos=this.x-this._assetLeft},EHDI.game.Platform.prototype.initHitboxVal=function(){this._type<200?(this.hHeight=100,this._hColor=8323072):this._type<300?(this.hHeight=200,this._hColor=9862400):this._type<400?(this.hHeight=300,this._hColor=6304):this._type<500?(this.hHeight=400,this._hColor=32526):(this.hHeight=0,this._hColor=32526)},EHDI.game.Platform.prototype.initSprite=function(){void 0==this._sprite&&(this._sprite=EHDI.GetGlobalPool().spritePool.get()),this._type==EHDI.PTypeEnum.PA3?(this._texture=EHDI.Assets.images.platform1,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height,this._sprite.pivot.x=81,this._assetLeft=this._sprite.pivot.x,this._assetRight=104):this._type==EHDI.PTypeEnum.PA5?(this._texture=EHDI.Assets.images.platform2,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height,this._sprite.pivot.x=75,this._assetLeft=this._sprite.pivot.x,this._assetRight=100):this._type==EHDI.PTypeEnum.PA7?(this._texture=EHDI.Assets.images.platform3,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height,this._sprite.pivot.x=23,this._assetLeft=this._sprite.pivot.x,this._assetRight=13):this._type==EHDI.PTypeEnum.PB4?(this._texture=EHDI.Assets.images.house1,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PB6?(this._texture=EHDI.Assets.images.house4,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PC4?(this._texture=EHDI.Assets.images.house2,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PC5?(this._texture=EHDI.Assets.images.house5,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PD4?(this._texture=EHDI.Assets.images.house3,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PD6?(this._texture=EHDI.Assets.images.house6,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height):this._type==EHDI.PTypeEnum.PE1&&(this._texture=EHDI.Assets.images.ark,this._sprite.texture=this._texture,this._sprite.pivot.y=this._texture.height,this._assetRight=100),this.addChild(this._sprite)},EHDI.game.Platform.prototype.getPlatformWidth=function(){return this._type==EHDI.PTypeEnum.PA3?300:this._type==EHDI.PTypeEnum.PA5||this._type==EHDI.PTypeEnum.PC5?500:this._type==EHDI.PTypeEnum.PA7?700:this._type==EHDI.PTypeEnum.PB4||this._type==EHDI.PTypeEnum.PC4||this._type==EHDI.PTypeEnum.PD4?400:this._type==EHDI.PTypeEnum.PB6||this._type==EHDI.PTypeEnum.PD6?600:0},EHDI.game.Platform.prototype.getPlatformXPos=function(){return this._platformXPos},EHDI.game.Platform.prototype.getHeight=function(){return this._hitbox.getHeight()},EHDI.game.Platform.prototype.getWidth=function(){return this._platformWidth},EHDI.game.Platform.prototype.getTopYPos=function(){return this.y-this._hitbox._top},EHDI.game.Platform.prototype.getHitbox=function(){return this._hitbox},EHDI.game.Platform.prototype.getplatformY=function(t){return this._hitbox.getGlobalTopY()},EHDI.game.Platform.prototype.getType=function(){return this._type},EHDI.game.Platform.prototype.update=function(t){this._hitbox.update(this.x+t,this.y)},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.Raven=function(){EHDI.aka.Container.call(this)},EHDI.game.Raven.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Raven.prototype.init=function(t){this._animation,this._baseSpeed=.1,this._currentSpeed,this._collided=!1,this.tl1,this.tl2,this._sfxName,this.sfxPlayed=!1,this.initAnimationPath(t),this._hitbox,void 0==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(30,30,30,0,255),this.addChild(this._hitbox)),void 0==this._animation&&(this._animation=new EHDI.game.Animation,this._animation.init("birds_anim"),EHDI.GetAnimationFactory().addAnimation("obs_branchandcloth")),this.removeChild(this._animation.getDisplay()),this._animation.rebuildArmature(this._animationPath+"armature"),this.addChild(this._animation.getDisplay())},EHDI.game.Raven.prototype.initAnimationPath=function(t){0==t?(this._sfxName="spawn_crow",this._animationPath="raven_"):1==t?(this._sfxName="obstacle_hit",this._animationPath="branch_"):(this._sfxName="obstacle_hit",this._animationPath="cloth_")},EHDI.game.Raven.prototype.getHitbox=function(){return this._hitbox},EHDI.game.Raven.prototype.collided=function(){this._collided=!0,"raven_"==this._animationPath&&(this._animation.changeAnimation2(this._animationPath+"hit"),this._animation.play()),EHDI.GAME.soundManager.playSFX("obstacle_hit"),"raven_"==this._animationPath?(this.tl1=TweenLite.to(this,1,{x:this.x+100}),this.tl2=TweenLite.to(this,1,{y:this.y-20,ease:Back.easeOut})):(this.tl1=TweenLite.to(this,1,{x:this.x+200}),this.tl2=TweenLite.to(this,1,{y:this.y+200,ease:Back.easeIn}))},EHDI.game.Raven.prototype.reset=function(){null!=this.tl1&&(this.tl1.kill(),this.tl1=null),null!=this.tl2&&(this.tl2.kill(),this.tl2=null)},EHDI.game.Raven.prototype.start=function(t){this._currentSpeed=this._baseSpeed;for(var e=[],i=1;i<=3;i++)i!=t&&e.push(i);var r=Math.floor(Math.random()*e.length);return this.x=1200,this.y=this.getYPos(e[r]),"raven_"==this._animationPath&&(this._animation.changeAnimation2(this._animationPath+"fly"),this._animation.changeAnimation2(this._animationPath)),this._animation.play(),e[r]},EHDI.game.Raven.prototype.getYPos=function(t){return 1==t?120:2==t?250:380},EHDI.game.Raven.prototype.stop=function(){null!=this.parent&&this.parent.removeChild(this.parent),this._animation.stop()},EHDI.game.Raven.prototype.stopAnimation=function(){this._animation.stop()},EHDI.game.Raven.prototype.playSFX=function(){EHDI.GAME.soundManager.playSFX(this._sfxName)},EHDI.game.Raven.prototype.update=function(t,e){this._collided||(this.x-=(e+this._currentSpeed)*t,!this.sfxPlayed&&this.x<700&&(this.sfxPlayed=!0,"raven_"==this._animationPath&&this.playSFX()),this._hitbox.update(this.x,this.y))},(EHDI=EHDI||Object.create(null)).game=EHDI.game||Object.create(null),EHDI.game.TailStateEnum={IDLE:0,RUNNING:1,JUMP:2,FALL:3},EHDI.game.Tail=function(){EHDI.aka.Container.call(this)},EHDI.game.Tail.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.game.Tail.prototype.init=function(t,e,i,r){this._hitbox,this._type=r,this._headJumpStartXPos,this._headJumped,this._targetXPos,this._baseSpeed,this._currentSpeed,this._newX,this._prevY,this._newY,this._jumpVelY,this._currentVelY,this._gravity,this._currentState,this._currentPlatform,this._randomDistanceToTheTarget,this._animation,this._doRunAnimation,void 0==this._hitbox&&(this._hitbox=new EHDI.game.Hitbox(30,30,60,0,65280),this.addChild(this._hitbox)),null==this._animation&&(this._animation=i,this.addChild(this._animation.getDisplay())),this.stateManager(EHDI.game.TailStateEnum.IDLE),this._headJumped=!1,this._baseSpeed=.2,this._currentSpeed=this._baseSpeed,this._jumpVelY=t,this._gravity=e,this._randomDistanceToTheTarget=100*Math.random()+30},EHDI.game.Tail.prototype.getType=function(){return this._type},EHDI.game.Tail.prototype.reset=function(){null!=this._animation&&(EHDI.GetGlobalPool().animationPool.return(this._animation),this._animation=null)},EHDI.game.Tail.prototype.start=function(t,e){this.x=t,this.y=e,this.rotation=0,this._newX=t,this._newY=e,this._prevY=0,this._doRunAnimation=!1,this.fall()},EHDI.game.Tail.prototype.ladderRotate=function(){this.rotation=12},EHDI.game.Tail.prototype.stateManager=function(t){this._currentState!=t&&(this._currentState=t)},EHDI.game.Tail.prototype.setTargetXPos=function(t){this._targetXPos=t-this._randomDistanceToTheTarget},EHDI.game.Tail.prototype.headJumped=function(t){this._headJumpStartXPos=t,this._headJumped=!0},EHDI.game.Tail.prototype.update=function(t,e){this._currentState==EHDI.game.TailStateEnum.RUNNING?(this.updateHorMovement(t),this.updateJumpChecker(e)):this._currentState!=EHDI.game.TailStateEnum.JUMP&&this._currentState!=EHDI.game.TailStateEnum.FALL||this.updateVerMovement(t),this._hitbox.update(this._newX,this._newY)},EHDI.game.Tail.prototype.updatePos=function(){this.x=this._newX,this.y=this._newY},EHDI.game.Tail.prototype.collidedWithAPlatform=function(t){this._prevY=this._newY,this._newY=t,this._hitbox.update(this._newX,this._newY),this._doRunAnimation&&this._animation.changeAnimation("run"),this.stateManager(EHDI.game.TailStateEnum.RUNNING)},EHDI.game.Tail.prototype.jump=function(){this._animation.changeAnimation("jump"),this._headJumped=!1,this.stateManager(EHDI.game.TailStateEnum.JUMP),this._currentVelY=this._jumpVelY},EHDI.game.Tail.prototype.fall=function(t){t&&this._animation.changeAnimation("jump"),this.stateManager(EHDI.game.CharacterStateEnum.FALL),this._currentVelY=0},EHDI.game.Tail.prototype.updateJumpChecker=function(t){this._headJumped&&this.x+t>=this._headJumpStartXPos&&this.x==this._targetXPos&&(this._newX=this._headJumpStartXPos-t,this.jump())},EHDI.game.Tail.prototype.updateVerMovement=function(t){this._currentVelY+=this._gravity,this._currentState==EHDI.game.TailStateEnum.JUMP&&this._currentVelY>0&&this.fall(!0),this._prevY=this._newY,this._newY=this.y+this._currentVelY},EHDI.game.Tail.prototype.updateHorMovement=function(t){this.xthis._targetXPos&&(this._doRunAnimation=!0,this._animation.changeAnimation("run"),this._newX=this._targetXPos)):this.x>this._targetXPos&&(this._newX=this.x-this._currentSpeed*t,this._newX2&&(this.pageNumber=1);var t=new EHDI.aka.Sprite(EHDI.Assets.images["htp_match"+this.pageNumber]);t.anchor.set(.5,.5),t.position.set(0,.15*-this.bg.height),this.upcomingPage.addChild(t);var e=this.action+" the animal icons to select them. "+this.action+" again to deselect the icon.";2===this.pageNumber&&(e="Match as many pairs as you can before time runs out!");var i=new EHDI.aka.PixiText(e,{fontFamily:"proximanova-black",fill:16777215,fontSize:28,align:"center",wordWrap:!0,wordWrapWidth:.9*t.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.HTPPopUp.prototype.previousPage=function(){this.transitionTimeline&&this.transitionTimeline.kill(),this.upcomingPage&&this.endTransition(),EHDI.GAME.soundManager.playSFX("button_sfx"),this.upcomingPage=new EHDI.aka.Container,this.upcomingPage.alpha=0,--this.pageNumber<1&&(this.pageNumber=2);var t=new EHDI.aka.Sprite(EHDI.Assets.images["htp_match"+this.pageNumber]);t.anchor.set(.5,.5),t.position.set(0,.15*-this.bg.height),this.upcomingPage.addChild(t);var e=this.action+" the animal icons to select them. "+this.action+" again to deselect the icon.";2===this.pageNumber&&(e="Match as many pairs as you can before time runs out!");var i=new EHDI.aka.PixiText(e,{fontFamily:"proximanova-black",fill:16777215,fontSize:28,align:"center",wordWrap:!0,wordWrapWidth:.9*t.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.HTPPopUp.prototype.endTransition=function(){this.page.destroy({children:!0}),this.page=this.upcomingPage,this.upcomingPage=null,this.page.alpa=1},(EHDI=EHDI||Object.create(null)).popup=EHDI.popup||Object.create(null),EHDI.popup.PausePopUp=function(t){EHDI.aka.Container.call(this),this.pageNumber=1,this.fromPauseBtn=t,this.action=EHDI.BrowserInfo.isMobileDevice?"Tap":"Click",this.messages=[],this.messages.push(EHDI.GAME.jsonManager.getLocale("STR_HTP_0")),EHDI.BrowserInfo.isMobileDevice?this.messages.push(EHDI.GAME.jsonManager.getLocale("STR_HTP_M_1")):this.messages.push(EHDI.GAME.jsonManager.getLocale("STR_HTP_D_1")),this.messages.push(EHDI.GAME.jsonManager.getLocale("STR_HTP_2")),this.messages.push(EHDI.GAME.jsonManager.getLocale("STR_HTP_3")),this.filePaths=["htp_dove1","htp_dove2","htp_dove3","htp_dove4"],this.maxPages=this.filePaths.length},EHDI.popup.PausePopUp.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.popup.PausePopUp.prototype.popUpWillAppear=function(){this.overlay=EHDI.displays.FillRectangle(0,0,0,EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight(),0),this.overlay.anchor.set(.5,.5),this.addChild(this.overlay),this.position.x=.5*EHDI.GAME.sceneManager.getStageWidth(),this.bg=new EHDI.aka.Sprite(EHDI.Assets.images.gfx_pop),this.bg.anchor.set(.5,.5),this.addChild(this.bg)},EHDI.popup.PausePopUp.prototype.popUpDidAppear=function(){this.overlay.alpha=.5,this.overlay.interactive=!0;var t;t=this.fromPauseBtn?EHDI.GAME.jsonManager.getLocale("STR_PAUSED"):EHDI.GAME.jsonManager.getLocale("STR_HTP"),this.pausedTxt=new EHDI.displays.TextSprite(t),this.pausedTxt.anchor.set(.5,.5),this.pausedTxt.position.set(.2*-this.bg.width,.24*-this.bg.width),this.bg.addChild(this.pausedTxt),this.next=new EHDI.displays.Button(EHDI.Assets.images.btn_prevnext,EHDI.Assets.images.btn_prevnext2,null,null),this.bg.addChild(this.next),this.next.position.set(.45*this.bg.width,0),this.next.setOnClickFunction(this.nextPage.bind(this)),this.page=new EHDI.aka.Container,this.bg.addChild(this.page);var e=new EHDI.aka.Sprite(EHDI.Assets.images[this.filePaths[0]]);e.anchor.set(.5,.5),e.position.set(0,.15*-this.bg.height),this.page.addChild(e);var i=new EHDI.displays.TextSprite(this.messages[0]);i.style.wordWrap=!0,i.style.wordWrapWidth=.9*e.width,i.anchor.set(.5,0),i.position.set(0,.05*this.bg.height),this.page.addChild(i),this.previous=new EHDI.displays.Button(EHDI.Assets.images.btn_prevnext,EHDI.Assets.images.btn_prevnext2,null,null),this.bg.addChild(this.previous),this.previous.position.set(.45*-this.bg.width,0),this.previous.scale.x=-1,this.previous.setOnClickFunction(this.previousPage.bind(this)),this.return=new EHDI.displays.Button(EHDI.Assets.images.btn_return,EHDI.Assets.images.btn_return2,null,null),this.bg.addChild(this.return),this.return.position.set(0,.35*this.bg.height),this.return.setOnClickFunction(this.resumeGame),this.fromPauseBtn&&(this.exit=new EHDI.displays.Button(EHDI.Assets.images.btn_exit,EHDI.Assets.images.btn_exit2,null,null),this.bg.addChild(this.exit),this.exit.position.set(.3*-this.bg.width,.35*this.bg.height),this.exit.setOnClickFunction(this.exitGame.bind(this)),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(.3*this.bg.width,.35*this.bg.height),this.bg.addChild(this.sound))},EHDI.popup.PausePopUp.prototype.popUpWillDisappear=function(){this.overlay.alpha=0},EHDI.popup.PausePopUp.prototype.popUpDidDisappear=function(){EHDI.GAME.pauseButton.resumeGame()},EHDI.popup.PausePopUp.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.popup.PausePopUp.prototype.resumeGame=function(){EHDI.GAME.soundManager.playSFX("button_sfx"),EHDI.GAME.sceneManager.popPopUp({y:new EHDI.scene.TransitionParameter(.5*EHDI.GAME.sceneManager.getStageHeight(),-EHDI.GAME.sceneManager.getStageHeight()),duration:.25})},EHDI.popup.PausePopUp.prototype.exitGame=function(){EHDI.GAME.soundManager.playSFX("button_sfx"),EHDI.GAME.sceneManager.pushPopUp(new EHDI.popup.ConfirmationPopup(this.goToTitleScreen.bind(this),null),{y:new EHDI.scene.TransitionParameter(EHDI.GAME.sceneManager.getStageHeight(),0),duration:.25})},EHDI.popup.PausePopUp.prototype.goToTitleScreen=function(){EHDI.GAME.pauseButton.isEndGame=!0,EHDI.GAME.sceneManager.popPopUp(),EHDI.GAME.sceneManager.changeScene(new EHDI.scene.TitleScene,{alpha:new EHDI.scene.TransitionParameter(0,1),duration:.25},!0)},EHDI.popup.PausePopUp.prototype.nextPage=function(){this.movePage(1)},EHDI.popup.PausePopUp.prototype.previousPage=function(){this.movePage(-1)},EHDI.popup.PausePopUp.prototype.movePage=function(t){this.transitionTimeline&&this.transitionTimeline.kill(),this.upcomingPage&&this.endTransition(),EHDI.GAME.soundManager.playSFX("button_sfx"),this.upcomingPage=new EHDI.aka.Container,this.upcomingPage.alpha=0,this.pageNumber+=t,this.pageNumber<1?this.pageNumber=this.maxPages:this.pageNumber>this.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);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},(EHDI=EHDI||Object.create(null)).Scene=function(){EHDI.aka.Container.call(this)},EHDI.Scene.prototype=Object.create(EHDI.aka.Container.prototype),EHDI.Scene.prototype.screenWillAppear=function(){},EHDI.Scene.prototype.screenDidAppear=function(){},EHDI.Scene.prototype.screenWillDisappear=function(){},EHDI.Scene.prototype.screenDidDisappear=function(){},EHDI.Scene.prototype.init=function(){},EHDI.Scene.prototype.reset=function(){},EHDI.Scene.prototype.gameStart=function(){},EHDI.Scene.prototype.onScreenResize=function(){},(EHDI=EHDI||Object.create(null)).GameStateEnum={GAMEINITIALIZING:0,GAMESTARTED:1,GAMEPAUSED:2,GAMERESUMED:3,GAMEOVER:4,GAMEEND_ANIMATION:5},EHDI.scene=EHDI.scene||Object.create(null),EHDI.scene.GameScene=function(){EHDI.Scene.call(this)},EHDI.scene.GameScene.prototype=Object.create(EHDI.Scene.prototype),EHDI.scene.GameScene.prototype.screenWillAppear=function(){this.init()},EHDI.scene.GameScene.prototype.popUpWillAppear=function(){EHDI.GAME.soundManager.pauseBGM(),EHDI.GAME.soundManager.pauseAllSFX()},EHDI.scene.GameScene.prototype.popUpDidDisappear=function(){EHDI.GAME.soundManager.resumeBGM(),EHDI.GAME.soundManager.resumeAllSFX()},EHDI.scene.GameScene.prototype.screenDidAppear=function(){var t=EHDI.GAME.saveData;this.startGame(),t.isFirstTimePlay&&(this._handler_pauseGame(),t.isFirstTimePlay=!1,EHDI.sbGame.saveGameData(EHDI.GAME.saveData,"DEFAULT",function(){console.log("data saved.")}),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.init=function(){this.initProps(),this.initUtils(),this.initGraphics(),this.initListeners()},EHDI.scene.GameScene.prototype.initProps=function(){this._gameState,this._gameWidth=1024,this._gameHeight=600,this._deltaTotal=0,this._deltaLimit=25,this._deltaMultiplier=0,this._birdAnimationCount=Math.floor(3*Math.random()),this._prevRavenLevelPos=1,this._currentGameTime=0,this._gameLevel=1,this._gameScore=10,this._ravenBaseSpawnDelay=1e3,this._ravenCurrentSpawnDelay=this._ravenBaseSpawnDelay,this._obstacleBaseSpawnDelay=2e3,this._obstacleCurrentSpawnDelay=this._obstacleBaseSpawnDelay,this._ravenSpawnDelay,this._obstacleSpawnDelay,this._prevState,this._gameState=EHDI.GameStateEnum.GAMEINITIALIZING},EHDI.scene.GameScene.prototype.initUtils=function(){this._ravenSpawnTimer,this._obstacleSpawnTimer,this._scoreTimer,null==this._ravenSpawnTimer&&(this._ravenSpawnTimer=new EHDI.util.Time),null==this._obstacleSpawnTimer&&(this._obstacleSpawnTimer=new EHDI.util.Time),null==this._scoreTimer&&(this._scoreTimer=new EHDI.util.Time)},EHDI.scene.GameScene.prototype.destroyUtils=function(){null!=this._ravenSpawnTimer&&(this._ravenSpawnTimer.destroy(),this._ravenSpawnTimer=null),null!=this._obstacleSpawnTimer&&(this._obstacleSpawnTimer.destroy(),this._obstacleSpawnTimer=null),null!=this._scoreTimer&&(this._scoreTimer.destroy(),this._scoreTimer=null)},EHDI.scene.GameScene.prototype.initGraphics=function(){this._hudContainer,this._backgroundContainer,this._gameContainer,this._foregroundContainer,this._character,this._skyTexture,this._skySprite,this._cloudTexture,this._cloudSprite,this._floodEffect,this._activeRavens=[],this._ravensToRemove=[],this._activeObstacles=[],this._obstaclesToRemove=[],null==this._backgroundContainer&&(this._backgroundContainer=EHDI.GetGlobalPool().containerPool.get(),this.addChild(this._backgroundContainer)),null==this._skyTexture&&(this._skyTexture=EHDI.Assets.images.bg_sky),null==this._skySprite&&(this._skySprite=new EHDI.aka.Sprite(this._skyTexture),this._backgroundContainer.addChild(this._skySprite)),null==this._cloudTexture&&(this._cloudTexture=EHDI.Assets.images.bg_clouds),null==this._cloudSprite&&(this._cloudSprite=new EHDI.aka.TilingSprite(this._cloudTexture,this._gameWidth,this._cloudTexture.height-2),this._backgroundContainer.addChild(this._cloudSprite)),null==this._gameContainer&&(this._gameContainer=EHDI.GetGlobalPool().containerPool.get(),this.addChild(this._gameContainer)),null==this._character&&(this._character=EHDI.GetGlobalPool().charPool.get(),this._character.init(),this._characterAnimationCompletedWithBind=this._handler_characterAnimationCompleted.bind(this),this._character.on("ANIMATION_COMPLETED",this._characterAnimationCompletedWithBind),this._gameContainer.addChild(this._character)),null==this._foregroundContainer&&(this._foregroundContainer=EHDI.GetGlobalPool().containerPool.get(),this.addChild(this._foregroundContainer)),null==this._floodEffect&&(this._floodEffect=EHDI.GetGlobalPool().effectPool.get(),this._floodEffect.init("fx_flood"),this._floodEffect.updatePos(512,600),this._floodEffect.changeAnimation(),this._foregroundContainer.addChild(this._floodEffect.getDisplay())),null==this._hudContainer&&(this._hudContainer=EHDI.GetGlobalPool().containerPool.get(),this.addChild(this._hudContainer)),null==this._scoreContainer&&(this._scoreContainer=new EHDI.components.ScoreManager(this._hudContainer),this._scoreContainer.setXY(10,10)),null==this._hudPauseButton&&(this._hudPauseButton=new EHDI.components.pauseButton,this._hudContainer.addChild(this._hudPauseButton))},EHDI.scene.GameScene.prototype.destroyGraphics=function(){for(null!=this._hudPauseButton&&(this._hudContainer.removeChild(this._hudPauseButton),this._hudPauseButton=null),null!=this._scoreContainer&&(this._scoreContainer.dispose(),this._scoreContainer=null),null!=this._character&&(this._gameContainer.removeChild(this._character),this._character.removeListener("ANIMATION_COMPLETED",this._characterAnimationCompletedWithBind),EHDI.GetGlobalPool().charPool.return(this._character),this._character=null),this.removeRaven();this._activeRavens.length>0;){var t=this._activeRavens.pop();this._gameContainer.removeChild(t),t.stop(),EHDI.GetGlobalPool().ravenPool.return(t),t=null}for(this.removeObstacle();this._activeObstacles.length>0;){var e=this._activeObstacles.pop();this._gameContainer.removeChild(e),EHDI.GetGlobalPool().obstaclePool.return(e),e=null}},EHDI.scene.GameScene.prototype.initListeners=function(){null==this._ticker&&(this._ticker=new EHDI.aka.Ticker),null==this.updateWithBind&&(this.updateWithBind=this.update.bind(this)),this._ticker.add(this.updateWithBind),this._ticker.start(),EHDI.BrowserInfo.isMobileDevice?(this.interactive=!0,this.onTouchWithBind=this._handler_onTouch.bind(this),this.on("pointerdown",this.onTouchWithBind)):(this.onKeyWithBind=this._handler_onKeyDown.bind(this),window.addEventListener("keydown",this.onKeyWithBind)),this.onPauseWithBind=this._handler_pauseGame.bind(this),this.onResumeWithBind=this._handler_resumeGame.bind(this),this._hudPauseButton.on("PAUSE_GAME",this.onPauseWithBind),this._hudPauseButton.on("RESUME_GAME",this.onResumeWithBind)},EHDI.scene.GameScene.prototype.destroyListeners=function(){this._ticker.remove(this.updateWithBind),this._ticker.stop(),EHDI.BrowserInfo.isMobileDevice?(this.interactive=!1,this.off("pointerdown",this.onTouchWithBind)):window.removeEventListener("keydown",this.onKeyWithBind),this._hudPauseButton.removeListener("PAUSE_GAME",this.onPauseWithBind),this._hudPauseButton.removeListener("RESUME_GAME",this.onResumeWithBind)},EHDI.scene.GameScene.prototype.startGame=function(){this._character.start(),this._character.fly(),this._floodEffect.play(),this.spawnRaven(),this.spawnObstacle(),this.gameStateManager(EHDI.GameStateEnum.GAMESTARTED),this._scoreTimer.reset()},EHDI.scene.GameScene.prototype.gameStateManager=function(t){this._gameState!=t&&(t==EHDI.GameStateEnum.GAMEEND_ANIMATION&&this._hudPauseButton.endGame(),this._gameState=t)},EHDI.scene.GameScene.prototype.getStar=function(t){return t>=1500?3:t>=800?2:t>=500?1:0},EHDI.scene.GameScene.prototype.update=function(t){if(this._deltaTotal+=25*t,this._deltaTotal>=this._deltaLimit){this._deltaMultiplier=Math.floor(this._deltaTotal/this._deltaLimit);for(var e=0;e=3&&(this._birdAnimationCount=0),t.init(this._birdAnimationCount),this._prevRavenLevelPos=t.start(this._prevRavenLevelPos),this._activeRavens.push(t),this._gameContainer.addChild(t),this._ravenSpawnTimer.reset(),this.randomizeRavenSpawnTime()},EHDI.scene.GameScene.prototype.randomizeRavenSpawnTime=function(){this._ravenSpawnDelay=this._ravenCurrentSpawnDelay+Math.random()*this._ravenCurrentSpawnDelay},EHDI.scene.GameScene.prototype.gameUpdate=function(t){this._gameState!=EHDI.GameStateEnum.GAMEPAUSED&&(dragonBones.WorldClock.clock.advanceTime(.001*t),this._gameState==EHDI.GameStateEnum.GAMESTARTED?(this.updateBackground(t),this.updateRavens(t),this.updateObstacles(t),this._character.update(t),this.checkCharAndRavenCollision(),this.checkCharAndObstacleCollision(),1==this._ravenSpawnTimer.getPercentageOfCurrentTimeOverGivenTime(this._ravenSpawnDelay)&&this.spawnRaven(),1==this._obstacleSpawnTimer.getPercentageOfCurrentTimeOverGivenTime(this._obstacleSpawnDelay)&&this.spawnObstacle()):this._gameState==EHDI.GameStateEnum.GAMEEND_ANIMATION&&(this.updateRavens(t),this._character.update(t)))},EHDI.scene.GameScene.prototype.updateScore=function(){var t=this._scoreTimer.getTimeInSeconds();this._currentGameTime=60&&5==this._gameLevel?(this._gameLevel=6,this._gameScore=60,this._ravenCurrentSpawnDelay=.2*this._ravenBaseSpawnDelay,this._obstacleCurrentSpawnDelay=.2*this._obstacleBaseSpawnDelay,this._character.updateSpeed(this._gameLevel)):t>=40&&4==this._gameLevel?(this._gameLevel=5,this._gameScore=50,this._ravenCurrentSpawnDelay=.4*this._ravenBaseSpawnDelay,this._obstacleCurrentSpawnDelay=.4*this._obstacleBaseSpawnDelay,this._character.updateSpeed(this._gameLevel)):t>=30&&3==this._gameLevel?(this._gameLevel=4,this._gameScore=40,this._ravenCurrentSpawnDelay=.6*this._ravenBaseSpawnDelay,this._obstacleCurrentSpawnDelay=.6*this._obstacleBaseSpawnDelay,this._character.updateSpeed(this._gameLevel)):t>=20&&2==this._gameLevel?(this._gameLevel=3,this._gameScore=30,this._ravenCurrentSpawnDelay=.75*this._ravenBaseSpawnDelay,this._obstacleCurrentSpawnDelay=.75*this._obstacleBaseSpawnDelay,this._character.updateSpeed(this._gameLevel)):t>=10&&1==this._gameLevel&&(this._gameLevel=2,this._gameScore=20,this._ravenCurrentSpawnDelay=.9*this._ravenBaseSpawnDelay,this._obstacleCurrentSpawnDelay=.9*this._obstacleBaseSpawnDelay,this._character.updateSpeed(this._gameLevel))},EHDI.scene.GameScene.prototype.updateObstacles=function(t){for(var e=0;e0;){var t=this._obstaclesToRemove.pop(),e=this._activeObstacles.indexOf(t);e>-1&&this._activeObstacles.splice(e,1),EHDI.GetGlobalPool().obstaclePool.return(t),t=null}},EHDI.scene.GameScene.prototype.stopAnimations=function(){for(var t=0;t0;){var t=this._ravensToRemove.pop(),e=this._activeRavens.indexOf(t);e>-1&&this._activeRavens.splice(e,1),t.stop(),EHDI.GetGlobalPool().ravenPool.return(t),t=null}},EHDI.scene.GameScene.prototype._handler_pauseGame=function(t){this._ravenSpawnTimer.pause(!0),this._obstacleSpawnTimer.pause(!0),this._scoreTimer.pause(!0),this._prevState=this._gameState,this.gameStateManager(EHDI.GameStateEnum.GAMEPAUSED)},EHDI.scene.GameScene.prototype._handler_resumeGame=function(t){this._ravenSpawnTimer.pause(!1),this._obstacleSpawnTimer.pause(!1),this._scoreTimer.pause(!1),this.gameStateManager(this._prevState)},EHDI.scene.GameScene.prototype._handler_characterAnimationCompleted=function(t){this.gameStateManager(EHDI.GameStateEnum.GAMEOVER),this.stopAnimations();var e=this._scoreContainer.getScore();e>EHDI.GAME.saveData.highScore&&(EHDI.GAME.saveData.highScore=e,EHDI.sbGame.saveGameData(EHDI.GAME.saveData,"DEFAULT",function(){console.log("data saved.")})),EHDI.sbGame.end(e)},EHDI.scene.GameScene.prototype._handler_onTouch=function(t){t.target!=this._hudPauseButton&&this._gameState==EHDI.GameStateEnum.GAMESTARTED&&this._character.fly()},EHDI.scene.GameScene.prototype.destroy=function(){this.gameStateManager(EHDI.GameStateEnum.GAMEOVER),this.destroyListeners(),this.destroyGraphics(),this.destroyUtils(),EHDI.GetGlobalPool().gameScenePool.return(this)},(EHDI=EHDI||Object.create(null)).loadScene=function(){function t(t){dragonBones.WorldClock.clock.advanceTime(.001*t)}function e(){u.scale.x=EHDI.LoadManager.getProgress()/100}var i=new PIXI.Container,r=new EHDI.aka.PixiText("hello world",{fontFamily:"proximanova-black"}),n=new EHDI.aka.PixiText("text",{fontFamily:"Exo-Bold"});EHDI.GAME.jsonManager=EHDI.JSONManager(null,EHDI.Assets.fetch("assets/strings/preloader/strings.json")),i.addChild(r),i.addChild(n);var s=new PIXI.extras.TilingSprite(EHDI.Assets.images.gfx_bg,EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight());i.addChild(s);var a=new EHDI.aka.Sprite(EHDI.Assets.images.gfx_loading);a.anchor.x=.5,a.anchor.y=.5,a.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.5*EHDI.GAME.sceneManager.getStageHeight()),i.addChild(a);var o=new EHDI.aka.Sprite(EHDI.Assets.images.gfx_loading_bar_con);o.anchor.set(.5,.5),o.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.64*EHDI.GAME.sceneManager.getStageHeight()),i.addChild(o);var h=new EHDI.displays.TextSprite(EHDI.GAME.jsonManager.getLocale("STR_LOADING"));h.position.set(.316*EHDI.GAME.sceneManager.getStageWidth(),.595*EHDI.GAME.sceneManager.getStageHeight()),i.addChild(h);var l=new EHDI.displays.FillRectangle(0,0,0,380,27);l.anchor.x=.5,l.anchor.y=.5,l.position.x=.5*EHDI.GAME.sceneManager.getStageWidth(),l.position.y=.65*EHDI.GAME.sceneManager.getStageHeight(),i.addChild(l);var u=new EHDI.displays.FillRectangle(1677809,0,0,380,27);l.addChild(u),u.x=.5*-l.width,u.y=.5*-l.height;u.width;var c=null,d=null,p=[];p=(p=(p=p.concat(AssetDirectory.ui)).concat(AssetDirectory.title)).concat(AssetDirectory.game),EHDI.LoadManager.queueAssets(p),EHDI.LoadManager.start(function(){u.scale.x=EHDI.LoadManager.getProgress()/100,EHDI.GAME.updateManager.removeFrameListener(e),EHDI.BrowserInfo.isIOS?((c=new EHDI.displays.TextSprite(EHDI.GAME.jsonManager.getLocale("STR_TAP_CONT"))).anchor.set(.5,.5),c.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.65*EHDI.GAME.sceneManager.getStageHeight()),i.addChild(c),c.alpha=0,(d=new TimelineMax).to(h,.25,{alpha:0},0),d.to(l,.25,{alpha:0},0),d.to(c,.25,{alpha:1},0),d.add(function(){s.interactive=!0,d.kill(),(d=new TimelineMax({repeat:-1,repeatDelay:1,delay:1})).to(c,1,{alpha:0}),d.to(c,.5,{alpha:1},"+=0.2")}),s.touchstart=function(){s.interactive=!1,EHDI.GAME.soundManager.playSFX("button_sfx"),EHDI.GAME.sceneManager.changeScene(new EHDI.scene.TitleScene,{alpha:new EHDI.scene.TransitionParameter(0,1),duration:1})}):setTimeout(function(){EHDI.GAME.sceneManager.changeScene(new EHDI.scene.TitleScene,{alpha:new EHDI.scene.TransitionParameter(0,1),duration:1})},500)}),EHDI.GAME.updateManager.addFrameListener(e);var f=new dragonBones.PixiFactory,_=EHDI.Assets.images.gizmoloading_tex.baseTexture.source,m=EHDI.Assets.fetch("gizmoloading_tex");f.addTextureAtlas(new dragonBones.TextureAtlas(_,m));var g=EHDI.Assets.fetch("gizmoloading_ske");f.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(g));var v=f.buildArmature(g.armature[0].name);dragonBones.WorldClock.clock.add(v),v.animation.gotoAndPlay(v.animation.animationList[0],-1,-1,0),v.animation.play();var y=v.getDisplay();y.position.set(.5*EHDI.GAME.sceneManager.getStageWidth(),.55*EHDI.GAME.sceneManager.getStageHeight()),i.addChild(y),EHDI.GAME.updateManager.addFrameListener(t),i.screenDidDisappear=function(){EHDI.GAME.updateManager.removeFrameListener(t),f.dispose(),dragonBones.WorldClock.clock.remove(v),v.dispose(),i.destroy({children:!0})},EHDI.GAME.sceneManager.changeScene(i)},(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(){this.bg=new PIXI.extras.TilingSprite(EHDI.Assets.images.bg_logo_dove,EHDI.GAME.sceneManager.getStageWidth(),EHDI.GAME.sceneManager.getStageHeight()),this.addChild(this.bg)},EHDI.scene.TitleScene.prototype.screenDidAppear=function(){this.title=new EHDI.aka.Sprite(EHDI.Assets.images.logo_dove),this.robot=new EHDI.aka.Sprite(EHDI.Assets.images.dove),this.title.anchor.set(.5,.5),this.title.x=512,this.title.y=300,this.title.scale.x=0,this.title.scale.y=0,this.robot.anchor.set(.5,.5),this.robot.x=-245.76,this.robot.y=420,this.addChild(this.robot),this.addChild(this.title),this.tl1=TweenLite.to(this.title.scale,1,{x:1,y:1,ease:Back.easeOut}),this.tl2=TweenLite.to(this.robot,2,{x:300,y:150}),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),EHDI.GAME.soundManager.autoResumeToggle(!0),EHDI.GAME.soundManager.playBGM("game_bgm")},EHDI.scene.TitleScene.prototype.robotCallback=function(){this.tl=new TimelineMax({repeat:-1,yoyo:!0}),this.tl.to(this.robot,1,{y:this.robot.y+5,ease:Bounce.easeInOut})},EHDI.scene.TitleScene.prototype.toggleAudio=function(t){EHDI.GAME.soundManager.setMute(t);var e=EHDI.GAME.storageManager.getLocalInfo(EHDI.GAME.id);e.isMuted=t,EHDI.GAME.storageManager.setLocalInfo(EHDI.GAME.id,e),EHDI.GAME.soundManager.playSFX("button_sfx")},EHDI.scene.TitleScene.prototype.startGame=function(){EHDI.GAME.soundManager.playSFX("button_sfx"),EHDI.GAME.sceneManager.changeScene(EHDI.GetGlobalPool().gameScenePool.get(),{x:new EHDI.scene.TransitionParameter(-EHDI.GAME.sceneManager.getStageWidth(),0),duration:.25},!0)},EHDI.scene.TitleScene.prototype.screenDidDisappear=function(){null!=this.tl1&&(this.tl1.kill(),this.tl1=null),null!=this.tl2&&(this.tl2.kill(),this.tl2=null),null!=this.tl&&(this.tl.kill(),this.tl=null),null!=this.bg&&(this.removeChild(this.bg),this.bg=null),null!=this.title&&(this.removeChild(this.title),this.title=null),null!=this.robot&&(this.removeChild(this.robot),this.robot=null),null!=this.sound&&(this.removeChild(this.sound),this.sound=null),null!=this.playBtn&&(null!=this.playTxt&&(this.playBtn.removeChild(this.playTxt),this.playTxt=null),this.removeChild(this.playBtn),this.playBtn=null),EHDI.aka.Container.prototype.destroy.apply(this,arguments)},(EHDI=EHDI||Object.create(null)).GetAnimationFactory=function(){return void 0==EHDI._animationFactory&&(EHDI._animationFactory=new EHDI.AnimationFactory),EHDI._animationFactory},EHDI.AnimationFactory=function(){this._factory=new dragonBones.PixiFactory,this._animationPaths=[]},EHDI.AnimationFactory.prototype.addAnimation=function(t){if(-1==this._animationPaths.indexOf(t)){var e=EHDI.Assets.fetch(t+"_tex"),i=EHDI.Assets.fetch(t+"_ske"),r=EHDI.Assets.images[t+"_tex"].baseTexture.source;this._factory.addTextureAtlas(new dragonBones.TextureAtlas(r,e)),this._factory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(i)),this._animationPaths.push(t)}},EHDI.AnimationFactory.prototype.getFactory=function(){return this._factory},(EHDI=EHDI||Object.create(null)).CameraManager=function(t){var e,i=!1,r=t,n=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 r,n=i.target.files;if(n&&n.length>0){r=n[0];var s=function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var e=atob(t),i=e.length,r=new Uint8Array(i),n=0;n-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,i){var r=new EHDI.Event(t,i);e[t]=r},t.unregister=function(t){if(!(t in e))throw new Error("event not found");e[t].clearCallbacks(),delete e[t]},t.dispatch=function(t){if(!(t in e))throw new Error("event is unregistered");for(var i=e[t].callbacks,r=0,n=i.length;r=i)throw new Error("max amount of listeners limit reached, maxListener: "+i);e[t].registerCallback(r)},t.removeListener=function(t,i){if(!(t in e))throw new Error("event is unregistered");e[t].callbacks.indexOf(i)<=-1&&console.log("callback listener not found"),e[t].unregisterCallback(i)},t},(EHDI=EHDI||Object.create(null)).JSONManager=function(t,e){"use strict";"use restrict";var i=t,r=e;return{setConfigData:function(t){void 0===i&&(i=t)},setLocaleData:function(t){void 0===r&&(r=t)},getLocale:function(t){return arguments.length<1?r.data:r.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"],r=["ogg","mp3","wav"],n=["ttf","woff","woff2","otf"],s=Object.create(null),a=[],o=[],h=[],l=null,u=[],c=!1,d=0,p=0,f=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],r=e[1];"ttf"===r&&(r="truetype"),"otf"===r&&(r="opentype"),"eot"===r&&(r="embedded-opentype");var n=document.createElement("style"),s="@font-face {font-family: '"+i+"'; src: url('"+t+"') format('"+r+"');";n.appendChild(document.createTextNode(s)),document.body.appendChild(n),EHDI.Assets.fonts.push(i)},T=function(t,e){d=p+t.progress*o.length/f},E=function(t,e,i){console.log("PixiJS Loading Error!"),console.log(t)},x=function(t,e){v(),c=!1,h.length>0&&(h.length=0),"function"==typeof l&&l.apply(null,u)},w=function(t){var e=t.progress>1?1:t.progress;d=e*a.length/f*100,p=d},S=function(t){o.length<=0?x():e.add(o).load(x)},D=function(t){console.log("CreateJS Loading Error"),console.log(t)},P=function(e,i,r){var n,a,o,h,l,u,c,d;h=(a=(n=t.getResult(i)).locale).url,l=void 0!==a.lang?a.lang:"en",o=a.id+l,c=void 0===a.font[l]?a.font.default:a.font[l],d=[h+o+".json"],u=function(){e.setConfigData(n),e.setLocaleData(t.getResult(o)),"function"==typeof r&&r()},s.queueStrings(d),s.queueFonts(c),s.start(u)},A=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=r,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",E),s.queueStrings=function(t){for(var e,i,r=[];t.length>0;)i=(e=t.pop()).split("/").pop().split(".")[0],r.push({id:i,src:e});a=a.concat(r)},s.queueFonts=function(t){for(var e;t.length>0;)(e=t.pop()).split("/").pop().split(".")[0],h.push(b(e))},s.queueAudios=function(t){for(var e,i,r=[];t.length>0;)"string"!=typeof(e=t.pop())?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],r.push({id:i,src:e});a=a.concat(r)},s.queueImages=function(t){for(var e,i,r=[];t.length>0;)"string"!=typeof(e=t.pop())?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],r.push({name:i,url:e});o=o.concat(r)},s.queueAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},a=y(t,n),o=y(t,r),h=y(t,i),l=e(t,a);l=e(l=e(l,h),o),s.queueFonts(a),s.queueAudios(o),s.queueStrings(h),s.queueImages(l)},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 r=t.split("/").pop().split(".")[0];v(),s.queueStrings([t]),s.start(P,[e,r,i])},s.getProgress=function(){return d},s.start=function(t,i){if(c)throw new Error("EHDI Load manager is currently running");l=t,u=i,c=!0,d=0,p=0,f=a.length+o.length,g=_.length+m.length,e.reset(),A()},s.unloadAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},s=y(t,n),a=y(t,r),o=y(t,i),h=e(t,a);h=e(h=e(h,o),s),_=_.concat(a),_=_.concat(o),m=m.concat(h)},s}()}(),(EHDI=EHDI||Object.create(null)).GetGlobalPool=function(){return void 0==EHDI.GlobalPool&&(EHDI.GlobalPool={},EHDI.GlobalPool.containerPool=new EHDI.PoolManager(EHDI.aka.Container),EHDI.GlobalPool.gameScenePool=new EHDI.PoolManager(EHDI.scene.GameScene),EHDI.GlobalPool.spritePool=new EHDI.PoolManager(EHDI.aka.Sprite),EHDI.GlobalPool.charPool=new EHDI.PoolManager(EHDI.game.Character),EHDI.GlobalPool.animationPool=new EHDI.PoolManager(EHDI.game.Animation),EHDI.GlobalPool.ravenPool=new EHDI.PoolManager(EHDI.game.Raven),EHDI.GlobalPool.obstaclePool=new EHDI.PoolManager(EHDI.game.Obstacle),EHDI.GlobalPool.effectPool=new EHDI.PoolManager(EHDI.game.Effect)),EHDI.GlobalPool},EHDI.PoolManager=function(t){this._objType=t,this._totalObjects,this._inactiveObjexts,this._objPool,this.init()},EHDI.PoolManager.prototype.init=function(){this._totalObjects=0,this._inactiveObjexts=0,this._objPool=[]},EHDI.PoolManager.prototype.freeUp=function(){this._totalObjects=this._totalObjects-this._inactiveObjexts,this._inactiveObjexts=0,this._objPool=[]},EHDI.PoolManager.prototype.get=function(){var t;return 0==this._objPool.length?(t=new this._objType,this._totalObjects++):(t=this._objPool.pop(),this._inactiveObjexts--),t},EHDI.PoolManager.prototype.return=function(t){"function"==typeof t.reset&&t.reset(),this._objPool.push(t),this._inactiveObjexts++},(EHDI=EHDI||Object.create(null)).ScaleManager=function(t,e,i,r,n){function s(){h=window.innerWidth/r,l=window.innerHeight/n,i===EHDI.ScaleManager.DOCKING.WIDTH?m=h:i===EHDI.ScaleManager.DOCKING.HEIGHT?m=l:i===EHDI.ScaleManager.DOCKING.AUTO?m=Math.min(h,l):i===EHDI.ScaleManager.DOCKING.FULLSCREEN&&(m=Math.max(h,l));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(r*m),v=Math.floor(n*m),e.scale.x=e.scale.y=m,g>window.innerWidth?(g=window.innerWidth,EHDI.screen.viewWidth=g/m):(EHDI.screen.viewWidth=window.innerWidth/m,EHDI.screen.viewWidth>r&&(EHDI.screen.viewWidth=r)),v>window.innerHeight?(v=window.innerHeight,EHDI.screen.viewHeight=v/m):(EHDI.screen.viewHeight=window.innerHeight/m,EHDI.screen.viewHeight>n&&(EHDI.screen.viewHeight=n)),EHDI.screen.centerOrigin&&e.children.forEach(function(t){t.position.set(.5*EHDI.screen.viewWidth,.5*EHDI.screen.viewHeight)}),EHDI.screen.xOffset=EHDI.screen.stageWidth-EHDI.screen.viewWidth,EHDI.screen.yOffset=EHDI.screen.stageHeight-EHDI.screen.viewHeight,t.resize(g,v),o(),window.scrollTo(0,0),a(),f&&f()}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(),p.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){f.addChild(t)},removeNotification:function(t,e){var i;f.children.indexOf(t)>-1&&(i=f.removeChild(t)),e&&i.destroy({children:!0}),i=null},popNofication:function(){return f.children.pop()},screenResize:function(){c&&"function"==typeof c.onScreenResize&&c.onScreenResize(),u.forEach(function(t){"function"==typeof t.onScreenResize&&t.onScreenResize()}),f.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=[],r=null,n=!1,s=!0,a=!0,o={bgm:1,sfx:1,vo:1},h=t||!0,l=function(){e&&(e.paused=!0),i.forEach(function(t){t.paused=!0}),r&&(r.paused=!0)},u=function(){a&&(e&&(e.paused=!1),i.forEach(function(t){t.paused=!1}),r&&(r.paused=!1))},c=function(){window.document.webkitHidden||window.document.hidden?l():u()},d=function(){window.addEventListener("blur",l),window.addEventListener("focus",u),window.addEventListener("pagehide",l),window.addEventListener("pageshow",u),window.addEventListener("webkitvisibilitychange",c),window.addEventListener("webkitvisibilitychange",c)},p=function(){window.removeEventListener("blur",l),window.removeEventListener("focus",u),window.removeEventListener("pagehide",l),window.removeEventListener("pageshow",u),window.removeEventListener("webkitvisibilitychange",c),window.removeEventListener("webkitvisibilitychange",c)};return h&&d(),{set enableInterrupt(t){"boolean"==typeof t&&h!==t&&((h=t)?d():p())},get enableInterrupt(){return h},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,r&&(r.volume=r.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=n,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 r=createjs.Sound.play(t);r.volume=e,r.muted=n,i.push(r);var s=r.on("complete",function(t){var e=i.indexOf(t.currentTarget);if(e>-1){var n=i.splice(e,1)[0];r.off("complete",s),n.destroy()}});return r}throw"pass string id of SFX to be played"},stopSFX:function(t){var e=i.indexOf(t);if(e>-1){var r=i.splice(e,1)[0];r.stop(),r.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 r=createjs.Sound.play(t),r.volume=e,r.muted=n,r;throw"pass string ID of VO to be played"},stopVO:function(){r&&(r.stop(),r.destroy())},pauseVO:function(){r&&(r.paused=!0)},resumeVO:function(){r&&(r.paused=!1)},setMute:function(){var t=arguments.length<=0||void 0===arguments[0]?!n:arguments[0];n=t,e&&(e.muted=n),i.forEach(function(t){t.muted=n}),r&&(r.muted=n)},getMuted:function(){return n},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}),r&&(r.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)),r=function(){if(!e)return!1;var r;return null===i&&null!==t?(i=Object.create(null),r=JSON.stringify(i),localStorage.setItem(t,r),!0):null!==i};return(e=function(){try{return localStorage.setItem("t3st","1"),localStorage.removeItem("t3st"),!0}catch(t){return!1}}())?r():(i=Object.create(null),console.log("Local storage is not supported. Current session will not be saved offline")),{checkLocalData:r,setDataID:function(e){(arguments.length<0||"string"!=typeof e)&&(e="game_data"),t=e,r()},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,n){if(arguments.length<2)throw"invalid parameters";if("string"!=typeof e)throw"invalid key";i[e]=n,r()&&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 r;i=Object.create(null),e&&(r=JSON.stringify(i),localStorage.setItem(t,r))}}},(EHDI=EHDI||Object.create(null)).UpdateManager=function(t,e){"use strict";var i,r,n,s,a,o=!1,h=[],l=0,u=function(){window.requestAnimationFrame(u);var t=new Date;r||(r=(new Date).getTime());var e=t-i,c=(t.getTime()-r)/1e3;if(l++,n=Math.floor(l/c),c>1&&(r=(new Date).getTime(),l=0),h.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 n},setAutoRender:function(t){o=t},isAutoRendering:function(){return o},addFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");h.push(t)},hasFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");return h.indexOf(t)>-1},removeFrameListener:function(t){if("function"!=typeof t)throw"Callback must be a function";var e=h.indexOf(t);e>-1&&h.splice(e,1)},removeAllFrameListeners:function(){h.length=0}}},function(){"use strict";function t(t){h.push(t),1==h.length&&o()}function e(){for(;h.length;)h[0](),h.shift()}function i(t){this.a=l,this.b=void 0,this.f=[];var e=this;try{t(function(t){n(e,t)},function(t){s(e,t)})}catch(t){s(e,t)}}function r(t){return new i(function(e){e(t)})}function n(t,e){if(t.a==l){if(e==t)throw new TypeError;var i=!1;try{var r=e&&e.then;if(null!=e&&"object"==typeof e&&"function"==typeof r)return void r.call(e,function(e){i||n(t,e),i=!0},function(e){i||s(t,e),i=!0})}catch(e){return void(i||s(t,e))}t.a=0,t.b=e,a(t)}}function s(t,e){if(t.a==l){if(e==t)throw new TypeError;t.a=1,t.b=e,a(t)}}function a(e){t(function(){if(e.a!=l)for(;e.f.length;){var t=(n=e.f.shift())[0],i=n[1],r=n[2],n=n[3];try{0==e.a?r("function"==typeof t?t.call(void 0,e.b):e.b):1==e.a&&("function"==typeof i?r(i.call(void 0,e.b)):n(e.b))}catch(t){n(t)}}})}var o,h=[];o=function(){setTimeout(e)};var l=2;i.prototype.g=function(t){return this.c(void 0,t)},i.prototype.c=function(t,e){var r=this;return new i(function(i,n){r.f.push([t,e,i,n]),a(r)})},window.Promise||(window.Promise=i,window.Promise.resolve=r,window.Promise.reject=function(t){return new i(function(e,i){i(t)})},window.Promise.race=function(t){return new i(function(e,i){for(var n=0;nparseInt(t[1],10)}else d=!1;return d}function h(){return null===f&&(f=!!document.fonts),f}function l(){if(null===p){var t=document.createElement("div");try{t.style.font="condensed 100px sans-serif"}catch(t){}p=""!==t.style.font}return p}function u(t,e){return[t.style,t.weight,l()?t.stretch:"","100px",e].join(" ")}var c=null,d=null,p=null,f=null;a.prototype.load=function(t,n){var a=this,l=t||"BESbswy",d=0,p=n||3e3,f=(new Date).getTime();return new Promise(function(t,n){if(h()&&!o()){var _=new Promise(function(t,e){function i(){(new Date).getTime()-f>=p?e():document.fonts.load(u(a,'"'+a.family+'"'),l).then(function(e){1<=e.length?t():setTimeout(i,25)},function(){e()})}i()}),m=new Promise(function(t,e){d=setTimeout(e,p)});Promise.race([m,_]).then(function(){clearTimeout(d),t(a)},function(){n(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==E&&v==E&&y==E)),e=!e),e&&(x.parentNode&&x.parentNode.removeChild(x),clearTimeout(d),t(a))}function o(){if((new Date).getTime()-f>=p)x.parentNode&&x.parentNode.removeChild(x),n(a);else{var t=document.hidden;!0!==t&&void 0!==t||(g=h.a.offsetWidth,v=_.a.offsetWidth,y=m.a.offsetWidth,e()),d=setTimeout(o,50)}}var h=new i(l),_=new i(l),m=new i(l),g=-1,v=-1,y=-1,b=-1,T=-1,E=-1,x=document.createElement("div");x.dir="ltr",r(h,u(a,"sans-serif")),r(_,u(a,"serif")),r(m,u(a,"monospace")),x.appendChild(h.a),x.appendChild(_.a),x.appendChild(m.a),document.body.appendChild(x),b=h.a.offsetWidth,T=_.a.offsetWidth,E=m.a.offsetWidth,o(),s(h,function(t){g=t,e()}),r(h,u(a,'"'+a.family+'",sans-serif')),s(_,function(t){v=t,e()}),r(_,u(a,'"'+a.family+'",serif')),s(m,function(t){y=t,e()}),r(m,u(a,'"'+a.family+'",monospace'))})})},"object"==typeof module?module.exports=a:(window.FontFaceObserver=a,window.FontFaceObserver.prototype.load=a.prototype.load)}();var AssetDirectory={preloader:["assets/font/preloader/exo-bold.ttf","assets/font/preloader/exo-medium.ttf","assets/font/preloader/proximanova-black.ttf","assets/images/preloader/loader/gfx_bg.png","assets/images/preloader/loader/gfx_loading.png","assets/images/preloader/loader/gizmoloading.json","assets/images/preloader/loader/gizmoloading_ske.json","assets/images/preloader/loader/gizmoloading_tex.json","assets/images/preloader/loader/gizmoloading_tex.png","assets/sounds/preloader/loader/bgm/game_bgm.ogg","assets/sounds/preloader/loader/sfx/button_sfx.ogg","assets/sounds/preloader/loader/sfx/score_points.ogg","assets/sounds/preloader/loader/sfx/star_gain.ogg","assets/strings/preloader/strings.json"],game:["assets/images/external/game/bg_behindwater.png","assets/images/external/game/bg_clouds.png","assets/images/external/game/bg_dove.png","assets/images/external/game/bg_sky.png","assets/images/external/game/birds/birds_anim_ske.json","assets/images/external/game/birds/birds_anim_tex.json","assets/images/external/game/birds/birds_anim_tex.png","assets/images/external/game/bump/fx_bump_ske.json","assets/images/external/game/bump/fx_bump_tex.json","assets/images/external/game/bump/fx_bump_tex.png","assets/images/external/game/dove/dove_anim_ske.json","assets/images/external/game/dove/dove_anim_tex.json","assets/images/external/game/dove/dove_anim_tex.png","assets/images/external/game/dove_lightning.png","assets/images/external/game/dove_prop.png","assets/images/external/game/flood/fx_flood_ske.json","assets/images/external/game/flood/fx_flood_tex.json","assets/images/external/game/flood/fx_flood_tex.png","assets/images/external/game/obstacle/obs_branchandcloth_ske.json","assets/images/external/game/obstacle/obs_branchandcloth_tex.json","assets/images/external/game/obstacle/obs_branchandcloth_tex.png","assets/images/external/game/obstacle.png","assets/images/external/game/obstacle_tree01.png","assets/images/external/game/obstacle_tree02.png","assets/images/external/game/splash/fx_splash_ske.json","assets/images/external/game/splash/fx_splash_tex.json","assets/images/external/game/splash/fx_splash_tex.png","assets/sounds/external/game/obstacle_hit.ogg","assets/sounds/external/game/spawn_brownbird.ogg","assets/sounds/external/game/spawn_crow.ogg","assets/sounds/external/game/spawn_eagle.ogg","assets/sounds/external/game/wing_flap.ogg"],title:["assets/images/external/title/bg_logo_dove.png","assets/images/external/title/dove.png","assets/images/external/title/logo_dove.png"],ui:["assets/images/external/ui/btn_audio1.png","assets/images/external/ui/btn_audio2.png","assets/images/external/ui/btn_audio3.png","assets/images/external/ui/btn_audio4.png","assets/images/external/ui/btn_exit.png","assets/images/external/ui/btn_exit2.png","assets/images/external/ui/btn_pause.png","assets/images/external/ui/btn_pause2.png","assets/images/external/ui/btn_play.png","assets/images/external/ui/btn_play2.png","assets/images/external/ui/btn_prevnext.png","assets/images/external/ui/btn_prevnext2.png","assets/images/external/ui/btn_return.png","assets/images/external/ui/btn_return2.png","assets/images/external/ui/check-button1.png","assets/images/external/ui/check-button2.png","assets/images/external/ui/gfx_container.png","assets/images/external/ui/gfx_container_white.png","assets/images/external/ui/gfx_explode.png","assets/images/external/ui/gfx_flare_long.png","assets/images/external/ui/gfx_flare_star.png","assets/images/external/ui/gfx_loading_bar_con.png","assets/images/external/ui/gfx_pop.png","assets/images/external/ui/gfx_pop2.png","assets/images/external/ui/gfx_star0.png","assets/images/external/ui/gfx_star1.png","assets/images/external/ui/gfx_starbg.png","assets/images/external/ui/htp_dove1.png","assets/images/external/ui/htp_dove2.png","assets/images/external/ui/htp_dove3.png","assets/images/external/ui/htp_dove4.png","assets/images/external/ui/x-button1.png","assets/images/external/ui/x-button2.png"]};!function(t){"use strict";t.BrowserInfo=Object.create(null);var e,i,r=window.navigator,n=t.BrowserInfo,s=r.userAgent;n.platformType=r.platform,n.platformVersion="",n.browserName=r.appName,n.browserVersion=r.appVersion,n.isMobileDevice=!1,n.isIOS=!1,n.deviceType="desktop",-1!==r.platform.indexOf("iPhone")?(n.isMobileDevice=!0,n.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":" "}(),n.deviceType="phone",n.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):-1!=r.platform.indexOf("iPod")?(n.isMobileDevice=!0,n.platformType="iPod",n.deviceType="tablet",n.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):-1!=r.platform.indexOf("iPad")?(n.isMobileDevice=!0,n.platformType="iPad",n.deviceType="tablet",n.isIOS=!0,e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):-1!=s.indexOf("Android")?(n.isMobileDevice=!0,n.platformType="Android",n.deviceType="tablet",e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):-1!=s.indexOf("Kindle")||-1!=s.indexOf("Silk")?(n.isMobileDevice=!0,n.platformType="Android",n.deviceType="tablet"):-1!=s.indexOf("IEMobile")?(n.isMobileDevice=!0,n.platformType="IEMobile",n.deviceType="phone",e=/IEMobile\/(\d+\.\d+)/g,-1!==s.search(e)&&(n.platformVersion=String(s.match(e)))):-1!=r.platform.indexOf("Win")?(n.platformType="Windows",n.deviceType="desktop"):-1!=r.platform.indexOf("Mac")?(n.platformType="MAC",n.deviceType="desktop",e=/OS (\d+_\d+)/g,-1!==s.search(e)&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):-1!=r.platform.indexOf("Linux")&&(n.platformType="Linux",n.deviceType="desktop");var a=function(){var t,e=r.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]]:[r.appName,r.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&i.splice(1,1,t[1]),i.join(" ")}();n.browserName=a.split(" ")[0],"CRIOS"===n.browserName.toUpperCase()&&(n.browserName="Chrome"),n.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 r=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return r&&(e=i.getParameter(r.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),r=Math.abs(t.y-e.y-.5*e.height);if(i>.5*e.width+t.r)return!1;if(r>.5*e.height+t.r)return!1;if(i<=.5*e.width)return!0;if(r<=.5*e.height)return!0;var n=i-.5*e.width,s=r-.5*e.height;return n*n+s*s<=t.r*t.r},EHDI.CollisionUtil.circleToCircle=function(t,e){var i=t.x-e.x,r=t.y-e.y;return Math.sqrt(i*i+r*r)e)return r;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 r=t[e];t[e]=t[i],t[i]=r}(t,function(t){return Math.floor(Math.random()*t)}(e+1),e)},(EHDI=EHDI||Object.create(null)).util=EHDI.util||Object.create(null),EHDI.util.Time=function(){this._lastTime,this._pauseTime,this._pause,this._lastFrameTime,this._date,this._pause=!1,this._lastTime=(new Date).getTime(),this._lastFrameTime=(new Date).getTime()},EHDI.util.Time.prototype.reset=function(){this._pause=!1,this._lastTime=(new Date).getTime(),this._lastFrameTime=(new Date).getTime()},EHDI.util.Time.prototype.addAdditionalTime=function(t){this._lastTime-=t},EHDI.util.Time.prototype.resetLastTime=function(t){this._lastTime-=(new Date).getTime()-t},EHDI.util.Time.prototype.getDelta=function(){var t=(new Date).getTime()-this._lastFrameTime;return t/=10,this.resetLastFrameTime(),t},EHDI.util.Time.prototype.resetLastFrameTime=function(){lastFrameTime=(new Date).getTime()},EHDI.util.Time.prototype.pause=function(t){t&&!this._pause?(this._pause=!0,this._pauseTime=(new Date).getTime()-this._lastTime):!t&&this._pause&&(this._pause=!1,this._lastTime=(new Date).getTime()-this._pauseTime,this._lastFrameTime=(new Date).getTime())},EHDI.util.Time.prototype.getTimeInMilliseconds=function(){var t;return t=this._pause?this._pauseTime:(new Date).getTime()-this._lastTime,parseInt(t)},EHDI.util.Time.prototype.getTime=function(){var t;return t=this._pause?this._pauseTime:(new Date).getTime()-this._lastTime,parseInt(t)},EHDI.util.Time.prototype.getTimeInSeconds=function(){var t;return t=this._pause?this._pauseTime:(new Date).getTime()-this._lastTime,t/=1e3,parseInt(t)},EHDI.util.Time.prototype.getPercentageOfCurrentTimeOverGivenTime=function(t){var e;return(e=this.getTimeInMilliseconds()/t)>1&&(e=1),e},EHDI.util.Time.prototype.addValueToLastTime=function(t){t+this._lastTime>(new Date).getTime()?this._lastTime=(new Date).getTime():this._lastTime+=t},EHDI.util.Time.prototype.destroy=function(){this.lastTime=null,this.pauseTime=null,this.onPause=null,this.lastFrameTime=null};