OwlCyberSecurity - MANAGER
Edit File: app.c2aadd40.js
(function(t){function e(e){for(var n,a,o=e[0],c=e[1],l=e[2],u=0,d=[];u<o.length;u++)a=o[u],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&d.push(r[a][0]),r[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);h&&h(e);while(d.length)d.shift()();return s.push.apply(s,l||[]),i()}function i(){for(var t,e=0;e<s.length;e++){for(var i=s[e],n=!0,o=1;o<i.length;o++){var c=i[o];0!==r[c]&&(n=!1)}n&&(s.splice(e--,1),t=a(a.s=i[0]))}return t}var n={},r={app:0},s=[];function a(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=t,a.c=n,a.d=function(t,e,i){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(i,n,function(e){return t[e]}.bind(null,n));return i},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var l=0;l<o.length;l++)e(o[l]);var h=c;s.push([0,"chunk-vendors"]),i()})({0:function(t,e,i){t.exports=i("56d7")},"0117":function(t,e,i){"use strict";var n=i("0bae"),r=i.n(n);r.a},"034f":function(t,e,i){"use strict";var n=i("27fb"),r=i.n(n);r.a},"03ff":function(t,e,i){"use strict";(function(t,n){i("3b2b"),i("a481"),i("386d"),i("b54a"),i("ac6a"),i("4917"),i("28a5"),i("7f7f"),i("6b54");var r=i("7618"),a=function(){this.createjs=this.createjs||{},function(){var t=o.PreloadJS=o.PreloadJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:47 GMT"}(),this.createjs=this.createjs||{},o.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},o.promote=function(t,e){var i=t.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(n)for(var r in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(r)&&"function"==typeof n[r]&&(i[e+r]=n[r]);return t},this.createjs=this.createjs||{},o.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){o.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||{},o.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){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+")]"},o.Event=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}var e=o.extend(t,o.Event);e.clone=function(){return new o.ErrorEvent(this.title,this.message,this.data)},o.ErrorEvent=o.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]==e){1==a?delete n[t]:r.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 n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new o.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(l){}if(t.bubbles&&this.parent){var r=this,s=[r];while(r.parent)s.push(r=r.parent);var a,c=s.length;for(a=c-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a<c&&!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){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!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)}}2===e&&this._dispatchEvent(t,2.1)},o.EventDispatcher=t}(),this.createjs=this.createjs||{},function(t){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}var i=o.extend(e,o.Event);i.clone=function(){return new o.ProgressEvent(this.loaded,this.total)},o.ProgressEvent=o.promote(e,"Event")}(window),function(){var e="function"===typeof define&&i("3c35"),s={function:!0,object:!0},a=s["undefined"===typeof exports?"undefined":Object(r["a"])(exports)]&&exports&&!exports.nodeType&&exports,o=s["undefined"===typeof window?"undefined":Object(r["a"])(window)]&&window||this,c=a&&s[Object(r["a"])(t)]&&t&&!t.nodeType&&"object"==("undefined"===typeof n?"undefined":Object(r["a"])(n))&&n;function l(t,e){t||(t=o["Object"]()),e||(e=o["Object"]());var i=t["Number"]||o["Number"],n=t["String"]||o["String"],a=t["Object"]||o["Object"],c=t["Date"]||o["Date"],h=t["SyntaxError"]||o["SyntaxError"],u=t["TypeError"]||o["TypeError"],d=t["Math"]||o["Math"],f=t["JSON"]||o["JSON"];"object"==a(r["a"])(f)&&f&&(e.stringify=f.stringify,e.parse=f.parse);var p,_,m,v=a.prototype,g=v.toString,b=new c(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(q){}function y(t){if(y[t]!==m)return y[t];var r;if("bug-string-char-index"==t)r="a"!="a"[0];else if("json"==t)r=y("json-stringify")&&y("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var o=e.stringify,l="function"==typeof o&&b;if(l){(s=function(){return 1}).toJSON=s;try{l="0"===o(0)&&"0"===o(new i)&&'""'==o(new n)&&o(g)===m&&o(m)===m&&o()===m&&"1"===o(s)&&"[1]"==o([s])&&"[null]"==o([m])&&"null"==o(null)&&"[null,null,null]"==o([m,g,null])&&o({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===o(null,s)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new c(-1))}catch(q){l=!1}}r=l}if("json-parse"==t){var h=e.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){s=h(a);var u=5==s["a"].length&&1===s["a"][0];if(u){try{u=!h('"\t"')}catch(q){}if(u)try{u=1!==h("01")}catch(q){}if(u)try{u=1!==h("1.")}catch(q){}}}}catch(q){u=!1}r=u}}return y[t]=!!r}if(!y("json")){var w="[object Function]",x="[object Date]",E="[object Number]",S="[object String]",T="[object Array]",C="[object Boolean]",I=y("bug-string-char-index");if(!b)var O=d.floor,R=[0,31,59,90,120,151,181,212,243,273,304,334],L=function(t,e){return R[e]+365*(t-1970)+O((t-1969+(e=+(e>1)))/4)-O((t-1901+e)/100)+O((t-1601+e)/400)};if((p=v.hasOwnProperty)||(p=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=g?p=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,p=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,p.call(this,t)}),_=function(t,e){var i,n,o,c=0;for(o in(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i,n)p.call(n,o)&&c++;return i=n=null,c?_=2==c?function(t,e){var i,n={},r=g.call(t)==w;for(i in t)r&&"prototype"==i||p.call(n,i)||!(n[i]=1)||!p.call(t,i)||e(i)}:function(t,e){var i,n,r=g.call(t)==w;for(i in t)r&&"prototype"==i||!p.call(t,i)||(n="constructor"===i)||e(i);(n||p.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],_=function(t,e){var i,o,c=g.call(t)==w,l=!c&&"function"!=typeof t.constructor&&s[a(r["a"])(t.hasOwnProperty)]&&t.hasOwnProperty||p;for(i in t)c&&"prototype"==i||!l.call(t,i)||e(i);for(o=n.length;i=n[--o];l.call(t,i)&&e(i));}),_(t,e)},!y("json-stringify")){var k={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",D=function(t,e){return(A+(e||0)).slice(-t)},P="\\u00",j=function(t){for(var e='"',i=0,n=t.length,r=!I||n>10,s=r&&(I?t.split(""):t);i<n;i++){var a=t.charCodeAt(i);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=k[a];break;default:if(a<32){e+=P+D(2,a.toString(16));break}e+=r?s[i]:t.charAt(i)}}return e+'"'},M=function t(e,i,n,s,o,c,l){var h,d,f,v,b,y,w,I,R,k,A,P,M,B,F,X;try{h=i[e]}catch(q){}if("object"==a(r["a"])(h)&&h)if(d=g.call(h),d!=x||p.call(h,"toJSON"))"function"==typeof h.toJSON&&(d!=E&&d!=S&&d!=T||p.call(h,"toJSON"))&&(h=h.toJSON(e));else if(h>-1/0&&h<1/0){if(L){for(b=O(h/864e5),f=O(b/365.2425)+1970-1;L(f+1,0)<=b;f++);for(v=O((b-L(f,0))/30.42);L(f,v+1)<=b;v++);b=1+b-L(f,v),y=(h%864e5+864e5)%864e5,w=O(y/36e5)%24,I=O(y/6e4)%60,R=O(y/1e3)%60,k=y%1e3}else f=h.getUTCFullYear(),v=h.getUTCMonth(),b=h.getUTCDate(),w=h.getUTCHours(),I=h.getUTCMinutes(),R=h.getUTCSeconds(),k=h.getUTCMilliseconds();h=(f<=0||f>=1e4?(f<0?"-":"+")+D(6,f<0?-f:f):D(4,f))+"-"+D(2,v+1)+"-"+D(2,b)+"T"+D(2,w)+":"+D(2,I)+":"+D(2,R)+"."+D(3,k)+"Z"}else h=null;if(n&&(h=n.call(i,e,h)),null===h)return"null";if(d=g.call(h),d==C)return""+h;if(d==E)return h>-1/0&&h<1/0?""+h:"null";if(d==S)return j(""+h);if("object"==a(r["a"])(h)){for(B=l.length;B--;)if(l[B]===h)throw u();if(l.push(h),A=[],F=c,c+=o,d==T){for(M=0,B=h.length;M<B;M++)P=t(M,h,n,s,o,c,l),A.push(P===m?"null":P);X=A.length?o?"[\n"+c+A.join(",\n"+c)+"\n"+F+"]":"["+A.join(",")+"]":"[]"}else _(s||h,(function(e){var i=t(e,h,n,s,o,c,l);i!==m&&A.push(j(e)+":"+(o?" ":"")+i)})),X=A.length?o?"{\n"+c+A.join(",\n"+c)+"\n"+F+"}":"{"+A.join(",")+"}":"{}";return l.pop(),X}};e.stringify=function(t,e,i){var n,o,c,l;if(s[a(r["a"])(e)]&&e)if((l=g.call(e))==w)o=e;else if(l==T){c={};for(var h,u=0,d=e.length;u<d;h=e[u++],l=g.call(h),(l==S||l==E)&&(c[h]=1));}if(i)if((l=g.call(i))==E){if((i-=i%1)>0)for(n="",i>10&&(i=10);n.length<i;n+=" ");}else l==S&&(n=i.length<=10?i:i.slice(0,10));return M("",(h={},h[""]=t,h),o,c,n,"",[])}}if(!y("json-parse")){var B,F,X=n.fromCharCode,U={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},N=function(){throw B=F=null,h()},G=function(){var t,e,i,n,r,s=F,a=s.length;while(B<a)switch(r=s.charCodeAt(B),r){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=I?s.charAt(B):s[B],B++,t;case 34:for(t="@",B++;B<a;)if(r=s.charCodeAt(B),r<32)N();else if(92==r)switch(r=s.charCodeAt(++B),r){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=U[r],B++;break;case 117:for(e=++B,i=B+4;B<i;B++)r=s.charCodeAt(B),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||N();t+=X("0x"+s.slice(e,B));break;default:N()}else{if(34==r)break;r=s.charCodeAt(B),e=B;while(r>=32&&92!=r&&34!=r)r=s.charCodeAt(++B);t+=s.slice(e,B)}if(34==s.charCodeAt(B))return B++,t;N();default:if(e=B,45==r&&(n=!0,r=s.charCodeAt(++B)),r>=48&&r<=57){for(48==r&&(r=s.charCodeAt(B+1),r>=48&&r<=57)&&N(),n=!1;B<a&&(r=s.charCodeAt(B),r>=48&&r<=57);B++);if(46==s.charCodeAt(B)){for(i=++B;i<a&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&N(),B=i}if(r=s.charCodeAt(B),101==r||69==r){for(r=s.charCodeAt(++B),43!=r&&45!=r||B++,i=B;i<a&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&N(),B=i}return+s.slice(e,B)}if(n&&N(),"true"==s.slice(B,B+4))return B+=4,!0;if("false"==s.slice(B,B+5))return B+=5,!1;if("null"==s.slice(B,B+4))return B+=4,null;N()}return"$"},Y=function t(e){var i,n;if("$"==e&&N(),"string"==typeof e){if("@"==(I?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(i=[];;n||(n=!0)){if(e=G(),"]"==e)break;n&&(","==e?(e=G(),"]"==e&&N()):N()),","==e&&N(),i.push(t(e))}return i}if("{"==e){for(i={};;n||(n=!0)){if(e=G(),"}"==e)break;n&&(","==e?(e=G(),"}"==e&&N()):N()),","!=e&&"string"==typeof e&&"@"==(I?e.charAt(0):e[0])&&":"==G()||N(),i[e.slice(1)]=t(G())}return i}N()}return e},H=function(t,e,i){var n=V(t,e,i);n===m?delete t[e]:t[e]=n},V=function(t,e,i){var n,s=t[e];if("object"==a(r["a"])(s)&&s)if(g.call(s)==T)for(n=s.length;n--;)H(s,n,i);else _(s,(function(t){H(s,t,i)}));return i.call(t,e,s)};e.parse=function(t,e){var i,n;return B=0,F=""+t,i=Y(G()),"$"!=G()&&N(),B=F=null,e&&g.call(e)==w?V((n={},n[""]=i,n),"",e):i}}}return e["runInContext"]=l,e}if(!c||c["global"]!==c&&c["window"]!==c&&c["self"]!==c||(o=c),a&&!e)l(o,a);else{var h=o.JSON,u=o["JSON3"],d=!1,f=l(o,o["JSON3"]={noConflict:function(){return d||(d=!0,o.JSON=h,o["JSON3"]=u,h=u=null),f}});o.JSON={parse:f.parse,stringify:f.stringify}}e&&define((function(){return f}))}.call(this),function(){var t={a:function(){return t.el("a")},svg:function(){return t.el("svg")},object:function(){return t.el("object")},image:function(){return t.el("image")},img:function(){return t.el("img")},style:function(){return t.el("style")},link:function(){return t.el("link")},script:function(){return t.el("script")},audio:function(){return t.el("audio")},video:function(){return t.el("video")},text:function(t){return document.createTextNode(t)},el:function(t){return document.createElement(t)}};o.Elements=t}(),function(){var t={ABSOLUTE_PATT:/^(?:\w+:)?\/{2}/i,RELATIVE_PATT:/^[./]*?\//i,EXTENSION_PATT:/\/?[^/]+\.(\w{1,5})$/i,parseURI:function(e){var i={absolute:!1,relative:!1,protocol:null,hostname:null,port:null,pathname:null,search:null,hash:null,host:null};if(null==e)return i;var n=o.Elements.a();for(var r in n.href=e,i)r in n&&(i[r]=n[r]);var s,a=e.indexOf("?");return a>-1&&(e=e.substr(0,a)),t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(s=e.match(t.EXTENSION_PATT))&&(i.extension=s[1].toLowerCase()),i},formatQueryString:function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var n in t)i.push(n+"="+escape(t[n]));return e&&(i=i.concat(e)),i.join("&")},buildURI:function(t,e){if(null==e)return t;var i=[],n=t.indexOf("?");if(-1!=n){var r=t.slice(n+1);i=i.concat(r.split("&"))}return-1!=n?t.slice(0,n)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},isCrossDomain:function(t){var e=o.Elements.a();e.href=t.src;var i=o.Elements.a();i.href=location.href;var n=""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname);return n},isLocal:function(t){var e=o.Elements.a();return e.href=t.src,""==e.hostname&&"file:"==e.protocol}};o.URLUtils=t}(),function(){var t={container:null,appendToHead:function(e){t.getHead().appendChild(e)},appendToBody:function(e){if(null==t.container){t.container=document.createElement("div"),t.container.id="preloadjs-container";var i=t.container.style;i.visibility="hidden",i.position="absolute",i.width=t.container.style.height="10px",i.overflow="hidden",i.transform=i.msTransform=i.webkitTransform=i.oTransform="translate(-10px, -10px)",t.getBody().appendChild(t.container)}t.container.appendChild(e)},getHead:function(){return document.head||document.getElementsByTagName("head")[0]},getBody:function(){return document.body||document.getElementsByTagName("body")[0]},removeChild:function(t){t.parent&&t.parent.removeChild(t)},isImageTag:function(t){return t instanceof HTMLImageElement},isAudioTag:function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},isVideoTag:function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement}};o.DomUtils=t}(),function(){var t={parseXML:function(t){var e=null;try{if(window.DOMParser){var i=new DOMParser;e=i.parseFromString(t,"text/xml")}}catch(n){}if(!e)try{e=new ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(t)}catch(n){e=null}return e},parseJSON:function(t){if(null==t)return null;try{return JSON.parse(t)}catch(e){throw e}}};o.DataUtils=t}(),this.createjs=this.createjs||{},function(){var t={BINARY:"binary",CSS:"css",FONT:"font",FONTCSS:"fontcss",IMAGE:"image",JAVASCRIPT:"javascript",JSON:"json",JSONP:"jsonp",MANIFEST:"manifest",SOUND:"sound",VIDEO:"video",SPRITESHEET:"spritesheet",SVG:"svg",TEXT:"text",XML:"xml"};o.Types=t}(),this.createjs=this.createjs||{},function(){var t={POST:"POST",GET:"GET"};o.Methods=t}(),this.createjs=this.createjs||{},function(){function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=o.Methods.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var n=new t;return n.src=e,n}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},o.LoadItem=i}(),function(){var t={isBinary:function(t){switch(t){case o.Types.IMAGE:case o.Types.BINARY:return!0;default:return!1}},isText:function(t){switch(t){case o.Types.TEXT:case o.Types.JSON:case o.Types.MANIFEST:case o.Types.XML:case o.Types.CSS:case o.Types.SVG:case o.Types.JAVASCRIPT:case o.Types.SPRITESHEET:return!0;default:return!1}},getTypeByExtension:function(t){if(null==t)return o.Types.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return o.Types.IMAGE;case"ogg":case"mp3":case"webm":return o.Types.SOUND;case"mp4":case"webm":case"ts":return o.Types.VIDEO;case"json":return o.Types.JSON;case"xml":return o.Types.XML;case"css":return o.Types.CSS;case"js":return o.Types.JAVASCRIPT;case"svg":return o.Types.SVG;default:return o.Types.TEXT}}};o.RequestUtils=t}(),this.createjs=this.createjs||{},function(){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?o.LoadItem.create(t):null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=o.extend(t,o.EventDispatcher),i=t;try{Object.defineProperties(i,{POST:{get:o.deprecate((function(){return o.Methods.POST}),"AbstractLoader.POST")},GET:{get:o.deprecate((function(){return o.Methods.GET}),"AbstractLoader.GET")},BINARY:{get:o.deprecate((function(){return o.Types.BINARY}),"AbstractLoader.BINARY")},CSS:{get:o.deprecate((function(){return o.Types.CSS}),"AbstractLoader.CSS")},FONT:{get:o.deprecate((function(){return o.Types.FONT}),"AbstractLoader.FONT")},FONTCSS:{get:o.deprecate((function(){return o.Types.FONTCSS}),"AbstractLoader.FONTCSS")},IMAGE:{get:o.deprecate((function(){return o.Types.IMAGE}),"AbstractLoader.IMAGE")},JAVASCRIPT:{get:o.deprecate((function(){return o.Types.JAVASCRIPT}),"AbstractLoader.JAVASCRIPT")},JSON:{get:o.deprecate((function(){return o.Types.JSON}),"AbstractLoader.JSON")},JSONP:{get:o.deprecate((function(){return o.Types.JSONP}),"AbstractLoader.JSONP")},MANIFEST:{get:o.deprecate((function(){return o.Types.MANIFEST}),"AbstractLoader.MANIFEST")},SOUND:{get:o.deprecate((function(){return o.Types.SOUND}),"AbstractLoader.SOUND")},VIDEO:{get:o.deprecate((function(){return o.Types.VIDEO}),"AbstractLoader.VIDEO")},SPRITESHEET:{get:o.deprecate((function(){return o.Types.SPRITESHEET}),"AbstractLoader.SPRITESHEET")},SVG:{get:o.deprecate((function(){return o.Types.SVG}),"AbstractLoader.SVG")},TEXT:{get:o.deprecate((function(){return o.Types.TEXT}),"AbstractLoader.TEXT")},XML:{get:o.deprecate((function(){return o.Types.XML}),"AbstractLoader.XML")}})}catch(n){}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 o.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 o.XHRRequest(this._item):this._request=new o.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 o.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 o.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 o.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,o.proxy(this._resultFormatSuccess,this),o.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 o.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"));break}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.toString=function(){return"[PreloadJS AbstractLoader]"},o.AbstractLoader=o.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){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=o.extend(t,o.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 o.XHRRequest(this._item):this._request=new o.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()},o.AbstractMediaLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=function(t){this._item=t},e=o.extend(t,o.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},o.AbstractRequest=o.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=o.proxy(this._handleTagComplete,this),this._addedToDOM=!1}var e=o.extend(t,o.AbstractRequest);e.load=function(){this._tag.onload=o.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=o.proxy(this._handleReadyStateChange,this),this._tag.onerror=o.proxy(this._handleError,this);var t=new o.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(o.DomUtils.appendToBody(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.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new o.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._handleStalled=function(){},o.TagRequest=o.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=o.proxy(this._handleTagComplete,this)}var e=o.extend(t,o.TagRequest);e.load=function(){var t=o.proxy(this._handleStalled,this);this._stalledCallback=t;var e=o.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 o.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()},o.MediaTagRequest=o.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){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=o.proxy(this._handleLoadStart,this),this._handleProgressProxy=o.proxy(this._handleProgress,this),this._handleAbortProxy=o.proxy(this._handleAbort,this),this._handleErrorProxy=o.proxy(this._handleError,this),this._handleTimeoutProxy=o.proxy(this._handleTimeout,this),this._handleLoadProxy=o.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=o.proxy(this._handleReadyStateChange,this),this._createXHR(t)}var e=o.extend(t,o.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(o.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values?this._request.send(o.URLUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new o.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 o.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 o.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new o.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(n){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===n.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new o.Event("complete"))}}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new o.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);return t>=400&&t<=599?new Error(t):0==t&&/^https?:/.test(location.protocol)?new Error(0):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=o.URLUtils.isCrossDomain(t),i={},n=null;if(window.XMLHttpRequest)n=new XMLHttpRequest,e&&void 0===n.withCredentials&&window.XDomainRequest&&(n=new XDomainRequest);else{for(var r=0,a=s.ACTIVEX_VERSIONS.length;r<a;r++){var c=s.ACTIVEX_VERSIONS[r];try{n=new ActiveXObject(c);break}catch(u){}}if(null==n)return!1}null==t.mimeType&&o.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&n.overrideMimeType&&n.overrideMimeType(t.mimeType),this._xhrLevel="string"===typeof n.responseType?2:1;var l=null;if(l=t.method==o.Methods.GET?o.URLUtils.buildURI(t.src,t.values):t.src,n.open(t.method||o.Methods.GET,l,!0),e&&n instanceof XMLHttpRequest&&1==this._xhrLevel&&(i["Origin"]=location.origin),t.values&&t.method==o.Methods.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var h in t.headers)i[h]=t.headers[h];for(h in i)n.setRequestHeader(h,i[h]);return n instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(n.withCredentials=t.withCredentials),this._request=n,!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]"},o.XHRRequest=o.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){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=[o.FontLoader,o.ImageLoader,o.JavaScriptLoader,o.CSSLoader,o.JSONLoader,o.JSONPLoader,o.SoundLoader,o.ManifestLoader,o.SpriteSheetLoader,o.XMLLoader,o.SVGLoader,o.BinaryLoader,o.VideoLoader,o.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(t,e,i)}var e=o.extend(t,o.AbstractLoader),i=t;try{Object.defineProperties(i,{POST:{get:o.deprecate((function(){return o.Methods.POST}),"AbstractLoader.POST")},GET:{get:o.deprecate((function(){return o.Methods.GET}),"AbstractLoader.GET")},BINARY:{get:o.deprecate((function(){return o.Types.BINARY}),"AbstractLoader.BINARY")},CSS:{get:o.deprecate((function(){return o.Types.CSS}),"AbstractLoader.CSS")},FONT:{get:o.deprecate((function(){return o.Types.FONT}),"AbstractLoader.FONT")},FONTCSS:{get:o.deprecate((function(){return o.Types.FONTCSS}),"AbstractLoader.FONTCSS")},IMAGE:{get:o.deprecate((function(){return o.Types.IMAGE}),"AbstractLoader.IMAGE")},JAVASCRIPT:{get:o.deprecate((function(){return o.Types.JAVASCRIPT}),"AbstractLoader.JAVASCRIPT")},JSON:{get:o.deprecate((function(){return o.Types.JSON}),"AbstractLoader.JSON")},JSONP:{get:o.deprecate((function(){return o.Types.JSONP}),"AbstractLoader.JSONP")},MANIFEST:{get:o.deprecate((function(){return o.Types.MANIFEST}),"AbstractLoader.MANIFEST")},SOUND:{get:o.deprecate((function(){return o.Types.SOUND}),"AbstractLoader.SOUND")},VIDEO:{get:o.deprecate((function(){return o.Types.VIDEO}),"AbstractLoader.VIDEO")},SPRITESHEET:{get:o.deprecate((function(){return o.Types.SPRITESHEET}),"AbstractLoader.SPRITESHEET")},SVG:{get:o.deprecate((function(){return o.Types.SVG}),"AbstractLoader.SVG")},TEXT:{get:o.deprecate((function(){return o.Types.TEXT}),"AbstractLoader.TEXT")},XML:{get:o.deprecate((function(){return o.Types.XML}),"AbstractLoader.XML")}})}catch(n){}e.init=function(t,e,i){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},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&&e<this._defaultLoaderLength-1&&this._availableLoaders.splice(e,1)},e.setPreferXHR=function(t){return this.preferXHR=0!=t&&null!=window.XMLHttpRequest,this.preferXHR},e.removeAll=function(){this.remove()},e.remove=function(t){var e=null;if(t&&!Array.isArray(t))e=[t];else if(t)e=t;else if(arguments.length>0)return;var i=!1;if(e){while(e.length){var n=e.pop(),r=this.getResult(n);for(s=this._loadQueue.length-1;s>=0;s--)if(a=this._loadQueue[s].getItem(),a.id==n||a.src==n){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if(a=this._loadQueueBackup[s].getItem(),a.id==n||a.src==n){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(r)this._disposeItem(this.getItem(n));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==n||a.src==n){this._currentLoads.splice(s,1)[0].cancel(),i=!0;break}}}i&&this._loadNext()}else{for(var o in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[o]);this.init(this.preferXHR,this._basePath)}},e.reset=function(){for(var t in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[t]);for(var e=[],i=0,n=this._loadQueueBackup.length;i<n;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,n=e.types.length;i<n;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,n=e.extensions.length;i<n;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 n=new o.ErrorEvent("PRELOAD_NO_FILE");this._sendError(n)}},e.loadManifest=function(t,e,n){var s=null,a=null;if(Array.isArray(t)){if(0==t.length){var c=new o.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(c)}s=t}else if("string"===typeof t)s=[{src:t,type:i.MANIFEST}];else{if("object"!=Object(r["a"])(t)){c=new o.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(c)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var c=new o.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(c)}s=[t]}else void 0!==t.manifest&&(s=t.manifest,a=t.path)}for(var l=0,h=s.length;l<h;l++)this._addItem(s[l],a,n);!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 n=i.id;return e&&this._loadedRawResults[n]?this._loadedRawResults[n]:this._loadedResults[n]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var n=this._loadItemsById[i],r=this.getResult(i);!0===t&&null==r||e.push({item:n,result:r,rawResult:this.getResult(i,!0)})}return e},e.setPaused=function(t){this._paused=t,this._paused||this._loadNext()},e.close=function(){while(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 n=this._createLoadItem(t,e,i);if(null!=n){var r=this._createLoader(n);null!=r&&("plugins"in r&&(r.plugins=this._plugins),n._loader=r,this._loadQueue.push(r),this._loadQueueBackup.push(r),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&n.type==o.Types.JAVASCRIPT||!0===n.maintainOrder)&&(this._scriptOrder.push(n),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var n=o.LoadItem.create(t);if(null==n)return null;var r="",s=i||this._basePath;if(n.src instanceof Object){if(!n.type)return null;if(e){r=e;var a=o.URLUtils.parseURI(e);null==s||a.absolute||a.relative||(r=s+r)}else null!=s&&(r=s)}else{var c=o.URLUtils.parseURI(n.src);c.extension&&(n.ext=c.extension),null==n.type&&(n.type=o.RequestUtils.getTypeByExtension(n.ext));var l=n.src;if(!c.absolute&&!c.relative)if(e){r=e;a=o.URLUtils.parseURI(e);l=e+l,null==s||a.absolute||a.relative||(r=s+r)}else null!=s&&(r=s);n.src=r+n.src}n.path=r,void 0!==n.id&&null!==n.id&&""!==n.id||(n.id=l);var h=this._typeCallbacks[n.type]||this._extensionCallbacks[n.ext];if(h){var u=h.callback.call(h.scope,n,this);if(!1===u)return null;!0===u||null!=u&&(n._loader=u),c=o.URLUtils.parseURI(n.src),null!=c.extension&&(n.ext=c.extension)}return this._loadItemsById[n.id]=n,this._loadItemsBySrc[n.src]=n,null==n.crossOrigin&&(n.crossOrigin=this._crossOrigin),n},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i<this._availableLoaders.length;i++){var n=this._availableLoaders[i];if(n&&n.canLoadItem(t))return new n(t,e)}return null},e._loadNext=function(){if(!this._paused){this._loadStartWasDispatched||(this._sendLoadStart(),this._loadStartWasDispatched=!0),this._numItems==this._numItemsLoaded?(this.loaded=!0,this._sendComplete(),this.next&&this.next.load&&this.next.load()):this.loaded=!1;for(var t=0;t<this._loadQueue.length;t++){if(this._currentLoads.length>=this._maxConnections)break;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 o.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 o.ErrorEvent("FILE_LOAD_ERROR",null,e.getItem());this._sendError(i),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(e),this._cleanLoadItem(e),this._loadNext())},e._handleFileComplete=function(t){var e=t.target,i=e.getItem(),n=e.getResult();this._loadedResults[i.id]=n;var r=e.getResult(!0);null!=r&&r!==n&&(this._loadedRawResults[i.id]=r),this._saveLoadedItems(e),this._removeLoadItem(e),this._finishOrderedItem(e)||this._processFinishedLoad(i,e),this._cleanLoadItem(e)},e._saveLoadedItems=function(t){var e=t.getLoadedItems();if(null!==e)for(var i=0;i<e.length;i++){var n=e[i].item;this._loadItemsBySrc[n.src]=n,this._loadItemsById[n.id]=n,this._loadedResults[n.id]=e[i].result,this._loadedRawResults[n.id]=e[i].rawResult}},e._finishOrderedItem=function(t,e){var i=t.getItem();if(this.maintainScriptOrder&&i.type==o.Types.JAVASCRIPT||i.maintainOrder){t instanceof o.JavaScriptLoader&&(this._currentlyLoadingScript=!1);var n=o.indexOf(this._scriptOrder,i);return-1!=n&&(this._loadedScripts[n]=!0===e||i,this._checkScriptLoadOrder(),!0)}return!1},e._checkScriptLoadOrder=function(){for(var t=this._loadedScripts.length,e=0;e<t;e++){var i=this._loadedScripts[e];if(null===i)break;if(!0!==i){var n=this._loadedResults[i.id];i.type==o.Types.JAVASCRIPT&&o.DomUtils.appendToHead(n);var r=i._loader;this._processFinishedLoad(i,r),this._loadedScripts[e]=!0}}},e._processFinishedLoad=function(t,e){if(this._numItemsLoaded++,!this.maintainScriptOrder&&t.type==o.Types.JAVASCRIPT){var i=e.getTag();o.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!=o.Types.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;var i=this._scriptOrder.indexOf(e),n=0;while(n<i){var r=this._loadedScripts[n];if(null==r)return!1;n++}return this._currentlyLoadingScript=!0,!0},e._removeLoadItem=function(t){for(var e=this._currentLoads.length,i=0;i<e;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,n=0,r=this._currentLoads.length;n<r;n++)i+=this._currentLoads[n].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 o.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 o.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 o.Event("filestart");e.item=t,this.hasEventListener("filestart")&&this.dispatchEvent(e)},e.toString=function(){return"[PreloadJS LoadQueue]"},o.LoadQueue=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.TEXT)}o.extend(t,o.AbstractLoader);var e=t;e.canLoadItem=function(t){return t.type==o.Types.TEXT},o.TextLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.BINARY),this.on("initialize",this._updateXHR,this)}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.BINARY},e._updateXHR=function(t){t.loader.setResponseType("arraybuffer")},o.BinaryLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",this._tag=e?o.Elements.style():o.Elements.link(),this._tag.rel="stylesheet",this._tag.type="text/css"}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.CSS},e._formatResult=function(t){if(this._preferXHR){var e=t.getTag();if(e.styleSheet)e.styleSheet.cssText=t.getResult(!0);else{var i=o.Elements.text(t.getResult(!0));e.appendChild(i)}}else e=this._tag;return o.DomUtils.appendToHead(e),e},o.CSSLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,t.type),this._faces={},this._watched=[],this._count=0,this._watchInterval=null,this._loadTimeout=null,this._injectCSS=void 0===t.injectCSS||t.injectCSS,this.dispatchEvent("initialize")}var e=o.extend(t,o.AbstractLoader);t.canLoadItem=function(t){return t.type==o.Types.FONT||t.type==o.Types.FONTCSS},t.sampleText="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ",t._ctx=document.createElement("canvas").getContext("2d"),t._referenceFonts=["serif","monospace"],t.WEIGHT_REGEX=/[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/gi,t.STYLE_REGEX=/[- ._]*(italic|oblique)[- ._]*/gi,t.FONT_FORMAT={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"truetype"},t.FONT_WEIGHT={thin:100,extralight:200,ultralight:200,light:300,semilight:300,demilight:300,book:"normal",regular:"normal",semibold:600,demibold:600,extrabold:800,ultrabold:800,black:900,heavy:900},t.WATCH_DURATION=10,e.load=function(){if(this.type==o.Types.FONTCSS){var t=this._watchCSS();if(!t)return void this.AbstractLoader_load()}else if(this._item.src instanceof Array)this._watchFontArray();else{var e=this._defFromSrc(this._item.src);this._watchFont(e),this._injectStyleTag(this._cssFromDef(e))}this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout),this.dispatchEvent("loadstart")},e._handleTimeout=function(){this._stopWatching(),this.dispatchEvent(new o.ErrorEvent("PRELOAD_TIMEOUT"))},e._createRequest=function(){return this._request},e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response,this._result=!0,this._parseCSS(this._rawResult);break;case"error":this._stopWatching(),this.AbstractLoader_handleEvent(t);break}},e._watchCSS=function(){var t=this._item.src;return t instanceof HTMLStyleElement&&(this._injectCSS&&!t.parentNode&&(document.head||document.getElementsByTagName("head")[0]).appendChild(t),this._injectCSS=!1,t="\n"+t.textContent),-1!==t.search(/\n|\r|@font-face/i)?(this._parseCSS(t),!0):(this._request=new o.XHRRequest(this._item),!1)},e._parseCSS=function(t){var e=/@font-face\s*\{([^}]+)}/g;while(1){var i=e.exec(t);if(!i)break;this._watchFont(this._parseFontFace(i[1]))}this._injectStyleTag(t)},e._watchFontArray=function(){for(var t,e=this._item.src,i="",n=e.length-1;n>=0;n--){var r=e[n];t="string"===typeof r?this._defFromSrc(r):this._defFromObj(r),this._watchFont(t),i+=this._cssFromDef(t)+"\n"}this._injectStyleTag(i)},e._injectStyleTag=function(t){if(this._injectCSS){var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)}},e._parseFontFace=function(t){var e=this._getCSSValue(t,"font-family"),i=this._getCSSValue(t,"src");return e&&i?this._defFromObj({family:e,src:i,style:this._getCSSValue(t,"font-style"),weight:this._getCSSValue(t,"font-weight")}):null},e._watchFont=function(t){t&&!this._faces[t.id]&&(this._faces[t.id]=t,this._watched.push(t),this._count++,this._calculateReferenceSizes(t),this._startWatching())},e._startWatching=function(){null==this._watchInterval&&(this._watchInterval=setInterval(o.proxy(this._watch,this),t.WATCH_DURATION))},e._stopWatching=function(){clearInterval(this._watchInterval),clearTimeout(this._loadTimeout),this._watchInterval=null},e._watch=function(){for(var e=this._watched,i=t._referenceFonts,n=e.length,r=n-1;r>=0;r--)for(var s=e[r],a=s.refs,c=a.length-1;c>=0;c--){var l=this._getTextWidth(s.family+","+i[c],s.weight,s.style);if(l!=a[c]){var h=new o.Event("fileload");s.type="font-family",h.item=s,this.dispatchEvent(h),e.splice(r,1);break}}if(n!==e.length){h=new o.ProgressEvent(this._count-e.length,this._count);this.dispatchEvent(h)}0===n&&(this._stopWatching(),this._sendComplete())},e._calculateReferenceSizes=function(e){for(var i=t._referenceFonts,n=e.refs=[],r=0;r<i.length;r++)n[r]=this._getTextWidth(i[r],e.weight,e.style)},e._defFromSrc=function(e){var i,n=/[- ._]+/g,r=e,s=null;i=r.search(/[?#]/),-1!==i&&(r=r.substr(0,i)),i=r.lastIndexOf("."),-1!==i&&(s=r.substr(i+1),r=r.substr(0,i)),i=r.lastIndexOf("/"),-1!==i&&(r=r.substr(i+1));var a=r,o=a.match(t.WEIGHT_REGEX);o&&(o=o[0],a=a.replace(o,""),o=o.replace(n,"").toLowerCase());var c=r.match(t.STYLE_REGEX);c&&(a=a.replace(c[0],""),c="italic"),a=a.replace(n,"");var l="local('"+r.replace(n," ")+"'), url('"+e+"')",h=t.FONT_FORMAT[s];return h&&(l+=" format('"+h+"')"),this._defFromObj({family:a,weight:t.FONT_WEIGHT[o]||o,style:c,src:l})},e._defFromObj=function(t){var e={family:t.family,src:t.src,style:t.style||"normal",weight:t.weight||"normal"};return e.id=e.family+";"+e.style+";"+e.weight,e},e._cssFromDef=function(t){return"@font-face {\n\tfont-family: '"+t.family+"';\n\tfont-style: "+t.style+";\n\tfont-weight: "+t.weight+";\n\tsrc: "+t.src+";\n}"},e._getTextWidth=function(e,i,n){var r=t._ctx;return r.font=n+" "+i+" 72px "+e,r.measureText(t.sampleText).width},e._getCSSValue=function(t,e){var i=new RegExp(e+":s*([^;}]+?)s*[;}]"),n=i.exec(t);return n&&n[1]?n[1]:null},o.FontLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",o.DomUtils.isImageTag(t)?this._tag=t:o.DomUtils.isImageTag(t.src)?this._tag=t.src:o.DomUtils.isImageTag(t.tag)&&(this._tag=t.tag),null!=this._tag?this._preferXHR=!1:this._tag=o.Elements.img(),this.on("initialize",this._updateXHR,this)}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.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||o.URLUtils.isLocal(this._item)||(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,n=window.URL||window.webkitURL;if(this._preferXHR)if(n){var r=n.createObjectURL(this.getResult(!0));i.src=r,i.addEventListener("load",this._cleanUpURL,!1),i.addEventListener("error",this._cleanUpURL,!1)}else i.src=this._item.src;else;i.complete?t(i):(i.onload=o.proxy((function(){t(this._tag),i.onload=i.onerror=null}),this),i.onerror=o.proxy((function(t){e(new o.ErrorEvent("IMAGE_FORMAT",null,t)),i.onload=i.onerror=null}),this))},e._cleanUpURL=function(t){var e=window.URL||window.webkitURL;e.revokeObjectURL(t.target.src)},o.ImageLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(o.Elements.script())}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.JAVASCRIPT},e._formatResult=function(t){var e=t.getTag();return this._preferXHR&&(e.text=t.getResult(!0)),e},o.JavaScriptLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.JSON),this.resultFormatter=this._formatResult}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.JSON},e._formatResult=function(t){var e=null;try{e=o.DataUtils.parseJSON(t.getResult(!0))}catch(n){var i=new o.ErrorEvent("JSON_FORMAT",null,n);return this._sendError(i),n}return e},o.JSONLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!1,o.Types.JSONP),this.setTag(o.Elements.script()),this.getTag().type="text/javascript"}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.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]=o.proxy(this._handleLoad,this),o.DomUtils.appendToBody(this._tag),this._loadTimeout=setTimeout(o.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 o.ErrorEvent("timeout"))},e._dispose=function(){o.DomUtils.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},o.JSONPLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.MANIFEST),this.plugins=null,this._manifestQueue=null}var e=o.extend(t,o.AbstractLoader),i=t;i.MANIFEST_PROGRESS=.25,i.canLoadItem=function(t){return t.type==o.Types.MANIFEST},e.load=function(){this.AbstractLoader_load()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new o.JSONPLoader(this._item):new o.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 o.LoadQueue(this._preferXHR);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,n=this.plugins.length;i<n;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 o.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},o.ManifestLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,o.Types.SOUND),o.DomUtils.isAudioTag(t)||o.DomUtils.isAudioTag(t.src)?this._tag=t:o.DomUtils.isAudioTag(t.tag)&&(this._tag=o.DomUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=o.extend(t,o.AbstractMediaLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.SOUND},e._createTag=function(t){var e=o.Elements.audio();return e.autoplay=!1,e.preload="none",e.src=t,e},o.SoundLoader=o.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,o.Types.VIDEO),o.DomUtils.isVideoTag(t)||o.DomUtils.isVideoTag(t.src)?(this.setTag(o.DomUtils.isVideoTag(t)?t:t.src),this._preferXHR=!1):this.setTag(this._createTag())}var e=o.extend(t,o.AbstractMediaLoader),i=t;e._createTag=function(){return o.Elements.video()},i.canLoadItem=function(t){return t.type==o.Types.VIDEO},o.VideoLoader=o.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.SPRITESHEET),this._manifestQueue=null}var e=o.extend(t,o.AbstractLoader),i=t;i.SPRITESHEET_PROGRESS=.25,i.canLoadItem=function(t){return t.type==o.Types.SPRITESHEET},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new o.JSONPLoader(this._item):new o.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 o.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,n=i.indexOf(t.item.src);i[n]=e}},e._handleManifestComplete=function(t){this._result=new o.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 o.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},o.SpriteSheetLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",e?this.setTag(o.Elements.svg()):(this.setTag(o.Elements.object()),this.getTag().type="image/svg+xml")}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.SVG},e._formatResult=function(t){var e=o.DataUtils.parseXML(t.getResult(!0)),i=t.getTag();if(!this._preferXHR&&document.body.contains(i)&&document.body.removeChild(i),null!=e.documentElement){var n=e.documentElement;return document.importNode&&(n=document.importNode(n,!0)),i.appendChild(n),i}return e},o.SVGLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.XML),this.resultFormatter=this._formatResult}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.XML},e._formatResult=function(t){return o.DataUtils.parseXML(t.getResult(!0))},o.XMLLoader=o.promote(t,"AbstractLoader")}()},o=window.createjs=window.createjs||{};a.call(window),e["a"]=o}).call(this,i("dd40")(t),i("c8ba"))},"06f5":function(t,e,i){},"07b4":function(t,e,i){},"0bae":function(t,e,i){},"0c68":function(t,e,i){"use strict";var n=i("f718"),r=i.n(n);r.a},"0fcc":function(t,e,i){"use strict";var n=i("a3e9"),r=i.n(n);r.a},"107f":function(t,e,i){},1414:function(t,e,i){},"171c":function(t,e,i){},"1d4d":function(t,e,i){},"1d58":function(t,e,i){},"1e9d":function(t,e,i){},"206b":function(t,e,i){"use strict";var n=i("2dc3"),r=i.n(n);r.a},"21b6":function(t,e,i){},2216:function(t,e,i){},"253b":function(t,e,i){},2618:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_SCALED.code,_=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.deltaScaleX=s.deltaScaleX||0,r.deltaScaleY=s.deltaScaleY||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){if(!t||!t.visible)return 2;if(t.sortId!==this.id)return 1;var e=t.scaleX>=0?1:-1;t.scaleX=(Math.abs(t.scaleX)+this.deltaScaleX)*e;var i=t.scaleY>=0?1:-1;t.scaleY=(Math.abs(t.scaleY)+this.deltaScaleY)*i,t.scaleX=parseFloat(t.scaleX.toFixed(4)),t.scaleY=parseFloat(t.scaleY.toFixed(4))}},{key:"restore",value:function(){var t=new i(this.type);return t.id=this.id,t.deltaScaleX=-this.deltaScaleX,t.deltaScaleY=-this.deltaScaleY,t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.deltaScaleX=parseFloat(this.data.getFloat32(7,!1).toFixed(4)),this.deltaScaleY=parseFloat(this.data.getFloat32(11,!1).toFixed(4))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<15)&&this.setData(new DataView(new ArrayBuffer(15))),this.dataByteLength=15,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);return this.data.setFloat32(7,this.deltaScaleX,!1),this.data.setFloat32(11,this.deltaScaleY,!1),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=_},"27fb":function(t,e,i){},"2dc3":function(t,e,i){},"32a4":function(t,e,i){"use strict";i.d(e,"c",(function(){return _})),i.d(e,"a",(function(){return m}));var n=i("7618"),r=(i("0d6d"),i("6b54"),i("2397"),i("d225")),s=i("4e2b"),a=i("308d"),o=i("6bb5"),c=i("f28b");function l(t){var e=h();return function(){var i,n=Object(o["a"])(t);if(e){var r=Object(o["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(a["a"])(this,i)}}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var u=function(t){Object(s["a"])(i,t);var e=l(i);function i(t){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(r["a"])(this,i),n=e.call(this,t),n.code=s,n}return i}(Object(c["a"])(String)),d=Date.now||function(){return(new Date).getTime()},f=function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("undefined"===typeof t.startTime||e)return t.startTime=d(),0;var i=parseInt((d()-t.startTime)/100);return t.startTime=d(),i},p=Object.freeze({INPUT_COMMAND:Object.freeze(new u("input-command",223)),STAMP_ADDED:Object.freeze(new u("stamp-added",234)),STAMP_SCALED:Object.freeze(new u("stamp-scaled",235)),STAMP_SCALE_FLIPPED:Object.freeze(new u("stamp-scale-flipped",233)),STAMP_ROTATED:Object.freeze(new u("stamp-rotated",236)),STAMP_MOVED:Object.freeze(new u("stamp-moved",237)),STAMP_COLOR_CHANGED:Object.freeze(new u("stamp-color-changed",238)),STAMP_REMOVED:Object.freeze(new u("stamp-removed",250)),STAMP_PINCH:Object.freeze(new u("stamp-pinch",232)),ITEM_SCALED:Object.freeze(new u("item-scaled",251)),ITEM_ROTATED:Object.freeze(new u("item-rotated",252)),ITEM_MOVED:Object.freeze(new u("item-moved",253)),ITEM_COLOR_CHANGED:Object.freeze(new u("item-color-changed",254)),ITEM_SHOW:Object.freeze(new u("item-show",239)),ITEM_HIDE:Object.freeze(new u("item-hide",255)),isValid:function(t){return t instanceof String&&"object"===Object(n["a"])(t)},toArray:function(){var t=[];for(var e in this)this.isValid(this[e])&&t.push(this[e]);return t}}),_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof u&&(t=t.code),"number"!==typeof t)throw new Error("Type is invalidi.");if("undefined"===typeof m[t])throw new Error("Type not found.");var n=new(m[t]())(t,e);return n.type=t,n.deltaTime=f(i),0===n.deltaTime&&(n.deltaTime=1),n},m={223:function(){return i("5d59").default},234:function(){return i("8a45").default},235:function(){return i("2618").default},232:function(){return i("91eb").default},233:function(){return i("ba35").default},236:function(){return i("54be").default},237:function(){return i("7807").default},238:function(){return i("6bc8").default},250:function(){return i("8a45").default},251:function(){return i("2618").default},252:function(){return i("54be").default},253:function(){return i("7807").default},254:function(){return i("6bc8").default},239:function(){return i("417e").default},255:function(){return i("417e").default}};e["b"]=p},3459:function(t,e,i){"use strict";var n=i("4aa4"),r=i.n(n);r.a},"368d":function(t,e,i){"use strict";var n=i("c806"),r=i.n(n);r.a},"38d4":function(t,e,i){},"417e":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].ITEM_SHOW.code,_=h["b"].ITEM_HIDE.code,m=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){this.type!==p?this.type===_&&(t.visible=!1):t.visible=!0}},{key:"restore",value:function(){var t=null;return this.type===p&&(t=new i(_),t.id=this.id),this.type===_&&(t=new i(p),t.id=this.id),t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<7)&&this.setData(new DataView(new ArrayBuffer(7))),this.dataByteLength=7,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);return Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=m},4282:function(t,e,i){},"439e":function(t,e,i){},"460a":function(t,e,i){},4762:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t;return Object(n["a"])(this,i),t=e.call(this),t.id=0,t.offsetX=0,t.offsetY=0,t}return Object(r["a"])(i,[{key:"parse",value:function(){this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset,5)),9===this.data.byteLength&&(this.offsetX=this.data.getInt16(5,!1),this.offsetY=this.data.getInt16(7,!1))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<9&&(this.offsetX||this.offsetY))&&this.setData(new DataView(new ArrayBuffer(9))),this.offsetX||this.offsetY?this.dataByteLength=9:this.dataByteLength=5,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData();for(var n=Object(h["b"])(this.id.toString(16),5),r=0;r<5;r++)this.data.setInt8(r,n[r]);return(this.offsetX||this.offsetY)&&(this.data.setInt16(5,this.offsetX||0,!1),this.data.setInt16(7,this.offsetY||0,!1)),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=f},4936:function(t,e,i){"use strict";var n=i("c5a6"),r=i.n(n);r.a},"495c":function(t,e,i){"use strict";var n=i("6b3d"),r=i.n(n);r.a},"49f5":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(n["a"])(this,i),t=e.call(this),t.type=4,t.id=r.id||0,t.sortId=r.sortId||0,t.x=r.x||0,t.y=r.y||0,t.scaleX=r.scaleX||1,t.scaleY=r.scaleY||1,t.rotation=r.rotation||0,t}return Object(r["a"])(i,[{key:"parse",value:function(){this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset,5)),this.sortId=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+5,5)),this.x=this.data.getInt16(10,!1),this.y=this.data.getInt16(12,!1),18===this.data.byteLength&&(this.rotation=this.data.getFloat32(14,!1)),22===this.data.byteLength&&(this.scaleX=this.data.getFloat32(14,!1),this.scaleY=this.data.getFloat32(18,!1)),26===this.data.byteLength&&(this.scaleX=this.data.getFloat32(14,!1),this.scaleY=this.data.getFloat32(18,!1),this.rotation=this.data.getFloat32(22,!1))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<26&&(1!==this.scaleX||1!==this.scaleY||0!==this.rotation))&&this.setData(new DataView(new ArrayBuffer(26))),this.dataByteLength=14,1===this.scaleX&&1===this.scaleY&&0!==this.rotation&&(this.dataByteLength=18),1===this.scaleX&&1===this.scaleY||0!==this.rotation||(this.dataByteLength=22),1===this.scaleX&&1===this.scaleY||0===this.rotation||(this.dataByteLength=26),this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData();for(var n=Object(h["b"])(this.id.toString(16),5),r=0;r<5;r++)this.data.setInt8(r,n[r]);for(var a=Object(h["b"])(this.sortId.toString(16),5),o=5;o<10;o++)this.data.setInt8(o,a[o-5]);return this.data.setInt16(10,this.x||0,!1),this.data.setInt16(12,this.y||0,!1),1===this.scaleX&&1===this.scaleY&&0!==this.rotation&&this.data.setFloat32(14,this.rotation,!1),1===this.scaleX&&1===this.scaleY||0!==this.rotation||(this.data.setFloat32(14,this.scaleX,!1),this.data.setFloat32(18,this.scaleY,!1)),1===this.scaleX&&1===this.scaleY||0===this.rotation||(this.data.setFloat32(14,this.scaleX,!1),this.data.setFloat32(18,this.scaleY,!1),this.data.setFloat32(22,this.rotation,!1)),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=f},"4aa4":function(t,e,i){},5232:function(t,e,i){"use strict";var n=i("abbb"),r=i.n(n);r.a},"54be":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_ROTATED.code,_=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.deltaAngle=s.deltaAngle||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){return t&&t.visible?t.sortId!==this.id?1:void(t.rotation+=this.deltaAngle):2}},{key:"restore",value:function(){var t=new i(this.type);return t.id=this.id,t.deltaAngle=-this.deltaAngle,t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.deltaAngle=parseFloat(this.data.getFloat32(7,!1).toFixed(4))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<12)&&this.setData(new DataView(new ArrayBuffer(11))),this.dataByteLength=11,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);return this.data.setFloat32(7,this.deltaAngle,!1),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=_},"560d":function(t,e,i){"use strict";var n=i("deeb"),r=i.n(n);r.a},"56d7":function(t,e,i){"use strict";i.r(e);i("cadf"),i("551c"),i("f751"),i("097d");var n=i("2b0e"),r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app"}},[!this.error&&this.visible?i("Player",{ref:"game",attrs:{id:"game-container",theme:t.theme,transparent:!1},on:{play:function(e){return t.evtProxy("play")},"save-image":function(e){return t.evtProxy("save-image")}}}):t._e(),this.error?i("div",{staticClass:"error_popup"},[i("div",{staticClass:"title"},[t._v("Oops!")]),i("span",{staticClass:"content"},[t._v(t._s(t.error))])]):t._e()],1)},s=[],a=i("7618"),o=(i("96cf"),i("3b8d")),c=(i("aef6"),i("6b54"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Theme",{ref:"wrapper",attrs:{state:t.gameState,buttons:t.selectedItemMoveButtons,colors:t.selectedItemColors,loading:t.loading,fullPageLoading:t.saveFile&&t.saveFile.saving,showSaveButton:!!t.saveAction,showStampButtons:!!t.isSelectedItemAStampObject,showUndoRedoButtons:t.enableUndoButton||t.enableRedoButton,enableUndoButton:t.enableUndoButton,enableRedoButton:t.enableRedoButton,blockStampButtons:t.isStampMovingOrDraging,saveImage:t.saveImage,poweredByHref:t.siteHomeLink,transparent:t.transparent},on:{"prepare-save":t.handlePrepareSave,"cancel-save":t.handleCancelSave,"save-game":t.handleSaveOnline,random:t.handleRandomClick,reset:t.handleResetClick,undo:t.handleUndoClick,redo:t.handleRedoClick,color:t.handleSelectColorClick,gamepad:t.handleGamePadClick,stamps:t.handleStampsApplyClick,"duplicate-stamp":t.handleDuplicateStampClick,"flip-stamp-horizontally":t.handleFlipStampHorizontallyClick},scopedSlots:t._u([{key:"welcomescreen",fn:function(){return[t.welcomeScreenData?i("WelcomeScreen",{attrs:{data:t.welcomeScreenData,showPlayButton:!t.loading},on:{"click-play":t.startLoadingGame}}):t._e()]},proxy:!0},{key:"canvas",fn:function(){return[i("GameCanvas",{ref:"display",attrs:{canvasWidth:t.manifest.gameWidth,canvasHeight:t.manifest.gameHeight}})]},proxy:!0},{key:"items",fn:function(){return[i("ScrollableList",{attrs:{items:t.selectedCategory.children,"highlight-active-items":!0},on:{select:t.handleImageClick},scopedSlots:t._u([{key:"default",fn:function(t){return[t.item.delete?i("RemoveItemsButton",{staticStyle:{"margin-top":"11px"}}):t.item&&null!==t.item.thumbnail?i("span",{style:{backgroundImage:t.item&&t.item.thumbnail?"url("+t.item.thumbnail+")":""}}):i("span",{style:{backgroundImage:t.item&&t.item.image?"url("+t.item.image+")":""}})]}}])})]},proxy:!0},{key:"categories",fn:function(){return[i("ScrollableList",{attrs:{items:t.categories},on:{select:t.handleCategoryClick},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",{style:{backgroundImage:e.item&&e.item.image?"url("+e.item.image+")":""}}),"stamps"===e.item.type?i("ScrollListItemBadge",{staticClass:"no-filter"}):t._e()]}}])})]},proxy:!0}])})}),l=[],h=(i("8e6e"),i("456d"),i("b54a"),i("34ef"),i("28a5"),i("75fc")),u=i("bd86"),d=(i("7f7f"),i("ac6a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:"g-theme "+(t.isMobileIOS?"ios-device":""),style:{backgroundColor:t.transparent?"":t.backgroundColor}},[i("div",{class:"g-theme-container "+t.columnsClass,style:{backgroundColor:t.backgroundColor}},[i("div",{style:{display:t.hideAdContainer?"none":"block"},attrs:{id:"ad-container"}}),t.fullPageLoading?i("div",{style:{backgroundColor:"rgba(0,0,0,0.3)"},attrs:{id:"full-overlay"}},[i("LoadingEllipsis")],1):t._e(),t.onWelcomeScreen?i("div",{staticClass:"g-loading",style:{backgroundColor:t.backgroundColor}},[i("div",{class:["progress-div",t.isLoadingGame?"":"hidden"]},[i("LoadingEllipsis")],1),t._t("welcomescreen")],2):t._e(),i("OverlayAnimation",{attrs:{visible:t.onSaveScreen,color:t.saveAnimationColor}}),t.onSaveScreen?i("SaveGameOverlay",{attrs:{image:t.saveImage,showSaveButton:t.showSaveButton},on:{"click-cancel":t.exitSaveMode,"click-save":t.handleSaveGameFile}}):t._e(),i("div",{ref:"container",staticClass:"g-content noselect",style:{backgroundColor:t.canvasBackgroundColor}},[t._t("canvas",[i("canvas",{attrs:{width:"9px",height:"16px"}})]),i("ScrollableColorList",{ref:"colorPicker",staticClass:"color-picker",attrs:{visible:!t.onSaveScreen,colors:t.colors},on:{color:t.handleColor,open:function(e){return t.$refs.gamePad.close()}}}),i("GamePad",{ref:"gamePad",staticClass:"game-pad",attrs:{visible:!t.onSaveScreen,buttons:t.buttons},on:{buttonclick:t.handleMove,open:function(e){return t.$refs.colorPicker.close()}}}),i("SaveButton",{class:"enter-save-mode "+t.hideSaveAndRandomButtons,on:{click:t.enterSaveMode}}),i("RandomButton",{class:"random-items "+t.hideSaveAndRandomButtons,on:{click:t.handleClickRandom}}),i("ResetButton",{class:"reset-items "+t.hideSaveAndRandomButtons,on:{click:t.handleClickReset}}),t.showUndoRedoButtons?i("div",{class:"undo-redo-items "+t.hideSaveAndRandomButtons},[i("UndoButton",{class:t.enableUndoButton?"":"button-disabled",staticStyle:{margin:"2px"},on:{click:t.handleClickUndo}}),i("RedoButton",{class:t.enableRedoButton?"":"button-disabled",staticStyle:{margin:"4px 2px"},on:{click:t.handleClickRedo}})],1):t._e(),t.onStampEditScreen?i("div",{class:"stamp-toolbar "+t.stampsButtonBlockClasses+" "+(t.canExpandItems?"expanded":"")},[i("div",{staticClass:"toolbar-tl"},[i("StampDuplicateButton",{staticClass:"btn-duplicate",on:{click:t.duplicateCurrentStamp}}),i("StampFlipHorizontalButton",{staticClass:"btn-flip-h",on:{click:t.flipCurrentStampHorizontally}})],1),i("div",{staticClass:"toolbar-br"},[i("StampRemoveButton",{staticClass:"btn-save",on:{click:t.exitStampEditMode}})],1)]):t._e(),t.poweredByHref?i("PoweredBy",{attrs:{href:t.poweredByHref,by:"meiker.io"}}):t._e(),t.isLoadingGame?i("LoadingOverlay"):t._e()],2),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],class:"g-items g-scroll-container noselect push-right-sm "+(t.canExpandItems?"visible":"")+" "+(t.onStampEditScreen?"g-no-events":"")},[t.onStampEditScreen?t._e():i("a",{staticClass:"g-btn-back-overlay",on:{click:function(e){return e.preventDefault(),t.handleClickClose(e)}}}),i("div",{staticClass:"g-scroll",style:{backgroundColor:t.itemsScrollBackgroundColor,backgroundImage:t.itemsScrollBackgroundGradient}},[t._t("items",[i("ScrollableList",{attrs:{items:[1,2,3,4,5,6,7,8,9,10],"highlight-active-items":!0}})])],2),i("ItemsBackButton",{staticClass:"g-btn-back",on:{click:t.handleClickClose}})],1),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],staticClass:"g-categories g-scroll-container noselect"},[i("div",{staticClass:"g-scroll",style:{backgroundColor:t.categoriesScrollBackgroundColor,backgroundImage:t.categoriesScrollBackgroundGradient}},[t._t("categories",[i("ScrollableList",{attrs:{items:[1,2,3,4,5,6,7,8,9,10]}})])],2)])],1),i("ResizeObserver",{on:{notify:t.handleResize}})],1)}),f=[],p=i("252c"),_=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.items instanceof Array?i("Scrollable",{ref:"scrollable",attrs:{horizontal:t.horizontal}},[[i("div",{class:"scrollable-item empty-item first "+t.orientation})],t._l(t.items,(function(e,n){return[i("ScrollableItem",{key:t.itemId+"-"+n,attrs:{selected:n===t.selectedIndex,active:t.highlightActiveItems&&e.visible,visible:!e.hideIcon},on:{click:function(i){return t.handleClick(e,n)}}},[t._t("default",[i("span",[t._v(t._s(e))])],{item:e,index:n})],2)]})),[i("div",{class:"scrollable-item empty-item latest "+t.orientation})]],2):t._e()},m=[],v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"scrollable"},[i("vuescroll",{ref:"scroll",attrs:{ops:t.ops},on:{"handle-scroll":t.handleScroll,"handle-scroll-complete":t.handleScrollComplete}},[i("div",{staticClass:"scrollable-content"},[t._t("default")],2)])],1)},g=[],b=i("c67f"),y=i.n(b),w=function(t,e){var i="onwheel"in window.document||window.document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];i.forEach((function(i){return t.addEventListener(i,e)}))},x=function(){return{bind:function(t,e,i){w(t,(function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()}))}}},E={name:"Scrollable",components:{vuescroll:y.a},data:function(){return{scrolling:!1,ops:{vuescroll:{mode:"slide",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1,locking:!0,scroller:{bouncing:{top:100,bottom:100,left:100,right:100},penetrationDeceleration:.8,penetrationAcceleration:.8}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:this.horizontal,scrollingY:!this.horizontal,speed:100,easing:void 0},bar:{disable:!1,showDelay:100,keepShow:!0,background:"#c1c1c1",opacity:.5,hoverStyle:!1,specifyBorderRadius:!1,minSize:0,size:"5px"}}}},watch:{horizontal:function(t){this.ops.scrollPanel.scrollingX=t,this.ops.scrollPanel.scrollingY=!t}},props:{horizontal:{type:Boolean,default:!1}},mounted:function(){var t=this;w(this.$el,(function(e){e.preventDefault(),t.handleMouseWhell(e)})),this.$nextTick((function(){t.scrolling=!1}))},methods:{handleMouseWhell:function(t){var e=Math.abs(Math.round(t.deltaY)),i=Math.round(t.deltaY)/e;this.$refs["scroll"].scrollBy({dy:(e>20?e:20)*i}),this.scrolling=!1,this.$emit("scroll",this.scrolling)},handleScrollUp:function(){this.$refs["scroll"].scrollBy({dy:"-200"},200,"easeOutCubic")},handleScrollDown:function(){this.$refs["scroll"].scrollBy({dy:"200"},200,"easeOutCubic")},handleScroll:function(){this.scrolling||(this.scrolling=!0)},handleScrollComplete:function(){var t=this;this.$nextTick((function(){t.scrolling=!1}))}}},S=E,T=(i("0117"),i("2877")),C=Object(T["a"])(S,v,g,!1,null,null,null),I=C.exports,O=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.visible?i("div",{class:t.classes,on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("click")}}},[t._t("default")],2):t._e()},R=[],L={name:"ScrollableItem",computed:{classes:function(){return["scrollable-item","noselect",this.active?"active":"",this.selected?"selected":""]}},props:{active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}}},k=L,A=(i("95d3"),Object(T["a"])(k,O,R,!1,null,null,null)),D=A.exports,P={name:"ScrollableList",components:{ScrollableItem:D,Scrollable:I},data:function(){return{itemId:1e4*Math.random(),scrolling:!1,selectedIndex:-1}},computed:{orientation:function(){return this.horizontal?"horizontal":"vertical"}},watch:{items:function(){this.selectedIndex=-1}},props:{horizontal:{type:Boolean,default:!1},items:{type:Array,default:null},highlightActiveItems:{type:Boolean,default:!1}},methods:{isScrolling:function(){return this.$refs["scrollable"].scrolling},handleClick:function(t,e){this.isScrolling()||(this.selectedIndex=e,this.$emit("select",t,e))}}},j=P,M=(i("675e"),Object(T["a"])(j,_,m,!1,null,null,null)),B=M.exports,F=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("span",{staticClass:"color overlay--a",style:{background:"#f9f9f9"}}),i("span",{staticClass:"color overlay--b",style:{background:t.colorB}}),i("span",{staticClass:"color overlay--c",style:{background:t.colorC}}),i("span",{staticClass:"color overlay--d",style:{background:t.colorD}})])},X=[],U=(i("a481"),{name:"OverlayAnimation",data:function(){return{hidden:!1,mouseThrough:!1}},watch:{visible:function(t){var e=this;this.hidden=!t,this.mouseThrough=!t,t&&(setTimeout((function(){e.mouseThrough=!0}),1500),setTimeout((function(){e.hidden=!0}),2500))}},computed:{classes:function(){return["overlay",this.visible?"expanded":"",this.hidden?"hide":"",this.mouseThrough?"pointer-none":""]},colorB:function(){return this.colorToRGBA(.33)},colorC:function(){return this.colorToRGBA(.66)},colorD:function(){return this.colorToRGBA(1)}},props:{visible:{type:Boolean,default:!1},color:{type:String,default:"#f69bc5"}},methods:{colorToRGBA:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.color.replace(/^#/,"");3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=parseInt(e,16),n=[i>>16,i>>8&255,255&i,t];return"rgba(".concat(n.join(","),")")}}}),N=U,G=(i("90a3"),Object(T["a"])(N,F,X,!1,null,"04e5fd06",null)),Y=G.exports,H=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow stamp-remove-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 408.483 408.483",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{attrs:{d:"M87.748,388.784c0.461,11.01,9.521,19.699,20.539,19.699h191.911c11.018,0,20.078-8.689,20.539-19.699l13.705-289.316\n H74.043L87.748,388.784z M247.655,171.329c0-4.61,3.738-8.349,8.35-8.349h13.355c4.609,0,8.35,3.738,8.35,8.349v165.293\n c0,4.611-3.738,8.349-8.35,8.349h-13.355c-4.61,0-8.35-3.736-8.35-8.349V171.329z M189.216,171.329\n c0-4.61,3.738-8.349,8.349-8.349h13.355c4.609,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.737,8.349-8.349,8.349h-13.355\n c-4.61,0-8.349-3.736-8.349-8.349V171.329L189.216,171.329z M130.775,171.329c0-4.61,3.738-8.349,8.349-8.349h13.356\n c4.61,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.738,8.349-8.349,8.349h-13.356c-4.61,0-8.349-3.736-8.349-8.349V171.329z"}}),i("path",{attrs:{d:"M343.567,21.043h-88.535V4.305c0-2.377-1.927-4.305-4.305-4.305h-92.971c-2.377,0-4.304,1.928-4.304,4.305v16.737H64.916\n c-7.125,0-12.9,5.776-12.9,12.901V74.47h304.451V33.944C356.467,26.819,350.692,21.043,343.567,21.043z"}})])])])},V=[],q=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default",style:{backgroundColor:t.backgroundColor,color:t.color}},[t._t("default")],2)},W=[],z={name:"DefaultButton",computed:{color:function(){return"#ffffff"}},props:{backgroundColor:{type:String,default:"rgba(190, 190, 190, 1)"}}},J=z,Q=(i("5232"),Object(T["a"])(J,q,W,!1,null,null,null)),$=(Q.exports,i("1ab9")),Z=i.n($),K={isDark:function(t){var e=Z.a.get.rgb(t),i=(299*e[0]+587*e[1]+114*e[2])/1e3;return i<128},isLight:function(t){return!this.isDark()}},tt=K,et={name:"StampRemoveButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRemoveItems||"#f69bc5"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},it=et,nt=(i("206b"),Object(T["a"])(it,H,V,!1,null,"30a21456",null)),rt=nt.exports,st=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow stamp-duplicate-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 21 22",xmlns:"http://www.w3.org/2000/svg"}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"}},[i("g",{attrs:{fill:t.color,id:"Core",transform:"translate(-86.000000, -127.000000)"}},[i("g",{attrs:{id:"content-copy",transform:"translate(86.500000, 127.000000)"}},[i("path",{attrs:{d:"M14,0 L2,0 C0.9,0 0,0.9 0,2 L0,16 L2,16 L2,2 L14,2 L14,0 L14,0 Z M17,4 L6,4 C4.9,4 4,4.9 4,6 L4,20 C4,21.1 4.9,22 6,22 L17,22 C18.1,22 19,21.1 19,20 L19,6 C19,4.9 18.1,4 17,4 L17,4 Z M17,20 L6,20 L6,6 L17,6 L17,20 L17,20 Z",id:"Shape"}})])])])])])])},at=[],ot={name:"StampDuplicateButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnStampButtons||"#f0f9fe"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},ct=ot,lt=(i("cb91"),Object(T["a"])(ct,st,at,!1,null,"871807f6",null)),ht=lt.exports,ut=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow stamp-flip-horizontal",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 36.8 21.65",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticClass:"cls-1",staticStyle:{fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4px"},attrs:{id:"Layer0_0_1_STROKES",stroke:t.color,d:"M27.65,8.7l8.75,8.75-8.9,8.9M12.45,8.7,3.6,17.55l32.8-.1m-24,8.9-8.8-8.8",transform:"translate(-1.6 -6.7)"}})])])},dt=[],ft={name:"StampFlipHorizontalButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnStampButtons||"#f0f9fe"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},pt=ft,_t=(i("f013"),Object(T["a"])(pt,ut,dt,!1,null,"2e255d79",null)),mt=_t.exports,vt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"btn-default powered-by"},[i("i",{staticClass:"svg-icon svg-logo",on:{click:t.toggleClick}}),t.opened?i("span",[t._v("\n powered by\n "),i("a",{attrs:{href:t.href,target:t.target}},[t._v(t._s(t.by))])]):t._e()])},gt=[],bt={name:"PoweredBy",data:function(){return{opened:!1,target:"_self"}},computed:{classes:function(){return["color-picker",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{href:{type:String,default:"#"},by:{type:String,default:"meiker.io"}},methods:{toggleClick:function(){this.opened=!this.opened}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")}},yt=bt,wt=(i("8ec8"),Object(T["a"])(yt,vt,gt,!1,null,"59d48cf1",null)),xt=wt.exports,Et=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-anim"},[i("LoadingEllipsis")],1)},St=[],Tt=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},Ct=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-ellipsis"},[i("div"),i("div"),i("div"),i("div")])}],It={name:"LoadingEllipsis"},Ot=It,Rt=(i("5b8a"),Object(T["a"])(Ot,Tt,Ct,!1,null,"c7253204",null)),Lt=Rt.exports,kt={name:"LoadingOverlay",components:{LoadingEllipsis:Lt},props:{label:{type:String,default:""}}},At=kt,Dt=(i("495c"),Object(T["a"])(At,Et,St,!1,null,"4ee8479e",null)),Pt=Dt.exports,jt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"g-save-screen",style:{backgroundColor:t.backgroundColor,display:t.display}},[i("img",{staticClass:"float-image",attrs:{src:t.image&&t.image.link}}),i("SaveImageButton",{staticClass:"btn-save",attrs:{image:t.image,target:t.saveImageTarget}}),i("SaveCancelButton",{staticClass:"btn-save-cancel",on:{click:function(e){return t.$emit("click-cancel")}}}),t.showSaveButton?i("SaveGameOnlineButton",{staticClass:"btn-save-online",on:{click:function(e){return t.$emit("click-save")}}}):t._e()],1)},Mt=[],Bt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("a",{staticClass:"btn-default btn-shadow image-save-button",style:{backgroundColor:t.backgroundColor,color:t.color},attrs:{target:t.target,href:t.image?t.image.link:"",download:t.image?t.image.name:""}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 14 19",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,15 L0,17 L14,17 L14,15 L0,15 L0,15 Z"}})]),i("span",[t._v("Download")])])},Ft=[],Xt={name:"SaveImageButton",props:{target:{type:String,default:null},image:{type:Object,default:function(){return{link:"",name:""}}}},inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSaveImage||"#f69bc5"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Ut=Xt,Nt=(i("f5fc"),Object(T["a"])(Ut,Bt,Ft,!1,null,"38e86fe2",null)),Gt=Nt.exports,Yt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow cancel-save-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 46.02 46.02",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14.757,46.02c-1.412,0-2.825-0.521-3.929-1.569c-2.282-2.17-2.373-5.78-0.204-8.063l12.758-13.418L10.637,9.645\n C8.46,7.37,8.54,3.76,10.816,1.582c2.277-2.178,5.886-2.097,8.063,0.179l16.505,17.253c2.104,2.2,2.108,5.665,0.013,7.872\n L18.893,44.247C17.77,45.424,16.267,46.02,14.757,46.02z"}})]),i("span",[t._v("Back")])])},Ht=[],Vt={name:"SaveCancelButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnCancelSave||"#b0a9f9"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},qt=Vt,Wt=(i("5bd7"),Object(T["a"])(qt,Yt,Ht,!1,null,"3c27f616",null)),zt=Wt.exports,Jt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow save-game-online-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 24 16",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M19.4,6 C18.7,2.6 15.7,0 12,0 C9.1,0 6.6,1.6 5.4,4 C2.3,4.4 0,6.9 0,10 C0,13.3 2.7,16 6,16 L19,16 C21.8,16 24,13.8 24,11 C24,8.4 21.9,6.2 19.4,6 L19.4,6 Z M10,13 L6.5,9.5 L7.9,8.1 L10,10.2 L15.2,5 L16.6,6.4 L10,13 L10,13 Z"}})]),i("span",[t._v("Save Online")])])},Qt=[],$t={name:"SaveGameOnlineButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSaveImage||"#f69bc5"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Zt=$t,Kt=(i("adaf"),Object(T["a"])(Zt,Jt,Qt,!1,null,"57ad6c12",null)),te=Kt.exports,ee={name:"SaveGameOverlay",data:function(){return{display:"flex"}},mounted:function(){var t=this;this.display="none",setTimeout((function(){return t.$nextTick((function(){t.display="flex"}))}),1e3)},components:{SaveImageButton:Gt,SaveCancelButton:zt,SaveGameOnlineButton:te},inject:["theme"],computed:{saveImageTarget:function(){return this.isInAppBrowsing()?"_self":"_blank"},backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.canvasBg||"#000000"}},props:{image:{type:Object,default:function(){return{link:"",name:""}}},showSaveButton:{type:Boolean,default:!1}},methods:{isInAppBrowsing:function(){try{var t=navigator.userAgent||navigator.vendor||window.opera;return t.indexOf("FBAN")>-1||t.indexOf("FBAV")>-1||t.indexOf("Instagram")>-1}catch(e){return!1}}}},ie=ee,ne=(i("560d"),Object(T["a"])(ie,jt,Mt,!1,null,"3be4750c",null)),re=ne.exports,se=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("ColorPickerButton",{staticClass:"color-items",on:{click:t.toggleColor}}),t.colors?i("div",{staticClass:"selector"},[t.colors?i("ScrollableList",{attrs:{items:t.colors},on:{select:t.handleColor},scopedSlots:t._u([{key:"default",fn:function(t){return[i("span",{staticClass:"color btn-shadow no-filter",style:{"background-color":t.item}})]}}],null,!1,2985978270)}):t._e()],1):t._e()],1)},ae=[],oe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow color-picker-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M3,1V12.23a5,5,0,0,0,3.24,4.68l4.81,1.8.72,8.62a4,4,0,0,0,4,3.67h.48a4,4,0,0,0,4-3.67l.72-8.62,4.81-1.8A5,5,0,0,0,29,12.23V1ZM27,3v8H5V3ZM25.05,15l-5.9,2.25-.92,10.08a2,2,0,0,1-2,1.83h-.48a2,2,0,0,1-2-1.83l-.92-10.08L6.95,15a3,3,0,0,1-1.84-2H26.89A3,3,0,0,1,25.05,15Z"}})])])},ce=[],le={name:"ColorPickerButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnColorPicker||"#ffffff"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},he=le,ue=(i("be3d"),Object(T["a"])(he,oe,ce,!1,null,"1e39c123",null)),de=ue.exports,fe={name:"ScrollableColorList",components:{ScrollableList:B,ColorPickerButton:de},data:function(){return{opened:!1}},computed:{classes:function(){return["scrollable-color-list",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},size:{type:String,default:"40px"},colors:{type:Array,default:function(){return[]}}},methods:{toggleColor:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleColor:function(t){this.$emit("color",t)}}},pe=fe,_e=(i("a19e"),Object(T["a"])(pe,se,ae,!1,null,null,null)),me=_e.exports,ve=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("GamePadButton",{staticClass:"btn-gamepad",on:{click:t.toggleGamePad}}),i("div",{staticClass:"game-pad-wrapper"},[i("div",{staticClass:"game-pad-buttons"},[i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("up")},expression:"() => handleClick('up')"}],staticClass:"btn-default btn-shadow btn-top",attrs:{disabled:-1===t.buttons.indexOf("up")},on:{click:function(e){return t.handleClick("up")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("right")},expression:"() => handleClick('right')"}],staticClass:"btn-default btn-shadow btn-right",attrs:{disabled:-1===t.buttons.indexOf("right")},on:{click:function(e){return t.handleClick("right")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("down")},expression:"() => handleClick('down')"}],staticClass:"btn-default btn-shadow btn-bottom",attrs:{disabled:-1===t.buttons.indexOf("down")},on:{click:function(e){return t.handleClick("down")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("left")},expression:"() => handleClick('left')"}],staticClass:"btn-default btn-shadow btn-left",attrs:{disabled:-1===t.buttons.indexOf("left")},on:{click:function(e){return t.handleClick("left")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})])]),i("div",{staticClass:"game-pad-rotate"},[i("button",{staticClass:"btn-default btn-shadow btn-cancel",on:{click:function(e){return t.handleClick("default")}}},[t._v("\n Default\n ")])])])],1)},ge=[],be=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow game-pad-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[i("polygon",{attrs:{points:"18,20 18,26 22,26 16,32 10,26 14,26 14,20 "}}),i("polygon",{attrs:{points:"14,12 14,6 10,6 16,0 22,6 18,6 18,12 "}}),i("polygon",{attrs:{points:"12,18 6,18 6,22 0,16 6,10 6,14 12,14 "}}),i("polygon",{attrs:{points:"20,14 26,14 26,10 32,16 26,22 26,18 20,18 "}})])])},ye=[],we={name:"GamePadButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnGamePad||"#ffffff"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},xe=we,Ee=(i("a0d5"),Object(T["a"])(xe,be,ye,!1,null,"6f820b06",null)),Se=Ee.exports,Te=function(t){var e=t.delay,i=void 0===e?400:e,n=t.interval,r=void 0===n?50:n;return{bind:function(t,e,n){if("function"!==typeof e.value){var s=n.context.name,a="[longclick:] provided expression '".concat(e.expression,"' is not a function, but has to be");s&&(a+="Found in component '".concat(s,"' ")),console.warn(a)}var o=null,c=null,l=function(t){"click"===t.type&&0!==t.button||null===o&&(o=setTimeout((function(){r&&r>0&&(c=setInterval((function(){u()}),r)),u()}),i))},h=function(){null!==o&&(clearTimeout(o),o=null),c&&(clearInterval(c),c=null)},u=function(t){e.value(t)};["mousedown","touchstart"].forEach((function(e){return t.addEventListener(e,l)})),["click","mouseout","touchend","touchcancel"].forEach((function(e){return t.addEventListener(e,h)}))}}},Ce=Te({delay:100,interval:50}),Ie={name:"GamePad",components:{GamePadButton:Se},directives:{clickandhold:Ce},data:function(){return{opened:!1}},computed:{classes:function(){return["game-pad",this.opened&&this.visible?"opened":"",0!==this.buttons.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},buttons:{type:Array,default:function(){return[]}}},methods:{toggleGamePad:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleClick:function(t){this.$emit("buttonclick",{source:t})}}},Oe=Ie,Re=(i("368d"),Object(T["a"])(Oe,ve,ge,!1,null,"35970ef2",null)),Le=Re.exports,ke=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow save-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m.3,14c-0.2-0.2-0.3-0.5-0.3-0.7s0.1-0.5 0.3-0.7l1.4-1.4c0.4-0.4 1-0.4 1.4,0l.1,.1 5.5,5.9c0.2,0.2 0.5,0.2 0.7,0l13.4-13.9h0.1v-8.88178e-16c0.4-0.4 1-0.4 1.4,0l1.4,1.4c0.4,0.4 0.4,1 0,1.4l0,0-16,16.6c-0.2,0.2-0.4,0.3-0.7,0.3-0.3,0-0.5-0.1-0.7-0.3l-7.8-8.4-.2-.3z"}})])])},Ae=[],De={name:"SaveButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSave||"#b0a9f9"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Pe=De,je=(i("3459"),Object(T["a"])(Pe,ke,Ae,!1,null,"08b4a97e",null)),Me=je.exports,Be=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow random-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"}},[i("g",[i("path",{attrs:{d:" M 32.121 28.852 C 30.488 28.852 28.917 28.485 27.81 27.847 L 7.867 16.331 C 7.009 15.835 6.516 15.234 6.516 14.681 C 6.516 14.13 7.009 13.528 7.867 13.033 L 27.81 1.518 C 28.917 0.879 30.488 0.513 32.121 0.513 C 33.755 0.513 35.326 0.879 36.433 1.518 L 56.376 13.033 C 57.234 13.528 57.727 14.13 57.727 14.681 C 57.727 15.234 57.234 15.835 56.376 16.331 L 36.433 27.845 C 35.326 28.485 33.755 28.852 32.121 28.852 Z M 32.121 16.743 C 30.281 16.743 28.728 15.8 28.728 14.683 C 28.728 13.566 30.283 12.622 32.121 12.622 C 33.96 12.622 35.515 13.566 35.515 14.683 C 35.515 15.8 33.961 16.743 32.121 16.743 Z ","fill-rule":"evenodd"}}),i("path",{attrs:{d:" M 55.909 47.096 C 54.792 47.096 53.849 45.713 53.849 44.076 C 53.849 42.44 54.792 41.055 55.909 41.055 C 57.026 41.055 57.969 42.439 57.969 44.076 C 57.969 45.714 57.026 47.096 55.909 47.096 L 55.909 47.096 Z M 34.921 63 C 33.707 63 33.576 61.506 33.576 60.863 L 33.576 37.833 C 33.576 35.135 35.55 31.716 37.887 30.366 L 57.831 18.852 C 58.383 18.532 58.907 18.363 59.342 18.363 C 60.556 18.363 60.687 19.858 60.687 20.501 L 60.687 43.529 C 60.687 46.228 58.713 49.649 56.376 50.997 L 36.433 62.513 C 35.88 62.831 35.358 63 34.921 63 L 34.921 63 L 34.921 63 Z M 39.335 40.914 C 38.217 40.914 37.275 39.531 37.275 37.893 C 37.275 36.255 38.217 34.872 39.335 34.872 C 40.452 34.872 41.396 36.255 41.396 37.893 C 41.394 39.531 40.45 40.914 39.335 40.914 Z ","fill-rule":"evenodd"}}),i("path",{attrs:{d:" M 7.607 47.096 C 6.489 47.096 5.547 45.713 5.547 44.076 C 5.547 42.44 6.489 41.055 7.607 41.055 C 8.724 41.055 9.666 42.439 9.666 44.076 C 9.666 45.714 8.722 47.096 7.607 47.096 L 7.607 47.096 L 7.607 47.096 L 7.607 47.096 Z M 7.607 29.733 C 6.489 29.733 5.547 28.35 5.547 26.713 C 5.547 25.076 6.489 23.692 7.607 23.692 C 8.724 23.692 9.666 25.076 9.666 26.713 C 9.666 28.35 8.722 29.733 7.607 29.733 L 7.607 29.733 L 7.607 29.733 Z M 24.728 40.914 C 23.611 40.914 22.668 39.531 22.668 37.893 C 22.668 36.255 23.611 34.872 24.728 34.872 C 25.845 34.872 26.789 36.255 26.789 37.893 C 26.788 39.531 25.845 40.914 24.728 40.914 L 24.728 40.914 Z M 29.08 63 C 28.644 63 28.121 62.831 27.569 62.513 L 7.624 50.997 C 5.287 49.649 3.313 46.229 3.313 43.529 L 3.313 20.501 C 3.313 19.858 3.444 18.363 4.658 18.363 C 5.093 18.363 5.617 18.532 6.169 18.852 L 26.113 30.366 C 28.449 31.716 30.424 35.135 30.424 37.833 L 30.424 60.863 C 30.424 61.615 30.261 62.232 29.966 62.601 C 29.748 62.873 29.465 63 29.08 63 L 29.08 63 L 29.08 63 L 29.08 63 L 29.08 63 Z M 24.728 56.945 C 23.611 56.945 22.668 55.561 22.668 53.924 C 22.668 52.286 23.611 50.903 24.728 50.903 C 25.845 50.903 26.789 52.286 26.789 53.924 C 26.789 55.561 25.845 56.945 24.728 56.945 Z ","fill-rule":"evenodd"}})])])])},Fe=[],Xe={name:"RandomButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRandom||"#6eefd2"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Ue=Xe,Ne=(i("e080"),Object(T["a"])(Ue,Be,Fe,!1,null,"7b1c58bd",null)),Ge=Ne.exports,Ye=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow reset-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{stroke:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 264 250"}},[i("defs",[i("path",{attrs:{id:"Layer1_0_1_STROKES","stroke-width":"28.05","stroke-linejoin":"round","stroke-linecap":"round",fill:"none",d:"\nM 235.35 179\nQ 234.6490234375 180.213671875 233.95 181.4 234.9755859375 179.7302734375 235.925 178.025 235.63359375 178.5087890625 235.35 179 Z\nM 233.95 181.4\nQ 231.8041015625 184.94375 229.425 188.3 226.67265625 192.1640625 223.6 195.775 217.5568359375 203.0517578125 210.45 208.95 192.807421875 223.623046875 168.85 230.05 125 241.75 85.75 219.05 46.45 196.4 34.7 152.6\nM 16 30.5\nL 16.05 100.5 32.7 100.5\nQ 39.25 70.9 62.1 48.05 94.2 16 139.55 16 184.9 16 216.95 48.05 249.05 80.15 249.05 125.5 249.05 149.26953125 240.275 169.4 238.98828125 172.2501953125 237.525 175.05 236.74921875 176.5447265625 235.925 178.025\nM 32.7 100.5\nL 86.05 100.5\nM 223.6 195.775\nQ 220.4498046875 199.405859375 216.95 202.9 213.7673828125 206.0876953125 210.45 208.95"}})]),i("g",{attrs:{transform:"matrix( 1, 0, 0, 1, 0,0) "}},[i("use",{attrs:{"xlink:href":"#Layer1_0_1_STROKES"}})])])])},He=[],Ve={name:"ResetButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRandom||"#f69bc5"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},qe=Ve,We=(i("cefd"),Object(T["a"])(qe,Ye,He,!1,null,"c73f590c",null)),ze=We.exports,Je=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("a",{staticClass:"items-back-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 46.02 46.02",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14.757,46.02c-1.412,0-2.825-0.521-3.929-1.569c-2.282-2.17-2.373-5.78-0.204-8.063l12.758-13.418L10.637,9.645\n C8.46,7.37,8.54,3.76,10.816,1.582c2.277-2.178,5.886-2.097,8.063,0.179l16.505,17.253c2.104,2.2,2.108,5.665,0.013,7.872\n L18.893,44.247C17.77,45.424,16.267,46.02,14.757,46.02z"}})])])},Qe=[],$e={name:"ItemsBackButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnItemsBack||"#6a615c"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Ze=$e,Ke=(i("8fae"),Object(T["a"])(Ze,Je,Qe,!1,null,"79b8fd22",null)),ti=Ke.exports,ei=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow redo-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{stroke:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 264 250"}},[i("defs",[i("path",{attrs:{id:"Layer1_0_1_STROKES","stroke-width":"28.05","stroke-linejoin":"round","stroke-linecap":"round",fill:"none",d:"\nM 235.35 179\nQ 234.6490234375 180.213671875 233.95 181.4 234.9755859375 179.7302734375 235.925 178.025 235.63359375 178.5087890625 235.35 179 Z\nM 233.95 181.4\nQ 231.8041015625 184.94375 229.425 188.3 226.67265625 192.1640625 223.6 195.775 217.5568359375 203.0517578125 210.45 208.95 192.807421875 223.623046875 168.85 230.05 125 241.75 85.75 219.05 46.45 196.4 34.7 152.6\nM 16 30.5\nL 16.05 100.5 32.7 100.5\nQ 39.25 70.9 62.1 48.05 94.2 16 139.55 16 184.9 16 216.95 48.05 249.05 80.15 249.05 125.5 249.05 149.26953125 240.275 169.4 238.98828125 172.2501953125 237.525 175.05 236.74921875 176.5447265625 235.925 178.025\nM 32.7 100.5\nL 86.05 100.5\nM 223.6 195.775\nQ 220.4498046875 199.405859375 216.95 202.9 213.7673828125 206.0876953125 210.45 208.95"}})]),i("g",{attrs:{transform:"matrix( 1, 0, 0, 1, 0,0) "}},[i("use",{attrs:{"xlink:href":"#Layer1_0_1_STROKES"}})])])])},ii=[],ni={name:"HistoryRedoButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnUndoRedo||"#f0f9fe"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},ri=ni,si=(i("6140"),Object(T["a"])(ri,ei,ii,!1,null,"553e94d8",null)),ai=si.exports,oi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow undo-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{stroke:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 264 250"}},[i("defs",[i("path",{attrs:{id:"Layer1_0_1_STROKES","stroke-width":"28.05","stroke-linejoin":"round","stroke-linecap":"round",fill:"none",d:"\nM 235.35 179\nQ 234.6490234375 180.213671875 233.95 181.4 234.9755859375 179.7302734375 235.925 178.025 235.63359375 178.5087890625 235.35 179 Z\nM 233.95 181.4\nQ 231.8041015625 184.94375 229.425 188.3 226.67265625 192.1640625 223.6 195.775 217.5568359375 203.0517578125 210.45 208.95 192.807421875 223.623046875 168.85 230.05 125 241.75 85.75 219.05 46.45 196.4 34.7 152.6\nM 16 30.5\nL 16.05 100.5 32.7 100.5\nQ 39.25 70.9 62.1 48.05 94.2 16 139.55 16 184.9 16 216.95 48.05 249.05 80.15 249.05 125.5 249.05 149.26953125 240.275 169.4 238.98828125 172.2501953125 237.525 175.05 236.74921875 176.5447265625 235.925 178.025\nM 32.7 100.5\nL 86.05 100.5\nM 223.6 195.775\nQ 220.4498046875 199.405859375 216.95 202.9 213.7673828125 206.0876953125 210.45 208.95"}})]),i("g",{attrs:{transform:"matrix( 1, 0, 0, 1, 0,0) "}},[i("use",{attrs:{"xlink:href":"#Layer1_0_1_STROKES"}})])])])},ci=[],li={name:"HistoryUndoButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnUndoRedo||"#f0f9fe"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},hi=li,ui=(i("960f"),Object(T["a"])(hi,oi,ci,!1,null,"b85abce8",null)),di=ui.exports,fi=x(),pi={WelcomeScreen:"welcome-screen",SaveScreen:"save-screen",Playng:"playng"},_i={components:{ResizeObserver:p["a"],ScrollableList:B,LoadingEllipsis:Lt,OverlayAnimation:Y,LoadingOverlay:Pt,PoweredBy:xt,SaveGameOverlay:re,SaveButton:Me,RandomButton:Ge,ResetButton:ze,RedoButton:ai,UndoButton:di,ItemsBackButton:ti,ScrollableColorList:me,GamePad:Le,StampRemoveButton:rt,StampDuplicateButton:ht,StampFlipHorizontalButton:mt},directives:{wheelblock:fi},data:function(){return{expand:!1,isMobileIOS:!1,columnsClass:"",columnsWidth:80,offsetBounds:{width:0,height:0},debug:{isLoadingGame:!1,onWelcomeScreen:!1,onSaveScreen:!1,onStampEditScreen:!1}}},inject:["theme"],computed:{canExpandItems:function(){return this.expand&&!this.onSaveScreen},hideAdContainer:function(){return this.state===pi.WelcomeScreen||this.isLoadingGame},isLoadingGame:function(){return this.loading||this.debug.isLoadingGame},onWelcomeScreen:function(){return this.state===pi.WelcomeScreen||this.debug.onWelcomeScreen},onSaveScreen:function(){return this.state===pi.SaveScreen||this.debug.onSaveScreen},onStampEditScreen:function(){return this.showStampButtons||this.debug.onStampEditScreen},hideSaveAndRandomButtons:function(){return this.onSaveScreen||this.onStampEditScreen?"hide":this.expand?"hide-sm":""},backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.mainBg||"#bebebe"},saveAnimationColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.saveAnimation||"#f69bc5"},canvasBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.canvasBg||"#000000"},itemsScrollBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.itemsBg||"#ffffff"},itemsScrollBackgroundGradient:function(){if(this.theme&&this.theme.colors&&this.theme.colors.itemsBgGradient){var t=this.theme.colors.itemsBgGradient;return"".concat(t.type||"linear","-gradient(").concat(t.deg||0,"deg, ").concat(t.from,", ").concat(t.to,");")}return"none"},categoriesScrollBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.categoriesBg||"#f3f3f3"},categoriesScrollBackgroundGradient:function(){if(this.theme&&this.theme.colors&&this.theme.colors.categoriesBgGradient){var t=this.theme.colors.categoriesBgGradient;return"".concat(t.type||"linear","-gradient(").concat(t.deg||0,"deg, ").concat(t.from,", ").concat(t.to,");")}return"none"},stampsButtonBlockClasses:function(){return this.blockStampButtons?"button-disabled":""}},props:{colors:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},state:{type:String,default:pi.WelcomeScreen},loading:{type:Boolean,default:!1},fullPageLoading:{type:Boolean,default:!1},saveImage:{type:Object,default:function(){return null}},poweredByHref:{type:String,default:null},transparent:{type:Boolean,default:!0},showSaveButton:{type:Boolean,default:!1},showStampButtons:{type:Boolean,default:!1},showUndoRedoButtons:{type:Boolean,default:!1},enableUndoButton:{type:Boolean,default:!1},enableRedoButton:{type:Boolean,default:!1},blockStampButtons:{type:Boolean,default:!1}},methods:{handleClickClose:function(){this.$emit("expanded",!1)},handleClickRandom:function(){this.$emit("random")},handleClickReset:function(){this.$emit("reset")},handleClickUndo:function(){this.$emit("undo")},handleClickRedo:function(){this.$emit("redo")},handleColor:function(t){this.$emit("color",t)},handleMove:function(t){this.$emit("gamepad",t)},handleSaveGameFile:function(t){this.$emit("save-game",t)},enterSaveMode:function(t){this.$emit("prepare-save",t)},exitSaveMode:function(t){this.$emit("cancel-save",t)},onClickSave:function(t){this.$emit("save-online",t)},applyStamp:function(t){this.$emit("stamps",!0)},exitStampEditMode:function(t){this.$emit("stamps",!1)},duplicateCurrentStamp:function(t){this.$emit("duplicate-stamp",t)},flipCurrentStampHorizontally:function(t){this.$emit("flip-stamp-horizontally",t)},handleResize:function(t){var e=t.width,i=t.height;this.offsetBounds.width=e-this.$refs["container"].offsetWidth,this.offsetBounds.height=i-this.$refs["container"].offsetHeight,this.offsetBounds.width>=5*this.columnsWidth?this.columnsClass="columns-3x2":this.offsetBounds.width>=4*this.columnsWidth?this.columnsClass="columns-2x2":this.offsetBounds.width>=3*this.columnsWidth?this.columnsClass="columns-2x1":(this.columnsClass="columns-1x1",e<480&&(this.columnsClass+=" push-right-sm"))}},mounted:function(){var t=this;this.$on("expanded",(function(e){t.expand=e})),this.handleResize({width:this.$el.offsetWidth,height:this.$el.offsetHeight}),this.isMobileIOS=/iPhone|iPad|iPod/i.test(navigator.userAgent)}},mi=_i,vi=(i("0c68"),i("fd39"),i("e799"),i("b891"),i("cb05"),i("8b36"),Object(T["a"])(mi,d,f,!1,null,"59179baf",null)),gi=vi.exports,bi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default remove-items-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 408.483 408.483",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{attrs:{d:"M87.748,388.784c0.461,11.01,9.521,19.699,20.539,19.699h191.911c11.018,0,20.078-8.689,20.539-19.699l13.705-289.316\n H74.043L87.748,388.784z M247.655,171.329c0-4.61,3.738-8.349,8.35-8.349h13.355c4.609,0,8.35,3.738,8.35,8.349v165.293\n c0,4.611-3.738,8.349-8.35,8.349h-13.355c-4.61,0-8.35-3.736-8.35-8.349V171.329z M189.216,171.329\n c0-4.61,3.738-8.349,8.349-8.349h13.355c4.609,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.737,8.349-8.349,8.349h-13.355\n c-4.61,0-8.349-3.736-8.349-8.349V171.329L189.216,171.329z M130.775,171.329c0-4.61,3.738-8.349,8.349-8.349h13.356\n c4.61,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.738,8.349-8.349,8.349h-13.356c-4.61,0-8.349-3.736-8.349-8.349V171.329z"}}),i("path",{attrs:{d:"M343.567,21.043h-88.535V4.305c0-2.377-1.927-4.305-4.305-4.305h-92.971c-2.377,0-4.304,1.928-4.304,4.305v16.737H64.916\n c-7.125,0-12.9,5.776-12.9,12.901V74.47h304.451V33.944C356.467,26.819,350.692,21.043,343.567,21.043z"}})])])])},yi=[],wi={name:"RemoveItemsButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRemoveItems||"#f69bc5"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},xi=wi,Ei=(i("4936"),Object(T["a"])(xi,bi,yi,!1,null,"60fa4c4e",null)),Si=Ei.exports,Ti=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"badge-default scroll-list-stamp-item"},[i("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:"none",x:"0px",y:"0px",height:"410px",viewBox:"175 80 450 450"}},[i("g",{attrs:{transform:"matrix( 1, 0, 0, 1, 0,0) "}},[i("path",{attrs:{fill:"#FFFFFF","fill-opacity":"0.9",stroke:"none",d:"\n M 528.15 157.25\n L 528.15 157.2\n Q 508.8001953125 109.1783203125 485.7 103.6 460.0771484375 89.19609375 423.3 117.55 408.6943359375 127.758203125 400.5 144.9 392.305859375 127.7583984375 377.65 117.55 340.92265625 89.19609375 315.3 103.6 292.1998046875 109.1783203125 272.8 157.2\n L 272.8 157.25\n Q 263.3693359375 180.7224609375 262.1 199.65 252.8814453125 196.9533203125 243.9 199.7 220.0025390625 200.8796875 200.6 228.35\n L 200.6 228.3\n Q 186.1041015625 248.3263671875 182.15 276.9 177.7408203125 308.5408203125 195.4 336\n L 195.45 336.1\n Q 210.7138671875 360.1861328125 240.05 376.2\n L 240.1 376.25\n Q 249.4578125 381.3517578125 258.1 383.2 248.43984375 407.00390625 257.15 434.95\n L 257.15 434.95\n Q 266.0703125 463.3734375 279.45 480\n L 279.5 480.05\n Q 299.132421875 507.04375 337.2 501.7\n L 337.25 501.7\n Q 362.259765625 498.1439453125 374.1 488.5 384.273046875 490.9607421875 399.95 491.25 400.5 491.261328125 401.05 491.25 416.7271484375 490.9607421875 426.9 488.5 438.740234375 498.1439453125 463.7 501.7\n L 463.75 501.7\n Q 501.867578125 507.04375 521.5 480.05\n L 521.55 480\n Q 534.9294921875 463.3734375 543.8 434.95\n L 543.8 434.95\n Q 552.56015625 407.00390625 542.9 383.2 551.542578125 381.3515625 560.9 376.25\n L 560.9 376.2\n Q 590.2859375 360.1861328125 605.5 336.1\n L 605.6 336\n Q 623.259375 308.5408203125 618.8 276.9 614.895703125 248.3263671875 600.35 228.3\n L 600.4 228.35\n Q 580.997265625 200.8796875 557.05 199.7 548.1189453125 196.9533203125 538.9 199.65 537.6306640625 180.7224609375 528.15 157.25\n M 326.55 131.4\n Q 339.65 126.1 359.35 141.3 379.1 156.55 380.75 192.15 382.5 227.7 379.05 246.95 375.65 266.2 349.95 272.85 324.25 279.45 312.85 259.85 301.5 240.2 294.7 220.15 287.9 200.1 300.65 168.45 313.45 136.7 326.55 131.4\n M 441.65 141.3\n Q 461.35 126.1 474.45 131.4 487.55 136.7 500.35 168.45 513.1 200.1 506.3 220.15 499.5 240.2 488.15 259.85 476.75 279.45 451.05 272.85 425.35 266.2 421.95 246.95 418.5 227.7 420.25 192.15 421.9 156.55 441.65 141.3\n M 398.2 301.05\n Q 398.3 301.05 400.5 300.9 402.7 301.05 402.8 301.05 422.7 302.45 434 313.75 445.3 325 451.9 342.95 455.55 363.25 468.5 362.3 476.5 362.7 487.35 365.05 498.15 367.4 510.2 385.5 522.2 403.6 515.2 426 508.2 448.35 497.9 461.55 487.55 474.75 467.95 472 448.3 469.2 444.05 460.95 439.7 452.65 435.85 453.45 431.95 454.2 424.5 457.6 417.05 460.95 400.5 461.25 383.95 460.95 376.5 457.6 369.05 454.2 365.15 453.45 361.3 452.65 356.95 460.95 352.7 469.2 333.05 472 313.45 474.75 303.1 461.55 292.8 448.35 285.8 426 278.8 403.6 290.8 385.5 302.85 367.4 313.65 365.05 324.5 362.7 332.5 362.3 345.45 363.25 349.1 342.95 355.7 325 367 313.75 378.3 302.45 398.2 301.05\n M 575.9 245.65\n Q 586.25 260.25 589.1 281 591.95 301.75 580.35 319.8 568.7 337.8 546.55 349.9 524.35 362 511.75 334.6 499.15 307.15 505 288.65 510.8 270.15 526.05 249.1 541.25 228 553.4 229.5 565.55 231 575.9 245.65\n M 247.6 229.5\n Q 259.75 228 274.95 249.1 290.2 270.15 296 288.65 301.85 307.15 289.25 334.6 276.65 362 254.45 349.9 232.3 337.8 220.65 319.8 209.05 301.75 211.9 281 214.75 260.25 225.1 245.65 235.45 231 247.6 229.5 Z"}}),i("path",{style:{fill:t.backgroundColor},attrs:{stroke:"none",d:"\n M 274.95 249.1\n Q 259.75 228 247.6 229.5 235.45 231 225.1 245.65 214.75 260.25 211.9 281 209.05 301.75 220.65 319.8 232.3 337.8 254.45 349.9 276.65 362 289.25 334.6 301.85 307.15 296 288.65 290.2 270.15 274.95 249.1\n M 589.1 281\n Q 586.25 260.25 575.9 245.65 565.55 231 553.4 229.5 541.25 228 526.05 249.1 510.8 270.15 505 288.65 499.15 307.15 511.75 334.6 524.35 362 546.55 349.9 568.7 337.8 580.35 319.8 591.95 301.75 589.1 281\n M 400.5 300.9\n Q 398.3 301.05 398.2 301.05 378.3 302.45 367 313.75 355.7 325 349.1 342.95 345.45 363.25 332.5 362.3 324.5 362.7 313.65 365.05 302.85 367.4 290.8 385.5 278.8 403.6 285.8 426 292.8 448.35 303.1 461.55 313.45 474.75 333.05 472 352.7 469.2 356.95 460.95 361.3 452.65 365.15 453.45 369.05 454.2 376.5 457.6 383.95 460.95 400.5 461.25 417.05 460.95 424.5 457.6 431.95 454.2 435.85 453.45 439.7 452.65 444.05 460.95 448.3 469.2 467.95 472 487.55 474.75 497.9 461.55 508.2 448.35 515.2 426 522.2 403.6 510.2 385.5 498.15 367.4 487.35 365.05 476.5 362.7 468.5 362.3 455.55 363.25 451.9 342.95 445.3 325 434 313.75 422.7 302.45 402.8 301.05 402.7 301.05 400.5 300.9\n M 474.45 131.4\n Q 461.35 126.1 441.65 141.3 421.9 156.55 420.25 192.15 418.5 227.7 421.95 246.95 425.35 266.2 451.05 272.85 476.75 279.45 488.15 259.85 499.5 240.2 506.3 220.15 513.1 200.1 500.35 168.45 487.55 136.7 474.45 131.4\n M 359.35 141.3\n Q 339.65 126.1 326.55 131.4 313.45 136.7 300.65 168.45 287.9 200.1 294.7 220.15 301.5 240.2 312.85 259.85 324.25 279.45 349.95 272.85 375.65 266.2 379.05 246.95 382.5 227.7 380.75 192.15 379.1 156.55 359.35 141.3 Z"}})])])])},Ci=[],Ii={name:"ScrollListItemBadge",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnListItemBadge||"#E9ADAD"},color:function(){return tt.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Oi=Ii,Ri=(i("0fcc"),i("ede0"),i("8974"),Object(T["a"])(Oi,Ti,Ci,!1,null,"71ab3d4e",null)),Li=Ri.exports,ki=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"display"},[i("canvas",{staticClass:"size-slot",attrs:{width:t.canvasWidth+"px",height:t.canvasHeight+"px"}}),i("canvas",{ref:"display",attrs:{id:"game",width:t.canvasWidth+"px",height:t.canvasHeight+"px"}})])},Ai=[],Di=(i("c5f6"),{name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs["display"]}}}),Pi=Di,ji=(i("7a8b"),Object(T["a"])(Pi,ki,Ai,!1,null,"54944a98",null)),Mi=ji.exports,Bi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"w-creen"},[t.resolveHomeHref()?i("PoweredBy",{attrs:{href:t.resolveHomeHref(),by:"meiker.io"}}):t._e(),i("div",{staticClass:"floating-box"},[i("div",{staticClass:"content"},[i("h2",{staticClass:"name"},[t._v(t._s(t.data.name))]),t.data.owner?i("p",{staticClass:"owner"},[t._v("by "),i("a",{attrs:{href:t.resolveOwnerHref(t.data.owner.id),target:t.target}},[t._v(t._s(t.data.owner.nickname))])]):t._e(),i("div",{staticClass:"description can-select"},[t.data.tags&&t.data.tags.length>0?i("div",{staticClass:"tags"},[i("svg",{attrs:{height:"24px",width:"24px",version:"1.1",viewBox:"0 0 32 32"}},[i("g",{attrs:{"fill-rule":"evenodd",stroke:"none"}},[i("g",{attrs:{stroke:"none"}},[i("path",{attrs:{d:"M12,4 L3.99961498,4 C2.89525812,4 2,4.88743329 2,5.99961498 L2,14 L15.3809027,27.3809027 C16.1646418,28.1646418 17.433119,28.1668566 18.2115341,27.3884415 L25.3884415,20.2115341 C26.168017,19.4319586 26.1640508,18.1640508 25.3809027,17.3809027 L12,4 L12,4 Z M7.5,11 C8.32842717,11 9,10.3284272 9,9.5 C9,8.67157283 8.32842717,8 7.5,8 C6.67157283,8 6,8.67157283 6,9.5 C6,10.3284272 6.67157283,11 7.5,11 L7.5,11 Z"}})])])]),t._l(t.data.tags||[],(function(e,n){return i("a",{key:n,staticClass:"tag",attrs:{href:t.resolveTagHref(e),target:t.target}},[t._v("\n "+t._s(e)+"\n ")])}))],2):t._e(),i("p",[t._v(t._s(t.data.description||"No description"))])])])]),i("div",{staticClass:"floating-icon-wrapper"},[i("img",{staticClass:"float-game-icon",attrs:{src:t.data.icon,alt:t.data.name}})]),t.showPlayButton?i("div",{staticClass:"floating-button-wrapper"},[i("a",{class:["button",t.showPlayButton?"":"hidden"],on:{click:t.onClickPlay}},[t._v("Play")])]):t._e()],1)},Fi=[],Xi={name:"WelcomeScreen",components:{PoweredBy:xt},data:function(){return{target:"_self"}},props:{showPlayButton:{type:Boolean,default:!1},data:{type:Object,default:function(){return{}}}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")},methods:{onClickPlay:function(){this.$emit("click-play")},resolveOwnerHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.ownerLinkResolver?this.data.resolvers.ownerLinkResolver(t):"javascript:;"},resolveTagHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.tagLinkResolver?this.data.resolvers.tagLinkResolver(t):"javascript:;"},resolveHomeHref:function(){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.siteHomeLink?this.data.resolvers.siteHomeLink():""}}},Ui=Xi,Ni=(i("be1d"),Object(T["a"])(Ui,Bi,Fi,!1,null,"69b403b6",null)),Gi=Ni.exports;"currentTransform"in CanvasRenderingContext2D.prototype||("mozCurrentTransform"in CanvasRenderingContext2D.prototype?Object.defineProperty(CanvasRenderingContext2D.prototype,"currentTransform",{get:function(){var t=this.mozCurrentTransform;return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}},set:function(t){this.mozCurrentTransform=[t.a,t.b,t.c,t.d,t.e,t.f]},enumerable:!0,configurable:!1}):"webkitCurrentTransform"in CanvasRenderingContext2D.prototype?Object.defineProperty(CanvasRenderingContext2D.prototype,"currentTransform",{get:function(){return this.webkitCurrentTransform},set:function(t){this.webkitCurrentTransform=t},enumerable:!0,configurable:!1}):(Object.defineProperty(CanvasRenderingContext2D.prototype,"currentTransform",{get:function(){return this._t2stack&&this._t2stack[this._t2stack.length-1]||{a:1,b:0,c:0,d:1,e:0,f:0}},set:function(t){this._t2stack||(this._t2stack=[{}]),this._t2stack[this._t2stack.length-1]={a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},enumerable:!0,configurable:!1}),CanvasRenderingContext2D.prototype.getTransform=function(){var t=this.currentTransform;return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},CanvasRenderingContext2D.prototype.save=function(){var t=CanvasRenderingContext2D.prototype.save;return function(){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var e=this._t2stack[this._t2stack.length-1];this._t2stack.push(e&&{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}),t.call(this)}}(),CanvasRenderingContext2D.prototype.restore=function(){var t=CanvasRenderingContext2D.prototype.restore;return function(){this._t2stack&&this._t2stack.pop(),t.call(this)}}(),CanvasRenderingContext2D.prototype.transform=function(){var t=CanvasRenderingContext2D.prototype.transform;return function(e,i,n,r,s,a){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var o=this._t2stack[this._t2stack.length-1],c=o.a*e+o.c*i,l=o.b*e+o.d*i,h=o.a*n+o.c*r,u=o.b*n+o.d*r,d=o.e+o.a*s+o.c*a,f=o.f+o.b*s+o.d*a;o.a=c,o.b=l,o.c=h,o.d=u,o.e=d,o.f=f,t.call(this,e,i,n,r,s,a)}}(),CanvasRenderingContext2D.prototype.setTransform=function(){var t=CanvasRenderingContext2D.prototype.setTransform;return function(e,i,n,r,s,o){this._t2stack||(this._t2stack=[{}]),"object"===Object(a["a"])(e)&&"undefined"!==typeof e.f?(this._t2stack[this._t2stack.length-1]={a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f},t.call(this,e.a,e.b,e.c,e.d,e.e,e.f)):(this._t2stack[this._t2stack.length-1]={a:e,b:i,c:n,d:r,e:s,f:o},t.call(this,e,i,n,r,s,o))}}(),CanvasRenderingContext2D.prototype.resetTransform=function(){var t=CanvasRenderingContext2D.prototype.resetTransform;return function(){this._t2stack||(this._t2stack=[{}]),this._t2stack[this._t2stack.length-1]={a:1,b:0,c:0,d:1,e:0,f:0},t&&t.call(this)}}(),CanvasRenderingContext2D.prototype.scale=function(){var t=CanvasRenderingContext2D.prototype.scale;return function(e,i){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];e=e||1,i=i||e,n.a*=e,n.c*=i,n.b*=e,n.d*=i,t.call(this,e,i)}}(),CanvasRenderingContext2D.prototype.rotate=function(){var t=CanvasRenderingContext2D.prototype.rotate;return function(e){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var i=this._t2stack[this._t2stack.length-1],n=Math.cos(-e),r=Math.sin(-e),s=i.a*n-i.c*r,a=i.b*n-i.d*r,o=i.c*n+i.a*r,c=i.d*n+i.b*r;return i.a=s,i.b=a,i.c=o,i.d=c,t.call(this,e)}}(),CanvasRenderingContext2D.prototype.translate=function(){var t=CanvasRenderingContext2D.prototype.translate;return function(e,i){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];return n.e+=e*n.a+i*n.c,n.f+=e*n.b+i*n.d,t.call(this,e,i)}}())),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var i=this.toString();("number"!==typeof e||!isFinite(e)||Math.floor(e)!==e||e>i.length)&&(e=i.length),e-=t.length;var n=i.lastIndexOf(t,e);return-1!==n&&n===e}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});i("7514");var Yi=i("d225"),Hi=i("b0b4"),Vi=(i("2397"),i("013f")),qi=i("4e2b"),Wi=i("308d"),zi=i("2a88"),Ji=i("6bb5"),Qi=(i("3b2b"),i("03ff")),$i=(i("63d9"),i("55dd"),i("6c7b"),function(){var t="source-over";this.createjs=this.createjs||{},Zi.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},Zi.promote=function(t,e){var i=t.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(n)for(var r in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(r)&&"function"==typeof n[r]&&(i[e+r]=n[r]);return t},this.createjs=this.createjs||{},Zi.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){function t(){throw"UID cannot be instantiated"}t._nextID=0,t.get=function(){return t._nextID++},Zi.UID=t}(),this.createjs=this.createjs||{},Zi.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){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+")]"},Zi.Event=t}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]==e){1==a?delete n[t]:r.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 n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new Zi.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(c){}if(t.bubbles&&this.parent){var r=this,s=[r];while(r.parent)s.push(r=r.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;a<o&&!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){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!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)}}2===e&&this._dispatchEvent(t,2.1)},Zi.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){function t(){throw"Ticker cannot be instantiated."}t.RAF_SYNCHED="synched",t.RAF="raf",t.TIMEOUT="timeout",t.timingMode=null,t.maxDelta=0,t.paused=!1,t.removeEventListener=null,t.removeAllEventListeners=null,t.dispatchEvent=null,t.hasEventListener=null,t._listeners=null,Zi.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.setInterval=Zi.deprecate(t._setInterval,"Ticker.setInterval"),t._getInterval=function(){return t._interval},t.getInterval=Zi.deprecate(t._getInterval,"Ticker.getInterval"),t._setFPS=function(e){t._setInterval(1e3/e)},t.setFPS=Zi.deprecate(t._setFPS,"Ticker.setFPS"),t._getFPS=function(){return 1e3/t._interval},t.getFPS=Zi.deprecate(t._getFPS,"Ticker.getFPS");try{Object.defineProperties(t,{interval:{get:t._getInterval,set:t._setInterval},framerate:{get:t._getFPS,set:t._setFPS}})}catch(n){console.log(n)}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=t._pausedTime=0,t._inited=!1},t.getMeasuredTickTime=function(e){var i=0,n=t._tickTimes;if(!n||n.length<1)return-1;e=Math.min(n.length,e||0|t._getFPS());for(var r=0;r<e;r++)i+=n[r];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.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;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(),n=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=n),t.hasEventListener("tick")){var r=new Zi.Event("tick"),s=t.maxDelta;r.delta=s&&n>s?s:n,r.paused=e,r.time=i,r.runTime=i-t._pausedTime,t.dispatchEvent(r)}t._tickTimes.unshift(t._getTime()-i);while(t._tickTimes.length>100)t._tickTimes.pop();t._times.unshift(i);while(t._times.length>100)t._times.pop()};var e=window,i=e.performance.now||e.performance.mozNow||e.performance.msNow||e.performance.oNow||e.performance.webkitNow;t._getTime=function(){return(i&&i.call(e.performance)||(new Date).getTime())-t._startTime},Zi.Ticker=t}(),this.createjs=this.createjs||{},function(){function t(t){this.readyState=t.readyState,this._video=t,this._canvas=null,this._lastTime=-1,this.readyState<2&&t.addEventListener("canplaythrough",this._videoReady.bind(this))}var e=t.prototype;e.getImage=function(){if(!(this.readyState<2)){var t=this._canvas,e=this._video;if(t||(t=this._canvas=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas"),t.width=e.videoWidth,t.height=e.videoHeight),e.readyState>=2&&e.currentTime!==this._lastTime){var i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),i.drawImage(e,0,0,t.width,t.height),this._lastTime=e.currentTime}return t}},e._videoReady=function(){this.readyState=2},Zi.VideoBuffer=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a,o,c,l,h){this.Event_constructor(t,e,i),this.stageX=n,this.stageY=r,this.rawX=null==c?n:c,this.rawY=null==l?r:l,this.nativeEvent=s,this.pointerID=a,this.primary=!!o,this.relatedTarget=h}var e=Zi.extend(t,Zi.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(i){}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+")]"},Zi.MouseEvent=Zi.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s){this.setValues(t,e,i,n,r,s)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,n,r,s){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==n?1:n,this.tx=r||0,this.ty=s||0,this},e.append=function(t,e,i,n,r,s){var a=this.a,o=this.b,c=this.c,l=this.d;return 1==t&&0==e&&0==i&&1==n||(this.a=a*t+c*e,this.b=o*t+l*e,this.c=a*i+c*n,this.d=o*i+l*n),this.tx=a*r+c*s+this.tx,this.ty=o*r+l*s+this.ty,this},e.prepend=function(t,e,i,n,r,s){var a=this.a,o=this.c,c=this.tx;return this.a=t*a+i*this.b,this.b=e*a+n*this.b,this.c=t*o+i*this.d,this.d=e*o+n*this.d,this.tx=t*c+i*this.ty+r,this.ty=e*c+n*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,n,r,s,a,o,c,l){if(s%360)var h=s*t.DEG_TO_RAD,u=Math.cos(h),d=Math.sin(h);else u=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(u*n,d*n,-d*r,u*r,0,0)):this.append(u*n,d*n,-d*r,u*r,e,i),(c||l)&&(this.tx-=c*this.a+l*this.c,this.ty-=c*this.b+l*this.d),this},e.prependTransform=function(e,i,n,r,s,a,o,c,l){if(s%360)var h=s*t.DEG_TO_RAD,u=Math.cos(h),d=Math.sin(h);else u=1,d=0;return(c||l)&&(this.tx-=c,this.ty-=l),a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.prepend(u*n,d*n,-d*r,u*r,0,0),this.prepend(Math.cos(o),Math.sin(o),-Math.sin(a),Math.cos(a),e,i)):this.prepend(u*n,d*n,-d*r,u*r,e,i),this},e.rotate=function(e){e*=t.DEG_TO_RAD;var i=Math.cos(e),n=Math.sin(e),r=this.a,s=this.b;return this.a=r*i+this.c*n,this.b=s*i+this.d*n,this.c=-r*n+this.c*i,this.d=-s*n+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,n=this.d,r=this.tx,s=t*n-e*i;return this.a=n/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-n*r)/s,this.ty=-(t*this.ty-e*r)/s,this},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),n=Math.atan2(this.b,this.a),r=Math.abs(1-i/n);return r<1e-5?(e.rotation=n/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=n/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,Zi.Matrix2D=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r){this.setValues(t,e,i,n,r)}var e=t.prototype;e.setValues=function(t,e,i,n,r){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=n,this.matrix=r||this.matrix&&this.matrix.identity()||new Zi.Matrix2D,this},e.append=function(t,e,i,n,r){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=n||this.compositeOperation,this.visible=this.visible&&t,r&&this.matrix.appendMatrix(r),this},e.prepend=function(t,e,i,n,r){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||n,this.visible=this.visible&&t,r&&this.matrix.prependMatrix(r),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())},Zi.DisplayProps=t}(),this.createjs=this.createjs||{},function(){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+")]"},Zi.Point=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.setValues(t,e,i,n)}var e=t.prototype;e.setValues=function(t,e,i,n){return this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0,this},e.extend=function(t,e,i,n){return i=i||0,n=n||0,t+i>this.x+this.width&&(this.width=t+i-this.x),e+n>this.y+this.height&&(this.height=e+n-this.y),t<this.x&&(this.width+=this.x-t,this.x=t),e<this.y&&(this.height+=this.y-e,this.y=e),this},e.pad=function(t,e,i,n){return this.x-=e,this.y-=t,this.width+=e+n,this.height+=t+i,this},e.copy=function(t){return this.setValues(t.x,t.y,t.width,t.height)},e.contains=function(t,e,i,n){return i=i||0,n=n||0,t>=this.x&&t+i<=this.x+this.width&&e>=this.y&&e+n<=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,n=e.y,r=i+e.width,s=n+e.height;return this.x>i&&(i=this.x),this.y>n&&(n=this.y),this.x+this.width<r&&(r=this.x+this.width),this.y+this.height<s&&(s=this.y+this.height),r<=i||s<=n?null:new t(i,n,r-i,s-n)},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+")]"},Zi.Rectangle=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a){t.addEventListener&&(this.target=t,this.overLabel=null==i?"over":i,this.outLabel=null==e?"out":e,this.downLabel=null==n?"down":n,this.play=r,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.setEnabled=Zi.deprecate(e._setEnabled,"ButtonHelper.setEnabled"),e._getEnabled=function(){return this._enabled},e.getEnabled=Zi.deprecate(e._getEnabled,"ButtonHelper.getEnabled");try{Object.defineProperties(e,{enabled:{get:e._getEnabled,set:e._setEnabled}})}catch(i){}e.toString=function(){return"[ButtonHelper]"},e.handleEvent=function(t){var e,i=this.target,n=t.type;"mousedown"==n?(this._isPressed=!0,e=this.downLabel):"pressup"==n?(this._isPressed=!1,e=this._isOver?this.overLabel:this.outLabel):"rollover"==n?(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},Zi.ButtonHelper=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.color=t||"black",this.offsetX=e||0,this.offsetY=i||0,this.blur=n||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)},Zi.Shadow=t}(),this.createjs=this.createjs||{},function(){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=Zi.extend(t,Zi.EventDispatcher);e._getAnimations=function(){return this._animations.slice()},e.getAnimations=Zi.deprecate(e._getAnimations,"SpriteSheet.getAnimations");try{Object.defineProperties(e,{animations:{get:e._getAnimations}})}catch(i){}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 Zi.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,n,r;if(null!=t){if(this.framerate=t.framerate||0,t.images&&(i=t.images.length)>0)for(r=this._images=[],e=0;e<i;e++){var s=t.images[e];if("string"==typeof s){var a=s;s=document.createElement("img"),s.src=a}r.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=[],r=t.frames,e=0,i=r.length;e<i;e++){var o=r[e];this._frames.push({image:this._images[o[4]?o[4]:0],rect:new Zi.Rectangle(o[0],o[1],o[2],o[3]),regX:o[5]||0,regY:o[6]||0})}else n=t.frames,this._frameWidth=n.width,this._frameHeight=n.height,this._regX=n.regX||0,this._regY=n.regY||0,this._spacing=n.spacing||0,this._margin=n.margin||0,this._numFrames=n.count,0==this._loadCount&&this._calculateFrames();var c;if(this._animations=[],null!=(n=t.animations))for(c in this._data={},n){var l={name:c},h=n[c];if("number"==typeof h)r=l.frames=[h];else if(Array.isArray(h))if(1==h.length)l.frames=[h[0]];else for(l.speed=h[3],l.next=h[2],r=l.frames=[],e=h[0];e<=h[1];e++)r.push(e);else{l.speed=h.speed,l.next=h.next;var u=h.frames;r=l.frames="number"==typeof u?[u]:u.slice(0)}!0!==l.next&&void 0!==l.next||(l.next=c),(!1===l.next||r.length<2&&l.next==c)&&(l.next=null),l.speed||(l.speed=1),this._animations.push(c),this._data[c]=l}}},e._handleImageLoad=function(t){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},e._handleImageError=function(t){var e=new Zi.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,n=this._frameHeight,r=this._spacing,s=this._margin;t:for(var a=0,o=this._images;a<o.length;a++){var c=o[a],l=c.width||c.naturalWidth,h=c.height||c.naturalHeight,u=s;while(u<=h-s-n){var d=s;while(d<=l-s-i){if(e>=t)break t;e++,this._frames.push({image:c,rect:new Zi.Rectangle(d,u,i,n),regX:this._regX,regY:this._regY}),d+=i+r}u+=n+r}}this._numFrames=e}},Zi.SpriteSheet=Zi.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){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,n){return null!=t&&null==i&&(n=e,i=255&t,e=t>>8&255,t=t>>16&255),null==n?"rgb("+t+","+e+","+i+")":"rgba("+t+","+e+","+i+","+n+")"},t.getHSL=function(t,e,i,n){return null==n?"hsl("+t%360+","+e+"%,"+i+"%)":"hsla("+t%360+","+e+"%,"+i+"%,"+n+")"},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 n=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas");n.getContext&&(t._ctx=n.getContext("2d"),n.width=n.height=1),e._getInstructions=function(){return this._updateInstructions(),this._instructions},e.getInstructions=Zi.deprecate(e._getInstructions,"Graphics.getInstructions");try{Object.defineProperties(e,{instructions:{get:e._getInstructions}})}catch(r){}e.isEmpty=function(){return!(this._instructions.length||this._activeInstructions.length)},e.draw=function(t,e){this._updateInstructions();for(var i=this._instructions,n=this._storeIndex,r=i.length;n<r;n++)i[n].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,n=this._storeIndex,r=i.length;n<r;n++)!1!==(e=i[n]).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,n,r,s){return this.append(new i.ArcTo(t,e,n,r,s))},e.arc=function(t,e,n,r,s,a){return this.append(new i.Arc(t,e,n,r,s,a))},e.quadraticCurveTo=function(t,e,n,r){return this.append(new i.QuadraticCurveTo(t,e,n,r))},e.bezierCurveTo=function(t,e,n,r,s,a){return this.append(new i.BezierCurveTo(t,e,n,r,s,a))},e.rect=function(t,e,n,r){return this.append(new i.Rect(t,e,n,r))},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,n,r,s,a){return this._setFill((new i.Fill).linearGradient(t,e,n,r,s,a))},e.beginRadialGradientFill=function(t,e,n,r,s,a,o,c){return this._setFill((new i.Fill).radialGradient(t,e,n,r,s,a,o,c))},e.beginBitmapFill=function(t,e,n){return this._setFill(new i.Fill(null,n).bitmap(t,e))},e.endFill=function(){return this.beginFill()},e.setStrokeStyle=function(t,e,n,r,s){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,n,r,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,n,r,s,a){return this._setStroke((new i.Stroke).linearGradient(t,e,n,r,s,a))},e.beginRadialGradientStroke=function(t,e,n,r,s,a,o,c){return this._setStroke((new i.Stroke).radialGradient(t,e,n,r,s,a,o,c))},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,n,r){return this.drawRoundRectComplex(t,e,i,n,r,r,r,r)},e.drawRoundRectComplex=function(t,e,n,r,s,a,o,c){return this.append(new i.RoundRect(t,e,n,r,s,a,o,c))},e.drawCircle=function(t,e,n){return this.append(new i.Circle(t,e,n))},e.drawEllipse=function(t,e,n,r){return this.append(new i.Ellipse(t,e,n,r))},e.drawPolyStar=function(t,e,n,r,s,a){return this.append(new i.PolyStar(t,e,n,r,s,a))},e.append=function(t,e){return this._activeInstructions.push(t),this.command=t,e||(this._dirty=!0),this},e.decodePath=function(e){var i=[this.moveTo,this.lineTo,this.quadraticCurveTo,this.bezierCurveTo,this.closePath],n=[2,2,4,6,0],r=0,s=e.length,a=[],o=0,c=0,l=t.BASE_64;while(r<s){var h=e.charAt(r),u=l[h],d=u>>3,f=i[d];if(!f||3&u)throw"bad path data (@"+r+"): "+h;var p=n[d];d||(o=c=0),a.length=0,r++;for(var _=2+(u>>2&1),m=0;m<p;m++){var v=l[e.charAt(r)],g=v>>5?-1:1;v=(31&v)<<6|l[e.charAt(r+1)],3==_&&(v=v<<6|l[e.charAt(r+2)]),v=g*v/10,m%2?o=v+=o:c=v+=c,a[m]=v,r+=_}f.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,n=this._activeInstructions,r=this._commitIndex;if(this._dirty&&n.length){i.length=r,i.push(t.beginCmd);var s=n.length,a=i.length;i.length=a+s;for(var o=0;o<s;o++)i[o+a]=n[o];this._fill&&i.push(this._fill),this._stroke&&(this._strokeDash!==this._oldStrokeDash&&i.push(this._strokeDash),this._strokeStyle!==this._oldStrokeStyle&&i.push(this._strokeStyle),e&&(this._oldStrokeStyle=this._strokeStyle,this._oldStrokeDash=this._strokeDash),i.push(this._stroke)),this._dirty=!1}e&&(n.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,n,r){this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.radius=r}).prototype.exec=function(t){t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(i.Arc=function(t,e,i,n,r,s){this.x=t,this.y=e,this.radius=i,this.startAngle=n,this.endAngle=r,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,n){this.cpx=t,this.cpy=e,this.x=i,this.y=n}).prototype.exec=function(t){t.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(i.BezierCurveTo=function(t,e,i,n,r,s){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=n,this.x=r,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,n){this.x=t,this.y=e,this.w=i,this.h=n}).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,e.exec=function(t){if(this.style){t.fillStyle=this.style;var e=this.matrix,i=null;e&&(i=t.getTransform(),t.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),t.fill(),e&&t.setTransform(i)}},e.linearGradient=function(e,i,n,r,s,a){for(var o=this.style=t._ctx.createLinearGradient(n,r,s,a),c=0,l=e.length;c<l;c++)o.addColorStop(i[c],e[c]);return o.props={colors:e,ratios:i,x0:n,y0:r,x1:s,y1:a,type:"linear"},this},e.radialGradient=function(e,i,n,r,s,a,o,c){for(var l=this.style=t._ctx.createRadialGradient(n,r,s,a,o,c),h=0,u=e.length;h<u;h++)l.addColorStop(i[h],e[h]);return l.props={colors:e,ratios:i,x0:n,y0:r,r0:s,x1:a,y1:o,r1:c,type:"radial"},this},e.bitmap=function(e,i){if(e.naturalWidth||e.getContext||e.readyState>=2){var n=this.style=t._ctx.createPattern(e,i||"");n.props={image:e,repetition:i,type:"bitmap"}}return this},e.path=!1,e=(i.Stroke=function(t,e){this.style=t,this.ignoreScale=e}).prototype,e.exec=function(t){if(this.style){t.strokeStyle=this.style;var e=null;this.ignoreScale&&(e=t.getTransform(),t.setTransform(1,0,0,1,0,0)),t.stroke(),this.ignoreScale&&t.setTransform(e)}},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,n,r){this.width=t,this.caps=e,this.joints=i,this.miterLimit=n,this.ignoreScale=r}).prototype,e.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,n,r,s,a,o){this.x=t,this.y=e,this.w=i,this.h=n,this.radiusTL=r,this.radiusTR=s,this.radiusBR=a,this.radiusBL=o}).prototype.exec=function(t){var e=(c<l?c:l)/2,i=0,n=0,r=0,s=0,a=this.x,o=this.y,c=this.w,l=this.h,h=this.radiusTL,u=this.radiusTR,d=this.radiusBR,f=this.radiusBL;h<0&&(h*=i=-1),h>e&&(h=e),u<0&&(u*=n=-1),u>e&&(u=e),d<0&&(d*=r=-1),d>e&&(d=e),f<0&&(f*=s=-1),f>e&&(f=e),t.moveTo(a+c-u,o),t.arcTo(a+c+u*n,o-u*n,a+c,o+u,u),t.lineTo(a+c,o+l-d),t.arcTo(a+c+d*r,o+l+d*r,a+c-d,o+l,d),t.lineTo(a+f,o+l),t.arcTo(a-f*s,o+l+f*s,a,o+l-f,f),t.lineTo(a,o+h),t.arcTo(a-h*i,o-h*i,a+h,o,h),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,n){this.x=t,this.y=e,this.w=i,this.h=n}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.w,r=this.h,s=.5522848,a=n/2*s,o=r/2*s,c=e+n,l=i+r,h=e+n/2,u=i+r/2;t.moveTo(e,u),t.bezierCurveTo(e,u-o,h-a,i,h,i),t.bezierCurveTo(h+a,i,c,u-o,c,u),t.bezierCurveTo(c,u+o,h+a,l,h,l),t.bezierCurveTo(h-a,l,e,u+o,e,u)},(i.PolyStar=function(t,e,i,n,r,s){this.x=t,this.y=e,this.radius=i,this.sides=n,this.pointSize=r,this.angle=s}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.radius,r=(this.angle||0)/180*Math.PI,s=this.sides,a=1-(this.pointSize||0),o=Math.PI/s;t.moveTo(e+Math.cos(r)*n,i+Math.sin(r)*n);for(var c=0;c<s;c++)r+=o,1!=a&&t.lineTo(e+Math.cos(r)*n*a,i+Math.sin(r)*n*a),r+=o,t.lineTo(e+Math.cos(r)*n,i+Math.sin(r)*n);t.closePath()},t.beginCmd=new i.BeginPath,Zi.Graphics=t}(),this.createjs=this.createjs||{},function(){function t(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.bitmapCache=null,this.id=Zi.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._props=new Zi.DisplayProps,this._rectangle=new Zi.Rectangle,this._bounds=null,this._webGLRenderStyle=t._StageGL_NONE}var e=Zi.extend(t,Zi.EventDispatcher);t._MOUSE_EVENTS=["click","dblclick","mousedown","mouseout","mouseover","pressmove","pressup","rollout","rollover"],t.suppressCrossDomainErrors=!1,t._snapToPixelEnabled=!1,t._StageGL_NONE=0,t._StageGL_SPRITE=1,t._StageGL_BITMAP=2;var i=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas");i.getContext&&(t._hitTestCanvas=i,t._hitTestContext=i.getContext("2d"),i.width=i.height=1),e._getStage=function(){var t=this,e=Zi["Stage"];while(t.parent)t=t.parent;return t instanceof e?t:null},e.getStage=Zi.deprecate(e._getStage,"DisplayObject.getStage");try{Object.defineProperties(e,{stage:{get:e._getStage},cacheID:{get:function(){return this.bitmapCache&&this.bitmapCache.cacheID},set:function(t){this.bitmapCache&&(this.bitmapCache.cacheID=t)}},scale:{get:function(){return this.scaleX},set:function(t){this.scaleX=this.scaleY=t}}})}catch(n){}e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){return!1},e.updateContext=function(e){var i=this,n=i.mask,r=i._props.matrix;n&&n.graphics&&!n.graphics.isEmpty()&&(n.getMatrix(r),e.transform(r.a,r.b,r.c,r.d,r.tx,r.ty),n.graphics.drawAsPath(e),e.clip(),r.invert(),e.transform(r.a,r.b,r.c,r.d,r.tx,r.ty)),this.getMatrix(r);var s=r.tx,a=r.ty;t._snapToPixelEnabled&&i.snapToPixel&&(s=s+(s<0?-.5:.5)|0,a=a+(a<0?-.5:.5)|0),e.transform(r.a,r.b,r.c,r.d,s,a),e.globalAlpha=i.alpha},e.cache=function(t,e,i,n,r,s){this.bitmapCache||(this.bitmapCache=new Zi.BitmapCache),this.bitmapCache.define(this,t,e,i,n,r,s)},e.updateCache=function(t){if(!this.bitmapCache)throw"cache() must be called before updateCache()";this.bitmapCache.update(t)},e.uncache=function(){this.bitmapCache&&(this.bitmapCache.release(),this.bitmapCache=void 0)},e.getCacheDataURL=function(){return this.bitmapCache?this.bitmapCache.getDataURL():null},e.localToGlobal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).transformPoint(t,e,i||new Zi.Point)},e.globalToLocal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t,e,i||new Zi.Point)},e.localToLocal=function(t,e,i,n){return n=this.localToGlobal(t,e,n),i.globalToLocal(n.x,n.y,n)},e.setTransform=function(t,e,i,n,r,s,a,o,c){return this.x=t||0,this.y=e||0,this.scaleX=null==i?1:i,this.scaleY=null==n?1:n,this.rotation=r||0,this.skewX=s||0,this.skewY=a||0,this.regX=o||0,this.regY=c||0,this},e.getMatrix=function(t){var e=this,i=t&&t.identity()||new Zi.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){var e=this,i=this.getMatrix(t);while(e=e.parent)i.prependMatrix(e.getMatrix(e._props.matrix));return i},e.getConcatenatedDisplayProps=function(t){t=t?t.identity():new Zi.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 n=t._hitTestContext;n.setTransform(1,0,0,1,-e,-i),this.draw(n);var r=this._testHit(n);return n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,2,2),r},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,n){this._bounds=null!=t?(this._bounds||new Zi.Rectangle).setValues(t,e,i,n):t},e.clone=function(){return this._cloneProps(new t)},e.toString=function(){return"[DisplayObject (name="+this.name+")]"},e._updateState=null,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(n){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._getBounds=function(t,e){return this._transformBounds(this.getBounds(),t,e)},e._transformBounds=function(t,e,i){if(!t)return t;var n=t.x,r=t.y,s=t.width,a=t.height,o=this._props.matrix;o=i?o.identity():this.getMatrix(o),(n||r)&&o.appendTransform(0,0,1,1,0,0,0,-n,-r),e&&o.prependMatrix(e);var c=s*o.a,l=s*o.b,h=a*o.c,u=a*o.d,d=o.tx,f=o.ty,p=d,_=d,m=f,v=f;return(n=c+d)<p?p=n:n>_&&(_=n),(n=c+h+d)<p?p=n:n>_&&(_=n),(n=h+d)<p?p=n:n>_&&(_=n),(r=l+f)<m?m=r:r>v&&(v=r),(r=l+u+f)<m?m=r:r>v&&(v=r),(r=u+f)<m?m=r:r>v&&(v=r),t.setValues(p,m,_-p,v-m)},e._hasMouseEventListener=function(){for(var e=t._MOUSE_EVENTS,i=0,n=e.length;i<n;i++)if(this.hasEventListener(e[i]))return!0;return!!this.cursor},Zi.DisplayObject=Zi.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function e(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var i=Zi.extend(e,Zi.DisplayObject);i._getNumChildren=function(){return this.children.length},i.getNumChildren=Zi.deprecate(i._getNumChildren,"Container.getNumChildren");try{Object.defineProperties(i,{numChildren:{get:i._getNumChildren}})}catch(n){}i.initialize=e,i.isVisible=function(){var t=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},i.draw=function(e,i){var n=e.getTransform();if(this.DisplayObject_draw(e,i))return!0;for(var r=this.children.slice(),s=0,a=r.length;s<a;s++){var o=r[s];if(o.isVisible()){var c=e.getTransform();e.globalAlpha=1,e.globalCompositeOperation=t,o.updateContext(e),o.draw(e),e.setTransform(c),e.globalAlpha=1,e.globalCompositeOperation=t}}return e.setTransform(n),e.globalAlpha=1,e.globalCompositeOperation=t,!0},i.addChild=function(t){if(null==t)return t;var e=arguments.length;if(e>1){for(var i=0;i<e;i++)this.addChild(arguments[i]);return arguments[e-1]}var n=t.parent,r=n===this;return n&&n._removeChildAt(Zi.indexOf(n.children,t),r),t.parent=this,this.children.push(t),r||t.dispatchEvent("added"),t},i.addChildAt=function(t,e){var i=arguments.length,n=arguments[i-1];if(n<0||n>this.children.length)return arguments[i-2];if(i>2){for(var r=0;r<i-1;r++)this.addChildAt(arguments[r],n+r);return arguments[i-2]}var s=t.parent,a=s===this;return s&&s._removeChildAt(Zi.indexOf(s.children,t),a),t.parent=this,this.children.splice(e,0,t),a||t.dispatchEvent("added"),t},i.removeChild=function(t){var e=arguments.length;if(e>1){for(var i=!0,n=0;n<e;n++)i=i&&this.removeChild(arguments[n]);return i}return this._removeChildAt(Zi.indexOf(this.children,t))},i.removeChildAt=function(t){var e=arguments.length;if(e>1){for(var i=[],n=0;n<e;n++)i[n]=arguments[n];i.sort((function(t,e){return e-t}));var r=!0;for(n=0;n<e;n++)r=r&&this._removeChildAt(i[n]);return r}return this._removeChildAt(t)},i.removeAllChildren=function(){var t=this.children;while(t.length)this._removeChildAt(0)},i.getChildAt=function(t){return this.children[t]},i.getChildByName=function(t){for(var e=this.children,i=0,n=e.length;i<n;i++)if(e[i].name==t)return e[i];return null},i.sortChildren=function(t){this.children.sort(t)},i.getChildIndex=function(t){return Zi.indexOf(this.children,t)},i.swapChildrenAt=function(t,e){var i=this.children,n=i[t],r=i[e];n&&r&&(i[t]=r,i[e]=n)},i.swapChildren=function(t,e){for(var i,n,r=this.children,s=0,a=r.length;s<a;s++)if(r[s]==t&&(i=s),r[s]==e&&(n=s),null!=i&&null!=n)break;s!=a&&(r[i]=e,r[n]=t)},i.setChildIndex=function(t,e){var i=this.children,n=i.length;if(!(t.parent!=this||e<0||e>=n)){for(var r=0;r<n;r++)if(i[r]==t)break;r!=n&&r!=e&&(i.splice(r,1),i.splice(e,0,t))}},i.contains=function(t){while(t){if(t==this)return!0;t=t.parent}return!1},i.hitTest=function(t,e){return null!=this.getObjectUnderPoint(t,e)},i.getObjectsUnderPoint=function(t,e,i){var n=[],r=this.localToGlobal(t,e);return this._getObjectsUnderPoint(r.x,r.y,n,i>0,1==i),n},i.getObjectUnderPoint=function(t,e,i){var n=this.localToGlobal(t,e);return this._getObjectsUnderPoint(n.x,n.y,null,i>0,1==i)},i.getBounds=function(){return this._getBounds(null,!0)},i.getTransformedBounds=function(){return this._getBounds()},i.clone=function(t){var i=this._cloneProps(new e);return t&&this._cloneChildren(i),i},i.toString=function(){return"[Container (name="+this.name+")]"},i._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)},i._cloneChildren=function(t){t.children.length&&t.removeAllChildren();for(var e=t.children,i=0,n=this.children.length;i<n;i++){var r=this.children[i].clone(!0);r.parent=t,e.push(r)}},i._removeChildAt=function(t,e){if(t<0||t>this.children.length-1)return!1;var i=this.children[t];return i&&(i.parent=null),this.children.splice(t,1),e||i.dispatchEvent("removed"),!0},i._getObjectsUnderPoint=function(t,i,n,r,s,a){if(a=a||0,!a&&!this._testMask(this,t,i))return null;var o,c=Zi.DisplayObject._hitTestContext;s=s||r&&this._hasMouseEventListener();for(var l=this.children,h=l.length,u=h-1;u>=0;u--){var d=l[u],f=d.hitArea;if(d.visible&&(f||d.isVisible())&&(!r||d.mouseEnabled)&&(f||this._testMask(d,t,i)))if(!f&&d instanceof e){var p=d._getObjectsUnderPoint(t,i,n,r,s,a+1);if(!n&&p)return r&&!this.mouseChildren?this:p}else{if(r&&!s&&!d._hasMouseEventListener())continue;var _=d.getConcatenatedDisplayProps(d._props);if(o=_.matrix,f&&(o.appendMatrix(f.getMatrix(f._props.matrix)),_.alpha=f.alpha),c.globalAlpha=_.alpha,c.setTransform(o.a,o.b,o.c,o.d,o.tx-t,o.ty-i),(f||d).draw(c),!this._testHit(c))continue;if(c.setTransform(1,0,0,1,0,0),c.clearRect(0,0,2,2),!n)return r&&!this.mouseChildren?this:d;n.push(d)}}return null},i._testMask=function(t,e,i){var n=t.mask;if(!n||!n.graphics||n.graphics.isEmpty())return!0;var r=this._props.matrix,s=t.parent;r=s?s.getConcatenatedMatrix(r):r.identity(),r=n.getMatrix(n._props.matrix).prependMatrix(r);var a=Zi.DisplayObject._hitTestContext;return a.setTransform(r.a,r.b,r.c,r.d,r.tx-e,r.ty-i),n.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)},i._getBounds=function(t,e){var i=this.DisplayObject_getBounds();if(i)return this._transformBounds(i,t,e);var n=this._props.matrix;n=e?n.identity():this.getMatrix(n),t&&n.prependMatrix(t);for(var r=this.children.length,s=null,a=0;a<r;a++){var o=this.children[a];o.visible&&(i=o._getBounds(n))&&(s?s.extend(i.x,i.y,i.width,i.height):s=i.clone())}return s},Zi.Container=Zi.promote(e,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function e(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 i=Zi.extend(e,Zi.Container);i._get_nextStage=function(){return this._nextStage},i._set_nextStage=function(t){this._nextStage&&(this._nextStage._prevStage=null),t&&(t._prevStage=this),this._nextStage=t};try{Object.defineProperties(i,{nextStage:{get:i._get_nextStage,set:i._set_nextStage}})}catch(n){}i.update=function(e){if(this.canvas&&(this.tickOnUpdate&&this.tick(e),!1!==this.dispatchEvent("drawstart",!1,!0))){Zi.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var i=this.drawRect,n=this.canvas.getContext("2d");n.setTransform(1,0,0,1,0,0),this.autoClear&&(i?n.clearRect(i.x,i.y,i.width,i.height):n.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),n.globalAlpha=1,n.globalCompositeOperation=t,this.drawRect&&(n.beginPath(),n.rect(i.x,i.y,i.width,i.height),n.clip()),this.updateContext(n),this.draw(n,!1),n.setTransform(1,0,0,1,0,0),n.globalAlpha=1,n.globalCompositeOperation=t,this.dispatchEvent("drawend")}},i.tick=function(t){if(this.tickEnabled&&!1!==this.dispatchEvent("tickstart",!1,!0)){var e=new Zi.Event("tick");if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);this._tick(e),this.dispatchEvent("tickend")}},i.handleEvent=function(t){"tick"==t.type&&this.update(t)},i.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)}},i.toDataURL=function(t,e){var i,n=this.canvas.getContext("2d"),r=this.canvas.width,s=this.canvas.height;if(t){i=n.getImageData(0,0,r,s);var a=n.globalCompositeOperation;n.globalCompositeOperation="destination-over",n.fillStyle=t,n.fillRect(0,0,r,s)}var o=this.canvas.toDataURL(e||"image/png");return t&&(n.putImageData(i,0,0),n.globalCompositeOperation=a),o},i.enableMouseOver=function(t){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==t&&this._testMouseOver(!0)),null==t)t=20;else if(t<=0)return;var e=this;this._mouseOverIntervalID=setInterval((function(){e._testMouseOver()}),1e3/Math.min(50,t))},i.enableDOMEvents=function(t){null==t&&(t=!0);var e,i,n=this._eventListeners;if(!t&&n){for(e in n)i=n[e],i.t.removeEventListener(e,i.f,!1);this._eventListeners=null}else if(t&&!n&&this.canvas){var r=window.addEventListener?window:document,s=this;for(e in n=this._eventListeners={},n["mouseup"]={t:r,f:function(t){s._handleMouseUp(t)}},n["mousemove"]={t:r,f:function(t){s._handleMouseMove(t)}},n["dblclick"]={t:this.canvas,f:function(t){s._handleDoubleClick(t)}},n["mousedown"]={t:this.canvas,f:function(t){s._handleMouseDown(t)}},n)i=n[e],i.t.addEventListener(e,i.f,!1)}},i.clone=function(){throw"Stage cannot be cloned."},i.toString=function(){return"[Stage (name="+this.name+")]"},i._getElementRect=function(t){var e;try{e=t.getBoundingClientRect()}catch(l){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),n=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),r=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,s=parseInt(r.paddingLeft)+parseInt(r.borderLeftWidth),a=parseInt(r.paddingTop)+parseInt(r.borderTopWidth),o=parseInt(r.paddingRight)+parseInt(r.borderRightWidth),c=parseInt(r.paddingBottom)+parseInt(r.borderBottomWidth);return{left:e.left+i+s,right:e.right+i-o,top:e.top+n+a,bottom:e.bottom+n-c}},i._getPointerData=function(t){var e=this._pointerData[t];return e||(e=this._pointerData[t]={x:0,y:0}),e},i._handleMouseMove=function(t){t||(t=window.event),this._handlePointerMove(-1,t,t.pageX,t.pageY)},i._handlePointerMove=function(t,e,i,n,r){if((!this._prevStage||void 0!==r)&&this.canvas){var s=this._nextStage,a=this._getPointerData(t),o=a.inBounds;this._updatePointerPosition(t,e,i,n),(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,n,null)}},i._updatePointerPosition=function(t,e,i,n){var r=this._getElementRect(this.canvas);i-=r.left,n-=r.top;var s=this.canvas.width,a=this.canvas.height;i/=(r.right-r.left)/s,n/=(r.bottom-r.top)/a;var o=this._getPointerData(t);(o.inBounds=i>=0&&n>=0&&i<=s-1&&n<=a-1)?(o.x=i,o.y=n):this.mouseMoveOutside&&(o.x=i<0?0:i>s-1?s-1:i,o.y=n<0?0:n>a-1?a-1:n),o.posEvtObj=e,o.rawX=i,o.rawY=n,t!==this._primaryPointerID&&-1!==t||(this.mouseX=o.x,this.mouseY=o.y,this.mouseInBounds=o.inBounds)},i._handleMouseUp=function(t){this._handlePointerUp(-1,t,!1)},i._handlePointerUp=function(t,e,i,n){var r=this._nextStage,s=this._getPointerData(t);if(!this._prevStage||void 0!==n){var a=null,o=s.target;n||!o&&!r||(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,r&&r._handlePointerUp(t,e,i,n||a&&this)}},i._handleMouseDown=function(t){this._handlePointerDown(-1,t,t.pageX,t.pageY)},i._handlePointerDown=function(t,e,i,n,r){this.preventSelection&&e.preventDefault(),null!=this._primaryPointerID&&-1!==t||(this._primaryPointerID=t),null!=n&&this._updatePointerPosition(t,e,i,n);var s=null,a=this._nextStage,o=this._getPointerData(t);r||(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,n,r||s&&this)},i._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var n=this._nextStage;if(this._mouseOverIntervalID){var r=this._getPointerData(-1);if(r&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var s,a,o,c=r.posEvtObj,l=i||c&&c.target==this.canvas,h=null,u=-1,d="";!e&&(t||this.mouseInBounds&&l)&&(h=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var f=this._mouseOverTarget||[],p=f[f.length-1],_=this._mouseOverTarget=[];s=h;while(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;a<o;a++){if(_[a]!=f[a])break;u=a}for(p!=h&&this._dispatchMouseEvent(p,"mouseout",!0,-1,r,c,h),a=f.length-1;a>u;a--)this._dispatchMouseEvent(f[a],"rollout",!1,-1,r,c,h);for(a=_.length-1;a>u;a--)this._dispatchMouseEvent(_[a],"rollover",!1,-1,r,c,p);p!=h&&this._dispatchMouseEvent(h,"mouseover",!0,-1,r,c,p),n&&n._testMouseOver(t,e||h&&this,i||l&&this)}}else n&&n._testMouseOver(t,e,i)}},i._handleDoubleClick=function(t,e){var i=null,n=this._nextStage,r=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(r.x,r.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,r,t)),n&&n._handleDoubleClick(t,e||i&&this)},i._dispatchMouseEvent=function(t,e,i,n,r,s,a){if(t&&(i||t.hasEventListener(e))){var o=new Zi.MouseEvent(e,i,!1,r.x,r.y,s,n,n===this._primaryPointerID||-1===n,r.rawX,r.rawY,a);t.dispatchEvent(o)}},Zi.Stage=Zi.promote(e,"Container")}(),this.createjs=this.createjs||{},function(){function e(t,i){if(this.Stage_constructor(t),void 0!==i){if("object"!==Object(a["a"])(i))throw"Invalid options object";var n=i.premultiply,r=i.transparent,s=i.antialias,o=i.preserveBuffer,c=i.autoPurge}this.vocalDebug=!1,this._preserveBuffer=o||!1,this._antialias=s||!1,this._transparent=r||!1,this._premultiply=n||!1,this._autoPurge=void 0,this.autoPurge=c,this._viewportWidth=0,this._viewportHeight=0,this._projectionMatrix=null,this._webGLContext=null,this._clearColor={r:.5,g:.5,b:.5,a:0},this._maxCardsPerBatch=e.DEFAULT_MAX_BATCH_SIZE,this._activeShader=null,this._vertices=null,this._vertexPositionBuffer=null,this._uvs=null,this._uvPositionBuffer=null,this._indices=null,this._textureIndexBuffer=null,this._alphas=null,this._alphaBuffer=null,this._textureDictionary=[],this._textureIDs={},this._batchTextures=[],this._baseTextures=[],this._batchTextureCount=8,this._lastTextureInsert=-1,this._batchID=0,this._drawID=0,this._slotBlacklist=[],this._isDrawing=0,this._lastTrackedCanvas=0,this.isCacheControlled=!1,this._cacheContainer=new Zi.Container,this._initializeWebGL()}var i=Zi.extend(e,Zi.Stage);e.buildUVRects=function(t,e,i){if(!t||!t._frames)return null;void 0===e&&(e=-1),void 0===i&&(i=!1);for(var n=-1!=e&&i?e:0,r=-1!=e&&i?e+1:t._frames.length,s=n;s<r;s++){var a=t._frames[s];if(!(a.uvRect||a.image.width<=0||a.image.height<=0)){var o=a.rect;a.uvRect={t:o.y/a.image.height,l:o.x/a.image.width,b:(o.y+o.height)/a.image.height,r:(o.x+o.width)/a.image.width}}}return t._frames[-1!=e?e:0].uvRect||{t:0,l:0,b:1,r:1}},e.isWebGLActive=function(t){return t&&t instanceof WebGLRenderingContext&&"undefined"!==typeof WebGLRenderingContext},e.VERTEX_PROPERTY_COUNT=6,e.INDICIES_PER_CARD=6,e.DEFAULT_MAX_BATCH_SIZE=1e4,e.WEBGL_MAX_INDEX_NUM=Math.pow(2,16),e.UV_RECT={t:0,l:0,b:1,r:1};try{e.COVER_VERT=new Float32Array([-1,1,1,1,-1,-1,1,1,1,-1,-1,-1]),e.COVER_UV=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]),e.COVER_UV_FLIP=new Float32Array([0,1,1,1,0,0,1,1,1,0,0,0])}catch(n){}e.REGULAR_VARYING_HEADER="precision mediump float;varying vec2 vTextureCoord;varying lowp float indexPicker;varying lowp float alphaValue;",e.REGULAR_VERTEX_HEADER=e.REGULAR_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;attribute lowp float textureIndex;attribute lowp float objectAlpha;uniform mat4 pMatrix;",e.REGULAR_FRAGMENT_HEADER=e.REGULAR_VARYING_HEADER+"uniform sampler2D uSampler[{{count}}];",e.REGULAR_VERTEX_BODY="void main(void) {gl_Position = vec4((vertexPosition.x * pMatrix[0][0]) + pMatrix[3][0],(vertexPosition.y * pMatrix[1][1]) + pMatrix[3][1],pMatrix[3][2],1.0);alphaValue = objectAlpha;indexPicker = textureIndex;vTextureCoord = uvPosition;}",e.REGULAR_FRAGMENT_BODY="void main(void) {vec4 color = vec4(1.0, 0.0, 0.0, 1.0);if (indexPicker <= 0.5) {color = texture2D(uSampler[0], vTextureCoord);{{alternates}}}{{fragColor}}}",e.REGULAR_FRAG_COLOR_NORMAL="gl_FragColor = vec4(color.rgb, color.a * alphaValue);",e.REGULAR_FRAG_COLOR_PREMULTIPLY="if(color.a > 0.0035) {gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);} else {gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);}",e.PARTICLE_VERTEX_BODY=e.REGULAR_VERTEX_BODY,e.PARTICLE_FRAGMENT_BODY=e.REGULAR_FRAGMENT_BODY,e.COVER_VARYING_HEADER="precision mediump float;varying highp vec2 vRenderCoord;varying highp vec2 vTextureCoord;",e.COVER_VERTEX_HEADER=e.COVER_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;uniform float uUpright;",e.COVER_FRAGMENT_HEADER=e.COVER_VARYING_HEADER+"uniform sampler2D uSampler;",e.COVER_VERTEX_BODY="void main(void) {gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);vRenderCoord = uvPosition;vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));}",e.COVER_FRAGMENT_BODY="void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = color;}",i._get_isWebGL=function(){return!!this._webGLContext},i._set_autoPurge=function(t){t=isNaN(t)?1200:t,-1!=t&&(t=t<10?10:t),this._autoPurge=t},i._get_autoPurge=function(){return Number(this._autoPurge)};try{Object.defineProperties(i,{isWebGL:{get:i._get_isWebGL},autoPurge:{get:i._get_autoPurge,set:i._set_autoPurge}})}catch(n){}i._initializeWebGL=function(){if(this.canvas){if(!this._webGLContext||this._webGLContext.canvas!==this.canvas){var t={depth:!1,alpha:this._transparent,stencil:!0,antialias:this._antialias,premultipliedAlpha:this._premultiply,preserveDrawingBuffer:this._preserveBuffer},e=this._webGLContext=this._fetchWebGLContext(this.canvas,t);if(!e)return null;this.updateSimultaneousTextureCount(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),this._maxTextureSlots=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._createBuffers(e),this._initTextures(e),e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._premultiply),this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a),this.updateViewport(this._viewportWidth||this.canvas.width,this._viewportHeight||this.canvas.height)}}else this._webGLContext=null;return this._webGLContext},i.update=function(e){if(this.canvas){if(this.tickOnUpdate&&this.tick(e),this.dispatchEvent("drawstart"),this.autoClear&&this.clear(),this._webGLContext)this._batchDraw(this,this._webGLContext),-1==this._autoPurge||this._drawID%(this._autoPurge/2|0)||this.purgeTextures(this._autoPurge);else{var i=this.canvas.getContext("2d"),n=i.getTransform();i.globalAlpha=1,i.globalCompositeOperation=t,this.updateContext(i),this.draw(i,!1),i.setTransform(n),i.globalAlpha=1,i.globalCompositeOperation=t}this.dispatchEvent("drawend")}},i.clear=function(){if(this.canvas)if(e.isWebGLActive(this._webGLContext)){var t=this._webGLContext,i=this._clearColor,n=this._transparent?i.a:1;this._webGLContext.clearColor(i.r*n,i.g*n,i.b*n,n),t.clear(t.COLOR_BUFFER_BIT),this._webGLContext.clearColor(i.r,i.g,i.b,i.a)}else this.Stage_clear()},i.draw=function(t,i){if(t===this._webGLContext&&e.isWebGLActive(this._webGLContext)){var n=this._webGLContext;return this._batchDraw(this,n,i),!0}return this.Stage_draw(t,i)},i.cacheDraw=function(t,i,n){if(e.isWebGLActive(this._webGLContext)){var r=this._webGLContext;return this._cacheDraw(r,t,i,n),!0}return!1},i.protectTextureSlot=function(t,e){if(t>this._maxTextureSlots||t<0)throw"Slot outside of acceptable range";this._slotBlacklist[t]=!!e},i.getTargetRenderTexture=function(t,e,i){var n,r=!1,s=this._webGLContext;if(void 0!==t.__lastRT&&t.__lastRT===t.__rtA&&(r=!0),r?(void 0===t.__rtB?t.__rtB=this.getRenderBufferTexture(e,i):(e==t.__rtB._width&&i==t.__rtB._height||this.resizeTexture(t.__rtB,e,i),this.setTextureParams(s)),n=t.__rtB):(void 0===t.__rtA?t.__rtA=this.getRenderBufferTexture(e,i):(e==t.__rtA._width&&i==t.__rtA._height||this.resizeTexture(t.__rtA,e,i),this.setTextureParams(s)),n=t.__rtA),!n)throw"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances";return t.__lastRT=n,n},i.releaseTexture=function(t){var e,i;if(t){if(t.children)for(e=0,i=t.children.length;e<i;e++)this.releaseTexture(t.children[e]);t.cacheCanvas&&t.uncache();var n=void 0;if(void 0!==t._storeID){if(t===this._textureDictionary[t._storeID])return this._killTextureObject(t),void(t._storeID=void 0);n=t}else if(2===t._webGLRenderStyle)n=t.image;else if(1===t._webGLRenderStyle){for(e=0,i=t.spriteSheet._images.length;e<i;e++)this.releaseTexture(t.spriteSheet._images[e]);return}void 0!==n?(this._killTextureObject(this._textureDictionary[n._storeID]),n._storeID=void 0):this.vocalDebug&&console.log("No associated texture found on release")}},i.purgeTextures=function(t){void 0==t&&(t=100);for(var e=this._textureDictionary,i=e.length,n=0;n<i;n++){var r=e[n];r&&(r._drawID+t<=this._drawID&&this._killTextureObject(r))}},i.updateSimultaneousTextureCount=function(t){var e=this._webGLContext,i=!1;(t<1||isNaN(t))&&(t=1),this._batchTextureCount=t;while(!i)try{this._activeShader=this._fetchShaderProgram(e),i=!0}catch(n){if(1==this._batchTextureCount)throw"Cannot compile shader "+n;this._batchTextureCount-=4,this._batchTextureCount<1&&(this._batchTextureCount=1),this.vocalDebug&&console.log("Reducing desired texture count due to errors: "+this._batchTextureCount)}},i.updateViewport=function(t,e){this._viewportWidth=0|t,this._viewportHeight=0|e;var i=this._webGLContext;i&&(i.viewport(0,0,this._viewportWidth,this._viewportHeight),this._projectionMatrix=new Float32Array([2/this._viewportWidth,0,0,0,0,-2/this._viewportHeight,1,0,0,0,1,0,-1,1,.1,0]),this._projectionMatrixFlip=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),this._projectionMatrixFlip.set(this._projectionMatrix),this._projectionMatrixFlip[5]*=-1,this._projectionMatrixFlip[13]*=-1)},i.getFilterShader=function(t){t||(t=this);var e=this._webGLContext,i=this._activeShader;if(t._builtShader)i=t._builtShader,t.shaderParamSetup&&(e.useProgram(i),t.shaderParamSetup(e,this,i));else try{i=this._fetchShaderProgram(e,"filter",t.VTX_SHADER_BODY,t.FRAG_SHADER_BODY,t.shaderParamSetup&&t.shaderParamSetup.bind(t)),t._builtShader=i,i._name=t.toString()}catch(n){console&&console.log("SHADER SWITCH FAILURE",n)}return i},i.getBaseTexture=function(t,e){var i=Math.ceil(t>0?t:1)||1,n=Math.ceil(e>0?e:1)||1,r=this._webGLContext,s=r.createTexture();return this.resizeTexture(s,i,n),this.setTextureParams(r,!1),s},i.resizeTexture=function(t,e,i){var n=this._webGLContext;n.bindTexture(n.TEXTURE_2D,t),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,i,0,n.RGBA,n.UNSIGNED_BYTE,null),t.width=e,t.height=i},i.getRenderBufferTexture=function(t,e){var i=this._webGLContext,n=this.getBaseTexture(t,e);if(!n)return null;var r=i.createFramebuffer();return r?(n.width=t,n.height=e,i.bindFramebuffer(i.FRAMEBUFFER,r),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,n,0),r._renderTexture=n,n._frameBuffer=r,n._storeID=this._textureDictionary.length,this._textureDictionary[n._storeID]=n,i.bindFramebuffer(i.FRAMEBUFFER,null),n):null},i.setTextureParams=function(t,e){e&&this._antialias?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},i.setClearColor=function(t){var e,i,n,r,s;"string"==typeof t?0==t.indexOf("#")?(4==t.length&&(t="#"+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)+t.charAt(3)+t.charAt(3)),e=Number("0x"+t.slice(1,3))/255,i=Number("0x"+t.slice(3,5))/255,n=Number("0x"+t.slice(5,7))/255,r=Number("0x"+t.slice(7,9))/255):0==t.indexOf("rgba(")&&(s=t.slice(5,-1).split(","),e=Number(s[0])/255,i=Number(s[1])/255,n=Number(s[2])/255,r=Number(s[3])):(e=((4278190080&t)>>>24)/255,i=((16711680&t)>>>16)/255,n=((65280&t)>>>8)/255,r=(255&t)/255),this._clearColor.r=e||0,this._clearColor.g=i||0,this._clearColor.b=n||0,this._clearColor.a=r||0,this._webGLContext&&this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a)},i.toString=function(){return"[StageGL (name="+this.name+")]"},i._fetchWebGLContext=function(t,e){var i;try{i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch(n){}if(i)i.viewportWidth=t.width,i.viewportHeight=t.height;else{var r="Could not initialize WebGL";console.error?console.error(r):console.log(r)}return i},i._fetchShaderProgram=function(t,i,n,r,s){var a,o;switch(t.useProgram(null),i){case"filter":o=e.COVER_VERTEX_HEADER+(n||e.COVER_VERTEX_BODY),a=e.COVER_FRAGMENT_HEADER+(r||e.COVER_FRAGMENT_BODY);break;case"particle":o=e.REGULAR_VERTEX_HEADER+e.PARTICLE_VERTEX_BODY,a=e.REGULAR_FRAGMENT_HEADER+e.PARTICLE_FRAGMENT_BODY;break;case"override":o=e.REGULAR_VERTEX_HEADER+(n||e.REGULAR_VERTEX_BODY),a=e.REGULAR_FRAGMENT_HEADER+(r||e.REGULAR_FRAGMENT_BODY);break;case"regular":default:o=e.REGULAR_VERTEX_HEADER+e.REGULAR_VERTEX_BODY,a=e.REGULAR_FRAGMENT_HEADER+e.REGULAR_FRAGMENT_BODY;break}var c=this._createShader(t,t.VERTEX_SHADER,o),l=this._createShader(t,t.FRAGMENT_SHADER,a),h=t.createProgram();if(t.attachShader(h,c),t.attachShader(h,l),t.linkProgram(h),h._type=i,!t.getProgramParameter(h,t.LINK_STATUS))throw t.useProgram(this._activeShader),t.getProgramInfoLog(h);switch(t.useProgram(h),i){case"filter":h.vertexPositionAttribute=t.getAttribLocation(h,"vertexPosition"),t.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=t.getAttribLocation(h,"uvPosition"),t.enableVertexAttribArray(h.uvPositionAttribute),h.samplerUniform=t.getUniformLocation(h,"uSampler"),t.uniform1i(h.samplerUniform,0),h.uprightUniform=t.getUniformLocation(h,"uUpright"),t.uniform1f(h.uprightUniform,0),s&&s(t,this,h);break;case"override":case"particle":case"regular":default:h.vertexPositionAttribute=t.getAttribLocation(h,"vertexPosition"),t.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=t.getAttribLocation(h,"uvPosition"),t.enableVertexAttribArray(h.uvPositionAttribute),h.textureIndexAttribute=t.getAttribLocation(h,"textureIndex"),t.enableVertexAttribArray(h.textureIndexAttribute),h.alphaAttribute=t.getAttribLocation(h,"objectAlpha"),t.enableVertexAttribArray(h.alphaAttribute);for(var u=[],d=0;d<this._batchTextureCount;d++)u[d]=d;h.samplerData=u,h.samplerUniform=t.getUniformLocation(h,"uSampler"),t.uniform1iv(h.samplerUniform,u),h.pMatrixUniform=t.getUniformLocation(h,"pMatrix");break}return t.useProgram(this._activeShader),h},i._createShader=function(t,i,n){n=n.replace(/{{count}}/g,this._batchTextureCount);for(var r="",s=1;s<this._batchTextureCount;s++)r+="} else if (indexPicker <= "+s+".5) { color = texture2D(uSampler["+s+"], vTextureCoord);";n=n.replace(/{{alternates}}/g,r),n=n.replace(/{{fragColor}}/g,this._premultiply?e.REGULAR_FRAG_COLOR_PREMULTIPLY:e.REGULAR_FRAG_COLOR_NORMAL);var a=t.createShader(i);if(t.shaderSource(a,n),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))throw t.getShaderInfoLog(a);return a},i._createBuffers=function(t){var i,n,r,s=this._maxCardsPerBatch*e.INDICIES_PER_CARD,a=this._vertexPositionBuffer=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),i=2;var o=this._vertices=new Float32Array(s*i);for(n=0,r=o.length;n<r;n+=i)o[n]=o[n+1]=0;t.bufferData(t.ARRAY_BUFFER,o,t.DYNAMIC_DRAW),a.itemSize=i,a.numItems=s;var c=this._uvPositionBuffer=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),i=2;var l=this._uvs=new Float32Array(s*i);for(n=0,r=l.length;n<r;n+=i)l[n]=l[n+1]=0;t.bufferData(t.ARRAY_BUFFER,l,t.DYNAMIC_DRAW),c.itemSize=i,c.numItems=s;var h=this._textureIndexBuffer=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,h),i=1;var u=this._indices=new Float32Array(s*i);for(n=0,r=u.length;n<r;n++)u[n]=0;t.bufferData(t.ARRAY_BUFFER,u,t.DYNAMIC_DRAW),h.itemSize=i,h.numItems=s;var d=this._alphaBuffer=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,d),i=1;var f=this._alphas=new Float32Array(s*i);for(n=0,r=f.length;n<r;n++)f[n]=1;t.bufferData(t.ARRAY_BUFFER,f,t.DYNAMIC_DRAW),d.itemSize=i,d.numItems=s},i._initTextures=function(){this._lastTextureInsert=-1,this._textureDictionary=[],this._textureIDs={},this._baseTextures=[],this._batchTextures=[];for(var t=0;t<this._batchTextureCount;t++){var e=this.getBaseTexture();if(this._baseTextures[t]=this._batchTextures[t]=e,!e)throw"Problems creating basic textures, known causes include using too much VRAM by not releasing WebGL texture instances"}},i._loadTextureImage=function(t,e){var i=e.src;i||(e._isCanvas=!0,i=e.src="canvas_"+this._lastTrackedCanvas++);var n=this._textureIDs[i];void 0===n&&(n=this._textureIDs[i]=this._textureDictionary.length),void 0===this._textureDictionary[n]&&(this._textureDictionary[n]=this.getBaseTexture());var r=this._textureDictionary[n];if(r)r._batchID=this._batchID,r._storeID=n,r._imageData=e,this._insertTextureInBatch(t,r),e._storeID=n,e.complete||e.naturalWidth||e._isCanvas?this._updateTextureImageData(t,e):e.addEventListener("load",this._updateTextureImageData.bind(this,t,e));else{var s="Problem creating desired texture, known causes include using too much VRAM by not releasing WebGL texture instances";console.error&&console.error(s)||console.log(s),r=this._baseTextures[0],r._batchID=this._batchID,r._storeID=-1,r._imageData=r,this._insertTextureInBatch(t,r)}return r},i._updateTextureImageData=function(t,e){var i=e.width&e.width-1||e.height&e.height-1,r=this._textureDictionary[e._storeID];t.activeTexture(t.TEXTURE0+r._activeIndex),t.bindTexture(t.TEXTURE_2D,r),r.isPOT=!i,this.setTextureParams(t,r.isPOT);try{t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}catch(n){var s="\nAn error has occurred. This is most likely due to security restrictions on WebGL images with local or cross-domain origins";console.error?(console.error(s),console.error(n)):console&&(console.log(s),console.log(n))}e._invalid=!1,r._w=e.width,r._h=e.height,this.vocalDebug&&(i&&console.warn("NPOT(Non Power of Two) Texture: "+e.src),(e.width>t.MAX_TEXTURE_SIZE||e.height>t.MAX_TEXTURE_SIZE)&&console&&console.error("Oversized Texture: "+e.width+"x"+e.height+" vs "+t.MAX_TEXTURE_SIZE+"max"))},i._insertTextureInBatch=function(t,e){if(this._batchTextures[e._activeIndex]!==e){var i=-1,n=(this._lastTextureInsert+1)%this._batchTextureCount,r=n;do{if(this._batchTextures[r]._batchID!=this._batchID&&!this._slotBlacklist[r]){i=r;break}r=(r+1)%this._batchTextureCount}while(r!==n);-1===i&&(this.batchReason="textureOverflow",this._drawBuffers(t),this.batchCardCount=0,i=n),this._batchTextures[i]=e,e._activeIndex=i;var s=e._imageData;s&&s._invalid&&void 0!==e._drawID?this._updateTextureImageData(t,s):(t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e),this.setTextureParams(t)),this._lastTextureInsert=i}else{s=e._imageData;void 0!=e._storeID&&s&&s._invalid&&this._updateTextureImageData(t,s)}e._drawID=this._drawID,e._batchID=this._batchID},i._killTextureObject=function(t){if(t){var e=this._webGLContext;if(void 0!==t._storeID&&t._storeID>=0){for(var i in this._textureDictionary[t._storeID]=void 0,this._textureIDs)this._textureIDs[i]==t._storeID&&delete this._textureIDs[i];t._imageData&&(t._imageData._storeID=void 0),t._imageData=t._storeID=void 0}void 0!==t._activeIndex&&this._batchTextures[t._activeIndex]===t&&(this._batchTextures[t._activeIndex]=this._baseTextures[t._activeIndex]);try{t._frameBuffer&&e.deleteFramebuffer(t._frameBuffer),t._frameBuffer=void 0}catch(n){this.vocalDebug&&console.log(n)}try{e.deleteTexture(t)}catch(n){this.vocalDebug&&console.log(n)}}},i._backupBatchTextures=function(t,e){var i=this._webGLContext;this._backupTextures||(this._backupTextures=[]),void 0===e&&(e=this._backupTextures);for(var n=0;n<this._batchTextureCount;n++)i.activeTexture(i.TEXTURE0+n),t?this._batchTextures[n]=e[n]:(e[n]=this._batchTextures[n],this._batchTextures[n]=this._baseTextures[n]),i.bindTexture(i.TEXTURE_2D,this._batchTextures[n]),this.setTextureParams(i,this._batchTextures[n].isPOT);t&&e===this._backupTextures&&(this._backupTextures=[])},i._batchDraw=function(t,e,i){this._isDrawing>0&&this._drawBuffers(e),this._isDrawing++,this._drawID++,this.batchCardCount=0,this.depth=0,this._appendToBatchGroup(t,e,new Zi.Matrix2D,this.alpha,i),this.batchReason="drawFinish",this._drawBuffers(e),this._isDrawing--},i._cacheDraw=function(t,e,i,n){var r,s=this._activeShader,a=this._slotBlacklist,o=this._maxTextureSlots-1,c=this._viewportWidth,l=this._viewportHeight;this.protectTextureSlot(o,!0);var h=e.getMatrix();h=h.clone(),h.scale(1/n.scale,1/n.scale),h=h.invert(),h.translate(-n.offX/n.scale*e.scaleX,-n.offY/n.scale*e.scaleY);var u=this._cacheContainer;u.children=[e],u.transformMatrix=h,this._backupBatchTextures(!1),i&&i.length?this._drawFilters(e,i,n):this.isCacheControlled?(t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0)):(t.activeTexture(t.TEXTURE0+o),e.cacheCanvas=this.getTargetRenderTexture(e,n._drawWidth,n._drawHeight),r=e.cacheCanvas,t.bindFramebuffer(t.FRAMEBUFFER,r._frameBuffer),this.updateViewport(n._drawWidth,n._drawHeight),this._projectionMatrix=this._projectionMatrixFlip,t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0),t.bindFramebuffer(t.FRAMEBUFFER,null),this.updateViewport(c,l)),this._backupBatchTextures(!0),this.protectTextureSlot(o,!1),this._activeShader=s,this._slotBlacklist=a},i._drawFilters=function(t,e,i){var n,r=this._webGLContext,s=this._maxTextureSlots-1,a=this._viewportWidth,o=this._viewportHeight,c=this._cacheContainer,l=e.length;r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this.updateViewport(i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._batchDraw(c,r,!0),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r);var h=!1,u=0,d=e[u];do{this._activeShader=this.getFilterShader(d),this._activeShader&&(r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r),(l>1||e[0]._multiPass)&&(h=!h),d=null!==d._multiPass?d._multiPass:e[++u])}while(d);this.isCacheControlled?(r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(a,o),this._activeShader=this.getFilterShader(this),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h)):(h&&(r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this._activeShader=this.getFilterShader(this),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,!h)),r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(a,o),t.cacheCanvas=n)},i._appendToBatchGroup=function(t,i,n,r,s){t._glMtx||(t._glMtx=new Zi.Matrix2D);var a,o,c,l,h=t._glMtx;h.copy(n),t.transformMatrix?h.appendMatrix(t.transformMatrix):h.appendTransform(t.x,t.y,t.scaleX,t.scaleY,t.rotation,t.skewX,t.skewY,t.regX,t.regY);for(var u=t.children.length,d=0;d<u;d++){var f=t.children[d];if(f.visible&&r)if(f.cacheCanvas&&!s||(f._updateState&&f._updateState(),!f.children)){this.batchCardCount+1>this._maxCardsPerBatch&&(this.batchReason="vertexOverflow",this._drawBuffers(i),this.batchCardCount=0),f._glMtx||(f._glMtx=new Zi.Matrix2D);var p,_,m,v,g,b,y=f._glMtx;y.copy(h),f.transformMatrix?y.appendMatrix(f.transformMatrix):y.appendTransform(f.x,f.y,f.scaleX,f.scaleY,f.rotation,f.skewX,f.skewY,f.regX,f.regY);var w=f.cacheCanvas&&!s;if(2===f._webGLRenderStyle||w)m=!s&&f.cacheCanvas||f.image;else{if(1!==f._webGLRenderStyle)continue;if(v=f.spriteSheet.getFrame(f.currentFrame),null===v)continue;m=v.image}var x=this._uvs,E=this._vertices,S=this._indices,T=this._alphas;if(m){if(void 0===m._storeID)g=this._loadTextureImage(i,m),this._insertTextureInBatch(i,g);else{if(g=this._textureDictionary[m._storeID],!g){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}g._batchID!==this._batchID&&this._insertTextureInBatch(i,g)}if(_=g._activeIndex,2===f._webGLRenderStyle||w)!w&&f.sourceRect?(f._uvRect||(f._uvRect={}),b=f.sourceRect,p=f._uvRect,p.t=b.y/m.height,p.l=b.x/m.width,p.b=(b.y+b.height)/m.height,p.r=(b.x+b.width)/m.width,a=0,o=0,c=b.width+a,l=b.height+o):(p=e.UV_RECT,w?(b=f.bitmapCache,a=b.x+b._filterOffX/b.scale,o=b.y+b._filterOffY/b.scale,c=b._drawWidth/b.scale+a,l=b._drawHeight/b.scale+o):(a=0,o=0,c=m.width+a,l=m.height+o));else if(1===f._webGLRenderStyle){var C=v.rect;p=v.uvRect,p||(p=e.buildUVRects(f.spriteSheet,f.currentFrame,!1)),a=-v.regX,o=-v.regY,c=C.width-v.regX,l=C.height-v.regY}var I=this.batchCardCount*e.INDICIES_PER_CARD,O=2*I;E[O]=a*y.a+o*y.c+y.tx,E[O+1]=a*y.b+o*y.d+y.ty,E[O+2]=a*y.a+l*y.c+y.tx,E[O+3]=a*y.b+l*y.d+y.ty,E[O+4]=c*y.a+o*y.c+y.tx,E[O+5]=c*y.b+o*y.d+y.ty,E[O+6]=E[O+2],E[O+7]=E[O+3],E[O+8]=E[O+4],E[O+9]=E[O+5],E[O+10]=c*y.a+l*y.c+y.tx,E[O+11]=c*y.b+l*y.d+y.ty,x[O]=p.l,x[O+1]=p.t,x[O+2]=p.l,x[O+3]=p.b,x[O+4]=p.r,x[O+5]=p.t,x[O+6]=p.l,x[O+7]=p.b,x[O+8]=p.r,x[O+9]=p.t,x[O+10]=p.r,x[O+11]=p.b,S[I]=S[I+1]=S[I+2]=S[I+3]=S[I+4]=S[I+5]=_,T[I]=T[I+1]=T[I+2]=T[I+3]=T[I+4]=T[I+5]=f.alpha*r,this.batchCardCount++}}else this._appendToBatchGroup(f,i,h,f.alpha*r)}},i._drawBuffers=function(t){if(!(this.batchCardCount<=0)){this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : "+this.batchReason);var i=this._activeShader,n=this._vertexPositionBuffer,r=this._textureIndexBuffer,s=this._uvPositionBuffer,a=this._alphaBuffer;t.useProgram(i),t.bindBuffer(t.ARRAY_BUFFER,n),t.vertexAttribPointer(i.vertexPositionAttribute,n.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,this._vertices),t.bindBuffer(t.ARRAY_BUFFER,r),t.vertexAttribPointer(i.textureIndexAttribute,r.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,this._indices),t.bindBuffer(t.ARRAY_BUFFER,s),t.vertexAttribPointer(i.uvPositionAttribute,s.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,this._uvs),t.bindBuffer(t.ARRAY_BUFFER,a),t.vertexAttribPointer(i.alphaAttribute,a.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,this._alphas),t.uniformMatrix4fv(i.pMatrixUniform,t.FALSE,this._projectionMatrix);for(var o=0;o<this._batchTextureCount;o++){var c=this._batchTextures[o];t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,c),this.setTextureParams(t,c.isPOT)}t.drawArrays(t.TRIANGLES,0,this.batchCardCount*e.INDICIES_PER_CARD),this._batchID++}},i._drawCover=function(t,i){this._isDrawing>0&&this._drawBuffers(t),this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : Cover");var n=this._activeShader,r=this._vertexPositionBuffer,s=this._uvPositionBuffer;t.clear(t.COLOR_BUFFER_BIT),t.useProgram(n),t.bindBuffer(t.ARRAY_BUFFER,r),t.vertexAttribPointer(n.vertexPositionAttribute,r.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,e.COVER_VERT),t.bindBuffer(t.ARRAY_BUFFER,s),t.vertexAttribPointer(n.uvPositionAttribute,s.itemSize,t.FLOAT,!1,0,0),t.bufferSubData(t.ARRAY_BUFFER,0,i?e.COVER_UV_FLIP:e.COVER_UV),t.uniform1i(n.samplerUniform,0),t.uniform1f(n.uprightUniform,i?0:1),t.drawArrays(t.TRIANGLES,0,e.INDICIES_PER_CARD)},Zi.StageGL=Zi.promote(e,"Stage")}(),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,this._webGLRenderStyle=Zi.DisplayObject._StageGL_BITMAP}var e=Zi.extend(t,Zi.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))return!0;var i=this.image,n=this.sourceRect;if(i.getImage&&(i=i.getImage()),!i)return!0;if(n){var r=n.x,s=n.y,a=r+n.width,o=s+n.height,c=0,l=0,h=i.width,u=i.height;r<0&&(c-=r,r=0),a>h&&(a=h),s<0&&(l-=s,s=0),o>u&&(o=u),t.drawImage(i,r,s,a-r,o-s,c,l,a-r,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,n=e&&(e.naturalWidth||e.getContext||e.readyState>=2);return n?this._rectangle.setValues(0,0,i.width,i.height):null},e.clone=function(e){var i=this.image;i&&e&&(i=i.cloneNode());var n=new t(i);return this.sourceRect&&(n.sourceRect=this.sourceRect.clone()),this._cloneProps(n),n},e.toString=function(){return"[Bitmap (name="+this.name+")]"},Zi.Bitmap=Zi.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){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,this._webGLRenderStyle=Zi.DisplayObject._StageGL_SPRITE,null!=e&&this.gotoAndPlay(e)}var e=Zi.extend(t,Zi.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 n=i.rect;return n.width&&n.height&&t.drawImage(i.image,n.x,n.y,n.width,n.height,-i.regX,-i.regY,n.width,n.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,n=this.paused,r=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,r,n,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(r=this._currentFrame+=t,e=this.spriteSheet.getNumFrames(),r>=e&&e>0&&!this._dispatchAnimationEnd(i,r,n,e-1)&&(this._currentFrame-=e)>=e)return this._normalizeFrame();r=0|this._currentFrame,this.currentFrame!=r&&(this.currentFrame=r,this.dispatchEvent("change"))},e._dispatchAnimationEnd=function(t,e,i,n,r){var s=t?t.name:null;if(this.hasEventListener("animationend")){var a=new Zi.Event("animationend");a.name=s,a.next=n,this.dispatchEvent(a)}var o=this._animation!=t||this._currentFrame!=e;return o||i||!this.paused||(this.currentAnimationFrame=r,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()},Zi.Sprite=Zi.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),this.graphics=t||new Zi.Graphics}var e=Zi.extend(t,Zi.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+")]"},Zi.Shape=Zi.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){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=Zi.extend(t,Zi.DisplayObject),i=Zi.createCanvas?Zi.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,{}),n=this.maxWidth&&this.maxWidth<i.width?this.maxWidth:i.width,r=n*t.H_OFFSETS[this.textAlign||"left"],s=this.lineHeight||this.getMeasuredLineHeight(),a=s*t.V_OFFSETS[this.textBaseline||"top"];return this._rectangle.setValues(r,a,n,i.height)},e.getMetrics=function(){var e={lines:[]};return e.lineHeight=this.lineHeight||this.getMeasuredLineHeight(),e.vOffset=e.lineHeight*t.V_OFFSETS[this.textBaseline||"top"],this._drawText(null,e,e.lines)},e.clone=function(){return this._cloneProps(new t(this.text,this.font,this.color))},e.toString=function(){return"[Text (text="+(this.text.length>20?this.text.substr(0,17)+"...":this.text)+")]"},e._cloneProps=function(t){return this.DisplayObject__cloneProps(t),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,t.maxWidth=this.maxWidth,t.outline=this.outline,t.lineHeight=this.lineHeight,t.lineWidth=this.lineWidth,t},e._prepContext=function(t){return t.font=this.font||"10px sans-serif",t.textAlign=this.textAlign||"left",t.textBaseline=this.textBaseline||"top",t.lineJoin="miter",t.miterLimit=2.5,t},e._drawText=function(e,i,n){var r=!!e,s=null;r||(e=t._workingContext,s=e.getTransform(),this._prepContext(e));for(var a=this.lineHeight||this.getMeasuredLineHeight(),o=0,c=0,l=String(this.text).split(/(?:\r\n|\r|\n)/),h=0,u=l.length;h<u;h++){var d=l[h],f=null;if(null!=this.lineWidth&&(f=e.measureText(d).width)>this.lineWidth){var p=d.split(/(\s)/);d=p[0],f=e.measureText(d).width;for(var _=1,m=p.length;_<m;_+=2){var v=e.measureText(p[_]+p[_+1]).width;f+v>this.lineWidth?(r&&this._drawTextLine(e,d,c*a),n&&n.push(d),f>o&&(o=f),d=p[_+1],f=e.measureText(d).width,c++):(d+=p[_]+p[_+1],f+=v)}}r&&this._drawTextLine(e,d,c*a),n&&n.push(d),i&&null==f&&(f=e.measureText(d).width),f>o&&(o=f),c++}return i&&(i.width=o,i.height=c*a),r||e.setTransform(s),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,n=i.getTransform(),r=this._prepContext(i).measureText(e).width;return i.setTransform(n),r},Zi.Text=Zi.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){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},this._oldStage=null,this._drawAction=null}var e=Zi.extend(t,Zi.Container);t.maxPoolSize=100,t._spritePool=[],e.draw=function(t,e){this.DisplayObject_draw(t,e)||(this._updateState(),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._updateState=function(){this._updateText()},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,n=e.getAnimation(t);return n||(t!=(i=t.toUpperCase())||t!=(i=t.toLowerCase())||(i=null),i&&(n=e.getAnimation(i))),n&&n.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,n=0,r=this._oldProps,s=!1,a=this.spaceWidth,o=this.lineHeight,c=this.spriteSheet,l=t._spritePool,h=this.children,u=0,d=h.length;for(var f in r)r[f]!=this[f]&&(r[f]=this[f],s=!0);if(s){var p=!!this._getFrame(" ",c);p||a||(a=this._getSpaceWidth(c)),o||(o=this._getLineHeight(c));for(var _=0,m=this.text.length;_<m;_++){var v=this.text.charAt(_);if(" "!=v||p)if("\n"!=v&&"\r"!=v){var g=this._getFrameIndex(v,c);null!=g&&(u<d?e=h[u]:(h.push(e=l.length?l.pop():new Zi.Sprite),e.parent=this,d++),e.spriteSheet=c,e.gotoAndStop(g),e.x=i,e.y=n,u++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==v&&"\n"==this.text.charAt(_+1)&&_++,i=0,n+=o;else i+=a}while(d>u)l.push(e=h.pop()),e.parent=null,d--;l.length>t.maxPoolSize&&(l.length=t.maxPoolSize)}},Zi.BitmapText=Zi.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e){var i,n,r,s;this.Container_constructor(),!t.inited&&t.init(),e instanceof String||arguments.length>1?(i=e,n=arguments[1],r=arguments[2],s=arguments[3],null==r&&(r=-1),e=null):e&&(i=e.mode,n=e.startPosition,r=e.loop,s=e.labels),e||(e={labels:s}),this.mode=i||t.INDEPENDENT,this.startPosition=n||0,this.loop=!0===r?-1:r||0,this.currentFrame=0,this.paused=e.paused||!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||e.frameBounds,this.framerate=null,e.useTicks=e.paused=!0,this.timeline=new Zi.Timeline(e),this._synchOffset=0,this._rawPosition=-1,this._bound_resolveState=this._resolveState.bind(this),this._t=0,this._managed={}}var e=Zi.extend(t,Zi.Container);t.INDEPENDENT="independent",t.SINGLE_FRAME="single",t.SYNCHED="synched",t.inited=!1,t.init=function(){t.inited||(i.install(),t.inited=!0)},e._getLabels=function(){return this.timeline.getLabels()},e.getLabels=Zi.deprecate(e._getLabels,"MovieClip.getLabels"),e._getCurrentLabel=function(){return this.timeline.currentLabel},e.getCurrentLabel=Zi.deprecate(e._getCurrentLabel,"MovieClip.getCurrentLabel"),e._getDuration=function(){return this.timeline.duration},e.getDuration=Zi.deprecate(e._getDuration,"MovieClip.getDuration");try{Object.defineProperties(e,{labels:{get:e._getLabels},currentLabel:{get:e._getCurrentLabel},totalFrames:{get:e._getDuration},duration:{get:e._getDuration}})}catch(n){}function i(){throw"MovieClipPlugin cannot be instantiated."}e.initialize=t,e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){return this.DisplayObject_draw(t,e)||(this._updateState(),this.Container_draw(t,e)),!0},e.play=function(){this.paused=!1},e.stop=function(){this.paused=!0},e.gotoAndPlay=function(t){this.paused=!1,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.advance=function(e){var i=t.INDEPENDENT;if(this.mode===i){var n=this,r=n.framerate;while((n=n.parent)&&null===r)n.mode===i&&(r=n._framerate);if(this._framerate=r,!this.paused){var s=null!==r&&-1!==r&&null!==e?e/(1e3/r)+this._t:1,a=0|s;this._t=s-a;while(a--)this._updateTimeline(this._rawPosition+1,!1)}}},e.clone=function(){throw"MovieClip cannot be cloned."},e.toString=function(){return"[MovieClip (name="+this.name+")]"},e._updateState=function(){-1!==this._rawPosition&&this.mode===t.INDEPENDENT||this._updateTimeline(-1)},e._tick=function(t){this.advance(t&&t.delta),this.Container__tick(t)},e._goto=function(t){var e=this.timeline.resolve(t);null!=e&&(this._t=0,this._updateTimeline(e,!0))},e._reset=function(){this._rawPosition=-1,this._t=this.currentFrame=0,this.paused=!1},e._updateTimeline=function(e,i){var n=this.mode!==t.INDEPENDENT,r=this.timeline;n&&(e=this.startPosition+(this.mode===t.SINGLE_FRAME?0:this._synchOffset)),e<0&&(e=0),(this._rawPosition!==e||n)&&(this._rawPosition=e,r.loop=this.loop,r.setPosition(e,n||!this.actionsEnabled,i,this._bound_resolveState))},e._renderFirstFrame=function(){var t=this.timeline,e=t.rawPosition;t.setPosition(0,!0,!0,this._bound_resolveState),t.rawPosition=e},e._resolveState=function(){var t=this.timeline;for(var e in this.currentFrame=t.position,this._managed)this._managed[e]=1;for(var i=t.tweens,n=0,r=i.length;n<r;n++){var s=i[n],a=s.target;if(a!==this&&!s.passive){var o=s._stepPosition;a instanceof Zi.DisplayObject?this._addManagedChild(a,o):this._setState(a.state,o)}}var c=this.children;for(n=c.length-1;n>=0;n--){var l=c[n].id;1===this._managed[l]&&(this.removeChildAt(n),delete this._managed[l])}},e._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var n=t[i],r=n.t,s=n.p;for(var a in s)r[a]=s[a];this._addManagedChild(r,e)}},e._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)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();return i||this.frameBounds&&(i=this._rectangle.copy(this.frameBounds[this.currentFrame])),i?this._transformBounds(i,t,e):this.Container__getBounds(t,e)},Zi.MovieClip=Zi.promote(t,"Container"),i.priority=100,i.ID="MovieClip",i.install=function(){Zi.Tween._installPlugin(i)},i.init=function(e,n,r){"startPosition"===n&&e.target instanceof t&&e._addPlugin(i)},i.step=function(t,e,i){},i.change=function(t,e,i,n,r,s){if("startPosition"===i)return 1===r?e.props[i]:e.prev.props[i]}}(),this.createjs=this.createjs||{},function(){function t(){throw"SpriteSheetUtils cannot be instantiated"}var e=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas");e.getContext&&(t._workingCanvas=e,t._workingContext=e.getContext("2d"),e.width=e.height=1),t.extractFrame=function(e,i){isNaN(i)&&(i=e.getAnimation(i).frames[0]);var n=e.getFrame(i);if(!n)return null;var r=n.rect,s=t._workingCanvas;s.width=r.width,s.height=r.height,t._workingContext.drawImage(n.image,r.x,r.y,r.width,r.height,0,0,r.width,r.height);var a=document.createElement("img");return a.src=s.toDataURL("image/png"),a},t.addFlippedFrames=Zi.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),t.mergeAlpha=Zi.deprecate(null,"SpriteSheetUtils.mergeAlpha"),t._flip=function(e,i,n,r){for(var s=e._images,a=t._workingCanvas,o=t._workingContext,c=s.length/i,l=0;l<c;l++){var h=s[l];h.__tmp=l,o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width+1,a.height+1),a.width=h.width,a.height=h.height,o.setTransform(n?-1:1,0,0,r?-1:1,n?h.width:0,r?h.height:0),o.drawImage(h,0,0);var u=document.createElement("img");u.src=a.toDataURL("image/png"),u.width=h.width||h.naturalWidth,u.height=h.height||h.naturalHeight,s.push(u)}var d=e._frames,f=d.length/i;for(l=0;l<f;l++){h=d[l];var p=h.rect.clone();u=s[h.image.__tmp+c*i];var _={image:u,rect:p,regX:h.regX,regY:h.regY};n&&(p.x=(u.width||u.naturalWidth)-p.x-p.width,_.regX=p.width-h.regX),r&&(p.y=(u.height||u.naturalHeight)-p.y-p.height,_.regY=p.height-h.regY),d.push(_)}var m="_"+(n?"h":"")+(r?"v":""),v=e._animations,g=e._data,b=v.length/i;for(l=0;l<b;l++){var y=v[l];h=g[y];var w={name:y+m,speed:h.speed,next:h.next,frames:[]};h.next&&(w.next+=m),d=h.frames;for(var x=0,E=d.length;x<E;x++)w.frames.push(d[x]+f*i);g[w.name]=w,v.push(w.name)}},Zi.SpriteSheetUtils=t}(),this.createjs=this.createjs||{},function(){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=Zi.extend(t,Zi.EventDispatcher);t.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",t.ERR_RUNNING="a build is already running",e.addFrame=function(e,i,n,r,s){if(this._data)throw t.ERR_RUNNING;var a=i||e.bounds||e.nominalBounds;return!a&&e.getBounds&&(a=e.getBounds()),a?(n=n||1,this._frames.push({source:e,sourceRect:a,scale:n,funct:r,data:s,index:this._frames.length,height:a.height*n})-1):null},e.addAnimation=function(e,i,n,r){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:n,speed:r}},e.addMovieClip=function(e,i,n,r,s,a){if(this._data)throw t.ERR_RUNNING;var o=e.frameBounds,c=i||e.bounds||e.nominalBounds;if(!c&&e.getBounds&&(c=e.getBounds()),c||o){var l,h,u=this._frames.length,d=e.timeline.duration;for(l=0;l<d;l++){var f=o&&o[l]?o[l]:c;this.addFrame(e,f,n,this._setupMovieClipFrame,{i:l,f:r,d:s})}var p=e.timeline._labels,_=[];for(var m in p)_.push({index:p[m],label:m});if(_.length)for(_.sort((function(t,e){return t.index-e.index})),l=0,h=_.length;l<h;l++){for(var v=_[l].label,g=u+_[l].index,b=u+(l==h-1?d:_[l+1].index),y=[],w=g;w<b;w++)y.push(w);a&&(v=a(v,e,g,b),!v)||this.addAnimation(v,y,!0)}}},e.build=function(){if(this._data)throw t.ERR_RUNNING;this._startBuild();while(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 n=this._frames.slice();if(n.sort((function(t,e){return t.height<=e.height?-1:1})),n[n.length-1].height+2*e>this.maxHeight)throw t.ERR_DIMENSIONS;var r=0,s=0,a=0;while(n.length){var o=this._fillRow(n,r,a,i,e);if(o.w>s&&(s=o.w),r+=o.h,!o.h||!n.length){var c=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas");c.width=this._getSize(s,this.maxWidth),c.height=this._getSize(r,this.maxHeight),this._data.images[a]=c,o.h||(s=r=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){var i=4;while(Math.pow(2,++i)<t);return Math.min(e,Math.pow(2,i))},e._fillRow=function(e,i,n,r,s){var a=this.maxWidth,o=this.maxHeight;i+=s;for(var c=o-i,l=s,h=0,u=e.length-1;u>=0;u--){var d=e[u],f=this._scale*d.scale,p=d.sourceRect,_=d.source,m=Math.floor(f*p.x-s),v=Math.floor(f*p.y-s),g=Math.ceil(f*p.height+2*s),b=Math.ceil(f*p.width+2*s);if(b>a)throw t.ERR_DIMENSIONS;g>c||l+b>a||(d.img=n,d.rect=new Zi.Rectangle(l,i,b,g),h=h||g,e.splice(u,1),r[d.index]=[l,i,b,g,n,Math.round(-m+f*_.regX-s),Math.round(-v+f*_.regY-s)],l+=b)}return{w:l,h:h}},e._endBuild=function(){this.spriteSheet=new Zi.SpriteSheet(this._data),this._data=null,this.progress=1,this.dispatchEvent("complete")},e._run=function(){var t=50*Math.max(.01,Math.min(.99,this.timeSlice||.3)),e=(new Date).getTime()+t,i=!1;while(e>(new Date).getTime())if(!this._drawNext()){i=!0;break}if(i)this._endBuild();else{var n=this;this._timerID=setTimeout((function(){n._run()}),50-t)}var r=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var s=new Zi.Event("progress");s.progress=r,this.dispatchEvent(s)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,n=t.sourceRect,r=this._data.images[t.img],s=r.getContext("2d");t.funct&&t.funct(t.source,t.data);var a=s.getTransform();return s.beginPath(),s.rect(i.x,i.y,i.width,i.height),s.clip(),s.translate(Math.ceil(i.x-n.x*e),Math.ceil(i.y-n.y*e)),s.scale(e,e),t.source.draw(s),s.setTransform(a),++this._index<this._frames.length},Zi.SpriteSheetBuilder=Zi.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),"string"==typeof t&&(t=document.getElementById(t)),this.mouseEnabled=!1;var e=t.style;e.position="absolute",e.transformOrigin=e.WebkitTransformOrigin=e.msTransformOrigin=e.MozTransformOrigin=e.OTransformOrigin="0% 0%",this.htmlElement=t,this._oldProps=null,this._oldStage=null,this._drawAction=null}var e=Zi.extend(t,Zi.DisplayObject);e.isVisible=function(){return null!=this.htmlElement},e.draw=function(t,e){return!0},e.cache=function(){},e.uncache=function(){},e.updateCache=function(){},e.hitTest=function(){},e.localToGlobal=function(){},e.globalToLocal=function(){},e.localToLocal=function(){},e.clone=function(){throw"DOMElement cannot be cloned."},e.toString=function(){return"[DOMElement (name="+this.name+")]"},e._tick=function(t){var e=this.stage;e&&e!==this._oldStage&&(this._drawAction&&e.off("drawend",this._drawAction),this._drawAction=e.on("drawend",this._handleDrawEnd,this),this._oldStage=e),this.DisplayObject__tick(t)},e._handleDrawEnd=function(t){var e=this.htmlElement;if(e){var i=e.style,n=this.getConcatenatedDisplayProps(this._props),r=n.matrix,s=n.visible?"visible":"hidden";if(s!=i.visibility&&(i.visibility=s),n.visible){var a=this._oldProps,o=a&&a.matrix,c=1e4;if(!o||!o.equals(r)){var l="matrix("+(r.a*c|0)/c+","+(r.b*c|0)/c+","+(r.c*c|0)/c+","+(r.d*c|0)/c+","+(r.tx+.5|0);i.transform=i.WebkitTransform=i.OTransform=i.msTransform=l+","+(r.ty+.5|0)+")",i.MozTransform=l+"px,"+(r.ty+.5|0)+"px)",a||(a=this._oldProps=new Zi.DisplayProps(!0,null)),a.matrix.copy(r)}a.alpha!=n.alpha&&(i.opacity=""+(n.alpha*c|0)/c,a.alpha=n.alpha)}}},Zi.DOMElement=Zi.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(){this.usesContext=!1,this._multiPass=null,this.VTX_SHADER_BODY=null,this.FRAG_SHADER_BODY=null}var e=t.prototype;e.getBounds=function(t){return t},e.shaderParamSetup=function(t,e,i){},e.applyFilter=function(t,e,i,n,r,s,a,o){s=s||t,null==a&&(a=e),null==o&&(o=i);try{var c=t.getImageData(e,i,n,r)}catch(l){return!1}return!!this._applyFilter(c)&&(s.putImageData(c,a,o),!0)},e.toString=function(){return"[Filter]"},e.clone=function(){return new t},e._applyFilter=function(t){return!0},Zi.Filter=t}(),this.createjs=this.createjs||{},function(){function e(){this.width=void 0,this.height=void 0,this.x=void 0,this.y=void 0,this.scale=1,this.offX=0,this.offY=0,this.cacheID=0,this._filterOffX=0,this._filterOffY=0,this._cacheDataURLID=0,this._cacheDataURL=null,this._drawWidth=0,this._drawHeight=0}var i=e.prototype;e.getFilterBounds=function(t,e){e||(e=new Zi.Rectangle);var i=t.filters,n=i&&i.length;if(!!n<=0)return e;for(var r=0;r<n;r++){var s=i[r];if(s&&s.getBounds){var a=s.getBounds();a&&(0==r?e.setValues(a.x,a.y,a.width,a.height):e.extend(a.x,a.y,a.width,a.height))}}return e},i.toString=function(){return"[BitmapCache]"},i.define=function(t,e,i,n,r,s,a){if(!t)throw"No symbol to cache";this._options=a,this.target=t,this.width=n>=1?n:1,this.height=r>=1?r:1,this.x=e||0,this.y=i||0,this.scale=s||1,this.update()},i.update=function(t){if(!this.target)throw"define() must be called before update()";var i=e.getFilterBounds(this.target),n=this.target.cacheCanvas;this._drawWidth=Math.ceil(this.width*this.scale)+i.width,this._drawHeight=Math.ceil(this.height*this.scale)+i.height,n&&this._drawWidth==n.width&&this._drawHeight==n.height||this._updateSurface(),this._filterOffX=i.x,this._filterOffY=i.y,this.offX=this.x*this.scale+this._filterOffX,this.offY=this.y*this.scale+this._filterOffY,this._drawToCache(t),this.cacheID=this.cacheID?this.cacheID+1:1},i.release=function(){if(this._webGLCache)this._webGLCache.isCacheControlled||(this.__lastRT&&(this.__lastRT=void 0),this.__rtA&&this._webGLCache._killTextureObject(this.__rtA),this.__rtB&&this._webGLCache._killTextureObject(this.__rtB),this.target&&this.target.cacheCanvas&&this._webGLCache._killTextureObject(this.target.cacheCanvas)),this._webGLCache=!1;else{var t=this.target.stage;t instanceof Zi.StageGL&&t.releaseTexture(this.target.cacheCanvas)}this.target=this.target.cacheCanvas=null,this.cacheID=this._cacheDataURLID=this._cacheDataURL=void 0,this.width=this.height=this.x=this.y=this.offX=this.offY=0,this.scale=1},i.getCacheDataURL=function(){var t=this.target&&this.target.cacheCanvas;return t?(this.cacheID!=this._cacheDataURLID&&(this._cacheDataURLID=this.cacheID,this._cacheDataURL=t.toDataURL?t.toDataURL():null),this._cacheDataURL):null},i.draw=function(t){return!!this.target&&(t.drawImage(this.target.cacheCanvas,this.x+this._filterOffX/this.scale,this.y+this._filterOffY/this.scale,this._drawWidth/this.scale,this._drawHeight/this.scale),!0)},i._updateSurface=function(){if(!this._options||!this._options.useGL){var t=this.target.cacheCanvas;return t||(t=this.target.cacheCanvas=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas")),t.width=this._drawWidth,void(t.height=this._drawHeight)}if(!this._webGLCache)if("stage"===this._options.useGL){if(!this.target.stage||!this.target.stage.isWebGL){var e="Cannot use 'stage' for cache because the object's parent stage is ";throw e+=this.target.stage?"non WebGL.":"not set, please addChild to the correct stage.",e}this.target.cacheCanvas=!0,this._webGLCache=this.target.stage}else if("new"===this._options.useGL)this.target.cacheCanvas=document.createElement("canvas"),this._webGLCache=new Zi.StageGL(this.target.cacheCanvas,{antialias:!0,transparent:!0,autoPurge:-1}),this._webGLCache.isCacheControlled=!0;else{if(!(this._options.useGL instanceof Zi.StageGL))throw"Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got "+this._options.useGL;this.target.cacheCanvas=!0,this._webGLCache=this._options.useGL,this._webGLCache.isCacheControlled=!0}t=this.target.cacheCanvas;var i=this._webGLCache;i.isCacheControlled&&(t.width=this._drawWidth,t.height=this._drawHeight,i.updateViewport(this._drawWidth,this._drawHeight)),this.target.filters?(i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight),i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)):i.isCacheControlled||i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)},i._drawToCache=function(e){var i=this.target.cacheCanvas,n=this.target,r=this._webGLCache;if(r)r.cacheDraw(n,n.filters,this),i=this.target.cacheCanvas,i.width=this._drawWidth,i.height=this._drawHeight;else{var s=i.getContext("2d");e||s.clearRect(0,0,this._drawWidth+1,this._drawHeight+1);var a=s.getTransform();s.globalAlpha=1,s.globalCompositeOperation=e||t,s.setTransform(this.scale,0,0,this.scale,-this._filterOffX,-this._filterOffY),s.translate(-this.x,-this.y),n.draw(s,!0),s.setTransform(a),s.globalAlpha=1,s.globalCompositeOperation=t,n.filters&&n.filters.length&&this._applyFilters(s)}i._invalid=!0},i._applyFilters=function(t){var e,i=this.target.filters,n=this._drawWidth,r=this._drawHeight,s=0,a=i[s];do{a.usesContext?(e&&(t.putImageData(e,0,0),e=null),a.applyFilter(t,0,0,n,r)):(e||(e=t.getImageData(0,0,n,r)),a._applyFilter(e)),a=null!==a._multiPass?a._multiPass:i[++s]}while(a);e&&t.putImageData(e,0,0)},Zi.BitmapCache=e}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Filter_constructor(),this._blurX=t,this._blurXTable=[],this._lastBlurX=null,this._blurY=e,this._blurYTable=[],this._lastBlurY=null,this._quality,this._lastQuality=null,this.FRAG_SHADER_TEMPLATE="uniform float xWeight[{{blurX}}];uniform float yWeight[{{blurY}}];uniform vec2 textureOffset;void main(void) {vec4 color = vec4(0.0);float xAdj = ({{blurX}}.0-1.0)/2.0;float yAdj = ({{blurY}}.0-1.0)/2.0;vec2 sampleOffset;for(int i=0; i<{{blurX}}; i++) {for(int j=0; j<{{blurY}}; j++) {sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);}}gl_FragColor = color.rgba;}",(isNaN(i)||i<1)&&(i=1),this.setQuality(0|i)}var e=Zi.extend(t,Zi.Filter);e.getBlurX=function(){return this._blurX},e.getBlurY=function(){return this._blurY},e.setBlurX=function(t){(isNaN(t)||t<0)&&(t=0),this._blurX=t},e.setBlurY=function(t){(isNaN(t)||t<0)&&(t=0),this._blurY=t},e.getQuality=function(){return this._quality},e.setQuality=function(t){(isNaN(t)||t<0)&&(t=0),this._quality=0|t},e._getShader=function(){var t=this._lastBlurX!==this._blurX,e=this._lastBlurY!==this._blurY,i=this._lastQuality!==this._quality;return t||e||i?((t||i)&&(this._blurXTable=this._getTable(this._blurX*this._quality)),(e||i)&&(this._blurYTable=this._getTable(this._blurY*this._quality)),this._updateShader(),this._lastBlurX=this._blurX,this._lastBlurY=this._blurY,void(this._lastQuality=this._quality)):this._compiledShader},e._setShader=function(){this._compiledShader};try{Object.defineProperties(e,{blurX:{get:e.getBlurX,set:e.setBlurX},blurY:{get:e.getBlurY,set:e.setBlurY},quality:{get:e.getQuality,set:e.setQuality},_builtShader:{get:e._getShader,set:e._setShader}})}catch(i){console.log(i)}e._getTable=function(t){var e=4.2;if(t<=1)return[1];var i=[],n=Math.ceil(2*t);n+=n%2?0:1;for(var r=n/2|0,s=-r;s<=r;s++){var a=s/r*e;i.push(1/Math.sqrt(2*Math.PI)*Math.pow(Math.E,-Math.pow(a,2)/4))}var o=i.reduce((function(t,e){return t+e}));return i.map((function(t,e,i){return t/o}))},e._updateShader=function(){if(void 0!==this._blurX&&void 0!==this._blurY){var t=this.FRAG_SHADER_TEMPLATE;t=t.replace(/\{\{blurX\}\}/g,this._blurXTable.length.toFixed(0)),t=t.replace(/\{\{blurY\}\}/g,this._blurYTable.length.toFixed(0)),this.FRAG_SHADER_BODY=t}},e.shaderParamSetup=function(t,e,i){t.uniform1fv(t.getUniformLocation(i,"xWeight"),this._blurXTable),t.uniform1fv(t.getUniformLocation(i,"yWeight"),this._blurYTable),t.uniform2f(t.getUniformLocation(i,"textureOffset"),2/(e._viewportWidth*this._quality),2/(e._viewportHeight*this._quality))},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(e<=0&&i<=0)return t;var n=Math.pow(this.quality,.2);return(t||new Zi.Rectangle).pad(i*n+1,e*n+1,i*n+1,e*n+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)||i<0)return!1;var n=this._blurY>>1;if(isNaN(n)||n<0)return!1;if(0==i&&0==n)return!1;var r=this.quality;(isNaN(r)||r<1)&&(r=1),r|=0,r>3&&(r=3),r<1&&(r=1);var s=e.data,a=0,o=0,c=0,l=0,h=0,u=0,d=0,f=0,p=0,_=0,m=0,v=0,g=0,b=0,y=0,w=i+i+1|0,x=n+n+1|0,E=0|e.width,S=0|e.height,T=E-1|0,C=S-1|0,I=i+1|0,O=n+1|0,R={r:0,b:0,g:0,a:0},L=R;for(c=1;c<w;c++)L=L.n={r:0,b:0,g:0,a:0};L.n=R;var k={r:0,b:0,g:0,a:0},A=k;for(c=1;c<x;c++)A=A.n={r:0,b:0,g:0,a:0};A.n=k;var D=null,P=0|t.MUL_TABLE[i],j=0|t.SHG_TABLE[i],M=0|t.MUL_TABLE[n],B=0|t.SHG_TABLE[n];while(r-- >0){d=u=0;var F=P,X=j;for(o=S;--o>-1;){for(f=I*(v=s[0|u]),p=I*(g=s[u+1|0]),_=I*(b=s[u+2|0]),m=I*(y=s[u+3|0]),L=R,c=I;--c>-1;)L.r=v,L.g=g,L.b=b,L.a=y,L=L.n;for(c=1;c<I;c++)l=u+((T<c?T:c)<<2)|0,f+=L.r=s[l],p+=L.g=s[l+1],_+=L.b=s[l+2],m+=L.a=s[l+3],L=L.n;for(D=R,a=0;a<E;a++)s[u++]=f*F>>>X,s[u++]=p*F>>>X,s[u++]=_*F>>>X,s[u++]=m*F>>>X,l=d+((l=a+i+1)<T?l:T)<<2,f-=D.r-(D.r=s[l]),p-=D.g-(D.g=s[l+1]),_-=D.b-(D.b=s[l+2]),m-=D.a-(D.a=s[l+3]),D=D.n;d+=E}for(F=M,X=B,a=0;a<E;a++){for(u=a<<2|0,f=O*(v=s[u])|0,p=O*(g=s[u+1|0])|0,_=O*(b=s[u+2|0])|0,m=O*(y=s[u+3|0])|0,A=k,c=0;c<O;c++)A.r=v,A.g=g,A.b=b,A.a=y,A=A.n;for(h=E,c=1;c<=n;c++)u=h+a<<2,f+=A.r=s[u],p+=A.g=s[u+1],_+=A.b=s[u+2],m+=A.a=s[u+3],A=A.n,c<C&&(h+=E);if(u=a,D=k,r>0)for(o=0;o<S;o++)l=u<<2,s[l+3]=y=m*F>>>X,y>0?(s[l]=f*F>>>X,s[l+1]=p*F>>>X,s[l+2]=_*F>>>X):s[l]=s[l+1]=s[l+2]=0,l=a+((l=o+O)<C?l:C)*E<<2,f-=D.r-(D.r=s[l]),p-=D.g-(D.g=s[l+1]),_-=D.b-(D.b=s[l+2]),m-=D.a-(D.a=s[l+3]),D=D.n,u+=E;else for(o=0;o<S;o++)l=u<<2,s[l+3]=y=m*F>>>X,y>0?(y=255/y,s[l]=(f*F>>>X)*y,s[l+1]=(p*F>>>X)*y,s[l+2]=(_*F>>>X)*y):s[l]=s[l+1]=s[l+2]=0,l=a+((l=o+O)<C?l:C)*E<<2,f-=D.r-(D.r=s[l]),p-=D.g-(D.g=s[l+1]),_-=D.b-(D.b=s[l+2]),m-=D.a-(D.a=s[l+3]),D=D.n,u+=E}}return!0},Zi.BlurFilter=Zi.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.alphaMap=t,this._alphaMap=null,this._mapData=null,this._mapTexture=null,this.FRAG_SHADER_BODY="uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * (alphaMap.r * ceil(alphaMap.a)));}"}var e=Zi.extend(t,Zi.Filter);e.shaderParamSetup=function(t,e,i){this._mapTexture||(this._mapTexture=t.createTexture()),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._mapTexture),e.setTextureParams(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.alphaMap),t.uniform1i(t.getUniformLocation(i,"uAlphaSampler"),1)},e.clone=function(){var e=new t(this.alphaMap);return e._alphaMap=this._alphaMap,e._mapData=this._mapData,e},e.toString=function(){return"[AlphaMapFilter]"},e._applyFilter=function(t){if(!this.alphaMap)return!0;if(!this._prepAlphaMap())return!1;for(var e=t.data,i=this._mapData,n=0,r=e.length;n<r;n+=4)e[n+3]=i[n]||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=Zi.createCanvas?Zi.createCanvas():document.createElement("canvas"),i.width=e.width,i.height=e.height,t=i.getContext("2d"),t.drawImage(e,0,0));try{var n=t.getImageData(0,0,e.width,e.height)}catch(r){return!1}return this._mapData=n.data,!0},Zi.AlphaMapFilter=Zi.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.mask=t,this.usesContext=!0,this.FRAG_SHADER_BODY="uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);}"}var e=Zi.extend(t,Zi.Filter);e.shaderParamSetup=function(t,e,i){this._mapTexture||(this._mapTexture=t.createTexture()),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._mapTexture),e.setTextureParams(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.mask),t.uniform1i(t.getUniformLocation(i,"uAlphaSampler"),1)},e.applyFilter=function(t,e,i,n,r,s,a,o){if(!this.mask)return!0;s=s||t,null==a&&(a=e),null==o&&(o=i);var c=t.getTransform();return t==s&&(s.globalCompositeOperation="destination-in",s.drawImage(this.mask,a,o),s.setTransform(c),!0)},e.clone=function(){return new t(this.mask)},e.toString=function(){return"[AlphaMaskFilter]"},Zi.AlphaMaskFilter=Zi.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a,o){this.Filter_constructor(),this.redMultiplier=null!=t?t:1,this.greenMultiplier=null!=e?e:1,this.blueMultiplier=null!=i?i:1,this.alphaMultiplier=null!=n?n:1,this.redOffset=r||0,this.greenOffset=s||0,this.blueOffset=a||0,this.alphaOffset=o||0,this.FRAG_SHADER_BODY="uniform vec4 uColorMultiplier;uniform vec4 uColorOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = (color * uColorMultiplier) + uColorOffset;}"}var e=Zi.extend(t,Zi.Filter);e.shaderParamSetup=function(t,e,i){t.uniform4f(t.getUniformLocation(i,"uColorMultiplier"),this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier),t.uniform4f(t.getUniformLocation(i,"uColorOffset"),this.redOffset/255,this.greenOffset/255,this.blueOffset/255,this.alphaOffset/255)},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,n=0;n<i;n+=4)e[n]=e[n]*this.redMultiplier+this.redOffset,e[n+1]=e[n+1]*this.greenMultiplier+this.greenOffset,e[n+2]=e[n+2]*this.blueMultiplier+this.blueOffset,e[n+3]=e[n+3]*this.alphaMultiplier+this.alphaOffset;return!0},Zi.ColorFilter=Zi.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.setColor(t,e,i,n)}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,n){return this.reset().adjustColor(t,e,i,n)},e.reset=function(){return this.copy(t.IDENTITY_MATRIX)},e.adjustColor=function(t,e,i,n){return this.adjustHue(n),this.adjustContrast(e),this.adjustBrightness(t),this.adjustSaturation(i)},e.adjustBrightness=function(t){return 0==t||isNaN(t)||(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){return 0==e||isNaN(e)||(e=this._cleanValue(e,100),e<0?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;var i},e.adjustSaturation=function(t){if(0==t||isNaN(t))return this;t=this._cleanValue(t,100);var e=1+(t>0?3*t/100:t/100),i=.3086,n=.6094,r=.082;return this._multiplyMatrix([i*(1-e)+e,n*(1-e),r*(1-e),0,0,i*(1-e),n*(1-e)+e,r*(1-e),0,0,i*(1-e),n*(1-e),r*(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),n=.213,r=.715,s=.072;return this._multiplyMatrix([n+e*(1-n)+i*-n,r+e*-r+i*-r,s+e*-s+i*(1-s),0,0,n+e*-n+.143*i,r+e*(1-r)+.14*i,s+e*-s+-.283*i,0,0,n+e*-n+i*-(1-n),r+e*-r+i*r,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),e.length!=t.LENGTH||this._multiplyMatrix(e),this},e.clone=function(){return(new t).copy(this)},e.toArray=function(){for(var e=[],i=0,n=t.LENGTH;i<n;i++)e[i]=this[i];return e},e.copy=function(e){for(var i=t.LENGTH,n=0;n<i;n++)this[n]=e[n];return this},e.toString=function(){return"[ColorMatrix]"},e._multiplyMatrix=function(t){var e,i,n,r=[];for(e=0;e<5;e++){for(i=0;i<5;i++)r[i]=this[i+5*e];for(i=0;i<5;i++){var s=0;for(n=0;n<5;n++)s+=t[i+5*n]*r[n];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.length<t.LENGTH?e=e.slice(0,e.length).concat(t.IDENTITY_MATRIX.slice(e.length,t.LENGTH)):e.length>t.LENGTH&&(e=e.slice(0,t.LENGTH)),e},Zi.ColorMatrix=t}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.matrix=t,this.FRAG_SHADER_BODY="uniform mat4 uColorMatrix;uniform vec4 uColorMatrixOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);mat4 m = uColorMatrix;vec4 newColor = vec4(0,0,0,0);newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];gl_FragColor = newColor + uColorMatrixOffset;}"}var e=Zi.extend(t,Zi.Filter);e.shaderParamSetup=function(t,e,i){var n=this.matrix,r=new Float32Array([n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]]);t.uniformMatrix4fv(t.getUniformLocation(i,"uColorMatrix"),!1,r),t.uniform4f(t.getUniformLocation(i,"uColorMatrixOffset"),n[4]/255,n[9]/255,n[14]/255,n[19]/255)},e.toString=function(){return"[ColorMatrixFilter]"},e.clone=function(){return new t(this.matrix)},e._applyFilter=function(t){for(var e,i,n,r,s=t.data,a=s.length,o=this.matrix,c=o[0],l=o[1],h=o[2],u=o[3],d=o[4],f=o[5],p=o[6],_=o[7],m=o[8],v=o[9],g=o[10],b=o[11],y=o[12],w=o[13],x=o[14],E=o[15],S=o[16],T=o[17],C=o[18],I=o[19],O=0;O<a;O+=4)e=s[O],i=s[O+1],n=s[O+2],r=s[O+3],s[O]=e*c+i*l+n*h+r*u+d,s[O+1]=e*f+i*p+n*_+r*m+v,s[O+2]=e*g+i*b+n*y+r*w+x,s[O+3]=e*E+i*S+n*T+r*C+I;return!0},Zi.ColorMatrixFilter=Zi.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){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,n){return!!(e&&e.canvas&&t.isSupported())&&(e.__touch||(e.__touch={pointers:{},multitouch:!i,preventDefault:!n,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,n=e.__touch.f=function(i){t._IOS_handleEvent(e,i)};i.addEventListener("touchstart",n,!1),i.addEventListener("touchmove",n,!1),i.addEventListener("touchend",n,!1),i.addEventListener("touchcancel",n,!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,n=e.type,r=0,s=i.length;r<s;r++){var a=i[r],o=a.identifier;a.target==t.canvas&&("touchstart"==n?this._handleStart(t,o,e,a.pageX,a.pageY):"touchmove"==n?this._handleMove(t,o,e,a.pageX,a.pageY):"touchend"!=n&&"touchcancel"!=n||this._handleEnd(t,o,e))}}},t._IE_enable=function(e){var i=e.canvas,n=e.__touch.f=function(i){t._IE_handleEvent(e,i)};void 0===window.navigator["pointerEnabled"]?(i.addEventListener("MSPointerDown",n,!1),window.addEventListener("MSPointerMove",n,!1),window.addEventListener("MSPointerUp",n,!1),window.addEventListener("MSPointerCancel",n,!1),e.__touch.preventDefault&&(i.style.msTouchAction="none")):(i.addEventListener("pointerdown",n,!1),window.addEventListener("pointermove",n,!1),window.addEventListener("pointerup",n,!1),window.addEventListener("pointercancel",n,!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,n=e.pointerId,r=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;r[n]=!0,this._handleStart(t,n,e,e.pageX,e.pageY)}else r[n]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,n,e,e.pageX,e.pageY):"MSPointerUp"!=i&&"MSPointerCancel"!=i&&"pointerup"!=i&&"pointercancel"!=i||(delete r[n],this._handleEnd(t,n,e)))}},t._handleStart=function(t,e,i,n,r){var s=t.__touch;if(s.multitouch||!s.count){var a=s.pointers;a[e]||(a[e]=!0,s.count++,t._handlePointerDown(e,i,n,r))}},t._handleMove=function(t,e,i,n,r){t.__touch.pointers[e]&&t._handlePointerMove(e,i,n,r)},t._handleEnd=function(t,e,i){var n=t.__touch,r=n.pointers;r[e]&&(n.count--,t._handlePointerUp(e,i,!0),delete r[e])},Zi.Touch=t}(),this.createjs=this.createjs||{},function(){var t=Zi.EaselJS=Zi.EaselJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:53 GMT"}()}),Zi=window.createjs=window.createjs||{};$i.call(window);var Ki=Zi,tn=function(){this.createjs=this.createjs||{},en.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},en.promote=function(t,e){var i=t.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(n)for(var r in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(r)&&"function"==typeof n[r]&&(i[e+r]=n[r]);return t},this.createjs=this.createjs||{},en.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){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+")]"},en.Event=t}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]==e){1==a?delete n[t]:r.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 n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new en.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(c){}if(t.bubbles&&this.parent){var r=this,s=[r];while(r.parent)s.push(r=r.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;a<o&&!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){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!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)}}2===e&&this._dispatchEvent(t,2.1)},en.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){function t(){throw"Ticker cannot be instantiated."}t.RAF_SYNCHED="synched",t.RAF="raf",t.TIMEOUT="timeout",t.timingMode=null,t.maxDelta=0,t.paused=!1,t.removeEventListener=null,t.removeAllEventListeners=null,t.dispatchEvent=null,t.hasEventListener=null,t._listeners=null,en.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.setInterval=en.deprecate(t._setInterval,"Ticker.setInterval"),t._getInterval=function(){return t._interval},t.getInterval=en.deprecate(t._getInterval,"Ticker.getInterval"),t._setFPS=function(e){t._setInterval(1e3/e)},t.setFPS=en.deprecate(t._setFPS,"Ticker.setFPS"),t._getFPS=function(){return 1e3/t._interval},t.getFPS=en.deprecate(t._getFPS,"Ticker.getFPS");try{Object.defineProperties(t,{interval:{get:t._getInterval,set:t._setInterval},framerate:{get:t._getFPS,set:t._setFPS}})}catch(n){console.log(n)}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=t._pausedTime=0,t._inited=!1},t.getMeasuredTickTime=function(e){var i=0,n=t._tickTimes;if(!n||n.length<1)return-1;e=Math.min(n.length,e||0|t._getFPS());for(var r=0;r<e;r++)i+=n[r];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.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;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(),n=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=n),t.hasEventListener("tick")){var r=new en.Event("tick"),s=t.maxDelta;r.delta=s&&n>s?s:n,r.paused=e,r.time=i,r.runTime=i-t._pausedTime,t.dispatchEvent(r)}t._tickTimes.unshift(t._getTime()-i);while(t._tickTimes.length>100)t._tickTimes.pop();t._times.unshift(i);while(t._times.length>100)t._times.pop()};var e=window,i=e.performance.now||e.performance.mozNow||e.performance.msNow||e.performance.oNow||e.performance.webkitNow;t._getTime=function(){return(i&&i.call(e.performance)||(new Date).getTime())-t._startTime},en.Ticker=t}(),this.createjs=this.createjs||{},function(){function t(t){this.EventDispatcher_constructor(),this.ignoreGlobalPause=!1,this.loop=0,this.useTicks=!1,this.reversed=!1,this.bounce=!1,this.timeScale=1,this.duration=0,this.position=0,this.rawPosition=-1,this._paused=!0,this._next=null,this._prev=null,this._parent=null,this._labels=null,this._labelList=null,t&&(this.useTicks=!!t.useTicks,this.ignoreGlobalPause=!!t.ignoreGlobalPause,this.loop=!0===t.loop?-1:t.loop||0,this.reversed=!!t.reversed,this.bounce=!!t.bounce,this.timeScale=t.timeScale||1,t.onChange&&this.addEventListener("change",t.onChange),t.onComplete&&this.addEventListener("complete",t.onComplete))}var e=en.extend(t,en.EventDispatcher);e._setPaused=function(t){return en.Tween._register(this,t),this},e.setPaused=en.deprecate(e._setPaused,"AbstractTween.setPaused"),e._getPaused=function(){return this._paused},e.getPaused=en.deprecate(e._getPaused,"AbstactTween.getPaused"),e._getCurrentLabel=function(t){var e=this.getLabels();null==t&&(t=this.position);for(var i=0,n=e.length;i<n;i++)if(t<e[i].position)break;return 0===i?null:e[i-1].label},e.getCurrentLabel=en.deprecate(e._getCurrentLabel,"AbstractTween.getCurrentLabel");try{Object.defineProperties(e,{paused:{set:e._setPaused,get:e._getPaused},currentLabel:{get:e._getCurrentLabel}})}catch(i){}e.advance=function(t,e){this.setPosition(this.rawPosition+t*this.timeScale,e)},e.setPosition=function(t,e,i,n){var r=this.duration,s=this.loop,a=this.rawPosition,o=0,c=0,l=!1;if(t<0&&(t=0),0===r){if(l=!0,-1!==a)return l}else{if(o=t/r|0,c=t-o*r,l=-1!==s&&t>=s*r+r,l&&(t=(c=r)*(o=s)+r),t===a)return l;var h=!this.reversed!==!(this.bounce&&o%2);h&&(c=r-c)}this.position=c,this.rawPosition=t,this._updatePosition(i,l),l&&(this.paused=!0),n&&n(this),e||this._runActions(a,t,i,!i&&-1===a),this.dispatchEvent("change"),l&&this.dispatchEvent("complete")},e.calculatePosition=function(t){var e=this.duration,i=this.loop,n=0,r=0;if(0===e)return 0;-1!==i&&t>=i*e+e?(r=e,n=i):t<0?r=0:(n=t/e|0,r=t-n*e);var s=!this.reversed!==!(this.bounce&&n%2);return s?e-r:r},e.getLabels=function(){var t=this._labelList;if(!t){t=this._labelList=[];var e=this._labels;for(var i in e)t.push({label:i,position:e[i]});t.sort((function(t,e){return t.position-e.position}))}return t},e.setLabels=function(t){this._labels=t,this._labelList=null},e.addLabel=function(t,e){this._labels||(this._labels={}),this._labels[t]=e;var i=this._labelList;if(i){for(var n=0,r=i.length;n<r;n++)if(e<i[n].position)break;i.splice(n,0,{label:t,position:e})}},e.gotoAndPlay=function(t){this.paused=!1,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.resolve=function(t){var e=Number(t);return isNaN(e)&&(e=this._labels&&this._labels[t]),e},e.toString=function(){return"[AbstractTween]"},e.clone=function(){throw"AbstractTween can not be cloned."},e._init=function(t){t&&t.paused||(this.paused=!1),t&&null!=t.position&&this.setPosition(t.position)},e._updatePosition=function(t,e){},e._goto=function(t){var e=this.resolve(t);null!=e&&this.setPosition(e,!1,!0)},e._runActions=function(t,e,i,n){if(this._actionHead||this.tweens){var r,s,a,o,c=this.duration,l=this.reversed,h=this.bounce,u=this.loop;if(0===c?(r=s=a=o=0,l=h=!1):(r=t/c|0,s=e/c|0,a=t-r*c,o=e-s*c),-1!==u&&(s>u&&(o=c,s=u),r>u&&(a=c,r=u)),i)return this._runActionsRange(o,o,i,n);if(r!==s||a!==o||i||n){-1===r&&(r=a=0);var d=t<=e,f=r;do{var p=!l!==!(h&&f%2),_=f===r?a:d?0:c,m=f===s?o:d?c:0;if(p&&(_=c-_,m=c-m),h&&f!==r&&_===m);else if(this._runActionsRange(_,m,i,n||f!==r&&!h))return!0;n=!1}while(d&&++f<=s||!d&&--f>=s)}}},e._runActionsRange=function(t,e,i,n){},en.AbstractTween=en.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(e,n){this.AbstractTween_constructor(n),this.pluginData=null,this.target=e,this.passive=!1,this._stepHead=new i(null,0,0,{},null,!0),this._stepTail=this._stepHead,this._stepPosition=0,this._actionHead=null,this._actionTail=null,this._plugins=null,this._pluginIds=null,this._injected=null,n&&(this.pluginData=n.pluginData,n.override&&t.removeTweens(e)),this.pluginData||(this.pluginData={}),this._init(n)}var e=en.extend(t,en.AbstractTween);function i(t,e,i,n,r,s){this.next=null,this.prev=t,this.t=e,this.d=i,this.props=n,this.ease=r,this.passive=s,this.index=t?t.index+1:0}function n(t,e,i,n,r){this.next=null,this.prev=t,this.t=e,this.d=0,this.scope=i,this.funct=n,this.params=r}t.IGNORE={},t._tweens=[],t._plugins=null,t._tweenHead=null,t._tweenTail=null,t.get=function(e,i){return new t(e,i)},t.tick=function(e,i){var n=t._tweenHead;while(n){var r=n._next;i&&!n.ignoreGlobalPause||n._paused||n.advance(n.useTicks?1:e),n=r}},t.handleEvent=function(t){"tick"===t.type&&this.tick(t.delta,t.paused)},t.removeTweens=function(e){if(e.tweenjs_count){var i=t._tweenHead;while(i){var n=i._next;i.target===e&&t._register(i,!0),i=n}e.tweenjs_count=0}},t.removeAllTweens=function(){var e=t._tweenHead;while(e){var i=e._next;e._paused=!0,e.target&&(e.target.tweenjs_count=0),e._next=e._prev=null,e=i}t._tweenHead=t._tweenTail=null},t.hasActiveTweens=function(e){return e?!!e.tweenjs_count:!!t._tweenHead},t._installPlugin=function(e){for(var i=e.priority=e.priority||0,n=t._plugins=t._plugins||[],r=0,s=n.length;r<s;r++)if(i<n[r].priority)break;n.splice(r,0,e)},t._register=function(e,i){var n=e.target;if(!i&&e._paused){n&&(n.tweenjs_count=n.tweenjs_count?n.tweenjs_count+1:1);var r=t._tweenTail;r?(t._tweenTail=r._next=e,e._prev=r):t._tweenHead=t._tweenTail=e,!t._inited&&en.Ticker&&(en.Ticker.addEventListener("tick",t),t._inited=!0)}else if(i&&!e._paused){n&&n.tweenjs_count--;var s=e._next,a=e._prev;s?s._prev=a:t._tweenTail=a,a?a._next=s:t._tweenHead=s,e._next=e._prev=null}e._paused=i},e.wait=function(t,e){return t>0&&this._addStep(+t,this._stepTail.props,null,e),this},e.to=function(t,e,i){(null==e||e<0)&&(e=0);var n=this._addStep(+e,null,i);return this._appendProps(t,n),this},e.label=function(t){return this.addLabel(t,this.duration),this},e.call=function(t,e,i){return this._addAction(i||this.target,t,e||[this])},e.set=function(t,e){return this._addAction(e||this.target,this._set,[t])},e.play=function(t){return this._addAction(t||this,this._set,[{paused:!1}])},e.pause=function(t){return this._addAction(t||this,this._set,[{paused:!0}])},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._addPlugin=function(t){var e=this._pluginIds||(this._pluginIds={}),i=t.ID;if(i&&!e[i]){e[i]=!0;for(var n=this._plugins||(this._plugins=[]),r=t.priority||0,s=0,a=n.length;s<a;s++)if(r<n[s].priority)return void n.splice(s,0,t);n.push(t)}},e._updatePosition=function(t,e){var i=this._stepHead.next,n=this.position,r=this.duration;if(this.target&&i){var s=i.next;while(s&&s.t<=n)i=i.next,s=i.next;var a=e?0===r?1:n/r:(n-i.t)/i.d;this._updateTargetProps(i,a,e)}this._stepPosition=i?n-i.t:0},e._updateTargetProps=function(e,i,n){if(!(this.passive=!!e.passive)){var r,s,a,o,c=e.prev.props,l=e.props;(o=e.ease)&&(i=o(i,0,1,1));var h=this._plugins;t:for(var u in c){if(s=c[u],a=l[u],r=s!==a&&"number"===typeof s?s+(a-s)*i:i>=1?a:s,h)for(var d=0,f=h.length;d<f;d++){var p=h[d].change(this,e,u,r,i,n);if(p===t.IGNORE)continue t;void 0!==p&&(r=p)}this.target[u]=r}}},e._runActionsRange=function(t,e,i,n){var r=t>e,s=r?this._actionTail:this._actionHead,a=e,o=t;r&&(a=t,o=e);var c=this.position;while(s){var l=s.t;if((l===e||l>o&&l<a||n&&l===t)&&(s.funct.apply(s.scope,s.params),c!==this.position))return!0;s=r?s.prev:s.next}},e._appendProps=function(e,i,n){var r,s,a,o,c,l=this._stepHead.props,h=this.target,u=t._plugins,d=i.prev,f=d.props,p=i.props||(i.props=this._cloneProps(f)),_={};for(r in e)if(e.hasOwnProperty(r)&&(_[r]=p[r]=e[r],void 0===l[r])){if(o=void 0,u)for(s=u.length-1;s>=0;s--)if(a=u[s].init(this,r,o),void 0!==a&&(o=a),o===t.IGNORE){delete p[r],delete _[r];break}o!==t.IGNORE&&(void 0===o&&(o=h[r]),f[r]=void 0===o?null:o)}for(r in _){a=e[r];var m,v=d;while((m=v)&&(v=m.prev))if(v.props!==m.props){if(void 0!==v.props[r])break;v.props[r]=f[r]}}if(!1!==n&&(u=this._plugins))for(s=u.length-1;s>=0;s--)u[s].step(this,i,_);(c=this._injected)&&(this._injected=null,this._appendProps(c,i,!1))},e._injectProp=function(t,e){var i=this._injected||(this._injected={});i[t]=e},e._addStep=function(t,e,n,r){var s=new i(this._stepTail,this.duration,t,e,n,r||!1);return this.duration+=t,this._stepTail=this._stepTail.next=s},e._addAction=function(t,e,i){var r=new n(this._actionTail,this.duration,t,e,i);return this._actionTail?this._actionTail.next=r:this._actionHead=r,this._actionTail=r,this},e._set=function(t){for(var e in t)this[e]=t[e]},e._cloneProps=function(t){var e={};for(var i in t)e[i]=t[i];return e},en.Tween=en.promote(t,"AbstractTween")}(),this.createjs=this.createjs||{},function(){function t(t){var e,i;t instanceof Array||null==t&&arguments.length>1?(e=t,i=arguments[1],t=arguments[2]):t&&(e=t.tweens,i=t.labels),this.AbstractTween_constructor(t),this.tweens=[],e&&this.addTween.apply(this,e),this.setLabels(i),this._init(t)}var e=en.extend(t,en.AbstractTween);e.addTween=function(t){t._parent&&t._parent.removeTween(t);var e=arguments.length;if(e>1){for(var i=0;i<e;i++)this.addTween(arguments[i]);return arguments[e-1]}if(0===e)return null;this.tweens.push(t),t._parent=this,t.paused=!0;var n=t.duration;return t.loop>0&&(n*=t.loop+1),n>this.duration&&(this.duration=n),this.rawPosition>=0&&t.setPosition(this.rawPosition),t},e.removeTween=function(t){var e=arguments.length;if(e>1){for(var i=!0,n=0;n<e;n++)i=i&&this.removeTween(arguments[n]);return i}if(0===e)return!0;var r=this.tweens;n=r.length;while(n--)if(r[n]===t)return r.splice(n,1),t._parent=null,t.duration>=this.duration&&this.updateDuration(),!0;return!1},e.updateDuration=function(){this.duration=0;for(var t=0,e=this.tweens.length;t<e;t++){var i=this.tweens[t],n=i.duration;i.loop>0&&(n*=i.loop+1),n>this.duration&&(this.duration=n)}},e.toString=function(){return"[Timeline]"},e.clone=function(){throw"Timeline can not be cloned."},e._updatePosition=function(t,e){for(var i=this.position,n=0,r=this.tweens.length;n<r;n++)this.tweens[n].setPosition(i,!0,t)},e._runActionsRange=function(t,e,i,n){for(var r=this.position,s=0,a=this.tweens.length;s<a;s++)if(this.tweens[s]._runActions(t,e,i,n),r!==this.position)return!0},en.Timeline=en.promote(t,"AbstractTween")}(),this.createjs=this.createjs||{},function(){function t(){throw"Ease cannot be instantiated."}t.linear=function(t){return t},t.none=t.linear,t.get=function(t){return t<-1?t=-1:t>1&&(t=1),function(e){return 0==t?e:t<0?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 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},t.bounceInOut=function(e){return e<.5?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5},t.getElasticIn=function(t,e){var i=2*Math.PI;return function(n){if(0==n||1==n)return n;var r=e/i*Math.asin(1/t);return-t*Math.pow(2,10*(n-=1))*Math.sin((n-r)*i/e)}},t.elasticIn=t.getElasticIn(1,.3),t.getElasticOut=function(t,e){var i=2*Math.PI;return function(n){if(0==n||1==n)return n;var r=e/i*Math.asin(1/t);return t*Math.pow(2,-10*n)*Math.sin((n-r)*i/e)+1}},t.elasticOut=t.getElasticOut(1,.3),t.getElasticInOut=function(t,e){var i=2*Math.PI;return function(n){var r=e/i*Math.asin(1/t);return(n*=2)<1?t*Math.pow(2,10*(n-=1))*Math.sin((n-r)*i/e)*-.5:t*Math.pow(2,-10*(n-=1))*Math.sin((n-r)*i/e)*.5+1}},t.elasticInOut=t.getElasticInOut(1,.3*1.5),en.Ease=t}(),this.createjs=this.createjs||{},function(){function t(){throw"MotionGuidePlugin cannot be instantiated."}var e=t;e.priority=0,e.ID="MotionGuide",e.install=function(){return en.Tween._installPlugin(t),en.Tween.IGNORE},e.init=function(t,i,n){"guide"==i&&t._addPlugin(e)},e.step=function(t,i,n){for(var r in n)if("guide"===r){var s=i.props.guide,a=e._solveGuideData(n.guide,s);s.valid=!a;var o=s.endData;if(t._injectProp("x",o.x),t._injectProp("y",o.y),a||!s.orient)break;var c=void 0===i.prev.props.rotation?t.target.rotation||0:i.prev.props.rotation;if(s.startOffsetRot=c-s.startData.rotation,"fixed"==s.orient)s.endAbsRot=o.rotation+s.startOffsetRot,s.deltaRotation=0;else{var l=void 0===n.rotation?t.target.rotation||0:n.rotation,h=l-s.endData.rotation-s.startOffsetRot,u=h%360;switch(s.endAbsRot=l,s.orient){case"auto":s.deltaRotation=h;break;case"cw":s.deltaRotation=(u+360)%360+360*Math.abs(h/360|0);break;case"ccw":s.deltaRotation=(u-360)%360+-360*Math.abs(h/360|0);break}}t._injectProp("rotation",s.endAbsRot)}},e.change=function(t,i,n,r,s,a){var o=i.props.guide;if(o&&i.props!==i.prev.props&&o!==i.prev.props.guide)return"guide"===n&&!o.valid||"x"==n||"y"==n||"rotation"===n&&o.orient?en.Tween.IGNORE:void e._ratioToPositionData(s,o,t.target)},e.debug=function(t,i,n){t=t.guide||t;var r=e._findPathProblems(t);if(r&&console.error("MotionGuidePlugin Error found: \n"+r),!i)return r;var s=t.path,a=s.length,o=3,c=9;for(i.save(),i.lineCap="round",i.lineJoin="miter",i.beginPath(),i.moveTo(s[0],s[1]),d=2;d<a;d+=4)i.quadraticCurveTo(s[d],s[d+1],s[d+2],s[d+3]);i.strokeStyle="black",i.lineWidth=1.5*o,i.stroke(),i.strokeStyle="white",i.lineWidth=o,i.stroke(),i.closePath();var l=n.length;if(n&&l){var h={},u={};e._solveGuideData(t,h);for(var d=0;d<l;d++)h.orient="fixed",e._ratioToPositionData(n[d],h,u),i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(u.x+Math.cos(.0174533*u.rotation)*c,u.y+Math.sin(.0174533*u.rotation)*c),i.strokeStyle="black",i.lineWidth=1.5*o,i.stroke(),i.strokeStyle="red",i.lineWidth=o,i.stroke(),i.closePath()}return i.restore(),r},e._solveGuideData=function(t,i){var n=void 0;if(n=e.debug(t))return n;var r=i.path=t.path;i.orient=t.orient;i.subLines=[],i.totalLength=0,i.startOffsetRot=0,i.deltaRotation=0,i.startData={ratio:0},i.endData={ratio:1},i.animSpan=1;var s,a,o,c,l,h,u,d,f,p=r.length,_=10,m={};for(s=r[0],a=r[1],u=2;u<p;u+=4){o=r[u],c=r[u+1],l=r[u+2],h=r[u+3];var v={weightings:[],estLength:0,portion:0},g=s,b=a;for(d=1;d<=_;d++){e._getParamsForCurve(s,a,o,c,l,h,d/_,!1,m);var y=m.x-g,w=m.y-b;f=Math.sqrt(y*y+w*w),v.weightings.push(f),v.estLength+=f,g=m.x,b=m.y}for(i.totalLength+=v.estLength,d=0;d<_;d++)f=v.estLength,v.weightings[d]=v.weightings[d]/f;i.subLines.push(v),s=l,a=h}f=i.totalLength;var x=i.subLines.length;for(u=0;u<x;u++)i.subLines[u].portion=i.subLines[u].estLength/f;var E=isNaN(t.start)?0:t.start,S=isNaN(t.end)?1:t.end;e._ratioToPositionData(E,i,i.startData),e._ratioToPositionData(S,i,i.endData),i.startData.ratio=E,i.endData.ratio=S,i.animSpan=i.endData.ratio-i.startData.ratio},e._ratioToPositionData=function(t,i,n){var r,s,a,o,c,l=i.subLines,h=0,u=10,d=t*i.animSpan+i.startData.ratio;for(s=l.length,r=0;r<s;r++){if(o=l[r].portion,h+o>=d){c=r;break}h+=o}void 0===c&&(c=s-1,h-=o);var f=l[c].weightings,p=o;for(s=f.length,r=0;r<s;r++){if(o=f[r]*p,h+o>=d)break;h+=o}c=4*c+2,a=r/u+(d-h)/o*(1/u);var _=i.path;return e._getParamsForCurve(_[c-2],_[c-1],_[c],_[c+1],_[c+2],_[c+3],a,i.orient,n),i.orient&&(t>=.99999&&t<=1.00001&&void 0!==i.endAbsRot?n.rotation=i.endAbsRot:n.rotation+=i.startOffsetRot+t*i.deltaRotation),n},e._getParamsForCurve=function(t,e,i,n,r,s,a,o,c){var l=1-a;c.x=l*l*t+2*l*a*i+a*a*r,c.y=l*l*e+2*l*a*n+a*a*s,o&&(c.rotation=57.2957795*Math.atan2((n-e)*l+(s-n)*a,(i-t)*l+(r-i)*a))},e._findPathProblems=function(t){var e=t.path,i=e&&e.length||0;if(i<6||(i-2)%4){var n="\tCannot parse 'path' array due to invalid number of entries in path. ";return n+="There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). ",n+="See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\n\n",n+="Only [ "+i+" ] values found. Expected: "+Math.max(4*Math.ceil((i-2)/4)+2,6),n}for(var r=0;r<i;r++)if(isNaN(e[r]))return"All data in path array must be numeric";var s=t.start;if(isNaN(s)&&void 0!==s)return"'start' out of bounds. Expected 0 to 1, got: "+s;var a=t.end;if(isNaN(a)&&void 0!==a)return"'end' out of bounds. Expected 0 to 1, got: "+a;var o=t.orient;return o&&"fixed"!=o&&"auto"!=o&&"cw"!=o&&"ccw"!=o?'Invalid orientation value. Expected ["fixed", "auto", "cw", "ccw", undefined], got: '+o:void 0},en.MotionGuidePlugin=t}(),this.createjs=this.createjs||{},function(){var t=en.TweenJS=en.TweenJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:47 GMT"}()},en=window.createjs=window.createjs||{}; /*! * TweenJS * Visit http://createjs.com/ for documentation, updates and examples. * * Copyright (c) 2010 gskinner.com, inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */tn.call(window);var nn=en,rn=Qi["a"].LoadQueue,sn=Ki.Bitmap,an=(Ki.Point,Ki.BitmapCache),on=Ki.Stage,cn=Ki.Shape,ln=Ki.Container,hn=Ki.Touch,un=Ki.Ticker,dn=nn.Tween,fn=nn.Ease,pn=(i("20d6"),function(t){if("object"!==Object(a["a"])(t))return null;var e=new sn("");return e.image=t,e.mouseEnabled=!1,e.tickEnabled=!1,t.canvasCache?(e.cacheCanvas=t.canvasCache,e.bitmapCache=new an,e.bitmapCache.define(e,0,0,t.width,t.height)):(e.cache(0,0,t.width,t.height),t.canvasCache=e.cacheCanvas),e}),_n=function(t){if("string"!==typeof t)return null;var e=new sn("");e.mouseEnabled=!1,e.tickEnabled=!1;var i=new Image;return i.onload=function(t){e.image=i,e.cache(0,0,i.width,i.height),e.dispatchEvent("cached")},i.crossOrigin="anonymous",i.src=t,e},mn={},vn=function(){function t(){Object(Yi["a"])(this,t)}return Object(Hi["a"])(t,[{key:"pushMethod",value:function(t,e){return mn[t]=e,this}},{key:"call",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=null;return"function"===typeof mn[t]&&(i=mn[t].apply(null,e||[])),i instanceof Promise?i:Promise.resolve(i)}}]),t}(),gn={mm:void 0};"function"!==typeof window.mmload&&(window.mmload=function(t){t.mm=this},window.mmload=window.mmload.bind(new vn)),window.mmload(gn);var bn=gn.mm,yn={}; /*! * EaselJS * Visit http://createjs.com/ for documentation, updates and examples. * * Copyright (c) 2010 gskinner.com, inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */(function(){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+")]"},yn.Event=t})(),function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]===e){1===a?delete n[t]:r.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 n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new yn.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(c){}if(t.bubbles&&this.parent){var r,s=this,a=[s];while(s.parent)a.push(s=s.parent);var o=a.length;for(r=o-1;r>=0&&!t.propagationStopped;r--)a[r]._dispatchEvent(t,1+(0===r));for(r=1;r<o&&!t.propagationStopped;r++)a[r]._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){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!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)}}2===e&&this._dispatchEvent(t,2.1)},yn.EventDispatcher=t}();var wn=yn.Event,xn=yn.EventDispatcher,En=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;Object(Yi["a"])(this,t),this.files={},this.baseURL=e,this._onDemandMode=!1,this._queueItems=[],this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,this._queues=[];for(var n=0;n<i;n++){var r=new rn(!0);r.id=n,r.on("fileload",this._handleFileLoad,this),r.on("fileerror",this._handleFileError,this),r.on("complete",this._handleComplete,this),0===n&&r.on("progress",this._handleProgress,this),this._queues.push(r)}this._events=new xn}return Object(Hi["a"])(t,[{key:"_handleProgress",value:function(t){this._downloading&&(t.loaded=this._loadedFiles/this._totalFiles,t.progress=t.loaded,this._events.dispatchEvent(t))}},{key:"_handleFileLoad",value:function(t){var e=this;if(this._loadedFiles++,!this.files[t.item.id]){/^blob:/.test(t.item.id)?this.files[t.item.id]=t.item.id:this.files[t.item.id]=t.result;var i=this._queueItems.findIndex((function(e){return e.id===t.item.id}));-1!==i&&(this._queueItems[i].listeners.forEach((function(i){var n={id:t.item.id,result:e.getItem(t.item.id)};n.result.bitmapCache?i.resolve(n):n.result.on("cached",(function(){i.resolve(n)}))})),this._queueItems.splice(i,1)),this._events.dispatchEvent(this._eventFactory("fileload",{id:t.item.id}))}}},{key:"_handleFileError",value:function(t){if(this._loadedFiles++,this.files[t.item.id])return!1;this.files[t.item.id]=null;var e=this._queueItems.findIndex((function(e){return e.id===t.item.id}));-1!==e&&(this._queueItems[e].listeners.forEach((function(e){return e.reject(new Error(t.item.id))})),this._queueItems.splice(e,1))}},{key:"_eventFactory",value:function(t,e){var i=new wn(t);return i.loadedCount=this._loadedFiles,i.total=this._totalFiles,e.id&&(i.fileId=e.id),i.result=e.result,i}},{key:"_handleComplete",value:function(t){var e=this;if(this._downloading)return 0===this._queueItems.length?(this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,void this._events.dispatchEvent(this._eventFactory("complete",{}))):void this._queues.forEach((function(t){t._numItems===t._numItemsLoaded&&e._loadQueueItems(t)}))}},{key:"_loadQueueItems",value:function(t){t.removeAll();var e=this._queueItems.filter((function(e){return e.queueId===t.id}));0!==e.length&&t.loadManifest(e)}},{key:"setBaseUrl",value:function(t){this.baseURL=t}},{key:"setOnDemandMode",value:function(t){this._onDemandMode=t}},{key:"isOnDemandMode",value:function(){return this._onDemandMode}},{key:"addEventListener",value:function(t,e){this._events.on(t,e)}},{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"addToQueue",value:function(t){var e=this;return t?new Promise((function(i,n){var r=e._queueItems.find((function(e){return e.id===t})),s=t;!/^blob:/.test(s)&&e.baseURL&&(s="".concat(e.baseURL).concat(t)),r||(r={id:t,src:s,crossOrigin:"Anonymous",listeners:[],queueId:e._queueItems.length%e._queues.length},e._queueItems.push(r)),r.listeners.push({resolve:i,reject:n})})):Promise.reject(new Error("Src is empty or exist"))}},{key:"hasItem",value:function(t){return!(!t||!this.files[t])}},{key:"getItem",value:function(t){return this.hasItem(t)?/^blob:/.test(t)?_n(this.files[t]):pn(this.files[t]):null}},{key:"releaseItem",value:function(t){return!!this.hasItem(t)&&(this.files[t]=null,delete this.files[t],!0)}},{key:"loadItems",value:function(){var t=this;if(!this._downloading){if(this._downloading=!0,this._queueItems.length>0)return this._loadedFiles=0,this._totalFiles=this._queueItems.length,this._queues.forEach((function(e){return t._loadQueueItems(e)})),void this._events.dispatchEvent(this._eventFactory("start",{}));setTimeout((function(){return t._handleComplete(null)}),0)}}},{key:"cleanOut",value:function(){this._queues.forEach((function(t){return t.removeAll()})),this._events.removeAllEventListeners(),this.files={},this._queueItems=[],this._downloading=!1,this._loadedFiles=0,this._totalFiles=0}}]),t}(),Sn=new En,Tn=Sn,Cn=function(t){t.preventDefault()},In=function(t){t.paused||this.update()},On=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;Object(Yi["a"])(this,t);var n="string"===typeof e?document.getElementById(e):e;if(!n)throw new Error("Canvas not found");n.addEventListener("contextmenu",Cn),this._baseStage=new on(n,{antialias:!0}),this._baseStage.tickChildren=!1,this._baseStage.tickOnUpdate=!1,this._baseStage.preventSelection=!1,this._baseStage.invalidate=this.invalidate.bind(this),this.enableInterationEvents(!0),this._bgDisplay=new cn,this._baseStage.addChild(this._bgDisplay),this._gameDisplay=new ln,this._baseStage.addChild(this._gameDisplay),this._stampsDisplay=new ln,this._baseStage.addChild(this._stampsDisplay),this._invalidateLastFrame=!0,this._lockUpdates=!1,this.setManifest(n.width,n.height),this.children=[],un.framerate=i||60,un.addEventListener("tick",In.bind(this))}return Object(Hi["a"])(t,[{key:"lockUpdates",value:function(t){this._lockUpdates=!!t,t||this.invalidate()}},{key:"enableInterationEvents",value:function(t){this._baseStage.mouseMoveOutside=!!t,this._baseStage.enableDOMEvents(!!t),this._baseStage.touchEnabled&&!t&&hn.disable(this._baseStage),!this._baseStage.touchEnabled&&t&&hn.enable(this._baseStage,!1,!0),this._baseStage.touchEnabled=!!t}},{key:"setManifest",value: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]:null;this.width=t||0,this.height=e||0,this.bgColor=i||"transparent"}},{key:"addChildStamp",value:function(t){return this.addChild(t,!0)}},{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return-1;var i=t;return"function"===typeof t.getStageDisplay&&(i=t.getStageDisplay()),i.parent&&i.parent.removeChild(i),e?this._stampsDisplay.addChild(i):this._gameDisplay.addChild(i),this._invalidateLastFrame=!0,t.getStageDisplay?(t._stage=this,this.children.push(t)):-1}},{key:"getChild",value:function(t){return this.children[t]}},{key:"getStageBase",value:function(t){return this._baseStage}},{key:"getItemsDisplay",value:function(){return this._gameDisplay}},{key:"getStampsDisplay",value:function(){return this._stampsDisplay}},{key:"removeChild",value:function(t){if(!t)return-1;var e=t;if("function"===typeof t.getStageDisplay&&(e=t.getStageDisplay()),e.parent&&e.parent.removeChild(e),this._invalidateLastFrame=!0,!t.getStageDisplay)return-1;var i=this.children.indexOf(t);return-1===i?-1:this.children.splice(i,1)}},{key:"forEach",value:function(t){return this.children.forEach(t)}},{key:"setChildVisible",value:function(t,e){this.children[t].setVisible(!!e),this._invalidateLastFrame=!0}},{key:"invalidate",value:function(){this._invalidateLastFrame=!0}},{key:"restore",value:function(){this.children=[],this._stampsDisplay.removeAllChildren(),this._gameDisplay.removeAllChildren(),this.width&&this.height&&"transparent"!==this.bgColor&&this._bgDisplay.graphics.clear().beginFill(this.bgColor).drawRect(0,0,this.width,this.height).endFill(),this.invalidate()}},{key:"update",value:function(){this._invalidateLastFrame&&!this._lockUpdates&&(this._baseStage.update(),this._invalidateLastFrame=!1)}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"framerate",get:function(){return un.framerate},set:function(t){un.framerate=parseInt(t)}}]),t}(),Rn=On,Ln=(i("0d6d"),180/Math.PI),kn=Object.freeze({PINCH_START:"stagepinchstart",PINCH_MOVE:"stagepinchmove",PINCH_END:"stagepinchend"}),An=function(){function t(){throw Object(Yi["a"])(this,t),"Pinch cannot be instantiated"}return Object(Hi["a"])(t,null,[{key:"isSupported",value:function(){return hn.isSupported()}},{key:"enable",value:function(t){return!!(t&&t.canvas&&hn.isSupported())&&(t.__pinch&&t.__pinch.enable||("undefined"===typeof t.__pinch&&(t.__pinch={enabled:!0,touchs:[],eventData:null}),t.__pinch.enable=!0,t.__pinch.touchs=[],t.__pinch.eventData=null,t.addEventListener("stagemousedown",Dn),t.addEventListener("stagemouseup",Pn),t.addEventListener("stagemousemove",jn)),!0)}},{key:"disable",value:function(t){return!(!t||!t.canvas)&&(!("object"!==Object(a["a"])(t.__pinch)||!t.__pinch.enable)&&(t.__pinch.enable=!1,t.removeEventListener("stagemousedown",Dn),t.removeEventListener("stagemouseup",Pn),t.removeEventListener("stagemousemove",jn),!0))}}]),t}(),Dn=function(t){if(t.isTouch&&-1!==t.pointerID){var e=t.target;if(e.__pinch&&e.__pinch.enable){var i=e.__pinch,n=i.touchs;if(!(n.length>=2)){var r=i.touchs.findIndex((function(e){return e.pointerID===t.pointerID}));if(-1===r&&i.touchs.push({pointerID:t.pointerID,x:t.stageX,y:t.stageY}),2===n.length){i.eventData={delta:1,distance:Mn(n[0],n[1]),angle:Bn(n[0],n[1]),pivot:{x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}};var s=new wn(kn.PINCH_START);s.set(i.eventData),e.dispatchEvent(s)}}}}},Pn=function(t){if(t.isTouch&&-1!==t.pointerID){var e=t.target;if(e.__pinch&&e.__pinch.enable){var i=e.__pinch,n=i.touchs.findIndex((function(e){return e.pointerID===t.pointerID}));-1!==n&&(i.touchs.splice(n,1),i.eventData&&(i.eventData=null,e.dispatchEvent(new wn(kn.PINCH_END))))}}},jn=function(t){if(t.isTouch&&-1!==t.pointerID){var e=t.target;if(e.__pinch&&e.__pinch.enable){var i=e.__pinch,n=i.touchs.find((function(e){return e.pointerID===t.pointerID}));if(n){n.x=t.stageX,n.y=t.stageY;var r=i.touchs;if(2===r.length){var s=Mn(r[0],r[1]);i.eventData.delta=s/i.eventData.distance,i.eventData.angle=Bn(r[0],r[1]);var a=new wn(kn.PINCH_MOVE);a.set({delta:i.eventData.delta,distance:s,angle:i.eventData.angle,pivot:{x:(r[0].x+r[1].x)/2,y:(r[0].y+r[1].y)/2}}),e.dispatchEvent(a)}}}}},Mn=function(t,e){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))},Bn=function(t,e){return Math.atan2(e.x-t.x,-(e.y-t.y))*Ln},Fn=function(){function t(e){Object(Yi["a"])(this,t),this.offsetY=0,this.offsetX=0,this.offsetStep=1,this._maxOffsetY=parseInt(e.up||0),this._minOffsetY=-parseInt(e.down||0),this._maxOffsetX=parseInt(e.right||0),this._minOffsetX=-parseInt(e.left||0)}return Object(Hi["a"])(t,[{key:"transform",value:function(t,e){var i=t.action,n=t.offset;switch(i){case"up":this._moveUp(e);break;case"down":this._moveDown(e);break;case"left":this._moveLeft(e);break;case"right":this._moveRight(e);break;case"default":this._moveDefault(e);break;case"exact":this._moveExact(n,e);break}}},{key:"clone",value:function(){return new t({up:this._maxOffsetY,down:-this._minOffsetY,right:this._maxOffsetX,left:-this._minOffsetX})}},{key:"random",value:function(){return{y:parseInt(Math.random()*(this._maxOffsetY-this._minOffsetY)+this._minOffsetY),x:parseInt(Math.random()*(this._maxOffsetX-this._minOffsetX)+this._minOffsetX)}}},{key:"_moveExact",value:function(t,e){this._moveDefault(e),this.offsetY=parseInt(t.y),this.offsetX=parseInt(t.x),e.y+=this.offsetY,e.x+=this.offsetX}},{key:"_moveUp",value:function(t){this._minOffsetY!==this.offsetY&&(this.offsetY-=this.offsetStep,t.y-=this.offsetStep)}},{key:"_moveDown",value:function(t){this._maxOffsetY!==this.offsetY&&(this.offsetY+=this.offsetStep,t.y+=this.offsetStep)}},{key:"_moveRight",value:function(t){this._maxOffsetX!==this.offsetX&&(this.offsetX+=this.offsetStep,t.x+=this.offsetStep)}},{key:"_moveLeft",value:function(t){this._minOffsetX!==this.offsetX&&(this.offsetX-=this.offsetStep,t.x-=this.offsetStep)}},{key:"_moveDefault",value:function(t){t.x-=this.offsetX,t.y-=this.offsetY,this.offsetX=0,this.offsetY=0}}]),t}(),Xn=Fn,Un=function(){function t(){Object(Yi["a"])(this,t),this._pendingCalls=[],this._onFlushOnceListeners=[]}return Object(Hi["a"])(t,[{key:"once",value:function(t,e){"function"===typeof e&&"flush"===t&&this._onFlushOnceListeners.push(e)}},{key:"reset",value:function(){this._pendingCalls=[],this._onFlushOnceListeners=[]}},{key:"push",value:function(t){return"function"===typeof t?this.pushCallback(t):"object"===Object(a["a"])(t)?this.pushPromisse(t):void 0}},{key:"pushCallback",value:function(t){"function"===typeof t&&this._pendingCalls.push(t)}},{key:"pushPromisse",value:function(t){var e=t.resolve,i=t.reject;"function"===typeof e&&"function"===typeof i&&this._pendingCalls.push({resolve:e,reject:i})}},{key:"flushCalls",value:function(){this._pendingCalls.forEach((function(t){"function"===typeof t&&t()})),this.__flushListeners()}},{key:"clearCalls",value:function(){this._pendingCalls=[],this.__flushListeners()}},{key:"resolveAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._pendingCalls.forEach((function(e){"object"===Object(a["a"])(e)&&"function"===typeof e.resolve&&e.resolve(t)})),this.__flushListeners()}},{key:"rejectAll",value:function(t){this._pendingCalls.forEach((function(e){"object"===Object(a["a"])(e)&&"function"===typeof e.resolve&&e.reject(t)})),this.__flushListeners()}},{key:"__flushListeners",value:function(){this._onFlushOnceListeners.forEach((function(t){"function"===typeof t&&t()})),this.reset()}}]),t}(),Nn=Un,Gn=function(t,e,i,n){i[e]=i[t],i[t]=function(){this[e].apply(this,arguments);var i=Array.prototype.slice.call(arguments);Hn.slaveCall(n,(function(e){e[t].apply(e,Object(h["a"])(i))}))}},Yn=function(){function t(){Object(Yi["a"])(this,t),this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls=new Nn}return Object(Hi["a"])(t,[{key:"onFlushOnce",value:function(t){return this.pendingCalls.once("flush",t)}},{key:"reset",value:function(){this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls.reset()}},{key:"addMaster",value:function(t,e){-1===this.masterRefs.indexOf(t)&&this.masterRefs.push(t),Gn("setVisible","___setVisible",e,t),Gn("setProps","___setProps",e,t),Gn("transform","___transform",e,t),this.masterObjects[t]=e}},{key:"addSlave",value:function(t,e){var i=this;return new Promise((function(n,r){i.pendingCalls.push((function(){if(-1===i.masterRefs.indexOf(t)||"object"!==Object(a["a"])(e))return r(new Error("Invalid master ref or slaveObject"));i.slaveObjects[t]||(i.slaveObjects[t]=[]);var s=i.masterObjects[t];if(s._transformations&&(e._transformations=s._transformations.clone()),s.category&&e.category&&e.category.scope&&e.category.scope===s.category.scope)return r(new Error("This layer was linked with master layer under the same color global scope"));i.slaveObjects[t].push(e),n(s)}))}))}},{key:"flushPendingCalls",value:function(){this.pendingCalls.flushCalls()}},{key:"slaveCall",value:function(t,e){-1!==this.masterRefs.indexOf(t)&&"function"===typeof e&&this.slaveObjects[t]&&this.slaveObjects[t].forEach(e)}}]),t}(),Hn=new Yn,Vn=Hn,qn=!0,Wn=function(t){t&&"undefined"===typeof t.__tweenTickEnabled&&(t.__tweenTickEnabled=!1,un.framerate=60,un.addEventListener("tick",(function(e){!e.paused&&t.__tweenTickEnabled&&t.invalidate()})))},zn=function(t){var e=t.target,i=e.target||{},n=i.stage;Wn(i.stage),n&&!n.__tweenTickEnabled&&qn&&(n.__tweenTickEnabled=!0)},Jn=function(t){var e=t.target,i=e.target||{},n=i.stage;e.removeAllEventListeners(),n&&n.__tweenTickEnabled&&qn&&(n.__tweenTickEnabled=!1)},Qn={get isEnabled(){return qn},enable:function(){qn=!0},disable:function(){qn=!1},get:function(t){if(!qn||"object"!==Object(a["a"])(t))return{to:function(){return!1}};t instanceof Zn&&(t=t.getStageDisplay());var e=dn.get(t,{override:!1});return e.addEventListener("change",zn),e.addEventListener("complete",Jn),e}},$n=function(){function t(e){var i=this;if(Object(Yi["a"])(this,t),this.width=e.width||0,this.height=e.height||0,this.__json=e,this._stageDisplay=new ln,this._stageDisplay.mouseEnabled=!1,this._stageDisplay.x=e.x||0,this._stageDisplay.y=e.y||0,this._mirror=e.mirror,this._ref=e.ref,this._random={factor:.5},e.random)for(var n in e.random)this._random[n]=e.random[n];this._stage=null,this._mirror?Vn.addSlave(this._mirror,this).catch((function(t){i._mirror=null})):this._ref&&Vn.addMaster(this._ref,this),this._transformations=null,e.transform&&(this._transformations=new Xn(e.transform))}return Object(Hi["a"])(t,[{key:"on",value:function(t,e){this._stageDisplay.on(t,e)}},{key:"once",value:function(t,e){this._stageDisplay.on(t,e,null,!0)}},{key:"dispatchEvent",value:function(t,e,i){return this._stageDisplay.dispatchEvent(t,e,i)}},{key:"enableInterationEvents",value:function(t){this._stageDisplay.mouseEnabled=!!t}},{key:"getRef",value:function(){return this._ref}},{key:"getJsonBase",value:function(){return this.__json}},{key:"removeAllChildren",value:function(){this._stageDisplay.removeAllChildren()}},{key:"addChild",value:function(t){if("function"===typeof t.getStageDisplay)return t._stage=this._stage,void this._stageDisplay.addChild(t.getStageDisplay());this._stageDisplay.addChild(t)}},{key:"setPosition",value:function(t,e){if(!Qn.isEnabled)return this._stageDisplay.x=t||0,void(this._stageDisplay.y=e||0);Qn.get(this).to({x:t||0,y:e||0},200,fn.quartInOut)}},{key:"setVisible",value:function(t){this._stageDisplay.visible=!!t,this.__json.visible=!!t}},{key:"isVisible",value:function(){return this._stageDisplay.visible}},{key:"isMirrored",value:function(){return!!this._mirror}},{key:"transform",value:function(t){t&&this._transformations&&this._transformations.transform(t,this._stageDisplay)}},{key:"getStageDisplay",value:function(){return this._stageDisplay}},{key:"getStage",value:function(){return this._stage}},{key:"getRandomChance",value:function(){return this._random.factor}},{key:"isReady",value:function(){return!1}},{key:"setProps",value:function(t){}},{key:"update",value:function(){this._stageDisplay.visible!==this.__json.visible&&this.setVisible(this.__json.visible),this._stageDisplay.x===this.__json.x&&this._stageDisplay.y===this.__json.y||this.setPosition(this.__json.x,this.__json.y)}},{key:"random",value:function(){var t=Math.random(),e=t<=this._random.factor;return this.isVisible()!==e&&this.setVisible(e),e}},{key:"release",value:function(){}},{key:"name",get:function(){return this.__json.name}},{key:"id",get:function(){return this.__json.id}},{key:"x",get:function(){return this._stageDisplay.x}},{key:"y",get:function(){return this._stageDisplay.y}}]),t}(),Zn=$n,Kn=function(){function t(){Object(Yi["a"])(this,t),this.icons={},this._pendingResolves={}}return Object(Hi["a"])(t,[{key:"flushPendingPromisses",value:function(){var t=this,e=function(e){if("undefined"===typeof t.icons[e]||0===t.icons[e].length)return"continue";t.icons[e].forEach((function(i,n){"undefined"!==typeof t._pendingResolves["".concat(e).concat(n)]&&(t._pendingResolves["".concat(e).concat(n)].forEach((function(t){return t(i)})),delete t._pendingResolves["".concat(e).concat(n)])}))};for(var i in this.icons)e(i)}},{key:"cleanOut",value:function(){this.icons={},this._pendingResolves={}}},{key:"add",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e,i){var n,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e&&i&&i.type&&"image"===i.type){t.next=2;break}throw new Error("Icon is empty or exist");case 2:if(i.visible=!1,n=new ar(i,!0),n){t.next=6;break}throw new Error("Icon is invalid");case 6:if("undefined"===typeof this.icons[e]&&(this.icons[e]=[],this.icons[e].keys=[]),-1===this.icons[e].findIndex((function(t){return t.getJsonBase().id===n.getJsonBase().id}))){t.next=9;break}throw new Error("Icon already exists");case 9:this.icons[e].push(n),r=this.icons[e].indexOf(n),s=n.getJsonBase().name,this.icons[e].keys[r]=s,Tn.isOnDemandMode()||n.load(),"undefined"!==typeof this._pendingResolves["".concat(e).concat(r)]&&(this._pendingResolves["".concat(e).concat(r)].forEach((function(t){return t(n)})),delete this._pendingResolves["".concat(e).concat(r)]),"undefined"!==typeof this._pendingResolves["".concat(e).concat(s)]&&(this._pendingResolves["".concat(e).concat(s)].forEach((function(t){return t(n)})),delete this._pendingResolves["".concat(e).concat(s)]);case 16:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}()},{key:"has",value:function(t){var e=t.name,i=t.index;return"object"===Object(a["a"])(this.icons[e])&&("string"===typeof i&&(i=this.icons[e].keys.findIndex((function(t){return t===i}))),"undefined"!==typeof this.icons[e][i])}},{key:"get",value:function(t){var e=this,i=t.name,n=t.index;return new Promise((function(t,r){var s=null;if("string"===typeof n&&"object"===Object(a["a"])(e.icons[i])&&(n=e.icons[i].keys.findIndex((function(t){return t===n}))),e.has({name:i,index:n})&&(s=e.icons[i][n]),!s||!s.isReady())return e._pendingResolves["".concat(i).concat(n)]=e._pendingResolves["".concat(i).concat(n)]||[],void e._pendingResolves["".concat(i).concat(n)].push(t);t(s)}))}}]),t}(),tr=new Kn,er=tr;function ir(t){var e=nr();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function nr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var rr=new RegExp(/^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/i),sr=function(t){Object(qi["a"])(i,t);var e=ir(i);function i(t){var n,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(Yi["a"])(this,i),r=e.call(this,t),Object(zi["a"])((n=Object(Vi["a"])(r),Object(Ji["a"])(i.prototype)),"setVisible",n).call(n,!!t.visible),r.category=null,r.bmd=null,r.src=t.image,r.centerAligned=!!a,t.image="",t.thumbnail=null,t.rotation=t.rotation||0,t.scaleX=t.scaleX||1,t.scaleY=t.scaleY||1;var o=(Tn.baseURL||"./")+"thumbnails/";return t.useIcon&&rr.test(t.name)&&(t.useIcon.index=t.name),r.hasCustomThumbnail()&&(t.thumbnail="",er.get(t.useIcon).then((function(e){t.thumbnail=e.src,/^(blob|data):/.test(e.src)||(t.thumbnail=o+e.src),t.thumbnail&&r.dispatchEvent("thumbnail")}))),r._pendingPromisses=new Nn,r._isImageAdded=!1,r._loaded=!1,Tn.isOnDemandMode()?(/^(blob|data):/.test(r.src)||(t.image=o+r.src),!s&&r.isVisible()&&r.load()):s||r.load(),r}return Object(Hi["a"])(i,[{key:"update",value:function(){Object(zi["a"])(Object(Ji["a"])(i.prototype),"update",this).call(this),!this.isVisible()&&Tn.isOnDemandMode()||this.updateBmdCache(),this.isVisible()&&this.bmd&&(this.bmd.rotation!==this.__json.rotation&&this.setRotation(this.__json.rotation),this.bmd.scaleX!==this.__json.scaleX&&this.setScaleX(this.__json.scaleX),this.bmd.scaleY!==this.__json.scaleY&&this.setScaleY(this.__json.scaleY))}},{key:"hasCustomThumbnail",value:function(){return this.__json.useIcon&&this.__json.useIcon.name&&"undefined"!==typeof this.__json.useIcon.index}},{key:"enableInterationEvents",value:function(t){Object(zi["a"])(Object(Ji["a"])(i.prototype),"enableInterationEvents",this).call(this,t),this.bmd&&(this.bmd.mouseEnabled=!!t)}},{key:"updateBmdCache",value:function(){var t=this.getJsonBase();!t.image&&this.bmd&&this.bmd.bitmapCache&&!Tn.isOnDemandMode()&&(t.image=this.bmd.bitmapCache.getCacheDataURL())}},{key:"setPosition",value:function(t,e){return this.__json.x=t||0,this.__json.y=e||0,Object(zi["a"])(Object(Ji["a"])(i.prototype),"setPosition",this).call(this,t,e)}},{key:"setRotation",value:function(t){if(this.__json.rotation=t||0,!this.bmd)return!1;Qn.isEnabled?Qn.get(this.bmd).to({rotation:this.__json.rotation},200,fn.quartInOut):this.bmd.rotation=this.__json.rotation}},{key:"setScaleX",value:function(t){if(this.__json.scaleX=t||1,!this.bmd)return!1;Qn.isEnabled?Qn.get(this.bmd).to({scaleX:this.__json.scaleX,scaleY:this.__json.scaleY},200,fn.quartInOut):this.bmd.scaleX=this.__json.scaleX}},{key:"setScaleY",value:function(t){if(this.__json.scaleY=t||1,!this.bmd)return!1;Qn.isEnabled?Qn.get(this.bmd).to({scaleX:this.__json.scaleX,scaleY:this.__json.scaleY},200,fn.quartInOut):this.bmd.scaleY=this.__json.scaleY}},{key:"setVisible",value:function(t){Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,t),Tn.hasItem(this.src)||this.release(),!this.bmd&&this.isVisible()&&Tn.isOnDemandMode()&&this.load()}},{key:"release",value:function(){this.bmd&&this.bmd.uncache(),this.bmd=null,this._loaded=!1,this._isImageAdded=!1,this.removeAllChildren(),Tn.releaseItem(this.src)}},{key:"load",value:function(){var t=this;if(this._loaded||this._isImageAdded)return Promise.reject(new Error("Image loaded"));this.bmd=Tn.getItem(this.src);var e=function(){t._isImageAdded||(t.addChild(t.bmd),t._isImageAdded=!0),t._loaded=!0;var e=t.getStage();e&&e.invalidate(),t.updateBmdCache(),t.centerAligned&&t.bmd&&t.bmd.bitmapCache&&(t.bmd.regX=t.bmd.bitmapCache.width/2,t.bmd.regY=t.bmd.bitmapCache.height/2),t.bmd&&(t.bmd.rotation=t.__json.rotation||0,t.bmd.scaleX=t.__json.scaleX||1,t.bmd.scaleY=t.__json.scaleY||1)};return this.bmd?this.bmd&&!this.bmd.bitmapCache?new Promise((function(i,n){t.bmd.on("cached",(function(){e(),i()}))})):(e(),Promise.resolve()):new Promise((function(i,n){if(!t.isVisible()&&Tn.isOnDemandMode())return t._pendingPromisses.pushPromisse({resolve:i,reject:n});Tn.addToQueue(t.src).then((function(n){t.bmd=n.result,e(),i(),t._pendingPromisses.resolveAll()})).catch((function(e){n(e),t._pendingPromisses.rejectAll(e)})),Tn.isOnDemandMode()&&Tn.loadItems()}))}},{key:"isReady",value:function(){return this._loaded}}]),i}(Zn),ar=sr;i("db97");function or(t){var e=cr();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function cr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var lr=function(t){Object(qi["a"])(i,t);var e=or(i);function i(t,n){var r;return Object(Yi["a"])(this,i),r=e.call(this,t),r._color=r.__json.name,r.getRef()&&r.isVisible()&&Vn.onFlushOnce((function(){return r.setProps({color:r.getActiveColor()})})),r}return Object(Hi["a"])(i,[{key:"getActiveColor",value:function(){return this._color}},{key:"setVisible",value:function(t){return this.category&&t&&this.category.fireSetPropsEvent({color:this.getActiveColor()},this),Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,t)}},{key:"setProps",value:function(t){if(t&&t.color){var e=t.color===this.getActiveColor();this.setVisible(e)}}}]),i}(ar),hr=lr;i("5df3");function ur(t){var e=dr();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function dr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var fr=function(t){Object(qi["a"])(i,t);var e=ur(i);function i(t,n){var r,s,a;Object(Yi["a"])(this,i),a=e.call(this,t),Object(zi["a"])((r=Object(Vi["a"])(a),Object(Ji["a"])(i.prototype)),"setVisible",r).call(r,!!t.visible),Object(zi["a"])((s=Object(Vi["a"])(a),Object(Ji["a"])(i.prototype)),"setPosition",s).call(s,0,0),a.activeDisplay=-1,a.displays=[],a.colors=[],a.hideButtons=t.hideButtons,a._stage=n;var o=[],c=null,l=t.useIcon&&t.useIcon.name;return t.children=t.children||[],t.children.forEach((function(t,e){if(t&&t.name&&t.image){c&&(t.visible=!1),l&&(t.useIcon=t.useIcon||{name:l,index:e});var i=t.visible;i&&(c=t.name);var n=new ar(t,!0);a.addChild(n),a.displays.push(n),a.colors.push(t.name),Tn.isOnDemandMode()||o.push(n.load())}})),c&&a._setActiveColor(c),-1===a.activeDisplay&&a._setActiveColor(a.colors[0]),Promise.all(o).then((function(){return a._setActiveColor(a.colors[a.activeDisplay])})),a.getRef()&&a.isVisible()&&Vn.onFlushOnce((function(){return a.setProps({color:a.colors[a.activeDisplay]})})),a}return Object(Hi["a"])(i,[{key:"getActiveColor",value:function(){return this.colors[this.activeDisplay]}},{key:"getActiveImage",value:function(){return this.displays[this.activeDisplay]}},{key:"getColors",value:function(){return this.colors}},{key:"_setActiveColor",value:function(t){var e=this,i=this.colors.indexOf(t);if(-1!==i){this.activeDisplay=i,this.displays.forEach((function(t,n){if(i===n)return t.setVisible(e.isVisible());t.isVisible()&&t.setVisible(!1)}));var n=this.displays[i],r=this.getJsonBase();r.image=n.getJsonBase().image,r.thumbnail=n.getJsonBase().thumbnail,n.hasCustomThumbnail()&&!r.thumbnail&&n.once("thumbnail",(function(){e.activeDisplay===i&&(r.thumbnail=n.getJsonBase().thumbnail)}))}}},{key:"setVisible",value:function(t){return this.displays[this.activeDisplay].setVisible(t),Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,t)}},{key:"setPosition",value:function(t,e){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setPosition",this).call(this,0,0)}},{key:"update",value:function(){var t=this.activeDisplay;this.displays[this.activeDisplay].update(),this.displays[this.activeDisplay].isVisible()||(this.activeDisplay=-1),-1===this.activeDisplay&&(this.activeDisplay=this.displays.findIndex((function(t){return t.update(),t.isVisible()}))),-1===this.activeDisplay&&(this.activeDisplay=t),t!==this.activeDisplay&&this.setProps({color:this.colors[this.activeDisplay]}),Object(zi["a"])(Object(Ji["a"])(i.prototype),"update",this).call(this)}},{key:"random",value:function(){var t=Math.random(),e=parseInt(t*this.colors.length);this.setProps({color:this.colors[e]});var i=t<=this.getRandomChance();return this.isVisible()!==i&&this.setVisible(i),i}},{key:"setProps",value:function(t){t&&t.color&&(this.category&&this.category.fireSetPropsEvent(t,this),this._setActiveColor(t.color))}},{key:"isReady",value:function(){return this.displays[this.activeDisplay].isReady()}}]),i}(Zn),pr=fr,_r={FIXED:"fixed",OPTIONAL:"optional",MIXED:"mixed",ICON:"icon",COLORPIKER:"color-picker",COLOR:"color",MOVE:"move",REF:"ref",MIRROR:"mirror",COLORGLOBAL:"enable-color-global",RANDOM:"random",RANDOMCHILD:"random-c",RANDOMMAX:"random-max",RANDOMMIN:"random-min",ICONSET:"icon-set",USEICON:"use-icon",STAMPS:"stamps",toArray:function(){var t=[];for(var e in this)t.push(_r[e]);return t}},mr=_r,vr=new xn,gr=function(){function t(e,i){var n,r=this;if(Object(Yi["a"])(this,t),this.id=e.id,this.isFixed=-1!==e.tags.indexOf(mr.FIXED),this.isMixed=-1!==e.tags.indexOf(mr.MIXED),this.isOptional=-1!==e.tags.indexOf(mr.OPTIONAL),this.children=[],this.hideIcon=!!e.hideIcon,!this.hideIcon){var s=new ar(e,!0);Tn.isOnDemandMode()||s.load()}if(this.__useColorGlobal=-1!==e.tags.indexOf(mr.COLORGLOBAL),this.__isBusy=!1,this.__scope=e.colorGlobalScope,this.__useColorGlobal&&vr.addEventListener(this.__scope,(function(t){var e=t.eventProps,i=t.eventTarget;r.__isBusy=!0;var n=null;r.isFixed&&(n=r.children.find((function(t){return t.isVisible()}))),r.children.forEach((function(t){Object.is(i,t)||"function"!==typeof t.setProps||t.setProps(e)})),n&&-1===r.children.findIndex((function(t){return t.isVisible()}))&&n.setVisible(!0),r.__isBusy=!1})),e.children=e.children||[],e.children.length>0&&(n=1/e.children.length),this._random={factor:1,childFactor:n,maxVisible:e.children.length},e.random)for(var a in e.random)this._random[a]=e.random[a];var o=e.useIcon&&e.useIcon.name;Object(h["a"])(e.children).reverse().forEach((function(t,e){if(t&&t.type){var n=null;switch("undefined"!==typeof r._random.childFactor&&(t.random&&"undefined"!==typeof t.random.factor||(t.random=t.random||{},t.random.factor=r._random.childFactor)),o&&(t.useIcon=t.useIcon||{name:o,index:"color-picker"!==t.type?e:void 0}),t.type){case"image":n=new ar(t);break;case"color-picker":n=new pr(t,i);break;case"color":n=new hr(t,i);break;default:return null}n&&(i.addChild(n),t.index=i.children.indexOf(n),n.category=r,r.children.push(n))}})),this.isFixed&&-1===this.children.findIndex((function(t){return t.isVisible()}))&&Vn.onFlushOnce((function(){return r.random()}));var c=this.children.find((function(t){return t.isVisible()}));this.__useColorGlobal&&c&&"function"===typeof c.getActiveColor&&Vn.onFlushOnce((function(){return c.setProps({color:c.getActiveColor()})}))}return Object(Hi["a"])(t,[{key:"preventSetPropsEventDefaults",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.__isBusy=t}},{key:"fireSetPropsEvent",value:function(t,e){if(this.__useColorGlobal&&this.__scope&&!this.__isBusy&&t&&t.color){var i=new wn(this.__scope);i.eventProps=t,i.eventTarget=e,vr.dispatchEvent(i)}}},{key:"update",value:function(){0!==this.children.length&&(this.children.forEach((function(t){return t.update()})),this.isFixed&&-1===this.children.findIndex((function(t){return t.isVisible()}))&&this.children[0].setVisible(!0))}},{key:"getRandomChance",value:function(){return this._random.factor}},{key:"random",value:function(){if(0===this.children.length||this.hideIcon)return 0;var t=this.children.length,e=0,i=0;this.isOptional&&(e=0,t=1),this.isFixed&&(e=1,t=1),this._random.maxVisible>=0&&this.isMixed&&(t=this._random.maxVisible),this._random.minVisible>=0&&!this.isFixed&&(e=this._random.minVisible),t<e&&(e=t);var n=Math.random(),r=this.isFixed||n<=this.getRandomChance();r||(t=0,e=0);var s=Object(h["a"])(this.children).reverse(),a=s.length,o=0,c=a,l=function(){var t=Math.random();0===o&&s.forEach((function(t){o+=t.getRandomChance()}));var e=t*o,n=0,r=s.find((function(t){var i=t.getRandomChance();return n+=i,n>=e}));r.random(),r.isVisible()||r.setVisible(!0),o-=r.getRandomChance(),s.splice(s.indexOf(r),1),i++};while(i<e&&c-- >0)l();return s.forEach((function(e){if(t<=i)return e.setVisible(!1);e.random(),e.isVisible()&&i++})),this.isFixed&&0===i&&this.children[0].setVisible(!0),r}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"scope",get:function(){return this.__scope}}]),t}();gr.clearOut=function(){return vr.removeAllEventListeners()};var br=gr;function yr(t){var e=wr();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function wr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var xr=function(t){Object(qi["a"])(i,t);var e=yr(i);function i(t,n,r,s){var a;Object(Yi["a"])(this,i),t.mirror=void 0,t.ref=void 0,t.random=void 0,t.transform=void 0,t.visible=!0;var o=JSON.stringify(t);return t.stamp=!0,t.activeStamps=t.activeStamps||[],t.visible=!1,a=e.call(this,t),a.__seed=o,a.__parent=r,a.__game=s,Vn.onFlushOnce((function(){return a.update()})),a}return Object(Hi["a"])(i,[{key:"random",value:function(){return 0}},{key:"getSeedJson",value:function(){return this.__seed?JSON.parse(this.__seed):{}}},{key:"stampIt",value:function(t){var e=this,i=t.x,n=t.y,r=t.scaleX,s=t.scaleY,a=t.rotation,o=t.sortId;return this.__parent.stampIt(this,{x:i,y:n,scaleX:r,scaleY:s,rotation:a,sortId:o}).then((function(t){var i=e.getJsonBase();return i.activeStamps.push(t.getJsonBase()),t}))}},{key:"update",value:function(){var t=this,e=this.getJsonBase();0!==e.activeStamps.length&&e.activeStamps.forEach((function(i,n){if(!i.visible)return e.activeStamps.splice(n,1);i.id||(e.activeStamps.splice(n,1),t.stampIt(i).then((function(e){t.__game.update(!0),e.enableInterationEvents(!0),e.on("mousedown",(function(i){t.__game.itemEditor.startEditing(e,!1),t.__game.itemEditor.dispatchEvent(i)}))})))}))}},{key:"setVisible",value:function(t){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,!1)}},{key:"setProps",value:function(t){if(t&&t.color){var e=t.color===this.getActiveColor();this.setVisible(e)}}}]),i}(ar),Er=xr,Sr=0,Tr=function(){function t(e,i,n){var r=this;Object(Yi["a"])(this,t),this.id=e.id,this.children=[],this.stampsChildren=[],this._stage=i;var s=new ar(e,!0);Tn.isOnDemandMode()||s.load(),e.children=e.children||[],Object(h["a"])(e.children).reverse().forEach((function(t,e){if(t&&t.type){var s=null;switch(t.type){case"image":s=new Er(t,i,r,n);break;default:return null}s&&(i.addChild(s),t.index=i.children.indexOf(s),r.children.push(s))}}))}return Object(Hi["a"])(t,[{key:"update",value:function(){0!==this.children.length&&(this.children.forEach((function(t){return t.update()})),this.stampsChildren.forEach((function(t){return t.update()})))}},{key:"stampIt",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e,i){var n,r,s,a,o,c,l,h,u,d;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=i.x,r=i.y,s=i.scaleX,a=i.scaleY,o=i.rotation,c=i.sortId,l=e.getSeedJson(),l.image=e.src,l.x=n,l.y=r,l.visible=!0,"number"===typeof c&&(l.sortId=c),"number"!==typeof l.sortId&&(l.sortId=++Sr),Sr<l.sortId&&(Sr=l.sortId),h=new ar(l,!0,!0),h.parentStamp=e,u=h.getStageDisplay(),u.sortId=l.sortId,this._stage.addChildStamp(h),this.stampsChildren.push(h),d=this._stage.getStampsDisplay(),d.children.sort((function(t,e){return t.sortId<e.sortId?-1:1})),h.setRotation(o),h.setScaleX(s),h.setScaleY(a),t.next=22,h.load();case 22:return this.update(),t.abrupt("return",h);case 24:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}()},{key:"getRandomChance",value:function(){return 1}},{key:"random",value:function(){return 0}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))&&-1===this.stampsChildren.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"setPosition",value:function(t,e){}},{key:"setVisible",value:function(t){}}]),t}(),Cr=Tr;function Ir(t){var e=Or();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function Or(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Rr=function(t){Object(qi["a"])(i,t);var e=Ir(i);function i(t,n){var r,s;return Object(Yi["a"])(this,i),s=e.call(this,t),Object(zi["a"])((r=Object(Vi["a"])(s),Object(Ji["a"])(i.prototype)),"setPosition",r).call(r,0,0),s._stage=n,s.children=[],t.children=t.children||[],Object(h["a"])(t.children).reverse().forEach((function(t){if(t&&t.type){var e=null;switch(t.type){case"image":e=new ar(t);break;case"color-picker":e=new pr(t,n);break;case"color":e=new hr(t,n);break;default:return null}e&&(s.addChild(e),s.children.push(e))}})),s}return Object(Hi["a"])(i,[{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"setPosition",value:function(t,e){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setPosition",this).call(this,0,0)}},{key:"setVisible",value:function(t){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,!0)}}]),i}(Zn),Lr=Rr;function kr(t){var e=Ar();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function Ar(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Dr=function(t){Object(qi["a"])(i,t);var e=kr(i);function i(t,n){var r,s;return Object(Yi["a"])(this,i),s=e.call(this,t),Object(zi["a"])((r=Object(Vi["a"])(s),Object(Ji["a"])(i.prototype)),"setPosition",r).call(r,0,0),s._scope=t.iconSet&&t.iconSet.name?t.iconSet.name:"default",t.children=t.children||[],t.children.forEach((function(t){return er.add(s._scope,t)})),s}return Object(Hi["a"])(i,[{key:"isReady",value:function(){return!0}},{key:"setPosition",value:function(t,e){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setPosition",this).call(this,0,0)}},{key:"setVisible",value:function(t){return Object(zi["a"])(Object(Ji["a"])(i.prototype),"setVisible",this).call(this,!0)}}]),i}(Zn),Pr=Dr,jr=(i("ac4d"),i("8a81"),i("1c4c"),i("5df2"),i("04ff"),i("768b"));function Mr(t,e){var i;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=Br(t))||e&&t&&"number"===typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}function Br(t,e){if(t){if("string"===typeof t)return Fr(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Fr(t,e):void 0}}function Fr(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Xr=[],Ur=[],Nr=[],Gr={},Yr=[],Hr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("move")){if(!t._tagsProps||!t._tagsProps.move)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated move property"));var n=t._tagsProps.move.split(" ").map((function(t){return parseInt(t)||0})),r=Object(jr["a"])(n,4),s=r[0],a=r[1],o=r[2],c=r[3];if(s<0||a<0||o<0||c<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative move parameter"));(s||a||o||c)&&(i||(t.transform={up:s>0?s:0,right:a>0?a:0,down:o>0?o:0,left:c>0?c:0}))}},Vr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("enable-color-global")){var n=t._tagsProps["enable-color-global"]||Math.random().toString(36).substr(2,10);i||(t.colorGlobalScope=n),"undefined"!==typeof t._tagsProps["enable-color-global"]&&t.children.forEach((function(t){if("object"===Object(a["a"])(t.tags)){var e=t.tags.find((function(t){return-1!==t.indexOf("mirror:")||-1!==t.indexOf("ref:")}));if(e){var i=e.split(":").map((function(t){return t.trim()})),r=Object(jr["a"])(i,2),s=r[0],o=r[1],c={scope:n,childJson:t};c[s]=o,Yr.push(c)}}})),ts((function(){Yr.forEach((function(t){return Yr.forEach((function(i,r){if(t.ref&&t.ref===i.mirror&&t.scope===i.scope&&t.scope===n){Yr.splice(r,1);var s=t.childJson.tags;if(-1!==s.indexOf("color-picker")||-1!==s.indexOf("color"))return e('Layer "'.concat(i.childJson.name,'"(#').concat(i.childJson.id,') was linked with layer "').concat(t.childJson.name,'"(#').concat(t.childJson.id,') under the same color global scope "').concat(i.scope,'"'))}}))}))}))}},qr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];-1!==t.tags.indexOf("color-picker")&&(i||(t.hideButtons="hidden"===t._tagsProps["color-picker"]))},Wr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];["random","random-c","random-max","random-min"].forEach((function(n){if(-1!==t.tags.indexOf(n)){if(!t._tagsProps||"undefined"===typeof t._tagsProps[n])return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ").concat(n," property"));var r=t._tagsProps[n],s=/^[+-]?\d+(\.\d+)?$/;if(!s.test(r))return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a invalid number value"));var a="random-max"===n||"random-min"===n;if(r=a?Number.parseInt(r):Number.parseFloat(r),isNaN(r))return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ").concat(n," property"));if(r<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative ").concat(n," property"));if(!a&&r>1)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") property ").concat(n," must be between 0 and 1"));if(!i)switch(t.random=t.random||{},n){case"random":t.random.factor=r;break;case"random-c":t.random.childFactor=r;break;case"random-max":t.random.maxVisible=r;break;case"random-min":t.random.minVisible=r;break}}}))},zr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("use-icon")&&-1===t.tags.indexOf("icon-set")){if(!t._tagsProps||!t._tagsProps["use-icon"])return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated use-icon property"));var n=t._tagsProps["use-icon"].split(" ").map((function(t){return t.trim()})),r=Object(jr["a"])(n,2),s=r[0],a=r[1];return"undefined"!==typeof a&&(a=parseInt(a)),"number"===typeof a&&(isNaN(a)||a<0)?e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated [use-icon] property")):s?void ts((function(){var n="none"===s;if(-1===Nr.indexOf(s)&&!n)return e('Layer "'.concat(t.name,'"(#').concat(t.id,') try to use undefined icon-set named "').concat(s,'"'));i||(t.hideIcon=n,n||(t.useIcon={name:s,index:a}))})):e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated [use-icon] property"))}},Jr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("icon-set")&&-1===t.tags.indexOf("use-icon")){if(!t._tagsProps||!t._tagsProps["icon-set"])return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated icon-set property"));var n=t._tagsProps["icon-set"];if(-1!==Nr.indexOf(n))return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a duplicated icon-set name "').concat(n,'"'));if("none"===n)return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a reserved icon-set name "').concat(n,'"'));i||(t.iconSet={name:n.trim()},ts((function(){t.visible=!1}))),Nr.push(n)}},Qr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("ref")){if(!t._tagsProps||!t._tagsProps.ref)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ref property"));var n=t._tagsProps.ref;if(-1!==Ur.indexOf(n))return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a duplicate ref "').concat(n,'"'));i||(t.ref=n),Ur.push(n),Gr[n]=t}},$r=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("mirror")){if(!t._tagsProps||!t._tagsProps.mirror)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated mirror property"));var n=t._tagsProps.mirror;ts((function(){return-1===Ur.indexOf(n)?e('Layer "'.concat(t.name,'"(#').concat(t.id,') try to use undefined ref "').concat(n,'"')):t.type!==Gr[n].type?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same type of mirror ref "').concat(n,'"')):t.children.length!==Gr[n].children.length?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same number of the children of mirror ref "').concat(n,'"')):void(i||(t.mirror=n,t.visible=Gr[n].visible))}))}},Zr=function(t){if(t&&t.tags&&!t._tags){var e={};t._tags=t.tags.map((function(t){return t})),t.tags=t.tags.map((function(t){if(!t.indexOf(":"))return t;var i=t.split(":").map((function(t){return t.trim()})),n=Object(jr["a"])(i,2),r=n[0],s=n[1];return e[r]=s,r})),t._tagsProps=e}},Kr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Jr(t,e,i),zr(t,e,i),Qr(t,e,i),$r(t,e,i),Hr(t,e,i),Vr(t,e,i),Wr(t,e,i),qr(t,e,i),delete t._tagsProps},ts=function(t){Xr.push(t)},es=function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=Mr(Xr),t.prev=1,i.s();case 3:if((n=i.n()).done){t.next=13;break}if(r=n.value,"function"===typeof r){t.next=7;break}return t.abrupt("continue",11);case 7:if(s=r(e),!(s&&s instanceof Promise)){t.next=11;break}return t.next=11,s;case 11:t.next=3;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](1),i.e(t.t0);case 18:return t.prev=18,i.f(),t.finish(18);case 21:Xr=[],Ur=[],Nr=[],Gr={},Yr=[];case 26:case"end":return t.stop()}}),t,null,[[1,15,18,21]])})));return function(e){return t.apply(this,arguments)}}();mr.computeTagsProps=Zr,mr.prepareCustomTags=Kr,mr.flushPendingCalls=es,mr.pushFunc=ts;var is=mr,ns=i("6af9"),rs=i.n(ns),ss=i("6acf"),as=i.n(ss),os=180/Math.PI,cs=function(){function t(e,i){var n=this;Object(Yi["a"])(this,t),this._stage=e,this._baseStage=e.getStageBase(),this._currentItem=null,this._mouseDown=null,this._events=i||new xn,this._uiDisplay=new ln,this._uiDisplay.visible=!1,this._baseStage.addChild(this._uiDisplay),this._currentAngle=0,this._currentItemScaleAngle=45;var r=new cn;r.name="move",r.graphics.beginFill("rgba(127,127,127,0.01)").drawRect(0,0,2048,2048).endFill(),this._uiDisplay.addChild(r),this._display=new ln,this._uiDisplay.addChild(this._display),this.__btn_rotate=ls(this._display,"rotate"),this.__btn_scale=ls(this._display,"scale"),this.__border=hs(this._display,"center"),this.__border.alpha=.6,this.__btn_rotate_icon=_n(rs.a),this.__btn_rotate_icon.scale=.38,this.__btn_rotate_icon.regX=32,this.__btn_rotate_icon.regY=32,this._display.addChild(this.__btn_rotate_icon),this.__btn_scale_icon=_n(as.a),this.__btn_scale_icon.scale=.38,this.__btn_scale_icon.rotation=135,this.__btn_scale_icon.regX=32,this.__btn_scale_icon.regY=32,this._display.addChild(this.__btn_scale_icon);var s=function(t){if(!n._mouseDown||!n._currentItem||t.pointerID!==n._mouseDown.pointerID)return null;if("undefined"!==typeof n._mouseDown.pinch)return null;var e=1,i=1,r=t.stageX-n._mouseDown.x,s=t.stageY-n._mouseDown.y,a=(n._currentAngle-n._currentItemScaleAngle)/os,l=-Math.sin(a)*r+Math.cos(a)*s,h=n._currentItem.getJsonBase(),u=h.sortId;switch(n._mouseDown.name){case"scale":var d=n._currentItem.bmd.bitmapCache.height,f=d*n._mouseDown.scaleY;i=(f+2*l)/d,i>2&&(i=2),e=i;var p=c(e,i);p&&(n._currentItem._event=p);break;case"rotate":var _=Math.atan2(t.stageX-n._mouseDown.startX,-(t.stageY-n._mouseDown.startY))*os,m=o(_-n._mouseDown.startAngle);n._currentItem.bmd.rotation=_,n._currentAngle=_,Math.abs(m)>0&&(n._currentItem._event={type:"stamp-rotated",id:u,deltaAngle:parseFloat(m)});break;default:var v=t.stageX-n._mouseDown.x,g=t.stageY-n._mouseDown.y;n._currentItem.setPosition(n._mouseDown.startX+v,n._mouseDown.startY+g),(Math.abs(v)>0||Math.abs(g)>0)&&(n._currentItem._event={type:"stamp-moved",id:u,deltaX:parseInt(v),deltaY:parseInt(g)});break}n.update()};this._baseStage.on("stagemouseup",(function(t){if(!n._currentItem||n._mouseDown&&t.pointerID!==n._mouseDown.pointerID)return null;var e=null;if(n._mouseDown){var i=Math.abs(n._mouseDown.x-t.stageX),r=Math.abs(n._mouseDown.y-t.stageY);i<4&&r<4&&(e=n._mouseDown.name)}n._mouseDown=null;var s=new wn("itemdragend");if(s.currentTarget=n._currentItem,n._currentItem._event){var a=new wn(n._currentItem._event.type);a.eventTarget=n._currentItem,a.eventProps=n._currentItem._event,n._currentItem._event=null,n._events.dispatchEvent(a)}Qn.enable(),n._events.dispatchEvent(s),"move"===e&&n.endEditing()})),[r,this.__btn_scale,this.__btn_rotate,this.__border,this._events].forEach((function(t){return t.on("mousedown",(function(t){return t.nativeEvent&&t.nativeEvent.cancelable&&t.nativeEvent.preventDefault(),n._currentItem?n._mouseDown&&t.pointerID!==n._mouseDown.pointerID?null:(Qn.disable(),n._mouseDown={pointerID:t.pointerID,pinch:void 0,name:t.currentTarget.name,x:t.stageX,y:t.stageY,startX:n._currentItem.x,startY:n._currentItem.y,startAngle:n._currentItem.bmd.rotation,scaleX:Math.abs(n._currentItem.bmd.scaleX),scaleY:Math.abs(n._currentItem.bmd.scaleY),mirrorX:n._currentItem.bmd.scaleX>=0?1:-1,mirrorY:n._currentItem.bmd.scaleY>=0?1:-1},void n._events.dispatchEvent(new wn("itemdragstart"))):null}))})),this._baseStage.on("stagemousedown",(function(t){n._currentItem&&t.nativeEvent&&t.nativeEvent.cancelable&&t.nativeEvent.preventDefault()})),this._baseStage.on("stagemousemove",s),this._baseStage.on("stagepinchstart",(function(t){return n._mouseDown?"rotate"===n._mouseDown.name||"scale"===n._mouseDown.name?(n._mouseDown.pinch=null,null):(n._mouseDown.pinch={angle:t.angle,distance:t.distance,startPivotX:t.pivot.x,startPivotY:t.pivot.y,moveOffsetX:0,moveOffsetY:0},n._mouseDown.startAngle=n._currentItem.bmd.rotation,n._mouseDown.scaleX=Math.abs(n._currentItem.bmd.scaleX),n._mouseDown.scaleY=Math.abs(n._currentItem.bmd.scaleY),n._mouseDown.mirrorX=n._currentItem.bmd.scaleX>=0?1:-1,n._mouseDown.mirrorY=n._currentItem.bmd.scaleY>=0?1:-1,n._mouseDown.startX=n._currentItem.x,n._mouseDown.startY=n._currentItem.y,n._currentItem._event&&"stamp-moved"===n._currentItem._event.type&&(n._mouseDown.pinch.moveOffsetX=n._currentItem._event.deltaX,n._mouseDown.pinch.moveOffsetY=n._currentItem._event.deltaY),void(n._currentItem._event=null)):null})),this._baseStage.on("stagepinchend",(function(t){if(n._mouseDown&&(n._mouseDown.pinch=null),!n._currentItem||!n._currentItem._pinchEvents)return null;var e=n._currentItem._pinchEvents;if(n._currentItem._pinchEvents=null,"object"===Object(a["a"])(e)){var i=[];for(var r in n._currentItem._pinchEvents)i.push(r);if(1===i.length){var s=new wn(i[0]);return s.eventTarget=n._currentItem,s.eventProps=e[i[0]],void n._events.dispatchEvent(s)}var o=new wn("stamp-pinch");o.eventTarget=n._currentItem,o.eventProps={},e["stamp-moved"]&&(o.eventProps.id=e["stamp-moved"].id,o.eventProps.deltaX=e["stamp-moved"].deltaX,o.eventProps.deltaY=e["stamp-moved"].deltaY),e["stamp-rotated"]&&(o.eventProps.id=e["stamp-rotated"].id,o.eventProps.deltaAngle=e["stamp-rotated"].deltaAngle),e["stamp-scaled"]&&(o.eventProps.id=e["stamp-scaled"].id,o.eventProps.deltaScaleX=e["stamp-scaled"].deltaScaleX,o.eventProps.deltaScaleY=e["stamp-scaled"].deltaScaleY),n._events.dispatchEvent(o)}})),this._baseStage.on("stagepinchmove",(function(t){if(!n._currentItem||!n._mouseDown||!n._mouseDown.pinch)return null;var e=n._mouseDown.pinch,i=o(t.angle-e.angle);n._currentItem.bmd.rotation=n._mouseDown.startAngle+i,n._currentAngle=n._currentItem.bmd.rotation,Math.abs(i)>0&&(n._currentItem._pinchEvents=n._currentItem._pinchEvents||{},n._currentItem._pinchEvents["stamp-rotated"]={id:n._currentItem.getJsonBase().sortId,deltaAngle:parseFloat(i)});var r=n._currentItem.bmd.bitmapCache.height,s=r*n._mouseDown.scaleY,a=s*t.delta/r;a>2&&(a=2);var l=a,h=c(l,a);h&&(n._currentItem._pinchEvents=n._currentItem._pinchEvents||{},n._currentItem._pinchEvents[h.type]=h);var u=t.pivot.x-e.startPivotX,d=t.pivot.y-e.startPivotY;if(Math.abs(i)>0){var f=-i/os,p=n._mouseDown.startX+u-t.pivot.x,_=n._mouseDown.startY+d-t.pivot.y,m=Math.cos(f)*p+Math.sin(f)*_,v=-Math.sin(f)*p+Math.cos(f)*_;u+=m-p,d+=v-_}n._currentItem.setPosition(n._mouseDown.startX+u,n._mouseDown.startY+d),(Math.abs(u)>0||Math.abs(d)>0)&&(n._currentItem._pinchEvents=n._currentItem._pinchEvents||{},n._currentItem._pinchEvents["stamp-moved"]={id:n._currentItem.getJsonBase().sortId,deltaX:parseInt(u+e.moveOffsetX),deltaY:parseInt(d+e.moveOffsetY)}),n.update()}));var o=function(t){while(t<=-180)t+=360;while(t>180)t-=360;return t},c=function(t,e){var i=n._currentItem.getJsonBase(),r=i.sortId;t=t>0?t:.01,e=e>0?e:.01,n._currentItem.bmd.scaleX=t*n._mouseDown.mirrorX,n._currentItem.bmd.scaleY=e*n._mouseDown.mirrorY;var s=Math.abs(n._currentItem.bmd.scaleX)-n._mouseDown.scaleX,a=Math.abs(n._currentItem.bmd.scaleY)-n._mouseDown.scaleY;return Math.abs(s)>0||Math.abs(a)>0?{type:"stamp-scaled",id:r,deltaScaleX:parseFloat(s),deltaScaleY:parseFloat(a)}:null}}return Object(Hi["a"])(t,[{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"once",value:function(t,e){this._events.on(t,e,null,!0)}},{key:"dispatchEvent",value:function(t){this._events.dispatchEvent(t)}},{key:"getCurrentItem",value:function(){return this._currentItem||null}},{key:"flipCurrentStamp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"horizontal";if(!this._currentItem)return null;var e=this._currentItem.getJsonBase(),i=e.sortId,n={type:"stamp-scale-flipped",id:i,flipX:0,flipY:0};switch(t){case"horizontal":n.flipX=1,this._currentItem.bmd.scaleX=-this._currentItem.bmd.scaleX;break;case"vertical":n.flipY=1,this._currentItem.bmd.scaleY=-this._currentItem.bmd.scaleY;break}if(!n.flipX&&!n.flipY)return null;this._mouseDown&&(this._mouseDown.mirrorX=this._currentItem.bmd.scaleX>=0?1:-1,this._mouseDown.mirrorY=this._currentItem.bmd.scaleY>=0?1:-1);var r=new wn(n.type);r.eventTarget=this._currentItem,r.eventProps=n,this._events.dispatchEvent(r),this.update()}},{key:"clonePropertiesOf",value:function(t){if(!(t instanceof ar)||!this._currentItem)return null;Qn.disable(),this._currentItem.bmd.rotation=t.bmd.rotation,this._currentItem.bmd.scaleX=t.bmd.scaleX,this._currentItem.bmd.scaleY=t.bmd.scaleY,this._currentAngle=t.bmd.rotation,this._currentItem.setPosition(t.x+10,t.y+10),Qn.enable(),this.update()}},{key:"startEditing",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.endEditing(),!(t instanceof ar))return null;var i=new wn("itemstartediting");if(i.item=t,this._events.dispatchEvent(i),this._uiDisplay.visible=!0,this._currentItem=t,this._currentItemScaleAngle=45,this._currentItem.bmd){var n=this._currentItem.bmd;e&&(n.rotation=this._currentAngle),this._currentAngle=n.rotation,this._currentItemScaleAngle=Math.atan(this._currentItem.bmd.bitmapCache.width/this._currentItem.bmd.bitmapCache.height)*os}this._currentItem.enableInterationEvents(!1),An.enable(this._baseStage),this.update()}},{key:"endEditing",value:function(){if(An.disable(this._baseStage),this._uiDisplay.visible=!1,this._currentItem){this._currentItem.enableInterationEvents(!0),this._currentItem.setRotation(this._currentItem.bmd.rotation),this._currentItem.setScaleX(this._currentItem.bmd.scaleX),this._currentItem.setScaleY(this._currentItem.bmd.scaleY);var t=new wn("itemendediting");t.item=this._currentItem,this._events.dispatchEvent(t),this._stage.invalidate()}this._currentItem=null,this._mouseDown=null}},{key:"update",value:function(){if(!this._currentItem||!this._currentItem.bmd||!this._currentItem.bmd.bitmapCache)return null;var t=this._currentItem.bmd,e=t.regX*Math.abs(t.scaleX),i=t.regY*Math.abs(t.scaleY);e<=0&&(e=1),i<=0&&(i=1),this._display.rotation=t.rotation,this._display.x=this._currentItem.x,this._display.y=this._currentItem.y,this.__border.x=-e,this.__border.y=-i,this.__border.graphics.clear().setStrokeStyle(1).beginStroke("#000000").drawRect(0,0,2*e,2*i).beginStroke("#FFFFFF").beginFill("rgba(255,255,255,0.01)").drawRect(1,1,2*e-2,2*i-2).endStroke().endFill(),e+=20,i+=20,this.__btn_scale.y=i,this.__btn_scale.x=e,this.__btn_scale_icon.y=this.__btn_scale.y,this.__btn_scale_icon.x=this.__btn_scale.x,this.__btn_rotate.y=-i,this.__btn_rotate_icon.y=this.__btn_rotate.y,this._stage.invalidate()}}]),t}(),ls=function(t,e){var i=new cn;return i.name=e,i.graphics.beginFill("rgba(255,255,255,0.5)").drawCircle(0,0,16).endStroke().endFill(),t.addChild(i),i},hs=function(t,e){var i=new cn;return i.name=e,i.graphics.setStrokeStyle(1).beginStroke("#000000").drawRect(0,0,3,3).beginStroke("#FFFFFF").drawRect(1,1,2,2).endStroke().endFill(),t.addChild(i),i},us=cs,ds=function(){function t(e){Object(Yi["a"])(this,t),this.categories=[],this.stage=new Rn(e),this._events=new xn,this.itemEditor=new us(this.stage,this._events),this.gameId=void 0,this.releaseId=void 0}return Object(Hi["a"])(t,[{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"once",value:function(t,e){this._events.on(t,e,null,!0)}},{key:"restore",value:function(){this.categories=[],this.data=[],this.stage.restore(),this.itemEditor.endEditing(),this.manifest=null,Tn.cleanOut(),er.cleanOut(),br.clearOut()}},{key:"setData",value:function(t,e){if(!t||!t.length||!e)throw new Error("Invalid data");var i=function(){};this.__deepForEach(t,(function(t){t.tags&&(t.children=t.children||[],is.computeTagsProps(t),is.prepareCustomTags(t,i),delete t._tags)})),is.flushPendingCalls(i),this._events.dispatchEvent("loading"),this.stage.setManifest(e.gameWidth,e.gameHeight,e.bgColor),this.restore(),this.manifest=e,this.gameId=e.gameId,this.releaseId=e.releaseId,this.data=t,this._parseData({preventColorGlobalEventsOnLoad:!!e.preventColorGlobalEventsOnLoad})}},{key:"getData",value:function(){return this.data||[]}},{key:"getGameId",value:function(){return this.gameId}},{key:"getReleaseId",value:function(){return this.releaseId}},{key:"setBaseUrl",value:function(t){Tn.setBaseUrl(t)}},{key:"setOnDemandMode",value:function(t){Tn.setOnDemandMode(t)}},{key:"disableAllItems",value:function(t){var e=this.categories.find((function(e){return e.id===t}));if(e&&(e.isMixed||e.isOptional))return e.children.forEach((function(t){t.isVisible()&&t.setVisible(!1)})),this.update()}},{key:"activeItem",value:function(t){if(t&&t.index>=0)return this.activeItemIndex(t.index)}},{key:"transformItem",value:function(t,e){if(t&&t.index>=0)return this.transformItemIndex(t.index,e)}},{key:"updateItemProps",value:function(t,e){if(t&&t.index>=0)return this.updateItemPropsByIndex(t.index,e)}},{key:"activeItemIndex",value:function(t){var e=this,i=this._getItemByIndex(t);if(i&&i.category){var n=i.category,r=i.isVisible();return(n.isFixed||n.isOptional)&&n.children.forEach((function(t){t!==i&&t.isVisible()&&(t.setVisible(!1),e.stage.invalidate())})),n.isMixed||n.isOptional?(i.setVisible(!r),this.stage.invalidate()):r||(i.setVisible(!0),this.stage.invalidate()),this.update()}}},{key:"stampItByIndex",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._getItemByIndex(t);if(n instanceof Er){var r={x:this.stage.width/2,y:this.stage.height/4},s=this.itemEditor.getCurrentItem();return(!i||s&&s.getJsonBase().id!==n.getJsonBase().id)&&(s=null),this.itemEditor.endEditing(),n.stampIt(r).then((function(t){e.update(!0),e.itemEditor.startEditing(t,!1),e.itemEditor.clonePropertiesOf(s),e.itemEditor.startEditing(t,!1);var i=new wn("stamp-added"),n=t.getJsonBase(),r=n.id,a=n.sortId,o=n.x,c=n.y,l=n.rotation,h=n.scaleX,u=n.scaleY;i.eventTarget=t,i.eventProps={id:r,sortId:a,x:o,y:c,rotation:l,scaleX:h,scaleY:u},e._events.dispatchEvent(i),t.on("mousedown",(function(i){e.itemEditor.startEditing(t,!1),e.itemEditor.dispatchEvent(i)}))})),this.update()}}},{key:"hideStampEditButtons",value:function(){return this.itemEditor.endEditing()}},{key:"removeCurrentStamp",value:function(){var t=this.itemEditor.getCurrentItem();if(!t)return-1;this.itemEditor.endEditing();var e=t.getJsonBase(),i=e.id,n=e.sortId,r=e.x,s=e.y,o=e.rotation,c=e.scaleX,l=e.scaleY;t.setVisible(!1),this.stage.removeChild(t);var h=new wn("stamp-removed");return h.eventTarget=t,h.eventProps={id:i,sortId:n,x:r,y:s,rotation:o,scaleX:c,scaleY:l},this._events.dispatchEvent(h),"object"===Object(a["a"])(t.parentStamp)&&t.parentStamp.update(),this.update()}},{key:"updateItemPropsByIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return e&&"function"===typeof i.setProps&&i.setProps(e),this.update()}},{key:"transformItemIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return i.transform(e),this.update()}},{key:"update",value:function(){return this.stage.invalidate()}},{key:"reload",value:function(){return this.categories.forEach((function(t){return t.update()})),this.update()}},{key:"randomItems",value:function(){return this.categories.forEach((function(t){return t.random()})),this.update()}},{key:"_getItemByIndex",value:function(t){if(t<0||t>=this.stage.children.length)return null;var e=this.stage.getChild(t);return e.isMirrored()?null:e}},{key:"_parseData",value:function(t){var e=this,i=t.preventColorGlobalEventsOnLoad;Object(h["a"])(this.data).reverse().forEach((function(t){if(t&&t.type){if("image"===t.type){var n=new ar(t);return e.stage.addChild(n),void(t.index=e.stage.children.indexOf(n))}if("category"===t.type){var r=new br(t,e.stage);r.preventSetPropsEventDefaults(!!i),e.categories.push(r),t.index=e.categories.indexOf(r)}if("stamps"===t.type){var s=new Cr(t,e.stage,e);e.categories.push(s),t.index=e.categories.indexOf(s)}if("icon-set"===t.type){var a=new Pr(t,e.stage);e.stage.addChild(a),t.index=e.stage.children.indexOf(a)}if("simple-layer"===t.type){var o=new Lr(t,e.stage);e.stage.addChild(o),t.index=e.stage.children.indexOf(o)}}})),Tn.on("complete",(function(){e.stage.lockUpdates(!1),e.update(!0),e._events.dispatchEvent("done"),e.categories.forEach((function(t){return"function"===typeof t.preventSetPropsEventDefaults&&t.preventSetPropsEventDefaults(!1)}))})),Tn.on("progress",(function(t){return e._events.dispatchEvent(t)})),Tn.on("start",(function(){e.stage.lockUpdates(!0),e._events.dispatchEvent("loading")})),Tn.loadItems(),er.flushPendingPromisses(),Vn.flushPendingCalls()}},{key:"__deepForEach",value:function(t,e){var i=this;Array.isArray(t)?t.forEach((function(t){return i.__deepForEach(t,e)})):(e(t),t.children&&t.children.length>0&&t.children.forEach((function(t){return i.__deepForEach(t,e)})))}}]),t}(),fs=ds,ps=fs,_s=i("7b1c"),ms=i("32a4"),vs=i("9b4d"),gs=function(){function t(){Object(Yi["a"])(this,t),this.version=0,this.split=0,this.gameId=0,this.releaseId=0}return Object(Hi["a"])(t,[{key:"parse",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=s.length>1&&void 0!==s[1]?s[1]:0,e&&!(e.byteLength<8)){t.next=3;break}throw new Error("Invalid save file.");case 3:if(n=String.fromCharCode.apply(null,new Uint8Array(e,i,6)),"MEIKER"===n){t.next=6;break}throw new Error("Invalid save file signature.");case 6:if(i+=6,r=new Uint8Array(e,i,2),this.version=r[0],this.split=r[1],!(e.byteLength<18)){t.next=12;break}throw new Error("Invalid save file.");case 12:return i+=2,this.gameId=Object(vs["a"])(new Uint8Array(e,i,5)),this.releaseId=Object(vs["a"])(new Uint8Array(e,i+5,5)),t.abrupt("return",i+10);case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"toArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=new Uint8Array(this.byteLength),e.set("MEIKER".split("").map((function(t){return t.charCodeAt(0)})),0),e.set([this.version||1,this.split],6),i=8,e.set(Object(vs["b"])(this.gameId.toString(16),5),i),e.set(Object(vs["b"])(this.releaseId.toString(16),5),i+5),t.abrupt("return",e.buffer);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"byteLength",get:function(){return 18}}]),t}(),bs=gs,ys=function(){function t(){Object(Yi["a"])(this,t),this.header=new bs}return Object(Hi["a"])(t,[{key:"toBlobURL",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.toBlob();case 2:return e=t.sent,t.abrupt("return",(window.URL||window.webkitURL).createObjectURL(e));case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"toBlob",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.toArrayBuffer();case 2:return e=t.sent,i=new Blob([new Uint8Array(e)],{type:"application/octet-binary"}),t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"parseFromDroppedFile",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(vs["c"])(e);case 2:return i=t.sent,t.next=5,this.parseFromArrayBuffer(i);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"parseFromURL",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(vs["d"])(e);case 2:return i=t.sent,t.next=5,this.parseFromArrayBuffer(i);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),t}(),ws=ys,xs=i("f28b");function Es(t){var e=Ss();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function Ss(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ts=function(t){Object(qi["a"])(i,t);var e=Es(i);function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:268435455;return Object(Yi["a"])(this,i),t=e.call(this),t.maxLength=n,t.byteLength=0,t}return Object(Hi["a"])(i,[{key:"push",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof _s["b"]){t.next=2;break}throw new Error("Invalid item type");case 2:return t.abrupt("return",Object(zi["a"])(Object(Ji["a"])(i.prototype),"push",this).call(this,e));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"parse",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s,a,o,c=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=c.length>1&&void 0!==c[1]?c[1]:0,!(i+4>e.byteLength)){t.next=3;break}return t.abrupt("return",i);case 3:if(n=new Uint8Array(e,i,4),r=Object(vs["a"])(n),this.byteLength=4+r,i+=4,!(i+r>e.byteLength)){t.next=10;break}throw this.byteLength-=r,new Error("Offset buffer overflow.");case 10:if(0!==r){t.next=12;break}return t.abrupt("return",i);case 12:s=this.maxLength-this.length,a=0;case 14:if(!(--s>0&&a<r)){t.next=21;break}return o=_s["b"].parseItem(e,i+a),a+=o.byteLength,t.next=19,this.push(o);case 19:t.next=14;break;case 21:return t.abrupt("return",i+a);case 22:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"toArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,i,n,r,s,a,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=4,i=0,n=this.length,r=0;case 4:if(!(r<n)){t.next=12;break}if(this[r]&&this[r].enabled){t.next=7;break}return t.abrupt("continue",9);case 7:this[r].updateData&&this[r].updateData(),i+=this[r].byteLength;case 9:r++,t.next=4;break;case 12:if(!(this.maxLength*_s["a"]<i)){t.next=14;break}throw new Error("Max data length error.");case 14:this.byteLength=e+i,s=new Uint8Array(this.byteLength),s.set(Object(vs["b"])(i.toString(16),e),0),a=e,o=0;case 19:if(!(o<n)){t.next=26;break}if(this[o]&&this[o].enabled){t.next=22;break}return t.abrupt("continue",23);case 22:a+=this[o].writeIn(s,a);case 23:o++,t.next=19;break;case 26:return t.abrupt("return",s.buffer);case 27:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"writeIn",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s,a,o,c,l=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=l.length>1&&void 0!==l[1]?l[1]:0,n=4,r=0,s=this.length,a=0;case 5:if(!(a<s)){t.next=13;break}if(this[a]&&this[a].enabled){t.next=8;break}return t.abrupt("continue",10);case 8:this[a].updateData&&this[a].updateData(),r+=this[a].byteLength;case 10:a++,t.next=5;break;case 13:if(!(this.maxLength*_s["a"]<r)){t.next=15;break}throw new Error("Max data length error.");case 15:e.set(Object(vs["b"])(r.toString(16),n),0),o=n,c=0;case 18:if(!(c<s)){t.next=25;break}if(this[c]&&this[c].enabled){t.next=21;break}return t.abrupt("continue",22);case 21:o+=this[c].writeIn(e,i+o);case 22:c++,t.next=18;break;case 25:return t.abrupt("return",o);case 26:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),i}(Object(xs["a"])(Array)),Cs=Ts;function Is(t){var e=Os();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function Os(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Rs=function(t){Object(qi["a"])(i,t);var e=Is(i);function i(){var t;return Object(Yi["a"])(this,i),t=e.call(this),t.finalState=new Cs(16777215),t.stamps=new Cs(477218588),t}return Object(Hi["a"])(i,[{key:"toArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,i,n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.header.gameId&&this.header.releaseId){t.next=2;break}throw new Error("GameID or ReleaseId not found");case 2:return t.next=4,this.header.toArrayBuffer();case 4:return e=t.sent,t.next=7,this.finalState.toArrayBuffer();case 7:return i=t.sent,t.next=10,this.stamps.toArrayBuffer();case 10:return n=t.sent,r=new Uint8Array(e.byteLength+i.byteLength+n.byteLength),r.set(new Uint8Array(e),0),r.set(new Uint8Array(i),e.byteLength),r.set(new Uint8Array(n),e.byteLength+i.byteLength),t.abrupt("return",r.buffer);case 16:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"parseFromArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof ArrayBuffer){t.next=2;break}throw new Error("buffer not is a ArrayBuffer");case 2:return i=0,t.next=5,this.header.parse(e,i);case 5:return i=t.sent,t.next=8,this.finalState.parse(e,i);case 8:return i=t.sent,t.next=11,this.stamps.parse(e,i);case 11:return i=t.sent,t.abrupt("return",i);case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"byteLength",get:function(){return this.header.byteLength+this.finalState.byteLength+this.stamps.byteLength}}]),i}(ws),Ls=Rs;function ks(t){var e=As();return function(){var i,n=Object(Ji["a"])(t);if(e){var r=Object(Ji["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(Wi["a"])(this,i)}}function As(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ds=[ms["b"].STAMP_COLOR_CHANGED.code,ms["b"].STAMP_MOVED.code,ms["b"].STAMP_SCALED.code,ms["b"].STAMP_SCALE_FLIPPED.code,ms["b"].STAMP_ROTATED.code,ms["b"].STAMP_PINCH.code],Ps=function(t){Object(qi["a"])(i,t);var e=ks(i);function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{layers:[],layersById:{},listeners:{}};return Object(Yi["a"])(this,i),t=e.call(this),t.initialState=new Cs(16777215),t.initialStamps=new Cs(477218588),t.changes=new Cs(477218588),t.length=0,t.layersManager=n,t.stampById={},t.__lock=!1,t}return Object(Hi["a"])(i,[{key:"setInitialState",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof ArrayBuffer&&(i=e,e=new Ls,e.parseFromArrayBuffer(i)),e instanceof Ls){t.next=3;break}throw new Error("initialState is not a SaveFile.");case 3:return this.initialState=new Cs(this.initialState.maxLength),t.next=6,e.finalState.toArrayBuffer();case 6:return n=t.sent,t.next=9,this.initialState.parse(n);case 9:return this.initialStamps=new Cs(this.initialStamps.maxLength),t.next=12,e.stamps.toArrayBuffer();case 12:return r=t.sent,t.next=15,this.initialStamps.parse(r);case 15:return t.abrupt("return",!0);case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"dispatchEvent",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t=t.toString(),this.layersManager.listeners&&"object"===Object(a["a"])(this.layersManager.listeners[t]))return this.__lock=!0,new Promise((function(n,r){e.layersManager.listeners[t].forEach((function(t){return t(i)})),n()})).then((function(){e.__lock=!1})).catch((function(){e.__lock=!1}))}},{key:"forward",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.next;if(!e)return 250;this.length++;var i=this.next;i&&0===i.deltaTime&&this.forward(!0);var n=this.__executeEvent(e);return t||this.dispatchEvent("update"),n}},{key:"rewind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.current;if(!e)return 250;var i=0===e.deltaTime;if(this.length--,i&&this.rewind(!0),e=e.restore(),!e)return t||this.dispatchEvent("update"),251;var n=this.__executeEvent(e);return t||this.dispatchEvent("update"),n}},{key:"__executeEvent",value:function(t){var e=this,i=null;if(!t.id)return t.execute(i);var n=-1!==Ds.indexOf(t.type);return n?"object"===this.stampById[t.id]&&this.stampById[t.id].activeStamps?(i=this.stampById[t.id].activeStamps.find((function(e){return e.sortId===t.id})),t.execute(i)):(this.layersManager.layers.find((function(n){return!!(n.stamp&&n.activeStamps&&(i=n.activeStamps.find((function(e){return e.sortId===t.id})),i))&&(e.stampById[t.id]=n,!0)})),i?t.execute(i):255):(i=this.layersManager.layers[this.layersManager.layersById[t.id]],i?(t.sortId&&(this.stampById[t.sortId]=i),t.execute(i)):254)}},{key:"pushEvent",value:function(t){return this.__lock?Promise.reject(new Error("Locked")):(this.changes.length>this.length&&(this.changes.length=this.length),this.length++,this.changes.push(t))}},{key:"toArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,i,n,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.header.toArrayBuffer();case 2:return e=t.sent,t.next=5,this.initialState.toArrayBuffer();case 5:return i=t.sent,t.next=8,this.initialStamps.toArrayBuffer();case 8:return n=t.sent,t.next=11,this.changes.toArrayBuffer();case 11:return r=t.sent,s=new Uint8Array(e.byteLength+i.byteLength+n.byteLength+r.byteLength),s.set(new Uint8Array(e),0),s.set(new Uint8Array(i),e.byteLength),s.set(new Uint8Array(n),e.byteLength+i.byteLength),s.set(new Uint8Array(r),e.byteLength+i.byteLength+n.byteLength),t.abrupt("return",s.buffer);case 18:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"parseFromArrayBuffer",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof ArrayBuffer){t.next=2;break}throw new Error("buffer not is a ArrayBuffer");case 2:return i=0,t.next=5,this.header.parse(e,i);case 5:return i=t.sent,t.next=8,this.initialState.parse(e,i);case 8:return i=t.sent,t.next=11,this.initialStamps.parse(e,i);case 11:return i=t.sent,t.next=14,this.changes.parse(e,i);case 14:return i=t.sent,this.length=this.changes.length,t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"previous",get:function(){if(!(this.length<=1||this.length>this.changes.length))return this.changes[this.length-2]}},{key:"current",get:function(){if(!(this.length<=0||this.length>this.changes.length))return this.changes[this.length-1]}},{key:"next",get:function(){if(!(this.length<0||this.length>this.changes.length))return this.changes[this.length]}},{key:"byteLength",get:function(){return this.header.byteLength+this.initialState.byteLength+this.initialStamps.byteLength+this.changes.byteLength}}]),i}(ws),js=Ps,Ms=i("49f5"),Bs=function(){function t(e){var i=e.gameId,n=e.releaseId;Object(Yi["a"])(this,t),this.layers=[],this.layersById={},this.listeners={},this.baseSave=new Ls,this.baseSave.header.gameId=i,this.baseSave.header.releaseId=n,this.baseSave.header.split=0,this.baseSave.header.version=1,this.replay=new js({layers:this.layers,layersById:this.layersById,listeners:this.listeners}),this.replay.header.gameId=i,this.replay.header.releaseId=n,this.replay.header.split=1,this.replay.header.version=1}return Object(Hi["a"])(t,[{key:"on",value:function(t,e){if("function"!==typeof e)throw new Error("Invalid listener function");t=t.toString(),this.listeners=this.listeners||{};var i=this.listeners[t];return i||(i=this.listeners[t]=[]),i.push(e),e}},{key:"dispatchEvent",value:function(t,e){if(ms["b"].isValid(t))return e=Object(ms["c"])(t,e),void this.replay.pushEvent(e);t=t.toString(),this.listeners&&"object"===Object(a["a"])(this.listeners[t])&&this.listeners[t].forEach((function(t){return t(e)}))}},{key:"pushLayer",value:function(t){if(!t||"object"!==Object(a["a"])(t)||"undefined"===typeof t.id)return-1;if("category"===t.type||"stamps"===t.type)return-1;var e=null;return"undefined"===typeof this.layersById[t.id]&&(this.layers.push(t),this.layersById[t.id]=this.layers.indexOf(t),e=_s["b"].factory(1),this.baseSave.finalState[this.layersById[t.id]]=e),e||(e=this.baseSave.finalState[this.layersById[t.id]]),e.id=t.id,e.enabled=t.visible,"undefined"===typeof t.original&&Object.defineProperty(t,"original",{value:Object.freeze({x:t.x,y:t.y,visible:!!t.visible}),enumerable:!0}),this.layersById[t.id]}},{key:"loadDataJson",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)&&e.length){t.next=2;break}throw new Error("Invalid json data");case 2:Fs(e,(function(t){i.pushLayer(t)}));case 3:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"loadSaveFile",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Empty save file");case 2:if(i=null,i||!(e instanceof File)){t.next=7;break}return i=new Ls,t.next=7,i.parseFromDroppedFile(e);case 7:if(i||!(e instanceof ArrayBuffer)){t.next=11;break}return i=new Ls,t.next=11,i.parseFromArrayBuffer(e);case 11:if(i||"string"!==typeof e){t.next=15;break}return i=new Ls,t.next=15,i.parseFromURL(e);case 15:if(i){t.next=17;break}throw new Error("Can not load saved game file now.");case 17:if(this.baseSave.gameId===i.gameId&&this.baseSave.releaseId===i.releaseId){t.next=19;break}throw new Error("Invalid save file gameId or releaseId.");case 19:return this.replay.length=0,this.layers.forEach((function(t){"undefined"!==typeof t.id&&(t.stamp&&t.activeStamps&&t.activeStamps.forEach((function(t){t.visible=!1})),t.visible=!1)})),i.finalState.forEach((function(t){if("undefined"!==typeof t.id){var e=n.layersById[t.id];if("undefined"!==typeof e){var i=n.layers[e];i.stamp||(i.visible=!!t.enabled,i.x=i.original.x+t.offsetX,i.y=i.original.y+t.offsetY,n.baseSave.finalState[e].enabled=!!t.enabled,n.baseSave.finalState[e].offsetX=t.offsetX,n.baseSave.finalState[e].offsetY=t.offsetY)}}})),this.baseSave.stamps.splice(0,this.baseSave.stamps.length),i.stamps.forEach((function(t){var e=n.layersById[t.id];if("undefined"!==typeof e){var i=n.layers[e];i.activeStamps=i.activeStamps||[],i.activeStamps.push({sortId:t.sortId,x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,visible:!0}),n.baseSave.stamps.push(t)}})),this.dispatchEvent("update"),t.abrupt("return",i.toArrayBuffer());case 26:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"exportReplayFile",value:function(){if(0===this.layers.length)throw new Error("Empty");return this.replay}},{key:"exportSaveFile",value:function(){var t=this;if(0===this.layers.length)throw new Error("Empty");return this.baseSave.stamps.splice(0,this.baseSave.stamps.length),this.layers.forEach((function(e,i){if("undefined"!==typeof t.baseSave.finalState[i]){if(e.stamp&&e.activeStamps)return e.activeStamps.forEach((function(e){e.visible&&t.baseSave.stamps.push(new Ms["default"](e))}));var n=t.baseSave.finalState[i];n.enabled=!!e.visible,"image"!==e.type&&"image-color"!==e.type||(n.offsetX=e.x-e.original.x,n.offsetY=e.y-e.original.y)}})),this.baseSave}},{key:"length",get:function(){return this.layers.length}}]),t}();function Fs(t,e){Array.isArray(t)?t.forEach((function(t){return Fs(t,e)})):(e(t),t.children&&t.children.length>0&&t.children.forEach((function(t){return Fs(t,e)})))}var Xs,Us,Ns=Bs;function Gs(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ys(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gs(Object(i),!0).forEach((function(e){Object(u["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Gs(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Hs={name:"Player",components:{Theme:gi,ScrollableList:B,GameCanvas:Mi,WelcomeScreen:Gi,RemoveItemsButton:Si,ScrollListItemBadge:Li},data:function(){return{loading:!1,gameState:pi.WelcomeScreen,manifest:{gameWidth:9,gameHeight:16,bgColor:null,gameId:null,releaseId:null},categories:[],selectedCategoryIndex:-1,selectedItem:null,welcomeScreenData:null,saveImage:null,saveFile:null,replayFile:null,saveAction:null,loadSaveGameUrl:null,resetGameSave:null,isStampMovingOrDraging:!1,enableUndoButton:!1,enableRedoButton:!1}},provide:function(){return{theme:this.theme}},mounted:function(){var t=this,e=this.$refs.display.getCanvas();Xs=new ps(e),Xs.on("loading",(function(){t.loading=!0})),Xs.on("done",(function(){t.loading=!1,t.gameState!==pi.Playng&&(t.selectedCategoryIndex=null,t.$nextTick((function(){t.selectedCategoryIndex=0,t.gameState=pi.Playng})))})),Xs.on("itemdragstart",(function(){t.isStampMovingOrDraging=!0})),Xs.on("itemdragend",(function(){t.isStampMovingOrDraging=!1})),Xs.on("itemstartediting",(function(e){t.isStampMovingOrDraging=!1,t.selectedItem=e.item.parentStamp.getJsonBase()})),Xs.on("itemendediting",(function(e){t.isStampMovingOrDraging=!1,t.selectedItem=null})),Xs.once("done",(function(){return t.$emit("done")}))},props:{theme:{type:Object,default:function(){return{colors:{}}}},transparent:{type:Boolean,default:!0}},computed:{selectedCategory:function(){return this.categories&&null!==this.selectedCategoryIndex?this.selectedCategoryIndex>=0&&this.categories.length>this.selectedCategoryIndex?this.categories[this.selectedCategoryIndex]:this.categories.length>0?this.categories[0]:{}:{}},selectedItemColors:function(){if(this.selectedItem&&"color-picker"===this.selectedItem.type&&!this.selectedItem.hideButtons){var t=[];return this.selectedItem.children&&this.selectedItem.children.forEach((function(e){return t.push(e.name)})),t}return[]},selectedItemMoveButtons:function(){if(this.selectedItem&&this.selectedItem.transform){var t=[];return(this.selectedItem.transform.up>0||this.selectedItem.transform.down>0)&&t.push("up","down"),(this.selectedItem.transform.left>0||this.selectedItem.transform.right>0)&&t.push("left","right"),t}return[]},isSelectedItemAStampObject:function(){return this.selectedItem&&this.selectedItem.stamp},siteHomeLink:function(){return this.welcomeScreenData&&this.welcomeScreenData.resolvers&&"function"===typeof this.welcomeScreenData.resolvers.siteHomeLink?this.welcomeScreenData.resolvers.siteHomeLink():null}},methods:{showWelcomeScreen:function(t,e){var i=t.name,n=t.description,r=t.tags,s=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:n,tags:r,owner:s,icon:a},e){var o=e.tagLinkResolver,c=e.ownerLinkResolver,l=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:c,siteHomeLink:l}}},startLoadingGame:function(){this.$emit("play",Ys({},this.welcomeScreenData)),this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e,i,n){var r,s,a,o,c,l,u,d,f=this,p=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=p.length>3&&void 0!==p[3]?p[3]:null,s=p.length>4&&void 0!==p[4]?p[4]:null,a=p.length>5&&void 0!==p[5]?p[5]:null,this.manifest.gameWidth=i,this.manifest.gameHeight=n,this.manifest.gameId=s,this.manifest.releaseId=a,!this.welcomeScreenData||this.welcomeScreenData.onPlay){t.next=9;break}return t.abrupt("return",new Promise((function(t,o){f.welcomeScreenData.onPlay=function(){f.setData(e,i,n,r,s,a).then(t).catch(o),f.welcomeScreenData.onPlay=null}})));case 9:for(l in Us=new Ns({gameId:this.manifest.gameId,releaseId:this.manifest.releaseId}),Us.on("update",(function(){Xs.reload(!0),f.enableUndoButton=!!Us.replay.current,f.enableRedoButton=!!Us.replay.next})),o={"stamp-added":ms["b"].STAMP_ADDED,"stamp-removed":ms["b"].STAMP_REMOVED,"stamp-moved":ms["b"].STAMP_MOVED,"stamp-rotated":ms["b"].STAMP_ROTATED,"stamp-scaled":ms["b"].STAMP_SCALED,"stamp-scale-flipped":ms["b"].STAMP_SCALE_FLIPPED,"stamp-pinch":ms["b"].STAMP_PINCH},c=function(t){Xs.on(t,(function(e){e.eventProps&&(Us.dispatchEvent(o[t],e.eventProps),f.enableUndoButton=!!Us.replay.current,f.enableRedoButton=!!Us.replay.next)}))},o)c(l);return t.next=16,Us.loadDataJson(e);case 16:if(!this.loadSaveGameUrl){t.next=23;break}return this.manifest.preventColorGlobalEventsOnLoad=!0,t.next=20,Us.loadSaveFile(this.loadSaveGameUrl);case 20:u=t.sent,this.resetGameSave=u,Us.replay.setInitialState(this.resetGameSave);case 23:return this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,Object(h["a"])(e).reverse().forEach((function(t){-1===t.tags.indexOf("use-icon:none")&&("category"!==t.type&&"stamps"!==t.type||(t.tags instanceof Array&&(-1!==t.tags.indexOf("optional")||-1!==t.tags.indexOf("mixed"))&&(t.children=[{delete:!0,categoryId:t.id}].concat(Object(h["a"])(t.children))),f.categories.push(t)))})),Xs.setData(e,this.manifest),d=new Promise((function(t,e){Xs.once("done",(function(){t()}))})),Xs.update(),t.next=32,d;case 32:this.resetGameSave||Us.exportSaveFile().toArrayBuffer().then((function(t){f.resetGameSave=t,Us.replay.setInitialState(f.resetGameSave)})).catch((function(){}));case 33:case"end":return t.stop()}}),t,this)})));function e(e,i,n){return t.apply(this,arguments)}return e}(),setDataSaveGame:function(t){this.loadSaveGameUrl=t},setBaseUrl:function(t){Xs.setBaseUrl(t)},setOnDemandMode:function(t){Xs.setOnDemandMode(t)},setSaveGameAction:function(t){var e=this;"function"===typeof t&&this.$nextTick((function(){e.saveAction=t}))},getDataImage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";this.isSelectedItemAStampObject&&Xs.hideStampEditButtons();var e=this.$refs.display.getCanvas(),i=e.toDataURL(t);this.$nextTick((function(){Xs.update(!0)}));for(var n=atob(i.split(",")[1]),r=[],s=0;s<n.length;s++)r.push(n.charCodeAt(s));var a=new Blob([new Uint8Array(r)],{type:t});return(window.URL||window.webkitURL).createObjectURL(a)},restore:function(){this.gameState=pi.WelcomeScreen,this.welcomeScreenData=null,this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.loading=!1,Xs.restore()},handleCategoryClick:function(t,e){this.$refs.wrapper.$emit("expanded",!0),this.selectedCategoryIndex=e,this.isSelectedItemAStampObject&&Xs.hideStampEditButtons(),this.selectedItem=null},handleImageClick:function(t){if(t.delete)return this.selectedItem=null,Xs.disableAllItems(t.categoryId);this.selectedItem=t,t.stamp?Xs.stampItByIndex(t.index):(Xs.hideStampEditButtons(),Xs.activeItemIndex(t.index),this.selectedItem.visible||(this.selectedItem=null))},handleStampsApplyClick:function(t){this.selectedItem=null,t||Xs.removeCurrentStamp(),Xs.hideStampEditButtons()},handleDuplicateStampClick:function(){this.selectedItem&&this.selectedItem.stamp&&Xs.stampItByIndex(this.selectedItem.index,!0)},handleFlipStampHorizontallyClick:function(){Xs.itemEditor.flipCurrentStamp("horizontal")},handlePrepareSave:function(t){var e=this;setTimeout((function(){return e.$nextTick((function(){return e.$emit("save-image")}))}),1500);var i=(new Date).getTime()+""+parseInt(1e3*Math.random());this.isSelectedItemAStampObject&&Xs.hideStampEditButtons(),this.selectedItem=null,this.gameState=pi.SaveScreen,this.saveImage={sufix:i,name:"my-meiker-".concat(i,".png"),link:this.getDataImage("image/png")}},handleSaveOnline:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var i,n=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("function"===typeof this.saveAction&&Us){t.next=2;break}return t.abrupt("return");case 2:if(this.saveFile||(this.saveFile={name:"my-meiker-".concat(this.saveImage.sufix,".mksv"),link:null,saving:!1}),this.replayFile||(this.replayFile={name:"my-meiker-".concat(this.saveImage.sufix,".001.mksv"),link:null}),!this.saveFile.saving){t.next=6;break}return t.abrupt("return");case 6:return Xs.reload(!0),this.saveFile.saving=!0,t.next=10,Us.exportSaveFile().toBlobURL();case 10:return this.saveFile.link=t.sent,t.next=13,Us.exportReplayFile().toBlobURL();case 13:if(this.replayFile.link=t.sent,i=this.saveAction({gameId:this.manifest.gameId,releaseId:this.manifest.releaseId,replayFile:this.replayFile.link,saveFile:this.saveFile.link,savePreviewImage:this.saveImage.link}),!(i instanceof Promise)){t.next=17;break}return t.abrupt("return",i.then((function(t){n.handleCancelSave(e)})).catch((function(t){n.saveFile.saving=!1})));case 17:this.handleCancelSave(e);case 18:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleCancelSave:function(t){this.gameState=pi.Playng,this.saveImage&&this.saveImage.link&&(window.URL||window.webkitURL).revokeObjectURL(this.saveImage.link),this.saveFile&&this.saveFile.link&&(window.URL||window.webkitURL).revokeObjectURL(this.saveFile.link),this.replayFile&&this.replayFile.link&&(window.URL||window.webkitURL).revokeObjectURL(this.replayFile.link),this.selectedItem=null,this.saveImage=null,this.saveFile=null,this.replayFile=null},handleRandomClick:function(t){this.selectedItem=null,Xs.randomItems()},handleResetClick:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.resetGameSave){t.next=2;break}return t.abrupt("return");case 2:return this.selectedItem=null,t.next=5,Us.loadSaveFile(this.resetGameSave);case 5:Xs.reload(!0),Xs.reload(!0);case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleUndoClick:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:Us.replay.rewind();case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),handleRedoClick:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:Us.replay.forward();case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),handleSelectColorClick:function(t){Xs.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){Xs.transformItem(this.selectedItem,{action:t.source})}}},Vs=Hs,qs=Object(T["a"])(Vs,c,l,!1,null,null,null),Ws=qs.exports,zs=Ws,Js=zs,Qs=i("bc3a"),$s=i.n(Qs),Zs="meiker.io",Ks=function(){var t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(t,"px"))},ta=function(){document&&window&&document.documentElement&&document.documentElement.style.setProperty&&(document.documentElement.style.getPropertyValue("--vh")||(window.addEventListener("resize",Ks),Ks()))},ea={name:"app",components:{Player:Js},data:function(){return{visible:!1,scrollToTimeOut:null,manifest:{},events:{},dataJson:[],error:"",theme:{}}},methods:{checkSite:function(){return!0},validate:function(t){var e=(window.parent||window).location,i=e.hostname.toString();return i.endsWith(t)||"localhost"===i||i.endsWith(Zs)},evtProxy:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.events&&"function"===typeof this.events[t])try{this.events[t](e)}catch(i){}},scrollGameToCenter:function(){clearTimeout(this.scrollToTimeOut);var t=this.getBodyElement();if(!t)return!1;var e=this.$el.getBoundingClientRect().top+window.pageYOffset;this.scrollToTimeOut=setTimeout((function(){return window.scrollTo({top:e,behavior:"smooth"})}),300)},getBodyElement:function(){if(!document||!window)return null;var t=null,e=document.getElementsByTagName("body");return e.length>0&&(t=e[0]),t},tryToLockDeviceOrientation:function(){window.screen&&window.screen.orientation&&"function"===typeof window.screen.orientation.lock&&window.screen.orientation.lock("portrait").catch((function(){}))},prepareAndShowWelcomeScreen:function(){var t=this.manifest.owner.site&&this.manifest.owner.site.length>0&&this.manifest.owner.site[0]||null,e=this.manifest.game_id||null,i="utm_source=meiker_".concat(e),n="https";this.$refs.game.showWelcomeScreen(this.manifest,{tagLinkResolver:function(t){return"".concat(n,"://").concat(Zs,"/games/tag/").concat(t,"?").concat(i)},ownerLinkResolver:function(e){return t?"".concat(n,"://").concat(t,"/?").concat(i):"".concat(n,"://").concat(Zs,"/games/creator/").concat(e,"?").concat(i)},siteHomeLink:function(){return"".concat(n,"://").concat(Zs,"/?").concat(i)}})},loadDataJson:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,$s.a.get(this.manifest.data_url).then((function(t){e.dataJson=t.data,e.prepareAndShowWelcomeScreen(),e.manifest.saveFileUrl&&e.$refs.game.setDataSaveGame(e.manifest.saveFileUrl),e.manifest.hideSaveBtn||e.$refs.game.setSaveGameAction((function(t){return bn.call("saves.doSave",[t])})),e.$refs.game.setOnDemandMode(!!e.manifest.thumbnails),e.$refs.game.setBaseUrl(e.manifest.base_url),e.$refs.game.setData(e.dataJson,e.manifest.canvas_width,e.manifest.canvas_height,"#000000",e.manifest.game_id,e.manifest.release_id||1)})).catch((function(){e.error="We had a problem to load the game, please refresh this page to try again."}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},mounted:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.tryToLockDeviceOrientation();try{this.manifest="function"===typeof window.meikerioLoader?window.meikerioLoader.call(null):null,this.events="function"===typeof window.meikerioEvents?window.meikerioEvents.call(null):{}}catch(i){}if("object"===Object(a["a"])(this.manifest)&&"object"===Object(a["a"])(this.events)){t.next=5;break}return this.error="We're sorry, the game you requested could not be found or not yet published.",t.abrupt("return");case 5:if(this.checkSite()){t.next=8;break}return this.error="We're sorry, the game you requested could not be found or not yet published.",t.abrupt("return");case 8:this.manifest.theme&&(this.theme=this.manifest.theme,delete this.manifest.theme),this.visible=!0,this.$nextTick(Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.$refs.game){t.next=3;break}return e.error="We're sorry, game display not found.",t.abrupt("return");case 3:return t.next=5,bn.call("saves.loadFromUrl");case 5:return e.manifest.saveFileUrl=t.sent,t.next=8,e.loadDataJson();case 8:case"end":return t.stop()}}),t)})))),this.$ENV&&this.$ENV().fullscreen&&ta();case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},ia=ea,na=(i("034f"),Object(T["a"])(ia,r,s,!1,null,null,null)),ra=na.exports;n["default"].config.productionTip=!1,n["default"].prototype.$ENV="function"===typeof window.ENV?window.ENV.bind(null):null,new n["default"]({render:function(t){return t(ra)}}).$mount("#app")},"5b8a":function(t,e,i){"use strict";var n=i("460a"),r=i.n(n);r.a},"5bd7":function(t,e,i){"use strict";var n=i("1e9d"),r=i.n(n);r.a},"5c68":function(t,e,i){},"5d59":function(t,e,i){"use strict";i.r(e);i("6b54"),i("2397");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4");function u(t){var e=d();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=h["b"].INPUT_COMMAND.code,p=function(t){Object(a["a"])(i,t);var e=u(i);function i(t,r){var s;return Object(n["a"])(this,i),s=e.call(this),s.type=t||f,s.deltaTime=0,s.commandCode=r||0,s}return Object(r["a"])(i,[{key:"execute",value:function(t){}},{key:"restore",value:function(){return null}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.commandCode=this.data.getUint16(2,!1)}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<4)&&this.setData(new DataView(new ArrayBuffer(4))),this.dataByteLength=4,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.updateData(),this.data.setUint16(0,this.deltaTime,!1),this.data.setUint16(2,this.commandCode,!1),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=p},6140:function(t,e,i){"use strict";var n=i("07b4"),r=i.n(n);r.a},"675e":function(t,e,i){"use strict";var n=i("9cba"),r=i.n(n);r.a},"6acf":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAABfklEQVR4nO2ZWWrDMBRFT0pXmEIz1FvKQpt4CTXtR1Uosl5sSYmvh3dAEIyfde9xBnDAcRzHkbELa5NcgC6sizjL5DTAd7QaaaIJafi967GAjg1IsMpvQsJQ+VVLGFt+lRJS5b/ol46PrUKCVf6dvoADK5Nwrzz0BcCKJFjlD//OSQkgnBPPLkrCmPJgC4AFSxhbHu4LgAVKSJXvSJeHYQEAR+Oas5OQWx7GCYAFSLDKHwfmxgoAOBl7yCWUloc8ATBDCVb508j5XAEAZ2PPySXUlocyATADCdbP0znzOqUCAD6MDPe+dB/CDmgTG+eWhzoBkJbQ8uRnjLGALgQpoVYA9D+KTxcA8BY2aql7yz1CACHDFbgB+9zhUlt/czXB41nJ4/HXwrma4rPiRR1AjQtQB1DjAtQB1LgAdQA1LkAdQI0LUAdQ4wLUAdS4AHUANS5AHUCNC1AHUOMC1AHUuAB1ADUuQB1AjQsQ7n01Xm+GPfAZVva/uo7jOI5Tzw+sEiBuOid4ywAAAABJRU5ErkJggg=="},"6af9":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAABIpJREFUeJztm9uLVVUcxz8n7WINRXmt04iDlhdUlECLoumheuvyaJR2wxD/gERJUBQFwQfJCxlkpBE9SVhiRWM9ZEH0VPYUOI6OM+WYUJpzUceH3z6cvX9n7bPP3nuttbd4PrDh/M6sy3f99tm/tfZav4E2bdrcylQK6HMq8DAwBZgUfDcMXADOAH8XoMkZE4FngK1AD3ARGE+4LgLHgzrdQRuaHcA8t9LzsRTYBwyRPOCk6zzwPrAoaPut4PtDfoaSjk7k7uUddNx1HBgJPl8F5uQVbDsG3An8iTzjJvqA34Be5Fm/jAymA5gOdCF3Oq6+5mPgzcxqHbGG+h0bAb4AXgeqKdqoAm8EdWt33HSNIU4rFbcDPwMbkIiflxnI7BDnhP0W+ig122geF0aAmUWJq2KepmzRDVwjOTjudajByMyg05Me+poMrEAC3gBmBwwDD3nQQhfwITAadLzHR6chKsASYB0yJdZ0jAO7XHb8CHIHxoh6/gWXnbZAB/Ai9V/jDNsdzAc+RRYdpuBzj+0Oc2ItHi0EPqd5AOqx1VkZSZp6xoF3C1PniZVIdI1zwOLipLXMXbS+rDbSg3nw53JLc8sdwFqgHziatZHFxN/9A/k1OuVXonoXxBW8rUkj7yj7dOjzsczS/HBE2XosiUxANiLCK62pwGZkSnwgp0DXPEh0zXKO5je7gW6iP6HDob89aUejc44RHcMTpkJxXnlW2WEH/Jhbmh8OK/v5NJW/I+o9Ly8alukiOoZUceufUMXTCWXLzCD1cQyaCpgegSnA/SH7d/u6vBHWPh24TxcwOaBT2adsKvKM1t6wL2lywGRl38wnNX8pW4/N6IBJyr5kTY5//lP23bpAK4uDIs4PbaG1j+sCJgdcUXbZNj3SoLX/rwuYHDCk7GnW5PhHb5Fd0AVMDjir7NKdvKRglrLPtFoxvBDqsyjIN+Ft9P40FfVSONeuSkHMIjqGr0yF4maBE8p+zposf+gXOj2mpjxN1Ht6g6GsdIc+HyU6hmVpGpqArABrlUeRtXSZmYZs429FNkTCp0ZnybCe2U3UgxttKXXESupa9XH6jiwNLlKN/GRFpjsOYd7AvQ48mrXRb5B0lrdxewyelwrRRzbzRoimiuyxl53HiN/CHwZWFSfNDxtIPsrbXpg6D/xA/MCvAp8Ac211VrZYcC/RKa92jQEfAbNtd1gF/kCSEl5CkhSK5GUa8xY+oPFFyCp7Qx2OAt8D65EUWd8bKPuoB7s9NO5pOqGT+ATGQeAg8Cp28gSTOInkB3k/u9hPcuS9BjzlUMNEHOQFtUoXjUlT+tpUlDhfHCB+8L3YeYGqAluAXyjfDMQczBlk4Yh8BFlKp0lnnY0kXX+r2l9tS3gNGxH7IPBai2UHkOOqXuTQ4nLwfQfyLNfS5eOCZx+SsziaUasT5lJPp7sCfI28gSUFyCzXl5T0pPozROArgT0f2IlkZuQddH/QlrWlrAsWIIFKUwEeB95DtqhacchAUHYjsBzHC6sijr06kIVU7d/mKsiJzRByt/8tQFObNm1uUW4AGczgZPXYq/AAAAAASUVORK5CYII="},"6b3d":function(t,e,i){},"6bc8":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t;return Object(n["a"])(this,i),t=e.call(this),t.type=254,t.deltaTime=0,t.id=0,t.deltaColorRGB=[0,0,0],t}return Object(r["a"])(i,[{key:"execute",value:function(t){}},{key:"restore",value:function(){return new i}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.deltaColorRGB=[this.data.getUint8(7),this.data.getUint8(8),this.data.getUint8(9)]}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<10)&&this.setData(new DataView(new ArrayBuffer(10))),this.dataByteLength=10,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(h["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);return this.data.setUint8(7,this.deltaColorRGB[0]),this.data.setUint8(8,this.deltaColorRGB[1]),this.data.setUint8(9,this.deltaColorRGB[2]),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=f},"6e32":function(t,e,i){},"6ed4":function(t,e,i){},"756a":function(t,e,i){},7807:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_MOVED.code,_=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.deltaX=s.deltaX||0,r.deltaY=s.deltaY||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){return t&&t.visible?t.sortId!==this.id?1:(t.x+=this.deltaX,void(t.y+=this.deltaY)):2}},{key:"restore",value:function(){var t=new i(this.type);return t.id=this.id,t.deltaX=-this.deltaX,t.deltaY=-this.deltaY,t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.deltaX=this.data.getInt16(7,!1),this.deltaY=this.data.getInt16(9,!1)}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<11)&&this.setData(new DataView(new ArrayBuffer(11))),this.dataByteLength=11,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);return this.data.setInt16(7,this.deltaX,!1),this.data.setInt16(9,this.deltaY,!1),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=_},"7a8b":function(t,e,i){"use strict";var n=i("439e"),r=i.n(n);r.a},"7b1c":function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));i("8e6e"),i("ac6a"),i("456d"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("bd86"),a=i("32a4");function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach((function(e){Object(s["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var l=c({1:function(){return i("4762").default},2:function(){return i("4762").default},3:function(){return i("e465").default},4:function(){return i("49f5").default}},a["a"]),h=21,u=function(){function t(){Object(n["a"])(this,t),this.type=0,this.byteLength=0,this.enabled=!0,this.data=null,this.dataByteLength=0}return Object(r["a"])(t,[{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data=t,this.dataByteLength=e||t.byteLength||0,this.byteLength=2+this.dataByteLength}},{key:"toArrayBuffer",value:function(){this.updateData&&this.updateData();var t=2+this.dataByteLength;this.enabled||(t=0);var e=new Uint8Array(t);return this.writeIn(e),e.buffer}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!this.enabled)return 0;t.set([this.type,this.dataByteLength],e),e+=2;for(var i=0;i<this.dataByteLength;i++)t[e+i]=this.data.getUint8&&this.data.getUint8(i)||this.data[i];return 2+this.dataByteLength}}]),t}();u.factory=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("undefined"===typeof l[t])throw new Error("Type not found.");var e=new(l[t]());return e.data=new DataView(new ArrayBuffer(h)),e.type=t,e.byteLength=2,e},u.parseItem=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e+2>t.byteLength)throw new Error("Offset buffer overflow.");var i=new Uint8Array(t,e,2),n=i[1],r=i[0];if("undefined"===typeof l[r])throw new Error("Type not found.");var s=new(l[r]());if(s.type=i[0],s.byteLength=2+n,e+=2,e+n>t.byteLength)throw s.byteLength-=n,new Error("Offset buffer overflow.");return 0===n?(s.setData(new Uint8Array),s):(s.setData(new DataView(t,e,n)),"function"===typeof s.parse&&s.parse(),s)},e["b"]=u},"806b":function(t,e,i){},8974:function(t,e,i){"use strict";var n=i("9b58"),r=i.n(n);r.a},"8a45":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef"),i("7514");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_ADDED.code,_=h["b"].STAMP_REMOVED.code,m=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.sortId=s.sortId||0,r.x=s.x||0,r.y=s.y||0,r.scaleX=s.scaleX||1,r.scaleY=s.scaleY||1,r.rotation=s.rotation||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){var e=this;if(t.id!==this.id||!t.stamp)return 1;t.activeStamps=t.activeStamps||[];var i=t.activeStamps.find((function(t){return t.sortId===e.sortId}));if(this.type===_&&i)i.visible=!1;else if(this.type===p){if(i)return void(i.visible=!0);t.activeStamps.push({sortId:this.sortId,x:this.x,y:this.y,scaleX:this.scaleX,scaleY:this.scaleY,rotation:this.rotation,visible:!0})}}},{key:"restore",value:function(){var t=this.type===p?_:p;return new i(t,this)}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.sortId=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+7,5)),this.x=this.data.getInt16(12,!1),this.y=this.data.getInt16(14,!1),28===this.data.byteLength&&(this.scaleX=parseFloat(this.data.getFloat32(16,!1).toFixed(4)),this.scaleY=parseFloat(this.data.getFloat32(20,!1).toFixed(4)),this.rotation=parseFloat(this.data.getFloat32(24,!1).toFixed(4)))}},{key:"updateData",value:function(){var t=!(1===this.scaleX&&1===this.scaleY&&!this.rotation);(!this.data||this.data.byteLength<28&&t)&&this.setData(new DataView(new ArrayBuffer(28))),this.dataByteLength=t?28:16,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);for(var a=Object(u["b"])(this.sortId.toString(16),5),o=7;o<12;o++)this.data.setInt8(o,a[o-7]);return this.data.setInt16(12,this.x||0,!1),this.data.setInt16(14,this.y||0,!1),28===this.dataByteLength&&(this.data.setFloat32(16,this.scaleX||1,!1),this.data.setFloat32(20,this.scaleY||1,!1),this.data.setFloat32(24,this.rotation||0,!1)),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=m},"8b36":function(t,e,i){"use strict";var n=i("c805"),r=i.n(n);r.a},"8ec8":function(t,e,i){"use strict";var n=i("253b"),r=i.n(n);r.a},"8fae":function(t,e,i){"use strict";var n=i("b5d3"),r=i.n(n);r.a},"90a3":function(t,e,i){"use strict";var n=i("806b"),r=i.n(n);r.a},"91eb":function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_PINCH.code,_=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.deltaX=s.deltaX||0,r.deltaY=s.deltaY||0,r.deltaAngle=s.deltaAngle||0,r.deltaScaleX=s.deltaScaleX||0,r.deltaScaleY=s.deltaScaleY||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){if(!t||!t.visible)return 2;if(t.sortId!==this.id)return 1;t.x+=this.deltaX,t.y+=this.deltaY,t.rotation+=this.deltaAngle;var e=t.scaleX>=0?1:-1;t.scaleX=(Math.abs(t.scaleX)+this.deltaScaleX)*e;var i=t.scaleY>=0?1:-1;t.scaleY=(Math.abs(t.scaleY)+this.deltaScaleY)*i,t.scaleX=parseFloat(t.scaleX.toFixed(4)),t.scaleY=parseFloat(t.scaleY.toFixed(4))}},{key:"restore",value:function(){var t=new i(this.type);return t.id=this.id,t.deltaX=-this.deltaX,t.deltaY=-this.deltaY,t.deltaAngle=-this.deltaAngle,t.deltaScaleX=-this.deltaScaleX,t.deltaScaleY=-this.deltaScaleY,t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5)),this.deltaX=this.data.getInt16(7,!1),this.deltaY=this.data.getInt16(9,!1);var t=this.data.byteLength,e=11;15!==t&&23!==t||(this.deltaAngle=parseFloat(this.data.getFloat32(e,!1).toFixed(4)),e+=4),19!==t&&23!==t||(this.deltaScaleX=parseFloat(this.data.getFloat32(e,!1).toFixed(4)),this.deltaScaleY=parseFloat(this.data.getFloat32(e+4,!1).toFixed(4)))}},{key:"updateData",value:function(){this.dataByteLength=11,0!==this.deltaAngle&&(this.dataByteLength+=4),0===this.deltaScaleX&&0===this.deltaScaleY||(this.dataByteLength+=8),(!this.data||this.data.byteLength<this.dataByteLength)&&this.setData(new DataView(new ArrayBuffer(this.dataByteLength))),this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);this.data.setInt16(7,this.deltaX,!1),this.data.setInt16(9,this.deltaY,!1);var a=11;return 0!==this.deltaAngle&&(this.data.setFloat32(a,this.deltaAngle,!1),a+=4),0===this.deltaScaleX&&0===this.deltaScaleY||(this.data.setFloat32(a,this.deltaScaleX,!1),this.data.setFloat32(a+4,this.deltaScaleY,!1)),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=_},"95d3":function(t,e,i){"use strict";var n=i("756a"),r=i.n(n);r.a},"960f":function(t,e,i){"use strict";var n=i("06f5"),r=i.n(n);r.a},"9b4d":function(t,e,i){"use strict";i.d(e,"d",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return a}));i("96cf"),i("3b8d"),i("f576"),i("6b54"),i("28a5"),i("34ef");var n=function(t){return new Promise((function(e,i){if(!("XMLHttpRequest"in window))return i(new Error("XMLHttpRequest not supported!"));var n=new XMLHttpRequest;return n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){var t=new Uint8Array(n.response||n.mozResponseArrayBuffer);return e(t.buffer)},n.onerror=i,n.send(null)}))},r=function(t){return new Promise((function(e,i){var n=new FileReader;return n.onload=function(t){return e(t.target.result)},n.onerror=i,n.readAsArrayBuffer(t)}))},s=function(t){if(!t||t.length>8)throw new Error("Only max 64bits numbers allowed");return parseInt(t.toString().split(",").map((function(t){return parseInt(t).toString(16).padStart(2,"0")})).join(""),16)},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("string"!==typeof t||e<=0)throw new Error("Input error.");t=t.trim().padStart(2*e,"0").substring(0,2*e);for(var i=new Uint8Array(e),n=0;n<t.length;n+=2)i[n/2]=parseInt(t.substring(n,n+2),16);return i}},"9b58":function(t,e,i){},"9cba":function(t,e,i){},a0d5:function(t,e,i){"use strict";var n=i("6ed4"),r=i.n(n);r.a},a19e:function(t,e,i){"use strict";var n=i("5c68"),r=i.n(n);r.a},a3e9:function(t,e,i){},abbb:function(t,e,i){},adaf:function(t,e,i){"use strict";var n=i("1414"),r=i.n(n);r.a},b5d3:function(t,e,i){},b891:function(t,e,i){"use strict";var n=i("6e32"),r=i.n(n);r.a},ba35:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("32a4"),u=i("9b4d");function d(t){var e=f();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var p=h["b"].STAMP_SCALE_FLIPPED.code,_=function(t){Object(a["a"])(i,t);var e=d(i);function i(t){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(this,i),r=e.call(this),r.type=t||p,r.deltaTime=0,r.id=s.id||0,r.flipX=s.flipX||0,r.flipY=s.flipY||0,r}return Object(r["a"])(i,[{key:"execute",value:function(t){return t&&t.visible?t.sortId!==this.id?1:(this.flipX&&(t.scaleX=-t.scaleX),void(this.flipY&&(t.scaleY=-t.scaleY))):2}},{key:"restore",value:function(){var t=new i(this.type);return t.id=this.id,t.flipX=this.flipX,t.flipY=this.flipY,t}},{key:"parse",value:function(){this.deltaTime=this.data.getUint16(0,!1),this.id=Object(u["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset+2,5));var t=this.data.getUint8(7);this.flipX=1&t?1:0,this.flipY=2&t?1:0}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<8)&&this.setData(new DataView(new ArrayBuffer(8))),this.dataByteLength=8,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData(),this.data.setUint16(0,this.deltaTime,!1);for(var n=Object(u["b"])(this.id.toString(16),5),r=2;r<7;r++)this.data.setInt8(r,n[r-2]);var a=0;return this.flipX&&(a+=1),this.flipY&&(a+=2),this.data.setUint8(7,a),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(l["b"]);e["default"]=_},be1d:function(t,e,i){"use strict";var n=i("4282"),r=i.n(n);r.a},be3d:function(t,e,i){"use strict";var n=i("2216"),r=i.n(n);r.a},c0d5:function(t,e,i){},c5a6:function(t,e,i){},c67c:function(t,e,i){},c805:function(t,e,i){},c806:function(t,e,i){},c9b3:function(t,e,i){},cb05:function(t,e,i){"use strict";var n=i("1d58"),r=i.n(n);r.a},cb91:function(t,e,i){"use strict";var n=i("107f"),r=i.n(n);r.a},cefd:function(t,e,i){"use strict";var n=i("c67c"),r=i.n(n);r.a},deeb:function(t,e,i){},e080:function(t,e,i){"use strict";var n=i("1d4d"),r=i.n(n);r.a},e465:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),c=i("6bb5"),l=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(c["a"])(t);if(e){var r=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t;return Object(n["a"])(this,i),t=e.call(this),t.id=0,t.offsetX=0,t.offsetY=0,t.activeColorRGB=[0,0,0],t}return Object(r["a"])(i,[{key:"parse",value:function(){this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset,5)),this.activeColorRGB=[this.data.getUint8(5),this.data.getUint8(6),this.data.getUint8(7)],12===this.data.byteLength&&(this.offsetX=this.data.getInt16(8,!1),this.offsetY=this.data.getInt16(10,!1))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<12&&(this.offsetX||this.offsetY))&&this.setData(new DataView(new ArrayBuffer(12))),this.offsetX||this.offsetY?this.dataByteLength=12:this.dataByteLength=8,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData();for(var n=Object(h["b"])(this.id||0,5),r=0;r<5;r++)this.data.setInt8(r,n[r]);return this.data.setUint8(5,this.activeColorRGB[0],!1),this.data.setUint8(6,this.activeColorRGB[1],!1),this.data.setUint8(7,this.activeColorRGB[2],!1),(this.offsetX||this.offsetY)&&(this.data.setInt16(8,this.offsetX||0,!1),this.data.setInt16(10,this.offsetY||0,!1)),Object(s["a"])(Object(c["a"])(i.prototype),"writeIn",this).call(this,t,e)}},{key:"activeColorHex",get:function(){return"#"+this.activeColorRGB.map((function(t){return t.toString(16)})).map((function(t){return 1===t.length?"0"+t:t})).join("")}}]),i}(l["b"]);e["default"]=f},e799:function(t,e,i){"use strict";var n=i("21b6"),r=i.n(n);r.a},ede0:function(t,e,i){"use strict";var n=i("38d4"),r=i.n(n);r.a},f013:function(t,e,i){"use strict";var n=i("c9b3"),r=i.n(n);r.a},f5fc:function(t,e,i){"use strict";var n=i("c0d5"),r=i.n(n);r.a},f718:function(t,e,i){},fd39:function(t,e,i){"use strict";var n=i("171c"),r=i.n(n);r.a}});