text: /*
  
   Copyright 2014 Mozilla Foundation
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
  
   http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
  */
  console.time("Load Shared Dependencies");var Shumway,Shumway$$inline_0=Shumway||(Shumway={});Shumway$$inline_0.version="0.11.622";Shumway$$inline_0.build="16451d8";var jsGlobal=function(){return this||(0,eval)("this//# sourceURL=jsGlobal-getter")}(),inBrowser="undefined"!==typeof window&&"document"in window&&"plugins"in window.document,inFirefox="undefined"!==typeof navigator&&0<=navigator.userAgent.indexOf("Firefox");jsGlobal.performance||(jsGlobal.performance={});
  jsGlobal.performance.now||(jsGlobal.performance.now=function(){return Date.now()});var START_TIME=performance.now();
  (function(d){function f(a){return(a|0)===a}function C(a){return"object"===typeof a||"function"===typeof a}function q(a){return String(Number(a))===a}function B(a){var g=0;if("number"===typeof a)return g=a|0,a===g&&0<=g?!0:a>>>0===a;if("string"!==typeof a)return!1;var D=a.length;if(0===D)return!1;if("0"===a)return!0;if(D>d.UINT32_CHAR_BUFFER_LENGTH)return!1;var b=0,g=a.charCodeAt(b++)-48;if(1>g||9<g)return!1;for(var h=0,c=0;b<D;){c=a.charCodeAt(b++)-48;if(0>c||9<c)return!1;h=g;g=10*g+c}return h<d.UINT32_MAX_DIV_10||
  h===d.UINT32_MAX_DIV_10&&c<=d.UINT32_MAX_MOD_10?!0:!1}d.UINT32_CHAR_BUFFER_LENGTH=10;d.UINT32_MAX=4294967295;d.UINT32_MAX_DIV_10=429496729;d.UINT32_MAX_MOD_10=5;d.isString=function(a){return"string"===typeof a};d.isFunction=function(a){return"function"===typeof a};d.isNumber=function(a){return"number"===typeof a};d.isInteger=f;d.isArray=function(a){return a instanceof Array};d.isNumberOrString=function(a){return"number"===typeof a||"string"===typeof a};d.isObject=C;d.toNumber=function(a){return+a};
  d.isNumericString=q;d.isNumeric=function(a){if("number"===typeof a)return!0;if("string"===typeof a){var g=a.charCodeAt(0);return 65<=g&&90>=g||97<=g&&122>=g||36===g||95===g?!1:B(a)||q(a)}return!1};d.isIndex=B;d.isNullOrUndefined=function(a){return void 0==a};d.argumentsToString=function(a){for(var g=[],D=0;D<a.length;D++){var b=a[D];try{var h;h="object"===typeof b&&b?"toString"in b?b.toString():Object.prototype.toString.call(b):b+"";g.push(h)}catch(c){g.push("<unprintable value>")}}return g.join(", ")};
  var w;(function(a){a.error=function(a){console.error(a);throw Error(a);};a.assert=function(g,h){void 0===h&&(h="assertion failed");""===g&&(g=!0);if(!g){if("undefined"!==typeof console&&"assert"in console)throw console.assert(!1,h),Error(h);a.error(h.toString())}};a.assertUnreachable=function(a){var g=Error().stack.split("\n")[1];throw Error("Reached unreachable location "+g+a);};a.assertNotImplemented=function(g,h){g||a.error("notImplemented: "+h)};var g=Object.create(null);a.warning=function(a,
  g,c){};a.warnCounts=function(){var a=[],h;for(h in g)a.push({key:h,count:g[h]});a.sort(function(c,a){return a.count-c.count});return a.reduce(function(c,a){return c+("\n"+a.count+"\t"+a.key)},"")};a.notImplemented=function(a){};a.dummyConstructor=function(a){};a.abstractMethod=function(a){};var D={};a.somewhatImplemented=function(g){D[g]||(D[g]=!0,a.warning("somewhatImplemented: "+g))};a.unexpected=function(g){a.assert(!1,"Unexpected: "+g)};a.unexpectedCase=function(g){a.assert(!1,"Unexpected Case: "+
  g)}})(w=d.Debug||(d.Debug={}));d.getTicks=function(){return performance.now()};(function(a){function g(a,g){for(var h=0,c=a.length;h<c;h++)if(a[h]===g)return h;a.push(g);return a.length-1}a.popManyInto=function(a,g,h){for(var c=g-1;0<=c;c--)h[c]=a.pop();h.length=g};a.popMany=function(a,g){var h=a.length-g,c=a.slice(h,this.length);a.length=h;return c};a.popManyIntoVoid=function(a,g){a.length-=g};a.pushMany=function(a,g){for(var h=0;h<g.length;h++)a.push(g[h])};a.top=function(a){return a.length&&a[a.length-
  1]};a.last=function(a){return a.length&&a[a.length-1]};a.peek=function(a){return a[a.length-1]};a.indexOf=function(a,g){for(var h=0,c=a.length;h<c;h++)if(a[h]===g)return h;return-1};a.equals=function(a,g){if(a.length!==g.length)return!1;for(var h=0;h<a.length;h++)if(a[h]!==g[h])return!1;return!0};a.pushUnique=g;a.unique=function(a){for(var b=[],h=0;h<a.length;h++)g(b,a[h]);return b};a.copyFrom=function(g,b){g.length=0;a.pushMany(g,b)};a.ensureTypedArrayCapacity=function(a,g){if(a.length<g){var h=
  a;a=new a.constructor(d.IntegerUtilities.nearestPowerOfTwo(g));a.set(h,0)}return a};a.memCopy=function(a,g,h,c,m){void 0===h&&(h=0);void 0===c&&(c=0);void 0===m&&(m=0);0<c||0<m&&m<g.length?(0>=m&&(m=g.length-c),a.set(g.subarray(c,c+m),h)):a.set(g,h)}})(d.ArrayUtilities||(d.ArrayUtilities={}));(function(a){function g(a,g){return Object.prototype.hasOwnProperty.call(a,g)}a.boxValue=function(a){return void 0==a||C(a)?a:Object(a)};a.toKeyValueArray=function(a){var g=Object.prototype.hasOwnProperty,h=
  [],c;for(c in a)g.call(a,c)&&h.push([c,a[c]]);return h};a.isPrototypeWriteable=function(a){return Object.getOwnPropertyDescriptor(a,"prototype").writable};a.hasOwnProperty=g;a.propertyIsEnumerable=function(a,g){return Object.prototype.propertyIsEnumerable.call(a,g)};a.getPropertyDescriptor=function(a,g){do{var h=Object.getOwnPropertyDescriptor(a,g);if(h)return h;a=Object.getPrototypeOf(a)}while(a);return null};a.hasOwnGetter=function(a,g){var h=Object.getOwnPropertyDescriptor(a,g);return!(!h||!h.get)};
  a.getOwnGetter=function(a,g){var h=Object.getOwnPropertyDescriptor(a,g);return h?h.get:null};a.hasOwnSetter=function(a,g){var h=Object.getOwnPropertyDescriptor(a,g);return!(!h||!h.set)};a.createMap=function(){return Object.create(null)};a.createArrayMap=function(){return[]};a.defineReadOnlyProperty=function(a,g,h){Object.defineProperty(a,g,{value:h,writable:!1,configurable:!0,enumerable:!1})};a.copyProperties=function(a,g){for(var h in g)a[h]=g[h]};a.copyOwnProperties=function(a,b){for(var h in b)g(b,
  h)&&(a[h]=b[h])};a.copyOwnPropertyDescriptors=function(a,b,h,c,m){void 0===h&&(h=null);void 0===c&&(c=!0);void 0===m&&(m=!1);for(var e in b)if(g(b,e)&&(!h||h(e))){var A=Object.getOwnPropertyDescriptor(b,e);if(c||!g(a,e))try{m&&!1===A.writable&&(A.writable=!0),Object.defineProperty(a,e,A)}catch(E){w.assert("Can't define: "+e)}}};a.copyPropertiesByList=function(a,g,h){for(var c=0;c<h.length;c++){var m=h[c];a[m]=g[m]}};a.defineNonEnumerableGetter=function(a,g,h){Object.defineProperty(a,g,{get:h,configurable:!0,
  enumerable:!1})};a.defineNonEnumerableProperty=function(a,g,h){Object.defineProperty(a,g,{value:h,writable:!0,configurable:!0,enumerable:!1})}})(d.ObjectUtilities||(d.ObjectUtilities={}));(function(a){a.makeForwardingGetter=function(a){return new Function('return this["'+a+'"]//# sourceURL=fwd-get-'+a+".as")};a.makeForwardingSetter=function(a){return new Function("value",'this["'+a+'"] = value;//# sourceURL=fwd-set-'+a+".as")}})(d.FunctionUtilities||(d.FunctionUtilities={}));(function(a){function g(a){return"string"===
  typeof a?'"'+a+'"':"number"===typeof a||"boolean"===typeof a?String(a):a instanceof Array?"[] "+a.length:typeof a}function b(a,e,g){c[0]=a;c[1]=e;c[2]=g;return c.join("")}function k(a,c,e,g){m[0]=a;m[1]=c;m[2]=e;m[3]=g;return m.join("")}a.repeatString=function(a,c){for(var e="",g=0;g<c;g++)e+=a;return e};a.memorySizeToString=function(a){a|=0;return 1024>a?a+" B":1048576>a?(a/1024).toFixed(2)+"KB":(a/1048576).toFixed(2)+"MB"};a.toSafeString=g;a.toSafeArrayString=function(a){for(var c=[],e=0;e<a.length;e++)c.push(g(a[e]));
  return c.join(", ")};a.utf8decode=function(a){for(var c=new Uint8Array(4*a.length),e=0,g=0,m=a.length;g<m;g++){var h=a.charCodeAt(g);if(127>=h)c[e++]=h;else{if(55296<=h&&56319>=h){var v=a.charCodeAt(g+1);56320<=v&&57343>=v&&(h=((h&1023)<<10)+(v&1023)+65536,++g)}0!==(h&4292870144)?(c[e++]=248|h>>>24&3,c[e++]=128|h>>>18&63,c[e++]=128|h>>>12&63,c[e++]=128|h>>>6&63):0!==(h&4294901760)?(c[e++]=240|h>>>18&7,c[e++]=128|h>>>12&63,c[e++]=128|h>>>6&63):0!==(h&4294965248)?(c[e++]=224|h>>>12&15,c[e++]=128|h>>>
  6&63):c[e++]=192|h>>>6&31;c[e++]=128|h&63}}return c.subarray(0,e)};a.utf8encode=function(a){for(var c=0,e="";c<a.length;){var g=a[c++]&255;if(127>=g)e+=String.fromCharCode(g);else{var m=192,h=5;do{if((g&(m>>1|128))===m)break;m=m>>1|128;--h}while(0<=h);if(0>=h)e+=String.fromCharCode(g);else{for(var g=g&(1<<h)-1,m=!1,v=5;v>=h;--v){var r=a[c++];if(128!=(r&192)){m=!0;break}g=g<<6|r&63}if(m)for(h=c-(7-v);h<c;++h)e+=String.fromCharCode(a[h]&255);else e=65536<=g?e+String.fromCharCode(g-65536>>10&1023|55296,
  g&1023|56320):e+String.fromCharCode(g)}}}return e};a.base64EncodeBytes=function(a){for(var c="",e=a.byteLength,g=e%3,e=e-g,m,h,v,r,n=0;n<e;n+=3)r=a[n]<<16|a[n+1]<<8|a[n+2],m=(r&16515072)>>18,h=(r&258048)>>12,v=(r&4032)>>6,r&=63,c+=k("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[v],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[r]);
  1==g?(r=a[e],c+=b("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r&252)>>2],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r&3)<<4],"==")):2==g&&(r=a[e]<<8|a[e+1],c+=k("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r&64512)>>10],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r&1008)>>4],"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r&15)<<2],"="));return c};var h=[62,0,0,0,63,52,53,54,55,56,57,
  58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,0,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];a.decodeRestrictedBase64ToBytes=function(a){var c,e,g;c=a.length;c="="===a.charAt(c-2)?2:"="===a.charAt(c-1)?1:0;for(var m=new Uint8Array(3*(a.length>>2)-c),u=0,v=0;u<a.length;){c=a.charCodeAt(u++);e=h[c-43];c=a.charCodeAt(u++);g=h[c-43];m[v++]=e<<2|(g&48)>>4;c=a.charCodeAt(u++);if(61==c)break;e=h[c-43];m[v++]=(g&15)<<
  4|(e&60)>>2;c=a.charCodeAt(u++);if(61==c)break;g=h[c-43];m[v++]=(e&3)<<6|g}return m};a.escapeString=function(a){void 0!==a&&(a=a.replace(/[^\w$]/gi,"$"),/^\d/.test(a)&&(a="$"+a));return a};a.fromCharCodeArray=function(a){for(var c="",e=0;e<a.length;e+=16384)var g=Math.min(a.length-e,16384),c=c+String.fromCharCode.apply(null,a.subarray(e,e+g));return c};a.variableLengthEncodeInt32=function(a){for(var c=32-Math.clz32(a),e=Math.ceil(c/6),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[e],
  e=e-1;0<=e;e--)c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[a>>6*e&63];return c};a.toEncoding=function(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[a]};a.fromEncoding=function(a){if(65<=a&&90>=a)return a-65;if(97<=a&&122>=a)return a-71;if(48<=a&&57>=a)return a+4;if(36===a)return 62;if(95===a)return 63};a.variableLengthDecodeInt32=function(c){for(var e=a.fromEncoding(c.charCodeAt(0)),g=0,m=0;m<e;m++)var h=6*(e-m-1),g=g|a.fromEncoding(c.charCodeAt(1+
  m))<<h;return g};a.trimMiddle=function(a,c){if(a.length<=c)return a;var e=c>>1,g=c-e-1;return a.substr(0,e)+"\u2026"+a.substr(a.length-g,g)};a.multiple=function(a,c){for(var e="",g=0;g<c;g++)e+=a;return e};a.indexOfAny=function(a,c,e){for(var g=a.length,m=0;m<c.length;m++){var h=a.indexOf(c[m],e);0<=h&&(g=Math.min(g,h))}return g===a.length?-1:g};var c=Array(3),m=Array(4),e=Array(9);a.concat3=b;a.concat4=k;a.concat9=function(a,c,g,m,h,u,v,r,n){e[0]=a;e[1]=c;e[2]=g;e[3]=m;e[4]=h;e[5]=u;e[6]=v;e[7]=
  r;e[8]=n;return e.join("")}})(d.StringUtilities||(d.StringUtilities={}));(function(a){var g=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),b=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,
  -373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);a.hashBytesTo32BitsMD5=
  function(a,h,c){var m=1732584193,e=-271733879,A=-1732584194,E=271733878,k=c+72&-64,d=new Uint8Array(k),y;for(y=0;y<c;++y)d[y]=a[h++];d[y++]=128;for(a=k-8;y<a;)d[y++]=0;d[y++]=c<<3&255;d[y++]=c>>5&255;d[y++]=c>>13&255;d[y++]=c>>21&255;d[y++]=c>>>29&255;d[y++]=0;d[y++]=0;d[y++]=0;a=new Int32Array(16);for(y=0;y<k;){for(c=0;16>c;++c,y+=4)a[c]=d[y]|d[y+1]<<8|d[y+2]<<16|d[y+3]<<24;var u=m;h=e;var v=A,r=E,n,l;for(c=0;64>c;++c){16>c?(n=h&v|~h&r,l=c):32>c?(n=r&h|~r&v,l=5*c+1&15):48>c?(n=h^v^r,l=3*c+5&15):
  (n=v^(h|~r),l=7*c&15);var z=r,u=u+n+b[c]+a[l]|0;n=g[c];r=v;v=h;h=h+(u<<n|u>>>32-n)|0;u=z}m=m+u|0;e=e+h|0;A=A+v|0;E=E+r|0}return m};a.mixHash=function(a,g){return(31*a|0)+g|0}})(d.HashUtilities||(d.HashUtilities={}));var F=function(){function a(a){this._data=Object.create(null);this._size=0;this._maxSize=a}a.prototype.get=function(a){return this._data[a]};a.prototype.set=function(a,b){if(this._size>=this._maxSize)return!1;this._data[a]=b;this._size++;return!0};return a}();d.Cache=F;var G=function(){function a(){}
  a.seed=function(g){a._state[0]=g;a._state[1]=g};a.reset=function(){a._state[0]=57005;a._state[1]=48879};a.next=function(){var a=this._state,b=Math.imul(18273,a[0]&65535)+(a[0]>>>16)|0;a[0]=b;var k=Math.imul(36969,a[1]&65535)+(a[1]>>>16)|0;a[1]=k;a=(b<<16)+(k&65535)|0;return 2.3283064365386963E-10*(0>a?a+4294967296:a)};a._state=new Uint32Array([57005,48879]);return a}();d.Random=G;Math.random=function(){return G.next()};d.installTimeWarper=function(){var a=Date,g=1428107694580;jsGlobal.Date=function(b,
  k,h,c,m,e,A){switch(arguments.length){case 0:return new a(g);case 1:return new a(b);case 2:return new a(b,k);case 3:return new a(b,k,h);case 4:return new a(b,k,h,c);case 5:return new a(b,k,h,c,m);case 6:return new a(b,k,h,c,m,e);default:return new a(b,k,h,c,m,e,A)}};jsGlobal.Date.now=function(){return g+=10};jsGlobal.Date.UTC=function(){return a.UTC.apply(a,arguments)}};(function(){function a(){this.id="$weakmap"+g++}if("function"!==typeof jsGlobal.WeakMap){var g=0;a.prototype={has:function(a){return a.hasOwnProperty(this.id)},
  get:function(a,g){return a.hasOwnProperty(this.id)?a[this.id]:g},set:function(a,g){Object.defineProperty(a,this.id,{value:g,enumerable:!1,configurable:!0})},delete:function(a){delete a[this.id]}};jsGlobal.WeakMap=a}})();var p=function(){function a(){"undefined"!==typeof ShumwayCom&&ShumwayCom.getWeakMapKeys?(this._map=new WeakMap,this._id=0,this._newAdditions=[]):this._list=[]}a.prototype.clear=function(){this._map?this._map.clear():this._list.length=0};a.prototype.push=function(a){this._map?(this._map.set(a,
  this._id++),this._newAdditions.forEach(function(b){b.push(a)})):this._list.push(a)};a.prototype.remove=function(a){this._map?this._map.delete(a):this._list[this._list.indexOf(a)]=null};a.prototype.forEach=function(a){if(this._map){var b=[];this._newAdditions.push(b);var k=this._map,h=ShumwayCom.getWeakMapKeys(k);h.sort(function(a,c){return k.get(a)-k.get(c)});h.forEach(function(c){0!==c._referenceCount&&a(c)});b.forEach(function(c){0!==c._referenceCount&&a(c)});this._newAdditions.splice(this._newAdditions.indexOf(b),
  1)}else{for(var b=this._list,c=0,h=0;h<b.length;h++){var m=b[h];m&&(0===m._referenceCount?(b[h]=null,c++):a(m))}if(16<c&&c>b.length>>2){c=[];for(h=0;h<b.length;h++)(m=b[h])&&0<m._referenceCount&&c.push(m);this._list=c}}};Object.defineProperty(a.prototype,"length",{get:function(){return this._map?-1:this._list.length},enumerable:!0,configurable:!0});return a}();d.WeakList=p;var b;(function(a){a.pow2=function(a){return a===(a|0)?0>a?1/(1<<-a):1<<a:Math.pow(2,a)};a.clamp=function(a,b,k){return Math.max(b,
  Math.min(k,a))};a.roundHalfEven=function(a){if(.5===Math.abs(a%1)){var b=Math.floor(a);return 0===b%2?b:Math.ceil(a)}return Math.round(a)};a.altTieBreakRound=function(a,b){return.5!==Math.abs(a%1)||b?Math.round(a):a|0};a.epsilonEquals=function(a,b){return 1E-7>Math.abs(a-b)}})(b=d.NumberUtilities||(d.NumberUtilities={}));var x;(function(a){function g(a){return 256*a<<16>>16}function b(a){return a/256}var k=new ArrayBuffer(8);a.i8=new Int8Array(k);a.u8=new Uint8Array(k);a.i32=new Int32Array(k);a.f32=
  new Float32Array(k);a.f64=new Float64Array(k);a.nativeLittleEndian=1===(new Int8Array((new Int32Array([1])).buffer))[0];a.floatToInt32=function(g){a.f32[0]=g;return a.i32[0]};a.int32ToFloat=function(g){a.i32[0]=g;return a.f32[0]};a.swap16=function(a){return(a&255)<<8|a>>8&255};a.swap32=function(a){return(a&255)<<24|(a&65280)<<8|a>>8&65280|a>>24&255};a.toS8U8=g;a.fromS8U8=b;a.clampS8U8=function(a){return b(g(a))};a.toS16=function(a){return a<<16>>16};a.bitCount=function(a){a-=a>>1&1431655765;a=(a&
  858993459)+(a>>2&858993459);return 16843009*(a+(a>>4)&252645135)>>24};a.ones=function(a){a-=a>>1&1431655765;a=(a&858993459)+(a>>2&858993459);return 16843009*(a+(a>>4)&252645135)>>24};a.trailingZeros=function(g){return a.ones((g&-g)-1)};a.getFlags=function(a,c){var g="";for(a=0;a<c.length;a++)a&1<<a&&(g+=c[a]+" ");return 0===g.length?"":g.trim()};a.isPowerOfTwo=function(a){return a&&0===(a&a-1)};a.roundToMultipleOfFour=function(a){return a+3&-4};a.nearestPowerOfTwo=function(a){a--;a|=a>>1;a|=a>>2;
  a|=a>>4;a|=a>>8;a|=a>>16;a++;return a};a.roundToMultipleOfPowerOfTwo=function(a,c){var g=(1<<c)-1;return a+g&~g};a.toHEX=function(a){return"0x"+("00000000"+(0>a?4294967295+a+1:a).toString(16)).substr(-8)};Math.imul||(Math.imul=function(a,c){var g=a&65535,e=c&65535;return g*e+((a>>>16&65535)*e+g*(c>>>16&65535)<<16>>>0)|0});Math.clz32||(Math.clz32=function(g){g|=g>>1;g|=g>>2;g|=g>>4;g|=g>>8;return 32-a.ones(g|g>>16)})})(x=d.IntegerUtilities||(d.IntegerUtilities={}));p=function(){function a(g,b){void 0===
  g&&(g=!1);this._tab="  ";this._padding="";this._suppressOutput=g;this._out=b||a._consoleOut;this._outNoNewline=b||a._consoleOutNoNewline}Object.defineProperty(a.prototype,"suppressOutput",{get:function(){return this._suppressOutput},set:function(a){this._suppressOutput=a},enumerable:!0,configurable:!0});a.prototype.write=function(a,b){void 0===a&&(a="");void 0===b&&(b=!1);this._suppressOutput||this._outNoNewline((b?this._padding:"")+a)};a.prototype.writeLn=function(a){void 0===a&&(a="");this._suppressOutput||
  this._out(this._padding+a)};a.prototype.writeObject=function(a,b){void 0===a&&(a="");this._suppressOutput||this._out(this._padding+a,b)};a.prototype.writeTimeLn=function(a){void 0===a&&(a="");this._suppressOutput||this._out(this._padding+performance.now().toFixed(2)+" "+a)};a.prototype.writeComment=function(a){a=(a||"").split("\n");if(1===a.length)this.writeLn("// "+a[0]);else{this.writeLn("/**");for(var b=0;b<a.length;b++)this.writeLn(" * "+a[b]);this.writeLn(" */")}};a.prototype.writeLns=function(a){a=
  (a||"").split("\n");for(var b=0;b<a.length;b++)this.writeLn(a[b])};a.prototype.errorLn=function(g){a.logLevel&1&&this.boldRedLn(g)};a.prototype.warnLn=function(g){a.logLevel&2&&this.yellowLn(g)};a.prototype.debugLn=function(g){a.logLevel&4&&this.purpleLn(g)};a.prototype.logLn=function(g){a.logLevel&8&&this.writeLn(g)};a.prototype.infoLn=function(g){a.logLevel&16&&this.writeLn(g)};a.prototype.yellowLn=function(g){this.colorLn(a.YELLOW,g)};a.prototype.greenLn=function(g){this.colorLn(a.GREEN,g)};a.prototype.boldRedLn=
  function(g){this.colorLn(a.BOLD_RED,g)};a.prototype.redLn=function(g){this.colorLn(a.RED,g)};a.prototype.purpleLn=function(g){this.colorLn(a.PURPLE,g)};a.prototype.colorLn=function(g,b){this._suppressOutput||(inBrowser?this._out(this._padding+b):this._out(this._padding+g+b+a.ENDC))};a.prototype.redLns=function(g){this.colorLns(a.RED,g)};a.prototype.colorLns=function(a,b){for(var k=(b||"").split("\n"),h=0;h<k.length;h++)this.colorLn(a,k[h])};a.prototype.enter=function(a){this._suppressOutput||this._out(this._padding+
  a);this.indent()};a.prototype.leaveAndEnter=function(a){this.leave(a);this.indent()};a.prototype.leave=function(a){this.outdent();!this._suppressOutput&&a&&this._out(this._padding+a)};a.prototype.indent=function(){this._padding+=this._tab};a.prototype.outdent=function(){0<this._padding.length&&(this._padding=this._padding.substring(0,this._padding.length-this._tab.length))};a.prototype.writeArray=function(a,b,k){void 0===b&&(b=!1);void 0===k&&(k=!1);b=b||!1;for(var h=0,c=a.length;h<c;h++){var m="";
  b&&(m=null===a[h]?"null":void 0===a[h]?"undefined":a[h].constructor.name,m+=" ");var e=k?"":(""+h).padRight(" ",4);this.writeLn(e+m+a[h])}};a.PURPLE="\u001b[94m";a.YELLOW="\u001b[93m";a.GREEN="\u001b[92m";a.RED="\u001b[91m";a.BOLD_RED="\u001b[1;91m";a.ENDC="\u001b[0m";a.logLevel=31;a._consoleOut=console.log.bind(console);a._consoleOutNoNewline=console.log.bind(console);return a}();d.IndentingWriter=p;p=function(){function a(a,b){void 0===b&&(b=12);this.start=this.index=0;this._size=1<<b;this._mask=
  this._size-1;this.array=new a(this._size)}a.prototype.get=function(a){return this.array[a]};a.prototype.forEachInReverse=function(a){if(!this.isEmpty())for(var b=0===this.index?this._size-1:this.index-1,k=this.start-1&this._mask;b!==k&&!a(this.array[b],b);)b=0===b?this._size-1:b-1};a.prototype.write=function(a){this.array[this.index]=a;this.index=this.index+1&this._mask;this.index===this.start&&(this.start=this.start+1&this._mask)};a.prototype.isFull=function(){return(this.index+1&this._mask)===this.start};
  a.prototype.isEmpty=function(){return this.index===this.start};a.prototype.reset=function(){this.start=this.index=0};return a}();d.CircularBuffer=p;p=function(){function a(){}a.randomStyle=function(){a._randomStyleCache||(a._randomStyleCache="#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" "));
  return a._randomStyleCache[a._nextStyle++%a._randomStyleCache.length]};a.gradientColor=function(g){return a._gradient[a._gradient.length*b.clamp(g,0,1)|0]};a.contrastStyle=function(a){a=parseInt(a.substr(1),16);return 128<=(299*(a>>16)+587*(a>>8&255)+114*(a&255))/1E3?"#000000":"#ffffff"};a.reset=function(){a._nextStyle=0};a.TabToolbar="#252c33";a.Toolbars="#343c45";a.HighlightBlue="#1d4f73";a.LightText="#f5f7fa";a.ForegroundText="#b6babf";a.Black="#000000";a.VeryDark="#14171a";a.Dark="#181d20";a.Light=
  "#a9bacb";a.Grey="#8fa1b2";a.DarkGrey="#5f7387";a.Blue="#46afe3";a.Purple="#6b7abb";a.Pink="#df80ff";a.Red="#eb5368";a.Orange="#d96629";a.LightOrange="#d99b28";a.Green="#70bf53";a.BlueGrey="#5e88b0";a._nextStyle=0;a._gradient="#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" ");return a}();d.ColorStyle=
  p;p=function(){function a(a,b,k,h){this.xMin=a|0;this.yMin=b|0;this.xMax=k|0;this.yMax=h|0}a.FromUntyped=function(g){return new a(g.xMin,g.yMin,g.xMax,g.yMax)};a.FromRectangle=function(g){return new a(20*g.x|0,20*g.y|0,20*(g.x+g.width)|0,20*(g.y+g.height)|0)};a.prototype.setElements=function(a,b,k,h){this.xMin=a;this.yMin=b;this.xMax=k;this.yMax=h};a.prototype.copyFrom=function(a){this.setElements(a.xMin,a.yMin,a.xMax,a.yMax)};a.prototype.contains=function(a,b){return a<this.xMin!==a<this.xMax&&b<
  this.yMin!==b<this.yMax};a.prototype.unionInPlace=function(a){a.isEmpty()||(this.extendByPoint(a.xMin,a.yMin),this.extendByPoint(a.xMax,a.yMax))};a.prototype.extendByPoint=function(a,b){this.extendByX(a);this.extendByY(b)};a.prototype.extendByX=function(a){134217728===this.xMin?this.xMin=this.xMax=a:(this.xMin=Math.min(this.xMin,a),this.xMax=Math.max(this.xMax,a))};a.prototype.extendByY=function(a){134217728===this.yMin?this.yMin=this.yMax=a:(this.yMin=Math.min(this.yMin,a),this.yMax=Math.max(this.yMax,
  a))};a.prototype.intersects=function(a){return this.contains(a.xMin,a.yMin)||this.contains(a.xMax,a.yMax)};a.prototype.isEmpty=function(){return this.xMax<=this.xMin||this.yMax<=this.yMin};Object.defineProperty(a.prototype,"width",{get:function(){return this.xMax-this.xMin},set:function(a){this.xMax=this.xMin+a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this.yMax-this.yMin},set:function(a){this.yMax=this.yMin+a},enumerable:!0,configurable:!0});
  a.prototype.getBaseWidth=function(a){var b=Math.abs(Math.cos(a));a=Math.abs(Math.sin(a));return b*(this.xMax-this.xMin)+a*(this.yMax-this.yMin)};a.prototype.getBaseHeight=function(a){var b=Math.abs(Math.cos(a));return Math.abs(Math.sin(a))*(this.xMax-this.xMin)+b*(this.yMax-this.yMin)};a.prototype.setEmpty=function(){this.xMin=this.yMin=this.xMax=this.yMax=0};a.prototype.setToSentinels=function(){this.xMin=this.yMin=this.xMax=this.yMax=134217728};a.prototype.clone=function(){return new a(this.xMin,
  this.yMin,this.xMax,this.yMax)};a.prototype.toString=function(){return"{ xMin: "+this.xMin+", xMin: "+this.yMin+", xMax: "+this.xMax+", xMax: "+this.yMax+" }"};return a}();d.Bounds=p;p=function(){function a(a,b,k,h){w.assert(f(a));w.assert(f(b));w.assert(f(k));w.assert(f(h));this._xMin=a|0;this._yMin=b|0;this._xMax=k|0;this._yMax=h|0}a.FromUntyped=function(g){return new a(g.xMin,g.yMin,g.xMax,g.yMax)};a.FromRectangle=function(g){return new a(20*g.x|0,20*g.y|0,20*(g.x+g.width)|0,20*(g.y+g.height)|
  0)};a.prototype.setElements=function(a,b,k,h){this.xMin=a;this.yMin=b;this.xMax=k;this.yMax=h};a.prototype.copyFrom=function(a){this.setElements(a.xMin,a.yMin,a.xMax,a.yMax)};a.prototype.contains=function(a,b){return a<this.xMin!==a<this.xMax&&b<this.yMin!==b<this.yMax};a.prototype.unionInPlace=function(a){a.isEmpty()||(this.extendByPoint(a.xMin,a.yMin),this.extendByPoint(a.xMax,a.yMax))};a.prototype.extendByPoint=function(a,b){this.extendByX(a);this.extendByY(b)};a.prototype.extendByX=function(a){134217728===
  this.xMin?this.xMin=this.xMax=a:(this.xMin=Math.min(this.xMin,a),this.xMax=Math.max(this.xMax,a))};a.prototype.extendByY=function(a){134217728===this.yMin?this.yMin=this.yMax=a:(this.yMin=Math.min(this.yMin,a),this.yMax=Math.max(this.yMax,a))};a.prototype.intersects=function(a){return this.contains(a._xMin,a._yMin)||this.contains(a._xMax,a._yMax)};a.prototype.isEmpty=function(){return this._xMax<=this._xMin||this._yMax<=this._yMin};Object.defineProperty(a.prototype,"xMin",{get:function(){return this._xMin},
  set:function(a){w.assert(f(a));this._xMin=a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"yMin",{get:function(){return this._yMin},set:function(a){w.assert(f(a));this._yMin=a|0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"xMax",{get:function(){return this._xMax},set:function(a){w.assert(f(a));this._xMax=a|0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._xMax-this._xMin},enumerable:!0,configurable:!0});
  Object.defineProperty(a.prototype,"yMax",{get:function(){return this._yMax},set:function(a){w.assert(f(a));this._yMax=a|0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._yMax-this._yMin},enumerable:!0,configurable:!0});a.prototype.getBaseWidth=function(a){var b=Math.abs(Math.cos(a));a=Math.abs(Math.sin(a));return b*(this._xMax-this._xMin)+a*(this._yMax-this._yMin)};a.prototype.getBaseHeight=function(a){var b=Math.abs(Math.cos(a));return Math.abs(Math.sin(a))*
  (this._xMax-this._xMin)+b*(this._yMax-this._yMin)};a.prototype.setEmpty=function(){this._xMin=this._yMin=this._xMax=this._yMax=0};a.prototype.clone=function(){return new a(this.xMin,this.yMin,this.xMax,this.yMax)};a.prototype.toString=function(){return"{ xMin: "+this._xMin+", yMin: "+this._yMin+", xMax: "+this._xMax+", yMax: "+this._yMax+" }"};a.prototype.assertValid=function(){};return a}();d.DebugBounds=p;p=function(){function a(a,b,k,h){this.r=a;this.g=b;this.b=k;this.a=h}a.FromARGB=function(b){return new a((b>>
  16&255)/255,(b>>8&255)/255,(b>>0&255)/255,(b>>24&255)/255)};a.FromRGBA=function(b){return a.FromARGB(t.RGBAToARGB(b))};a.prototype.toRGBA=function(){return 255*this.r<<24|255*this.g<<16|255*this.b<<8|255*this.a};a.prototype.toCSSStyle=function(){return t.rgbaToCSSStyle(this.toRGBA())};a.prototype.set=function(a){this.r=a.r;this.g=a.g;this.b=a.b;this.a=a.a};a.randomColor=function(b){void 0===b&&(b=1);return new a(Math.random(),Math.random(),Math.random(),b)};a.parseColor=function(b){a.colorCache||
  (a.colorCache=Object.create(null));if(a.colorCache[b])return a.colorCache[b];var k=document.createElement("span");document.body.appendChild(k);k.style.backgroundColor=b;var d=getComputedStyle(k).backgroundColor;document.body.removeChild(k);(k=/^rgb\((\d+), (\d+), (\d+)\)$/.exec(d))||(k=/^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(d));d=new a(0,0,0,0);d.r=parseFloat(k[1])/255;d.g=parseFloat(k[2])/255;d.b=parseFloat(k[3])/255;d.a=k[4]?parseFloat(k[4])/255:1;return a.colorCache[b]=d};a.Red=new a(1,
  0,0,1);a.Green=new a(0,1,0,1);a.Blue=new a(0,0,1,1);a.None=new a(0,0,0,0);a.White=new a(1,1,1,1);a.Black=new a(0,0,0,1);a.colorCache={};return a}();d.Color=p;var t;(function(a){function b(a){var c=a>>0&255,m=a>>8&255,h=a>>24&255;a=(Math.imul(a>>16&255,h)+127)/255|0;m=(Math.imul(m,h)+127)/255|0;c=(Math.imul(c,h)+127)/255|0;return h<<24|a<<16|m<<8|c}function p(){if(!c){c=new Uint8Array(65536);for(var a=0;256>a;a++)for(var m=0;256>m;m++)c[(m<<8)+a]=Math.imul(255,a)/m}}a.RGBAToARGB=function(a){return a>>
  8&16777215|(a&255)<<24};a.ARGBToRGBA=function(a){return a<<8|a>>24&255};var t=new F(1024);a.rgbaToCSSStyle=function(a){var c=t.get(a);if("string"===typeof c)return c;c=d.StringUtilities.concat9("rgba(",a>>24&255,",",a>>16&255,",",a>>8&255,",",(a&255)/255,")");t.set(a,c);return c};var h=new F(1024);a.cssStyleToRGBA=function(a){var c=h.get(a);if("number"===typeof c)return c;c=4278190335;if("#"===a[0])7===a.length&&(c=parseInt(a.substring(1),16)<<8|255);else if("r"===a[0])var m=a.substring(5,a.length-
  1).split(","),c=parseInt(m[0]),b=parseInt(m[1]),g=parseInt(m[2]),m=parseFloat(m[3]),c=(c&255)<<24|(b&255)<<16|(g&255)<<8|255*m&255;h.set(a,c);return c};a.hexToRGB=function(a){return parseInt(a.slice(1),16)};a.rgbToHex=function(a){return"#"+("000000"+(a>>>0).toString(16)).slice(-6)};a.isValidHexColor=function(a){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(a)};a.clampByte=function(a){return Math.max(0,Math.min(255,a))};a.unpremultiplyARGB=function(a){var c=a>>0&255,m=a>>8&255,b=a>>24&255;a=Math.imul(255,
  a>>16&255)/b&255;m=Math.imul(255,m)/b&255;c=Math.imul(255,c)/b&255;return b<<24|a<<16|m<<8|c};a.premultiplyARGB=b;var c;a.ensureUnpremultiplyTable=p;a.getUnpremultiplyTable=function(){p();return c};a.tableLookupUnpremultiplyARGB=function(a){a|=0;var m=a>>24&255;if(0===m)return 0;if(255===m)return a;var b,h,g=m<<8,y=c;h=y[g+(a>>16&255)];b=y[g+(a>>8&255)];a=y[g+(a>>0&255)];return m<<24|h<<16|b<<8|a};a.blendPremultipliedBGRA=function(a,c){var m=c&16711935,b=c>>8&16711935,h,g=a>>8&16711935,u=256-(c&255);
  h=Math.imul(a&16711935,u)>>8;g=Math.imul(g,u)>>8;return(b+g&16711935)<<8|m+h&16711935};var m=x.swap32;a.convertImage=function(a,h,E,p){var x=E.length;if(a===h){if(E!==p)for(a=0;a<x;a++)p[a]=E[a]}else if(a===k.PremultipliedAlphaARGB&&h===k.StraightAlphaRGBA)for(d.ColorUtilities.ensureUnpremultiplyTable(),a=0;a<x;a++){var y=E[a];h=y&255;if(0===h)p[a]=0;else if(255===h)p[a]=4278190080|y>>8&16777215;else{var u=y>>24&255,v=y>>16&255,y=y>>8&255,r=h<<8,n=c,y=n[r+y],v=n[r+v],u=n[r+u];p[a]=h<<24|u<<16|v<<
  8|y}}else if(a===k.StraightAlphaARGB&&h===k.StraightAlphaRGBA)for(a=0;a<x;a++)p[a]=m(E[a]);else if(a===k.StraightAlphaRGBA&&h===k.PremultipliedAlphaARGB)for(a=0;a<x;a++)h=E[a],p[a]=m(b(h&4278255360|h>>16&255|(h&255)<<16));else for(a=0;a<x;a++)p[a]=E[a]}})(t=d.ColorUtilities||(d.ColorUtilities={}));p=function(){function a(a){void 0===a&&(a=32);this._list=[];this._maxSize=a}a.prototype.acquire=function(b){if(a._enabled)for(var k=this._list,d=0;d<k.length;d++){var h=k[d];if(h.byteLength>=b)return k.splice(d,
  1),h}return new ArrayBuffer(b)};a.prototype.release=function(b){if(a._enabled){var k=this._list;k.length===this._maxSize&&k.shift();k.push(b)}};a.prototype.ensureUint8ArrayLength=function(a,b){if(a.length>=b)return a;var k=Math.max(a.length+b,(3*a.length>>1)+1),k=new Uint8Array(this.acquire(k),0,k);k.set(a);this.release(a.buffer);return k};a.prototype.ensureFloat64ArrayLength=function(a,b){if(a.length>=b)return a;var k=Math.max(a.length+b,(3*a.length>>1)+1),k=new Float64Array(this.acquire(k*Float64Array.BYTES_PER_ELEMENT),
  0,k);k.set(a);this.release(a.buffer);return k};a._enabled=!0;return a}();d.ArrayBufferPool=p;(function(a){a.instance})(d.Telemetry||(d.Telemetry={}));(function(a){a.instance})(d.FileLoadingService||(d.FileLoadingService={}));(function(a){a.instance})(d.SystemResourcesLoadingService||(d.SystemResourcesLoadingService={}));d.registerCSSFont=function(a,b,k){if(inBrowser){var p=document.head;p.insertBefore(document.createElement("style"),p.firstChild);p=document.styleSheets[0];b="@font-face{font-family:swffont"+
  a+";src:url(data:font/opentype;base64,"+d.StringUtilities.base64EncodeBytes(b)+")}";p.insertRule(b,p.cssRules.length);k&&(k=document.createElement("div"),k.style.fontFamily="swffont"+a,k.innerHTML="hello",document.body.appendChild(k),document.body.removeChild(k))}else w.warning("Cannot register CSS font outside the browser")};(function(a){a.instance={enabled:!1,initJS:function(a){},registerCallback:function(a){},unregisterCallback:function(a){},eval:function(a){},call:function(a){},getId:function(){return null}}})(d.ExternalInterfaceService||
  (d.ExternalInterfaceService={}));(function(a){a.instance})(d.LocalConnectionService||(d.LocalConnectionService={}));(function(a){a.instance={setClipboard:function(a){}}})(d.ClipboardService||(d.ClipboardService={}));p=function(){function a(){this._queues={}}a.prototype.register=function(a,b){w.assert(a);w.assert(b);var k=this._queues[a];if(k){if(-1<k.indexOf(b))return}else k=this._queues[a]=[];k.push(b)};a.prototype.unregister=function(a,b){w.assert(a);w.assert(b);var k=this._queues[a];if(k){var h=
  k.indexOf(b);-1!==h&&k.splice(h,1);0===k.length&&(this._queues[a]=null)}};a.prototype.notify=function(a,b){var k=this._queues[a];if(k){k=k.slice();b=Array.prototype.slice.call(arguments,0);for(var h=0;h<k.length;h++)k[h].apply(null,b)}};a.prototype.notify1=function(a,b){var k=this._queues[a];if(k)for(var k=k.slice(),h=0;h<k.length;h++)(0,k[h])(a,b)};return a}();d.Callback=p;(function(a){a[a.None=0]="None";a[a.PremultipliedAlphaARGB=1]="PremultipliedAlphaARGB";a[a.StraightAlphaARGB=2]="StraightAlphaARGB";
  a[a.StraightAlphaRGBA=3]="StraightAlphaRGBA";a[a.JPEG=4]="JPEG";a[a.PNG=5]="PNG";a[a.GIF=6]="GIF"})(d.ImageType||(d.ImageType={}));var k=d.ImageType;d.getMIMETypeForImageType=function(a){switch(a){case k.JPEG:return"image/jpeg";case k.PNG:return"image/png";case k.GIF:return"image/gif";default:return"text/plain"}};(function(a){a.toCSSCursor=function(a){switch(a){case 0:return"auto";case 2:return"pointer";case 3:return"grab";case 4:return"text";default:return"default"}}})(d.UI||(d.UI={}));p=function(){function a(){this.promise=
  new Promise(function(a,b){this.resolve=a;this.reject=b}.bind(this))}a.prototype.then=function(a,b){return this.promise.then(a,b)};return a}();d.PromiseWrapper=p})(Shumway||(Shumway={}));"undefined"!==typeof exports&&(exports.Shumway=Shumway);
  (function(){function d(d,C,q){d[C]||Object.defineProperty(d,C,{value:q,writable:!0,configurable:!0,enumerable:!1})}d(String.prototype,"padRight",function(d,C){var q=this,B=q.replace(/\033\[[0-9]*m/g,"").length;if(!d||B>=C)return q;for(var B=(C-B)/d.length,w=0;w<B;w++)q+=d;return q});d(String.prototype,"padLeft",function(d,C){var q=this,B=q.length;if(!d||B>=C)return q;for(var B=(C-B)/d.length,w=0;w<B;w++)q=d+q;return q});d(String.prototype,"trim",function(){return this.replace(/^\s+|\s+$/g,"")});d(String.prototype,
  "endsWith",function(d){return-1!==this.indexOf(d,this.length-d.length)});d(Array.prototype,"replace",function(d,C){if(d===C)return 0;for(var q=0,B=0;B<this.length;B++)this[B]===d&&(this[B]=C,q++);return q})})();
  (function(d){(function(f){var q=d.isObject,B=function(){function d(b,p,t,k){this.shortName=b;this.longName=p;this.type=t;k=k||{};this.positional=k.positional;this.parseFn=k.parse;this.value=k.defaultValue}d.prototype.parse=function(b){this.value="boolean"===this.type?b:"number"===this.type?parseInt(b,10):b;this.parseFn&&this.parseFn(this.value)};return d}();f.Argument=B;var w=function(){function d(){this.args=[]}d.prototype.addArgument=function(b,d,p,k){b=new B(b,d,p,k);this.args.push(b);return b};
  d.prototype.addBoundOption=function(b){this.args.push(new B(b.shortName,b.longName,b.type,{parse:function(d){b.value=d}}))};d.prototype.addBoundOptionSet=function(b){var d=this;b.options.forEach(function(b){F.isOptionSet(b)?d.addBoundOptionSet(b):d.addBoundOption(b)})};d.prototype.getUsage=function(){var b="";this.args.forEach(function(d){b=d.positional?b+d.longName:b+("[-"+d.shortName+"|--"+d.longName+("boolean"===d.type?"":" "+d.type[0].toUpperCase())+"]");b+=" "});return b};d.prototype.parse=function(b){var d=
  {},p=[];this.args.forEach(function(a){a.positional?p.push(a):(d["-"+a.shortName]=a,d["--"+a.longName]=a)});for(var k=[];b.length;){var a=b.shift(),g=null,f=a;if("--"==a){k=k.concat(b);break}else if("-"==a.slice(0,1)||"--"==a.slice(0,2)){g=d[a];if(!g)continue;f="boolean"!==g.type?b.shift():b.length&&0<="yes no true false t f".split(" ").indexOf(b[0])?0<=["yes","true","t"].indexOf(b.shift()):!0}else p.length?g=p.shift():k.push(f);g&&g.parse(f)}return k};return d}();f.ArgumentParser=w;var F=function(){function d(b,
  p){void 0===p&&(p=null);this.open=!1;this.name=b;this.settings=p||{};this.options=[]}d.isOptionSet=function(b){return b instanceof d?!0:"object"!==typeof b||null===b||b instanceof G?!1:"options"in b&&"name"in b&&"settings"in b};d.prototype.register=function(b){if(d.isOptionSet(b))for(var x=0;x<this.options.length;x++){var t=this.options[x];if(d.isOptionSet(t)&&t.name===b.name)return t}this.options.push(b);if(this.settings)if(d.isOptionSet(b))x=this.settings[b.name],q(x)&&(b.settings=x.settings,b.open=
  x.open);else if("undefined"!==typeof this.settings[b.longName])switch(b.type){case "boolean":b.value=!!this.settings[b.longName];break;case "number":b.value=+this.settings[b.longName];break;default:b.value=this.settings[b.longName]}return b};d.prototype.trace=function(b){b.enter(this.name+" {");this.options.forEach(function(d){d.trace(b)});b.leave("}")};d.prototype.getSettings=function(){var b={};this.options.forEach(function(x){d.isOptionSet(x)?b[x.name]={settings:x.getSettings(),open:x.open}:b[x.longName]=
  x.value});return b};d.prototype.setSettings=function(b){b&&this.options.forEach(function(x){d.isOptionSet(x)?x.name in b&&x.setSettings(b[x.name].settings):x.longName in b&&(x.value=b[x.longName])})};return d}();f.OptionSet=F;var G=function(){function d(b,p,t,k,a,g){void 0===g&&(g=null);this.longName=p;this.shortName=b;this.type=t;this.value=this.defaultValue=k;this.description=a;this.config=g}d.prototype.parse=function(b){this.value=b};d.prototype.trace=function(b){b.writeLn(("-"+this.shortName+
  "|--"+this.longName).padRight(" ",30)+" = "+this.type+" "+this.value+" ["+this.defaultValue+"] ("+this.description+")")};return d}();f.Option=G})(d.Options||(d.Options={}));(function(f){f.ROOT="Shumway Options";f.shumwayOptions=new d.Options.OptionSet(f.ROOT);f.setSettings=function(d){f.shumwayOptions.setSettings(d)};f.getSettings=function(){return f.shumwayOptions.getSettings()}})(d.Settings||(d.Settings={}));var f=d.Options.Option;d.loggingOptions=d.Settings.shumwayOptions.register(new d.Options.OptionSet("Logging Options"));
  d.omitRepeatedWarnings=d.loggingOptions.register(new f("wo","warnOnce","boolean",!0,"Omit Repeated Warnings"));(function(f){var q=function(){function f(w,q){this._parent=w;this._timers=d.ObjectUtilities.createMap();this._name=q;this._count=this._total=this._last=this._begin=0}f.time=function(d,q){f.start(d);q();f.stop()};f.start=function(d){f._top=f._top._timers[d]||(f._top._timers[d]=new f(f._top,d));f._top.start();d=f._flat._timers[d]||(f._flat._timers[d]=new f(f._flat,d));d.start();f._flatStack.push(d)};
  f.stop=function(){f._top.stop();f._top=f._top._parent;f._flatStack.pop().stop()};f.stopStart=function(d){f.stop();f.start(d)};f.prototype.start=function(){this._begin=d.getTicks()};f.prototype.stop=function(){this._last=d.getTicks()-this._begin;this._total+=this._last;this._count+=1};f.prototype.toJSON=function(){return{name:this._name,total:this._total,timers:this._timers}};f.prototype.trace=function(d){d.enter(this._name+": "+this._total.toFixed(2)+" ms, count: "+this._count+", average: "+(this._total/
  this._count).toFixed(2)+" ms");for(var f in this._timers)this._timers[f].trace(d);d.outdent()};f.trace=function(d){f._base.trace(d);f._flat.trace(d)};f._base=new f(null,"Total");f._top=f._base;f._flat=new f(null,"Flat");f._flatStack=[];return f}();f.Timer=q;q=function(){function f(d){this._enabled=d;this.clear()}Object.defineProperty(f.prototype,"counts",{get:function(){return this._counts},enumerable:!0,configurable:!0});f.prototype.setEnabled=function(d){this._enabled=d};f.prototype.clear=function(){this._counts=
  d.ObjectUtilities.createMap();this._times=d.ObjectUtilities.createMap()};f.prototype.toJSON=function(){return{counts:this._counts,times:this._times}};f.prototype.count=function(d,f,G){void 0===f&&(f=1);void 0===G&&(G=0);if(this._enabled)return void 0===this._counts[d]&&(this._counts[d]=0,this._times[d]=0),this._counts[d]+=f,this._times[d]+=G,this._counts[d]};f.prototype.trace=function(d){for(var f in this._counts)d.writeLn(f+": "+this._counts[f])};f.prototype._pairToString=function(d,f){var G=f[0],
  p=f[1],b=d[G],G=G+": "+p;b&&(G+=", "+b.toFixed(4),1<p&&(G+=" ("+(b/p).toFixed(4)+")"));return G};f.prototype.toStringSorted=function(){var d=this,f=this._times,G=[],p;for(p in this._counts)G.push([p,this._counts[p]]);G.sort(function(b,d){return d[1]-b[1]});return G.map(function(b){return d._pairToString(f,b)}).join(", ")};f.prototype.traceSorted=function(d,f){void 0===f&&(f=!1);var G=this,p=this._times,b=[],x;for(x in this._counts)b.push([x,this._counts[x]]);b.sort(function(b,d){return d[1]-b[1]});
  f?d.writeLn(b.map(function(b){return G._pairToString(p,b)}).join(", ")):b.forEach(function(b){d.writeLn(G._pairToString(p,b))})};f.instance=new f(!0);return f}();f.Counter=q;q=function(){function d(f){this._samples=new Float64Array(f);this._index=this._count=0}d.prototype.push=function(d){this._count<this._samples.length&&this._count++;this._index++;this._samples[this._index%this._samples.length]=d};d.prototype.average=function(){for(var d=0,f=0;f<this._count;f++)d+=this._samples[f];return d/this._count};
  return d}();f.Average=q})(d.Metrics||(d.Metrics={}))})(Shumway||(Shumway={}));var __extends=this&&this.__extends||function(d,f){function C(){this.constructor=d}for(var q in f)f.hasOwnProperty(q)&&(d[q]=f[q]);C.prototype=f.prototype;d.prototype=new C};
  (function(d){(function(f){function p(a){for(var c=Math.max.apply(null,a),l=a.length,e=1<<c,n=new Uint32Array(e),m=c<<16|65535,b=0;b<e;b++)n[b]=m;for(var m=0,b=1,z=2;b<=c;m<<=1,++b,z<<=1)for(var r=0;r<l;++r)if(a[r]===b){for(var h=0,I=0;I<b;++I)h=2*h+(m>>I&1);for(I=h;I<e;I+=z)n[I]=b<<16|r;++m}return{codes:n,maxBits:c}}function b(a){for(var c=new Uint16Array(a),l=0;l<a;l++)c[l]=1024;return c}function x(a,c,l,e){for(var n=1,m=0,b=0;b<l;b++)var z=e.decodeBit(a,n+c),n=(n<<1)+z,m=m|z<<b;return m}function t(a,
  c){var l=[];l.length=c;for(var e=0;e<c;e++)l[e]=new z(a);return l}function k(a){return"string"===typeof a?a:void 0==a?null:a+""}var a;(function(a){a[a.INIT=0]="INIT";a[a.BLOCK_0=1]="BLOCK_0";a[a.BLOCK_1=2]="BLOCK_1";a[a.BLOCK_2_PRE=3]="BLOCK_2_PRE";a[a.BLOCK_2=4]="BLOCK_2";a[a.DONE=5]="DONE";a[a.ERROR=6]="ERROR";a[a.VERIFY_HEADER=7]="VERIFY_HEADER"})(a||(a={}));var g=function(){function a(c){}a.prototype.push=function(a){};a.prototype.close=function(){};a.create=function(a){return"undefined"!==typeof ShumwayCom&&
  ShumwayCom.createSpecialInflate?new H(a,ShumwayCom.createSpecialInflate):new q(a)};a.prototype._processZLibHeader=function(a,c,l){if(c+2>l)return 0;a=a[c]<<8|a[c+1];c=null;2048!==(a&3840)?c="inflate: unknown compression method":0!==a%31?c="inflate: bad FCHECK":0!==(a&32)&&(c="inflate: FDICT bit set");if(c){if(this.onError)this.onError(c);return-1}return 2};a.inflate=function(c,l,e){var n=new Uint8Array(l),m=0;l=a.create(e);l.onData=function(a){var c=Math.min(a.length,n.length-m);c&&f.memCopy(n,a,
  m,0,c);m+=c};l.onError=function(a){throw Error(a);};l.push(c);l.close();return n};return a}();f.Inflate=g;var q=function(l){function n(b){l.call(this,b);this._buffer=null;this._bitLength=this._bitBuffer=this._bufferPosition=this._bufferSize=0;this._window=new Uint8Array(65794);this._windowPosition=0;this._state=b?a.VERIFY_HEADER:a.INIT;this._isFinalBlock=!1;this._distanceTable=this._literalTable=null;this._block0Read=0;this._block2State=null;this._copyState={state:0,len:0,lenBits:0,dist:0,distBits:0};
  if(!K){C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);h=new Uint16Array(30);c=new Uint8Array(30);for(var z=b=0,r=1;30>b;++b)h[b]=r,r+=1<<(c[b]=~~((z+=2<b?1:0)/2));var I=new Uint8Array(288);for(b=0;32>b;++b)I[b]=5;m=p(I.subarray(0,32));e=new Uint16Array(29);A=new Uint8Array(29);z=b=0;for(r=3;29>b;++b)e[b]=r-(28==b?1:0),r+=1<<(A[b]=~~((z+=4<b?1:0)/4%6));for(b=0;288>b;++b)I[b]=144>b||279<b?8:256>b?9:7;E=p(I);K=!0}}__extends(n,l);n.prototype.push=function(c){if(!this._buffer||this._buffer.length<
  this._bufferSize+c.length){var l=new Uint8Array(this._bufferSize+c.length);this._buffer&&l.set(this._buffer);this._buffer=l}this._buffer.set(c,this._bufferSize);this._bufferSize+=c.length;this._bufferPosition=0;c=!1;do{l=this._windowPosition;if(this._state===a.INIT&&(c=this._decodeInitState()))break;switch(this._state){case a.BLOCK_0:c=this._decodeBlock0();break;case a.BLOCK_2_PRE:if(c=this._decodeBlock2Pre())break;case a.BLOCK_1:case a.BLOCK_2:c=this._decodeBlock();break;case a.ERROR:case a.DONE:this._bufferPosition=
  this._bufferSize;break;case a.VERIFY_HEADER:var e=this._processZLibHeader(this._buffer,this._bufferPosition,this._bufferSize);0<e?(this._bufferPosition+=e,this._state=a.INIT):0===e?c=!0:this._state=a.ERROR}if(0<this._windowPosition-l)this.onData(this._window.subarray(l,this._windowPosition));65536<=this._windowPosition&&("copyWithin"in this._buffer?this._window.copyWithin(0,this._windowPosition-32768,this._windowPosition):this._window.set(this._window.subarray(this._windowPosition-32768,this._windowPosition)),
  this._windowPosition=32768)}while(!c&&this._bufferPosition<this._bufferSize);this._bufferPosition<this._bufferSize?("copyWithin"in this._buffer?this._buffer.copyWithin(0,this._bufferPosition,this._bufferSize):this._buffer.set(this._buffer.subarray(this._bufferPosition,this._bufferSize)),this._bufferSize-=this._bufferPosition):this._bufferSize=0};n.prototype._decodeInitState=function(){if(this._isFinalBlock)return this._state=a.DONE,!1;var c=this._buffer,l=this._bufferSize,e=this._bitBuffer,n=this._bitLength,
  b=this._bufferPosition;if(3>(l-b<<3)+n)return!0;3>n&&(e|=c[b++]<<n,n+=8);var z=e&7,e=e>>3,n=n-3;switch(z>>1){case 0:n=e=0;if(4>l-b)return!0;var r=c[b]|c[b+1]<<8,c=c[b+2]|c[b+3]<<8,b=b+4;if(65535!==(r^c)){this._error("inflate: invalid block 0 length");c=a.ERROR;break}0===r?c=a.INIT:(this._block0Read=r,c=a.BLOCK_0);break;case 1:c=a.BLOCK_1;this._literalTable=E;this._distanceTable=m;break;case 2:if(26>(l-b<<3)+n)return!0;for(;14>n;)e|=c[b++]<<n,n+=8;r=(e>>10&15)+4;if((l-b<<3)+n<14+3*r)return!0;for(var l=
  {numLiteralCodes:(e&31)+257,numDistanceCodes:(e>>5&31)+1,codeLengthTable:void 0,bitLengths:void 0,codesRead:0,dupBits:0},e=e>>14,n=n-14,h=new Uint8Array(19),I=0;I<r;++I)3>n&&(e|=c[b++]<<n,n+=8),h[C[I]]=e&7,e>>=3,n-=3;for(;19>I;I++)h[C[I]]=0;l.bitLengths=new Uint8Array(l.numLiteralCodes+l.numDistanceCodes);l.codeLengthTable=p(h);this._block2State=l;c=a.BLOCK_2_PRE;break;default:return this._error("inflate: unsupported block type"),!1}this._isFinalBlock=!!(z&1);this._state=c;this._bufferPosition=b;
  this._bitBuffer=e;this._bitLength=n;return!1};n.prototype._error=function(a){if(this.onError)this.onError(a)};n.prototype._decodeBlock0=function(){var c=this._bufferPosition,l=this._windowPosition,e=this._block0Read,n=65794-l,m=this._bufferSize-c,b=m<e,z=Math.min(n,m,e);this._window.set(this._buffer.subarray(c,c+z),l);this._windowPosition=l+z;this._bufferPosition=c+z;this._block0Read=e-z;return e===z?(this._state=a.INIT,!1):b&&n<m};n.prototype._readBits=function(a){var c=this._bitBuffer,l=this._bitLength;
  if(a>l){var e=this._bufferPosition,n=this._bufferSize;do{if(e>=n)return this._bufferPosition=e,this._bitBuffer=c,this._bitLength=l,-1;c|=this._buffer[e++]<<l;l+=8}while(a>l);this._bufferPosition=e}this._bitBuffer=c>>a;this._bitLength=l-a;return c&(1<<a)-1};n.prototype._readCode=function(c){var l=this._bitBuffer,e=this._bitLength,n=c.maxBits;if(n>e){var m=this._bufferPosition,b=this._bufferSize;do{if(m>=b)return this._bufferPosition=m,this._bitBuffer=l,this._bitLength=e,-1;l|=this._buffer[m++]<<e;
  e+=8}while(n>e);this._bufferPosition=m}c=c.codes[l&(1<<n)-1];n=c>>16;if(c&32768)return this._error("inflate: invalid encoding"),this._state=a.ERROR,-1;this._bitBuffer=l>>n;this._bitLength=e-n;return c&65535};n.prototype._decodeBlock2Pre=function(){var c=this._block2State,l=c.numLiteralCodes+c.numDistanceCodes,e=c.bitLengths,n=c.codesRead,m=0<n?e[n-1]:0,b=c.codeLengthTable,z;if(0<c.dupBits){z=this._readBits(c.dupBits);if(0>z)return!0;for(;z--;)e[n++]=m;c.dupBits=0}for(;n<l;){var r=this._readCode(b);
  if(0>r)return c.codesRead=n,!0;if(16>r)e[n++]=m=r;else{var h;switch(r){case 16:h=2;z=3;r=m;break;case 17:z=h=3;r=0;break;case 18:h=7,z=11,r=0}for(;z--;)e[n++]=r;z=this._readBits(h);if(0>z)return c.codesRead=n,c.dupBits=h,!0;for(;z--;)e[n++]=r;m=r}}this._literalTable=p(e.subarray(0,c.numLiteralCodes));this._distanceTable=p(e.subarray(c.numLiteralCodes));this._state=a.BLOCK_2;this._block2State=null;return!1};n.prototype._decodeBlock=function(){var l=this._literalTable,n=this._distanceTable,m=this._window,
  b=this._windowPosition,z=this._copyState,r,I,u,d;if(0!==z.state)switch(z.state){case 1:if(0>(r=this._readBits(z.lenBits)))return!0;z.len+=r;z.state=2;case 2:if(0>(r=this._readCode(n)))return!0;z.distBits=c[r];z.dist=h[r];z.state=3;case 3:r=0;if(0<z.distBits&&0>(r=this._readBits(z.distBits)))return!0;d=z.dist+r;I=z.len;for(r=b-d;I--;)m[b++]=m[r++];z.state=0;if(65536<=b)return this._windowPosition=b,!1;break}do{r=this._readCode(l);if(0>r)return this._windowPosition=b,!0;if(256>r)m[b++]=r;else if(256<
  r){this._windowPosition=b;r-=257;u=A[r];I=e[r];r=0===u?0:this._readBits(u);if(0>r)return z.state=1,z.len=I,z.lenBits=u,!0;I+=r;r=this._readCode(n);if(0>r)return z.state=2,z.len=I,!0;u=c[r];d=h[r];r=0===u?0:this._readBits(u);if(0>r)return z.state=3,z.len=I,z.dist=d,z.distBits=u,!0;d+=r;for(r=b-d;I--;)m[b++]=m[r++]}else{this._state=a.INIT;break}}while(65536>b);this._windowPosition=b;return!1};return n}(g),C,h,c,m,e,A,E,K=!1,H=function(a){function c(l,e){a.call(this,l);this._verifyHeader=l;this._specialInflate=
  e();this._specialInflate.setDataCallback(function(a){this.onData(a)}.bind(this))}__extends(c,a);c.prototype.push=function(a){if(this._verifyHeader){var c;this._buffer?(c=new Uint8Array(this._buffer.length+a.length),c.set(this._buffer),c.set(a,this._buffer.length),this._buffer=null):c=new Uint8Array(a);var l=this._processZLibHeader(c,0,c.length);if(0===l){this._buffer=c;return}this._verifyHeader=!0;0<l&&(a=c.subarray(l))}this._specialInflate.push(a)};c.prototype.close=function(){this._specialInflate&&
  (this._specialInflate.close(),this._specialInflate=null)};return c}(g),y;(function(a){a[a.WRITE=0]="WRITE";a[a.DONE=1]="DONE";a[a.ZLIB_HEADER=2]="ZLIB_HEADER"})(y||(y={}));var u=function(){function a(){this.a=1;this.b=0}a.prototype.update=function(a,c,l){for(var e=this.a,n=this.b;c<l;++c)e=(e+(a[c]&255))%65521,n=(n+e)%65521;this.a=e;this.b=n};a.prototype.getChecksum=function(){return this.b<<16|this.a};return a}();f.Adler32=u;g=function(){function a(c){this._state=(this._writeZlibHeader=c)?y.ZLIB_HEADER:
  y.WRITE;this._adler32=c?new u:null}a.prototype.push=function(a){this._state===y.ZLIB_HEADER&&(this.onData(new Uint8Array([120,156])),this._state=y.WRITE);for(var c=a.length,l=c+5*Math.ceil(c/65535),l=new Uint8Array(l),e=0,n=0;65535<c;)l.set(new Uint8Array([0,255,255,0,0]),e),e+=5,l.set(a.subarray(n,n+65535),e),n+=65535,e+=65535,c-=65535;l.set(new Uint8Array([0,c&255,c>>8&255,~c&255,~c>>8&255]),e);e+=5;l.set(a.subarray(n,c),e);this.onData(l);this._adler32&&this._adler32.update(a,0,c)};a.prototype.close=
  function(){this._state=y.DONE;this.onData(new Uint8Array([1,0,0,255,255]));if(this._adler32){var a=this._adler32.getChecksum();this.onData(new Uint8Array([a&255,a>>8&255,a>>16&255,a>>>24&255]))}};return a}();f.Deflate=g;var v=function(){function a(){this.pos=this.available=0;this.buffer=new Uint8Array(2E3)}a.prototype.append=function(a){var c=this.pos+this.available,l=c+a.length;if(l>this.buffer.length){for(var e=2*this.buffer.length;e<l;)e*=2;l=new Uint8Array(e);l.set(this.buffer);this.buffer=l}this.buffer.set(a,
  c);this.available+=a.length};a.prototype.compact=function(){0!==this.available&&(this.buffer.set(this.buffer.subarray(this.pos,this.pos+this.available),0),this.pos=0)};a.prototype.readByte=function(){if(0>=this.available)throw Error("Unexpected end of file");this.available--;return this.buffer[this.pos++]};return a}(),r=function(){function a(c){this.onData=c;this.processed=0}a.prototype.writeBytes=function(a){this.onData.call(null,a);this.processed+=a.length};return a}(),n=function(){function a(c){this.outStream=
  c;this.buf=null;this.size=this.pos=0;this.isFull=!1;this.totalPos=this.writePos=0}a.prototype.create=function(a){this.buf=new Uint8Array(a);this.pos=0;this.size=a;this.isFull=!1;this.totalPos=this.writePos=0};a.prototype.putByte=function(a){this.totalPos++;this.buf[this.pos++]=a;this.pos===this.size&&(this.flush(),this.pos=0,this.isFull=!0)};a.prototype.getByte=function(a){return this.buf[a<=this.pos?this.pos-a:this.size-a+this.pos]};a.prototype.flush=function(){this.writePos<this.pos&&(this.outStream.writeBytes(this.buf.subarray(this.writePos,
  this.pos)),this.writePos=this.pos===this.size?0:this.pos)};a.prototype.copyMatch=function(a,c){for(var l=this.pos,e=this.size,n=this.buf,m=a<=l?l-a:e-a+l,b=c;0<b;){for(var z=Math.min(Math.min(b,e-l),e-m),r=0;r<z;r++){var h=n[m++];n[l++]=h}l===e&&(this.pos=l,this.flush(),l=0,this.isFull=!0);m===e&&(m=0);b-=z}this.pos=l;this.totalPos+=c};a.prototype.checkDistance=function(a){return a<=this.pos||this.isFull};a.prototype.isEmpty=function(){return 0===this.pos&&!this.isFull};return a}(),l=function(){function a(c){this.inStream=
  c;this.code=this.range=0;this.corrupted=!1}a.prototype.init=function(){0!==this.inStream.readByte()&&(this.corrupted=!0);this.range=-1;for(var a=0,c=0;4>c;c++)a=a<<8|this.inStream.readByte();a===this.range&&(this.corrupted=!0);this.code=a};a.prototype.isFinishedOK=function(){return 0===this.code};a.prototype.decodeDirectBits=function(a){var c=0,l=this.range,e=this.code;do{var l=l>>>1|0,e=e-l|0,n=e>>31,e=e+(l&n)|0;e===l&&(this.corrupted=!0);0<=l&&16777216>l&&(l<<=8,e=e<<8|this.inStream.readByte());
  c=(c<<1)+n+1|0}while(--a);this.range=l;this.code=e;return c};a.prototype.decodeBit=function(a,c){var l=this.range,e=this.code,n=a[c],m=(l>>>11)*n;e>>>0<m?(n=n+(2048-n>>5)|0,l=m|0,m=0):(n=n-(n>>5)|0,e=e-m|0,l=l-m|0,m=1);a[c]=n&65535;0<=l&&16777216>l&&(l<<=8,e=e<<8|this.inStream.readByte());this.range=l;this.code=e;return m};return a}(),z=function(){function a(c){this.numBits=c;this.probs=b(1<<c)}a.prototype.decode=function(a){for(var c=1,l=0;l<this.numBits;l++)c=(c<<1)+a.decodeBit(this.probs,c);return c-
  (1<<this.numBits)};a.prototype.reverseDecode=function(a){return x(this.probs,0,this.numBits,a)};return a}(),I=function(){function a(){this.choice=b(2);this.lowCoder=t(3,16);this.midCoder=t(3,16);this.highCoder=new z(8)}a.prototype.decode=function(a,c){return 0===a.decodeBit(this.choice,0)?this.lowCoder[c].decode(a):0===a.decodeBit(this.choice,1)?8+this.midCoder[c].decode(a):16+this.highCoder.decode(a)};return a}(),J=function(){function a(c,e){this.rangeDec=new l(c);this.outWindow=new n(e);this.markerIsMandatory=
  !1;this.dictSizeInProperties=this.dictSize=this.lp=this.pb=this.lc=0;this.leftToUnpack=this.unpackSize=void 0;this.reps=new Int32Array(4);this.state=0}a.prototype.decodeProperties=function(a){var c=a[0];if(225<=c)throw Error("Incorrect LZMA properties");this.lc=c%9;c=c/9|0;this.pb=c/5|0;this.lp=c%5;for(c=this.dictSizeInProperties=0;4>c;c++)this.dictSizeInProperties|=a[c+1]<<8*c;this.dictSize=this.dictSizeInProperties;4096>this.dictSize&&(this.dictSize=4096)};a.prototype.create=function(){this.outWindow.create(this.dictSize);
  this.init();this.rangeDec.init();this.reps[0]=0;this.reps[1]=0;this.reps[2]=0;this.state=this.reps[3]=0;this.leftToUnpack=this.unpackSize};a.prototype.decodeLiteral=function(a,c){var l=this.outWindow,e=this.rangeDec,n=0;l.isEmpty()||(n=l.getByte(1));var m=1,n=768*(((l.totalPos&(1<<this.lp)-1)<<this.lc)+(n>>8-this.lc));if(7<=a){l=l.getByte(c+1);do{var b=l>>7&1,l=l<<1,z=e.decodeBit(this.litProbs,n+((1+b<<8)+m)),m=m<<1|z;if(b!==z)break}while(256>m)}for(;256>m;)m=m<<1|e.decodeBit(this.litProbs,n+m);return m-
  256&255};a.prototype.decodeDistance=function(a){var c=a;3<c&&(c=3);a=this.rangeDec;c=this.posSlotDecoder[c].decode(a);if(4>c)return c;var l=(c>>1)-1,e=(2|c&1)<<l;14>c?e=e+x(this.posDecoders,e-c,l,a)|0:(e=e+(a.decodeDirectBits(l-4)<<4)|0,e=e+this.alignDecoder.reverseDecode(a)|0);return e};a.prototype.init=function(){this.litProbs=b(768<<this.lc+this.lp);this.posSlotDecoder=t(6,4);this.alignDecoder=new z(4);this.posDecoders=b(115);this.isMatch=b(192);this.isRep=b(12);this.isRepG0=b(12);this.isRepG1=
  b(12);this.isRepG2=b(12);this.isRep0Long=b(192);this.lenDecoder=new I;this.repLenDecoder=new I};a.prototype.decode=function(a){for(var c=this.rangeDec,l=this.outWindow,e=this.pb,n=this.dictSize,m=this.markerIsMandatory,b=this.leftToUnpack,z=this.isMatch,r=this.isRep,h=this.isRepG0,I=this.isRepG1,u=this.isRepG2,d=this.isRep0Long,g=this.lenDecoder,v=this.repLenDecoder,A=this.reps[0],k=this.reps[1],y=this.reps[2],f=this.reps[3],E=this.state;;){if(a&&48>c.inStream.available){this.outWindow.flush();break}if(0===
  b&&!m&&(this.outWindow.flush(),c.isFinishedOK()))return ha;var J=l.totalPos&(1<<e)-1;if(0===c.decodeBit(z,(E<<4)+J)){if(0===b)return O;l.putByte(this.decodeLiteral(E,A));E=4>E?0:10>E?E-3:E-6;b--}else{if(0!==c.decodeBit(r,E)){if(0===b||l.isEmpty())return O;if(0===c.decodeBit(h,E)){if(0===c.decodeBit(d,(E<<4)+J)){E=7>E?9:11;l.putByte(l.getByte(A+1));b--;continue}}else{var p;0===c.decodeBit(I,E)?p=k:(0===c.decodeBit(u,E)?p=y:(p=f,f=y),y=k);k=A;A=p}J=v.decode(c,J);E=7>E?8:11}else{f=y;y=k;k=A;J=g.decode(c,
  J);E=7>E?7:10;A=this.decodeDistance(J);if(-1===A)return this.outWindow.flush(),c.isFinishedOK()?ca:O;if(0===b||A>=n||!l.checkDistance(A))return O}J+=2;p=!1;void 0!==b&&b<J&&(J=b,p=!0);l.copyMatch(A+1,J);b-=J;if(p)return O}}this.state=E;this.reps[0]=A;this.reps[1]=k;this.reps[2]=y;this.reps[3]=f;this.leftToUnpack=b;return aa};a.prototype.flushOutput=function(){this.outWindow.flush()};return a}(),O=0,ca=1,ha=2,aa=3,M;(function(a){a[a.WAIT_FOR_LZMA_HEADER=0]="WAIT_FOR_LZMA_HEADER";a[a.WAIT_FOR_SWF_HEADER=
  1]="WAIT_FOR_SWF_HEADER";a[a.PROCESS_DATA=2]="PROCESS_DATA";a[a.CLOSED=3]="CLOSED";a[a.ERROR=4]="ERROR"})(M||(M={}));g=function(){function a(c){void 0===c&&(c=!1);this._state=c?M.WAIT_FOR_SWF_HEADER:M.WAIT_FOR_LZMA_HEADER;this.buffer=null}a.prototype.push=function(a){if(this._state<M.PROCESS_DATA){var c=this.buffer?this.buffer.length:0,l=(this._state===M.WAIT_FOR_SWF_HEADER?17:13)+5;if(c+a.length<l){l=new Uint8Array(c+a.length);0<c&&l.set(this.buffer);l.set(a,c);this.buffer=l;return}var e=new Uint8Array(l);
  0<c&&e.set(this.buffer);e.set(a.subarray(0,l-c),c);this._inStream=new v;this._inStream.append(e.subarray(l-5));this._outStream=new r(function(a){this.onData.call(null,a)}.bind(this));this._decoder=new J(this._inStream,this._outStream);if(this._state===M.WAIT_FOR_SWF_HEADER)this._decoder.decodeProperties(e.subarray(12,17)),this._decoder.markerIsMandatory=!1,this._decoder.unpackSize=((e[4]|e[5]<<8|e[6]<<16|e[7]<<24)>>>0)-8;else{this._decoder.decodeProperties(e.subarray(0,5));for(var c=0,n=!1,m=0;8>
  m;m++){var b=e[5+m];255!==b&&(n=!0);c|=b<<8*m}this._decoder.markerIsMandatory=!n;this._decoder.unpackSize=n?c:void 0}this._decoder.create();a=a.subarray(l);this._state=M.PROCESS_DATA}else if(this._state!==M.PROCESS_DATA)return;try{this._inStream.append(a);var z=this._decoder.decode(!0);this._inStream.compact();z!==aa&&this._checkError(z)}catch(h){this._decoder.flushOutput(),this._decoder=null,this._error(h)}};a.prototype.close=function(){if(this._state===M.PROCESS_DATA){this._state=M.CLOSED;try{var a=
  this._decoder.decode(!1);this._checkError(a)}catch(c){this._decoder.flushOutput(),this._error(c)}this._decoder=null}};a.prototype._error=function(a){this._state=M.ERROR;if(this.onError)this.onError(a)};a.prototype._checkError=function(a){var c;a===O?c="LZMA decoding error":a===aa?c="Decoding is not complete":a===ca?void 0!==this._decoder.unpackSize&&this._decoder.unpackSize!==this._outStream.processed&&(c="Finished with end marker before than specified size"):c="Internal LZMA Error";c&&this._error(c)};
  return a}();f.LzmaDecoder=g;var da=d.StringUtilities.utf8decode,w=d.StringUtilities.utf8encode,ba=d.NumberUtilities.clamp,ea=function(){return function(a,c,l){this.buffer=a;this.length=c;this.littleEndian=l}}();f.PlainObjectDataBuffer=ea;for(var fa=new Uint32Array(33),g=1,ga=0;32>=g;g++)fa[g]=ga=ga<<1|1;var N;(function(a){a[a.U8=1]="U8";a[a.I32=2]="I32";a[a.F32=4]="F32"})(N||(N={}));g=function(){function a(c){void 0===c&&(c=a.INITIAL_SIZE);this._buffer||(this._buffer=new ArrayBuffer(c),this._position=
  this._length=0,this._resetViews(),this._littleEndian=a._nativeLittleEndian,this._bitLength=this._bitBuffer=0)}a.FromArrayBuffer=function(c,l){void 0===l&&(l=-1);var e=Object.create(a.prototype);e._buffer=c;e._length=-1===l?c.byteLength:l;e._position=0;e._resetViews();e._littleEndian=a._nativeLittleEndian;e._bitBuffer=0;e._bitLength=0;return e};a.FromPlainObject=function(c){var l=a.FromArrayBuffer(c.buffer,c.length);l._littleEndian=c.littleEndian;return l};a.prototype.toPlainObject=function(){return new ea(this._buffer,
  this._length,this._littleEndian)};a.prototype.clone=function(){var c=a.FromArrayBuffer((new Uint8Array(this._u8)).buffer,this._length);c._position=this._position;c._littleEndian=this._littleEndian;c._bitBuffer=this._bitBuffer;c._bitLength=this._bitLength;return c};a.prototype._resetViews=function(){this._u8=new Uint8Array(this._buffer);this._f32=this._i32=null};a.prototype._requestViews=function(a){0===(this._buffer.byteLength&3)&&(null===this._i32&&a&N.I32&&(this._i32=new Int32Array(this._buffer)),
  null===this._f32&&a&N.F32&&(this._f32=new Float32Array(this._buffer)))};a.prototype.getBytes=function(){return new Uint8Array(this._buffer,0,this._length)};a.prototype._ensureCapacity=function(c){var l=this._buffer;if(!(l.byteLength>=c)){for(var e=Math.max(l.byteLength,1);e<c;)e*=2;4294967295<e&&this.sec.throwError("RangeError",Errors.ParamRangeError);e=a._arrayBufferPool.acquire(e);c=this._u8;this._buffer=e;this._resetViews();this._u8.set(c);e=this._u8;for(c=c.length;c<e.length;c++)e[c]=0;a._arrayBufferPool.release(l)}};
  a.prototype.clear=function(){this._position=this._length=0};a.prototype.readBoolean=function(){return 0!==this.readUnsignedByte()};a.prototype.readByte=function(){return this.readUnsignedByte()<<24>>24};a.prototype.readUnsignedByte=function(){this._position+1>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);return this._u8[this._position++]};a.prototype.readBytes=function(a,c,l){var e=this._position;c>>>=0;l>>>=0;0===l&&(l=this._length-e);e+l>this._length&&this.sec.throwError("flash.errors.EOFError",
  Errors.EOFError);a.length<c+l&&(a._ensureCapacity(c+l),a.length=c+l);a._u8.set(new Uint8Array(this._buffer,e,l),c);this._position+=l};a.prototype.readShort=function(){return this.readUnsignedShort()<<16>>16};a.prototype.readUnsignedShort=function(){var a=this._u8,c=this._position;c+2>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);var l=a[c+0],a=a[c+1];this._position=c+2;return this._littleEndian?a<<8|l:l<<8|a};a.prototype.readInt=function(){var a=this._u8,c=this._position;
  c+4>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);var l=a[c+0],e=a[c+1],n=a[c+2],a=a[c+3];this._position=c+4;return this._littleEndian?a<<24|n<<16|e<<8|l:l<<24|e<<16|n<<8|a};a.prototype.readUnsignedInt=function(){return this.readInt()>>>0};a.prototype.readFloat=function(){var a=this._position;a+4>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);this._position=a+4;this._requestViews(N.F32);if(this._littleEndian&&0===(a&3)&&this._f32)return this._f32[a>>
  2];var c=this._u8,l=d.IntegerUtilities.u8;this._littleEndian?(l[0]=c[a+0],l[1]=c[a+1],l[2]=c[a+2],l[3]=c[a+3]):(l[3]=c[a+0],l[2]=c[a+1],l[1]=c[a+2],l[0]=c[a+3]);return d.IntegerUtilities.f32[0]};a.prototype.readDouble=function(){var a=this._u8,c=this._position;c+8>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);var l=d.IntegerUtilities.u8;this._littleEndian?(l[0]=a[c+0],l[1]=a[c+1],l[2]=a[c+2],l[3]=a[c+3],l[4]=a[c+4],l[5]=a[c+5],l[6]=a[c+6],l[7]=a[c+7]):(l[0]=a[c+7],l[1]=
  a[c+6],l[2]=a[c+5],l[3]=a[c+4],l[4]=a[c+3],l[5]=a[c+2],l[6]=a[c+1],l[7]=a[c+0]);this._position=c+8;return d.IntegerUtilities.f64[0]};a.prototype.writeBoolean=function(a){this.writeByte(a?1:0)};a.prototype.writeByte=function(a){var c=this._position+1;this._ensureCapacity(c);this._u8[this._position++]=a;c>this._length&&(this._length=c)};a.prototype.writeUnsignedByte=function(a){var c=this._position+1;this._ensureCapacity(c);this._u8[this._position++]=a;c>this._length&&(this._length=c)};a.prototype.writeRawBytes=
  function(a){var c=this._position+a.length;this._ensureCapacity(c);this._u8.set(a,this._position);this._position=c;c>this._length&&(this._length=c)};a.prototype.writeBytes=function(a,c,l){d.isNullOrUndefined(a)&&this.sec.throwError("TypeError",Errors.NullPointerError,"bytes");c>>>=0;l>>>=0;2>arguments.length&&(c=0);3>arguments.length&&(l=0);c===ba(c,0,a.length)&&c+l===ba(c+l,0,a.length)||this.sec.throwError("RangeError",Errors.ParamRangeError);0===l&&(l=a.length-c);this.writeRawBytes(new Int8Array(a._buffer,
  c,l))};a.prototype.writeShort=function(a){this.writeUnsignedShort(a)};a.prototype.writeUnsignedShort=function(a){var c=this._position;this._ensureCapacity(c+2);var l=this._u8;this._littleEndian?(l[c+0]=a,l[c+1]=a>>8):(l[c+0]=a>>8,l[c+1]=a);this._position=c+=2;c>this._length&&(this._length=c)};a.prototype.writeInt=function(a){this.writeUnsignedInt(a)};a.prototype.write2Ints=function(a,c){this.write2UnsignedInts(a,c)};a.prototype.write4Ints=function(a,c,l,e){this.write4UnsignedInts(a,c,l,e)};a.prototype.writeUnsignedInt=
  function(c){var l=this._position;this._ensureCapacity(l+4);this._requestViews(N.I32);if(this._littleEndian===a._nativeLittleEndian&&0===(l&3)&&this._i32)this._i32[l>>2]=c;else{var e=this._u8;this._littleEndian?(e[l+0]=c,e[l+1]=c>>8,e[l+2]=c>>16,e[l+3]=c>>24):(e[l+0]=c>>24,e[l+1]=c>>16,e[l+2]=c>>8,e[l+3]=c)}this._position=l+=4;l>this._length&&(this._length=l)};a.prototype.write2UnsignedInts=function(c,l){var e=this._position;this._ensureCapacity(e+8);this._requestViews(N.I32);this._littleEndian===
  a._nativeLittleEndian&&0===(e&3)&&this._i32?(this._i32[(e>>2)+0]=c,this._i32[(e>>2)+1]=l,this._position=e+=8,e>this._length&&(this._length=e)):(this.writeUnsignedInt(c),this.writeUnsignedInt(l))};a.prototype.write4UnsignedInts=function(c,l,e,n){var m=this._position;this._ensureCapacity(m+16);this._requestViews(N.I32);this._littleEndian===a._nativeLittleEndian&&0===(m&3)&&this._i32?(this._i32[(m>>2)+0]=c,this._i32[(m>>2)+1]=l,this._i32[(m>>2)+2]=e,this._i32[(m>>2)+3]=n,this._position=m+=16,m>this._length&&
  (this._length=m)):(this.writeUnsignedInt(c),this.writeUnsignedInt(l),this.writeUnsignedInt(e),this.writeUnsignedInt(n))};a.prototype.writeFloat=function(c){var l=this._position;this._ensureCapacity(l+4);this._requestViews(N.F32);if(this._littleEndian===a._nativeLittleEndian&&0===(l&3)&&this._f32)this._f32[l>>2]=c;else{var e=this._u8;d.IntegerUtilities.f32[0]=c;c=d.IntegerUtilities.u8;this._littleEndian?(e[l+0]=c[0],e[l+1]=c[1],e[l+2]=c[2],e[l+3]=c[3]):(e[l+0]=c[3],e[l+1]=c[2],e[l+2]=c[1],e[l+3]=c[0])}this._position=
  l+=4;l>this._length&&(this._length=l)};a.prototype.write2Floats=function(c,l){var e=this._position;this._ensureCapacity(e+8);this._requestViews(N.F32);this._littleEndian===a._nativeLittleEndian&&0===(e&3)&&this._f32?(this._f32[(e>>2)+0]=c,this._f32[(e>>2)+1]=l,this._position=e+=8,e>this._length&&(this._length=e)):(this.writeFloat(c),this.writeFloat(l))};a.prototype.write6Floats=function(c,l,e,n,m,b){var z=this._position;this._ensureCapacity(z+24);this._requestViews(N.F32);this._littleEndian===a._nativeLittleEndian&&
  0===(z&3)&&this._f32?(this._f32[(z>>2)+0]=c,this._f32[(z>>2)+1]=l,this._f32[(z>>2)+2]=e,this._f32[(z>>2)+3]=n,this._f32[(z>>2)+4]=m,this._f32[(z>>2)+5]=b,this._position=z+=24,z>this._length&&(this._length=z)):(this.writeFloat(c),this.writeFloat(l),this.writeFloat(e),this.writeFloat(n),this.writeFloat(m),this.writeFloat(b))};a.prototype.writeDouble=function(a){var c=this._position;this._ensureCapacity(c+8);var l=this._u8;d.IntegerUtilities.f64[0]=a;a=d.IntegerUtilities.u8;this._littleEndian?(l[c+0]=
  a[0],l[c+1]=a[1],l[c+2]=a[2],l[c+3]=a[3],l[c+4]=a[4],l[c+5]=a[5],l[c+6]=a[6],l[c+7]=a[7]):(l[c+0]=a[7],l[c+1]=a[6],l[c+2]=a[5],l[c+3]=a[4],l[c+4]=a[3],l[c+5]=a[2],l[c+6]=a[1],l[c+7]=a[0]);this._position=c+=8;c>this._length&&(this._length=c)};a.prototype.readRawBytes=function(){return new Int8Array(this._buffer,0,this._length)};a.prototype.writeUTF=function(a){a=k(a);a=da(a);this.writeShort(a.length);this.writeRawBytes(a)};a.prototype.writeUTFBytes=function(a){a=k(a);a=da(a);this.writeRawBytes(a)};
  a.prototype.readUTF=function(){return this.readUTFBytes(this.readShort())};a.prototype.readUTFBytes=function(a){a>>>=0;var c=this._position;c+a>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError);this._position+=a;return w(new Int8Array(this._buffer,c,a))};Object.defineProperty(a.prototype,"length",{get:function(){return this._length},set:function(a){a>>>=0;a>this._buffer.byteLength&&this._ensureCapacity(a);this._length=a;this._position=ba(this._position,0,this._length)},enumerable:!0,
  configurable:!0});Object.defineProperty(a.prototype,"bytesAvailable",{get:function(){return this._length-this._position},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"position",{get:function(){return this._position},set:function(a){this._position=a>>>0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"buffer",{get:function(){return this._buffer},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bytes",{get:function(){return this._u8},enumerable:!0,
  configurable:!0});Object.defineProperty(a.prototype,"ints",{get:function(){this._requestViews(N.I32);return this._i32},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"objectEncoding",{get:function(){return this._objectEncoding},set:function(a){this._objectEncoding=a>>>0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"endian",{get:function(){return this._littleEndian?"littleEndian":"bigEndian"},set:function(c){c=k(c);this._littleEndian="auto"===c?a._nativeLittleEndian:
  "littleEndian"===c},enumerable:!0,configurable:!0});a.prototype.toString=function(){return w(new Int8Array(this._buffer,0,this._length))};a.prototype.toBlob=function(a){return new Blob([new Int8Array(this._buffer,this._position,this._length)],{type:a})};a.prototype.writeMultiByte=function(a,c){k(a);k(c)};a.prototype.readMultiByte=function(a,c){k(c)};a.prototype.getValue=function(a){a|=0;return a>=this._length?void 0:this._u8[a]};a.prototype.setValue=function(a,c){a|=0;var l=a+1;this._ensureCapacity(l);
  this._u8[a]=c;l>this._length&&(this._length=l)};a.prototype.readFixed=function(){return this.readInt()/65536};a.prototype.readFixed8=function(){return this.readShort()/256};a.prototype.readFloat16=function(){var a=this.readUnsignedShort(),c=a>>15?-1:1,l=(a&31744)>>10,a=a&1023;return l?31===l?a?NaN:Infinity*c:c*Math.pow(2,l-15)*(1+a/1024):c*Math.pow(2,-14)*(a/1024)};a.prototype.readEncodedU32=function(){var a=this.readUnsignedByte();if(!(a&128))return a;a=a&127|this.readUnsignedByte()<<7;if(!(a&16384))return a;
  a=a&16383|this.readUnsignedByte()<<14;if(!(a&2097152))return a;a=a&2097151|this.readUnsignedByte()<<21;return a&268435456?a&268435455|this.readUnsignedByte()<<28:a};a.prototype.readBits=function(a){return this.readUnsignedBits(a)<<32-a>>32-a};a.prototype.readUnsignedBits=function(a){for(var c=this._bitBuffer,l=this._bitLength;a>l;)c=c<<8|this.readUnsignedByte(),l+=8;l-=a;a=c>>>l&fa[a];this._bitBuffer=c;this._bitLength=l;return a};a.prototype.readFixedBits=function(a){return this.readBits(a)/65536};
  a.prototype.readString=function(a){var c=this._position;if(a)c+a>this._length&&this.sec.throwError("flash.errors.EOFError",Errors.EOFError),this._position+=a;else{a=0;for(var l=c;l<this._length&&this._u8[l];l++)a++;this._position+=a+1}return w(new Int8Array(this._buffer,c,a))};a.prototype.align=function(){this._bitLength=this._bitBuffer=0};a.prototype.deflate=function(){this.compress("deflate")};a.prototype.inflate=function(){this.uncompress("deflate")};a.prototype.compress=function(c){c=0===arguments.length?
  "zlib":k(c);var l;switch(c){case "zlib":l=new f.Deflate(!0);break;case "deflate":l=new f.Deflate(!1);break;default:return}var e=new a;l.onData=e.writeRawBytes.bind(e);l.push(this._u8.subarray(0,this._length));l.close();this._ensureCapacity(e._u8.length);this._u8.set(e._u8);this.length=e.length;this._position=0};a.prototype.uncompress=function(c){c=0===arguments.length?"zlib":k(c);var l;switch(c){case "zlib":l=f.Inflate.create(!0);break;case "deflate":l=f.Inflate.create(!1);break;case "lzma":l=new f.LzmaDecoder(!1);
  break;default:return}var e=new a,n;l.onData=e.writeRawBytes.bind(e);l.onError=function(a){return n=a};l.push(this._u8.subarray(0,this._length));n&&this.sec.throwError("IOError",Errors.CompressedDataError);l.close();this._ensureCapacity(e._u8.length);this._u8.set(e._u8);this.length=e.length;this._position=0};a._nativeLittleEndian=1===(new Int8Array((new Int32Array([1])).buffer))[0];a.INITIAL_SIZE=128;a._arrayBufferPool=new d.ArrayBufferPool;return a}();f.DataBuffer=g})(d.ArrayUtilities||(d.ArrayUtilities=
  {}));var f=d.ArrayUtilities.DataBuffer,C=d.ArrayUtilities.ensureTypedArrayCapacity,q=function(){return function(d,f,b,x,t,k,a,g,q,C,h){this.commands=d;this.commandsPosition=f;this.coordinates=b;this.morphCoordinates=x;this.coordinatesPosition=t;this.styles=k;this.stylesLength=a;this.morphStyles=g;this.morphStylesLength=q;this.hasFills=C;this.hasLines=h}}();d.PlainObjectShapeData=q;var B;(function(d){d[d.Commands=32]="Commands";d[d.Coordinates=128]="Coordinates";d[d.Styles=16]="Styles"})(B||(B={}));
  var w=function(){function d(f){void 0===f&&(f=!0);f&&this.clear()}d.FromPlainObject=function(p){var b=new d(!1);b.commands=p.commands;b.coordinates=p.coordinates;b.morphCoordinates=p.morphCoordinates;b.commandsPosition=p.commandsPosition;b.coordinatesPosition=p.coordinatesPosition;b.styles=f.FromArrayBuffer(p.styles,p.stylesLength);b.styles.endian="auto";p.morphStyles&&(b.morphStyles=f.FromArrayBuffer(p.morphStyles,p.morphStylesLength),b.morphStyles.endian="auto");b.hasFills=p.hasFills;b.hasLines=
  p.hasLines;return b};d.prototype.moveTo=function(d,b){this.ensurePathCapacities(1,2);this.commands[this.commandsPosition++]=9;this.coordinates[this.coordinatesPosition++]=d;this.coordinates[this.coordinatesPosition++]=b};d.prototype.lineTo=function(d,b){this.ensurePathCapacities(1,2);this.commands[this.commandsPosition++]=10;this.coordinates[this.coordinatesPosition++]=d;this.coordinates[this.coordinatesPosition++]=b};d.prototype.curveTo=function(d,b,f,t){this.ensurePathCapacities(1,4);this.commands[this.commandsPosition++]=
  11;this.coordinates[this.coordinatesPosition++]=d;this.coordinates[this.coordinatesPosition++]=b;this.coordinates[this.coordinatesPosition++]=f;this.coordinates[this.coordinatesPosition++]=t};d.prototype.cubicCurveTo=function(d,b,f,t,k,a){this.ensurePathCapacities(1,6);this.commands[this.commandsPosition++]=12;this.coordinates[this.coordinatesPosition++]=d;this.coordinates[this.coordinatesPosition++]=b;this.coordinates[this.coordinatesPosition++]=f;this.coordinates[this.coordinatesPosition++]=t;this.coordinates[this.coordinatesPosition++]=
  k;this.coordinates[this.coordinatesPosition++]=a};d.prototype.beginFill=function(d){this.ensurePathCapacities(1,0);this.commands[this.commandsPosition++]=1;this.styles.writeUnsignedInt(d);this.hasFills=!0};d.prototype.writeMorphFill=function(d){this.morphStyles.writeUnsignedInt(d)};d.prototype.endFill=function(){this.ensurePathCapacities(1,0);this.commands[this.commandsPosition++]=4};d.prototype.endLine=function(){this.ensurePathCapacities(1,0);this.commands[this.commandsPosition++]=8};d.prototype.lineStyle=
  function(d,b,f,t,k,a,g){this.ensurePathCapacities(2,0);this.commands[this.commandsPosition++]=5;this.coordinates[this.coordinatesPosition++]=d;d=this.styles;d.writeUnsignedInt(b);d.writeBoolean(f);d.writeUnsignedByte(t);d.writeUnsignedByte(k);d.writeUnsignedByte(a);d.writeUnsignedByte(g);this.hasLines=!0};d.prototype.writeMorphLineStyle=function(d,b){this.morphCoordinates[this.coordinatesPosition-1]=d;this.morphStyles.writeUnsignedInt(b)};d.prototype.beginBitmap=function(d,b,f,t,k){this.ensurePathCapacities(1,
  0);this.commands[this.commandsPosition++]=d;d=this.styles;d.writeUnsignedInt(b);this._writeStyleMatrix(f,!1);d.writeBoolean(t);d.writeBoolean(k);this.hasFills=!0};d.prototype.writeMorphBitmap=function(d){this._writeStyleMatrix(d,!0)};d.prototype.beginGradient=function(d,b,f,t,k,a,g,q){this.ensurePathCapacities(1,0);this.commands[this.commandsPosition++]=d;d=this.styles;d.writeUnsignedByte(t);d.writeShort(q);this._writeStyleMatrix(k,!1);t=b.length;d.writeByte(t);for(k=0;k<t;k++)d.writeUnsignedByte(f[k]),
  d.writeUnsignedInt(b[k]);d.writeUnsignedByte(a);d.writeUnsignedByte(g);this.hasFills=!0};d.prototype.writeMorphGradient=function(d,b,f){this._writeStyleMatrix(f,!0);f=this.morphStyles;for(var t=0;t<d.length;t++)f.writeUnsignedByte(b[t]),f.writeUnsignedInt(d[t])};d.prototype.writeCommandAndCoordinates=function(d,b,f){this.ensurePathCapacities(1,2);this.commands[this.commandsPosition++]=d;this.coordinates[this.coordinatesPosition++]=b;this.coordinates[this.coordinatesPosition++]=f};d.prototype.writeCoordinates=
  function(d,b){this.ensurePathCapacities(0,2);this.coordinates[this.coordinatesPosition++]=d;this.coordinates[this.coordinatesPosition++]=b};d.prototype.writeMorphCoordinates=function(d,b){this.morphCoordinates=C(this.morphCoordinates,this.coordinatesPosition);this.morphCoordinates[this.coordinatesPosition-2]=d;this.morphCoordinates[this.coordinatesPosition-1]=b};d.prototype.clear=function(){this.commandsPosition=this.coordinatesPosition=0;this.commands=new Uint8Array(B.Commands);this.coordinates=
  new Int32Array(B.Coordinates);this.styles=new f(B.Styles);this.styles.endian="auto";this.hasFills=this.hasLines=!1};d.prototype.isEmpty=function(){return 0===this.commandsPosition};d.prototype.clone=function(){var p=new d(!1);p.commands=new Uint8Array(this.commands);p.commandsPosition=this.commandsPosition;p.coordinates=new Int32Array(this.coordinates);p.coordinatesPosition=this.coordinatesPosition;p.styles=new f(this.styles.length);p.styles.writeRawBytes(this.styles.bytes.subarray(0,this.styles.length));
  this.morphStyles&&(p.morphStyles=new f(this.morphStyles.length),p.morphStyles.writeRawBytes(this.morphStyles.bytes.subarray(0,this.morphStyles.length)));p.hasFills=this.hasFills;p.hasLines=this.hasLines;return p};d.prototype.toPlainObject=function(){return new q(this.commands,this.commandsPosition,this.coordinates,this.morphCoordinates,this.coordinatesPosition,this.styles.buffer,this.styles.length,this.morphStyles&&this.morphStyles.buffer,this.morphStyles?this.morphStyles.length:0,this.hasFills,this.hasLines)};
  Object.defineProperty(d.prototype,"buffers",{get:function(){var d=[this.commands.buffer,this.coordinates.buffer,this.styles.buffer];this.morphCoordinates&&d.push(this.morphCoordinates.buffer);this.morphStyles&&d.push(this.morphStyles.buffer);return d},enumerable:!0,configurable:!0});d.prototype._writeStyleMatrix=function(d,b){(b?this.morphStyles:this.styles).write6Floats(d.a,d.b,d.c,d.d,d.tx,d.ty)};d.prototype.ensurePathCapacities=function(d,b){this.commands=C(this.commands,this.commandsPosition+
  d);this.coordinates=C(this.coordinates,this.coordinatesPosition+b)};return d}();d.ShapeData=w;(function(d){(function(d){d.getSwfTagCodeName=function(b){return"SwfTagCode: "+b};(function(b){b[b.CODE_DEFINE_SHAPE=2]="CODE_DEFINE_SHAPE";b[b.CODE_DEFINE_BITS=6]="CODE_DEFINE_BITS";b[b.CODE_DEFINE_BUTTON=7]="CODE_DEFINE_BUTTON";b[b.CODE_DEFINE_FONT=10]="CODE_DEFINE_FONT";b[b.CODE_DEFINE_TEXT=11]="CODE_DEFINE_TEXT";b[b.CODE_DEFINE_SOUND=14]="CODE_DEFINE_SOUND";b[b.CODE_DEFINE_BITS_LOSSLESS=20]="CODE_DEFINE_BITS_LOSSLESS";
  b[b.CODE_DEFINE_BITS_JPEG2=21]="CODE_DEFINE_BITS_JPEG2";b[b.CODE_DEFINE_SHAPE2=22]="CODE_DEFINE_SHAPE2";b[b.CODE_DEFINE_SHAPE3=32]="CODE_DEFINE_SHAPE3";b[b.CODE_DEFINE_TEXT2=33]="CODE_DEFINE_TEXT2";b[b.CODE_DEFINE_BUTTON2=34]="CODE_DEFINE_BUTTON2";b[b.CODE_DEFINE_BITS_JPEG3=35]="CODE_DEFINE_BITS_JPEG3";b[b.CODE_DEFINE_BITS_LOSSLESS2=36]="CODE_DEFINE_BITS_LOSSLESS2";b[b.CODE_DEFINE_EDIT_TEXT=37]="CODE_DEFINE_EDIT_TEXT";b[b.CODE_DEFINE_SPRITE=39]="CODE_DEFINE_SPRITE";b[b.CODE_DEFINE_MORPH_SHAPE=46]=
  "CODE_DEFINE_MORPH_SHAPE";b[b.CODE_DEFINE_FONT2=48]="CODE_DEFINE_FONT2";b[b.CODE_DEFINE_VIDEO_STREAM=60]="CODE_DEFINE_VIDEO_STREAM";b[b.CODE_DEFINE_FONT3=75]="CODE_DEFINE_FONT3";b[b.CODE_DEFINE_SHAPE4=83]="CODE_DEFINE_SHAPE4";b[b.CODE_DEFINE_MORPH_SHAPE2=84]="CODE_DEFINE_MORPH_SHAPE2";b[b.CODE_DEFINE_BINARY_DATA=87]="CODE_DEFINE_BINARY_DATA";b[b.CODE_DEFINE_BITS_JPEG4=90]="CODE_DEFINE_BITS_JPEG4";b[b.CODE_DEFINE_FONT4=91]="CODE_DEFINE_FONT4"})(d.DefinitionTags||(d.DefinitionTags={}));(function(b){b[b.CODE_DEFINE_BITS=
  6]="CODE_DEFINE_BITS";b[b.CODE_DEFINE_BITS_JPEG2=21]="CODE_DEFINE_BITS_JPEG2";b[b.CODE_DEFINE_BITS_JPEG3=35]="CODE_DEFINE_BITS_JPEG3";b[b.CODE_DEFINE_BITS_JPEG4=90]="CODE_DEFINE_BITS_JPEG4"})(d.ImageDefinitionTags||(d.ImageDefinitionTags={}));(function(b){b[b.CODE_DEFINE_FONT=10]="CODE_DEFINE_FONT";b[b.CODE_DEFINE_FONT2=48]="CODE_DEFINE_FONT2";b[b.CODE_DEFINE_FONT3=75]="CODE_DEFINE_FONT3";b[b.CODE_DEFINE_FONT4=91]="CODE_DEFINE_FONT4"})(d.FontDefinitionTags||(d.FontDefinitionTags={}));(function(b){b[b.CODE_PLACE_OBJECT=
  4]="CODE_PLACE_OBJECT";b[b.CODE_PLACE_OBJECT2=26]="CODE_PLACE_OBJECT2";b[b.CODE_PLACE_OBJECT3=70]="CODE_PLACE_OBJECT3";b[b.CODE_REMOVE_OBJECT=5]="CODE_REMOVE_OBJECT";b[b.CODE_REMOVE_OBJECT2=28]="CODE_REMOVE_OBJECT2";b[b.CODE_START_SOUND=15]="CODE_START_SOUND";b[b.CODE_START_SOUND2=89]="CODE_START_SOUND2";b[b.CODE_VIDEO_FRAME=61]="CODE_VIDEO_FRAME"})(d.ControlTags||(d.ControlTags={}))})(d.Parser||(d.Parser={}))})(d.SWF||(d.SWF={}));var F=d.Debug.unexpected,w=function(){function d(f,b,x,t){this.url=
  f;this.method=b;this.mimeType=x;this.data=t}d.prototype.readAll=function(d,b){var f=this.url,t=this.xhr=new XMLHttpRequest({mozSystem:!0});t.open(this.method||"GET",this.url,!0);t.responseType="arraybuffer";d&&(t.onprogress=function(b){d(t.response,b.loaded,b.total)});t.onreadystatechange=function(d){4===t.readyState&&(200!==t.status&&0!==t.status||null===t.response?(F("Path: "+f+" not found."),b(null,t.statusText)):b(t.response))};this.mimeType&&t.setRequestHeader("Content-Type",this.mimeType);t.send(this.data||
  null)};d.prototype.readChunked=function(d,b,f,t,k,a){if(0>=d)this.readAsync(b,f,t,k,a);else{var g=0,q=new Uint8Array(d),C=0,h;this.readAsync(function(a,m){h=m.total;for(var e=a.length,A=0;g+e>=d;){var k=d-g;q.set(a.subarray(A,A+k),g);A+=k;e-=k;C+=d;b(q,{loaded:C,total:h});g=0}q.set(a.subarray(A),g);g+=e},f,t,function(){0<g&&(C+=g,b(q.subarray(0,g),{loaded:C,total:h}),g=0);k&&k()},a)}};d.prototype.readAsync=function(d,b,f,t,k){var a=this.xhr=new XMLHttpRequest({mozSystem:!0}),g=this.url,q=0,C=0;a.open(this.method||
  "GET",g,!0);a.responseType="moz-chunked-arraybuffer";var h="moz-chunked-arraybuffer"!==a.responseType;h&&(a.responseType="arraybuffer");a.onprogress=function(c){h||(q=c.loaded,C=c.total,c=new Uint8Array(a.response),q=Math.max(q,c.byteLength),C=Math.max(C,c.byteLength),d(c,{loaded:q,total:C}))};a.onreadystatechange=function(c){2===a.readyState&&k&&k(g,a.status,a.getAllResponseHeaders());4===a.readyState&&(200!==a.status&&0!==a.status||null===a.response&&(0===C||q!==C)?b(a.statusText):h&&(c=a.response,
  d(new Uint8Array(c),{loaded:c.byteLength,total:c.byteLength})))};a.onload=function(){t&&t()};this.mimeType&&a.setRequestHeader("Content-Type",this.mimeType);a.send(this.data||null);f&&f()};d.prototype.abort=function(){this.xhr&&(this.xhr.abort(),this.xhr=null)};return d}();d.BinaryFileReader=w;w=function(){function d(){this.isAS3TraceOn=!0;this._startTime=Date.now()}Object.defineProperty(d.prototype,"currentTimestamp",{get:function(){return Date.now()-this._startTime},enumerable:!0,configurable:!0});
  d.prototype._writeLine=function(d){};d.prototype.writeAS3Trace=function(d){};return d}();d.FlashLog=w;d.flashlog=null;(function(d){(function(b){b[b.Blur=0]="Blur";b[b.DropShadow=1]="DropShadow";b[b.ColorMatrix=2]="ColorMatrix"})(d.FilterType||(d.FilterType={}));d.MouseEventNames="click dblclick mousedown mousemove mouseup mouseover mouseout".split(" ");d.KeyboardEventNames=["keydown","keypress","keyup"];var f=function(){function b(b,d){this.window=b;this.target=d}Object.defineProperty(b.prototype,
  "onAsyncMessage",{set:function(b){this.window.addEventListener("message",function(d){Promise.resolve(d.data).then(function(d){b(d)})})},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"onSyncMessage",{set:function(b){this.window.addEventListener("syncmessage",function(d){d=d.detail;d.result=b(d.msg)})},enumerable:!0,configurable:!0});b.prototype.postAsyncMessage=function(b,d){this.target.postMessage(b,"*",d)};b.prototype.sendSyncMessage=function(b,d){var k=this.target.document.createEvent("CustomEvent"),
  a={msg:b,result:void 0};k.initCustomEvent("syncmessage",!1,!1,a);this.target.dispatchEvent(k);return a.result};return b}();d.WindowTransportPeer=f;f=function(){function b(){}Object.defineProperty(b.prototype,"onAsyncMessage",{set:function(b){ShumwayCom.setAsyncMessageCallback(b)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"onSyncMessage",{set:function(b){ShumwayCom.setSyncMessageCallback(b)},enumerable:!0,configurable:!0});b.prototype.postAsyncMessage=function(b,d){ShumwayCom.postAsyncMessage(b)};
  b.prototype.sendSyncMessage=function(b,d){return ShumwayCom.sendSyncMessage(b)};return b}();d.ShumwayComTransportPeer=f})(d.Remoting||(d.Remoting={}))})(Shumway||(Shumway={}));var throwError,Errors;console.timeEnd("Load Shared Dependencies");console.time("Load GFX Dependencies");
  (function(d){(function(f){function q(a,c,e){return b&&e?"string"===typeof c?(a=d.ColorUtilities.cssStyleToRGBA(c),d.ColorUtilities.rgbaToCSSStyle(e.transformRGBA(a))):c instanceof CanvasGradient&&c._template?c._template.createCanvasGradient(a,e):c:c}var B=d.NumberUtilities.clamp,w=d.Metrics.Counter.instance;f.frameCounter=new d.Metrics.Counter(!0);f.traceLevel=2;f.writer=null;f.frameCount=function(a){w.count(a);f.frameCounter.count(a)};f.timelineBuffer=d.Tools?new d.Tools.Profiler.TimelineBuffer("GFX"):
  null;f.enterTimeline=function(a,c){};f.leaveTimeline=function(a,c){};var F=null,G=null,p=null,b=!0;b&&"undefined"!==typeof CanvasRenderingContext2D&&(F=CanvasGradient.prototype.addColorStop,G=CanvasRenderingContext2D.prototype.createLinearGradient,p=CanvasRenderingContext2D.prototype.createRadialGradient,CanvasRenderingContext2D.prototype.createLinearGradient=function(a,c,e,m){return(new t(a,c,e,m)).createCanvasGradient(this,null)},CanvasRenderingContext2D.prototype.createRadialGradient=function(a,
  c,e,m,n,l){return(new k(a,c,e,m,n,l)).createCanvasGradient(this,null)},CanvasGradient.prototype.addColorStop=function(a,c){F.call(this,a,c);this._template.addColorStop(a,c)});var x=function(){return function(a,c){this.offset=a;this.color=c}}(),t=function(){function a(c,e,m,n){this.x0=c;this.y0=e;this.x1=m;this.y1=n;this.colorStops=[]}a.prototype.addColorStop=function(a,c){this.colorStops.push(new x(a,c))};a.prototype.createCanvasGradient=function(a,c){for(var e=G.call(a,this.x0,this.y0,this.x1,this.y1),
  n=this.colorStops,l=0;l<n.length;l++){var m=n[l],b=m.offset,m=m.color,m=c?q(a,m,c):m;F.call(e,b,m)}e._template=this;e._transform=this._transform;return e};return a}(),k=function(){function a(c,e,m,n,l,b){this.x0=c;this.y0=e;this.r0=m;this.x1=n;this.y1=l;this.r1=b;this.colorStops=[]}a.prototype.addColorStop=function(a,c){this.colorStops.push(new x(a,c))};a.prototype.createCanvasGradient=function(a,c){for(var e=p.call(a,this.x0,this.y0,this.r0,this.x1,this.y1,this.r1),n=this.colorStops,l=0;l<n.length;l++){var m=
  n[l],b=m.offset,m=m.color,m=c?q(a,m,c):m;F.call(e,b,m)}e._template=this;e._transform=this._transform;return e};return a}(),a;(function(a){a[a.ClosePath=1]="ClosePath";a[a.MoveTo=2]="MoveTo";a[a.LineTo=3]="LineTo";a[a.QuadraticCurveTo=4]="QuadraticCurveTo";a[a.BezierCurveTo=5]="BezierCurveTo";a[a.ArcTo=6]="ArcTo";a[a.Rect=7]="Rect";a[a.Arc=8]="Arc";a[a.Save=9]="Save";a[a.Restore=10]="Restore";a[a.Transform=11]="Transform"})(a||(a={}));var g=function(){function c(a){this._commands=new Uint8Array(c._arrayBufferPool.acquire(8),
  0,8);this._commandPosition=0;this._data=new Float64Array(c._arrayBufferPool.acquire(8*Float64Array.BYTES_PER_ELEMENT),0,8);this._dataPosition=0;a instanceof c&&this.addPath(a)}c._apply=function(c,e){var m=c._commands,n=c._data,l=0,b=0;e.beginPath();for(var d=c._commandPosition;l<d;)switch(m[l++]){case a.ClosePath:e.closePath();break;case a.MoveTo:e.moveTo(n[b++],n[b++]);break;case a.LineTo:e.lineTo(n[b++],n[b++]);break;case a.QuadraticCurveTo:e.quadraticCurveTo(n[b++],n[b++],n[b++],n[b++]);break;
  case a.BezierCurveTo:e.bezierCurveTo(n[b++],n[b++],n[b++],n[b++],n[b++],n[b++]);break;case a.ArcTo:e.arcTo(n[b++],n[b++],n[b++],n[b++],n[b++]);break;case a.Rect:e.rect(n[b++],n[b++],n[b++],n[b++]);break;case a.Arc:e.arc(n[b++],n[b++],n[b++],n[b++],n[b++],!!n[b++]);break;case a.Save:e.save();break;case a.Restore:e.restore();break;case a.Transform:e.transform(n[b++],n[b++],n[b++],n[b++],n[b++],n[b++])}};c.prototype._ensureCommandCapacity=function(a){this._commands=c._arrayBufferPool.ensureUint8ArrayLength(this._commands,
  a)};c.prototype._ensureDataCapacity=function(a){this._data=c._arrayBufferPool.ensureFloat64ArrayLength(this._data,a)};c.prototype._writeCommand=function(a){this._commandPosition>=this._commands.length&&this._ensureCommandCapacity(this._commandPosition+1);this._commands[this._commandPosition++]=a};c.prototype._writeData=function(a,c,e,n,l,b){var m=arguments.length;this._dataPosition+m>=this._data.length&&this._ensureDataCapacity(this._dataPosition+m);var d=this._data,h=this._dataPosition;d[h]=a;d[h+
  1]=c;2<m&&(d[h+2]=e,d[h+3]=n,4<m&&(d[h+4]=l,6===m&&(d[h+5]=b)));this._dataPosition+=m};c.prototype.closePath=function(){this._writeCommand(a.ClosePath)};c.prototype.moveTo=function(c,e){this._writeCommand(a.MoveTo);this._writeData(c,e)};c.prototype.lineTo=function(c,e){this._writeCommand(a.LineTo);this._writeData(c,e)};c.prototype.quadraticCurveTo=function(c,e,b,n){this._writeCommand(a.QuadraticCurveTo);this._writeData(c,e,b,n)};c.prototype.bezierCurveTo=function(c,e,b,n,l,m){this._writeCommand(a.BezierCurveTo);
  this._writeData(c,e,b,n,l,m)};c.prototype.arcTo=function(c,e,b,n,l){this._writeCommand(a.ArcTo);this._writeData(c,e,b,n,l)};c.prototype.rect=function(c,e,b,n){this._writeCommand(a.Rect);this._writeData(c,e,b,n)};c.prototype.arc=function(c,e,b,n,l,m){this._writeCommand(a.Arc);this._writeData(c,e,b,n,l,+m)};c.prototype.addPath=function(c,e){e&&(this._writeCommand(a.Save),this._writeCommand(a.Transform),this._writeData(e.a,e.b,e.c,e.d,e.e,e.f));var b=this._commandPosition+c._commandPosition;b>=this._commands.length&&
  this._ensureCommandCapacity(b);for(var n=this._commands,l=c._commands,m=this._commandPosition,d=0;m<b;m++)n[m]=l[d++];this._commandPosition=b;b=this._dataPosition+c._dataPosition;b>=this._data.length&&this._ensureDataCapacity(b);n=this._data;l=c._data;m=this._dataPosition;for(d=0;m<b;m++)n[m]=l[d++];this._dataPosition=b;e&&this._writeCommand(a.Restore)};c._arrayBufferPool=new d.ArrayBufferPool;return c}();f.Path=g;if("undefined"!==typeof CanvasRenderingContext2D&&("undefined"===typeof Path2D||!Path2D.prototype.addPath)){var D=
  CanvasRenderingContext2D.prototype.fill;CanvasRenderingContext2D.prototype.fill=function(a,c){arguments.length&&(a instanceof g?g._apply(a,this):c=a);c?D.call(this,c):D.call(this)};var L=CanvasRenderingContext2D.prototype.stroke;CanvasRenderingContext2D.prototype.stroke=function(a,c){arguments.length&&(a instanceof g?g._apply(a,this):c=a);c?L.call(this,c):L.call(this)};var h=CanvasRenderingContext2D.prototype.clip;CanvasRenderingContext2D.prototype.clip=function(a,c){arguments.length&&(a instanceof
  g?g._apply(a,this):c=a);c?h.call(this,c):h.call(this)};window.Path2D=g}if("undefined"!==typeof CanvasPattern&&Path2D.prototype.addPath){var c=function(a){this._transform=a;this._template&&(this._template._transform=a)};CanvasPattern.prototype.setTransform||(CanvasPattern.prototype.setTransform=c);CanvasGradient.prototype.setTransform||(CanvasGradient.prototype.setTransform=c);var m=CanvasRenderingContext2D.prototype.fill,e=CanvasRenderingContext2D.prototype.stroke;CanvasRenderingContext2D.prototype.fill=
  function(a,c){var e=!!this.fillStyle._transform;if((this.fillStyle instanceof CanvasPattern||this.fillStyle instanceof CanvasGradient)&&e&&a instanceof Path2D){var e=this.fillStyle._transform,b;try{b=e.inverse()}catch(n){b=e=f.Geometry.Matrix.createIdentitySVGMatrix()}this.transform(e.a,e.b,e.c,e.d,e.e,e.f);e=new Path2D;e.addPath(a,b);m.call(this,e,c);this.transform(b.a,b.b,b.c,b.d,b.e,b.f)}else 0===arguments.length?m.call(this):1===arguments.length?m.call(this,a):2===arguments.length&&m.call(this,
  a,c)};CanvasRenderingContext2D.prototype.stroke=function(a){var c=!!this.strokeStyle._transform;if((this.strokeStyle instanceof CanvasPattern||this.strokeStyle instanceof CanvasGradient)&&c&&a instanceof Path2D){var c=this.strokeStyle._transform,b;try{b=c.inverse()}catch(m){b=c=f.Geometry.Matrix.createIdentitySVGMatrix()}this.transform(c.a,c.b,c.c,c.d,c.e,c.f);c=new Path2D;c.addPath(a,b);var n=this.lineWidth;this.lineWidth=this.lineWidth*Math.sqrt((b.a+b.c)*(b.a+b.c)+(b.d+b.b)*(b.d+b.b))*Math.SQRT1_2;
  e.call(this,c);this.transform(b.a,b.b,b.c,b.d,b.e,b.f);this.lineWidth=n}else 0===arguments.length?e.call(this):1===arguments.length&&e.call(this,a)}}"undefined"!==typeof CanvasRenderingContext2D&&function(){function a(){return f.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform)}var c="currentTransform"in CanvasRenderingContext2D.prototype;CanvasRenderingContext2D.prototype.flashStroke=function(a,e){if(c){var l=this.currentTransform,b=new Path2D;b.addPath(a,l);var m=this.lineWidth;
  this.setTransform(1,0,0,1,0,0);switch(e){case 1:var d=Math.sqrt((l.a+l.c)*(l.a+l.c)+(l.d+l.b)*(l.d+l.b))*Math.SQRT1_2;this.lineWidth=B(m*d,1,1024);break;case 2:this.lineWidth=B(m*(l.d+l.b),1,1024);break;case 3:this.lineWidth=B(m*(l.a+l.c),1,1024)}this.stroke(b);this.setTransform(l.a,l.b,l.c,l.d,l.e,l.f);this.lineWidth=m}else this.stroke(a)};if(!c)if("mozCurrentTransform"in CanvasRenderingContext2D.prototype)Object.defineProperty(CanvasRenderingContext2D.prototype,"currentTransform",{get:a}),c=!0;
  else{var e=CanvasRenderingContext2D.prototype.setTransform;CanvasRenderingContext2D.prototype.setTransform=function(a,c,l,b,m,d){var h=this.currentTransform;h.a=a;h.b=c;h.c=l;h.d=b;h.e=m;h.f=d;e.call(this,a,c,l,b,m,d)};Object.defineProperty(CanvasRenderingContext2D.prototype,"currentTransform",{get:function(){return this._currentTransform||(this._currentTransform=f.Geometry.Matrix.createIdentitySVGMatrix())}})}}();if("undefined"!==typeof CanvasRenderingContext2D&&void 0===CanvasRenderingContext2D.prototype.globalColorMatrix){var A=
  CanvasRenderingContext2D.prototype.fill,E=CanvasRenderingContext2D.prototype.stroke,K=CanvasRenderingContext2D.prototype.fillText,H=CanvasRenderingContext2D.prototype.strokeText;Object.defineProperty(CanvasRenderingContext2D.prototype,"globalColorMatrix",{get:function(){return this._globalColorMatrix?this._globalColorMatrix.clone():null},set:function(a){a?this._globalColorMatrix?this._globalColorMatrix.set(a):this._globalColorMatrix=a.clone():this._globalColorMatrix=null},enumerable:!0,configurable:!0});
  CanvasRenderingContext2D.prototype.fill=function(a,c){var e=null;this._globalColorMatrix&&(e=this.fillStyle,this.fillStyle=q(this,this.fillStyle,this._globalColorMatrix));0===arguments.length?A.call(this):1===arguments.length?A.call(this,a):2===arguments.length&&A.call(this,a,c);e&&(this.fillStyle=e)};CanvasRenderingContext2D.prototype.stroke=function(a,c){var e=null;this._globalColorMatrix&&(e=this.strokeStyle,this.strokeStyle=q(this,this.strokeStyle,this._globalColorMatrix));0===arguments.length?
  E.call(this):1===arguments.length&&E.call(this,a);e&&(this.strokeStyle=e)};CanvasRenderingContext2D.prototype.fillText=function(a,c,e,b){var n=null;this._globalColorMatrix&&(n=this.fillStyle,this.fillStyle=q(this,this.fillStyle,this._globalColorMatrix));3===arguments.length?K.call(this,a,c,e):4===arguments.length?K.call(this,a,c,e,b):d.Debug.unexpected();n&&(this.fillStyle=n)};CanvasRenderingContext2D.prototype.strokeText=function(a,c,e,b){var n=null;this._globalColorMatrix&&(n=this.strokeStyle,this.strokeStyle=
  q(this,this.strokeStyle,this._globalColorMatrix));3===arguments.length?H.call(this,a,c,e):4===arguments.length?H.call(this,a,c,e,b):d.Debug.unexpected();n&&(this.strokeStyle=n)}}c=function(){return function(a,c,e,b){this.dataURL=a;this.w=c;this.h=e;this.pixelRatio=b}}();f.ScreenShot=c})(d.GFX||(d.GFX={}));var f=function(){function d(){this._count=0;this._head=this._tail=null}Object.defineProperty(d.prototype,"count",{get:function(){return this._count},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,
  "head",{get:function(){return this._head},enumerable:!0,configurable:!0});d.prototype._unshift=function(d){0===this._count?this._head=this._tail=d:(d.next=this._head,this._head=d.next.previous=d);this._count++};d.prototype._remove=function(d){d===this._head&&d===this._tail?this._head=this._tail=null:d===this._head?(this._head=d.next,this._head.previous=null):d==this._tail?(this._tail=d.previous,this._tail.next=null):(d.previous.next=d.next,d.next.previous=d.previous);d.previous=d.next=null;this._count--};
  d.prototype.use=function(d){this._head!==d&&((d.next||d.previous||this._tail===d)&&this._remove(d),this._unshift(d))};d.prototype.pop=function(){if(!this._tail)return null;var d=this._tail;this._remove(d);return d};d.prototype.visit=function(d,f){void 0===f&&(f=!0);for(var w=f?this._head:this._tail;w&&d(w);)w=f?w.next:w.previous};return d}();d.LRUList=f;d.registerFallbackFont=function(){var d=document.styleSheets[0];d.insertRule('@font-face{font-family:AdobeBlank;src:url("data:font/opentype;base64,T1RUTwAKAIAAAwAgQ0ZGIDTeCDQAACFkAAAZPERTSUcAAAABAABKqAAAAAhPUy8yAF+xmwAAARAAAABgY21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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA==");}',
  d.cssRules.length)};(function(f){var q=d.Options.Option,B=d.Options.OptionSet,w=d.Settings.shumwayOptions,F=w.register(new B("Renderer Options"));f.imageUpdateOption=F.register(new q("","imageUpdate","boolean",!0,"Enable image updating."));f.imageConvertOption=F.register(new q("","imageConvert","boolean",!0,"Enable image conversion."));f.stageOptions=w.register(new B("Stage Renderer Options"));f.forcePaint=f.stageOptions.register(new q("","forcePaint","boolean",!1,"Force repainting."));f.ignoreViewport=
  f.stageOptions.register(new q("","ignoreViewport","boolean",!1,"Cull elements outside of the viewport."));f.viewportLoupeDiameter=f.stageOptions.register(new q("","viewportLoupeDiameter","number",256,"Size of the viewport loupe.",{range:{min:1,max:1024,step:1}}));f.disableClipping=f.stageOptions.register(new q("","disableClipping","boolean",!1,"Disable clipping."));f.debugClipping=f.stageOptions.register(new q("","debugClipping","boolean",!1,"Disable clipping."));f.hud=f.stageOptions.register(new q("",
  "hud","boolean",!1,"Enable HUD."));B=f.stageOptions.register(new B("Canvas2D Options"));f.clipDirtyRegions=B.register(new q("","clipDirtyRegions","boolean",!1,"Clip dirty regions."));f.clipCanvas=B.register(new q("","clipCanvas","boolean",!1,"Clip Regions."));f.cull=B.register(new q("","cull","boolean",!1,"Enable culling."));f.snapToDevicePixels=B.register(new q("","snapToDevicePixels","boolean",!1,""));f.imageSmoothing=B.register(new q("","imageSmoothing","boolean",!1,""));f.masking=B.register(new q("",
  "masking","boolean",!0,"Composite Mask."));f.blending=B.register(new q("","blending","boolean",!0,""));f.debugLayers=B.register(new q("","debugLayers","boolean",!1,""));f.filters=B.register(new q("","filters","boolean",!0,""));f.cacheShapes=B.register(new q("","cacheShapes","boolean",!0,""));f.cacheShapesMaxSize=B.register(new q("","cacheShapesMaxSize","number",256,"",{range:{min:1,max:1024,step:1}}));f.cacheShapesThreshold=B.register(new q("","cacheShapesThreshold","number",256,"",{range:{min:1,
  max:1024,step:1}}));(function(q){var p=d.NumberUtilities.clamp,b=d.NumberUtilities.pow2,x=d.NumberUtilities.epsilonEquals;q.radianToDegrees=function(a){return 180*a/Math.PI};q.degreesToRadian=function(a){return a*Math.PI/180};var t=function(){function a(c,b){this.x=c;this.y=b}a.prototype.setElements=function(a,b){this.x=a;this.y=b;return this};a.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};a.prototype.dot=function(a){return this.x*a.x+this.y*a.y};a.prototype.squaredLength=function(){return this.dot(this)};
  a.prototype.distanceTo=function(a){return Math.sqrt(this.dot(a))};a.prototype.sub=function(a){this.x-=a.x;this.y-=a.y;return this};a.prototype.mul=function(a){this.x*=a;this.y*=a};a.prototype.clone=function(){return new a(this.x,this.y)};a.prototype.toString=function(a){void 0===a&&(a=2);return"{x: "+this.x.toFixed(a)+", y: "+this.y.toFixed(a)+"}"};a.prototype.inTriangle=function(a,b,e){var d=a.y*e.x-a.x*e.y+(e.y-a.y)*this.x+(a.x-e.x)*this.y,h=a.x*b.y-a.y*b.x+(a.y-b.y)*this.x+(b.x-a.x)*this.y;if(0>
  d!=0>h)return!1;a=-b.y*e.x+a.y*(e.x-b.x)+a.x*(b.y-e.y)+b.x*e.y;0>a&&(d=-d,h=-h,a=-a);return 0<d&&0<h&&d+h<a};a.createEmpty=function(){return new a(0,0)};a.createEmptyPoints=function(c){for(var b=[],e=0;e<c;e++)b.push(new a(0,0));return b};return a}();q.Point=t;var k=function(){function a(c,b,e,d){this.setElements(c,b,e,d);a.allocationCount++}a.prototype.setElements=function(a,b,e,d){this.x=a;this.y=b;this.w=e;this.h=d};a.prototype.set=function(a){this.x=a.x;this.y=a.y;this.w=a.w;this.h=a.h};a.prototype.contains=
  function(a){var b=a.x+a.w,e=a.y+a.h,d=this.x+this.w,h=this.y+this.h;return a.x>=this.x&&a.x<d&&a.y>=this.y&&a.y<h&&b>this.x&&b<=d&&e>this.y&&e<=h};a.prototype.containsPoint=function(a){return a.x>=this.x&&a.x<this.x+this.w&&a.y>=this.y&&a.y<this.y+this.h};a.prototype.isContained=function(a){for(var b=0;b<a.length;b++)if(a[b].contains(this))return!0;return!1};a.prototype.isSmallerThan=function(a){return this.w<a.w&&this.h<a.h};a.prototype.isLargerThan=function(a){return this.w>a.w&&this.h>a.h};a.prototype.union=
  function(a){if(this.isEmpty())this.set(a);else if(!a.isEmpty()){var b=this.x,e=this.y;this.x>a.x&&(b=a.x);this.y>a.y&&(e=a.y);var d=this.x+this.w;d<a.x+a.w&&(d=a.x+a.w);var h=this.y+this.h;h<a.y+a.h&&(h=a.y+a.h);this.x=b;this.y=e;this.w=d-b;this.h=h-e}};a.prototype.isEmpty=function(){return 0>=this.w||0>=this.h};a.prototype.setEmpty=function(){this.h=this.w=this.y=this.x=0};a.prototype.intersect=function(c){var b=a.createEmpty();this.isEmpty()||c.isEmpty()?b.setEmpty():(b.x=Math.max(this.x,c.x),b.y=
  Math.max(this.y,c.y),b.w=Math.min(this.x+this.w,c.x+c.w)-b.x,b.h=Math.min(this.y+this.h,c.y+c.h)-b.y,b.isEmpty()&&b.setEmpty(),this.set(b))};a.prototype.intersects=function(a){if(this.isEmpty()||a.isEmpty())return!1;var b=Math.max(this.x,a.x),e=Math.max(this.y,a.y),b=Math.min(this.x+this.w,a.x+a.w)-b;a=Math.min(this.y+this.h,a.y+a.h)-e;return!(0>=b||0>=a)};a.prototype.intersectsTransformedAABB=function(c,b){var e=a._temporary;e.set(c);b.transformRectangleAABB(e);return this.intersects(e)};a.prototype.intersectsTranslated=
  function(a,b,e){if(this.isEmpty()||a.isEmpty())return!1;var d=Math.max(this.x,a.x+b),h=Math.max(this.y,a.y+e);b=Math.min(this.x+this.w,a.x+b+a.w)-d;a=Math.min(this.y+this.h,a.y+e+a.h)-h;return!(0>=b||0>=a)};a.prototype.area=function(){return this.w*this.h};a.prototype.clone=function(){var c=a.allocate();c.set(this);return c};a.allocate=function(){var c=a._dirtyStack;return c.length?c.pop():new a(12345,67890,12345,67890)};a.prototype.free=function(){a._dirtyStack.push(this)};a.prototype.snap=function(){var a=
  Math.ceil(this.x+this.w),b=Math.ceil(this.y+this.h);this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.w=a-this.x;this.h=b-this.y;return this};a.prototype.scale=function(a,b){this.x*=a;this.y*=b;this.w*=a;this.h*=b;return this};a.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};a.prototype.resize=function(a,b){this.w+=a;this.h+=b;return this};a.prototype.expand=function(a,b){this.offset(-a,-b).resize(2*a,2*b);return this};a.prototype.getCenter=function(){return new t(this.x+this.w/
  2,this.y+this.h/2)};a.prototype.getAbsoluteBounds=function(){return new a(0,0,this.w,this.h)};a.prototype.toString=function(a){void 0===a&&(a=2);return"{"+this.x.toFixed(a)+", "+this.y.toFixed(a)+", "+this.w.toFixed(a)+", "+this.h.toFixed(a)+"}"};a.createEmpty=function(){var c=a.allocate();c.setEmpty();return c};a.createSquare=function(c){return new a(-c/2,-c/2,c,c)};a.createMaxI16=function(){return new a(-32768,-32768,65535,65535)};a.prototype.setMaxI16=function(){this.setElements(-32768,-32768,
  65535,65535)};a.prototype.getCorners=function(a){a[0].x=this.x;a[0].y=this.y;a[1].x=this.x+this.w;a[1].y=this.y;a[2].x=this.x+this.w;a[2].y=this.y+this.h;a[3].x=this.x;a[3].y=this.y+this.h};a.allocationCount=0;a._temporary=new a(0,0,0,0);a._dirtyStack=[];return a}();q.Rectangle=k;var a=function(){function a(c){this.corners=c.map(function(a){return a.clone()});this.axes=[c[1].clone().sub(c[0]),c[3].clone().sub(c[0])];this.origins=[];for(var b=0;2>b;b++)this.axes[b].mul(1/this.axes[b].squaredLength()),
  this.origins.push(c[0].dot(this.axes[b]))}a.prototype.getBounds=function(){return a.getBounds(this.corners)};a.getBounds=function(a){for(var b=new t(Number.MAX_VALUE,Number.MAX_VALUE),e=new t(Number.MIN_VALUE,Number.MIN_VALUE),d=0;4>d;d++){var h=a[d].x,g=a[d].y;b.x=Math.min(b.x,h);b.y=Math.min(b.y,g);e.x=Math.max(e.x,h);e.y=Math.max(e.y,g)}return new k(b.x,b.y,e.x-b.x,e.y-b.y)};a.prototype.intersects=function(a){return this.intersectsOneWay(a)&&a.intersectsOneWay(this)};a.prototype.intersectsOneWay=
  function(a){for(var b=0;2>b;b++){for(var e=0;4>e;e++){var d=a.corners[e].dot(this.axes[b]),h,g;0===e?g=h=d:d<h?h=d:d>g&&(g=d)}if(h>1+this.origins[b]||g<this.origins[b])return!1}return!0};return a}();q.OBB=a;var g=function(){function a(c,b,e,d,g,k){this._data=new Float64Array(6);this._type=0;this.setElements(c,b,e,d,g,k);a.allocationCount++}Object.defineProperty(a.prototype,"a",{get:function(){return this._data[0]},set:function(a){this._data[0]=a;this._type=0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  "b",{get:function(){return this._data[1]},set:function(a){this._data[1]=a;this._type=0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"c",{get:function(){return this._data[2]},set:function(a){this._data[2]=a;this._type=0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"d",{get:function(){return this._data[3]},set:function(a){this._data[3]=a;this._type=0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"tx",{get:function(){return this._data[4]},
  set:function(a){this._data[4]=a;1===this._type&&(this._type=2)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"ty",{get:function(){return this._data[5]},set:function(a){this._data[5]=a;1===this._type&&(this._type=2)},enumerable:!0,configurable:!0});a._createSVGMatrix=function(){a._svg||(a._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"));return a._svg.createSVGMatrix()};a.prototype.setElements=function(a,b,e,d,g,h){var k=this._data;k[0]=a;k[1]=b;k[2]=e;k[3]=d;
  k[4]=g;k[5]=h;this._type=0};a.prototype.set=function(a){var b=this._data,e=a._data;b[0]=e[0];b[1]=e[1];b[2]=e[2];b[3]=e[3];b[4]=e[4];b[5]=e[5];this._type=a._type};a.prototype.emptyArea=function(a){a=this._data;return 0===a[0]||0===a[3]?!0:!1};a.prototype.infiniteArea=function(a){a=this._data;return Infinity===Math.abs(a[0])||Infinity===Math.abs(a[3])?!0:!1};a.prototype.isEqual=function(a){if(1===this._type&&1===a._type)return!0;var b=this._data;a=a._data;return b[0]===a[0]&&b[1]===a[1]&&b[2]===a[2]&&
  b[3]===a[3]&&b[4]===a[4]&&b[5]===a[5]};a.prototype.clone=function(){var c=a.allocate();c.set(this);return c};a.allocate=function(){var c=a._dirtyStack;return c.length?c.pop():new a(12345,12345,12345,12345,12345,12345)};a.prototype.free=function(){a._dirtyStack.push(this)};a.prototype.transform=function(a,b,e,d,g,h){var k=this._data,f=k[0],u=k[1],v=k[2],r=k[3],n=k[4],l=k[5];k[0]=f*a+v*b;k[1]=u*a+r*b;k[2]=f*e+v*d;k[3]=u*e+r*d;k[4]=f*g+v*h+n;k[5]=u*g+r*h+l;this._type=0;return this};a.prototype.transformRectangle=
  function(a,b){var e=this._data,d=e[0],g=e[1],k=e[2],h=e[3],f=e[4],e=e[5],u=a.x,v=a.y,r=a.w,n=a.h;b[0].x=d*u+k*v+f;b[0].y=g*u+h*v+e;b[1].x=d*(u+r)+k*v+f;b[1].y=g*(u+r)+h*v+e;b[2].x=d*(u+r)+k*(v+n)+f;b[2].y=g*(u+r)+h*(v+n)+e;b[3].x=d*u+k*(v+n)+f;b[3].y=g*u+h*(v+n)+e};a.prototype.isTranslationOnly=function(){if(2===this._type)return!0;var a=this._data;return 1===a[0]&&0===a[1]&&0===a[2]&&1===a[3]||x(a[0],1)&&x(a[1],0)&&x(a[2],0)&&x(a[3],1)?(this._type=2,!0):!1};a.prototype.transformRectangleAABB=function(a){var b=
  this._data;if(1!==this._type)if(2===this._type)a.x+=b[4],a.y+=b[5];else{var e=b[0],d=b[1],g=b[2],k=b[3],h=b[4],f=b[5],u=a.x,v=a.y,r=a.w,n=a.h,b=e*u+g*v+h,l=d*u+k*v+f,z=e*(u+r)+g*v+h,I=d*(u+r)+k*v+f,J=e*(u+r)+g*(v+n)+h,r=d*(u+r)+k*(v+n)+f,e=e*u+g*(v+n)+h,d=d*u+k*(v+n)+f,k=0;b>z&&(k=b,b=z,z=k);J>e&&(k=J,J=e,e=k);a.x=b<J?b:J;a.w=(z>e?z:e)-a.x;l>I&&(k=l,l=I,I=k);r>d&&(k=r,r=d,d=k);a.y=l<r?l:r;a.h=(I>d?I:d)-a.y}};a.prototype.scale=function(a,b){var e=this._data;e[0]*=a;e[1]*=b;e[2]*=a;e[3]*=b;e[4]*=a;
  e[5]*=b;this._type=0;return this};a.prototype.scaleClone=function(a,b){return 1===a&&1===b?this:this.clone().scale(a,b)};a.prototype.rotate=function(a){var b=this._data,e=b[0],d=b[1],g=b[2],k=b[3],h=b[4],f=b[5],u=Math.cos(a);a=Math.sin(a);b[0]=u*e-a*d;b[1]=a*e+u*d;b[2]=u*g-a*k;b[3]=a*g+u*k;b[4]=u*h-a*f;b[5]=a*h+u*f;this._type=0;return this};a.prototype.concat=function(a){if(1===a._type)return this;var b=this._data;a=a._data;var e=b[0]*a[0],d=0,g=0,k=b[3]*a[3],h=b[4]*a[0]+a[4],f=b[5]*a[3]+a[5];if(0!==
  b[1]||0!==b[2]||0!==a[1]||0!==a[2])e+=b[1]*a[2],k+=b[2]*a[1],d+=b[0]*a[1]+b[1]*a[3],g+=b[2]*a[0]+b[3]*a[2],h+=b[5]*a[2],f+=b[4]*a[1];b[0]=e;b[1]=d;b[2]=g;b[3]=k;b[4]=h;b[5]=f;this._type=0;return this};a.prototype.concatClone=function(a){return this.clone().concat(a)};a.prototype.preMultiply=function(a){var b=this._data,e=a._data;if(2===a._type&&this._type&3)b[4]+=e[4],b[5]+=e[5],this._type=2;else if(1!==a._type){a=e[0]*b[0];var d=0,g=0,k=e[3]*b[3],h=e[4]*b[0]+b[4],f=e[5]*b[3]+b[5];if(0!==e[1]||0!==
  e[2]||0!==b[1]||0!==b[2])a+=e[1]*b[2],k+=e[2]*b[1],d+=e[0]*b[1]+e[1]*b[3],g+=e[2]*b[0]+e[3]*b[2],h+=e[5]*b[2],f+=e[4]*b[1];b[0]=a;b[1]=d;b[2]=g;b[3]=k;b[4]=h;b[5]=f;this._type=0}};a.prototype.translate=function(a,b){var e=this._data;e[4]+=a;e[5]+=b;1===this._type&&(this._type=2);return this};a.prototype.setIdentity=function(){var a=this._data;a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;this._type=1};a.prototype.isIdentity=function(){if(1===this._type)return!0;var a=this._data;return 1===a[0]&&0===a[1]&&
  0===a[2]&&1===a[3]&&0===a[4]&&0===a[5]};a.prototype.transformPoint=function(a){if(1!==this._type){var b=this._data,e=a.x,d=a.y;a.x=b[0]*e+b[2]*d+b[4];a.y=b[1]*e+b[3]*d+b[5]}};a.prototype.transformPoints=function(a){if(1!==this._type)for(var b=0;b<a.length;b++)this.transformPoint(a[b])};a.prototype.deltaTransformPoint=function(a){if(1!==this._type){var b=this._data,e=a.x,d=a.y;a.x=b[0]*e+b[2]*d;a.y=b[1]*e+b[3]*d}};a.prototype.inverse=function(a){var b=this._data,e=a._data;if(1===this._type)a.setIdentity();
  else if(2===this._type)e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=-b[4],e[5]=-b[5],a._type=2;else{var d=b[1],g=b[2],k=b[4],h=b[5];if(0===d&&0===g){var f=e[0]=1/b[0],b=e[3]=1/b[3];e[1]=0;e[2]=0;e[4]=-f*k;e[5]=-b*h}else{var f=b[0],b=b[3],u=f*b-d*g;if(0===u){a.setIdentity();return}u=1/u;e[0]=b*u;d=e[1]=-d*u;g=e[2]=-g*u;b=e[3]=f*u;e[4]=-(e[0]*k+g*h);e[5]=-(d*k+b*h)}a._type=0}};a.prototype.getTranslateX=function(){return this._data[4]};a.prototype.getTranslateY=function(){return this._data[4]};a.prototype.getScaleX=
  function(){var a=this._data;if(1===a[0]&&0===a[1])return 1;var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]);return 0<a[0]?b:-b};a.prototype.getScaleY=function(){var a=this._data;if(0===a[2]&&1===a[3])return 1;var b=Math.sqrt(a[2]*a[2]+a[3]*a[3]);return 0<a[3]?b:-b};a.prototype.getScale=function(){return(this.getScaleX()+this.getScaleY())/2};a.prototype.getAbsoluteScaleX=function(){return Math.abs(this.getScaleX())};a.prototype.getAbsoluteScaleY=function(){return Math.abs(this.getScaleY())};a.prototype.getRotation=
  function(){var a=this._data;return 180*Math.atan(a[1]/a[0])/Math.PI};a.prototype.isScaleOrRotation=function(){var a=this._data;return.01>Math.abs(a[0]*a[2]+a[1]*a[3])};a.prototype.toString=function(a){void 0===a&&(a=2);var b=this._data;return"{"+b[0].toFixed(a)+", "+b[1].toFixed(a)+", "+b[2].toFixed(a)+", "+b[3].toFixed(a)+", "+b[4].toFixed(a)+", "+b[5].toFixed(a)+"}"};a.prototype.toWebGLMatrix=function(){var a=this._data;return new Float32Array([a[0],a[1],0,a[2],a[3],0,a[4],a[5],1])};a.prototype.toCSSTransform=
  function(){var a=this._data;return"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"};a.createIdentity=function(){var c=a.allocate();c.setIdentity();return c};a.prototype.toSVGMatrix=function(){var c=this._data,b=a._createSVGMatrix();try{b.a=c[0],b.b=c[1],b.c=c[2],b.d=c[3],b.e=c[4],b.f=c[5]}catch(e){return a._createSVGMatrix()}return b};a.prototype.snap=function(){var a=this._data;return this.isTranslationOnly()?(a[0]=1,a[1]=0,a[2]=0,a[3]=1,a[4]=Math.round(a[4]),a[5]=Math.round(a[5]),
  this._type=2,!0):!1};a.createIdentitySVGMatrix=function(){return a._createSVGMatrix()};a.createSVGMatrixFromArray=function(c){var b=a._createSVGMatrix();b.a=c[0];b.b=c[1];b.c=c[2];b.d=c[3];b.e=c[4];b.f=c[5];return b};a.allocationCount=0;a._dirtyStack=[];a.multiply=function(a,b){var e=b._data;a.transform(e[0],e[1],e[2],e[3],e[4],e[5])};return a}();q.Matrix=g;g=function(){function a(c,b,e){void 0===e&&(e=7);var d=this.size=1<<e;this.sizeInBits=e;this.w=c;this.h=b;this.c=Math.ceil(c/d);this.r=Math.ceil(b/
  d);this.grid=[];for(c=0;c<this.r;c++)for(this.grid.push([]),b=0;b<this.c;b++)this.grid[c][b]=new a.Cell(new k(b*d,c*d,d,d))}a.prototype.clear=function(){for(var a=0;a<this.r;a++)for(var b=0;b<this.c;b++)this.grid[a][b].clear()};a.prototype.getBounds=function(){return new k(0,0,this.w,this.h)};a.prototype.addDirtyRectangle=function(a){var b=a.x>>this.sizeInBits,e=a.y>>this.sizeInBits;if(!(b>=this.c||e>=this.r)){0>b&&(b=0);0>e&&(e=0);var d=this.grid[e][b];a=a.clone();a.snap();if(d.region.contains(a))d.bounds.isEmpty()?
  d.bounds.set(a):d.bounds.contains(a)||d.bounds.union(a);else for(var g=Math.min(this.c,Math.ceil((a.x+a.w)/this.size))-b,k=Math.min(this.r,Math.ceil((a.y+a.h)/this.size))-e,h=0;h<g;h++)for(var f=0;f<k;f++)d=this.grid[e+f][b+h],d=d.region.clone(),d.intersect(a),d.isEmpty()||this.addDirtyRectangle(d)}};a.prototype.gatherRegions=function(a){for(var b=0;b<this.r;b++)for(var e=0;e<this.c;e++)this.grid[b][e].bounds.isEmpty()||a.push(this.grid[b][e].bounds)};a.prototype.gatherOptimizedRegions=function(a){this.gatherRegions(a)};
  a.prototype.getDirtyRatio=function(){var a=this.w*this.h;if(0===a)return 0;for(var b=0,e=0;e<this.r;e++)for(var d=0;d<this.c;d++)b+=this.grid[e][d].region.area();return b/a};a.prototype.render=function(a,b){function e(b){a.rect(b.x,b.y,b.w,b.h)}if(b&&b.drawGrid){a.strokeStyle="white";for(var d=0;d<this.r;d++)for(var g=0;g<this.c;g++){var k=this.grid[d][g];a.beginPath();e(k.region);a.closePath();a.stroke()}}a.strokeStyle="#E0F8D8";for(d=0;d<this.r;d++)for(g=0;g<this.c;g++)k=this.grid[d][g],a.beginPath(),
  e(k.bounds),a.closePath(),a.stroke()};a.tmpRectangle=k.createEmpty();return a}();q.DirtyRegion=g;(function(a){var b=function(){function a(b){this.region=b;this.bounds=k.createEmpty()}a.prototype.clear=function(){this.bounds.setEmpty()};return a}();a.Cell=b})(g=q.DirtyRegion||(q.DirtyRegion={}));var w=function(){function b(a,d,e,g,h,f){this.index=a;this.x=d;this.y=e;this.scale=f;this.bounds=new k(d*g,e*h,g,h)}b.prototype.getOBB=function(){if(this._obb)return this._obb;this.bounds.getCorners(b.corners);
  return this._obb=new a(b.corners)};b.corners=t.createEmptyPoints(4);return b}();q.Tile=w;var F=function(){function b(a,d,e,g,k){this.tileW=e;this.tileH=g;this.scale=k;this.w=a;this.h=d;this.rows=Math.ceil(d/g);this.columns=Math.ceil(a/e);this.tiles=[];for(d=a=0;d<this.rows;d++)for(var f=0;f<this.columns;f++)this.tiles.push(new w(a++,f,d,e,g,k))}b.prototype.getTiles=function(a,b){if(b.emptyArea(a))return[];if(b.infiniteArea(a))return this.tiles;var e=this.columns*this.rows;return 40>e&&b.isScaleOrRotation()?
  this.getFewTiles(a,b,10<e):this.getManyTiles(a,b)};b.prototype.getFewTiles=function(c,d,e){void 0===e&&(e=!0);if(d.isTranslationOnly()&&1===this.tiles.length)return this.tiles[0].bounds.intersectsTranslated(c,d.tx,d.ty)?[this.tiles[0]]:[];d.transformRectangle(c,b._points);var g;c=new k(0,0,this.w,this.h);e&&(g=new a(b._points));c.intersect(a.getBounds(b._points));if(c.isEmpty())return[];var f=c.x/this.tileW|0;d=c.y/this.tileH|0;var t=Math.ceil((c.x+c.w)/this.tileW)|0,x=Math.ceil((c.y+c.h)/this.tileH)|
  0,f=p(f,0,this.columns),t=p(t,0,this.columns);d=p(d,0,this.rows);for(var x=p(x,0,this.rows),y=[];f<t;f++)for(var u=d;u<x;u++){var v=this.tiles[u*this.columns+f];v.bounds.intersects(c)&&(e?v.getOBB().intersects(g):1)&&y.push(v)}return y};b.prototype.getManyTiles=function(a,d){function e(a,b,l){return(a-b.x)*(l.y-b.y)/(l.x-b.x)+b.y}function g(a,b,l,c,e){if(!(0>l||l>=b.columns))for(c=p(c,0,b.rows),e=p(e+1,0,b.rows);c<e;c++)a.push(b.tiles[c*b.columns+l])}var k=b._points;d.transformRectangle(a,k);for(var f=
  k[0].x<k[1].x?0:1,t=k[2].x<k[3].x?2:3,t=k[f].x<k[t].x?f:t,f=[],y=0;5>y;y++,t++)f.push(k[t%4]);(f[1].x-f[0].x)*(f[3].y-f[0].y)<(f[1].y-f[0].y)*(f[3].x-f[0].x)&&(k=f[1],f[1]=f[3],f[3]=k);var k=[],u,v,t=Math.floor(f[0].x/this.tileW),y=(t+1)*this.tileW;if(f[2].x<y){u=Math.min(f[0].y,f[1].y,f[2].y,f[3].y);v=Math.max(f[0].y,f[1].y,f[2].y,f[3].y);var r=Math.floor(u/this.tileH),n=Math.floor(v/this.tileH);g(k,this,t,r,n);return k}var l=0,z=4,I=!1;if(f[0].x===f[1].x||f[0].x===f[3].x)f[0].x===f[1].x?(I=!0,l++):
  z--,u=e(y,f[l],f[l+1]),v=e(y,f[z],f[z-1]),r=Math.floor(f[l].y/this.tileH),n=Math.floor(f[z].y/this.tileH),g(k,this,t,r,n),t++;do{var J,O,x,q;f[l+1].x<y?(J=f[l+1].y,x=!0):(J=e(y,f[l],f[l+1]),x=!1);f[z-1].x<y?(O=f[z-1].y,q=!0):(O=e(y,f[z],f[z-1]),q=!1);r=Math.floor((f[l].y<f[l+1].y?u:J)/this.tileH);n=Math.floor((f[z].y>f[z-1].y?v:O)/this.tileH);g(k,this,t,r,n);if(x&&I)break;x?(I=!0,l++,u=e(y,f[l],f[l+1])):u=J;q?(z--,v=e(y,f[z],f[z-1])):v=O;t++;y=(t+1)*this.tileW}while(l<z);return k};b._points=t.createEmptyPoints(4);
  return b}();q.TileCache=F;g=function(){function a(b,d,e){this._cacheLevels=[];this._source=b;this._tileSize=d;this._minUntiledSize=e}a.prototype._getTilesAtScale=function(a,d,e){var f=Math.max(d.getAbsoluteScaleX(),d.getAbsoluteScaleY()),g=0;1!==f&&(g=p(Math.round(Math.log(1/f)/Math.LN2),-5,3));f=b(g);if(this._source.hasFlags(256))for(;;){f=b(g);if(e.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(f,f)))break;g--}this._source.hasFlags(512)||(g=p(g,-5,0));f=b(g);e=5+g;g=this._cacheLevels[e];
  if(!g){var g=this._source.getBounds().getAbsoluteBounds().clone().scale(f,f),k,h;this._source.hasFlags(256)||!this._source.hasFlags(1024)||Math.max(g.w,g.h)<=this._minUntiledSize?(k=g.w,h=g.h):k=h=this._tileSize;g=this._cacheLevels[e]=new F(g.w,g.h,k,h,f)}return g.getTiles(a,d.scaleClone(f,f))};a.prototype.fetchTiles=function(a,b,e,d){var g=new k(0,0,e.canvas.width,e.canvas.height);a=this._getTilesAtScale(a,b,g);var f;b=this._source;for(var h=0;h<a.length;h++){var t=a[h];t.cachedSurfaceRegion&&t.cachedSurfaceRegion.surface&&
  !b.hasFlags(4352)||(f||(f=[]),f.push(t))}f&&this._cacheTiles(e,f,d,g);b.removeFlags(4096);return a};a.prototype._getTileBounds=function(a){for(var b=k.createEmpty(),e=0;e<a.length;e++)b.union(a[e].bounds);return b};a.prototype._cacheTiles=function(a,b,e,d,g){void 0===g&&(g=4);var k=this._getTileBounds(b);a.save();a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,d.w,d.h);a.translate(-k.x,-k.y);a.scale(b[0].scale,b[0].scale);var h=this._source.getBounds();a.translate(-h.x,-h.y);2<=f.traceLevel&&f.writer&&
  f.writer.writeLn("Rendering Tiles: "+k);this._source.render(a,0);a.restore();for(var h=null,t=0;t<b.length;t++){var u=b[t],v=u.bounds.clone();v.x-=k.x;v.y-=k.y;d.contains(v)||(h||(h=[]),h.push(u));u.cachedSurfaceRegion=e(u.cachedSurfaceRegion,a,v)}h&&(2<=h.length?(b=h.slice(0,h.length/2|0),k=h.slice(b.length),this._cacheTiles(a,b,e,d,g-1),this._cacheTiles(a,k,e,d,g-1)):this._cacheTiles(a,h,e,d,g-1))};return a}();q.RenderableTileCache=g})(f.Geometry||(f.Geometry={}))})(d.GFX||(d.GFX={}))})(Shumway||
  (Shumway={}));__extends=this&&this.__extends||function(d,f){function C(){this.constructor=d}for(var q in f)f.hasOwnProperty(q)&&(d[q]=f[q]);C.prototype=f.prototype;d.prototype=new C};
  (function(d){(function(f){function C(a){if(1===a)return"Node";if(3===a)return"Shape";if(5===a)return"Group";if(13===a)return"Stage";if(33===a)return"Renderable"}function q(a,b,l){return a+(b-a)*l}function B(a,b,l){return q(a>>24&255,b>>24&255,l)<<24|q(a>>16&255,b>>16&255,l)<<16|q(a>>8&255,b>>8&255,l)<<8|q(a&255,b&255,l)}function w(a,b,l){a=a.measureText(b).width|0;0<l&&(a+=b.length*l);return a}function F(a,b,l,c,e){b=v[b-1];e&&(e=b/4,l-=e,c-=e);e=Math.ceil((1>l?1:l)/(b-1E-9));b=Math.ceil((1>c?1:c)/
  (b-1E-9));a.x-=e;a.w+=2*e;a.y-=b;a.h+=2*b}var G=d.IntegerUtilities.roundToMultipleOfPowerOfTwo,p=f.Geometry.Rectangle;(function(a){var b=function(a){function b(){a.apply(this,arguments)}__extends(b,a);return b}(f.Geometry.Rectangle);a.Region=b;var l=function(){function a(b,l){this._root=new c(0,0,b|0,l|0,!1)}a.prototype.allocate=function(a,b){a=Math.ceil(a);b=Math.ceil(b);var l=this._root.insert(a,b);l&&(l.allocator=this,l.allocated=!0);return l};a.prototype.free=function(a){a.clear();a.allocated=
  !1};a.RANDOM_ORIENTATION=!0;a.MAX_DEPTH=256;return a}();a.CompactAllocator=l;var c=function(a){function b(l,c,e,d,n){a.call(this,l,c,e,d);this._children=null;this._horizontal=n;this.allocated=!1}__extends(b,a);b.prototype.clear=function(){this._children=null;this.allocated=!1};b.prototype.insert=function(a,b){return this._insert(a,b,0)};b.prototype._insert=function(a,c,e){if(!(e>l.MAX_DEPTH||this.allocated||this.w<a||this.h<c))if(this._children){var d;if((d=this._children[0]._insert(a,c,e+1))||(d=
  this._children[1]._insert(a,c,e+1)))return d}else return d=!this._horizontal,l.RANDOM_ORIENTATION&&(d=.5<=Math.random()),this._children=this._horizontal?[new b(this.x,this.y,this.w,c,!1),new b(this.x,this.y+c,this.w,this.h-c,d)]:[new b(this.x,this.y,a,this.h,!0),new b(this.x+a,this.y,this.w-a,this.h,d)],d=this._children[0],d.w===a&&d.h===c?(d.allocated=!0,d):this._insert(a,c,e+1)};return b}(a.Region),e=function(){function a(b,l,c,e){this._columns=b/c|0;this._rows=l/e|0;this._sizeW=c;this._sizeH=e;
  this._freeList=[];this._index=0;this._total=this._columns*this._rows}a.prototype.allocate=function(a,b){a=Math.ceil(a);b=Math.ceil(b);var l=this._sizeW,c=this._sizeH;if(a>l||b>c)return null;var e=this._freeList,n=this._index;return 0<e.length?(l=e.pop(),l.w=a,l.h=b,l.allocated=!0,l):n<this._total?(e=n/this._columns|0,l=new d((n-e*this._columns)*l,e*c,a,b),l.index=n,l.allocator=this,l.allocated=!0,this._index++,l):null};a.prototype.free=function(a){a.allocated=!1;this._freeList.push(a)};return a}();
  a.GridAllocator=e;var d=function(a){function b(l,c,e,d){a.call(this,l,c,e,d);this.index=-1}__extends(b,a);return b}(a.Region);a.GridCell=d;var g=function(){return function(a,b,l){this.size=a;this.region=b;this.allocator=l}}(),k=function(a){function b(l,c,e,d,n){a.call(this,l,c,e,d);this.region=n}__extends(b,a);return b}(a.Region);a.BucketCell=k;b=function(){function a(b,l){this._buckets=[];this._w=b|0;this._h=l|0;this._filled=0}a.prototype.allocate=function(a,b){a=Math.ceil(a);b=Math.ceil(b);var l=
  Math.max(a,b);if(a>this._w||b>this._h)return null;var c=null,d,n=this._buckets;do{for(var z=0;z<n.length&&!(n[z].size>=l&&(d=n[z],c=d.allocator.allocate(a,b)));z++);if(!c){var f=this._h-this._filled;if(f<b)return null;var z=G(l,8),r=2*z;r>f&&(r=f);if(r<z)return null;f=new p(0,this._filled,this._w,r);this._buckets.push(new g(z,f,new e(f.w,f.h,z,z)));this._filled+=r}}while(!c);return new k(d.region.x+c.x,d.region.y+c.y,c.w,c.h,c)};a.prototype.free=function(a){a.region.allocator.free(a.region)};return a}();
  a.BucketAllocator=b})(f.RegionAllocator||(f.RegionAllocator={}));(function(a){var b=function(){function a(b){this._createSurface=b;this._surfaces=[]}Object.defineProperty(a.prototype,"surfaces",{get:function(){return this._surfaces},enumerable:!0,configurable:!0});a.prototype._createNewSurface=function(a,b){var l=this._createSurface(a,b);this._surfaces.push(l);return l};a.prototype.addSurface=function(a){this._surfaces.push(a)};a.prototype.allocate=function(a,b,l){for(var c=0;c<this._surfaces.length;c++){var e=
  this._surfaces[c];if(e!==l&&(e=e.allocate(a,b)))return e}return this._createNewSurface(a,b).allocate(a,b)};a.prototype.free=function(a){};return a}();a.SimpleAllocator=b})(f.SurfaceRegionAllocator||(f.SurfaceRegionAllocator={}));var p=f.Geometry.Rectangle,b=f.Geometry.Matrix,x=f.Geometry.DirtyRegion;(function(a){a[a.Normal=1]="Normal";a[a.Layer=2]="Layer";a[a.Multiply=3]="Multiply";a[a.Screen=4]="Screen";a[a.Lighten=5]="Lighten";a[a.Darken=6]="Darken";a[a.Difference=7]="Difference";a[a.Add=8]="Add";
  a[a.Subtract=9]="Subtract";a[a.Invert=10]="Invert";a[a.Alpha=11]="Alpha";a[a.Erase=12]="Erase";a[a.Overlay=13]="Overlay";a[a.HardLight=14]="HardLight"})(f.BlendMode||(f.BlendMode={}));var t=f.BlendMode,k=function(){function a(){}a.prototype.visitNode=function(a,b){};a.prototype.visitShape=function(a,b){this.visitNode(a,b)};a.prototype.visitGroup=function(a,b){this.visitNode(a,b);for(var c=a.getChildren(),e=0;e<c.length;e++)c[e].visit(this,b)};a.prototype.visitStage=function(a,b){this.visitGroup(a,
  b)};a.prototype.visitRenderable=function(a,b){this.visitNode(a,b)};return a}();f.NodeVisitor=k;var a=function(){return function(){}}();f.State=a;a=function(a){function b(){a.call(this);this.depth=0}__extends(b,a);return b}(a);f.PreRenderState=a;var g=function(a){function b(){a.apply(this,arguments);this.isDirty=!0;this._dirtyRegion=null;this._depth=0}__extends(b,a);b.prototype.start=function(a,b){this._dirtyRegion=b;this._depth=0;a.visit(this,null)};b.prototype.visitGroup=function(a,b){var c=a.getChildren();
  this.visitNode(a,b);for(var e=0;e<c.length;e++)c[e].visit(this,b)};b.prototype.visitNode=function(a,b){a.hasFlags(4096)&&(this.isDirty=!0);a.toggleFlags(4096,!1);a.depth=this._depth++};return b}(k);f.PreRenderVisitor=g;a=function(a){function b(l){a.call(this);this.writer=l}__extends(b,a);b.prototype.visitNode=function(a,b){};b.prototype.visitShape=function(a,b){this.writer.writeLn(a.toString());this.visitNode(a,b)};b.prototype.visitGroup=function(a,b){this.visitNode(a,b);var c=a.getChildren();this.writer.enter(a.toString()+
  " "+c.length);for(var e=0;e<c.length;e++)c[e].visit(this,b);this.writer.outdent()};b.prototype.visitStage=function(a,b){this.visitGroup(a,b)};return b}(k);f.TracingNodeVisitor=a;var D=function(){function a(){this._clip=-1;this._eventListeners=null;this._id=a._nextId++;this._type=1;this._index=-1;this._parent=null;this.reset()}Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});a.prototype._dispatchEvent=function(a){if(this._eventListeners)for(var b=
  this._eventListeners,c=0;c<b.length;c++){var e=b[c];e.type===a&&e.listener(this,a)}};a.prototype.addEventListener=function(a,b){this._eventListeners||(this._eventListeners=[]);this._eventListeners.push({type:a,listener:b})};a.prototype.removeEventListener=function(a,b){for(var c=this._eventListeners,e=0;e<c.length;e++){var d=c[e];if(d.type===a&&d.listener===b){c.splice(e,1);break}}};Object.defineProperty(a.prototype,"properties",{get:function(){return this._properties||(this._properties={})},enumerable:!0,
  configurable:!0});a.prototype.reset=function(){this._flags=59393;this._properties=this._transform=this._layer=this._bounds=null;this.depth=-1};Object.defineProperty(a.prototype,"clip",{get:function(){return this._clip},set:function(a){this._clip=a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});a.prototype.getTransformedBounds=function(a){var b=this.getBounds(!0);if(a!==this&&!b.isEmpty()){var c=this.getTransform().getConcatenatedMatrix();
  a?(a=a.getTransform().getInvertedConcatenatedMatrix(!0),a.preMultiply(c),a.transformRectangleAABB(b),a.free()):c.transformRectangleAABB(b)}return b};a.prototype._markCurrentBoundsAsDirtyRegion=function(){var a=this.getStage();if(a){var b=this.getTransformedBounds(a);a.dirtyRegion.addDirtyRectangle(b)}};a.prototype.getStage=function(a){void 0===a&&(a=!0);for(var b=this._parent;b;){if(b.isType(13)){var c=b;if(a){if(c.dirtyRegion)return c}else return c}b=b._parent}return null};a.prototype.getChildren=
  function(a){throw void 0;};a.prototype.getBounds=function(a){throw void 0;};a.prototype.setBounds=function(a){(this._bounds||(this._bounds=p.createEmpty())).set(a);this.removeFlags(8192)};a.prototype.clone=function(){throw void 0;};a.prototype.setFlags=function(a){this._flags|=a};a.prototype.hasFlags=function(a){return(this._flags&a)===a};a.prototype.hasAnyFlags=function(a){return!!(this._flags&a)};a.prototype.removeFlags=function(a){this._flags&=~a};a.prototype.toggleFlags=function(a,b){this._flags=
  b?this._flags|a:this._flags&~a};a.prototype._propagateFlagsUp=function(a){if(0!==a&&!this.hasFlags(a)){this.hasFlags(2048)||(a&=-8193);this.setFlags(a);var b=this._parent;b&&b._propagateFlagsUp(a)}};a.prototype._propagateFlagsDown=function(a){throw void 0;};a.prototype.isAncestor=function(a){for(;a;){if(a===this)return!0;a=a._parent}return!1};a._getAncestors=function(b,l){var c=a._path;for(c.length=0;b&&b!==l;)c.push(b),b=b._parent;return c};a.prototype._findClosestAncestor=function(a,b){for(var c=
  this;c;){if(c.hasFlags(a)===b)return c;c=c._parent}return null};a.prototype.isType=function(a){return this._type===a};a.prototype.isTypeOf=function(a){return(this._type&a)===a};a.prototype.isLeaf=function(){return this.isType(33)||this.isType(3)};a.prototype.isLinear=function(){if(this.isLeaf())return!0;if(this.isType(5)){var a=this._children;if(1===a.length&&a[0].isLinear())return!0}return!1};a.prototype.getTransformMatrix=function(a){void 0===a&&(a=!1);return this.getTransform().getMatrix(a)};a.prototype.getTransform=
  function(){null===this._transform&&(this._transform=new h(this));return this._transform};a.prototype.getLayer=function(){null===this._layer&&(this._layer=new c(this));return this._layer};a.prototype.getLayerBounds=function(a){var b=this.getBounds();a&&this._layer&&this._layer.expandBounds(b);return b};a.prototype.visit=function(a,b){switch(this._type){case 1:a.visitNode(this,b);break;case 5:a.visitGroup(this,b);break;case 13:a.visitStage(this,b);break;case 3:a.visitShape(this,b);break;case 33:a.visitRenderable(this,
  b);break;default:d.Debug.unexpectedCase()}};a.prototype.invalidate=function(){this._markCurrentBoundsAsDirtyRegion();this._propagateFlagsUp(12288)};a.prototype.toString=function(a){void 0===a&&(a=!1);var b=C(this._type)+" "+this._id;a&&(b+=" "+this._bounds.toString());return b};a._path=[];a._nextId=0;return a}();f.Node=D;var L=function(a){function b(){a.call(this);this._type=5;this._children=[]}__extends(b,a);b.prototype.getChildren=function(a){void 0===a&&(a=!1);return a?this._children.slice(0):
  this._children};b.prototype.childAt=function(a){return this._children[a]};Object.defineProperty(b.prototype,"child",{get:function(){return this._children[0]},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"groupChild",{get:function(){return this._children[0]},enumerable:!0,configurable:!0});b.prototype.addChild=function(a){a._parent&&a._parent.removeChildAt(a._index);a._parent=this;a._index=this._children.length;this._children.push(a);this._propagateFlagsUp(12288);a._propagateFlagsDown(114688);
  a._markCurrentBoundsAsDirtyRegion()};b.prototype.removeChildAt=function(a){var b=this._children[a];b._markCurrentBoundsAsDirtyRegion();this._children.splice(a,1);b._index=-1;b._parent=null;this._propagateFlagsUp(12288);b._propagateFlagsDown(114688)};b.prototype.clearChildren=function(){for(var a=0;a<this._children.length;a++){var b=this._children[a];b._markCurrentBoundsAsDirtyRegion();b&&(b._index=-1,b._parent=null,b._propagateFlagsDown(114688))}this._children.length=0;this._propagateFlagsUp(12288)};
  b.prototype._propagateFlagsDown=function(a){if(!this.hasFlags(a)){this.setFlags(a);for(var b=this._children,c=0;c<b.length;c++)b[c]._propagateFlagsDown(a)}};b.prototype.getBounds=function(a){void 0===a&&(a=!1);var b=this._bounds||(this._bounds=p.createEmpty());if(this.hasFlags(8192)){b.setEmpty();for(var c=this._children,e=p.allocate(),d=0;d<c.length;d++){var n=c[d];e.set(n.getBounds());n.getTransformMatrix().transformRectangleAABB(e);b.union(e)}e.free();this.removeFlags(8192)}return a?b.clone():
  b};b.prototype.getLayerBounds=function(a){if(!a)return this.getBounds();for(var b=p.createEmpty(),c=this._children,e=p.allocate(),d=0;d<c.length;d++){var n=c[d];e.set(n.getLayerBounds(a));n.getTransformMatrix().transformRectangleAABB(e);b.union(e)}e.free();a&&this._layer&&this._layer.expandBounds(b);return b};return b}(D);f.Group=L;var h=function(){function a(c){this._node=c;this._matrix=b.createIdentity();this._colorMatrix=f.ColorMatrix.createIdentity();this._concatenatedMatrix=b.createIdentity();
  this._invertedConcatenatedMatrix=b.createIdentity();this._concatenatedColorMatrix=f.ColorMatrix.createIdentity()}a.prototype.setMatrix=function(a){this._matrix.isEqual(a)||(this._node._markCurrentBoundsAsDirtyRegion(),this._matrix.set(a),this._node._propagateFlagsUp(12288),this._node._propagateFlagsDown(49152),this._node._markCurrentBoundsAsDirtyRegion())};a.prototype.setColorMatrix=function(a){this._colorMatrix.set(a);this._node._propagateFlagsUp(4096);this._node._propagateFlagsDown(65536);this._node._markCurrentBoundsAsDirtyRegion()};
  a.prototype.getMatrix=function(a){void 0===a&&(a=!1);return a?this._matrix.clone():this._matrix};a.prototype.hasColorMatrix=function(){return null!==this._colorMatrix};a.prototype.getColorMatrix=function(a){void 0===a&&(a=!1);null===this._colorMatrix&&(this._colorMatrix=f.ColorMatrix.createIdentity());return a?this._colorMatrix.clone():this._colorMatrix};a.prototype.getConcatenatedMatrix=function(a){void 0===a&&(a=!1);if(this._node.hasFlags(16384))for(var c=this._node._findClosestAncestor(16384,!1),
  e=D._getAncestors(this._node,c),d=c?c.getTransform()._concatenatedMatrix.clone():b.createIdentity(),f=e.length-1;0<=f;f--){var c=e[f],g=c.getTransform();d.preMultiply(g._matrix);g._concatenatedMatrix.set(d);c.removeFlags(16384)}return a?this._concatenatedMatrix.clone():this._concatenatedMatrix};a.prototype.getInvertedConcatenatedMatrix=function(a){void 0===a&&(a=!1);this._node.hasFlags(32768)&&(this.getConcatenatedMatrix().inverse(this._invertedConcatenatedMatrix),this._node.removeFlags(32768));return a?
  this._invertedConcatenatedMatrix.clone():this._invertedConcatenatedMatrix};a.prototype.toString=function(){return this._matrix.toString()};return a}();f.Transform=h;var c=function(){function a(b){this._node=b;this._mask=null;this._blendMode=t.Normal}Object.defineProperty(a.prototype,"filters",{get:function(){return this._filters},set:function(a){this._filters=a;a.length&&this._node.invalidate()},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"blendMode",{get:function(){return this._blendMode},
  set:function(a){this._blendMode=a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"mask",{get:function(){return this._mask},set:function(a){this._mask!==a&&(this._node.invalidate(),this._mask&&this._mask.removeFlags(4));(this._mask=a)&&this._mask.setFlags(4)},enumerable:!0,configurable:!0});a.prototype.toString=function(){return t[this._blendMode]};a.prototype.expandBounds=function(a){var b=this._filters;if(b)for(var c=0;c<b.length;c++)b[c].expandBounds(a)};return a}();f.Layer=
  c;a=function(a){function b(c){a.call(this);this._source=c;this._type=3;this._ratio=0}__extends(b,a);b.prototype.getBounds=function(a){void 0===a&&(a=!1);var b=this._bounds||(this._bounds=p.createEmpty());this.hasFlags(8192)&&(b.set(this._source.getBounds()),this.removeFlags(8192));return a?b.clone():b};Object.defineProperty(b.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"ratio",{get:function(){return this._ratio},set:function(a){a!==
  this._ratio&&(this.invalidate(),this._ratio=a)},enumerable:!0,configurable:!0});b.prototype._propagateFlagsDown=function(a){this.setFlags(a)};b.prototype.getChildren=function(a){return[this._source]};return b}(D);f.Shape=a;a=function(){return function(){this.debug=!1;this.paintRenderable=!0;this.paintViewport=this.paintFlashing=this.paintDirtyRegion=this.paintBounds=!1;this.clear=!0}}();f.RendererOptions=a;k=function(a){function b(c,e,d){a.call(this);this._container=c;this._stage=e;this._options=
  d;this._viewport=p.createSquare(1024);this._devicePixelRatio=1}__extends(b,a);Object.defineProperty(b.prototype,"viewport",{set:function(a){this._viewport.set(a)},enumerable:!0,configurable:!0});b.prototype.render=function(){throw void 0;};b.prototype.resize=function(){throw void 0;};b.prototype.screenShot=function(a,b,c){throw void 0;};return b}(k);f.Renderer=k;k=function(a){function c(b,e,d){void 0===d&&(d=!1);a.call(this);this._preVisitor=new g;this._flags&=-2049;this._type=13;this._scaleMode=
  c.DEFAULT_SCALE;this._align=c.DEFAULT_ALIGN;this._content=new L;this._content._flags&=-2049;this.addChild(this._content);this.setFlags(4096);this.setBounds(new p(0,0,b,e));d?(this._dirtyRegion=new x(b,e),this._dirtyRegion.addDirtyRectangle(new p(0,0,b,e))):this._dirtyRegion=null;this._updateContentMatrix()}__extends(c,a);Object.defineProperty(c.prototype,"dirtyRegion",{get:function(){return this._dirtyRegion},enumerable:!0,configurable:!0});c.prototype.setBounds=function(b){a.prototype.setBounds.call(this,
  b);this._updateContentMatrix();this._dispatchEvent(1);this._dirtyRegion&&(this._dirtyRegion=new x(b.w,b.h),this._dirtyRegion.addDirtyRectangle(b))};Object.defineProperty(c.prototype,"content",{get:function(){return this._content},enumerable:!0,configurable:!0});c.prototype.readyToRender=function(){this._preVisitor.isDirty=!1;this._preVisitor.start(this,this._dirtyRegion);return this._preVisitor.isDirty?!0:!1};Object.defineProperty(c.prototype,"align",{get:function(){return this._align},set:function(a){this._align=
  a;this._updateContentMatrix()},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(a){this._scaleMode=a;this._updateContentMatrix()},enumerable:!0,configurable:!0});c.prototype._updateContentMatrix=function(){if(this._scaleMode===c.DEFAULT_SCALE&&this._align===c.DEFAULT_ALIGN)this._content.getTransform().setMatrix(new b(1,0,0,1,0,0));else{var a=this.getBounds(),e=this._content.getBounds(),d=a.w/e.w,f=a.h/e.h;switch(this._scaleMode){case 2:d=
  f=Math.max(d,f);break;case 4:d=f=1;break;case 1:break;default:d=f=Math.min(d,f)}var g;g=this._align&4?0:this._align&8?a.w-e.w*d:(a.w-e.w*d)/2;a=this._align&1?0:this._align&2?a.h-e.h*f:(a.h-e.h*f)/2;this._content.getTransform().setMatrix(new b(d,0,0,f,g,a))}};c.DEFAULT_SCALE=4;c.DEFAULT_ALIGN=5;return c}(L);f.Stage=k;var m=f.Geometry.Point,p=f.Geometry.Rectangle,b=f.Geometry.Matrix,e=d.ArrayUtilities.indexOf,k=function(a){function b(){a.call(this);this._parents=[];this._renderableParents=[];this._invalidateEventListeners=
  null;this._flags&=-2049;this._type=33}__extends(b,a);Object.defineProperty(b.prototype,"parents",{get:function(){return this._parents},enumerable:!0,configurable:!0});b.prototype.addParent=function(a){e(this._parents,a);this._parents.push(a)};b.prototype.willRender=function(){for(var a=this._parents,b=0;b<a.length;b++)for(var c=a[b];c;){if(c.isType(13))return!0;if(!c.hasFlags(1))break;c=c._parent}return!1};b.prototype.addRenderableParent=function(a){this._renderableParents.push(a)};b.prototype.wrap=
  function(){for(var a,b=this._parents,c=0;c<b.length;c++)if(a=b[c],!a._parent)return a;a=new f.Shape(this);this.addParent(a);return a};b.prototype.invalidate=function(){this.setFlags(4096);for(var a=this._parents,b=0;b<a.length;b++)a[b].invalidate();a=this._renderableParents;for(b=0;b<a.length;b++)a[b].invalidate();if(a=this._invalidateEventListeners)for(b=0;b<a.length;b++)a[b](this)};b.prototype.addInvalidateEventListener=function(a){this._invalidateEventListeners||(this._invalidateEventListeners=
  []);e(this._invalidateEventListeners,a);this._invalidateEventListeners.push(a)};b.prototype.getBounds=function(a){void 0===a&&(a=!1);return a?this._bounds.clone():this._bounds};b.prototype.getChildren=function(a){return null};b.prototype._propagateFlagsUp=function(a){if(0!==a&&!this.hasFlags(a))for(var b=0;b<this._parents.length;b++)this._parents[b]._propagateFlagsUp(a)};b.prototype.render=function(a,b,c,e,d){};return b}(f.Node);f.Renderable=k;a=function(a){function b(c,e){a.call(this);this.setBounds(c);
  this.render=e}__extends(b,a);return b}(k);f.CustomRenderable=a;a=function(a){function b(c,e){a.call(this);this._flags=4352;this._lastPausedTime=this._lastTimeInvalidated=0;this._pauseHappening=this._seekHappening=!1;this._isDOMElement=!0;this.setBounds(new p(0,0,1,1));this._assetId=c;this._eventSerializer=e;var d=document.createElement("video"),f=this._handleVideoEvent.bind(this);d.preload="metadata";d.addEventListener("play",f);d.addEventListener("pause",f);d.addEventListener("ended",f);d.addEventListener("loadeddata",
  f);d.addEventListener("progress",f);d.addEventListener("suspend",f);d.addEventListener("loadedmetadata",f);d.addEventListener("error",f);d.addEventListener("seeking",f);d.addEventListener("seeked",f);d.addEventListener("canplay",f);d.style.position="absolute";this._video=d;this._videoEventHandler=f;b._renderableVideos.push(this);"undefined"!==typeof registerInspectorAsset&&registerInspectorAsset(-1,-1,this);this._state=1}__extends(b,a);Object.defineProperty(b.prototype,"video",{get:function(){return this._video},
  enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0});b.prototype.play=function(){this._state=2;this._video.play()};b.prototype.pause=function(){this._state=3;this._video.pause()};b.prototype._handleVideoEvent=function(a){var b=null,c=this._video;switch(a.type){case "play":if(!this._pauseHappening)return;a=7;break;case "pause":if(2===this._state){c.play();return}a=6;this._pauseHappening=!0;break;case "ended":this._state=
  4;this._notifyNetStream(3,b);a=4;break;case "loadeddata":this._pauseHappening=!1;this._notifyNetStream(2,b);this.play();return;case "canplay":if(this._pauseHappening)return;a=5;break;case "progress":a=10;break;case "suspend":return;case "loadedmetadata":a=1;b={videoWidth:c.videoWidth,videoHeight:c.videoHeight,duration:c.duration};break;case "error":a=11;b={code:c.error.code};break;case "seeking":if(!this._seekHappening)return;a=8;break;case "seeked":if(!this._seekHappening)return;a=9;this._seekHappening=
  !1;break;default:return}this._notifyNetStream(a,b)};b.prototype._notifyNetStream=function(a,b){this._eventSerializer.sendVideoPlaybackEvent(this._assetId,a,b)};b.prototype.processControlRequest=function(a,b){var c=this._video;switch(a){case 1:c.src=b.url;this.play();this._notifyNetStream(0,null);break;case 9:c.paused&&c.play();break;case 2:c&&(b.paused&&!c.paused?(isNaN(b.time)?this._lastPausedTime=c.currentTime:(0!==c.seekable.length&&(c.currentTime=b.time),this._lastPausedTime=b.time),this.pause()):
  !b.paused&&c.paused&&(this.play(),isNaN(b.time)||this._lastPausedTime===b.time||0===c.seekable.length||(c.currentTime=b.time)));break;case 3:c&&0!==c.seekable.length&&(this._seekHappening=!0,c.currentTime=b.time);break;case 4:return c?c.currentTime:0;case 5:return c?c.duration:0;case 6:c&&(c.volume=b.volume);break;case 7:if(!c)return 0;var e=-1;if(c.buffered)for(var d=0;d<c.buffered.length;d++)e=Math.max(e,c.buffered.end(d));else e=c.duration;return Math.round(500*e);case 8:return c?Math.round(500*
  c.duration):0}};b.prototype.checkForUpdate=function(){this._lastTimeInvalidated!==this._video.currentTime&&(this._isDOMElement||this.invalidate());this._lastTimeInvalidated=this._video.currentTime};b.checkForVideoUpdates=function(){for(var a=b._renderableVideos,c=0;c<a.length;c++){var e=a[c];e.willRender()?(e._video.parentElement||e.invalidate(),e._video.style.zIndex=e.parents[0].depth+""):e._video.parentElement&&e._dispatchEvent(2);a[c].checkForUpdate()}};b.prototype.render=function(a,b,c){(b=this._video)&&
  0<b.videoWidth&&a.drawImage(b,0,0,b.videoWidth,b.videoHeight,0,0,this._bounds.w,this._bounds.h)};b._renderableVideos=[];return b}(k);f.RenderableVideo=a;a=function(a){function b(c,e){a.call(this);this._flags=4352;this.properties={};this.setBounds(e);c instanceof HTMLCanvasElement?this._initializeSourceCanvas(c):this._sourceImage=c}__extends(b,a);b.FromDataBuffer=function(a,c,e){var d=document.createElement("canvas");d.width=e.w;d.height=e.h;e=new b(d,e);e.updateFromDataBuffer(a,c);return e};b.FromNode=
  function(a,c,e,d,f){var g=document.createElement("canvas"),k=a.getBounds();g.width=k.w;g.height=k.h;g=new b(g,k);g.drawNode(a,c,e,d,f);return g};b.FromImage=function(a,c,e){return new b(a,new p(0,0,c,e))};b.prototype.updateFromDataBuffer=function(a,b){if(f.imageUpdateOption.value){var c=b.buffer;if(a!==d.ImageType.JPEG&&a!==d.ImageType.PNG&&a!==d.ImageType.GIF){var e=this._bounds,g=this._imageData;g&&g.width===e.w&&g.height===e.h||(g=this._imageData=this._context.createImageData(e.w,e.h));f.imageConvertOption.value&&
  (c=new Int32Array(c),e=new Int32Array(g.data.buffer),d.ColorUtilities.convertImage(a,d.ImageType.StraightAlphaRGBA,c,e));this._ensureSourceCanvas();this._context.putImageData(g,0,0)}this.invalidate()}};b.prototype.readImageData=function(a){a.writeRawBytes(this.imageData.data)};b.prototype.render=function(a,b,c){this.renderSource?a.drawImage(this.renderSource,0,0):this._renderFallback(a)};b.prototype.drawNode=function(a,b,c,e,d){c=f.Canvas2D;e=this.getBounds();(new c.Canvas2DRenderer(this._canvas,
  null)).renderNode(a,d||e,b)};b.prototype.mask=function(a){for(var b=this.imageData,c=new Int32Array(b.data.buffer),e=d.ColorUtilities.getUnpremultiplyTable(),f=0;f<a.length;f++){var g=a[f];if(0===g)c[f]=0;else if(255!==g){var n=c[f],k=n>>0&255,h=n>>8&255,n=n>>16&255,m=g<<8,k=e[m+Math.min(k,g)],h=e[m+Math.min(h,g)],n=e[m+Math.min(n,g)];c[f]=g<<24|n<<16|h<<8|k}}this._context.putImageData(b,0,0)};b.prototype._initializeSourceCanvas=function(a){this._canvas=a;this._context=this._canvas.getContext("2d")};
  b.prototype._ensureSourceCanvas=function(){if(!this._canvas){var a=document.createElement("canvas"),b=this._bounds;a.width=b.w;a.height=b.h;this._initializeSourceCanvas(a)}};Object.defineProperty(b.prototype,"imageData",{get:function(){this._canvas||(this._ensureSourceCanvas(),this._context.drawImage(this._sourceImage,0,0),this._sourceImage=null);return this._context.getImageData(0,0,this._bounds.w,this._bounds.h)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"renderSource",{get:function(){return this._canvas||
  this._sourceImage},enumerable:!0,configurable:!0});b.prototype._renderFallback=function(a){};return b}(k);f.RenderableBitmap=a;var A=function(){return function(a,b,c,e){this.type=a;this.style=b;this.smoothImage=c;this.strokeProperties=e;this.path=new Path2D}}();f.StyledPath=A;var E=function(){return function(a,b,c,e,d){this.thickness=a;this.scaleMode=b;this.capsStyle=c;this.jointsStyle=e;this.miterLimit=d}}();f.StrokeProperties=E;var K=function(a){function c(b,e,d,f){a.call(this);this._flags=5632;
  this.properties={};this.setBounds(f);this._id=b;this._pathData=e;this._textures=d;d.length&&this.setFlags(256)}__extends(c,a);c.prototype.update=function(a,b,c){this.setBounds(c);this._pathData=a;this._paths=null;this._textures=b;this.setFlags(256);this.invalidate()};c.prototype.render=function(a,b,c,e,d){void 0===e&&(e=null);void 0===d&&(d=!1);a.fillStyle=a.strokeStyle="transparent";b=this._deserializePaths(this._pathData,a,b);for(c=0;c<b.length;c++){var f=b[c];a.mozImageSmoothingEnabled=a.msImageSmoothingEnabled=
  a.imageSmoothingEnabled=f.smoothImage;if(0===f.type)e?e.addPath(f.path,a.currentTransform):(a.fillStyle=d?"#000000":f.style,a.fill(f.path,"evenodd"),a.fillStyle="transparent");else if(!e&&!d){a.strokeStyle=f.style;var g=1;f.strokeProperties&&(g=f.strokeProperties.scaleMode,a.lineWidth=f.strokeProperties.thickness,a.lineCap=f.strokeProperties.capsStyle,a.lineJoin=f.strokeProperties.jointsStyle,a.miterLimit=f.strokeProperties.miterLimit);var k=a.lineWidth;(k=1===k||3===k)&&a.translate(.5,.5);a.flashStroke(f.path,
  g);k&&a.translate(-.5,-.5);a.strokeStyle="transparent"}}};c.prototype._deserializePaths=function(a,b,e){if(this._paths)return this._paths;e=this._paths=[];var f=null,g=null,k=0,h=0,m,u,r=!1,v=0,A=0,t=a.commands,y=a.coordinates,x=a.styles,p=x.position=0;a=a.commandsPosition;for(var q=0;q<a;q++)switch(t[q]){case 9:r&&f&&(f.lineTo(v,A),g&&g.lineTo(v,A));r=!0;k=v=y[p++]/20;h=A=y[p++]/20;f&&f.moveTo(k,h);g&&g.moveTo(k,h);break;case 10:k=y[p++]/20;h=y[p++]/20;f&&f.lineTo(k,h);g&&g.lineTo(k,h);break;case 11:m=
  y[p++]/20;u=y[p++]/20;k=y[p++]/20;h=y[p++]/20;f&&f.quadraticCurveTo(m,u,k,h);g&&g.quadraticCurveTo(m,u,k,h);break;case 12:m=y[p++]/20;u=y[p++]/20;var H=y[p++]/20,w=y[p++]/20,k=y[p++]/20,h=y[p++]/20;f&&f.bezierCurveTo(m,u,H,w,k,h);g&&g.bezierCurveTo(m,u,H,w,k,h);break;case 1:f=this._createPath(0,d.ColorUtilities.rgbaToCSSStyle(x.readUnsignedInt()),!1,null,k,h);break;case 3:m=this._readBitmap(x,b);f=this._createPath(0,m.style,m.smoothImage,null,k,h);break;case 2:f=this._createPath(0,this._readGradient(x,
  b),!1,null,k,h);break;case 4:f=null;break;case 5:g=d.ColorUtilities.rgbaToCSSStyle(x.readUnsignedInt());x.position+=1;m=x.readByte();u=c.LINE_CAPS_STYLES[x.readByte()];H=c.LINE_JOINTS_STYLES[x.readByte()];u=new E(y[p++]/20,m,u,H,x.readByte());6===t[q+1]?(q++,g=this._createPath(2,this._readGradient(x,b),!1,u,k,h)):6===t[q+1]?(q++,m=this._readBitmap(x,b),g=this._createPath(2,m.style,m.smoothImage,u,k,h)):g=this._createPath(1,g,!1,u,k,h);break;case 8:g=null}r&&f&&(f.lineTo(v,A),g&&g.lineTo(v,A));this._pathData=
  null;return e};c.prototype._createPath=function(a,b,c,e,d,f){a=new A(a,b,c,e);this._paths.push(a);a.path.moveTo(d,f);return a.path};c.prototype._readMatrix=function(a){return new b(a.readFloat(),a.readFloat(),a.readFloat(),a.readFloat(),a.readFloat(),a.readFloat())};c.prototype._readGradient=function(a,b){var c=a.readUnsignedByte(),e=2*a.readShort()/255,f=this._readMatrix(a),c=16===c?b.createLinearGradient(-1,0,1,0):b.createRadialGradient(e,0,0,0,0,1);c.setTransform&&c.setTransform(f.toSVGMatrix());
  f=a.readUnsignedByte();for(e=0;e<f;e++){var g=a.readUnsignedByte()/255,k=d.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt());c.addColorStop(g,k)}a.position+=2;return c};c.prototype._readBitmap=function(a,b){var c=a.readUnsignedInt(),e=this._readMatrix(a),d=a.readBoolean()?"repeat":"no-repeat",f=a.readBoolean();(c=this._textures[c])?(d=b.createPattern(c.renderSource,d),d.setTransform(e.toSVGMatrix())):d=null;return{style:d,smoothImage:f}};c.prototype._renderFallback=function(a){this.fillStyle||(this.fillStyle=
  d.ColorStyle.randomStyle());var b=this._bounds;a.save();a.beginPath();a.lineWidth=2;a.fillStyle=this.fillStyle;a.fillRect(b.x,b.y,b.w,b.h);a.restore()};c.LINE_CAPS_STYLES=["round","butt","square"];c.LINE_JOINTS_STYLES=["round","bevel","miter"];return c}(k);f.RenderableShape=K;a=function(a){function c(){a.apply(this,arguments);this._flags=5888;this._morphPaths=Object.create(null)}__extends(c,a);c.prototype._deserializePaths=function(a,b,c){if(this._morphPaths[c])return this._morphPaths[c];var e=this._morphPaths[c]=
  [],f=null,g=null,k=0,n=0,h,m,u=!1,r=0,v=0,A=a.commands,t=a.coordinates,y=a.morphCoordinates,x=a.styles,p=a.morphStyles;x.position=0;var H=p.position=0;a=a.commandsPosition;for(var w=0;w<a;w++)switch(A[w]){case 9:u&&f&&(f.lineTo(r,v),g&&g.lineTo(r,v));u=!0;k=r=q(t[H],y[H++],c)/20;n=v=q(t[H],y[H++],c)/20;f&&f.moveTo(k,n);g&&g.moveTo(k,n);break;case 10:k=q(t[H],y[H++],c)/20;n=q(t[H],y[H++],c)/20;f&&f.lineTo(k,n);g&&g.lineTo(k,n);break;case 11:h=q(t[H],y[H++],c)/20;m=q(t[H],y[H++],c)/20;k=q(t[H],y[H++],
  c)/20;n=q(t[H],y[H++],c)/20;f&&f.quadraticCurveTo(h,m,k,n);g&&g.quadraticCurveTo(h,m,k,n);break;case 12:h=q(t[H],y[H++],c)/20;m=q(t[H],y[H++],c)/20;var F=q(t[H],y[H++],c)/20,D=q(t[H],y[H++],c)/20,k=q(t[H],y[H++],c)/20,n=q(t[H],y[H++],c)/20;f&&f.bezierCurveTo(h,m,F,D,k,n);g&&g.bezierCurveTo(h,m,F,D,k,n);break;case 1:f=this._createMorphPath(0,c,d.ColorUtilities.rgbaToCSSStyle(B(x.readUnsignedInt(),p.readUnsignedInt(),c)),!1,null,k,n);break;case 3:h=this._readMorphBitmap(x,p,c,b);f=this._createMorphPath(0,
  c,h.style,h.smoothImage,null,k,n);break;case 2:h=this._readMorphGradient(x,p,c,b);f=this._createMorphPath(0,c,h,!1,null,k,n);break;case 4:f=null;break;case 5:m=q(t[H],y[H++],c)/20;h=d.ColorUtilities.rgbaToCSSStyle(B(x.readUnsignedInt(),p.readUnsignedInt(),c));x.position+=1;var F=x.readByte(),D=K.LINE_CAPS_STYLES[x.readByte()],G=K.LINE_JOINTS_STYLES[x.readByte()];m=new E(m,F,D,G,x.readByte());0<m.thickness&&(g=this._createMorphPath(1,c,h,!1,m,k,n));break;case 6:h=this._readMorphGradient(x,p,c,b);g=
  this._createMorphPath(2,c,h,!1,null,k,n);break;case 7:h=this._readMorphBitmap(x,p,c,b);g=this._createMorphPath(2,c,h.style,h.smoothImage,null,k,n);break;case 8:g=null}u&&f&&(f.lineTo(r,v),g&&g.lineTo(r,v));return e};c.prototype._createMorphPath=function(a,b,c,e,d,f,g){a=new A(a,c,e,d);this._morphPaths[b].push(a);a.path.moveTo(f,g);return a.path};c.prototype._readMorphMatrix=function(a,c,e){return new b(q(a.readFloat(),c.readFloat(),e),q(a.readFloat(),c.readFloat(),e),q(a.readFloat(),c.readFloat(),
  e),q(a.readFloat(),c.readFloat(),e),q(a.readFloat(),c.readFloat(),e),q(a.readFloat(),c.readFloat(),e))};c.prototype._readMorphGradient=function(a,b,c,e){var f=a.readUnsignedByte(),g=2*a.readShort()/255,k=this._readMorphMatrix(a,b,c);e=16===f?e.createLinearGradient(-1,0,1,0):e.createRadialGradient(g,0,0,0,0,1);e.setTransform&&e.setTransform(k.toSVGMatrix());k=a.readUnsignedByte();for(f=0;f<k;f++){var g=q(a.readUnsignedByte()/255,b.readUnsignedByte()/255,c),n=B(a.readUnsignedInt(),b.readUnsignedInt(),
  c),n=d.ColorUtilities.rgbaToCSSStyle(n);e.addColorStop(g,n)}a.position+=2;return e};c.prototype._readMorphBitmap=function(a,b,c,e){var d=a.readUnsignedInt();b=this._readMorphMatrix(a,b,c);c=a.readBoolean()?"repeat":"no-repeat";a=a.readBoolean();e=e.createPattern(this._textures[d]._canvas,c);e.setTransform(b.toSVGMatrix());return{style:e,smoothImage:a}};return c}(K);f.RenderableMorphShape=a;var H=function(){function a(){this.align=this.leading=this.descent=this.ascent=this.width=this.y=this.x=0;this.runs=
  []}a._getMeasureContext=function(){a._measureContext||(a._measureContext=document.createElement("canvas").getContext("2d"));return a._measureContext};a.prototype.addRun=function(b,c,e,d,f){if(e){var g=a._getMeasureContext();g.font=b;g=w(g,e,d);this.runs.push(new y(b,c,e,g,d,f));this.width+=g}};a.prototype.wrap=function(b){var c=[this],e=this.runs,d=this;d.width=0;d.runs=[];for(var f=a._getMeasureContext(),g=0;g<e.length;g++){var k=e[g],h=k.text;k.text="";k.width=0;f.font=k.font;for(var m=b,u=h.split(/[\s.-]/),
  v=0,A=0;A<u.length;A++){var t=u[A],x=h.substr(v,t.length+1),p=k.letterSpacing,q=w(f,x,p);if(q>m){do if(k.text&&(d.runs.push(k),d.width+=k.width,k=new y(k.font,k.fillStyle,"",0,k.letterSpacing,k.underline),m=new a,m.y=d.y+d.descent+d.leading+d.ascent|0,m.ascent=d.ascent,m.descent=d.descent,m.leading=d.leading,m.align=d.align,c.push(m),d=m),m=b-q,0>m){for(var E=x.length,H=x;1<E&&!(E--,H=x.substr(0,E),q=w(f,H,p),q<=b););k.text=H;k.width=q;x=x.substr(E);q=w(f,x,p)}while(x&&0>m)}else m-=q;k.text+=x;k.width+=
  q;v+=t.length+1}d.runs.push(k);d.width+=k.width}return c};a.prototype.toString=function(){return"TextLine {x: "+this.x+", y: "+this.y+", width: "+this.width+", height: "+(this.ascent+this.descent+this.leading)+"}"};return a}();f.TextLine=H;var y=function(){return function(a,b,c,e,d,f){void 0===a&&(a="");void 0===b&&(b="");void 0===c&&(c="");void 0===e&&(e=0);void 0===d&&(d=0);void 0===f&&(f=!1);this.font=a;this.fillStyle=b;this.text=c;this.width=e;this.letterSpacing=d;this.underline=f}}();f.TextRun=
  y;a=function(a){function c(e){a.call(this);this._flags=4352;this.properties={};this._textBounds=e.clone();this._textRunData=null;this._plainText="";this._borderColor=this._backgroundColor=0;this._matrix=b.createIdentity();this._coords=null;this._scrollV=1;this._scrollH=0;this.textRect=e.clone();this.lines=[];this.setBounds(e)}__extends(c,a);c.prototype.setBounds=function(b){a.prototype.setBounds.call(this,b);this._textBounds.set(b);this.textRect.setElements(b.x+2,b.y+2,b.w-2,b.h-2)};c.prototype.setContent=
  function(a,b,c,e){this._textRunData=b;this._plainText=a;this._matrix.set(c);this._coords=e;this.lines=[]};c.prototype.setStyle=function(a,b,c,e){this._backgroundColor=a;this._borderColor=b;this._scrollV=c;this._scrollH=e};c.prototype.reflow=function(a,b){var c=this._textRunData;if(c){for(var e=this._bounds,f=e.w-4,g=this._plainText,k=this.lines,h=new H,n=0,m=0,u=0,r=0,v=-4294967295,A=-1;c.position<c.length;){var t=c.readInt(),y=c.readInt(),x=c.readInt(),p=c.readUTF(),q=c.readInt(),E=c.readInt(),w=
  c.readInt();q>u&&(u=q);E>r&&(r=E);w>v&&(v=w);q=c.readBoolean();E="";c.readBoolean()&&(E+="italic ");q&&(E+="bold ");x=E+x+"px "+p+", AdobeBlank";p=c.readInt();p=d.ColorUtilities.rgbToHex(p);q=c.readInt();-1===A&&(A=q);c.readBoolean();c.readInt();c.readInt();c.readInt();q=c.readInt();c.readInt();for(var E=c.readBoolean(),F="",w=!1;!w;t++){var w=t>=y-1,D=g[t];if("\r"!==D&&"\n"!==D&&(F+=D,t<g.length-1))continue;h.addRun(x,p,F,q,E);if(h.runs.length){k.length&&(n+=v);n+=u;h.y=n|0;n+=r;h.ascent=u;h.descent=
  r;h.leading=v;h.align=A;if(b&&h.width>f)for(h=h.wrap(f),F=0;F<h.length;F++){var K=h[F],n=K.y+K.descent+K.leading;k.push(K);K.width>m&&(m=K.width)}else k.push(h),h.width>m&&(m=h.width);h=new H}else n+=u+r+v;F="";if(w){r=u=0;v=-4294967295;A=-1;break}"\r"===D&&"\n"===g[t+1]&&t++}h.addRun(x,p,F,q,E)}c=g[g.length-1];"\r"!==c&&"\n"!==c||k.push(h);c=this.textRect;c.w=m;c.h=n;if(a){if(!b){f=m;m=e.w;switch(a){case 1:c.x=m-(f+4)>>1;break;case 3:c.x=m-(f+4)}this._textBounds.setElements(c.x-2,c.y-2,c.w+4,c.h+
  4);e.w=f+4}e.x=c.x-2;e.h=n+4}else this._textBounds=e;for(t=0;t<k.length;t++)if(e=k[t],e.width<f)switch(e.align){case 1:e.x=f-e.width|0;break;case 2:e.x=(f-e.width)/2|0}this.invalidate()}};c.roundBoundPoints=function(a){for(var b=0;b<a.length;b++){var c=a[b];c.x=Math.floor(c.x+.1)+.5;c.y=Math.floor(c.y+.1)+.5}};c.prototype.render=function(a){a.save();var e=this._textBounds;this._backgroundColor&&(a.fillStyle=d.ColorUtilities.rgbaToCSSStyle(this._backgroundColor),a.fillRect(e.x,e.y,e.w,e.h));if(this._borderColor){a.strokeStyle=
  d.ColorUtilities.rgbaToCSSStyle(this._borderColor);a.lineCap="square";a.lineWidth=1;var f=c.absoluteBoundPoints,g=a.currentTransform;g?(e=e.clone(),(new b(g.a,g.b,g.c,g.d,g.e,g.f)).transformRectangle(e,f),a.setTransform(1,0,0,1,0,0)):(f[0].x=e.x,f[0].y=e.y,f[1].x=e.x+e.w,f[1].y=e.y,f[2].x=e.x+e.w,f[2].y=e.y+e.h,f[3].x=e.x,f[3].y=e.y+e.h);c.roundBoundPoints(f);e=new Path2D;e.moveTo(f[0].x,f[0].y);e.lineTo(f[1].x,f[1].y);e.lineTo(f[2].x,f[2].y);e.lineTo(f[3].x,f[3].y);e.lineTo(f[0].x,f[0].y);a.stroke(e);
  g&&a.setTransform(g.a,g.b,g.c,g.d,g.e,g.f)}this._coords?this._renderChars(a):this._renderLines(a);a.restore()};c.prototype._renderChars=function(a){if(this._matrix){var b=this._matrix;a.transform(b.a,b.b,b.c,b.d,b.tx,b.ty)}var b=this.lines,c=this._coords;c.position=0;for(var e="",d="",f=0;f<b.length;f++)for(var g=b[f].runs,k=0;k<g.length;k++){var h=g[k];h.font!==e&&(a.font=e=h.font);h.fillStyle!==d&&(a.fillStyle=d=h.fillStyle);for(var h=h.text,n=0;n<h.length;n++){var m=c.readInt()/20,u=c.readInt()/
  20;a.fillText(h[n],m,u)}}};c.prototype._renderLines=function(a){var b=this._textBounds;a.beginPath();a.rect(b.x+2,b.y+2,b.w-4,b.h-4);a.clip();a.translate(b.x-this._scrollH+2,b.y+2);var c=this.lines,e=this._scrollV,d=0,f="",g="";a.textAlign="left";a.textBaseline="alphabetic";for(var k=0;k<c.length;k++){var h=c[k],n=h.x,m=h.y;if(k+1<e)d=m+h.descent+h.leading;else{m-=d;if(k+1-e&&m>b.h)break;for(var u=h.runs,r=0;r<u.length;r++){var v=u[r];v.font!==f&&(a.font=f=v.font);v.fillStyle!==g&&(a.fillStyle=g=
  v.fillStyle);v.underline&&a.fillRect(n,m+h.descent/2|0,v.width,1);a.textAlign="left";a.textBaseline="alphabetic";if(0<v.letterSpacing)for(var t=v.text,A=0;A<t.length;A++)a.fillText(t[A],n,m),n+=w(a,t[A],v.letterSpacing);else a.fillText(v.text,n,m),n+=v.width}}}};c.absoluteBoundPoints=[new m(0,0),new m(0,0),new m(0,0),new m(0,0)];return c}(k);f.RenderableText=a;k=function(a){function b(c,e){a.call(this);this._flags=768;this.properties={};this.setBounds(new p(0,0,c,e))}__extends(b,a);Object.defineProperty(b.prototype,
  "text",{get:function(){return this._text},set:function(a){this._text=a},enumerable:!0,configurable:!0});b.prototype.render=function(a,b,c){a.save();a.textBaseline="top";a.fillStyle="white";a.fillText(this.text,0,0);a.restore()};return b}(k);f.Label=k;var u=d.ColorUtilities.clampByte,k=function(){function a(){}a.prototype.expandBounds=function(a){};return a}();f.Filter=k;var v=[2,1/1.05,1/1.35,1/1.55,1/1.75,1/1.9,.5,1/2.1,1/2.2,1/2.3,.4,1/3,1/3,1/3.5,1/3.5],a=function(a){function b(c,e,d){a.call(this);
  this.blurX=c;this.blurY=e;this.quality=d}__extends(b,a);b.prototype.expandBounds=function(a){F(a,this.quality,this.blurX,this.blurY,!0)};return b}(k);f.BlurFilter=a;a=function(a){function b(c,e,d,f,g,k,h,n,m,u,v){a.call(this);this.alpha=c;this.angle=e;this.blurX=d;this.blurY=f;this.color=g;this.distance=k;this.hideObject=h;this.inner=n;this.knockout=m;this.quality=u;this.strength=v}__extends(b,a);b.prototype.expandBounds=function(a){F(a,this.quality,this.blurX,this.blurY,!1);if(this.distance){var b=
  this.angle*Math.PI/180,c=Math.cos(b)*this.distance,e=Math.sin(b)*this.distance,b=a.x+(0<=c?0:Math.floor(c)),c=a.x+a.w+Math.ceil(Math.abs(c)),d=a.y+(0<=e?0:Math.floor(e)),e=a.y+a.h+Math.ceil(Math.abs(e));a.x=b;a.w=c-b;a.y=d;a.h=e-d}};return b}(k);f.DropshadowFilter=a;a=function(a){function b(c,e,d,f,g,k,h,n){a.call(this);this.alpha=c;this.blurX=e;this.blurY=d;this.color=f;this.inner=g;this.knockout=k;this.quality=h;this.strength=n}__extends(b,a);b.prototype.expandBounds=function(a){this.inner||F(a,
  this.quality,this.blurX,this.blurY,!1)};return b}(k);f.GlowFilter=a;k=function(a){function b(c){a.call(this);this._data=new Float32Array(c);this._type=0}__extends(b,a);b.prototype.clone=function(){var a=new b(this._data);a._type=this._type;return a};b.prototype.set=function(a){this._data.set(a._data);this._type=a._type};b.prototype.toWebGLMatrix=function(){return new Float32Array(this._data)};b.prototype.asWebGLMatrix=function(){return this._data.subarray(0,16)};b.prototype.asWebGLVector=function(){return this._data.subarray(16,
  20)};b.prototype.isIdentity=function(){if(this._type&1)return!0;var a=this._data;return 1==a[0]&&0==a[1]&&0==a[2]&&0==a[3]&&0==a[4]&&1==a[5]&&0==a[6]&&0==a[7]&&0==a[8]&&0==a[9]&&1==a[10]&&0==a[11]&&0==a[12]&&0==a[13]&&0==a[14]&&1==a[15]&&0==a[16]&&0==a[17]&&0==a[18]&&0==a[19]};b.createIdentity=function(){var a=new b([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0]);a._type=1;return a};b.prototype.setMultipliersAndOffsets=function(a,b,c,e,d,f,g,k){for(var h=this._data,n=0;n<h.length;n++)h[n]=0;h[0]=a;h[5]=
  b;h[10]=c;h[15]=e;h[16]=d/255;h[17]=f/255;h[18]=g/255;h[19]=k/255;this._type=0};b.prototype.transformRGBA=function(a){var b=a>>24&255,c=a>>16&255,e=a>>8&255,d=a&255,f=this._data;a=u(b*f[0]+c*f[1]+e*f[2]+d*f[3]+255*f[16]);var g=u(b*f[4]+c*f[5]+e*f[6]+d*f[7]+255*f[17]),k=u(b*f[8]+c*f[9]+e*f[10]+d*f[11]+255*f[18]),b=u(b*f[12]+c*f[13]+e*f[14]+d*f[15]+255*f[19]);return a<<24|g<<16|k<<8|b};b.prototype.multiply=function(a){if(!(a._type&1)){var b=this._data,c=a._data;a=b[0];var e=b[1],d=b[2],f=b[3],g=b[4],
  k=b[5],h=b[6],n=b[7],m=b[8],u=b[9],v=b[10],r=b[11],t=b[12],A=b[13],y=b[14],x=b[15],p=b[16],q=b[17],E=b[18],H=b[19],w=c[0],F=c[1],D=c[2],K=c[3],G=c[4],B=c[5],C=c[6],L=c[7],P=c[8],Q=c[9],R=c[10],S=c[11],T=c[12],U=c[13],V=c[14],W=c[15],X=c[16],Y=c[17],Z=c[18],c=c[19];b[0]=a*w+g*F+m*D+t*K;b[1]=e*w+k*F+u*D+A*K;b[2]=d*w+h*F+v*D+y*K;b[3]=f*w+n*F+r*D+x*K;b[4]=a*G+g*B+m*C+t*L;b[5]=e*G+k*B+u*C+A*L;b[6]=d*G+h*B+v*C+y*L;b[7]=f*G+n*B+r*C+x*L;b[8]=a*P+g*Q+m*R+t*S;b[9]=e*P+k*Q+u*R+A*S;b[10]=d*P+h*Q+v*R+y*S;b[11]=
  f*P+n*Q+r*R+x*S;b[12]=a*T+g*U+m*V+t*W;b[13]=e*T+k*U+u*V+A*W;b[14]=d*T+h*U+v*V+y*W;b[15]=f*T+n*U+r*V+x*W;b[16]=a*X+g*Y+m*Z+t*c+p;b[17]=e*X+k*Y+u*Z+A*c+q;b[18]=d*X+h*Y+v*Z+y*c+E;b[19]=f*X+n*Y+r*Z+x*c+H;this._type=0}};Object.defineProperty(b.prototype,"alphaMultiplier",{get:function(){return this._data[15]},enumerable:!0,configurable:!0});b.prototype.hasOnlyAlphaMultiplier=function(){var a=this._data;return 1==a[0]&&0==a[1]&&0==a[2]&&0==a[3]&&0==a[4]&&1==a[5]&&0==a[6]&&0==a[7]&&0==a[8]&&0==a[9]&&1==
  a[10]&&0==a[11]&&0==a[12]&&0==a[13]&&0==a[14]&&0==a[16]&&0==a[17]&&0==a[18]&&0==a[19]};b.prototype.equals=function(a){if(!a)return!1;if(this._type===a._type&&1===this._type)return!0;var b=this._data;a=a._data;for(var c=0;20>c;c++)if(.001<Math.abs(b[c]-a[c]))return!1;return!0};b.prototype.toSVGFilterMatrix=function(){var a=this._data;return[a[0],a[4],a[8],a[12],a[16],a[1],a[5],a[9],a[13],a[17],a[2],a[6],a[10],a[14],a[18],a[3],a[7],a[11],a[15],a[19]].join(" ")};return b}(k);f.ColorMatrix=k;(function(a){function b(a,
  c){var e=a/2;switch(c){case 0:return 0;case 1:return e/2.7;case 2:return e/1.28;default:return e}}function c(a){var b="source-over";switch(a){case f.BlendMode.Multiply:b="multiply";break;case f.BlendMode.Add:case f.BlendMode.Screen:b="screen";break;case f.BlendMode.Lighten:b="lighten";break;case f.BlendMode.Darken:b="darken";break;case f.BlendMode.Difference:b="difference";break;case f.BlendMode.Overlay:b="overlay";break;case f.BlendMode.HardLight:b="hard-light";break;case f.BlendMode.Alpha:b="destination-in";
  break;case f.BlendMode.Erase:b="destination-out"}return b}var e=CanvasRenderingContext2D.prototype.save,g=CanvasRenderingContext2D.prototype.clip,k=CanvasRenderingContext2D.prototype.fill,h=CanvasRenderingContext2D.prototype.stroke,m=CanvasRenderingContext2D.prototype.restore,u=CanvasRenderingContext2D.prototype.beginPath;a.notifyReleaseChanged=function(){CanvasRenderingContext2D.prototype.save=e;CanvasRenderingContext2D.prototype.clip=g;CanvasRenderingContext2D.prototype.fill=k;CanvasRenderingContext2D.prototype.stroke=
  h;CanvasRenderingContext2D.prototype.restore=m;CanvasRenderingContext2D.prototype.beginPath=u};CanvasRenderingContext2D.prototype.enterBuildingClippingRegion=function(){this.buildingClippingRegionDepth||(this.buildingClippingRegionDepth=0);this.buildingClippingRegionDepth++};CanvasRenderingContext2D.prototype.leaveBuildingClippingRegion=function(){this.buildingClippingRegionDepth--};var v=d.NumberUtilities.clamp;navigator.userAgent.indexOf("Firefox");var t=function(){function a(){}a._prepareSVGFilters=
  function(){if(!a._svgBlurFilter){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("style","display:block;width:0px;height:0px");var c=document.createElementNS("http://www.w3.org/2000/svg","defs"),e=document.createElementNS("http://www.w3.org/2000/svg","filter");e.setAttribute("id","svgBlurFilter");var d=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");d.setAttribute("stdDeviation","0 0");e.appendChild(d);c.appendChild(e);a._svgBlurFilter=d;e=
  document.createElementNS("http://www.w3.org/2000/svg","filter");e.setAttribute("id","svgDropShadowFilter");d=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");d.setAttribute("in","SourceAlpha");d.setAttribute("stdDeviation","3");e.appendChild(d);a._svgDropshadowFilterBlur=d;d=document.createElementNS("http://www.w3.org/2000/svg","feOffset");d.setAttribute("dx","0");d.setAttribute("dy","0");d.setAttribute("result","offsetblur");e.appendChild(d);a._svgDropshadowFilterOffset=d;
  d=document.createElementNS("http://www.w3.org/2000/svg","feFlood");d.setAttribute("flood-color","rgba(0,0,0,1)");e.appendChild(d);a._svgDropshadowFilterFlood=d;d=document.createElementNS("http://www.w3.org/2000/svg","feComposite");d.setAttribute("in2","offsetblur");d.setAttribute("operator","in");e.appendChild(d);d=document.createElementNS("http://www.w3.org/2000/svg","feComposite");d.setAttribute("in2","SourceAlpha");d.setAttribute("operator","out");d.setAttribute("result","outer");e.appendChild(d);
  var d=document.createElementNS("http://www.w3.org/2000/svg","feMerge"),f=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(f);f=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(f);a._svgDropshadowMergeNode=f;e.appendChild(d);c.appendChild(e);e=document.createElementNS("http://www.w3.org/2000/svg","filter");e.setAttribute("id","svgColorMatrixFilter");f=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");f.setAttribute("color-interpolation-filters",
  "sRGB");f.setAttribute("in","SourceGraphic");f.setAttribute("type","matrix");e.appendChild(f);d=document.createElementNS("http://www.w3.org/2000/svg","feComposite");d.setAttribute("in2","SourceAlpha");d.setAttribute("operator","in");e.appendChild(d);c.appendChild(e);a._svgColorMatrixFilter=f;b.appendChild(c);document.documentElement.appendChild(b)}};a._applyFilter=function(c,e,g){if(a._svgFiltersAreSupported)if(a._prepareSVGFilters(),a._removeFilter(e),g instanceof f.BlurFilter){var k=b(c,g.quality);
  a._svgBlurFilter.setAttribute("stdDeviation",g.blurX*k+" "+g.blurY*k);e.filter="url(#svgBlurFilter)"}else g instanceof f.DropshadowFilter?(k=b(c,g.quality),a._svgDropshadowFilterBlur.setAttribute("stdDeviation",g.blurX*k+" "+g.blurY*k),a._svgDropshadowFilterOffset.setAttribute("dx",String(Math.cos(g.angle*Math.PI/180)*g.distance*c)),a._svgDropshadowFilterOffset.setAttribute("dy",String(Math.sin(g.angle*Math.PI/180)*g.distance*c)),a._svgDropshadowFilterFlood.setAttribute("flood-color",d.ColorUtilities.rgbaToCSSStyle(g.color<<
  8|Math.round(255*g.alpha))),a._svgDropshadowMergeNode.setAttribute("in",g.knockout?"outer":"SourceGraphic"),e.filter="url(#svgDropShadowFilter)"):g instanceof f.ColorMatrix&&(a._svgColorMatrixFilter.setAttribute("values",g.toSVGFilterMatrix()),e.filter="url(#svgColorMatrixFilter)")};a._removeFilter=function(a){a.filter="none"};a._applyColorMatrix=function(b,c){c.isIdentity()?(b.globalAlpha=1,b.globalColorMatrix=null):c.hasOnlyAlphaMultiplier()?(b.globalAlpha=v(c.alphaMultiplier,0,1),b.globalColorMatrix=
  null):(b.globalAlpha=1,a._svgFiltersAreSupported?(a._applyFilter(1,b,c),b.globalColorMatrix=null):b.globalColorMatrix=c)};a._svgFiltersAreSupported=!!Object.getOwnPropertyDescriptor(CanvasRenderingContext2D.prototype,"filter");return a}();a.Filters=t;f.filters&&t._svgFiltersAreSupported&&("registerScratchCanvas"in window||(window.registerScratchCanvas=function(a){a.style.display="none";document.body.appendChild(a)}));var A=function(){function a(b,c,e,d){this.surface=b;this.region=c;this.w=e;this.h=
  d}a.prototype.free=function(){this.surface.free(this)};a._ensureCopyCanvasSize=function(b,c){var e;if(a._copyCanvasContext){if(e=a._copyCanvasContext.canvas,e.width<b||e.height<c)e.width=d.IntegerUtilities.nearestPowerOfTwo(b),e.height=d.IntegerUtilities.nearestPowerOfTwo(c)}else e=document.createElement("canvas"),"undefined"!==typeof registerScratchCanvas&&registerScratchCanvas(e),e.width=d.IntegerUtilities.nearestPowerOfTwo(b),e.height=d.IntegerUtilities.nearestPowerOfTwo(c),a._copyCanvasContext=
  e.getContext("2d")};a.prototype.draw=function(b,e,d,g,k,h,n,m,u){this.context.setTransform(1,0,0,1,0,0);var v,r,A=0,y=0;b.context.canvas===this.context.canvas?(a._ensureCopyCanvasSize(g,k),r=a._copyCanvasContext,r.clearRect(0,0,g,k),r.drawImage(b.surface.canvas,b.region.x,b.region.y,g,k,0,0,g,k),v=r,y=A=0):(v=b.surface.context,A=b.region.x,y=b.region.y);a:switch(n){case f.BlendMode.Alpha:b=!0;break a;default:b=!1}b&&(this.context.save(),this.context.beginPath(),this.context.rect(e,d,g,k),this.context.clip());
  this.context.globalAlpha=1;this.context.globalCompositeOperation=c(n);if(m){h&&!h.isIdentity()&&(m=m.concat(h));h=0;if(1<m.length){var x,p,q;r?(n=r,r=v,v=n):(a._ensureCopyCanvasSize(g,k),r=a._copyCanvasContext,p=x=0);for(;h<m.length-1;h++)r.clearRect(0,0,g,k),t._applyFilter(u,r,m[h]),r.drawImage(v.canvas,A,y,g,k,x,p,g,k),t._removeFilter(r),n=r,p=A,q=y,r=v,v=n,y=A=x,x=p,p=q;t._removeFilter(v);t._removeFilter(r)}t._applyFilter(u,this.context,m[h])}this.context.drawImage(v.canvas,A,y,g,k,e,d,g,k);this.context.globalCompositeOperation=
  c(f.BlendMode.Normal);t._removeFilter(this.context);b&&this.context.restore()};Object.defineProperty(a.prototype,"context",{get:function(){return this.surface.context},enumerable:!0,configurable:!0});a.prototype.resetTransform=function(){this.surface.context.setTransform(1,0,0,1,0,0)};a.prototype.reset=function(){var a=this.surface.context;a.setTransform(1,0,0,1,0,0);a.fillStyle="#000000";a.strokeStyle="#000000";a.globalAlpha=1;a.globalColorMatrix=null;a.globalCompositeOperation=c(f.BlendMode.Normal)};
  a.prototype.fill=function(a){var b=this.surface.context,c=this.region;b.fillStyle=a;b.fillRect(c.x,c.y,c.w,c.h)};a.prototype.clear=function(a){var b=this.surface.context,c=this.region;a||(a=c);b.clearRect(a.x,a.y,a.w,a.h)};return a}();a.Canvas2DSurfaceRegion=A;var y=function(){function a(b,c){this.canvas=b;this.context=b.getContext("2d");this.w=b.width;this.h=b.height;this._regionAllocator=c}a.prototype.allocate=function(a,b){var c=this._regionAllocator.allocate(a,b);return c?new A(this,c,a,b):null};
  a.prototype.free=function(a){this._regionAllocator.free(a.region)};return a}();a.Canvas2DSurface=y})(f.Canvas2D||(f.Canvas2D={}))})(d.GFX||(d.GFX={}))})(Shumway||(Shumway={}));__extends=this&&this.__extends||function(d,f){function C(){this.constructor=d}for(var q in f)f.hasOwnProperty(q)&&(d[q]=f[q]);C.prototype=f.prototype;d.prototype=new C};
  (function(d){(function(f){(function(b){var t=d.Debug.assert,k=d.GFX.Geometry.Rectangle,a=d.GFX.Geometry.Point,g=d.GFX.Geometry.Matrix,p=d.GFX.BlendMode,q=d.NumberUtilities.clamp,h=d.NumberUtilities.pow2,c=function(){return function(a,b){this.surfaceRegion=a;this.scale=b}}();b.MipMapLevel=c;var m=function(){function a(b,c,e,d){this._node=c;this._levels=[];this._surfaceRegionAllocator=e;this._size=d;this._renderer=b}a.prototype.getLevel=function(a){a=Math.max(a.getAbsoluteScaleX(),a.getAbsoluteScaleY());
  var b=0;1!==a&&(b=q(Math.round(Math.log(a)/Math.LN2),-5,3));this._node.hasFlags(512)||(b=q(b,-5,0));a=h(b);var e=5+b,b=this._levels[e];if(!b){var d=this._node.getBounds().clone();d.scale(a,a);d.snap();var f=this._surfaceRegionAllocator.allocate(d.w,d.h,null),g=f.region,b=this._levels[e]=new c(f,a),e=new A(f);e.clip.set(g);e.matrix.setElements(a,0,0,a,g.x-d.x,g.y-d.y);e.flags|=64;this._renderer.renderNodeWithState(this._node,e);e.free()}return b};return a}();b.MipMap=m;var e=function(a){function b(){a.apply(this,
  arguments);this.blending=this.imageSmoothing=this.snapToDevicePixels=!0;this.debugLayers=!1;this.filters=this.masking=!0;this.cacheShapes=!1;this.cacheShapesMaxSize=256;this.cacheShapesThreshold=16;this.alpha=!1}__extends(b,a);return b}(f.RendererOptions);b.Canvas2DRendererOptions=e;k.createMaxI16();var A=function(a){function b(c){a.call(this);this.clip=k.createEmpty();this.clipList=[];this.clipPath=null;this.flags=0;this.target=null;this.matrix=g.createIdentity();this.colorMatrix=f.ColorMatrix.createIdentity();
  b.allocationCount++;this.target=c}__extends(b,a);b.prototype.set=function(a){this.clip.set(a.clip);this.clipPath=a.clipPath;this.target=a.target;this.matrix.set(a.matrix);this.colorMatrix.set(a.colorMatrix);this.flags=a.flags;d.ArrayUtilities.copyFrom(this.clipList,a.clipList)};b.prototype.clone=function(){var a=b.allocate();a||(a=new b(this.target));a.set(this);return a};b.allocate=function(){var a=b._dirtyStack,c=null;a.length&&(c=a.pop());return c};b.prototype.free=function(){this.clipPath=null;
  b._dirtyStack.push(this)};b.prototype.transform=function(a){var b=this.clone();b.matrix.preMultiply(a.getMatrix());a.hasColorMatrix()&&b.colorMatrix.multiply(a.getColorMatrix());return b};b.prototype.hasFlags=function(a){return(this.flags&a)===a};b.prototype.removeFlags=function(a){this.flags&=~a};b.prototype.toggleFlags=function(a,b){this.flags=b?this.flags|a:this.flags&~a};b.prototype.beginClipPath=function(a){this.target.context.save();this.clipPath=new Path2D};b.prototype.applyClipPath=function(){var a=
  this.target.context;a.setTransform(1,0,0,1,0,0);a.clip(this.clipPath);var b=this.matrix;a.setTransform(b.a,b.b,b.c,b.d,b.tx,b.ty)};b.prototype.closeClipPath=function(){this.target.context.restore()};b.allocationCount=0;b._dirtyStack=[];return b}(f.State);b.RenderState=A;var E=function(){function a(){this.culledNodes=this.groups=this.shapes=this._count=0}a.prototype.enter=function(a){this._count++};a.prototype.leave=function(){};return a}();b.FrameInfo=E;var w=function(c){function h(a,b,d){void 0===
  d&&(d=new e);c.call(this,a,b,d);this._visited=0;this._frameInfo=new E;this._fontSize=0;this._layers=[];if(a instanceof HTMLCanvasElement){var f=a;this._viewport=new k(0,0,f.width,f.height);this._target=this._createTarget(f)}else{this._addLayer("Background Layer");d=this._addLayer("Canvas Layer");f=document.createElement("canvas");d.appendChild(f);this._viewport=new k(0,0,a.scrollWidth,a.scrollHeight);var g=this;b.addEventListener(1,function(){g._onStageBoundsChanged(f)});this._onStageBoundsChanged(f)}h._prepareSurfaceAllocators()}
  __extends(h,c);h.prototype._addLayer=function(a){a=document.createElement("div");a.style.position="absolute";a.style.overflow="hidden";a.style.width="100%";a.style.height="100%";a.style.zIndex=this._layers.length+"";this._container.appendChild(a);this._layers.push(a);return a};Object.defineProperty(h.prototype,"_backgroundVideoLayer",{get:function(){return this._layers[0]},enumerable:!0,configurable:!0});h.prototype._createTarget=function(a){return new b.Canvas2DSurfaceRegion(new b.Canvas2DSurface(a),
  new f.RegionAllocator.Region(0,0,a.width,a.height),a.width,a.height)};h.prototype._onStageBoundsChanged=function(a){var b=this._stage.getBounds(!0);b.snap();for(var c=this._devicePixelRatio=window.devicePixelRatio||1,e=b.w/c+"px",c=b.h/c+"px",d=0;d<this._layers.length;d++){var f=this._layers[d];f.style.width=e;f.style.height=c}a.width=b.w;a.height=b.h;a.style.position="absolute";a.style.width=e;a.style.height=c;this._target=this._createTarget(a);this._fontSize=10*this._devicePixelRatio};h._prepareSurfaceAllocators=
  function(){h._initializedCaches||(h._surfaceCache=new f.SurfaceRegionAllocator.SimpleAllocator(function(a,c){var e=document.createElement("canvas");"undefined"!==typeof registerScratchCanvas&&registerScratchCanvas(e);var d=Math.max(1024,a),g=Math.max(1024,c);e.width=d;e.height=g;var k=null,k=512<=a||512<=c?new f.RegionAllocator.GridAllocator(d,g,d,g):new f.RegionAllocator.BucketAllocator(d,g);return new b.Canvas2DSurface(e,k)}),h._shapeCache=new f.SurfaceRegionAllocator.SimpleAllocator(function(a,
  c){var e=document.createElement("canvas");"undefined"!==typeof registerScratchCanvas&&registerScratchCanvas(e);e.width=1024;e.height=1024;var d=d=new f.RegionAllocator.CompactAllocator(1024,1024);return new b.Canvas2DSurface(e,d)}),h._initializedCaches=!0)};h.prototype.render=function(){var a=this._stage,b=this._target,c=this._options,e=this._viewport;b.reset();b.context.save();b.context.beginPath();b.context.rect(e.x,e.y,e.w,e.h);b.context.clip();this._renderStageToTarget(b,a,e);b.reset();c.paintViewport&&
  (b.context.beginPath(),b.context.rect(e.x,e.y,e.w,e.h),b.context.strokeStyle="#FF4981",b.context.lineWidth=2,b.context.stroke());b.context.restore()};h.prototype.renderNode=function(a,b,c){var e=new A(this._target);e.clip.set(b);e.flags=256;e.matrix.set(c);a.visit(this,e);e.free()};h.prototype.renderNodeWithState=function(a,b){a.visit(this,b)};h.prototype._renderWithCache=function(a,b){var c=b.matrix,e=a.getBounds();if(e.isEmpty())return!1;var d=this._options.cacheShapesMaxSize,f=Math.max(c.getAbsoluteScaleX(),
  c.getAbsoluteScaleY()),g=!!(b.flags&16),k=!!(b.flags&8);if(b.hasFlags(256)){if(k||g||!b.colorMatrix.isIdentity()||a.hasFlags(256)||100<this._options.cacheShapesThreshold||e.w*f>d||e.h*f>d)return!1;(f=a.properties.mipMap)||(f=a.properties.mipMap=new m(this,a,h._shapeCache,d));g=f.getLevel(c);d=g.surfaceRegion;f=d.region;return g?(g=b.target.context,g.imageSmoothingEnabled=g.mozImageSmoothingEnabled=!0,g.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty),g.drawImage(d.surface.canvas,f.x,f.y,f.w,f.h,e.x,e.y,e.w,
  e.h),!0):!1}};h.prototype._intersectsClipList=function(a,b){var c=a.getBounds(!0),e=!1;b.matrix.transformRectangleAABB(c);b.clip.intersects(c)&&(e=!0);var d=b.clipList;if(e&&d.length)for(var e=!1,f=0;f<d.length;f++)if(c.intersects(d[f])){e=!0;break}c.free();return e};h.prototype.visitGroup=function(a,b){this._frameInfo.groups++;a.getBounds();if((!a.hasFlags(4)||b.flags&4)&&a.hasFlags(1)){var c=b.flags&1;if(!c&&((a.getLayer().blendMode!==p.Normal||a.getLayer().mask)&&this._options.blending||a.getLayer().filters&&
  this._options.filters))b=b.clone(),b.flags|=1,b.clipList=[],this._renderLayer(a,b),b.free();else if(c&&b.removeFlags(1),this._intersectsClipList(a,b))for(var c=null,e=a.getChildren(),d=0;d<e.length;d++){var f=e[d],g=f.getTransform(),k=b.transform(g);k.toggleFlags(4096,f.hasFlags(64));if(0<f.clip){c=c||new Uint8Array(e.length);c[f.clip+d]++;var h=k.clone();h.flags|=16;h.beginClipPath(g.getMatrix());f.visit(this,h);h.applyClipPath();h.free()}else f.visit(this,k);if(c&&0<c[d])for(;c[d]--;)b.closeClipPath();
  k.free()}else this._frameInfo.culledNodes++;this._renderDebugInfo(a,b)}};h.prototype._renderDebugInfo=function(a,b){if(b.flags&1024){var c=b.target.context,e=a.getBounds(!0),f=a.properties.style;f||(f=a.properties.style=d.ColorStyle.randomStyle());c.strokeStyle=f;b.matrix.transformRectangleAABB(e);c.setTransform(1,0,0,1,0,0);e.free();e=a.getBounds();f=h._debugPoints;b.matrix.transformRectangle(e,f);c.lineWidth=1;c.beginPath();c.moveTo(f[0].x,f[0].y);c.lineTo(f[1].x,f[1].y);c.lineTo(f[2].x,f[2].y);
  c.lineTo(f[3].x,f[3].y);c.lineTo(f[0].x,f[0].y);c.stroke()}};h.prototype.visitStage=function(a,b){var c=b.target.context,e=a.getBounds(!0);b.matrix.transformRectangleAABB(e);e.intersect(b.clip);b.target.reset();b=b.clone();if(a.dirtyRegion)if(b.clipList.length=0,a.dirtyRegion.gatherOptimizedRegions(b.clipList),c.save(),b.clipList.length){c.beginPath();for(e=0;e<b.clipList.length;e++){var d=b.clipList[e];c.rect(d.x,d.y,d.w,d.h)}c.clip()}else{c.restore();b.free();return}this._options.clear&&b.target.clear(b.clip);
  a.hasFlags(2)||!a.color||b.flags&32||(this._container.style.backgroundColor=a.color.toCSSStyle());this.visitGroup(a,b);a.dirtyRegion&&(c.restore(),b.target.reset(),c.globalAlpha=.8,b.hasFlags(2048)&&a.dirtyRegion.render(b.target.context),a.dirtyRegion.clear());b.free()};h.prototype.visitShape=function(a,c){if(this._intersectsClipList(a,c)){var e=c.matrix;c.flags&8192&&(e=e.clone(),e.snap());var d=c.target.context;b.Filters._applyColorMatrix(d,c.colorMatrix);a.source instanceof f.RenderableVideo?this.visitRenderableVideo(a.source,
  c):0<d.globalAlpha&&this.visitRenderable(a.source,c,a.ratio);c.flags&8192&&e.free();b.Filters._removeFilter(d)}};h.prototype.visitRenderableVideo=function(a,b){if(a.video&&a.video.videoWidth){var c=this._devicePixelRatio,e=b.matrix.clone();e.scale(1/c,1/c);var c=a.getBounds(),f=d.GFX.Geometry.Matrix.createIdentity();f.scale(c.w/a.video.videoWidth,c.h/a.video.videoHeight);e.preMultiply(f);f.free();c=e.toCSSTransform();a.video.style.transformOrigin="0 0";a.video.style.transform=c;var g=this._backgroundVideoLayer;
  g!==a.video.parentElement&&(g.appendChild(a.video),a.addEventListener(2,function J(a){g.removeChild(a.video);a.removeEventListener(2,J)}));e.free()}};h.prototype.visitRenderable=function(a,b,c){var e=a.getBounds();if(!(b.flags&32||e.isEmpty())){if(b.hasFlags(64))b.removeFlags(64);else if(this._renderWithCache(a,b))return;var d=b.matrix,e=b.target.context,f=!!(b.flags&16),g=!!(b.flags&8);e.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);this._frameInfo.shapes++;e.imageSmoothingEnabled=e.mozImageSmoothingEnabled=
  b.hasFlags(4096);d=a.properties.renderCount||0;a.properties.renderCount=++d;a.render(e,c,null,f?b.clipPath:null,g)}};h.prototype._renderLayer=function(a,b){var c=a.getLayer(),e=c.mask;if(e){var d=!a.hasFlags(16)||!e.hasFlags(16);this._renderWithMask(a,e,c.blendMode,d,b)}else{e=k.allocate();if(d=this._renderToTemporarySurface(a,a.getLayerBounds(!!this._options.filters),b,e,b.target.surface))b.target.draw(d,e.x,e.y,e.w,e.h,b.colorMatrix,this._options.blending?c.blendMode:p.Normal,this._options.filters?
  c.filters:null,this._devicePixelRatio),d.free();e.free()}};h.prototype._renderWithMask=function(a,b,c,e,d){var f=b.getTransform().getConcatenatedMatrix(!0);b.parent||(f=f.scale(this._devicePixelRatio,this._devicePixelRatio));var g=a.getBounds().clone();d.matrix.transformRectangleAABB(g);g.snap();if(!g.isEmpty()){var h=b.getBounds().clone();f.transformRectangleAABB(h);h.snap();if(!h.isEmpty()){var m=d.clip.clone();m.intersect(g);m.intersect(h);m.snap();m.isEmpty()||(g=d.clone(),g.clip.set(m),a=this._renderToTemporarySurface(a,
  a.getBounds(),g,k.createEmpty(),null),g.free(),h=d.clone(),h.clip.set(m),h.matrix=f,h.flags|=4,e&&(h.flags|=8),b=this._renderToTemporarySurface(b,b.getBounds(),h,k.createEmpty(),a.surface),h.free(),a.draw(b,0,0,m.w,m.h,h.colorMatrix,p.Alpha,null,this._devicePixelRatio),d.target.draw(a,m.x,m.y,m.w,m.h,g.colorMatrix,c,null,this._devicePixelRatio),b.free(),a.free())}}};h.prototype._renderStageToTarget=function(a,b,c){k.allocationCount=g.allocationCount=A.allocationCount=0;a=new A(a);a.clip.set(c);this._options.paintRenderable||
  (a.flags|=32);this._options.paintBounds&&(a.flags|=1024);this._options.paintDirtyRegion&&(a.flags|=2048);this._options.paintFlashing&&(a.flags|=512);this._options.cacheShapes&&(a.flags|=256);this._options.imageSmoothing&&(a.flags|=4096);this._options.snapToDevicePixels&&(a.flags|=8192);this._frameInfo.enter(a);b.visit(this,a);this._frameInfo.leave()};h.prototype._renderToTemporarySurface=function(a,b,c,e,d){var f=c.matrix;b=b.clone();f.transformRectangleAABB(b);b.snap();e.set(b);e.intersect(c.clip);
  e.snap();if(e.isEmpty())return null;d=this._allocateSurface(e.w,e.h,d);b=d.region;b=new k(b.x,b.y,e.w,e.h);d.context.setTransform(1,0,0,1,0,0);d.clear();f=f.clone();f.translate(b.x-e.x,b.y-e.y);d.context.save();c=c.clone();c.target=d;c.matrix=f;c.clip.set(b);a.visit(this,c);c.free();d.context.restore();return d};h.prototype._allocateSurface=function(a,b,c){return h._surfaceCache.allocate(a,b,c)};h.prototype.screenShot=function(a,b,c){b&&(b=this._stage.content.groupChild.child,t(b instanceof f.Stage),
  a=b.content.getBounds(!0),b.content.getTransform().getConcatenatedMatrix().transformRectangleAABB(a),a.intersect(this._viewport));a||(a=new k(0,0,this._target.w,this._target.h));b=a.w;var e=a.h,d=this._devicePixelRatio;c&&(b/=d,e/=d,d=1);c=document.createElement("canvas");c.width=b;c.height=e;var g=c.getContext("2d");g.fillStyle=this._container.style.backgroundColor;g.fillRect(0,0,b,e);g.drawImage(this._target.context.canvas,a.x,a.y,a.w,a.h,0,0,b,e);return new f.ScreenShot(c.toDataURL("image/png"),
  b,e,d)};h._initializedCaches=!1;h._debugPoints=a.createEmptyPoints(4);return h}(f.Renderer);b.Canvas2DRenderer=w})(f.Canvas2D||(f.Canvas2D={}));var C=f.Geometry.Point,q=f.Geometry.Matrix,B=f.Geometry.Rectangle,w=function(){function b(){}b.prototype.onMouseUp=function(b,d){b.state=this};b.prototype.onMouseDown=function(b,d){b.state=this};b.prototype.onMouseMove=function(b,d){b.state=this};b.prototype.onMouseWheel=function(b,d){b.state=this};b.prototype.onMouseClick=function(b,d){b.state=this};b.prototype.onKeyUp=
  function(b,d){b.state=this};b.prototype.onKeyDown=function(b,d){b.state=this};b.prototype.onKeyPress=function(b,d){b.state=this};return b}();f.UIState=w;var F=function(b){function d(){b.apply(this,arguments);this._keyCodes=[]}__extends(d,b);d.prototype.onMouseDown=function(b,a){a.altKey&&(b.state=new p(b.worldView,b.getMousePosition(a,null),b.worldView.getTransform().getMatrix(!0)))};d.prototype.onMouseClick=function(b,a){};d.prototype.onKeyDown=function(b,a){this._keyCodes[a.keyCode]=!0};d.prototype.onKeyUp=
  function(b,a){this._keyCodes[a.keyCode]=!1};return d}(w),G=function(b){function d(){b.apply(this,arguments);this._keyCodes=[];this._paused=!1;this._mousePosition=new C(0,0)}__extends(d,b);d.prototype.onMouseMove=function(b,a){this._mousePosition=b.getMousePosition(a,null);this._update(b)};d.prototype.onMouseDown=function(b,a){};d.prototype.onMouseClick=function(b,a){};d.prototype.onMouseWheel=function(b,a){var d="DOMMouseScroll"===a.type?-a.detail:a.wheelDelta/40;if(a.altKey){a.preventDefault();var f=
  b.getMousePosition(a,null),t=b.worldView.getTransform().getMatrix(!0),d=1+d/1E3;t.translate(-f.x,-f.y);t.scale(d,d);t.translate(f.x,f.y);b.worldView.getTransform().setMatrix(t)}};d.prototype.onKeyPress=function(b,a){if(a.altKey){var d=a.keyCode||a.which;console.info("onKeyPress Code: "+d);switch(d){case 248:this._paused=!this._paused;a.preventDefault();break;case 223:b.toggleOption("paintRenderable");a.preventDefault();break;case 8730:b.toggleOption("paintViewport");a.preventDefault();break;case 8747:b.toggleOption("paintBounds");
  a.preventDefault();break;case 8706:b.toggleOption("paintDirtyRegion");a.preventDefault();break;case 231:b.toggleOption("clear");a.preventDefault();break;case 402:b.toggleOption("paintFlashing"),a.preventDefault()}this._update(b)}};d.prototype.onKeyDown=function(b,a){this._keyCodes[a.keyCode]=!0;this._update(b)};d.prototype.onKeyUp=function(b,a){this._keyCodes[a.keyCode]=!1;this._update(b)};d.prototype._update=function(b){b.paused=this._paused;if(b.getOption("paintViewport")){var a=f.viewportLoupeDiameter.value,
  d=f.viewportLoupeDiameter.value;b.viewport=new B(this._mousePosition.x-a/2,this._mousePosition.y-d/2,a,d)}else b.viewport=null};return d}(w);(function(b){function d(){b.apply(this,arguments);this._startTime=Date.now()}__extends(d,b);d.prototype.onMouseMove=function(b,a){if(!(10>Date.now()-this._startTime)){var d=b._world;d&&(b.state=new p(d,b.getMousePosition(a,null),d.getTransform().getMatrix(!0)))}};d.prototype.onMouseUp=function(b,a){b.state=new F;b.selectNodeUnderMouse(a)};return d})(w);var p=
  function(b){function d(f,a,g){b.call(this);this._target=f;this._startPosition=a;this._startMatrix=g}__extends(d,b);d.prototype.onMouseMove=function(b,a){a.preventDefault();var d=b.getMousePosition(a,null);d.sub(this._startPosition);this._target.getTransform().setMatrix(this._startMatrix.clone().translate(d.x,d.y));b.state=this};d.prototype.onMouseUp=function(b,a){b.state=new F};return d}(w),w=function(){function b(t,k,a){function g(a){h._state.onMouseWheel(h,a);h._persistentState.onMouseWheel(h,a)}
  void 0===k&&(k=!1);void 0===a&&(a=void 0);this._state=new F;this._persistentState=new G;this.paused=!1;this.viewport=null;this._selectedNodes=[];this._isRendering=!1;this._rAF=void 0;this._eventListeners=Object.create(null);this._fullScreen=!1;this._container=t;this._stage=new f.Stage(512,512,!1);this._worldView=this._stage.content;this._world=new f.Group;this._worldView.addChild(this._world);this._disableHiDPI=k;k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height=
  "100%";k.style.zIndex="0";t.appendChild(k);if(f.hud.value&&d.Tools){var p=document.createElement("div");p.style.position="absolute";p.style.width="100%";p.style.height="100%";p.style.pointerEvents="none";var q=document.createElement("div");q.style.position="absolute";q.style.width="100%";q.style.height="20px";q.style.pointerEvents="none";p.appendChild(q);t.appendChild(p);this._fps=new d.Tools.Mini.FPS(q)}else this._fps=null;this.transparent=p=0===a;void 0===a||0===a||d.ColorUtilities.rgbaToCSSStyle(a);
  this._options=new f.Canvas2D.Canvas2DRendererOptions;this._options.alpha=p;this._renderer=new f.Canvas2D.Canvas2DRenderer(k,this._stage,this._options);this._listenForContainerSizeChanges();this._onMouseUp=this._onMouseUp.bind(this);this._onMouseDown=this._onMouseDown.bind(this);this._onMouseMove=this._onMouseMove.bind(this);var h=this;window.addEventListener("mouseup",function(a){h._state.onMouseUp(h,a);h._render()},!1);window.addEventListener("mousemove",function(a){h._state.onMouseMove(h,a);h._persistentState.onMouseMove(h,
  a)},!1);window.addEventListener("DOMMouseScroll",g);window.addEventListener("mousewheel",g);t.addEventListener("mousedown",function(a){h._state.onMouseDown(h,a)});window.addEventListener("keydown",function(a){h._state.onKeyDown(h,a);if(h._state!==h._persistentState)h._persistentState.onKeyDown(h,a)},!1);window.addEventListener("keypress",function(a){h._state.onKeyPress(h,a);if(h._state!==h._persistentState)h._persistentState.onKeyPress(h,a)},!1);window.addEventListener("keyup",function(a){h._state.onKeyUp(h,
  a);if(h._state!==h._persistentState)h._persistentState.onKeyUp(h,a)},!1)}b.prototype._listenForContainerSizeChanges=function(){var b=this._containerWidth,d=this._containerHeight;this._onContainerSizeChanged();var a=this;setInterval(function(){if(b!==a._containerWidth||d!==a._containerHeight)a._onContainerSizeChanged(),b=a._containerWidth,d=a._containerHeight},1E3)};b.prototype._onContainerSizeChanged=function(){var b=this.getRatio(),d=Math.ceil(this._containerWidth*b),a=Math.ceil(this._containerHeight*
  b);this._stage.setBounds(new B(0,0,d,a));this._stage.content.setBounds(new B(0,0,d,a));this._worldView.getTransform().setMatrix(new q(b,0,0,b,0,0));this._dispatchEvent("resize")};b.prototype.addEventListener=function(b,d){this._eventListeners[b]||(this._eventListeners[b]=[]);this._eventListeners[b].push(d)};b.prototype._dispatchEvent=function(b){if(b=this._eventListeners[b])for(var d=0;d<b.length;d++)b[d]()};b.prototype.startRendering=function(){if(!this._isRendering){this._isRendering=!0;var b=this;
  this._rAF=requestAnimationFrame(function a(){b.render();b._rAF=requestAnimationFrame(a)})}};b.prototype.stopRendering=function(){this._isRendering&&(this._isRendering=!1,cancelAnimationFrame(this._rAF))};Object.defineProperty(b.prototype,"state",{set:function(b){this._state=b},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"cursor",{set:function(b){this._container.style.cursor=b},enumerable:!0,configurable:!0});b.prototype._render=function(){f.RenderableVideo.checkForVideoUpdates();
  var b=(this._stage.readyToRender()||f.forcePaint.value)&&!this.paused,d=0;if(b){var a=this._renderer;a.viewport=this.viewport?this.viewport:this._stage.getBounds();this._dispatchEvent("render");d=performance.now();a.render();d=performance.now()-d}this._fps&&this._fps.tickAndRender(!b,d)};b.prototype.render=function(){this._render()};Object.defineProperty(b.prototype,"world",{get:function(){return this._world},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"worldView",{get:function(){return this._worldView},
  enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0});b.prototype.getDisplayParameters=function(){var b=this.getRatio();return{stageWidth:this._containerWidth,stageHeight:this._containerHeight,pixelRatio:b,screenWidth:window.screen?window.screen.width:640,screenHeight:window.screen?window.screen.height:
  480}};b.prototype.toggleOption=function(b){var d=this._options;d[b]=!d[b]};b.prototype.getOption=function(b){return this._options[b]};b.prototype.getRatio=function(){var b=window.devicePixelRatio||1,d=1;1===b||this._disableHiDPI||(d=b/1);return d};Object.defineProperty(b.prototype,"_containerWidth",{get:function(){return this._container.clientWidth},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"_containerHeight",{get:function(){return this._container.clientHeight},enumerable:!0,
  configurable:!0});b.prototype.queryNodeUnderMouse=function(b){return this._world};b.prototype.selectNodeUnderMouse=function(b){(b=this._world)&&this._selectedNodes.push(b);this._render()};b.prototype.getMousePosition=function(b,d){var a=this._container,f=a.getBoundingClientRect(),p=this.getRatio(),a=new C(a.scrollWidth/f.width*(b.clientX-f.left)*p,a.scrollHeight/f.height*(b.clientY-f.top)*p);if(!d)return a;f=q.createIdentity();d.getTransform().getConcatenatedMatrix().inverse(f);f.transformPoint(a);
  return a};b.prototype.getMouseWorldPosition=function(b){return this.getMousePosition(b,this._world)};b.prototype._onMouseDown=function(b){};b.prototype._onMouseUp=function(b){};b.prototype._onMouseMove=function(b){};b.prototype.screenShot=function(b,d,a){return this._renderer.screenShot(b,d,a)};return b}();f.Easel=w;var q=d.GFX.Geometry.Matrix,b=function(b){function d(){b.apply(this,arguments);this.layout=0}__extends(d,b);return d}(f.RendererOptions);f.TreeRendererOptions=b;w=function(d){function p(f,
  a,g){void 0===g&&(g=new b);d.call(this,f,a,g);this._canvas=document.createElement("canvas");this._container.appendChild(this._canvas);this._context=this._canvas.getContext("2d");this._listenForContainerSizeChanges()}__extends(p,d);p.prototype._listenForContainerSizeChanges=function(){var b=this._containerWidth,a=this._containerHeight;this._onContainerSizeChanged();var d=this;setInterval(function(){if(b!==d._containerWidth||a!==d._containerHeight)d._onContainerSizeChanged(),b=d._containerWidth,a=d._containerHeight},
  10)};p.prototype._getRatio=function(){var b=window.devicePixelRatio||1,a=1;1!==b&&(a=b/1);return a};p.prototype._onContainerSizeChanged=function(){var b=this._getRatio(),a=Math.ceil(this._containerWidth*b),d=Math.ceil(this._containerHeight*b),f=this._canvas;0<b?(f.width=a*b,f.height=d*b,f.style.width=a+"px",f.style.height=d+"px"):(f.width=a,f.height=d)};Object.defineProperty(p.prototype,"_containerWidth",{get:function(){return this._container.clientWidth},enumerable:!0,configurable:!0});Object.defineProperty(p.prototype,
  "_containerHeight",{get:function(){return this._container.clientHeight},enumerable:!0,configurable:!0});p.prototype.render=function(){var b=this._context;b.save();b.clearRect(0,0,this._canvas.width,this._canvas.height);b.scale(1,1);0===this._options.layout&&this._renderNodeSimple(this._context,this._stage,q.createIdentity());b.restore()};p.prototype._renderNodeSimple=function(b,a,d){function p(a){var d=a.getChildren();a.hasFlags(4096)?b.fillStyle="red":b.fillStyle="white";var g=String(a.id);a instanceof
  f.RenderableText?g="T"+g:a instanceof f.RenderableShape?g="S"+g:a instanceof f.RenderableBitmap?g="B"+g:a instanceof f.RenderableVideo&&(g="V"+g);a instanceof f.Renderable&&(g=g+" ["+a._parents.length+"]");a=b.measureText(g).width;b.fillText(g,h,c);if(d){h+=a+4;e=Math.max(e,h+20);for(g=0;g<d.length;g++)p(d[g]),g<d.length-1&&(c+=18,c>q._canvas.height&&(b.fillStyle="gray",h=h-m+e+8,m=e+8,c=0,b.fillStyle="white"));h-=a+4}}var q=this;b.save();b.font="16px Arial";b.fillStyle="white";var h=0,c=0,m=0,e=
  0;p(a);b.restore()};return p}(f.Renderer);f.TreeRenderer=w})(d.GFX||(d.GFX={}));(function(f){(function(C){var q=d.GFX.BlurFilter,B=d.GFX.DropshadowFilter,w=d.GFX.Shape,F=d.GFX.Group,G=d.GFX.RenderableShape,p=d.GFX.RenderableMorphShape,b=d.GFX.RenderableBitmap,x=d.GFX.RenderableVideo,t=d.GFX.RenderableText,k=d.GFX.ColorMatrix,a=d.ShapeData,g=d.ArrayUtilities.DataBuffer,D=d.GFX.Stage,L=d.GFX.Geometry.Matrix,h=d.GFX.Geometry.Rectangle,c=function(){function a(){}a.prototype.writeMouseEvent=function(a,
  b){var c=this.output;c.writeInt(300);var f=d.Remoting.MouseEventNames.indexOf(a.type);c.writeInt(f);c.writeFloat(b.x);c.writeFloat(b.y);c.writeInt(a.buttons);c.writeInt((a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0))};a.prototype.writeKeyboardEvent=function(a){var b=this.output;b.writeInt(301);var c=d.Remoting.KeyboardEventNames.indexOf(a.type);b.writeInt(c);b.writeInt(a.keyCode);b.writeInt(a.charCode);b.writeInt(a.location);b.writeInt((a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0))};a.prototype.writeFocusEvent=
  function(a){var b=this.output;b.writeInt(302);b.writeInt(a)};return a}();C.GFXChannelSerializer=c;c=function(){function a(b,c,d){function f(a){a=a.getBounds(!0);var c=b.easel.getRatio();a.scale(1/c,1/c);a.snap();g.setBounds(a)}var g=this.stage=new D(128,512);"undefined"!==typeof registerInspectorStage&&registerInspectorStage(g);f(b.stage);b.stage.addEventListener(1,f);b.content=g.content;d&&this.stage.setFlags(2);c.addChild(this.stage);this._nodes=[];this._assets=[];this._easelHost=b;this._canvas=
  document.createElement("canvas");this._context=this._canvas.getContext("2d")}a.prototype._registerAsset=function(a,b,c){"undefined"!==typeof registerInspectorAsset&&registerInspectorAsset(a,b,c);this._assets[a]=c};a.prototype._makeNode=function(a){if(-1===a)return null;var b=null;return b=a&134217728?this._assets[a&-134217729].wrap():this._nodes[a]};a.prototype._getAsset=function(a){return this._assets[a]};a.prototype._getBitmapAsset=function(a){return this._assets[a]};a.prototype._getVideoAsset=
  function(a){return this._assets[a]};a.prototype._getTextAsset=function(a){return this._assets[a]};a.prototype.registerFont=function(a,b,c){d.registerCSSFont(a,b,!inFirefox);inFirefox?c(null):window.setTimeout(c,400)};a.prototype.registerImage=function(a,b,c,d,f,g){this._registerAsset(a,b,this._decodeImage(c,d,f,g))};a.prototype.registerVideo=function(a){this._registerAsset(a,0,new x(a,this))};a.prototype._decodeImage=function(a,c,f,g){var k=new Image,m=b.FromImage(k,-1,-1);k.src=URL.createObjectURL(new Blob([c],
  {type:d.getMIMETypeForImageType(a)}));k.onload=function(){m.setBounds(new h(0,0,k.width,k.height));f&&m.mask(f);m.invalidate();g({width:k.width,height:k.height})};k.onerror=function(){g(null)};return m};a.prototype.sendVideoPlaybackEvent=function(a,b,c){this._easelHost.sendVideoPlaybackEvent(a,b,c)};return a}();C.GFXChannelDeserializerContext=c;c=function(){function c(){}c.prototype.read=function(){for(var a=0,b=this.input,c=0,d=0,f=0,g=0,h=0,k=0,m=0,n=0,l=0;0<b.bytesAvailable;)switch(a=b.readInt(),
  a){case 0:return;case 101:c++;this._readUpdateGraphics();break;case 102:d++;this._readUpdateBitmapData();break;case 103:f++;this._readUpdateTextContent();break;case 100:g++;this._readUpdateFrame();break;case 104:h++;this._readUpdateStage();break;case 107:k++;this._readUpdateCurrentMouseTarget();break;case 105:m++;this._readUpdateNetStream();break;case 200:n++;this._readDrawToBitmap();break;case 106:l++,this._readRequestBitmapData()}};c.prototype._readMatrix=function(){var a=this.input,b=c._temporaryReadMatrix,
  d=1,f=0,g=0,h=1,k=0,p=0;switch(a.readInt()){case 1:d=a.readFloat(),h=a.readFloat();case 0:k=a.readFloat()/20;p=a.readFloat()/20;break;case 2:d=h=a.readFloat();k=a.readFloat()/20;p=a.readFloat()/20;break;case 3:d=a.readFloat(),f=a.readFloat(),g=a.readFloat(),h=a.readFloat(),k=a.readFloat()/20,p=a.readFloat()/20}b.setElements(d,f,g,h,k,p);return b};c.prototype._readRectangle=function(){var a=this.input,b=c._temporaryReadRectangle;b.setElements(a.readInt()/20,a.readInt()/20,a.readInt()/20,a.readInt()/
  20);return b};c.prototype._readColorMatrix=function(){var a=this.input,b=c._temporaryReadColorMatrix,d=1,f=1,g=1,h=1,k=0,p=0,r=0,n=0;switch(a.readInt()){case 0:return c._temporaryReadColorMatrixIdentity;case 1:h=a.readFloat();break;case 2:g=f=d=0;h=a.readFloat();k=a.readInt();p=a.readInt();r=a.readInt();n=a.readInt();break;case 3:d=a.readFloat(),f=a.readFloat(),g=a.readFloat(),h=a.readFloat(),k=a.readInt(),p=a.readInt(),r=a.readInt(),n=a.readInt()}b.setMultipliersAndOffsets(d,f,g,h,k,p,r,n);return b};
  c.prototype._readAsset=function(){var a=this.input.readInt(),b=this.inputAssets[a];this.inputAssets[a]=null;return b};c.prototype._readUpdateGraphics=function(){for(var b=this.input,c=this.context,d=b.readInt(),f=b.readInt(),g=c._getAsset(d),h=this._readRectangle(),k=a.FromPlainObject(this._readAsset()),m=b.readInt(),r=[],n=0;n<m;n++){var l=b.readInt();r.push(c._getBitmapAsset(l))}if(g)g.update(k,r,h);else{b=k.morphCoordinates?new p(d,k,r,h):new G(d,k,r,h);for(n=0;n<r.length;n++)r[n]&&r[n].addRenderableParent(b);
  c._registerAsset(d,f,b)}};c.prototype._readUpdateBitmapData=function(){var a=this.input,c=this.context,d=a.readInt(),f=a.readInt(),h=c._getBitmapAsset(d),k=this._readRectangle(),a=a.readInt(),m=g.FromPlainObject(this._readAsset());h?h.updateFromDataBuffer(a,m):(h=b.FromDataBuffer(a,m,k),c._registerAsset(d,f,h))};c.prototype._readUpdateTextContent=function(){var a=this.input,b=this.context,c=a.readInt(),d=a.readInt(),f=b._getTextAsset(c),h=this._readRectangle(),k=this._readMatrix(),m=a.readInt(),p=
  a.readInt(),n=a.readInt(),l=a.readBoolean(),q=a.readInt(),x=a.readInt(),w=this._readAsset(),F=g.FromPlainObject(this._readAsset()),G=null,B=a.readInt();B&&(G=new g(4*B),a.readBytes(G,0,4*B));f?(f.setBounds(h),f.setContent(w,F,k,G),f.setStyle(m,p,q,x),f.reflow(n,l)):(f=new t(h),f.setContent(w,F,k,G),f.setStyle(m,p,q,x),f.reflow(n,l),b._registerAsset(c,d,f));if(this.output)for(a=f.textRect,this.output.writeInt(20*a.w),this.output.writeInt(20*a.h),this.output.writeInt(20*a.x),f=f.lines,a=f.length,this.output.writeInt(a),
  b=0;b<a;b++)this._writeLineMetrics(f[b])};c.prototype._writeLineMetrics=function(a){this.output.writeInt(a.x);this.output.writeInt(a.width);this.output.writeInt(a.ascent);this.output.writeInt(a.descent);this.output.writeInt(a.leading)};c.prototype._readUpdateStage=function(){var a=this.context,b=this.input.readInt();a._nodes[b]||(a._nodes[b]=a.stage.content);var b=this.input.readInt(),c=this._readRectangle();a.stage.content.setBounds(c);a.stage.color=d.Color.FromARGB(b);a.stage.align=this.input.readInt();
  a.stage.scaleMode=this.input.readInt();b=this.input.readInt();a._easelHost.fullscreen=0===b||1===b};c.prototype._readUpdateCurrentMouseTarget=function(){var a=this.context;this.input.readInt();var b=this.input.readInt();a._easelHost.cursor=d.UI.toCSSCursor(b)};c.prototype._readUpdateNetStream=function(){var a=this.context,b=this.input.readInt(),c=a._getVideoAsset(b),d=this._readRectangle();c||(a.registerVideo(b),c=a._getVideoAsset(b));c.setBounds(d)};c.prototype._readFilters=function(a){var b=this.input,
  c=b.readInt(),g=[];if(c){for(var h=0;h<c;h++){var m=b.readInt();switch(m){case f.FilterType.Blur:g.push(new q(b.readFloat(),b.readFloat(),b.readInt()));break;case f.FilterType.DropShadow:g.push(new B(b.readFloat(),b.readFloat(),b.readFloat(),b.readFloat(),b.readInt(),b.readFloat(),b.readBoolean(),b.readBoolean(),b.readBoolean(),b.readInt(),b.readFloat()));break;case f.FilterType.ColorMatrix:m=new Float32Array(20);m[0]=b.readFloat();m[4]=b.readFloat();m[8]=b.readFloat();m[12]=b.readFloat();m[16]=b.readFloat()/
  255;m[1]=b.readFloat();m[5]=b.readFloat();m[9]=b.readFloat();m[13]=b.readFloat();m[17]=b.readFloat()/255;m[2]=b.readFloat();m[6]=b.readFloat();m[10]=b.readFloat();m[14]=b.readFloat();m[18]=b.readFloat()/255;m[3]=b.readFloat();m[7]=b.readFloat();m[11]=b.readFloat();m[15]=b.readFloat();m[19]=b.readFloat()/255;g.push(new k(m));break;default:d.Debug.somewhatImplemented(f.FilterType[m])}}a.getLayer().filters=g}};c.prototype._readUpdateFrame=function(){var a=this.input,b=this.context,c=a.readInt(),d=0,
  f=b._nodes[c];f||(f=b._nodes[c]=new F);c=a.readInt();c&1&&f.getTransform().setMatrix(this._readMatrix());c&8&&f.getTransform().setColorMatrix(this._readColorMatrix());if(c&64){var g=a.readInt();f.getLayer().mask=0<=g?b._makeNode(g):null}c&128&&(f.clip=a.readInt());c&32&&(d=a.readInt()/65535,f.getLayer().blendMode=a.readInt(),this._readFilters(f),f.toggleFlags(1,a.readBoolean()),f.toggleFlags(16,a.readBoolean()),f.toggleFlags(32,!!a.readInt()),f.toggleFlags(64,!!a.readInt()));if(c&4){c=a.readInt();
  g=f;g.clearChildren();for(var h=0;h<c;h++){var k=a.readInt(),k=b._makeNode(k);g.addChild(k)}}d&&(k=f.getChildren()[0],k instanceof w&&(k.ratio=d))};c.prototype._readDrawToBitmap=function(){var a=this.input,c=this.context,d=a.readInt(),f=a.readInt(),g=a.readInt(),h,k,m;h=g&1?this._readMatrix().clone():L.createIdentity();g&8&&(k=this._readColorMatrix());g&16&&(m=this._readRectangle());g=a.readInt();a.readBoolean();a=c._getBitmapAsset(d);f=c._makeNode(f);a?a.drawNode(f,h,k,g,m):c._registerAsset(d,-1,
  b.FromNode(f,h,k,g,m))};c.prototype._readRequestBitmapData=function(){var a=this.output,b=this.context,c=this.input.readInt();b._getBitmapAsset(c).readImageData(a)};c._temporaryReadMatrix=L.createIdentity();c._temporaryReadRectangle=h.createEmpty();c._temporaryReadColorMatrix=k.createIdentity();c._temporaryReadColorMatrixIdentity=k.createIdentity();return c}();C.GFXChannelDeserializer=c})(f.GFX||(f.GFX={}))})(d.Remoting||(d.Remoting={}));(function(f){var C=d.GFX.Geometry.Point,q=d.ArrayUtilities.DataBuffer;
  f.ContextMenuButton=2;var B=function(){function w(f){this._easel=f;var q=f.transparent;this._group=f.world;this._content=null;this._fullscreen=!1;this._context=new d.Remoting.GFX.GFXChannelDeserializerContext(this,this._group,q);this._addEventListeners();d.registerFallbackFont()}w.prototype.onSendUpdates=function(d,f){throw Error("This method is abstract");};Object.defineProperty(w.prototype,"easel",{get:function(){return this._easel},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,
  "stage",{get:function(){return this._easel.stage},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"content",{set:function(d){this._content=d},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"cursor",{set:function(d){this._easel.cursor=d},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"fullscreen",{set:function(d){this._fullscreen!==d&&(this._fullscreen=d,"undefined"!==typeof ShumwayCom&&ShumwayCom.setFullscreen&&ShumwayCom.setFullscreen(d))},
  enumerable:!0,configurable:!0});w.prototype._mouseEventListener=function(w){if(w.button!==f.ContextMenuButton){var G=this._easel.getMousePosition(w,this._content),G=new C(G.x,G.y),p=new q,b=new d.Remoting.GFX.GFXChannelSerializer;b.output=p;b.writeMouseEvent(w,G);this.onSendUpdates(p,[])}};w.prototype._keyboardEventListener=function(f){var w=new q,p=new d.Remoting.GFX.GFXChannelSerializer;p.output=w;p.writeKeyboardEvent(f);this.onSendUpdates(w,[])};w.prototype._addEventListeners=function(){for(var d=
  this._mouseEventListener.bind(this),f=this._keyboardEventListener.bind(this),p=w._mouseEvents,b=0;b<p.length;b++)window.addEventListener(p[b],d);d=w._keyboardEvents;for(b=0;b<d.length;b++)window.addEventListener(d[b],f);this._addFocusEventListeners();this._easel.addEventListener("resize",this._resizeEventListener.bind(this))};w.prototype._sendFocusEvent=function(f){var w=new q,p=new d.Remoting.GFX.GFXChannelSerializer;p.output=w;p.writeFocusEvent(f);this.onSendUpdates(w,[])};w.prototype._addFocusEventListeners=
  function(){var d=this;document.addEventListener("visibilitychange",function(f){d._sendFocusEvent(document.hidden?0:1)});window.addEventListener("focus",function(f){d._sendFocusEvent(3)});window.addEventListener("blur",function(f){d._sendFocusEvent(2)})};w.prototype._resizeEventListener=function(){this.onDisplayParameters(this._easel.getDisplayParameters())};w.prototype.onDisplayParameters=function(d){throw Error("This method is abstract");};w.prototype.processUpdates=function(f,q,p){void 0===p&&(p=
  null);var b=new d.Remoting.GFX.GFXChannelDeserializer;b.input=f;b.inputAssets=q;b.output=p;b.context=this._context;b.read()};w.prototype.processVideoControl=function(d,f,p){var b=this._context,q=b._getVideoAsset(d);if(!q){if(1!==f)return;b.registerVideo(d);q=b._getVideoAsset(d)}return q.processControlRequest(f,p)};w.prototype.processRegisterFont=function(d,f,p){this._context.registerFont(d,f,p)};w.prototype.processRegisterImage=function(d,f,p,b,q,t){this._context.registerImage(d,f,p,b,q,t)};w.prototype.processFSCommand=
  function(d,f){"undefined"!==typeof ShumwayCom&&"test"===ShumwayCom.environment&&ShumwayCom.processFSCommand(d,f)};w.prototype.processFrame=function(){"undefined"!==typeof ShumwayCom&&"test"===ShumwayCom.environment&&ShumwayCom.processFrame()};w.prototype.onVideoPlaybackEvent=function(d,f,p){throw Error("This method is abstract");};w.prototype.sendVideoPlaybackEvent=function(d,f,p){this.onVideoPlaybackEvent(d,f,p)};w._mouseEvents=d.Remoting.MouseEventNames;w._keyboardEvents=d.Remoting.KeyboardEventNames;
  return w}();f.EaselHost=B;(function(q){var B=d.ArrayUtilities.DataBuffer,C=function(d){function b(b,f){d.call(this,b);this._peer=f;this._peer.onSyncMessage=function(b){return this._onWindowMessage(b,!1)}.bind(this);this._peer.onAsyncMessage=function(b){this._onWindowMessage(b,!0)}.bind(this)}__extends(b,d);b.prototype.onSendUpdates=function(b,d){var f=b.getBytes();this._peer.postAsyncMessage({type:"gfx",updates:f,assets:d},[f.buffer])};b.prototype.onDisplayParameters=function(b){this._peer.postAsyncMessage({type:"displayParameters",
  params:b})};b.prototype.onVideoPlaybackEvent=function(b,d,f){this._peer.postAsyncMessage({type:"videoPlayback",id:b,eventType:d,data:f})};b.prototype._sendRegisterFontResponse=function(b,d){this._peer.postAsyncMessage({type:"registerFontResponse",requestId:b,result:d})};b.prototype._sendRegisterImageResponse=function(b,d){this._peer.postAsyncMessage({type:"registerImageResponse",requestId:b,result:d})};b.prototype._onWindowMessage=function(b,d){var f;if("object"===typeof b&&null!==b)if("player"===
  b.type){var a=B.FromArrayBuffer(b.updates.buffer);d?this.processUpdates(a,b.assets):(f=new B,this.processUpdates(a,b.assets,f),f=f.toPlainObject())}else"frame"===b.type?this.processFrame():"videoControl"===b.type?f=this.processVideoControl(b.id,b.eventType,b.data):"registerFont"===b.type?this.processRegisterFont(b.syncId,b.data,this._sendRegisterFontResponse.bind(this,b.requestId)):"registerImage"===b.type?this.processRegisterImage(b.syncId,b.symbolId,b.imageType,b.data,b.alphaData,this._sendRegisterImageResponse.bind(this,
  b.requestId)):"fscommand"===b.type&&this.processFSCommand(b.command,b.args);return f};return b}(f.EaselHost);q.WindowEaselHost=C})(f.Window||(f.Window={}));(function(q){function B(a,b){a.writeInt(b.length);a.writeRawBytes(b)}function C(a,b){return"byteLength"in a&&"buffer"in a&&(a.constructor&&a.constructor.name)===b}function p(a){return"byteLength"in a&&"ArrayBuffer"===(a.constructor&&a.constructor.name)}function b(b){function f(a){switch(typeof a){case "undefined":e.writeByte(D.Undefined);break;
  case "boolean":e.writeByte(a?D.True:D.False);break;case "number":e.writeByte(D.Number);e.writeDouble(a);break;case "string":e.writeByte(D.String);e.writeUTF(a);break;default:if(null===a){e.writeByte(D.Null);break}if(Array.isArray(a)){e.writeByte(D.Array);e.writeInt(a.length);for(var b=0;b<a.length;b++)f(a[b])}else if(C(a,"Uint8Array"))e.writeByte(D.Uint8Array),B(e,a);else if("length"in a&&"buffer"in a&&"littleEndian"in a)e.writeByte(a.littleEndian?D.PlainObjectDataBufferLE:D.PlainObjectDataBufferBE),
  B(e,new Uint8Array(a.buffer,0,a.length));else if(p(a))e.writeByte(D.ArrayBuffer),B(e,new Uint8Array(a));else if(C(a,"Int32Array"))e.writeByte(D.Int32Array),B(e,new Uint8Array(a.buffer,a.byteOffset,a.byteLength));else{if(!d.isNullOrUndefined(a.buffer)&&p(a.buffer)&&"number"===typeof a.byteOffset)throw Error("Some unsupported TypedArray is used");e.writeByte(D.Object);for(b in a)e.writeUTF(b),f(a[b]);e.writeUTF("")}}}var e=new a;f(b);return e.getBytes()}function x(b){var d=new a,e=b.readInt();b.readBytes(d,
  0,e);return d.getBytes()}function t(b){var d=new a,e=b.readInt();b.readBytes(d,0,e);return k(d)}function k(a){var b=a.readByte();switch(b){case D.Null:return null;case D.True:return!0;case D.False:return!1;case D.Number:return a.readDouble();case D.String:return a.readUTF();case D.Array:for(var b=[],d=a.readInt(),f=0;f<d;f++)b[f]=k(a);return b;case D.Object:for(b={};d=a.readUTF();)b[d]=k(a);return b;case D.ArrayBuffer:return x(a).buffer;case D.Uint8Array:return x(a);case D.PlainObjectDataBufferBE:case D.PlainObjectDataBufferLE:return a=
  x(a),new g(a.buffer,a.length,b===D.PlainObjectDataBufferLE);case D.Int32Array:return new Int32Array(x(a).buffer)}}var a=d.ArrayUtilities.DataBuffer,g=d.ArrayUtilities.PlainObjectDataBuffer,D;(function(a){a[a.Undefined=0]="Undefined";a[a.Null=1]="Null";a[a.True=2]="True";a[a.False=3]="False";a[a.Number=4]="Number";a[a.String=5]="String";a[a.Array=6]="Array";a[a.Object=7]="Object";a[a.ArrayBuffer=8]="ArrayBuffer";a[a.Uint8Array=9]="Uint8Array";a[a.PlainObjectDataBufferLE=10]="PlainObjectDataBufferLE";
  a[a.PlainObjectDataBufferBE=11]="PlainObjectDataBufferBE";a[a.Int32Array=12]="Int32Array"})(D||(D={}));var L=function(){function c(b){this._maxRecordingSize=b;this._recording=new a;this._recordingStarted=0;this._recording.writeRawBytes(new Uint8Array([77,83,87,70]));this._stopped=!1}c.prototype.stop=function(){this._stopped=!0};c.prototype.getRecording=function(){return new Blob([this._recording.getBytes()],{type:"application/octet-stream"})};c.prototype.dump=function(){(new h(this._recording.getBytes())).dump()};
  c.prototype._createRecord=function(a,b){this._stopped||(this._recording.length+8+(b?b.length:0)>=this._maxRecordingSize?(console.error("Recording limit reached"),this._stopped=!0):(0===this._recordingStarted?(this._recordingStarted=Date.now(),this._recording.writeInt(0)):this._recording.writeInt(Date.now()-this._recordingStarted),this._recording.writeInt(a),null!==b?(this._recording.writeInt(b.length),this._recording.writeRawBytes(b.getBytes())):this._recording.writeInt(0)))};c.prototype.recordPlayerCommand=
  function(c,d,f){var g=new a;B(g,d);g.writeInt(f.length);f.forEach(function(a){a=b(a);B(g,a)});this._createRecord(c?2:1,g)};c.prototype.recordFrame=function(){this._createRecord(3,null)};c.prototype.recordFont=function(c,d){var f=new a;f.writeInt(c);B(f,b(d));this._createRecord(4,f)};c.prototype.recordImage=function(c,d,f,g,h){var k=new a;k.writeInt(c);k.writeInt(d);k.writeInt(f);B(k,b(g));B(k,b(h));this._createRecord(5,k)};c.prototype.recordFSCommand=function(b,c){var d=new a;d.writeUTF(b);d.writeUTF(c||
  "");this._createRecord(6,d)};return c}();q.MovieRecorder=L;var h=function(){function b(c){this._buffer=new a;this._buffer.writeRawBytes(c);this._buffer.position=4}b.prototype.readNextRecord=function(){if(this._buffer.position>=this._buffer.length)return 0;var b=this._buffer.readInt(),c=this._buffer.readInt(),d=this._buffer.readInt(),f=null;0<d&&(f=new a,this._buffer.readBytes(f,0,d));this.currentTimestamp=b;this.currentType=c;this.currentData=f;return c};b.prototype.parsePlayerCommand=function(){for(var a=
  x(this.currentData),b=this.currentData.readInt(),c=[],d=0;d<b;d++)c.push(t(this.currentData));return{updates:a,assets:c}};b.prototype.parseFSCommand=function(){var a=this.currentData.readUTF(),b=this.currentData.readUTF();return{command:a,args:b}};b.prototype.parseFont=function(){var a=this.currentData.readInt(),b=t(this.currentData);return{syncId:a,data:b}};b.prototype.parseImage=function(){var a=this.currentData.readInt(),b=this.currentData.readInt(),c=this.currentData.readInt(),d=t(this.currentData),
  f=t(this.currentData);return{syncId:a,symbolId:b,imageType:c,data:d,alphaData:f}};b.prototype.dump=function(){for(var a;a=this.readNextRecord();)switch(console.log("record "+a+" @"+this.currentTimestamp),a){case 1:case 2:console.log(this.parsePlayerCommand());break;case 6:console.log(this.parseFSCommand());break;case 4:console.log(this.parseFont());break;case 5:console.log(this.parseImage())}};return b}();q.MovieRecordParser=h;a=d.ArrayUtilities.DataBuffer;L=function(b){function d(a){b.call(this,
  a);this.alwaysRenderFrame=this.ignoreTimestamps=!1;this.cpuTimeRendering=this.cpuTimeUpdates=0;this.onComplete=null}__extends(d,b);Object.defineProperty(d.prototype,"cpuTime",{get:function(){return this.cpuTimeUpdates+this.cpuTimeRendering},enumerable:!0,configurable:!0});d.prototype.playUrl=function(a){var b=new XMLHttpRequest;b.open("GET",a,!0);b.responseType="arraybuffer";b.onload=function(){this.playBytes(new Uint8Array(b.response))}.bind(this);b.send()};d.prototype.playBytes=function(a){this._parser=
  new q.MovieRecordParser(a);this._lastTimestamp=0;this._parseNext()};d.prototype.onSendUpdates=function(a,b){};d.prototype.onDisplayParameters=function(a){};d.prototype.onVideoPlaybackEvent=function(a,b,c){};d.prototype._parseNext=function(){if(0!==this._parser.readNextRecord()){var a=this._runRecord.bind(this),b=this._parser.currentTimestamp-this._lastTimestamp;this._lastTimestamp=this._parser.currentTimestamp;5>b?Promise.resolve(void 0).then(a):this.ignoreTimestamps?setTimeout(a):setTimeout(a,b)}else if(this.onComplete)this.onComplete()};
  d.prototype._runRecord=function(){var b,c=performance.now();switch(this._parser.currentType){case 1:case 2:b=this._parser.parsePlayerCommand();var d=2===this._parser.currentType,f=a.FromArrayBuffer(b.updates.buffer);d?this.processUpdates(f,b.assets):(d=new a,this.processUpdates(f,b.assets,d));break;case 3:this.processFrame();break;case 4:b=this._parser.parseFont();this.processRegisterFont(b.syncId,b.data,function(){});break;case 5:b=this._parser.parseImage();this.processRegisterImage(b.syncId,b.symbolId,
  b.imageType,b.data,b.alphaData,function(){});break;case 6:b=this._parser.parseFSCommand();this.processFSCommand(b.command,b.args);break;default:throw Error("Invalid movie record type");}this.cpuTimeUpdates+=performance.now()-c;3===this._parser.currentType&&this.alwaysRenderFrame?requestAnimationFrame(this._renderFrameJustAfterRAF.bind(this)):this._parseNext()};d.prototype._renderFrameJustAfterRAF=function(){var a=performance.now();this.easel.render();this.cpuTimeRendering+=performance.now()-a;this._parseNext()};
  return d}(f.EaselHost);q.PlaybackEaselHost=L;L=function(a){function b(d,f,g){void 0===g&&(g=0);a.call(this,d,f);this._recorder=null;this._recorder=new q.MovieRecorder(g)}__extends(b,a);Object.defineProperty(b.prototype,"recorder",{get:function(){return this._recorder},enumerable:!0,configurable:!0});b.prototype._onWindowMessage=function(b,d){switch(b.type){case "player":this._recorder.recordPlayerCommand(d,b.updates,b.assets);break;case "frame":this._recorder.recordFrame();break;case "registerFont":this._recorder.recordFont(b.syncId,
  b.data);break;case "registerImage":this._recorder.recordImage(b.syncId,b.symbolId,b.imageType,b.data,b.alphaData);break;case "fscommand":this._recorder.recordFSCommand(b.command,b.args)}return a.prototype._onWindowMessage.call(this,b,d)};return b}(d.GFX.Window.WindowEaselHost);q.RecordingEaselHost=L})(f.Test||(f.Test={}))})(d.GFX||(d.GFX={}))})(Shumway||(Shumway={}));console.timeEnd("Load GFX Dependencies");
  