OwlCyberSecurity - MANAGER
Edit File: app.1793bd32.js
(function(t){function e(e){for(var s,a,o=e[0],h=e[1],l=e[2],u=0,d=[];u<o.length;u++)a=o[u],r[a]&&d.push(r[a][0]),r[a]=0;for(s in h)Object.prototype.hasOwnProperty.call(h,s)&&(t[s]=h[s]);c&&c(e);while(d.length)d.shift()();return n.push.apply(n,l||[]),i()}function i(){for(var t,e=0;e<n.length;e++){for(var i=n[e],s=!0,o=1;o<i.length;o++){var h=i[o];0!==r[h]&&(s=!1)}s&&(n.splice(e--,1),t=a(a.s=i[0]))}return t}var s={},r={app:0},n=[];function a(e){if(s[e])return s[e].exports;var i=s[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=s,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 s in t)a.d(i,s,function(e){return t[e]}.bind(null,s));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"]||[],h=o.push.bind(o);o.push=e,o=o.slice();for(var l=0;l<o.length;l++)e(o[l]);var c=h;n.push([0,"chunk-vendors"]),i()})({0:function(t,e,i){t.exports=i("56d7")},"023a":function(t,e,i){"use strict";var s=i("f5dd"),r=i.n(s);r.a},"034f":function(t,e,i){"use strict";var s=i("27fb"),r=i.n(s);r.a},"03ff":function(t,e,i){"use strict";(function(t,r){i("3b2b"),i("a481"),i("386d"),i("b54a"),i("ac6a"),i("4917"),i("28a5"),i("7f7f"),i("6b54");var n=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,s=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(s)for(var r in i[(e+="_")+"constructor"]=s.constructor,s)i.hasOwnProperty(r)&&"function"==typeof s[r]&&(i[e+r]=s[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,s=t.length;i<s;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 s;s=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=s[t];return r&&this.removeEventListener(t,e,i),r=s[t],r?r.push(e):s[t]=[e],e},e.on=function(t,e,i,s,r,n){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,r),s&&t.remove()},n)},e.removeEventListener=function(t,e,i){var s=i?this._captureListeners:this._listeners;if(s){var r=s[t];if(r)for(var n=0,a=r.length;n<a;n++)if(r[n]==e){1==a?delete s[t]:r.splice(n,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 s=this._listeners;if(!e&&(!s||!s[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,n=[r];while(r.parent)n.push(r=r.parent);var a,h=n.length;for(a=h-1;a>=0&&!t.propagationStopped;a--)n[a]._dispatchEvent(t,1+(0==a));for(a=1;a<h&&!t.propagationStopped;a++)n[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,s,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(s=r[t.type])&&(i=s.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,s=s.slice();for(var n=0;n<i&&!t.immediatePropagationStopped;n++){var a=s[n];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(n["a"])(exports)]&&exports&&!exports.nodeType&&exports,o=s["undefined"===typeof window?"undefined":Object(n["a"])(window)]&&window||this,h=a&&s[Object(n["a"])(t)]&&t&&!t.nodeType&&"object"==("undefined"===typeof r?"undefined":Object(n["a"])(r))&&r;function l(t,e){t||(t=o["Object"]()),e||(e=o["Object"]());var i=t["Number"]||o["Number"],r=t["String"]||o["String"],a=t["Object"]||o["Object"],h=t["Date"]||o["Date"],c=t["SyntaxError"]||o["SyntaxError"],u=t["TypeError"]||o["TypeError"],d=t["Math"]||o["Math"],f=t["JSON"]||o["JSON"];"object"==a(n["a"])(f)&&f&&(e.stringify=f.stringify,e.parse=f.parse);var _,p,g,m=a.prototype,v=m.toString,b=new h(-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]!==g)return y[t];var s;if("bug-string-char-index"==t)s="a"!="a"[0];else if("json"==t)s=y("json-stringify")&&y("json-parse");else{var n,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){(n=function(){return 1}).toJSON=n;try{l="0"===o(0)&&"0"===o(new i)&&'""'==o(new r)&&o(v)===g&&o(g)===g&&o()===g&&"1"===o(n)&&"[1]"==o([n])&&"[null]"==o([g])&&"null"==o(null)&&"[null,null,null]"==o([g,v,null])&&o({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===o(null,n)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new h(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new h(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new h(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new h(-1))}catch(q){l=!1}}s=l}if("json-parse"==t){var c=e.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){n=c(a);var u=5==n["a"].length&&1===n["a"][0];if(u){try{u=!c('"\t"')}catch(q){}if(u)try{u=1!==c("01")}catch(q){}if(u)try{u=1!==c("1.")}catch(q){}}}}catch(q){u=!1}s=u}}return y[t]=!!s}if(!y("json")){var w="[object Function]",E="[object Date]",x="[object Number]",T="[object String]",S="[object Array]",C="[object Boolean]",R=y("bug-string-char-index");if(!b)var L=d.floor,A=[0,31,59,90,120,151,181,212,243,273,304,334],I=function(t,e){return A[e]+365*(t-1970)+L((t-1969+(e=+(e>1)))/4)-L((t-1901+e)/100)+L((t-1601+e)/400)};if((_=m.hasOwnProperty)||(_=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?_=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,_=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,_.call(this,t)}),p=function(t,e){var i,r,o,h=0;for(o in(i=function(){this.valueOf=0}).prototype.valueOf=0,r=new i,r)_.call(r,o)&&h++;return i=r=null,h?p=2==h?function(t,e){var i,s={},r=v.call(t)==w;for(i in t)r&&"prototype"==i||_.call(s,i)||!(s[i]=1)||!_.call(t,i)||e(i)}:function(t,e){var i,s,r=v.call(t)==w;for(i in t)r&&"prototype"==i||!_.call(t,i)||(s="constructor"===i)||e(i);(s||_.call(t,i="constructor"))&&e(i)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(t,e){var i,o,h=v.call(t)==w,l=!h&&"function"!=typeof t.constructor&&s[a(n["a"])(t.hasOwnProperty)]&&t.hasOwnProperty||_;for(i in t)h&&"prototype"==i||!l.call(t,i)||e(i);for(o=r.length;i=r[--o];l.call(t,i)&&e(i));}),p(t,e)},!y("json-stringify")){var O={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D="000000",P=function(t,e){return(D+(e||0)).slice(-t)},M="\\u00",k=function(t){for(var e='"',i=0,s=t.length,r=!R||s>10,n=r&&(R?t.split(""):t);i<s;i++){var a=t.charCodeAt(i);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=O[a];break;default:if(a<32){e+=M+P(2,a.toString(16));break}e+=r?n[i]:t.charAt(i)}}return e+'"'},F=function t(e,i,s,r,o,h,l){var c,d,f,m,b,y,w,R,A,O,D,M,F,j,B,N;try{c=i[e]}catch(q){}if("object"==a(n["a"])(c)&&c)if(d=v.call(c),d!=E||_.call(c,"toJSON"))"function"==typeof c.toJSON&&(d!=x&&d!=T&&d!=S||_.call(c,"toJSON"))&&(c=c.toJSON(e));else if(c>-1/0&&c<1/0){if(I){for(b=L(c/864e5),f=L(b/365.2425)+1970-1;I(f+1,0)<=b;f++);for(m=L((b-I(f,0))/30.42);I(f,m+1)<=b;m++);b=1+b-I(f,m),y=(c%864e5+864e5)%864e5,w=L(y/36e5)%24,R=L(y/6e4)%60,A=L(y/1e3)%60,O=y%1e3}else f=c.getUTCFullYear(),m=c.getUTCMonth(),b=c.getUTCDate(),w=c.getUTCHours(),R=c.getUTCMinutes(),A=c.getUTCSeconds(),O=c.getUTCMilliseconds();c=(f<=0||f>=1e4?(f<0?"-":"+")+P(6,f<0?-f:f):P(4,f))+"-"+P(2,m+1)+"-"+P(2,b)+"T"+P(2,w)+":"+P(2,R)+":"+P(2,A)+"."+P(3,O)+"Z"}else c=null;if(s&&(c=s.call(i,e,c)),null===c)return"null";if(d=v.call(c),d==C)return""+c;if(d==x)return c>-1/0&&c<1/0?""+c:"null";if(d==T)return k(""+c);if("object"==a(n["a"])(c)){for(j=l.length;j--;)if(l[j]===c)throw u();if(l.push(c),D=[],B=h,h+=o,d==S){for(F=0,j=c.length;F<j;F++)M=t(F,c,s,r,o,h,l),D.push(M===g?"null":M);N=D.length?o?"[\n"+h+D.join(",\n"+h)+"\n"+B+"]":"["+D.join(",")+"]":"[]"}else p(r||c,function(e){var i=t(e,c,s,r,o,h,l);i!==g&&D.push(k(e)+":"+(o?" ":"")+i)}),N=D.length?o?"{\n"+h+D.join(",\n"+h)+"\n"+B+"}":"{"+D.join(",")+"}":"{}";return l.pop(),N}};e.stringify=function(t,e,i){var r,o,h,l;if(s[a(n["a"])(e)]&&e)if((l=v.call(e))==w)o=e;else if(l==S){h={};for(var c,u=0,d=e.length;u<d;c=e[u++],l=v.call(c),(l==T||l==x)&&(h[c]=1));}if(i)if((l=v.call(i))==x){if((i-=i%1)>0)for(r="",i>10&&(i=10);r.length<i;r+=" ");}else l==T&&(r=i.length<=10?i:i.slice(0,10));return F("",(c={},c[""]=t,c),o,h,r,"",[])}}if(!y("json-parse")){var j,B,N=r.fromCharCode,U={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},G=function(){throw j=B=null,c()},X=function(){var t,e,i,s,r,n=B,a=n.length;while(j<a)switch(r=n.charCodeAt(j),r){case 9:case 10:case 13:case 32:j++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=R?n.charAt(j):n[j],j++,t;case 34:for(t="@",j++;j<a;)if(r=n.charCodeAt(j),r<32)G();else if(92==r)switch(r=n.charCodeAt(++j),r){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=U[r],j++;break;case 117:for(e=++j,i=j+4;j<i;j++)r=n.charCodeAt(j),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||G();t+=N("0x"+n.slice(e,j));break;default:G()}else{if(34==r)break;r=n.charCodeAt(j),e=j;while(r>=32&&92!=r&&34!=r)r=n.charCodeAt(++j);t+=n.slice(e,j)}if(34==n.charCodeAt(j))return j++,t;G();default:if(e=j,45==r&&(s=!0,r=n.charCodeAt(++j)),r>=48&&r<=57){for(48==r&&(r=n.charCodeAt(j+1),r>=48&&r<=57)&&G(),s=!1;j<a&&(r=n.charCodeAt(j),r>=48&&r<=57);j++);if(46==n.charCodeAt(j)){for(i=++j;i<a&&(r=n.charCodeAt(i),r>=48&&r<=57);i++);i==j&&G(),j=i}if(r=n.charCodeAt(j),101==r||69==r){for(r=n.charCodeAt(++j),43!=r&&45!=r||j++,i=j;i<a&&(r=n.charCodeAt(i),r>=48&&r<=57);i++);i==j&&G(),j=i}return+n.slice(e,j)}if(s&&G(),"true"==n.slice(j,j+4))return j+=4,!0;if("false"==n.slice(j,j+5))return j+=5,!1;if("null"==n.slice(j,j+4))return j+=4,null;G()}return"$"},H=function t(e){var i,s;if("$"==e&&G(),"string"==typeof e){if("@"==(R?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(i=[];;s||(s=!0)){if(e=X(),"]"==e)break;s&&(","==e?(e=X(),"]"==e&&G()):G()),","==e&&G(),i.push(t(e))}return i}if("{"==e){for(i={};;s||(s=!0)){if(e=X(),"}"==e)break;s&&(","==e?(e=X(),"}"==e&&G()):G()),","!=e&&"string"==typeof e&&"@"==(R?e.charAt(0):e[0])&&":"==X()||G(),i[e.slice(1)]=t(X())}return i}G()}return e},Y=function(t,e,i){var s=V(t,e,i);s===g?delete t[e]:t[e]=s},V=function(t,e,i){var s,r=t[e];if("object"==a(n["a"])(r)&&r)if(v.call(r)==S)for(s=r.length;s--;)Y(r,s,i);else p(r,function(t){Y(r,t,i)});return i.call(t,e,r)};e.parse=function(t,e){var i,s;return j=0,B=""+t,i=H(X()),"$"!=X()&&G(),j=B=null,e&&v.call(e)==w?V((s={},s[""]=i,s),"",e):i}}}return e["runInContext"]=l,e}if(!h||h["global"]!==h&&h["window"]!==h&&h["self"]!==h||(o=h),a&&!e)l(o,a);else{var c=o.JSON,u=o["JSON3"],d=!1,f=l(o,o["JSON3"]={noConflict:function(){return d||(d=!0,o.JSON=c,o["JSON3"]=u,c=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 s=o.Elements.a();for(var r in s.href=e,i)r in s&&(i[r]=s[r]);var n,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),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},formatQueryString:function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var s in t)i.push(s+"="+escape(t[s]));return e&&(i=i.concat(e)),i.join("&")},buildURI:function(t,e){if(null==e)return t;var i=[],s=t.indexOf("?");if(-1!=s){var r=t.slice(s+1);i=i.concat(r.split("&"))}return-1!=s?t.slice(0,s)+"?"+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 s=""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname);return s},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(s){}if(!e)try{e=new ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(t)}catch(s){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 s=new t;return s.src=e,s}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(s){}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(s){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===s.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={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;n<a;n++){var h=s.ACTIVEX_VERSIONS[n];try{r=new ActiveXObject(h);break}catch(u){}}if(null==r)return!1}null==t.mimeType&&o.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),this._xhrLevel="string"===typeof r.responseType?2:1;var l=null;if(l=t.method==o.Methods.GET?o.URLUtils.buildURI(t.src,t.values):t.src,r.open(t.method||o.Methods.GET,l,!0),e&&r 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 c in t.headers)i[c]=t.headers[c];for(c in i)r.setRequestHeader(c,i[c]);return r instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(r.withCredentials=t.withCredentials),this._request=r,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},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(s){}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 s=e.pop(),r=this.getResult(s);for(n=this._loadQueue.length-1;n>=0;n--)if(a=this._loadQueue[n].getItem(),a.id==s||a.src==s){this._loadQueue.splice(n,1)[0].cancel();break}for(n=this._loadQueueBackup.length-1;n>=0;n--)if(a=this._loadQueueBackup[n].getItem(),a.id==s||a.src==s){this._loadQueueBackup.splice(n,1)[0].cancel();break}if(r)this._disposeItem(this.getItem(s));else for(var n=this._currentLoads.length-1;n>=0;n--){var a=this._currentLoads[n].getItem();if(a.id==s||a.src==s){this._currentLoads.splice(n,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,s=this._loadQueueBackup.length;i<s;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,s=e.types.length;i<s;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,s=e.extensions.length;i<s;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 s=new o.ErrorEvent("PRELOAD_NO_FILE");this._sendError(s)}},e.loadManifest=function(t,e,s){var r=null,a=null;if(Array.isArray(t)){if(0==t.length){var h=new o.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(h)}r=t}else if("string"===typeof t)r=[{src:t,type:i.MANIFEST}];else{if("object"!=Object(n["a"])(t)){h=new o.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(h)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var h=new o.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(h)}r=[t]}else void 0!==t.manifest&&(r=t.manifest,a=t.path)}for(var l=0,c=r.length;l<c;l++)this._addItem(r[l],a,s);!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 s=i.id;return e&&this._loadedRawResults[s]?this._loadedRawResults[s]:this._loadedResults[s]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var s=this._loadItemsById[i],r=this.getResult(i);!0===t&&null==r||e.push({item:s,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 s=this._createLoadItem(t,e,i);if(null!=s){var r=this._createLoader(s);null!=r&&("plugins"in r&&(r.plugins=this._plugins),s._loader=r,this._loadQueue.push(r),this._loadQueueBackup.push(r),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&s.type==o.Types.JAVASCRIPT||!0===s.maintainOrder)&&(this._scriptOrder.push(s),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var s=o.LoadItem.create(t);if(null==s)return null;var r="",n=i||this._basePath;if(s.src instanceof Object){if(!s.type)return null;if(e){r=e;var a=o.URLUtils.parseURI(e);null==n||a.absolute||a.relative||(r=n+r)}else null!=n&&(r=n)}else{var h=o.URLUtils.parseURI(s.src);h.extension&&(s.ext=h.extension),null==s.type&&(s.type=o.RequestUtils.getTypeByExtension(s.ext));var l=s.src;if(!h.absolute&&!h.relative)if(e){r=e;a=o.URLUtils.parseURI(e);l=e+l,null==n||a.absolute||a.relative||(r=n+r)}else null!=n&&(r=n);s.src=r+s.src}s.path=r,void 0!==s.id&&null!==s.id&&""!==s.id||(s.id=l);var c=this._typeCallbacks[s.type]||this._extensionCallbacks[s.ext];if(c){var u=c.callback.call(c.scope,s,this);if(!1===u)return null;!0===u||null!=u&&(s._loader=u),h=o.URLUtils.parseURI(s.src),null!=h.extension&&(s.ext=h.extension)}return this._loadItemsById[s.id]=s,this._loadItemsBySrc[s.src]=s,null==s.crossOrigin&&(s.crossOrigin=this._crossOrigin),s},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i<this._availableLoaders.length;i++){var s=this._availableLoaders[i];if(s&&s.canLoadItem(t))return new s(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(),s=e.getResult();this._loadedResults[i.id]=s;var r=e.getResult(!0);null!=r&&r!==s&&(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 s=e[i].item;this._loadItemsBySrc[s.src]=s,this._loadItemsById[s.id]=s,this._loadedResults[s.id]=e[i].result,this._loadedRawResults[s.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 s=o.indexOf(this._scriptOrder,i);return-1!=s&&(this._loadedScripts[s]=!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 s=this._loadedResults[i.id];i.type==o.Types.JAVASCRIPT&&o.DomUtils.appendToHead(s);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),s=0;while(s<i){var r=this._loadedScripts[s];if(null==r)return!1;s++}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,s=0,r=this._currentLoads.length;s<r;s++)i+=this._currentLoads[s].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="",s=e.length-1;s>=0;s--){var r=e[s];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,s=e.length,r=s-1;r>=0;r--)for(var n=e[r],a=n.refs,h=a.length-1;h>=0;h--){var l=this._getTextWidth(n.family+","+i[h],n.weight,n.style);if(l!=a[h]){var c=new o.Event("fileload");n.type="font-family",c.item=n,this.dispatchEvent(c),e.splice(r,1);break}}if(s!==e.length){c=new o.ProgressEvent(this._count-e.length,this._count);this.dispatchEvent(c)}0===s&&(this._stopWatching(),this._sendComplete())},e._calculateReferenceSizes=function(e){for(var i=t._referenceFonts,s=e.refs=[],r=0;r<i.length;r++)s[r]=this._getTextWidth(i[r],e.weight,e.style)},e._defFromSrc=function(e){var i,s=/[- ._]+/g,r=e,n=null;i=r.search(/[?#]/),-1!==i&&(r=r.substr(0,i)),i=r.lastIndexOf("."),-1!==i&&(n=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(s,"").toLowerCase());var h=r.match(t.STYLE_REGEX);h&&(a=a.replace(h[0],""),h="italic"),a=a.replace(s,"");var l="local('"+r.replace(s," ")+"'), url('"+e+"')",c=t.FONT_FORMAT[n];return c&&(l+=" format('"+c+"')"),this._defFromObj({family:a,weight:t.FONT_WEIGHT[o]||o,style:h,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,s){var r=t._ctx;return r.font=s+" "+i+" 72px "+e,r.measureText(t.sampleText).width},e._getCSSValue=function(t,e){var i=new RegExp(e+":s*([^;}]+?)s*[;}]"),s=i.exec(t);return s&&s[1]?s[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,s=window.URL||window.webkitURL;if(this._preferXHR)if(s){var r=s.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(s){var i=new o.ErrorEvent("JSON_FORMAT",null,s);return this._sendError(i),s}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,s=this.plugins.length;i<s;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)?this._tag=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,s=i.indexOf(t.item.src);i[s]=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 s=e.documentElement;return document.importNode&&(s=document.importNode(s,!0)),i.appendChild(s),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"))},"113e":function(t,e,i){"use strict";var s=i("68f5"),r=i.n(s);r.a},1997:function(t,e,i){"use strict";var s=i("4243"),r=i.n(s);r.a},"27fb":function(t,e,i){},3367:function(t,e,i){"use strict";var s=i("51fe"),r=i.n(s);r.a},4243:function(t,e,i){},"51fe":function(t,e,i){},"56d7":function(t,e,i){"use strict";i.r(e);i("cadf"),i("551c"),i("f751"),i("097d");var s=i("2b0e"),r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app"}},[this.error?t._e():i("Player",{ref:"game"}),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)},n=[],a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("GameWrapper",{ref:"wrapper",attrs:{buttons:t.selectedItemMoveButtons,colors:t.selectedItemColors,loadingPct:t.loadingPct,bgColor:t.manifest.bgColor,playing:t.gameStarted,saveImage:t.saveImage,homeUrl:t.siteHomeLink},on:{"prepare-save":t.handlePrepareSave,random:t.handleRandomClick,color:t.handleSelectColorClick,gamepad:t.handleGamePadClick},scopedSlots:t._u([{key:"welcomescreen",fn:function(){return[t.welcomeScreenData?i("WelcomeScreen",{attrs:{data:t.welcomeScreenData,showPlayButton:null===t.loadingPct},on:{"click-play":t.startLoadingGame}}):t._e()]},proxy:!0},{key:"display",fn:function(){return[i("GameCanvas",{ref:"display",attrs:{canvasWidth:t.manifest.gameWidth,canvasHeight:t.manifest.gameHeight}})]},proxy:!0},{key:"items",fn:function(){return[i("ScrollDiv",{attrs:{size:"40",orientation:"vertical","scroll-arrows":"",items:t.selectedCategory.children},on:{select:t.handleImageClick},scopedSlots:t._u([{key:"default",fn:function(e){return[e.item.delete?i("div",[i("button",{staticClass:"item btn-default"},[i("i",{staticClass:"svg-icon svg-delete",staticStyle:{width:"20pt",height:"20pt"}})])]):i("div",{class:[e.item.visible?"active":"",e.item===t.selectedItem?"selected":""]},[i("div",{staticClass:"item",style:{"background-image":e.item.image?"url("+e.item.image+")":""}})])]}}])})]},proxy:!0},{key:"categories",fn:function(){return[i("ScrollDiv",{attrs:{size:"40",orientation:"vertical","scroll-arrows":"",items:t.categories},on:{select:t.handleCategoryClick},scopedSlots:t._u([{key:"default",fn:function(t){return[i("div",[i("div",{staticClass:"item",style:{"background-image":t.item.image?"url("+t.item.image+")":""}})])]}}])})]},proxy:!0}])})},o=[],h=(i("34ef"),i("28a5"),i("75fc")),l=(i("7f7f"),i("ac6a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div")}),c=[],u=(i("3367"),i("2877")),d={},f=Object(u["a"])(d,l,c,!1,null,null,null),_=(f.exports,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.wrapperClasses},[i("div",{staticClass:"size-limit"},[t.playing?t._e():i("div",{staticClass:"game-loading"},[i("div",{class:["progress",t.loadingPct?"":"hidden"]},[i("div",{staticClass:"progress-bar",style:{width:t.loadingPct+"%"}})]),t._t("welcomescreen")],2),i("OverlayAnimation",{attrs:{visible:t.saveMode}}),i("div",{class:["g-wrapper-content",t.playing?"":"blur"]},[i("ColorPicker",{ref:"colorPicker",attrs:{visible:!t.saveMode,colors:t.colors},on:{color:t.handleColor,open:function(e){return t.$refs.gamePad.close()}}}),i("GamePad",{ref:"gamePad",attrs:{visible:!t.saveMode,buttons:t.buttons},on:{buttonclick:t.handleMove,open:function(e){return t.$refs.colorPicker.close()}}}),i("div",{staticClass:"close-click",on:{click:t.handleClickClose}}),i("div",{staticClass:"g-save-buttons"},[i("a",{staticClass:"btn-default btn-shadow btn-save-mode",attrs:{target:t.saveImageTarget,href:t.saveImage?t.saveImage.link:"",download:t.saveImage?t.saveImage.name:""},on:{click:t.onClickSave}},[i("i",{staticClass:"svg-icon svg-checked"}),t._v(" Save\n ")]),i("button",{staticClass:"btn-default btn-shadow cancel-save-mode",on:{click:t.exitSaveMode}},[i("i",{staticClass:"svg-icon svg-arrow-right"}),t._v(" Back\n ")])]),i("div",{staticClass:"g-display",style:t.displayStyles},[t._t("display"),i("button",{staticClass:"btn-default btn-shadow enter-save-mode",on:{click:t.enterSaveMode}},[i("i",{staticClass:"svg-icon svg-checked"})]),i("button",{staticClass:"btn-default btn-shadow random-items",on:{click:function(e){return t.$emit("random")}}},[i("i",{staticClass:"svg-icon svg-dices"})]),t.homeUrl?i("PoweredBy",{attrs:{href:t.homeUrl,by:"meiker.io"}}):t._e()],2),i("div",{staticClass:"g-categories"},[t._t("categories")],2),i("div",{staticClass:"g-items"},[t._t("items"),i("button",{staticClass:"btn-default g-backbuttom",on:{click:t.handleClickClose}},[i("i",{staticClass:"svg-icon svg-arrow-right"})])],2)],1)],1)])}),p=[],g=(i("b54a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("button",{staticClass:"btn-default btn-shadow color-items",on:{click:t.toggleColor}},[i("i",{staticClass:"svg-icon svg-color-picker"})]),t.colors?i("div",{staticClass:"selector"},[t.colors?i("ScrollDiv",{attrs:{size:"40",orientation:"vertical",items:t.colors},on:{select:t.handleColor},scopedSlots:t._u([{key:"default",fn:function(t){return[i("div",{staticClass:"color btn-shadow",style:{"background-color":t.item}})]}}],null,!1,1106364485)}):t._e()],1):t._e()])}),m=[],v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"scroll-wrapper",on:{mouseover:function(e){return t.handleMouseEnter(!0)},mouseout:function(e){return t.handleMouseEnter(!1)}}},[t.items instanceof Array?i("vuescroll",{ref:"scroll",style:{"white-space":"horizontal"===t.orientation?"nowrap":"normal"},attrs:{ops:t.ops},on:{"handle-scroll":t.handleScroll,"handle-scroll-complete":t.handleScrollComplete}},[t._l(t.items,function(e,s){return[i("div",{key:s,class:"slot-base "+t.orientation+" "+t.arrowPadding(t.items,s),style:{margin:t.margin+"pt",width:t.size,height:t.size},on:{click:function(i){return i.preventDefault(),t.handleClick(e,s)}}},[t._t("default",[t._v("\n "+t._s(e)+"\n ")],{item:e})],2)]})],2):t._e(),t.scrollArrows?i("div",{class:["scroll-arrow arrow-up",t.isMobile?"":"clicable"],on:{click:t.handleScrollUp}},[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"}},[i("polyline",{staticStyle:{fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48px"},attrs:{points:"112 328 256 184 400 328"}})])]):t._e(),t.scrollArrows?i("div",{class:["scroll-arrow arrow-down",t.isMobile?"":"clicable"],on:{click:t.handleScrollDown}},[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"}},[i("polyline",{staticStyle:{fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48px"},attrs:{points:"112 184 256 328 400 184"}})])]):t._e()],1)},b=[],y=i("77a0"),w=i.n(y),E=function(){var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t},x={name:"ScrollDiv",components:{vuescroll:w.a},data:function(){var t=E();return{isMobile:t,scrolling:!1,ops:{vuescroll:{mode:t?"slide":"native",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1},scrollPanel:{scrollingX:"horizontal"===this.orientation,scrollingY:"vertical"===this.orientation,speed:800,easing:"easeOutCubic"},bar:t?{disable:!0}:{disable:!1,showDelay:200,keepShow:!1,background:"#c1c1c1",opacity:.5,hoverStyle:!1,specifyBorderRadius:!1,minSize:0,size:"4pt"}}}},props:{orientation:{type:String,default:"horizontal"},items:{type:Array,default:null},margin:{type:String,default:"0pt"},size:{type:String,default:"100%"},scrollArrows:{type:Boolean,default:!1}},methods:{handleScroll:function(){this.scrolling||(this.scrolling=!0)},handleScrollUp:function(){this.isMobile||this.$refs["scroll"].scrollBy({dy:"-200"},200,"easeOutCubic")},handleMouseEnter:function(t){this.isMobile||(this.ops.bar.keepShow=t)},handleScrollDown:function(){this.isMobile||this.$refs["scroll"].scrollBy({dy:"200"},200,"easeOutCubic")},handleScrollComplete:function(){var t=this;this.$nextTick(function(){t.scrolling=!1})},handleClick:function(t,e){this.scrolling&&this.isMobile||this.$emit("select",t,e)},arrowPadding:function(t,e){return this.scrollArrows?0===e?"first":e+1===t.length?"latest":"":""}},watch:{orientation:function(t,e){this.ops.scrollPanel.scrollingX="horizontal"===t,this.ops.scrollPanel.scrollingY="vertical"===t}},mounted:function(){var t=this;this.$nextTick(function(){t.scrolling=!1})}},T=x,S=(i("be1e"),Object(u["a"])(T,v,b,!1,null,"05e313ed",null)),C=S.exports,R={name:"ColorPicker",components:{ScrollDiv:C},data:function(){return{opened:!1}},computed:{classes:function(){return["color-picker",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},size:{type:String,default:"30pt"},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)}},mounted:function(){}},L=R,A=(i("023a"),Object(u["a"])(L,g,m,!1,null,"2d42a96a",null)),I=A.exports,O=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("button",{staticClass:"btn-default btn-shadow btn-gamepad",on:{click:t.toggleGamePad}},[i("i",{staticClass:"svg-icon svg-move"})]),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 ")])])])])},D=[],P={DEFAULT:"default",ROTATE_RIGHT:"rotate-right",ROTATE_LEFT:"rotate-left",LEFT:"left",DOWN:"down",RIGHT:"right",UP:"up"},M={Buttons:P,name:"GamePad",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})}},mounted:function(){}},k=M,F=(i("1997"),Object(u["a"])(k,O,D,!1,null,"018f5ba2",null)),j=F.exports,B=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("span",{staticClass:"color overlay--a"}),i("span",{staticClass:"color overlay--b"}),i("span",{staticClass:"color overlay--c"}),i("span",{staticClass:"color overlay--d"})])},N=[],U={name:"OverlayAnimation",data:function(){return{hidden:!1}},watch:{visible:function(t){var e=this;this.hidden=!t,t&&setTimeout(function(){e.hidden=!0},2500)}},computed:{classes:function(){return["overlay",this.visible?"expanded":"",this.hidden?"hide":""]}},props:{visible:{type:Boolean,default:!1}}},G=U,X=(i("aa47"),Object(u["a"])(G,B,N,!1,null,"4eff4de8",null)),H=X.exports,Y=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()])},V=[],q={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")}},W=q,z=(i("b0c58"),Object(u["a"])(W,Y,V,!1,null,"30481fb5",null)),J=z.exports,Q={name:"GameWrapper",components:{ColorPicker:I,GamePad:j,OverlayAnimation:H,PoweredBy:J},data:function(){return{opened:!1,saveMode:!1}},computed:{wrapperClasses:function(){return["g-wrapper","noselect",this.opened?"opened":"",this.saveMode?"save-mode":""]},displayStyles:function(){return this.bgColor?{background:this.bgColor}:{}},saveImageTarget:function(){return this.isInAppBrowsing()?"_self":"_blank"}},props:{orientation:{type:String,default:"horizontal"},colors:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},bgColor:{type:String,default:null},loadingPct:{type:String,default:null},playing:{type:Boolean,default:!1},saveImage:{type:Object,default:function(){return null}},homeUrl:{type:String,default:null}},methods:{handleClickClose:function(){this.$emit("update",{opened:!1})},handleColor:function(t){this.$emit("color",t)},handleMove:function(t){this.$emit("gamepad",t)},enterSaveMode:function(t){this.saveMode=!0,this.$emit("prepare-save",t)},exitSaveMode:function(){this.saveMode=!1,this.saveMode&&(window.URL||window.webkitURL).revokeObjectURL(this.saveMode.link)},onClickSave:function(t){this.$emit("save",t)},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}}},mounted:function(){var t=this;this.$on("update",function(e){void 0!==e.opened&&(t.opened=!!e.opened),void 0!==e.saveMode&&(t.saveMode=!!e.saveMode)})}},$=Q,Z=(i("7553"),Object(u["a"])($,_,p,!1,null,"449add57",null)),K=Z.exports,tt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"display"},[i("canvas",{ref:"display",attrs:{id:"game",width:t.canvasWidth+"px",height:t.canvasHeight+"px"}})])},et=[],it=(i("c5f6"),{name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs.display}}}),st=it,rt=(i("b950"),Object(u["a"])(st,tt,et,!1,null,"78df3f88",null)),nt=rt.exports,at=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"},[i("div",{staticClass:"tags"},[i("svg",{attrs:{height:"18pt",width:"18pt",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,s){return i("a",{key:s,staticClass:"tag",attrs:{href:t.resolveTagHref(e),target:t.target}},[t._v("\n "+t._s(e)+"\n ")])}),t.data.tags&&0!==t.data.tags.length?t._e():i("span",[t._v("Untagged")])],2),i("p",[t._v(t._s(t.data.description||"No description"))])])])]),i("div",{staticClass:"floating-icon-wrapper"},[i("img",{staticClass:"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)},ot=[],ht={name:"WelcomeScreen",components:{PoweredBy:J},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():""}}},lt=ht,ct=(i("113e"),Object(u["a"])(lt,at,ot,!1,null,"4ac152ab",null)),ut=ct.exports,dt=(i("7514"),i("d225")),ft=i("b0b4"),_t=i("7618"),pt=i("03ff"),gt=(i("a481"),i("6b54"),i("63d9"),i("55dd"),i("6c7b"),function(){this.createjs=this.createjs||{},mt.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},mt.promote=function(t,e){var i=t.prototype,s=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(s)for(var r in i[(e+="_")+"constructor"]=s.constructor,s)i.hasOwnProperty(r)&&"function"==typeof s[r]&&(i[e+r]=s[r]);return t},this.createjs=this.createjs||{},mt.indexOf=function(t,e){for(var i=0,s=t.length;i<s;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++},mt.UID=t}(),this.createjs=this.createjs||{},mt.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+")]"},mt.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 s;s=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=s[t];return r&&this.removeEventListener(t,e,i),r=s[t],r?r.push(e):s[t]=[e],e},e.on=function(t,e,i,s,r,n){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,r),s&&t.remove()},n)},e.removeEventListener=function(t,e,i){var s=i?this._captureListeners:this._listeners;if(s){var r=s[t];if(r)for(var n=0,a=r.length;n<a;n++)if(r[n]==e){1==a?delete s[t]:r.splice(n,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 s=this._listeners;if(!e&&(!s||!s[t]))return!0;t=new mt.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(h){}if(t.bubbles&&this.parent){var r=this,n=[r];while(r.parent)n.push(r=r.parent);var a,o=n.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)n[a]._dispatchEvent(t,1+(0==a));for(a=1;a<o&&!t.propagationStopped;a++)n[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,s,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(s=r[t.type])&&(i=s.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,s=s.slice();for(var n=0;n<i&&!t.immediatePropagationStopped;n++){var a=s[n];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)},mt.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,mt.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=mt.deprecate(t._setInterval,"Ticker.setInterval"),t._getInterval=function(){return t._interval},t.getInterval=mt.deprecate(t._getInterval,"Ticker.getInterval"),t._setFPS=function(e){t._setInterval(1e3/e)},t.setFPS=mt.deprecate(t._setFPS,"Ticker.setFPS"),t._getFPS=function(){return 1e3/t._interval},t.getFPS=mt.deprecate(t._getFPS,"Ticker.getFPS");try{Object.defineProperties(t,{interval:{get:t._getInterval,set:t._setInterval},framerate:{get:t._getFPS,set:t._setFPS}})}catch(s){console.log(s)}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,s=t._tickTimes;if(!s||s.length<1)return-1;e=Math.min(s.length,e||0|t._getFPS());for(var r=0;r<e;r++)i+=s[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(),s=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=s),t.hasEventListener("tick")){var r=new mt.Event("tick"),n=t.maxDelta;r.delta=n&&s>n?n:s,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},mt.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=mt.createCanvas?mt.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},mt.VideoBuffer=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s,r,n,a,o,h,l,c){this.Event_constructor(t,e,i),this.stageX=s,this.stageY=r,this.rawX=null==h?s:h,this.rawY=null==l?r:l,this.nativeEvent=n,this.pointerID=a,this.primary=!!o,this.relatedTarget=c}var e=mt.extend(t,mt.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+")]"},mt.MouseEvent=mt.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s,r,n){this.setValues(t,e,i,s,r,n)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,s,r,n){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==s?1:s,this.tx=r||0,this.ty=n||0,this},e.append=function(t,e,i,s,r,n){var a=this.a,o=this.b,h=this.c,l=this.d;return 1==t&&0==e&&0==i&&1==s||(this.a=a*t+h*e,this.b=o*t+l*e,this.c=a*i+h*s,this.d=o*i+l*s),this.tx=a*r+h*n+this.tx,this.ty=o*r+l*n+this.ty,this},e.prepend=function(t,e,i,s,r,n){var a=this.a,o=this.c,h=this.tx;return this.a=t*a+i*this.b,this.b=e*a+s*this.b,this.c=t*o+i*this.d,this.d=e*o+s*this.d,this.tx=t*h+i*this.ty+r,this.ty=e*h+s*this.ty+n,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,s,r,n,a,o,h,l){if(n%360)var c=n*t.DEG_TO_RAD,u=Math.cos(c),d=Math.sin(c);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*s,d*s,-d*r,u*r,0,0)):this.append(u*s,d*s,-d*r,u*r,e,i),(h||l)&&(this.tx-=h*this.a+l*this.c,this.ty-=h*this.b+l*this.d),this},e.prependTransform=function(e,i,s,r,n,a,o,h,l){if(n%360)var c=n*t.DEG_TO_RAD,u=Math.cos(c),d=Math.sin(c);else u=1,d=0;return(h||l)&&(this.tx-=h,this.ty-=l),a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.prepend(u*s,d*s,-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*s,d*s,-d*r,u*r,e,i),this},e.rotate=function(e){e*=t.DEG_TO_RAD;var i=Math.cos(e),s=Math.sin(e),r=this.a,n=this.b;return this.a=r*i+this.c*s,this.b=n*i+this.d*s,this.c=-r*s+this.c*i,this.d=-n*s+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,s=this.d,r=this.tx,n=t*s-e*i;return this.a=s/n,this.b=-e/n,this.c=-i/n,this.d=t/n,this.tx=(i*this.ty-s*r)/n,this.ty=-(t*this.ty-e*r)/n,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),s=Math.atan2(this.b,this.a),r=Math.abs(1-i/s);return r<1e-5?(e.rotation=s/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=s/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,mt.Matrix2D=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s,r){this.setValues(t,e,i,s,r)}var e=t.prototype;e.setValues=function(t,e,i,s,r){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=s,this.matrix=r||this.matrix&&this.matrix.identity()||new mt.Matrix2D,this},e.append=function(t,e,i,s,r){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=s||this.compositeOperation,this.visible=this.visible&&t,r&&this.matrix.appendMatrix(r),this},e.prepend=function(t,e,i,s,r){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||s,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())},mt.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+")]"},mt.Point=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s){this.setValues(t,e,i,s)}var e=t.prototype;e.setValues=function(t,e,i,s){return this.x=t||0,this.y=e||0,this.width=i||0,this.height=s||0,this},e.extend=function(t,e,i,s){return i=i||0,s=s||0,t+i>this.x+this.width&&(this.width=t+i-this.x),e+s>this.y+this.height&&(this.height=e+s-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,s){return this.x-=e,this.y-=t,this.width+=e+s,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,s){return i=i||0,s=s||0,t>=this.x&&t+i<=this.x+this.width&&e>=this.y&&e+s<=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,s=e.y,r=i+e.width,n=s+e.height;return this.x>i&&(i=this.x),this.y>s&&(s=this.y),this.x+this.width<r&&(r=this.x+this.width),this.y+this.height<n&&(n=this.y+this.height),r<=i||n<=s?null:new t(i,s,r-i,n-s)},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+")]"},mt.Rectangle=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s,r,n,a){t.addEventListener&&(this.target=t,this.overLabel=null==i?"over":i,this.outLabel=null==e?"out":e,this.downLabel=null==s?"down":s,this.play=r,this._isPressed=!1,this._isOver=!1,this._enabled=!1,t.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),n&&(a&&(n.actionsEnabled=!1,n.gotoAndStop&&n.gotoAndStop(a)),t.hitArea=n))}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=mt.deprecate(e._setEnabled,"ButtonHelper.setEnabled"),e._getEnabled=function(){return this._enabled},e.getEnabled=mt.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,s=t.type;"mousedown"==s?(this._isPressed=!0,e=this.downLabel):"pressup"==s?(this._isPressed=!1,e=this._isOver?this.overLabel:this.outLabel):"rollover"==s?(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},mt.ButtonHelper=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s){this.color=t||"black",this.offsetX=e||0,this.offsetY=i||0,this.blur=s||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)},mt.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=mt.extend(t,mt.EventDispatcher);e._getAnimations=function(){return this._animations.slice()},e.getAnimations=mt.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 mt.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,s,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 n=t.images[e];if("string"==typeof n){var a=n;n=document.createElement("img"),n.src=a}r.push(n),n.getContext||n.naturalWidth||(this._loadCount++,this.complete=!1,function(t,e){n.onload=function(){t._handleImageLoad(e)}}(this,a),function(t,e){n.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 mt.Rectangle(o[0],o[1],o[2],o[3]),regX:o[5]||0,regY:o[6]||0})}else s=t.frames,this._frameWidth=s.width,this._frameHeight=s.height,this._regX=s.regX||0,this._regY=s.regY||0,this._spacing=s.spacing||0,this._margin=s.margin||0,this._numFrames=s.count,0==this._loadCount&&this._calculateFrames();var h;if(this._animations=[],null!=(s=t.animations))for(h in this._data={},s){var l={name:h},c=s[h];if("number"==typeof c)r=l.frames=[c];else if(Array.isArray(c))if(1==c.length)l.frames=[c[0]];else for(l.speed=c[3],l.next=c[2],r=l.frames=[],e=c[0];e<=c[1];e++)r.push(e);else{l.speed=c.speed,l.next=c.next;var u=c.frames;r=l.frames="number"==typeof u?[u]:u.slice(0)}!0!==l.next&&void 0!==l.next||(l.next=h),(!1===l.next||r.length<2&&l.next==h)&&(l.next=null),l.speed||(l.speed=1),this._animations.push(h),this._data[h]=l}}},e._handleImageLoad=function(t){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},e._handleImageError=function(t){var e=new mt.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,s=this._frameHeight,r=this._spacing,n=this._margin;t:for(var a=0,o=this._images;a<o.length;a++){var h=o[a],l=h.width||h.naturalWidth,c=h.height||h.naturalHeight,u=n;while(u<=c-n-s){var d=n;while(d<=l-n-i){if(e>=t)break t;e++,this._frames.push({image:h,rect:new mt.Rectangle(d,u,i,s),regX:this._regX,regY:this._regY}),d+=i+r}u+=s+r}}this._numFrames=e}},mt.SpriteSheet=mt.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,s){return null!=t&&null==i&&(s=e,i=255&t,e=t>>8&255,t=t>>16&255),null==s?"rgb("+t+","+e+","+i+")":"rgba("+t+","+e+","+i+","+s+")"},t.getHSL=function(t,e,i,s){return null==s?"hsl("+t%360+","+e+"%,"+i+"%)":"hsla("+t%360+","+e+"%,"+i+"%,"+s+")"},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 s=mt.createCanvas?mt.createCanvas():document.createElement("canvas");s.getContext&&(t._ctx=s.getContext("2d"),s.width=s.height=1),e._getInstructions=function(){return this._updateInstructions(),this._instructions},e.getInstructions=mt.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,s=this._storeIndex,r=i.length;s<r;s++)i[s].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,s=this._storeIndex,r=i.length;s<r;s++)!1!==(e=i[s]).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,s,r,n){return this.append(new i.ArcTo(t,e,s,r,n))},e.arc=function(t,e,s,r,n,a){return this.append(new i.Arc(t,e,s,r,n,a))},e.quadraticCurveTo=function(t,e,s,r){return this.append(new i.QuadraticCurveTo(t,e,s,r))},e.bezierCurveTo=function(t,e,s,r,n,a){return this.append(new i.BezierCurveTo(t,e,s,r,n,a))},e.rect=function(t,e,s,r){return this.append(new i.Rect(t,e,s,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,s,r,n,a){return this._setFill((new i.Fill).linearGradient(t,e,s,r,n,a))},e.beginRadialGradientFill=function(t,e,s,r,n,a,o,h){return this._setFill((new i.Fill).radialGradient(t,e,s,r,n,a,o,h))},e.beginBitmapFill=function(t,e,s){return this._setFill(new i.Fill(null,s).bitmap(t,e))},e.endFill=function(){return this.beginFill()},e.setStrokeStyle=function(t,e,s,r,n){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,s,r,n),this._stroke&&(this._stroke.ignoreScale=n),this._strokeIgnoreScale=n,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,s,r,n,a){return this._setStroke((new i.Stroke).linearGradient(t,e,s,r,n,a))},e.beginRadialGradientStroke=function(t,e,s,r,n,a,o,h){return this._setStroke((new i.Stroke).radialGradient(t,e,s,r,n,a,o,h))},e.beginBitmapStroke=function(t,e){return this._setStroke((new i.Stroke).bitmap(t,e))},e.endStroke=function(){return this.beginStroke()},e.curveTo=e.quadraticCurveTo,e.drawRect=e.rect,e.drawRoundRect=function(t,e,i,s,r){return this.drawRoundRectComplex(t,e,i,s,r,r,r,r)},e.drawRoundRectComplex=function(t,e,s,r,n,a,o,h){return this.append(new i.RoundRect(t,e,s,r,n,a,o,h))},e.drawCircle=function(t,e,s){return this.append(new i.Circle(t,e,s))},e.drawEllipse=function(t,e,s,r){return this.append(new i.Ellipse(t,e,s,r))},e.drawPolyStar=function(t,e,s,r,n,a){return this.append(new i.PolyStar(t,e,s,r,n,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],s=[2,2,4,6,0],r=0,n=e.length,a=[],o=0,h=0,l=t.BASE_64;while(r<n){var c=e.charAt(r),u=l[c],d=u>>3,f=i[d];if(!f||3&u)throw"bad path data (@"+r+"): "+c;var _=s[d];d||(o=h=0),a.length=0,r++;for(var p=2+(u>>2&1),g=0;g<_;g++){var m=l[e.charAt(r)],v=m>>5?-1:1;m=(31&m)<<6|l[e.charAt(r+1)],3==p&&(m=m<<6|l[e.charAt(r+2)]),m=v*m/10,g%2?o=m+=o:h=m+=h,a[g]=m,r+=p}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,s=this._activeInstructions,r=this._commitIndex;if(this._dirty&&s.length){i.length=r,i.push(t.beginCmd);var n=s.length,a=i.length;i.length=a+n;for(var o=0;o<n;o++)i[o+a]=s[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&&(s.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,s,r){this.x1=t,this.y1=e,this.x2=i,this.y2=s,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,s,r,n){this.x=t,this.y=e,this.radius=i,this.startAngle=s,this.endAngle=r,this.anticlockwise=!!n}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.anticlockwise)},(i.QuadraticCurveTo=function(t,e,i,s){this.cpx=t,this.cpy=e,this.x=i,this.y=s}).prototype.exec=function(t){t.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(i.BezierCurveTo=function(t,e,i,s,r,n){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=s,this.x=r,this.y=n}).prototype.exec=function(t){t.bezierCurveTo(this.cp1x,this.cp1y,this.cp2x,this.cp2y,this.x,this.y)},(i.Rect=function(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s}).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;e&&(t.save(),t.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),t.fill(),e&&t.restore()}},e.linearGradient=function(e,i,s,r,n,a){for(var o=this.style=t._ctx.createLinearGradient(s,r,n,a),h=0,l=e.length;h<l;h++)o.addColorStop(i[h],e[h]);return o.props={colors:e,ratios:i,x0:s,y0:r,x1:n,y1:a,type:"linear"},this},e.radialGradient=function(e,i,s,r,n,a,o,h){for(var l=this.style=t._ctx.createRadialGradient(s,r,n,a,o,h),c=0,u=e.length;c<u;c++)l.addColorStop(i[c],e[c]);return l.props={colors:e,ratios:i,x0:s,y0:r,r0:n,x1:a,y1:o,r1:h,type:"radial"},this},e.bitmap=function(e,i){if(e.naturalWidth||e.getContext||e.readyState>=2){var s=this.style=t._ctx.createPattern(e,i||"");s.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){this.style&&(t.strokeStyle=this.style,this.ignoreScale&&(t.save(),t.setTransform(1,0,0,1,0,0)),t.stroke(),this.ignoreScale&&t.restore())},e.linearGradient=i.Fill.prototype.linearGradient,e.radialGradient=i.Fill.prototype.radialGradient,e.bitmap=i.Fill.prototype.bitmap,e.path=!1,e=(i.StrokeStyle=function(t,e,i,s,r){this.width=t,this.caps=e,this.joints=i,this.miterLimit=s,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,s,r,n,a,o){this.x=t,this.y=e,this.w=i,this.h=s,this.radiusTL=r,this.radiusTR=n,this.radiusBR=a,this.radiusBL=o}).prototype.exec=function(t){var e=(h<l?h:l)/2,i=0,s=0,r=0,n=0,a=this.x,o=this.y,h=this.w,l=this.h,c=this.radiusTL,u=this.radiusTR,d=this.radiusBR,f=this.radiusBL;c<0&&(c*=i=-1),c>e&&(c=e),u<0&&(u*=s=-1),u>e&&(u=e),d<0&&(d*=r=-1),d>e&&(d=e),f<0&&(f*=n=-1),f>e&&(f=e),t.moveTo(a+h-u,o),t.arcTo(a+h+u*s,o-u*s,a+h,o+u,u),t.lineTo(a+h,o+l-d),t.arcTo(a+h+d*r,o+l+d*r,a+h-d,o+l,d),t.lineTo(a+f,o+l),t.arcTo(a-f*n,o+l+f*n,a,o+l-f,f),t.lineTo(a,o+c),t.arcTo(a-c*i,o-c*i,a+c,o,c),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,s){this.x=t,this.y=e,this.w=i,this.h=s}).prototype.exec=function(t){var e=this.x,i=this.y,s=this.w,r=this.h,n=.5522848,a=s/2*n,o=r/2*n,h=e+s,l=i+r,c=e+s/2,u=i+r/2;t.moveTo(e,u),t.bezierCurveTo(e,u-o,c-a,i,c,i),t.bezierCurveTo(c+a,i,h,u-o,h,u),t.bezierCurveTo(h,u+o,c+a,l,c,l),t.bezierCurveTo(c-a,l,e,u+o,e,u)},(i.PolyStar=function(t,e,i,s,r,n){this.x=t,this.y=e,this.radius=i,this.sides=s,this.pointSize=r,this.angle=n}).prototype.exec=function(t){var e=this.x,i=this.y,s=this.radius,r=(this.angle||0)/180*Math.PI,n=this.sides,a=1-(this.pointSize||0),o=Math.PI/n;t.moveTo(e+Math.cos(r)*s,i+Math.sin(r)*s);for(var h=0;h<n;h++)r+=o,1!=a&&t.lineTo(e+Math.cos(r)*s*a,i+Math.sin(r)*s*a),r+=o,t.lineTo(e+Math.cos(r)*s,i+Math.sin(r)*s);t.closePath()},t.beginCmd=new i.BeginPath,mt.Graphics=t}(),this.createjs=this.createjs||{},function(){function t(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.bitmapCache=null,this.id=mt.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 mt.DisplayProps,this._rectangle=new mt.Rectangle,this._bounds=null,this._webGLRenderStyle=t._StageGL_NONE}var e=mt.extend(t,mt.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=mt.createCanvas?mt.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=mt["Stage"];while(t.parent)t=t.parent;return t instanceof e?t:null},e.getStage=mt.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(s){}e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){var i=this.bitmapCache;return!(!i||e)&&i.draw(t)},e.updateContext=function(e){var i=this,s=i.mask,r=i._props.matrix;s&&s.graphics&&!s.graphics.isEmpty()&&(s.getMatrix(r),e.transform(r.a,r.b,r.c,r.d,r.tx,r.ty),s.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 n=r.tx,a=r.ty;t._snapToPixelEnabled&&i.snapToPixel&&(n=n+(n<0?-.5:.5)|0,a=a+(a<0?-.5:.5)|0),e.transform(r.a,r.b,r.c,r.d,n,a),e.globalAlpha*=i.alpha,i.compositeOperation&&(e.globalCompositeOperation=i.compositeOperation),i.shadow&&this._applyShadow(e,i.shadow)},e.cache=function(t,e,i,s,r,n){this.bitmapCache||(this.bitmapCache=new mt.BitmapCache),this.bitmapCache.define(this,t,e,i,s,r,n)},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 mt.Point)},e.globalToLocal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t,e,i||new mt.Point)},e.localToLocal=function(t,e,i,s){return s=this.localToGlobal(t,e,s),i.globalToLocal(s.x,s.y,s)},e.setTransform=function(t,e,i,s,r,n,a,o,h){return this.x=t||0,this.y=e||0,this.scaleX=null==i?1:i,this.scaleY=null==s?1:s,this.rotation=r||0,this.skewX=n||0,this.skewY=a||0,this.regX=o||0,this.regY=h||0,this},e.getMatrix=function(t){var e=this,i=t&&t.identity()||new mt.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 mt.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 s=t._hitTestContext;s.setTransform(1,0,0,1,-e,-i),this.draw(s);var r=this._testHit(s);return s.setTransform(1,0,0,1,0,0),s.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,s){this._bounds=null!=t?(this._bounds||new mt.Rectangle).setValues(t,e,i,s):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(s){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 s=t.x,r=t.y,n=t.width,a=t.height,o=this._props.matrix;o=i?o.identity():this.getMatrix(o),(s||r)&&o.appendTransform(0,0,1,1,0,0,0,-s,-r),e&&o.prependMatrix(e);var h=n*o.a,l=n*o.b,c=a*o.c,u=a*o.d,d=o.tx,f=o.ty,_=d,p=d,g=f,m=f;return(s=h+d)<_?_=s:s>p&&(p=s),(s=h+c+d)<_?_=s:s>p&&(p=s),(s=c+d)<_?_=s:s>p&&(p=s),(r=l+f)<g?g=r:r>m&&(m=r),(r=l+u+f)<g?g=r:r>m&&(m=r),(r=u+f)<g?g=r:r>m&&(m=r),t.setValues(_,g,p-_,m-g)},e._hasMouseEventListener=function(){for(var e=t._MOUSE_EVENTS,i=0,s=e.length;i<s;i++)if(this.hasEventListener(e[i]))return!0;return!!this.cursor},mt.DisplayObject=mt.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var e=mt.extend(t,mt.DisplayObject);e._getNumChildren=function(){return this.children.length},e.getNumChildren=mt.deprecate(e._getNumChildren,"Container.getNumChildren");try{Object.defineProperties(e,{numChildren:{get:e._getNumChildren}})}catch(i){}e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;for(var i=this.children.slice(),s=0,r=i.length;s<r;s++){var n=i[s];n.isVisible()&&(t.save(),n.updateContext(t),n.draw(t),t.restore())}return!0},e.addChild=function(t){if(null==t)return t;var e=arguments.length;if(e>1){for(var i=0;i<e;i++)this.addChild(arguments[i]);return arguments[e-1]}var s=t.parent,r=s===this;return s&&s._removeChildAt(mt.indexOf(s.children,t),r),t.parent=this,this.children.push(t),r||t.dispatchEvent("added"),t},e.addChildAt=function(t,e){var i=arguments.length,s=arguments[i-1];if(s<0||s>this.children.length)return arguments[i-2];if(i>2){for(var r=0;r<i-1;r++)this.addChildAt(arguments[r],s+r);return arguments[i-2]}var n=t.parent,a=n===this;return n&&n._removeChildAt(mt.indexOf(n.children,t),a),t.parent=this,this.children.splice(e,0,t),a||t.dispatchEvent("added"),t},e.removeChild=function(t){var e=arguments.length;if(e>1){for(var i=!0,s=0;s<e;s++)i=i&&this.removeChild(arguments[s]);return i}return this._removeChildAt(mt.indexOf(this.children,t))},e.removeChildAt=function(t){var e=arguments.length;if(e>1){for(var i=[],s=0;s<e;s++)i[s]=arguments[s];i.sort(function(t,e){return e-t});var r=!0;for(s=0;s<e;s++)r=r&&this._removeChildAt(i[s]);return r}return this._removeChildAt(t)},e.removeAllChildren=function(){var t=this.children;while(t.length)this._removeChildAt(0)},e.getChildAt=function(t){return this.children[t]},e.getChildByName=function(t){for(var e=this.children,i=0,s=e.length;i<s;i++)if(e[i].name==t)return e[i];return null},e.sortChildren=function(t){this.children.sort(t)},e.getChildIndex=function(t){return mt.indexOf(this.children,t)},e.swapChildrenAt=function(t,e){var i=this.children,s=i[t],r=i[e];s&&r&&(i[t]=r,i[e]=s)},e.swapChildren=function(t,e){for(var i,s,r=this.children,n=0,a=r.length;n<a;n++)if(r[n]==t&&(i=n),r[n]==e&&(s=n),null!=i&&null!=s)break;n!=a&&(r[i]=e,r[s]=t)},e.setChildIndex=function(t,e){var i=this.children,s=i.length;if(!(t.parent!=this||e<0||e>=s)){for(var r=0;r<s;r++)if(i[r]==t)break;r!=s&&r!=e&&(i.splice(r,1),i.splice(e,0,t))}},e.contains=function(t){while(t){if(t==this)return!0;t=t.parent}return!1},e.hitTest=function(t,e){return null!=this.getObjectUnderPoint(t,e)},e.getObjectsUnderPoint=function(t,e,i){var s=[],r=this.localToGlobal(t,e);return this._getObjectsUnderPoint(r.x,r.y,s,i>0,1==i),s},e.getObjectUnderPoint=function(t,e,i){var s=this.localToGlobal(t,e);return this._getObjectsUnderPoint(s.x,s.y,null,i>0,1==i)},e.getBounds=function(){return this._getBounds(null,!0)},e.getTransformedBounds=function(){return this._getBounds()},e.clone=function(e){var i=this._cloneProps(new t);return e&&this._cloneChildren(i),i},e.toString=function(){return"[Container (name="+this.name+")]"},e._tick=function(t){if(this.tickChildren)for(var e=this.children.length-1;e>=0;e--){var i=this.children[e];i.tickEnabled&&i._tick&&i._tick(t)}this.DisplayObject__tick(t)},e._cloneChildren=function(t){t.children.length&&t.removeAllChildren();for(var e=t.children,i=0,s=this.children.length;i<s;i++){var r=this.children[i].clone(!0);r.parent=t,e.push(r)}},e._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},e._getObjectsUnderPoint=function(e,i,s,r,n,a){if(a=a||0,!a&&!this._testMask(this,e,i))return null;var o,h=mt.DisplayObject._hitTestContext;n=n||r&&this._hasMouseEventListener();for(var l=this.children,c=l.length,u=c-1;u>=0;u--){var d=l[u],f=d.hitArea;if(d.visible&&(f||d.isVisible())&&(!r||d.mouseEnabled)&&(f||this._testMask(d,e,i)))if(!f&&d instanceof t){var _=d._getObjectsUnderPoint(e,i,s,r,n,a+1);if(!s&&_)return r&&!this.mouseChildren?this:_}else{if(r&&!n&&!d._hasMouseEventListener())continue;var p=d.getConcatenatedDisplayProps(d._props);if(o=p.matrix,f&&(o.appendMatrix(f.getMatrix(f._props.matrix)),p.alpha=f.alpha),h.globalAlpha=p.alpha,h.setTransform(o.a,o.b,o.c,o.d,o.tx-e,o.ty-i),(f||d).draw(h),!this._testHit(h))continue;if(h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,2,2),!s)return r&&!this.mouseChildren?this:d;s.push(d)}}return null},e._testMask=function(t,e,i){var s=t.mask;if(!s||!s.graphics||s.graphics.isEmpty())return!0;var r=this._props.matrix,n=t.parent;r=n?n.getConcatenatedMatrix(r):r.identity(),r=s.getMatrix(s._props.matrix).prependMatrix(r);var a=mt.DisplayObject._hitTestContext;return a.setTransform(r.a,r.b,r.c,r.d,r.tx-e,r.ty-i),s.graphics.drawAsPath(a),a.fillStyle="#000",a.fill(),!!this._testHit(a)&&(a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,2,2),!0)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();if(i)return this._transformBounds(i,t,e);var s=this._props.matrix;s=e?s.identity():this.getMatrix(s),t&&s.prependMatrix(t);for(var r=this.children.length,n=null,a=0;a<r;a++){var o=this.children[a];o.visible&&(i=o._getBounds(s))&&(n?n.extend(i.x,i.y,i.width,i.height):n=i.clone())}return n},mt.Container=mt.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof t?document.getElementById(t):t,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var e=mt.extend(t,mt.Container);e._get_nextStage=function(){return this._nextStage},e._set_nextStage=function(t){this._nextStage&&(this._nextStage._prevStage=null),t&&(t._prevStage=this),this._nextStage=t};try{Object.defineProperties(e,{nextStage:{get:e._get_nextStage,set:e._set_nextStage}})}catch(i){}e.update=function(t){if(this.canvas&&(this.tickOnUpdate&&this.tick(t),!1!==this.dispatchEvent("drawstart",!1,!0))){mt.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var e=this.drawRect,i=this.canvas.getContext("2d");i.setTransform(1,0,0,1,0,0),this.autoClear&&(e?i.clearRect(e.x,e.y,e.width,e.height):i.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),i.save(),this.drawRect&&(i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()),this.updateContext(i),this.draw(i,!1),i.restore(),this.dispatchEvent("drawend")}},e.tick=function(t){if(this.tickEnabled&&!1!==this.dispatchEvent("tickstart",!1,!0)){var e=new mt.Event("tick");if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);this._tick(e),this.dispatchEvent("tickend")}},e.handleEvent=function(t){"tick"==t.type&&this.update(t)},e.clear=function(){if(this.canvas){var t=this.canvas.getContext("2d");t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},e.toDataURL=function(t,e){var i,s=this.canvas.getContext("2d"),r=this.canvas.width,n=this.canvas.height;if(t){i=s.getImageData(0,0,r,n);var a=s.globalCompositeOperation;s.globalCompositeOperation="destination-over",s.fillStyle=t,s.fillRect(0,0,r,n)}var o=this.canvas.toDataURL(e||"image/png");return t&&(s.putImageData(i,0,0),s.globalCompositeOperation=a),o},e.enableMouseOver=function(t){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==t&&this._testMouseOver(!0)),null==t)t=20;else if(t<=0)return;var e=this;this._mouseOverIntervalID=setInterval(function(){e._testMouseOver()},1e3/Math.min(50,t))},e.enableDOMEvents=function(t){null==t&&(t=!0);var e,i,s=this._eventListeners;if(!t&&s){for(e in s)i=s[e],i.t.removeEventListener(e,i.f,!1);this._eventListeners=null}else if(t&&!s&&this.canvas){var r=window.addEventListener?window:document,n=this;for(e in s=this._eventListeners={},s["mouseup"]={t:r,f:function(t){n._handleMouseUp(t)}},s["mousemove"]={t:r,f:function(t){n._handleMouseMove(t)}},s["dblclick"]={t:this.canvas,f:function(t){n._handleDoubleClick(t)}},s["mousedown"]={t:this.canvas,f:function(t){n._handleMouseDown(t)}},s)i=s[e],i.t.addEventListener(e,i.f,!1)}},e.clone=function(){throw"Stage cannot be cloned."},e.toString=function(){return"[Stage (name="+this.name+")]"},e._getElementRect=function(t){var e;try{e=t.getBoundingClientRect()}catch(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),s=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),r=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,n=parseInt(r.paddingLeft)+parseInt(r.borderLeftWidth),a=parseInt(r.paddingTop)+parseInt(r.borderTopWidth),o=parseInt(r.paddingRight)+parseInt(r.borderRightWidth),h=parseInt(r.paddingBottom)+parseInt(r.borderBottomWidth);return{left:e.left+i+n,right:e.right+i-o,top:e.top+s+a,bottom:e.bottom+s-h}},e._getPointerData=function(t){var e=this._pointerData[t];return e||(e=this._pointerData[t]={x:0,y:0}),e},e._handleMouseMove=function(t){t||(t=window.event),this._handlePointerMove(-1,t,t.pageX,t.pageY)},e._handlePointerMove=function(t,e,i,s,r){if((!this._prevStage||void 0!==r)&&this.canvas){var n=this._nextStage,a=this._getPointerData(t),o=a.inBounds;this._updatePointerPosition(t,e,i,s),(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)),n&&n._handlePointerMove(t,e,i,s,null)}},e._updatePointerPosition=function(t,e,i,s){var r=this._getElementRect(this.canvas);i-=r.left,s-=r.top;var n=this.canvas.width,a=this.canvas.height;i/=(r.right-r.left)/n,s/=(r.bottom-r.top)/a;var o=this._getPointerData(t);(o.inBounds=i>=0&&s>=0&&i<=n-1&&s<=a-1)?(o.x=i,o.y=s):this.mouseMoveOutside&&(o.x=i<0?0:i>n-1?n-1:i,o.y=s<0?0:s>a-1?a-1:s),o.posEvtObj=e,o.rawX=i,o.rawY=s,t!==this._primaryPointerID&&-1!==t||(this.mouseX=o.x,this.mouseY=o.y,this.mouseInBounds=o.inBounds)},e._handleMouseUp=function(t){this._handlePointerUp(-1,t,!1)},e._handlePointerUp=function(t,e,i,s){var r=this._nextStage,n=this._getPointerData(t);if(!this._prevStage||void 0!==s){var a=null,o=n.target;s||!o&&!r||(a=this._getObjectsUnderPoint(n.x,n.y,null,!0)),n.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,t,n,e,a),n.down=!1),a==o&&this._dispatchMouseEvent(o,"click",!0,t,n,e),this._dispatchMouseEvent(o,"pressup",!0,t,n,e),i?(t==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[t]):n.target=null,r&&r._handlePointerUp(t,e,i,s||a&&this)}},e._handleMouseDown=function(t){this._handlePointerDown(-1,t,t.pageX,t.pageY)},e._handlePointerDown=function(t,e,i,s,r){this.preventSelection&&e.preventDefault(),null!=this._primaryPointerID&&-1!==t||(this._primaryPointerID=t),null!=s&&this._updatePointerPosition(t,e,i,s);var n=null,a=this._nextStage,o=this._getPointerData(t);r||(n=o.target=this._getObjectsUnderPoint(o.x,o.y,null,!0)),o.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,t,o,e,n),o.down=!0),this._dispatchMouseEvent(n,"mousedown",!0,t,o,e),a&&a._handlePointerDown(t,e,i,s,r||n&&this)},e._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var s=this._nextStage;if(this._mouseOverIntervalID){var r=this._getPointerData(-1);if(r&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var n,a,o,h=r.posEvtObj,l=i||h&&h.target==this.canvas,c=null,u=-1,d="";!e&&(t||this.mouseInBounds&&l)&&(c=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var f=this._mouseOverTarget||[],_=f[f.length-1],p=this._mouseOverTarget=[];n=c;while(n)p.unshift(n),d||(d=n.cursor),n=n.parent;for(this.canvas.style.cursor=d,!e&&i&&(i.canvas.style.cursor=d),a=0,o=p.length;a<o;a++){if(p[a]!=f[a])break;u=a}for(_!=c&&this._dispatchMouseEvent(_,"mouseout",!0,-1,r,h,c),a=f.length-1;a>u;a--)this._dispatchMouseEvent(f[a],"rollout",!1,-1,r,h,c);for(a=p.length-1;a>u;a--)this._dispatchMouseEvent(p[a],"rollover",!1,-1,r,h,_);_!=c&&this._dispatchMouseEvent(c,"mouseover",!0,-1,r,h,_),s&&s._testMouseOver(t,e||c&&this,i||l&&this)}}else s&&s._testMouseOver(t,e,i)}},e._handleDoubleClick=function(t,e){var i=null,s=this._nextStage,r=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(r.x,r.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,r,t)),s&&s._handleDoubleClick(t,e||i&&this)},e._dispatchMouseEvent=function(t,e,i,s,r,n,a){if(t&&(i||t.hasEventListener(e))){var o=new mt.MouseEvent(e,i,!1,r.x,r.y,n,s,s===this._primaryPointerID||-1===s,r.rawX,r.rawY,a);t.dispatchEvent(o)}},mt.Stage=mt.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e,i){if(this.Stage_constructor(e),void 0!==i){if("object"!==Object(_t["a"])(i))throw"Invalid options object";var s=i.premultiply,r=i.transparent,n=i.antialias,a=i.preserveBuffer,o=i.autoPurge}this.vocalDebug=!1,this._preserveBuffer=a||!1,this._antialias=n||!1,this._transparent=r||!1,this._premultiply=s||!1,this._autoPurge=void 0,this.autoPurge=o,this._viewportWidth=0,this._viewportHeight=0,this._projectionMatrix=null,this._webGLContext=null,this._clearColor={r:.5,g:.5,b:.5,a:0},this._maxCardsPerBatch=t.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 mt.Container,this._initializeWebGL()}var e=mt.extend(t,mt.Stage);t.buildUVRects=function(t,e,i){if(!t||!t._frames)return null;void 0===e&&(e=-1),void 0===i&&(i=!1);for(var s=-1!=e&&i?e:0,r=-1!=e&&i?e+1:t._frames.length,n=s;n<r;n++){var a=t._frames[n];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}},t.isWebGLActive=function(t){return t&&t instanceof WebGLRenderingContext&&"undefined"!==typeof WebGLRenderingContext},t.VERTEX_PROPERTY_COUNT=6,t.INDICIES_PER_CARD=6,t.DEFAULT_MAX_BATCH_SIZE=1e4,t.WEBGL_MAX_INDEX_NUM=Math.pow(2,16),t.UV_RECT={t:0,l:0,b:1,r:1};try{t.COVER_VERT=new Float32Array([-1,1,1,1,-1,-1,1,1,1,-1,-1,-1]),t.COVER_UV=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]),t.COVER_UV_FLIP=new Float32Array([0,1,1,1,0,0,1,1,1,0,0,0])}catch(i){}t.REGULAR_VARYING_HEADER="precision mediump float;varying vec2 vTextureCoord;varying lowp float indexPicker;varying lowp float alphaValue;",t.REGULAR_VERTEX_HEADER=t.REGULAR_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;attribute lowp float textureIndex;attribute lowp float objectAlpha;uniform mat4 pMatrix;",t.REGULAR_FRAGMENT_HEADER=t.REGULAR_VARYING_HEADER+"uniform sampler2D uSampler[{{count}}];",t.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;}",t.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}}}",t.REGULAR_FRAG_COLOR_NORMAL="gl_FragColor = vec4(color.rgb, color.a * alphaValue);",t.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);}",t.PARTICLE_VERTEX_BODY=t.REGULAR_VERTEX_BODY,t.PARTICLE_FRAGMENT_BODY=t.REGULAR_FRAGMENT_BODY,t.COVER_VARYING_HEADER="precision mediump float;varying highp vec2 vRenderCoord;varying highp vec2 vTextureCoord;",t.COVER_VERTEX_HEADER=t.COVER_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;uniform float uUpright;",t.COVER_FRAGMENT_HEADER=t.COVER_VARYING_HEADER+"uniform sampler2D uSampler;",t.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));}",t.COVER_FRAGMENT_BODY="void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = color;}",e._get_isWebGL=function(){return!!this._webGLContext},e._set_autoPurge=function(t){t=isNaN(t)?1200:t,-1!=t&&(t=t<10?10:t),this._autoPurge=t},e._get_autoPurge=function(){return Number(this._autoPurge)};try{Object.defineProperties(e,{isWebGL:{get:e._get_isWebGL},autoPurge:{get:e._get_autoPurge,set:e._set_autoPurge}})}catch(i){}e._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},e.update=function(t){if(this.canvas){if(this.tickOnUpdate&&this.tick(t),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 e=this.canvas.getContext("2d");e.save(),this.updateContext(e),this.draw(e,!1),e.restore()}this.dispatchEvent("drawend")}},e.clear=function(){if(this.canvas)if(t.isWebGLActive(this._webGLContext)){var e=this._webGLContext,i=this._clearColor,s=this._transparent?i.a:1;this._webGLContext.clearColor(i.r*s,i.g*s,i.b*s,s),e.clear(e.COLOR_BUFFER_BIT),this._webGLContext.clearColor(i.r,i.g,i.b,i.a)}else this.Stage_clear()},e.draw=function(e,i){if(e===this._webGLContext&&t.isWebGLActive(this._webGLContext)){var s=this._webGLContext;return this._batchDraw(this,s,i),!0}return this.Stage_draw(e,i)},e.cacheDraw=function(e,i,s){if(t.isWebGLActive(this._webGLContext)){var r=this._webGLContext;return this._cacheDraw(r,e,i,s),!0}return!1},e.protectTextureSlot=function(t,e){if(t>this._maxTextureSlots||t<0)throw"Slot outside of acceptable range";this._slotBlacklist[t]=!!e},e.getTargetRenderTexture=function(t,e,i){var s,r=!1,n=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(n)),s=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(n)),s=t.__rtA),!s)throw"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances";return t.__lastRT=s,s},e.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 s=void 0;if(void 0!==t._storeID){if(t===this._textureDictionary[t._storeID])return this._killTextureObject(t),void(t._storeID=void 0);s=t}else if(2===t._webGLRenderStyle)s=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!==s?(this._killTextureObject(this._textureDictionary[s._storeID]),s._storeID=void 0):this.vocalDebug&&console.log("No associated texture found on release")}},e.purgeTextures=function(t){void 0==t&&(t=100);for(var e=this._textureDictionary,i=e.length,s=0;s<i;s++){var r=e[s];r&&(r._drawID+t<=this._drawID&&this._killTextureObject(r))}},e.updateSimultaneousTextureCount=function(t){var e=this._webGLContext,s=!1;(t<1||isNaN(t))&&(t=1),this._batchTextureCount=t;while(!s)try{this._activeShader=this._fetchShaderProgram(e),s=!0}catch(i){if(1==this._batchTextureCount)throw"Cannot compile shader "+i;this._batchTextureCount-=4,this._batchTextureCount<1&&(this._batchTextureCount=1),this.vocalDebug&&console.log("Reducing desired texture count due to errors: "+this._batchTextureCount)}},e.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)},e.getFilterShader=function(t){t||(t=this);var e=this._webGLContext,s=this._activeShader;if(t._builtShader)s=t._builtShader,t.shaderParamSetup&&(e.useProgram(s),t.shaderParamSetup(e,this,s));else try{s=this._fetchShaderProgram(e,"filter",t.VTX_SHADER_BODY,t.FRAG_SHADER_BODY,t.shaderParamSetup&&t.shaderParamSetup.bind(t)),t._builtShader=s,s._name=t.toString()}catch(i){console&&console.log("SHADER SWITCH FAILURE",i)}return s},e.getBaseTexture=function(t,e){var i=Math.ceil(t>0?t:1)||1,s=Math.ceil(e>0?e:1)||1,r=this._webGLContext,n=r.createTexture();return this.resizeTexture(n,i,s),this.setTextureParams(r,!1),n},e.resizeTexture=function(t,e,i){var s=this._webGLContext;s.bindTexture(s.TEXTURE_2D,t),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,e,i,0,s.RGBA,s.UNSIGNED_BYTE,null),t.width=e,t.height=i},e.getRenderBufferTexture=function(t,e){var i=this._webGLContext,s=this.getBaseTexture(t,e);if(!s)return null;var r=i.createFramebuffer();return r?(s.width=t,s.height=e,i.bindFramebuffer(i.FRAMEBUFFER,r),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,s,0),r._renderTexture=s,s._frameBuffer=r,s._storeID=this._textureDictionary.length,this._textureDictionary[s._storeID]=s,i.bindFramebuffer(i.FRAMEBUFFER,null),s):null},e.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)},e.setClearColor=function(t){var e,i,s,r,n;"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,s=Number("0x"+t.slice(5,7))/255,r=Number("0x"+t.slice(7,9))/255):0==t.indexOf("rgba(")&&(n=t.slice(5,-1).split(","),e=Number(n[0])/255,i=Number(n[1])/255,s=Number(n[2])/255,r=Number(n[3])):(e=((4278190080&t)>>>24)/255,i=((16711680&t)>>>16)/255,s=((65280&t)>>>8)/255,r=(255&t)/255),this._clearColor.r=e||0,this._clearColor.g=i||0,this._clearColor.b=s||0,this._clearColor.a=r||0,this._webGLContext&&this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a)},e.toString=function(){return"[StageGL (name="+this.name+")]"},e._fetchWebGLContext=function(t,e){var s;try{s=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch(i){}if(s)s.viewportWidth=t.width,s.viewportHeight=t.height;else{var r="Could not initialize WebGL";console.error?console.error(r):console.log(r)}return s},e._fetchShaderProgram=function(e,i,s,r,n){var a,o;switch(e.useProgram(null),i){case"filter":o=t.COVER_VERTEX_HEADER+(s||t.COVER_VERTEX_BODY),a=t.COVER_FRAGMENT_HEADER+(r||t.COVER_FRAGMENT_BODY);break;case"particle":o=t.REGULAR_VERTEX_HEADER+t.PARTICLE_VERTEX_BODY,a=t.REGULAR_FRAGMENT_HEADER+t.PARTICLE_FRAGMENT_BODY;break;case"override":o=t.REGULAR_VERTEX_HEADER+(s||t.REGULAR_VERTEX_BODY),a=t.REGULAR_FRAGMENT_HEADER+(r||t.REGULAR_FRAGMENT_BODY);break;case"regular":default:o=t.REGULAR_VERTEX_HEADER+t.REGULAR_VERTEX_BODY,a=t.REGULAR_FRAGMENT_HEADER+t.REGULAR_FRAGMENT_BODY;break}var h=this._createShader(e,e.VERTEX_SHADER,o),l=this._createShader(e,e.FRAGMENT_SHADER,a),c=e.createProgram();if(e.attachShader(c,h),e.attachShader(c,l),e.linkProgram(c),c._type=i,!e.getProgramParameter(c,e.LINK_STATUS))throw e.useProgram(this._activeShader),e.getProgramInfoLog(c);switch(e.useProgram(c),i){case"filter":c.vertexPositionAttribute=e.getAttribLocation(c,"vertexPosition"),e.enableVertexAttribArray(c.vertexPositionAttribute),c.uvPositionAttribute=e.getAttribLocation(c,"uvPosition"),e.enableVertexAttribArray(c.uvPositionAttribute),c.samplerUniform=e.getUniformLocation(c,"uSampler"),e.uniform1i(c.samplerUniform,0),c.uprightUniform=e.getUniformLocation(c,"uUpright"),e.uniform1f(c.uprightUniform,0),n&&n(e,this,c);break;case"override":case"particle":case"regular":default:c.vertexPositionAttribute=e.getAttribLocation(c,"vertexPosition"),e.enableVertexAttribArray(c.vertexPositionAttribute),c.uvPositionAttribute=e.getAttribLocation(c,"uvPosition"),e.enableVertexAttribArray(c.uvPositionAttribute),c.textureIndexAttribute=e.getAttribLocation(c,"textureIndex"),e.enableVertexAttribArray(c.textureIndexAttribute),c.alphaAttribute=e.getAttribLocation(c,"objectAlpha"),e.enableVertexAttribArray(c.alphaAttribute);for(var u=[],d=0;d<this._batchTextureCount;d++)u[d]=d;c.samplerData=u,c.samplerUniform=e.getUniformLocation(c,"uSampler"),e.uniform1iv(c.samplerUniform,u),c.pMatrixUniform=e.getUniformLocation(c,"pMatrix");break}return e.useProgram(this._activeShader),c},e._createShader=function(e,i,s){s=s.replace(/{{count}}/g,this._batchTextureCount);for(var r="",n=1;n<this._batchTextureCount;n++)r+="} else if (indexPicker <= "+n+".5) { color = texture2D(uSampler["+n+"], vTextureCoord);";s=s.replace(/{{alternates}}/g,r),s=s.replace(/{{fragColor}}/g,this._premultiply?t.REGULAR_FRAG_COLOR_PREMULTIPLY:t.REGULAR_FRAG_COLOR_NORMAL);var a=e.createShader(i);if(e.shaderSource(a,s),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS))throw e.getShaderInfoLog(a);return a},e._createBuffers=function(e){var i,s,r,n=this._maxCardsPerBatch*t.INDICIES_PER_CARD,a=this._vertexPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),i=2;var o=this._vertices=new Float32Array(n*i);for(s=0,r=o.length;s<r;s+=i)o[s]=o[s+1]=0;e.bufferData(e.ARRAY_BUFFER,o,e.DYNAMIC_DRAW),a.itemSize=i,a.numItems=n;var h=this._uvPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,h),i=2;var l=this._uvs=new Float32Array(n*i);for(s=0,r=l.length;s<r;s+=i)l[s]=l[s+1]=0;e.bufferData(e.ARRAY_BUFFER,l,e.DYNAMIC_DRAW),h.itemSize=i,h.numItems=n;var c=this._textureIndexBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,c),i=1;var u=this._indices=new Float32Array(n*i);for(s=0,r=u.length;s<r;s++)u[s]=0;e.bufferData(e.ARRAY_BUFFER,u,e.DYNAMIC_DRAW),c.itemSize=i,c.numItems=n;var d=this._alphaBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),i=1;var f=this._alphas=new Float32Array(n*i);for(s=0,r=f.length;s<r;s++)f[s]=1;e.bufferData(e.ARRAY_BUFFER,f,e.DYNAMIC_DRAW),d.itemSize=i,d.numItems=n},e._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"}},e._loadTextureImage=function(t,e){var i=e.src;i||(e._isCanvas=!0,i=e.src="canvas_"+this._lastTrackedCanvas++);var s=this._textureIDs[i];void 0===s&&(s=this._textureIDs[i]=this._textureDictionary.length),void 0===this._textureDictionary[s]&&(this._textureDictionary[s]=this.getBaseTexture());var r=this._textureDictionary[s];if(r)r._batchID=this._batchID,r._storeID=s,r._imageData=e,this._insertTextureInBatch(t,r),e._storeID=s,e.complete||e.naturalWidth||e._isCanvas?this._updateTextureImageData(t,e):e.addEventListener("load",this._updateTextureImageData.bind(this,t,e));else{var n="Problem creating desired texture, known causes include using too much VRAM by not releasing WebGL texture instances";console.error&&console.error(n)||console.log(n),r=this._baseTextures[0],r._batchID=this._batchID,r._storeID=-1,r._imageData=r,this._insertTextureInBatch(t,r)}return r},e._updateTextureImageData=function(t,e){var s=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=!s,this.setTextureParams(t,r.isPOT);try{t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}catch(i){var n="\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(n),console.error(i)):console&&(console.log(n),console.log(i))}e._invalid=!1,r._w=e.width,r._h=e.height,this.vocalDebug&&(s&&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"))},e._insertTextureInBatch=function(t,e){if(this._batchTextures[e._activeIndex]!==e){var i=-1,s=(this._lastTextureInsert+1)%this._batchTextureCount,r=s;do{if(this._batchTextures[r]._batchID!=this._batchID&&!this._slotBlacklist[r]){i=r;break}r=(r+1)%this._batchTextureCount}while(r!==s);-1===i&&(this.batchReason="textureOverflow",this._drawBuffers(t),this.batchCardCount=0,i=s),this._batchTextures[i]=e,e._activeIndex=i;var n=e._imageData;n&&n._invalid&&void 0!==e._drawID?this._updateTextureImageData(t,n):(t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e),this.setTextureParams(t)),this._lastTextureInsert=i}else{n=e._imageData;void 0!=e._storeID&&n&&n._invalid&&this._updateTextureImageData(t,n)}e._drawID=this._drawID,e._batchID=this._batchID},e._killTextureObject=function(t){if(t){var e=this._webGLContext;if(void 0!==t._storeID&&t._storeID>=0){for(var s in this._textureDictionary[t._storeID]=void 0,this._textureIDs)this._textureIDs[s]==t._storeID&&delete this._textureIDs[s];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(i){this.vocalDebug&&console.log(i)}try{e.deleteTexture(t)}catch(i){this.vocalDebug&&console.log(i)}}},e._backupBatchTextures=function(t,e){var i=this._webGLContext;this._backupTextures||(this._backupTextures=[]),void 0===e&&(e=this._backupTextures);for(var s=0;s<this._batchTextureCount;s++)i.activeTexture(i.TEXTURE0+s),t?this._batchTextures[s]=e[s]:(e[s]=this._batchTextures[s],this._batchTextures[s]=this._baseTextures[s]),i.bindTexture(i.TEXTURE_2D,this._batchTextures[s]),this.setTextureParams(i,this._batchTextures[s].isPOT);t&&e===this._backupTextures&&(this._backupTextures=[])},e._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 mt.Matrix2D,this.alpha,i),this.batchReason="drawFinish",this._drawBuffers(e),this._isDrawing--},e._cacheDraw=function(t,e,i,s){var r,n=this._activeShader,a=this._slotBlacklist,o=this._maxTextureSlots-1,h=this._viewportWidth,l=this._viewportHeight;this.protectTextureSlot(o,!0);var c=e.getMatrix();c=c.clone(),c.scale(1/s.scale,1/s.scale),c=c.invert(),c.translate(-s.offX/s.scale*e.scaleX,-s.offY/s.scale*e.scaleY);var u=this._cacheContainer;u.children=[e],u.transformMatrix=c,this._backupBatchTextures(!1),i&&i.length?this._drawFilters(e,i,s):this.isCacheControlled?(t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0)):(t.activeTexture(t.TEXTURE0+o),e.cacheCanvas=this.getTargetRenderTexture(e,s._drawWidth,s._drawHeight),r=e.cacheCanvas,t.bindFramebuffer(t.FRAMEBUFFER,r._frameBuffer),this.updateViewport(s._drawWidth,s._drawHeight),this._projectionMatrix=this._projectionMatrixFlip,t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0),t.bindFramebuffer(t.FRAMEBUFFER,null),this.updateViewport(h,l)),this._backupBatchTextures(!0),this.protectTextureSlot(o,!1),this._activeShader=n,this._slotBlacklist=a},e._drawFilters=function(t,e,i){var s,r=this._webGLContext,n=this._maxTextureSlots-1,a=this._viewportWidth,o=this._viewportHeight,h=this._cacheContainer,l=e.length;r.activeTexture(r.TEXTURE0+n),s=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,s._frameBuffer),this.updateViewport(i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._batchDraw(h,r,!0),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,s),this.setTextureParams(r);var c=!1,u=0,d=e[u];do{this._activeShader=this.getFilterShader(d),this._activeShader&&(r.activeTexture(r.TEXTURE0+n),s=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,s._frameBuffer),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,c),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,s),this.setTextureParams(r),(l>1||e[0]._multiPass)&&(c=!c),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,c)):(c&&(r.activeTexture(r.TEXTURE0+n),s=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,s._frameBuffer),this._activeShader=this.getFilterShader(this),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,!c)),r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(a,o),t.cacheCanvas=s)},e._appendToBatchGroup=function(e,i,s,r,n){e._glMtx||(e._glMtx=new mt.Matrix2D);var a,o,h,l,c=e._glMtx;c.copy(s),e.transformMatrix?c.appendMatrix(e.transformMatrix):c.appendTransform(e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.skewX,e.skewY,e.regX,e.regY);for(var u=e.children.length,d=0;d<u;d++){var f=e.children[d];if(f.visible&&r)if(f.cacheCanvas&&!n||(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 mt.Matrix2D);var _,p,g,m,v,b,y=f._glMtx;y.copy(c),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&&!n;if(2===f._webGLRenderStyle||w)g=!n&&f.cacheCanvas||f.image;else{if(1!==f._webGLRenderStyle)continue;if(m=f.spriteSheet.getFrame(f.currentFrame),null===m)continue;g=m.image}var E=this._uvs,x=this._vertices,T=this._indices,S=this._alphas;if(g){if(void 0===g._storeID)v=this._loadTextureImage(i,g),this._insertTextureInBatch(i,v);else{if(v=this._textureDictionary[g._storeID],!v){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}v._batchID!==this._batchID&&this._insertTextureInBatch(i,v)}if(p=v._activeIndex,2===f._webGLRenderStyle||w)!w&&f.sourceRect?(f._uvRect||(f._uvRect={}),b=f.sourceRect,_=f._uvRect,_.t=b.y/g.height,_.l=b.x/g.width,_.b=(b.y+b.height)/g.height,_.r=(b.x+b.width)/g.width,a=0,o=0,h=b.width+a,l=b.height+o):(_=t.UV_RECT,w?(b=f.bitmapCache,a=b.x+b._filterOffX/b.scale,o=b.y+b._filterOffY/b.scale,h=b._drawWidth/b.scale+a,l=b._drawHeight/b.scale+o):(a=0,o=0,h=g.width+a,l=g.height+o));else if(1===f._webGLRenderStyle){var C=m.rect;_=m.uvRect,_||(_=t.buildUVRects(f.spriteSheet,f.currentFrame,!1)),a=-m.regX,o=-m.regY,h=C.width-m.regX,l=C.height-m.regY}var R=this.batchCardCount*t.INDICIES_PER_CARD,L=2*R;x[L]=a*y.a+o*y.c+y.tx,x[L+1]=a*y.b+o*y.d+y.ty,x[L+2]=a*y.a+l*y.c+y.tx,x[L+3]=a*y.b+l*y.d+y.ty,x[L+4]=h*y.a+o*y.c+y.tx,x[L+5]=h*y.b+o*y.d+y.ty,x[L+6]=x[L+2],x[L+7]=x[L+3],x[L+8]=x[L+4],x[L+9]=x[L+5],x[L+10]=h*y.a+l*y.c+y.tx,x[L+11]=h*y.b+l*y.d+y.ty,E[L]=_.l,E[L+1]=_.t,E[L+2]=_.l,E[L+3]=_.b,E[L+4]=_.r,E[L+5]=_.t,E[L+6]=_.l,E[L+7]=_.b,E[L+8]=_.r,E[L+9]=_.t,E[L+10]=_.r,E[L+11]=_.b,T[R]=T[R+1]=T[R+2]=T[R+3]=T[R+4]=T[R+5]=p,S[R]=S[R+1]=S[R+2]=S[R+3]=S[R+4]=S[R+5]=f.alpha*r,this.batchCardCount++}}else this._appendToBatchGroup(f,i,c,f.alpha*r)}},e._drawBuffers=function(e){if(!(this.batchCardCount<=0)){this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : "+this.batchReason);var i=this._activeShader,s=this._vertexPositionBuffer,r=this._textureIndexBuffer,n=this._uvPositionBuffer,a=this._alphaBuffer;e.useProgram(i),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(i.vertexPositionAttribute,s.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._vertices),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(i.textureIndexAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._indices),e.bindBuffer(e.ARRAY_BUFFER,n),e.vertexAttribPointer(i.uvPositionAttribute,n.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._uvs),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(i.alphaAttribute,a.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._alphas),e.uniformMatrix4fv(i.pMatrixUniform,e.FALSE,this._projectionMatrix);for(var o=0;o<this._batchTextureCount;o++){var h=this._batchTextures[o];e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,h),this.setTextureParams(e,h.isPOT)}e.drawArrays(e.TRIANGLES,0,this.batchCardCount*t.INDICIES_PER_CARD),this._batchID++}},e._drawCover=function(e,i){this._isDrawing>0&&this._drawBuffers(e),this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : Cover");var s=this._activeShader,r=this._vertexPositionBuffer,n=this._uvPositionBuffer;e.clear(e.COLOR_BUFFER_BIT),e.useProgram(s),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(s.vertexPositionAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,t.COVER_VERT),e.bindBuffer(e.ARRAY_BUFFER,n),e.vertexAttribPointer(s.uvPositionAttribute,n.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,i?t.COVER_UV_FLIP:t.COVER_UV),e.uniform1i(s.samplerUniform,0),e.uniform1f(s.uprightUniform,i?0:1),e.drawArrays(e.TRIANGLES,0,t.INDICIES_PER_CARD)},mt.StageGL=mt.promote(t,"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=mt.DisplayObject._StageGL_BITMAP}var e=mt.extend(t,mt.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,s=this.sourceRect;if(i.getImage&&(i=i.getImage()),!i)return!0;if(s){var r=s.x,n=s.y,a=r+s.width,o=n+s.height,h=0,l=0,c=i.width,u=i.height;r<0&&(h-=r,r=0),a>c&&(a=c),n<0&&(l-=n,n=0),o>u&&(o=u),t.drawImage(i,r,n,a-r,o-n,h,l,a-r,o-n)}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,s=e&&(e.naturalWidth||e.getContext||e.readyState>=2);return s?this._rectangle.setValues(0,0,i.width,i.height):null},e.clone=function(e){var i=this.image;i&&e&&(i=i.cloneNode());var s=new t(i);return this.sourceRect&&(s.sourceRect=this.sourceRect.clone()),this._cloneProps(s),s},e.toString=function(){return"[Bitmap (name="+this.name+")]"},mt.Bitmap=mt.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=mt.DisplayObject._StageGL_SPRITE,null!=e&&this.gotoAndPlay(e)}var e=mt.extend(t,mt.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 s=i.rect;return s.width&&s.height&&t.drawImage(i.image,s.x,s.y,s.width,s.height,-i.regX,-i.regY,s.width,s.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,s=this.paused,r=this._currentFrame;if(i){var n=i.speed||1,a=this.currentAnimationFrame;if(e=i.frames.length,a+t*n>=e){var o=i.next;if(this._dispatchAnimationEnd(i,r,s,o,e-1))return;if(o)return this._goto(o,t-(e-a)/n);this.paused=!0,a=i.frames.length-1}else a+=t*n;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,s,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,s,r){var n=t?t.name:null;if(this.hasEventListener("animationend")){var a=new mt.Event("animationend");a.name=n,a.next=s,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()},mt.Sprite=mt.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),this.graphics=t||new mt.Graphics}var e=mt.extend(t,mt.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+")]"},mt.Shape=mt.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=mt.extend(t,mt.DisplayObject),i=mt.createCanvas?mt.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,{}),s=this.maxWidth&&this.maxWidth<i.width?this.maxWidth:i.width,r=s*t.H_OFFSETS[this.textAlign||"left"],n=this.lineHeight||this.getMeasuredLineHeight(),a=n*t.V_OFFSETS[this.textBaseline||"top"];return this._rectangle.setValues(r,a,s,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,s){var r=!!e;r||(e=t._workingContext,e.save(),this._prepContext(e));for(var n=this.lineHeight||this.getMeasuredLineHeight(),a=0,o=0,h=String(this.text).split(/(?:\r\n|\r|\n)/),l=0,c=h.length;l<c;l++){var u=h[l],d=null;if(null!=this.lineWidth&&(d=e.measureText(u).width)>this.lineWidth){var f=u.split(/(\s)/);u=f[0],d=e.measureText(u).width;for(var _=1,p=f.length;_<p;_+=2){var g=e.measureText(f[_]+f[_+1]).width;d+g>this.lineWidth?(r&&this._drawTextLine(e,u,o*n),s&&s.push(u),d>a&&(a=d),u=f[_+1],d=e.measureText(u).width,o++):(u+=f[_]+f[_+1],d+=g)}}r&&this._drawTextLine(e,u,o*n),s&&s.push(u),i&&null==d&&(d=e.measureText(u).width),d>a&&(a=d),o++}return i&&(i.width=a,i.height=o*n),r||e.restore(),i},e._drawTextLine=function(t,e,i){this.outline?t.strokeText(e,0,i,this.maxWidth||65535):t.fillText(e,0,i,this.maxWidth||65535)},e._getMeasuredWidth=function(e){var i=t._workingContext;i.save();var s=this._prepContext(i).measureText(e).width;return i.restore(),s},mt.Text=mt.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=mt.extend(t,mt.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,s=e.getAnimation(t);return s||(t!=(i=t.toUpperCase())||t!=(i=t.toLowerCase())||(i=null),i&&(s=e.getAnimation(i))),s&&s.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,s=0,r=this._oldProps,n=!1,a=this.spaceWidth,o=this.lineHeight,h=this.spriteSheet,l=t._spritePool,c=this.children,u=0,d=c.length;for(var f in r)r[f]!=this[f]&&(r[f]=this[f],n=!0);if(n){var _=!!this._getFrame(" ",h);_||a||(a=this._getSpaceWidth(h)),o||(o=this._getLineHeight(h));for(var p=0,g=this.text.length;p<g;p++){var m=this.text.charAt(p);if(" "!=m||_)if("\n"!=m&&"\r"!=m){var v=this._getFrameIndex(m,h);null!=v&&(u<d?e=c[u]:(c.push(e=l.length?l.pop():new mt.Sprite),e.parent=this,d++),e.spriteSheet=h,e.gotoAndStop(v),e.x=i,e.y=s,u++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==m&&"\n"==this.text.charAt(p+1)&&p++,i=0,s+=o;else i+=a}while(d>u)l.push(e=c.pop()),e.parent=null,d--;l.length>t.maxPoolSize&&(l.length=t.maxPoolSize)}},mt.BitmapText=mt.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e){var i,s,r,n;this.Container_constructor(),!t.inited&&t.init(),e instanceof String||arguments.length>1?(i=e,s=arguments[1],r=arguments[2],n=arguments[3],null==r&&(r=-1),e=null):e&&(i=e.mode,s=e.startPosition,r=e.loop,n=e.labels),e||(e={labels:n}),this.mode=i||t.INDEPENDENT,this.startPosition=s||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 mt.Timeline(e),this._synchOffset=0,this._rawPosition=-1,this._bound_resolveState=this._resolveState.bind(this),this._t=0,this._managed={}}var e=mt.extend(t,mt.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=mt.deprecate(e._getLabels,"MovieClip.getLabels"),e._getCurrentLabel=function(){return this.timeline.currentLabel},e.getCurrentLabel=mt.deprecate(e._getCurrentLabel,"MovieClip.getCurrentLabel"),e._getDuration=function(){return this.timeline.duration},e.getDuration=mt.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(s){}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 s=this,r=s.framerate;while((s=s.parent)&&null===r)s.mode===i&&(r=s._framerate);if(this._framerate=r,!this.paused){var n=null!==r&&-1!==r&&null!==e?e/(1e3/r)+this._t:1,a=0|n;this._t=n-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 s=this.mode!==t.INDEPENDENT,r=this.timeline;s&&(e=this.startPosition+(this.mode===t.SINGLE_FRAME?0:this._synchOffset)),e<0&&(e=0),(this._rawPosition!==e||s)&&(this._rawPosition=e,r.loop=this.loop,r.setPosition(e,s||!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,s=0,r=i.length;s<r;s++){var n=i[s],a=n.target;if(a!==this&&!n.passive){var o=n._stepPosition;a instanceof mt.DisplayObject?this._addManagedChild(a,o):this._setState(a.state,o)}}var h=this.children;for(s=h.length-1;s>=0;s--){var l=h[s].id;1===this._managed[l]&&(this.removeChildAt(s),delete this._managed[l])}},e._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var s=t[i],r=s.t,n=s.p;for(var a in n)r[a]=n[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)},mt.MovieClip=mt.promote(t,"Container"),i.priority=100,i.ID="MovieClip",i.install=function(){mt.Tween._installPlugin(i)},i.init=function(e,s,r){"startPosition"===s&&e.target instanceof t&&e._addPlugin(i)},i.step=function(t,e,i){},i.change=function(t,e,i,s,r,n){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=mt.createCanvas?mt.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 s=e.getFrame(i);if(!s)return null;var r=s.rect,n=t._workingCanvas;n.width=r.width,n.height=r.height,t._workingContext.drawImage(s.image,r.x,r.y,r.width,r.height,0,0,r.width,r.height);var a=document.createElement("img");return a.src=n.toDataURL("image/png"),a},t.addFlippedFrames=mt.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),t.mergeAlpha=mt.deprecate(null,"SpriteSheetUtils.mergeAlpha"),t._flip=function(e,i,s,r){for(var n=e._images,a=t._workingCanvas,o=t._workingContext,h=n.length/i,l=0;l<h;l++){var c=n[l];c.__tmp=l,o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width+1,a.height+1),a.width=c.width,a.height=c.height,o.setTransform(s?-1:1,0,0,r?-1:1,s?c.width:0,r?c.height:0),o.drawImage(c,0,0);var u=document.createElement("img");u.src=a.toDataURL("image/png"),u.width=c.width||c.naturalWidth,u.height=c.height||c.naturalHeight,n.push(u)}var d=e._frames,f=d.length/i;for(l=0;l<f;l++){c=d[l];var _=c.rect.clone();u=n[c.image.__tmp+h*i];var p={image:u,rect:_,regX:c.regX,regY:c.regY};s&&(_.x=(u.width||u.naturalWidth)-_.x-_.width,p.regX=_.width-c.regX),r&&(_.y=(u.height||u.naturalHeight)-_.y-_.height,p.regY=_.height-c.regY),d.push(p)}var g="_"+(s?"h":"")+(r?"v":""),m=e._animations,v=e._data,b=m.length/i;for(l=0;l<b;l++){var y=m[l];c=v[y];var w={name:y+g,speed:c.speed,next:c.next,frames:[]};c.next&&(w.next+=g),d=c.frames;for(var E=0,x=d.length;E<x;E++)w.frames.push(d[E]+f*i);v[w.name]=w,m.push(w.name)}},mt.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=mt.extend(t,mt.EventDispatcher);t.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",t.ERR_RUNNING="a build is already running",e.addFrame=function(e,i,s,r,n){if(this._data)throw t.ERR_RUNNING;var a=i||e.bounds||e.nominalBounds;return!a&&e.getBounds&&(a=e.getBounds()),a?(s=s||1,this._frames.push({source:e,sourceRect:a,scale:s,funct:r,data:n,index:this._frames.length,height:a.height*s})-1):null},e.addAnimation=function(e,i,s,r){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:s,speed:r}},e.addMovieClip=function(e,i,s,r,n,a){if(this._data)throw t.ERR_RUNNING;var o=e.frameBounds,h=i||e.bounds||e.nominalBounds;if(!h&&e.getBounds&&(h=e.getBounds()),h||o){var l,c,u=this._frames.length,d=e.timeline.duration;for(l=0;l<d;l++){var f=o&&o[l]?o[l]:h;this.addFrame(e,f,s,this._setupMovieClipFrame,{i:l,f:r,d:n})}var _=e.timeline._labels,p=[];for(var g in _)p.push({index:_[g],label:g});if(p.length)for(p.sort(function(t,e){return t.index-e.index}),l=0,c=p.length;l<c;l++){for(var m=p[l].label,v=u+p[l].index,b=u+(l==c-1?d:p[l+1].index),y=[],w=v;w<b;w++)y.push(w);a&&(m=a(m,e,v,b),!m)||this.addAnimation(m,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 s=this._frames.slice();if(s.sort(function(t,e){return t.height<=e.height?-1:1}),s[s.length-1].height+2*e>this.maxHeight)throw t.ERR_DIMENSIONS;var r=0,n=0,a=0;while(s.length){var o=this._fillRow(s,r,a,i,e);if(o.w>n&&(n=o.w),r+=o.h,!o.h||!s.length){var h=mt.createCanvas?mt.createCanvas():document.createElement("canvas");h.width=this._getSize(n,this.maxWidth),h.height=this._getSize(r,this.maxHeight),this._data.images[a]=h,o.h||(n=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,s,r,n){var a=this.maxWidth,o=this.maxHeight;i+=n;for(var h=o-i,l=n,c=0,u=e.length-1;u>=0;u--){var d=e[u],f=this._scale*d.scale,_=d.sourceRect,p=d.source,g=Math.floor(f*_.x-n),m=Math.floor(f*_.y-n),v=Math.ceil(f*_.height+2*n),b=Math.ceil(f*_.width+2*n);if(b>a)throw t.ERR_DIMENSIONS;v>h||l+b>a||(d.img=s,d.rect=new mt.Rectangle(l,i,b,v),c=c||v,e.splice(u,1),r[d.index]=[l,i,b,v,s,Math.round(-g+f*p.regX-n),Math.round(-m+f*p.regY-n)],l+=b)}return{w:l,h:c}},e._endBuild=function(){this.spriteSheet=new mt.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 s=this;this._timerID=setTimeout(function(){s._run()},50-t)}var r=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var n=new mt.Event("progress");n.progress=r,this.dispatchEvent(n)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,s=t.sourceRect,r=this._data.images[t.img],n=r.getContext("2d");return t.funct&&t.funct(t.source,t.data),n.save(),n.beginPath(),n.rect(i.x,i.y,i.width,i.height),n.clip(),n.translate(Math.ceil(i.x-s.x*e),Math.ceil(i.y-s.y*e)),n.scale(e,e),t.source.draw(n),n.restore(),++this._index<this._frames.length},mt.SpriteSheetBuilder=mt.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=mt.extend(t,mt.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,s=this.getConcatenatedDisplayProps(this._props),r=s.matrix,n=s.visible?"visible":"hidden";if(n!=i.visibility&&(i.visibility=n),s.visible){var a=this._oldProps,o=a&&a.matrix,h=1e4;if(!o||!o.equals(r)){var l="matrix("+(r.a*h|0)/h+","+(r.b*h|0)/h+","+(r.c*h|0)/h+","+(r.d*h|0)/h+","+(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 mt.DisplayProps(!0,null)),a.matrix.copy(r)}a.alpha!=s.alpha&&(i.opacity=""+(s.alpha*h|0)/h,a.alpha=s.alpha)}}},mt.DOMElement=mt.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,s,r,n,a,o){n=n||t,null==a&&(a=e),null==o&&(o=i);try{var h=t.getImageData(e,i,s,r)}catch(l){return!1}return!!this._applyFilter(h)&&(n.putImageData(h,a,o),!0)},e.toString=function(){return"[Filter]"},e.clone=function(){return new t},e._applyFilter=function(t){return!0},mt.Filter=t}(),this.createjs=this.createjs||{},function(){function t(){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 e=t.prototype;t.getFilterBounds=function(t,e){e||(e=new mt.Rectangle);var i=t.filters,s=i&&i.length;if(!!s<=0)return e;for(var r=0;r<s;r++){var n=i[r];if(n&&n.getBounds){var a=n.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},e.toString=function(){return"[BitmapCache]"},e.define=function(t,e,i,s,r,n,a){if(!t)throw"No symbol to cache";this._options=a,this.target=t,this.width=s>=1?s:1,this.height=r>=1?r:1,this.x=e||0,this.y=i||0,this.scale=n||1,this.update()},e.update=function(e){if(!this.target)throw"define() must be called before update()";var i=t.getFilterBounds(this.target),s=this.target.cacheCanvas;this._drawWidth=Math.ceil(this.width*this.scale)+i.width,this._drawHeight=Math.ceil(this.height*this.scale)+i.height,s&&this._drawWidth==s.width&&this._drawHeight==s.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(e),this.cacheID=this.cacheID?this.cacheID+1:1},e.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 mt.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},e.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},e.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)},e._updateSurface=function(){if(!this._options||!this._options.useGL){var t=this.target.cacheCanvas;return t||(t=this.target.cacheCanvas=mt.createCanvas?mt.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 mt.StageGL(this.target.cacheCanvas,{antialias:!0,transparent:!0,autoPurge:-1}),this._webGLCache.isCacheControlled=!0;else{if(!(this._options.useGL instanceof mt.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)},e._drawToCache=function(t){var e=this.target.cacheCanvas,i=this.target,s=this._webGLCache;if(s)s.cacheDraw(i,i.filters,this),e=this.target.cacheCanvas,e.width=this._drawWidth,e.height=this._drawHeight;else{var r=e.getContext("2d");t||r.clearRect(0,0,this._drawWidth+1,this._drawHeight+1),r.save(),r.globalCompositeOperation=t,r.setTransform(this.scale,0,0,this.scale,-this._filterOffX,-this._filterOffY),r.translate(-this.x,-this.y),i.draw(r,!0),r.restore(),i.filters&&i.filters.length&&this._applyFilters(r)}e._invalid=!0},e._applyFilters=function(t){var e,i=this.target.filters,s=this._drawWidth,r=this._drawHeight,n=0,a=i[n];do{a.usesContext?(e&&(t.putImageData(e,0,0),e=null),a.applyFilter(t,0,0,s,r)):(e||(e=t.getImageData(0,0,s,r)),a._applyFilter(e)),a=null!==a._multiPass?a._multiPass:i[++n]}while(a);e&&t.putImageData(e,0,0)},mt.BitmapCache=t}(),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=mt.extend(t,mt.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=[],s=Math.ceil(2*t);s+=s%2?0:1;for(var r=s/2|0,n=-r;n<=r;n++){var a=n/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 s=Math.pow(this.quality,.2);return(t||new mt.Rectangle).pad(i*s+1,e*s+1,i*s+1,e*s+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 s=this._blurY>>1;if(isNaN(s)||s<0)return!1;if(0==i&&0==s)return!1;var r=this.quality;(isNaN(r)||r<1)&&(r=1),r|=0,r>3&&(r=3),r<1&&(r=1);var n=e.data,a=0,o=0,h=0,l=0,c=0,u=0,d=0,f=0,_=0,p=0,g=0,m=0,v=0,b=0,y=0,w=i+i+1|0,E=s+s+1|0,x=0|e.width,T=0|e.height,S=x-1|0,C=T-1|0,R=i+1|0,L=s+1|0,A={r:0,b:0,g:0,a:0},I=A;for(h=1;h<w;h++)I=I.n={r:0,b:0,g:0,a:0};I.n=A;var O={r:0,b:0,g:0,a:0},D=O;for(h=1;h<E;h++)D=D.n={r:0,b:0,g:0,a:0};D.n=O;var P=null,M=0|t.MUL_TABLE[i],k=0|t.SHG_TABLE[i],F=0|t.MUL_TABLE[s],j=0|t.SHG_TABLE[s];while(r-- >0){d=u=0;var B=M,N=k;for(o=T;--o>-1;){for(f=R*(m=n[0|u]),_=R*(v=n[u+1|0]),p=R*(b=n[u+2|0]),g=R*(y=n[u+3|0]),I=A,h=R;--h>-1;)I.r=m,I.g=v,I.b=b,I.a=y,I=I.n;for(h=1;h<R;h++)l=u+((S<h?S:h)<<2)|0,f+=I.r=n[l],_+=I.g=n[l+1],p+=I.b=n[l+2],g+=I.a=n[l+3],I=I.n;for(P=A,a=0;a<x;a++)n[u++]=f*B>>>N,n[u++]=_*B>>>N,n[u++]=p*B>>>N,n[u++]=g*B>>>N,l=d+((l=a+i+1)<S?l:S)<<2,f-=P.r-(P.r=n[l]),_-=P.g-(P.g=n[l+1]),p-=P.b-(P.b=n[l+2]),g-=P.a-(P.a=n[l+3]),P=P.n;d+=x}for(B=F,N=j,a=0;a<x;a++){for(u=a<<2|0,f=L*(m=n[u])|0,_=L*(v=n[u+1|0])|0,p=L*(b=n[u+2|0])|0,g=L*(y=n[u+3|0])|0,D=O,h=0;h<L;h++)D.r=m,D.g=v,D.b=b,D.a=y,D=D.n;for(c=x,h=1;h<=s;h++)u=c+a<<2,f+=D.r=n[u],_+=D.g=n[u+1],p+=D.b=n[u+2],g+=D.a=n[u+3],D=D.n,h<C&&(c+=x);if(u=a,P=O,r>0)for(o=0;o<T;o++)l=u<<2,n[l+3]=y=g*B>>>N,y>0?(n[l]=f*B>>>N,n[l+1]=_*B>>>N,n[l+2]=p*B>>>N):n[l]=n[l+1]=n[l+2]=0,l=a+((l=o+L)<C?l:C)*x<<2,f-=P.r-(P.r=n[l]),_-=P.g-(P.g=n[l+1]),p-=P.b-(P.b=n[l+2]),g-=P.a-(P.a=n[l+3]),P=P.n,u+=x;else for(o=0;o<T;o++)l=u<<2,n[l+3]=y=g*B>>>N,y>0?(y=255/y,n[l]=(f*B>>>N)*y,n[l+1]=(_*B>>>N)*y,n[l+2]=(p*B>>>N)*y):n[l]=n[l+1]=n[l+2]=0,l=a+((l=o+L)<C?l:C)*x<<2,f-=P.r-(P.r=n[l]),_-=P.g-(P.g=n[l+1]),p-=P.b-(P.b=n[l+2]),g-=P.a-(P.a=n[l+3]),P=P.n,u+=x}}return!0},mt.BlurFilter=mt.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=mt.extend(t,mt.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,s=0,r=e.length;s<r;s+=4)e[s+3]=i[s]||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=mt.createCanvas?mt.createCanvas():document.createElement("canvas"),i.width=e.width,i.height=e.height,t=i.getContext("2d"),t.drawImage(e,0,0));try{var s=t.getImageData(0,0,e.width,e.height)}catch(r){return!1}return this._mapData=s.data,!0},mt.AlphaMapFilter=mt.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=mt.extend(t,mt.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,s,r,n,a,o){return!this.mask||(n=n||t,null==a&&(a=e),null==o&&(o=i),n.save(),t==n&&(n.globalCompositeOperation="destination-in",n.drawImage(this.mask,a,o),n.restore(),!0))},e.clone=function(){return new t(this.mask)},e.toString=function(){return"[AlphaMaskFilter]"},mt.AlphaMaskFilter=mt.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s,r,n,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!=s?s:1,this.redOffset=r||0,this.greenOffset=n||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=mt.extend(t,mt.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,s=0;s<i;s+=4)e[s]=e[s]*this.redMultiplier+this.redOffset,e[s+1]=e[s+1]*this.greenMultiplier+this.greenOffset,e[s+2]=e[s+2]*this.blueMultiplier+this.blueOffset,e[s+3]=e[s+3]*this.alphaMultiplier+this.alphaOffset;return!0},mt.ColorFilter=mt.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,s){this.setColor(t,e,i,s)}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,s){return this.reset().adjustColor(t,e,i,s)},e.reset=function(){return this.copy(t.IDENTITY_MATRIX)},e.adjustColor=function(t,e,i,s){return this.adjustHue(s),this.adjustContrast(e),this.adjustBrightness(t),this.adjustSaturation(i)},e.adjustBrightness=function(t){return 0==t||isNaN(t)?this:(t=this._cleanValue(t,255),this._multiplyMatrix([1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1]),this)},e.adjustContrast=function(e){return 0==e||isNaN(e)?this:(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,s=.6094,r=.082;return this._multiplyMatrix([i*(1-e)+e,s*(1-e),r*(1-e),0,0,i*(1-e),s*(1-e)+e,r*(1-e),0,0,i*(1-e),s*(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),s=.213,r=.715,n=.072;return this._multiplyMatrix([s+e*(1-s)+i*-s,r+e*-r+i*-r,n+e*-n+i*(1-n),0,0,s+e*-s+.143*i,r+e*(1-r)+.14*i,n+e*-n+-.283*i,0,0,s+e*-s+i*-(1-s),r+e*-r+i*r,n+e*(1-n)+i*n,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:(this._multiplyMatrix(e),this)},e.clone=function(){return(new t).copy(this)},e.toArray=function(){for(var e=[],i=0,s=t.LENGTH;i<s;i++)e[i]=this[i];return e},e.copy=function(e){for(var i=t.LENGTH,s=0;s<i;s++)this[s]=e[s];return this},e.toString=function(){return"[ColorMatrix]"},e._multiplyMatrix=function(t){var e,i,s,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 n=0;for(s=0;s<5;s++)n+=t[i+5*s]*r[s];this[i+5*e]=n}}},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},mt.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=mt.extend(t,mt.Filter);e.shaderParamSetup=function(t,e,i){var s=this.matrix,r=new Float32Array([s[0],s[1],s[2],s[3],s[5],s[6],s[7],s[8],s[10],s[11],s[12],s[13],s[15],s[16],s[17],s[18]]);t.uniformMatrix4fv(t.getUniformLocation(i,"uColorMatrix"),!1,r),t.uniform4f(t.getUniformLocation(i,"uColorMatrixOffset"),s[4]/255,s[9]/255,s[14]/255,s[19]/255)},e.toString=function(){return"[ColorMatrixFilter]"},e.clone=function(){return new t(this.matrix)},e._applyFilter=function(t){for(var e,i,s,r,n=t.data,a=n.length,o=this.matrix,h=o[0],l=o[1],c=o[2],u=o[3],d=o[4],f=o[5],_=o[6],p=o[7],g=o[8],m=o[9],v=o[10],b=o[11],y=o[12],w=o[13],E=o[14],x=o[15],T=o[16],S=o[17],C=o[18],R=o[19],L=0;L<a;L+=4)e=n[L],i=n[L+1],s=n[L+2],r=n[L+3],n[L]=e*h+i*l+s*c+r*u+d,n[L+1]=e*f+i*_+s*p+r*g+m,n[L+2]=e*v+i*b+s*y+r*w+E,n[L+3]=e*x+i*T+s*S+r*C+R;return!0},mt.ColorMatrixFilter=mt.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,s){return!!(e&&e.canvas&&t.isSupported())&&(!!e.__touch||(e.__touch={pointers:{},multitouch:!i,preventDefault:!s,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,s=e.__touch.f=function(i){t._IOS_handleEvent(e,i)};i.addEventListener("touchstart",s,!1),i.addEventListener("touchmove",s,!1),i.addEventListener("touchend",s,!1),i.addEventListener("touchcancel",s,!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,s=e.type,r=0,n=i.length;r<n;r++){var a=i[r],o=a.identifier;a.target==t.canvas&&("touchstart"==s?this._handleStart(t,o,e,a.pageX,a.pageY):"touchmove"==s?this._handleMove(t,o,e,a.pageX,a.pageY):"touchend"!=s&&"touchcancel"!=s||this._handleEnd(t,o,e))}}},t._IE_enable=function(e){var i=e.canvas,s=e.__touch.f=function(i){t._IE_handleEvent(e,i)};void 0===window.navigator["pointerEnabled"]?(i.addEventListener("MSPointerDown",s,!1),window.addEventListener("MSPointerMove",s,!1),window.addEventListener("MSPointerUp",s,!1),window.addEventListener("MSPointerCancel",s,!1),e.__touch.preventDefault&&(i.style.msTouchAction="none")):(i.addEventListener("pointerdown",s,!1),window.addEventListener("pointermove",s,!1),window.addEventListener("pointerup",s,!1),window.addEventListener("pointercancel",s,!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,s=e.pointerId,r=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;r[s]=!0,this._handleStart(t,s,e,e.pageX,e.pageY)}else r[s]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,s,e,e.pageX,e.pageY):"MSPointerUp"!=i&&"MSPointerCancel"!=i&&"pointerup"!=i&&"pointercancel"!=i||(delete r[s],this._handleEnd(t,s,e)))}},t._handleStart=function(t,e,i,s,r){var n=t.__touch;if(n.multitouch||!n.count){var a=n.pointers;a[e]||(a[e]=!0,n.count++,t._handlePointerDown(e,i,s,r))}},t._handleMove=function(t,e,i,s,r){t.__touch.pointers[e]&&t._handlePointerMove(e,i,s,r)},t._handleEnd=function(t,e,i){var s=t.__touch,r=s.pointers;r[e]&&(s.count--,t._handlePointerUp(e,i,!0),delete r[e])},mt.Touch=t}(),this.createjs=this.createjs||{},function(){var t=mt.EaselJS=mt.EaselJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:53 GMT"}()}),mt=window.createjs=window.createjs||{};gt.call(window);var vt=mt,bt=pt["a"].EventDispatcher,yt=pt["a"].Event,wt=pt["a"].LoadQueue,Et=vt.Bitmap,xt=vt.Stage,Tt=vt.Shape,St=vt.Container,Ct=function(t){if("object"!==Object(_t["a"])(t))return null;var e=new Et("");return e.image=t,e.mouseEnabled=!1,e.cache(0,0,t.width,t.height),e},Rt=function(t){if("string"!==typeof t)return null;var e=new Et("");e.mouseEnabled=!1;var i=new Image;return i.onload=function(t){e.image=i,e.mouseEnabled=!1,e.cache(0,0,i.width,i.height),e.dispatchEvent("cached")},i.crossOrigin="anonymous",i.src=t,e},Lt=function(){function t(e){Object(dt["a"])(this,t),this._stage=new xt(e),this.setManifest(e.width,e.height),this.children=[],this.invalidate=!0}return Object(ft["a"])(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:"addChild",value:function(t){return t.getStageDisplay?(this._stage.addChild(t.getStageDisplay()),this.invalidate=!0,this.children.push(t)):-1}},{key:"getChild",value:function(t){return this.children[t]}},{key:"setChildVisible",value:function(t,e){this.children[t].setVisible(!!e),this.invalidate=!0}},{key:"restore",value:function(){if(this.children=[],this.invalidate=!0,this._stage.removeAllChildren(),this.width&&this.height&&"transparent"!==this.bgColor){var t=new Tt;t.graphics.beginFill(this.bgColor).drawRect(0,0,this.width,this.height),this._stage.addChild(t)}this._stage.update()}},{key:"update",value:function(){this.invalidate&&(this.children.forEach(function(t){t.isVisible()&&t.update()}),this._stage.update(),this.invalidate=!1)}}]),t}(),At=Lt,It=i("308d"),Ot=i("6bb5"),Dt=i("4e2b"),Pt=function(){function t(e){Object(dt["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(ft["a"])(t,[{key:"transform",value:function(t,e){var i=t.action,s=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(s,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}(),Mt=Pt,kt=function(t,e,i,s){i[e]=i[t],i[t]=function(){this[e].apply(this,arguments);var i=Array.prototype.slice.call(arguments);jt.slaveCall(s,function(e){e[t].apply(e,Object(h["a"])(i))})}},Ft=function(){function t(){Object(dt["a"])(this,t),this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls=[],this.onFlushOnceListeners=[]}return Object(ft["a"])(t,[{key:"onFlushOnce",value:function(t){"function"===typeof t&&this.onFlushOnceListeners.push(t)}},{key:"reset",value:function(){this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls=[]}},{key:"addMaster",value:function(t,e){-1===this.masterRefs.indexOf(t)&&this.masterRefs.push(t),kt("setVisible","___setVisible",e,t),kt("setProps","___setProps",e,t),kt("transform","___transform",e,t),this.masterObjects[t]=e}},{key:"addSlave",value:function(t,e){var i=this;this.pendingCalls.push(function(){if(-1!==i.masterRefs.indexOf(t)&&"object"===Object(_t["a"])(e)){i.slaveObjects[t]||(i.slaveObjects[t]=[]);var s=i.masterObjects[t];s._transformations&&(e._transformations=s._transformations.clone()),i.slaveObjects[t].push(e)}})}},{key:"flushPendingCalls",value:function(){this.pendingCalls.forEach(function(t){"function"===typeof t&&t()}),this.pendingCalls=[],this.onFlushOnceListeners.forEach(function(t){"function"===typeof t&&t()}),this.onFlushOnceListeners=[]}},{key:"slaveCall",value:function(t,e){-1!==this.masterRefs.indexOf(t)&&"function"===typeof e&&this.slaveObjects[t]&&this.slaveObjects[t].forEach(e)}}]),t}(),jt=new Ft,Bt=jt,Nt=function(){function t(e){Object(dt["a"])(this,t),this.width=e.width||0,this.height=e.height||0,this.__json=e,this._stageDisplay=new St,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._mirror?Bt.addSlave(this._mirror,this):this._ref&&Bt.addMaster(this._ref,this),this._transformations=null,e.transform&&(this._transformations=new Mt(e.transform))}return Object(ft["a"])(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){"function"!==typeof t.getStageDisplay?this._stageDisplay.addChild(t):this._stageDisplay.addChild(t.getStageDisplay())}},{key:"setPosition",value:function(t,e){this._stageDisplay.x=t||0,this._stageDisplay.y=e||0}},{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:"setProps",value:function(t){}},{key:"update",value:function(){}},{key:"random",value:function(){if(this._transformations){var t=this._transformations.random();this.transform({action:"exact",offset:t},this._stageDisplay)}}},{key:"x",get:function(){return this._stageDisplay.x}},{key:"y",get:function(){return this._stageDisplay.y}}]),t}(),Ut=Nt,Gt=(i("20d6"),1e3),Xt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(dt["a"])(this,t),this.game=name,this.files={},this.baseURL=e,this._queueItems=[],this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,this._queues=[];for(var i=0;i<10;i++){var s=new wt(!0);s.id=i,s.on("fileload",this._handleFileLoad,this),s.on("fileerror",this._handleFileError,this),s.on("complete",this._handleComplete,this),0===i&&s.on("progress",this._handleProgress,this),this._queues.push(s)}this._events=new bt}return Object(ft["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){return i.resolve({id:t.item.id,result:e.getItem(t.item.id)})}),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 yt(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){if(0===this._queueItems.length)return this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,this._events.dispatchEvent(this._eventFactory("complete",{})),void this._events.removeAllEventListeners();var i=t.target,s=this._queueItems.filter(function(t){return t.queueId===i.id}).length;s>0&&(Gt*=2,setTimeout(function(){return e._loadQueueItems(i)},Gt))}}},{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:"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,s){var r=e._queueItems.find(function(e){return e.id===t});r||(r={id:t,src:"".concat(e.baseURL||"").concat(t),crossOrigin:"Anonymous",listeners:[],queueId:e._queueItems.length%e._queues.length},e._queueItems.push(r)),r.listeners.push({resolve:i,reject:s})}):Promise.reject(new Error("Src is empty or exist"))}},{key:"getItem",value:function(t){return t&&this.files[t]?/^blob:/.test(t)?Rt(this.files[t]):Ct(this.files[t]):null}},{key:"loadItems",value:function(){var t=this;this._queueItems.length>0?(this._downloading=!0,this._loadedFiles=0,this._totalFiles=this._queueItems.length,this._queues.forEach(function(e){return t._loadQueueItems(e)})):(this._downloading=!1,this._loadedFiles=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}(),Ht=new Xt,Yt=Ht,Vt=function(t){function e(t){var i,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(dt["a"])(this,e),i=Object(It["a"])(this,Object(Ot["a"])(e).call(this,t)),i.category=null,i.bmd=null,i.src=t.image,i.loaded=!1,i.setVisible(!!t.visible),t.image="",s||i.load(),i}return Object(Dt["a"])(e,t),Object(ft["a"])(e,[{key:"update",value:function(){var t=this.getJsonBase();!t.image&&this.bmd&&this.bmd.bitmapCache&&(t.image=this.bmd.bitmapCache.getCacheDataURL())}},{key:"load",value:function(){var t=this;if(this.loaded)return Promise.reject(new Error("Image loaded"));this.bmd=Yt.getItem(this.src);var e=function(){t.loaded=!0;var e=t.getStageDisplay().stage;e&&e.update(),t.update()};return this.bmd?(this.addChild(this.bmd),e(),Promise.resolve()):new Promise(function(i,s){Yt.addToQueue(t.src).then(function(s){t.bmd=s.result,t.addChild(t.bmd),t.bmd.bitmapCache?(e(),i()):t.bmd.on("cached",function(){e(),i()})}).catch(s)})}}]),e}(Ut),qt=Vt,Wt=(i("db97"),i("5df3"),i("2a88")),zt=function(t){function e(t){var i;Object(dt["a"])(this,e),i=Object(It["a"])(this,Object(Ot["a"])(e).call(this,t)),i.setVisible(!!t.visible),i.setPosition(0,0),i.activeDisplay=-1,i.displays=[],i.colors=[];var s=[];return t.children=t.children||[],t.children.forEach(function(t){if(t&&t.name&&t.image){var e=t.visible,r=new qt(t,!0);r.setVisible(!1),s.push(r.load()),i.addChild(r),i.displays.push(r),i.colors.push(t.name),e&&i._setActiveColor(t.name)}}),-1===i.activeDisplay&&i._setActiveColor(i.colors[0]),Promise.all(s).then(function(){return i.setProps({color:i.colors[i.activeDisplay]})}),i.getRef()&&Bt.onFlushOnce(function(){return i.setProps({color:i.colors[i.activeDisplay]})}),i}return Object(Dt["a"])(e,t),Object(ft["a"])(e,[{key:"getActiveColor",value:function(){return this.colors[this.activeDisplay]}},{key:"getColors",value:function(){return this.colors}},{key:"_setActiveColor",value:function(t){var e=this.colors.indexOf(t);-1!==e&&(this.displays.forEach(function(t){return t.setVisible(!1)}),this.displays[e].setVisible(!0),this.addChild(this.displays[e]),this.activeDisplay=e,this.getJsonBase().image=this.displays[e].getJsonBase().image)}},{key:"random",value:function(){Object(Wt["a"])(Object(Ot["a"])(e.prototype),"random",this).call(this);var t=parseInt(Math.random()*this.colors.length);this.setProps({color:this.colors[t]})}},{key:"setProps",value:function(t){t&&t.color&&(this.category&&this.category.fireSetPropsEvent(t,this),this._setActiveColor(t.color))}}]),e}(Ut),Jt=zt,Qt={FIXED:"fixed",OPTIONAL:"optional",MIXED:"mixed",ICON:"icon",COLORPIKER:"color-picker",MOVE:"move",REF:"ref",MIRROR:"mirror",COLORGLOBAL:"enable-color-global",toArray:function(){var t=[];for(var e in this)t.push(Qt[e]);return t}},$t=Qt,Zt=new bt,Kt=function(){function t(e,i){var s=this;Object(dt["a"])(this,t),this.id=e.id,this.isFixed=-1!==e.tags.indexOf($t.FIXED),this.isMixed=-1!==e.tags.indexOf($t.MIXED),this.isOptional=-1!==e.tags.indexOf($t.OPTIONAL),this.children=[],this._button=new qt(e),this.__useColorGlobal=-1!==e.tags.indexOf($t.COLORGLOBAL),this.__isBusy=!1,this.__scope=e.colorGlobalScope,this.__useColorGlobal&&Zt.addEventListener(this.__scope,function(t){var e=t.eventProps,i=t.eventTarget;s.__isBusy=!0,s.children.forEach(function(t){Object.is(i,t)||"function"!==typeof t.setProps||t.setProps(e)}),s.__isBusy=!1}),e.children=e.children||[],Object(h["a"])(e.children).reverse().forEach(function(t){if(t&&t.type){var e=null;switch(t.type){case"image":e=new qt(t);break;case"color-picker":e=new Jt(t);break;default:return null}e&&(i.addChild(e),t.index=i.children.indexOf(e),e.category=s,s.children.push(e))}}),this.isFixed&&-1===this.children.findIndex(function(t){return t.isVisible()})&&Bt.onFlushOnce(function(){return s.random()});var r=this.children.find(function(t){return t.isVisible()});this.__useColorGlobal&&r&&"function"===typeof r.getActiveColor&&Bt.onFlushOnce(function(){return r.setProps({color:r.getActiveColor()})})}return Object(ft["a"])(t,[{key:"fireSetPropsEvent",value:function(t,e){if(this.__useColorGlobal&&this.__scope&&!this.__isBusy&&t&&t.color){var i=new yt(this.__scope);i.eventProps=t,i.eventTarget=e,Zt.dispatchEvent(i)}}},{key:"random",value:function(){if(0!==this.children.length){this.children.forEach(function(t){return t.setVisible(!1)});var t=1;this.isMixed&&(t=this._randIndex());for(var e=0;e<t;e++){var i=this._randIndex()-1;this.isFixed&&-1===i&&(i=0),-1!==i&&this._setChildVisible(i)}}}},{key:"_setChildVisible",value:function(t){if(!(t>=this.children.length)){var e=this.children[t];e.setVisible(!0),"function"===typeof e.random&&e.random()}}},{key:"_randIndex",value:function(){return parseInt(Math.random()*(this.children.length+1))}}]),t}(),te=Kt,ee=function(t){function e(t,i){var s;return Object(dt["a"])(this,e),s=Object(It["a"])(this,Object(Ot["a"])(e).call(this,t)),s.setPosition(0,0),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 qt(t);break;case"color-picker":e=new Jt(t);break;default:return null}e&&(s.addChild(e),s.children.push(e))}}),s}return Object(Dt["a"])(e,t),e}(Ut),ie=ee,se=i("768b"),re=[],ne=[],ae={},oe=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 s=t._tagsProps.move.split(" ").map(function(t){return parseInt(t)||0}),r=Object(se["a"])(s,4),n=r[0],a=r[1],o=r[2],h=r[3];if(n<0||a<0||o<0||h<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative move parameter"));(n||a||o||h)&&(i||(t.transform={up:n>0?n:0,right:a>0?a:0,down:o>0?o:0,left:h>0?h:0}))}},he=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];-1!==t.tags.indexOf("enable-color-global")&&(i||(t.colorGlobalScope=t._tagsProps["enable-color-global"]||Math.random().toString(36).substr(2,10)))},le=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 s=t._tagsProps.ref;if(-1!==ne.indexOf(s))return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a duplicate ref "').concat(s,'"'));i||(t.ref=s),ne.push(s),ae[s]=t}},ce=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 s=t._tagsProps.mirror;fe(function(){return-1===ne.indexOf(s)?e('Layer "'.concat(t.name,'"(#').concat(t.id,') try to use undefined ref "').concat(s,'"')):t.type!==ae[s].type?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same type of mirror ref "').concat(s,'"')):t.children.length!==ae[s].children.length?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same number of the children of mirror ref "').concat(s,'"')):void(i||(t.mirror=s,t.visible=ae[s].visible))})}},ue=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(":"),s=Object(se["a"])(i,2),r=s[0],n=s[1];return r=r.trim(),e[r]=n,r}),t._tagsProps=e}},de=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];le(t,e,i),ce(t,e,i),oe(t,e,i),he(t,e,i),delete t._tagsProps},fe=function(t){re.push(t)},_e=function(t){re.forEach(function(e){"function"===typeof e&&e(t)}),re=[],ne=[],ae={}};$t.computeTagsProps=ue,$t.prepareCustomTags=de,$t.flushPendingCalls=_e;var pe,ge=$t,me=function(){function t(e){Object(dt["a"])(this,t),this.categories=[],this.stage=new At(e),this._events=new bt}return Object(ft["a"])(t,[{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"restore",value:function(){this.categories=[],this.data=[],this.stage.restore(),this.manifest=null,Yt.cleanOut()}},{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||[],ge.computeTagsProps(t),ge.prepareCustomTags(t,i),delete t._tags)}),ge.flushPendingCalls(i),this._events.dispatchEvent("loading"),this.stage.setManifest(e.gameWidth,e.gameHeight,e.bgColor),this.restore(),this.manifest=e,this.data=t,this._parseData()}},{key:"setBaseUrl",value:function(t){Yt.setBaseUrl(t)}},{key:"disableAllItems",value:function(t){var e=this.categories.find(function(e){return e.id===t});if(e)return e.isMixed||e.isOptional?(e.children.forEach(function(t){return t.setVisible(!1)}),this.stage.invalidate=!0,this.update()):void 0}},{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._getItemByIndex(t);if(e&&e.category){var i=e.category,s=e.isVisible();return(i.isFixed||i.isOptional)&&i.children.forEach(function(t){return t.setVisible(!1)}),i.isMixed||i.isOptional?e.setVisible(!s):e.setVisible(!0),this.update(!0)}}},{key:"updateItemPropsByIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return e&&"function"===typeof i.setProps&&i.setProps(e),this.update(!0)}},{key:"transformItemIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return i.transform(e),this.update(!0)}},{key:"update",value:function(t){t&&(this.stage.invalidate=!0),this.stage.update()}},{key:"randomItems",value:function(){return this.categories.forEach(function(t){return t.random()}),this.update(!0)}},{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(){var t=this;Object(h["a"])(this.data).reverse().forEach(function(e){if(e&&e.type){if("image"===e.type){var i=new qt(e);return t.stage.addChild(i),void(e.index=t.stage.children.indexOf(i))}if("category"===e.type){var s=new te(e,t.stage);t.categories.push(s),e.index=t.categories.indexOf(s)}if("simple-layer"===e.type){var r=new ie(e,t.stage);t.stage.addChild(r),e.index=t.categories.indexOf(r)}}}),Yt.on("complete",function(){t.update(!0),t._events.dispatchEvent("done")}),Yt.on("progress",function(e){return t._events.dispatchEvent(e)}),Yt.loadItems(),Bt.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}(),ve=me,be=ve,ye={name:"game",components:{GameWrapper:K,GameCanvas:nt,ScrollDiv:C,WelcomeScreen:ut},data:function(){return{manifest:{gameWidth:0,gameHeight:0,bgColor:null},ops:{vuescroll:{mode:"slide",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1},scrollPanel:{scrollingX:!0,scrollingY:!1},bar:{disable:!0}},categories:[],selectedCategoryIndex:-1,selectedItem:null,loadingPct:null,welcomeScreenData:null,gameStarted:!1,saveImage:null}},mounted:function(){var t=this,e=this.$refs.display.getCanvas();pe=new be(e),pe.on("done",function(){t.loadingPct="99.9999",t.selectedCategoryIndex=0,setTimeout(function(){t.loadingPct=null,t.gameStarted=!0},500)}),pe.on("progress",function(e){t.loadingPct="".concat(100*e.loaded)})},computed:{selectedCategory:function(){return this.categories?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){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[]},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,s=t.description,r=t.tags,n=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:s,tags:r,owner:n,icon:a},e){var o=e.tagLinkResolver,h=e.ownerLinkResolver,l=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:h,siteHomeLink:l}}},startLoadingGame:function(){this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(t,e,i){var s=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.welcomeScreenData&&!this.welcomeScreenData.onPlay)return new Promise(function(n,a){s.welcomeScreenData.onPlay=function(){s.setData(t,e,i,r).then(n).catch(a),s.welcomeScreenData.onPlay=null}});this.loadingPct="0",this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.manifest.gameWidth=e,this.manifest.gameHeight=i,this.manifest.bgColor=r,t.forEach(function(t){"category"===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))),s.categories.push(t))}),pe.setData(t,this.manifest);var n=new Promise(function(t,e){pe.on("done",function(){t()})});return pe.update(),n},setBaseUrl:function(t){pe.setBaseUrl(t)},getDataImage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",e=this.$refs.display.getCanvas(),i=e.toDataURL(t);this.$nextTick(function(){pe.update(!0)});for(var s=atob(i.split(",")[1]),r=[],n=0;n<s.length;n++)r.push(s.charCodeAt(n));var a=new Blob([new Uint8Array(r)],{type:t});return(window.URL||window.webkitURL).createObjectURL(a)},restore:function(){this.gameStarted=!1,this.welcomeScreenData=null,this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.loadingPct=null,pe.restore()},handleCategoryClick:function(t,e){this.$refs.wrapper.$emit("update",{opened:!0}),this.selectedCategoryIndex=e,this.selectedItem=null},handleImageClick:function(t){t.delete?(this.selectedItem=null,pe.disableAllItems(t.categoryId)):(this.selectedItem=t,pe.activeItemIndex(t.index),this.selectedItem.visible||(this.selectedItem=null))},handlePrepareSave:function(t){this.selectedItem=null,this.saveImage={name:"my-meiker-".concat((new Date).getTime()+""+parseInt(1e3*Math.random()),".png"),link:this.getDataImage("image/png")}},handleRandomClick:function(t){this.selectedItem=null,pe.randomItems()},handleSelectColorClick:function(t){pe.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){pe.transformItem(this.selectedItem,{action:t.source})}}},we=ye,Ee=(i("8e1e"),Object(u["a"])(we,a,o,!1,null,"c6ba0d36",null)),xe=Ee.exports,Te=function(t){var e=t.delay,i=void 0===e?400:e,s=t.interval,r=void 0===s?50:s;return{bind:function(t,e,s){if("function"!==typeof e.value){var n=s.context.name,a="[longclick:] provided expression '".concat(e.expression,"' is not a function, but has to be");n&&(a+="Found in component '".concat(n,"' ")),console.warn(a)}var o=null,h=null,l=function(t){"click"===t.type&&0!==t.button||null===o&&(o=setTimeout(function(){r&&r>0&&(h=setInterval(function(){u()},r)),u()},i))},c=function(){null!==o&&(clearTimeout(o),o=null),h&&(clearInterval(h),h=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,c)})}}},Se=Te({delay:100,interval:50});s["default"].directive("clickandhold",Se);var Ce=xe,Re=i("bc3a"),Le=i.n(Re),Ae={name:"app",components:{Player:Ce},data:function(){return{manifest:{},dataJson:[],error:""}},mounted:function(){var t=this;window.screen&&window.screen.orientation&&"function"===typeof window.screen.orientation.lock&&window.screen.orientation.lock("portrait").catch(function(){}),"function"===typeof window.meikerioLoader?(this.manifest=window.meikerioLoader(),Le.a.get(this.manifest.data_url).then(function(e){t.dataJson=e.data,t.$refs.game.showWelcomeScreen(t.manifest,{tagLinkResolver:function(t){return"https://meiker.io/games/tag/".concat(t)},ownerLinkResolver:function(t){return"https://meiker.io/games/creator/".concat(t)},siteHomeLink:function(){return"https://meiker.io"}}),t.$refs.game.setBaseUrl(t.manifest.base_url),t.$refs.game.setData(t.dataJson,t.manifest.canvas_width,t.manifest.canvas_height,"#000000")}).catch(function(){t.error="We had a problem to load the game, please refresh this page to try again."})):this.error="We're sorry, the game you requested could not be found or not yet published."}},Ie=Ae,Oe=(i("034f"),Object(u["a"])(Ie,r,n,!1,null,null,null)),De=Oe.exports;s["default"].config.productionTip=!1,s["default"].prototype.$ENV="function"===typeof window.ENV?window.ENV:null,new s["default"]({render:function(t){return t(De)}}).$mount("#app")},"5a04":function(t,e,i){},"68f5":function(t,e,i){},"6c89":function(t,e,i){},7553:function(t,e,i){"use strict";var s=i("98f5"),r=i.n(s);r.a},"8c7d":function(t,e,i){},"8e1e":function(t,e,i){"use strict";var s=i("6c89"),r=i.n(s);r.a},"98f5":function(t,e,i){},a620:function(t,e,i){},aa47:function(t,e,i){"use strict";var s=i("a620"),r=i.n(s);r.a},b0c58:function(t,e,i){"use strict";var s=i("5a04"),r=i.n(s);r.a},b8b6:function(t,e,i){},b950:function(t,e,i){"use strict";var s=i("8c7d"),r=i.n(s);r.a},be1e:function(t,e,i){"use strict";var s=i("b8b6"),r=i.n(s);r.a},f5dd:function(t,e,i){}});