diff --git a/papaburger/info.txt b/papaburger/info.txt deleted file mode 100644 index 86589113..00000000 --- a/papaburger/info.txt +++ /dev/null @@ -1 +0,0 @@ -this is the awayfl / html5 version of papa's burgeria. don't ask me how to set up away fl i found a pre made version of this, all other "papa" games will use waflash or ruffle if their compatable. diff --git a/papaburger/js/PapaSeries.js b/papaburger/js/PapaSeries.js deleted file mode 100644 index 2eaeba9f..00000000 --- a/papaburger/js/PapaSeries.js +++ /dev/null @@ -1,50 +0,0 @@ -!function(){"use strict"; -/*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var t,e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function r(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function i(){for(var t=0,e=0,n=arguments.length;e0)},t.prototype.removeAllEventListeners=function(){this._listenerObjects={}},t}(),h=function(){function t(){this._index=0,this._listeners=new Array,this.numListeners=0}return t.prototype.addEventListener=function(t){-1===this._listeners.indexOf(t)&&(this._listeners.push(t),this.numListeners++)},t.prototype.removeEventListener=function(t){var e=this._listeners.indexOf(t);-1!==e&&(this._listeners.splice(e,1),e<=this._index&&this._index--,this.numListeners--)},t.prototype.dispatchEvent=function(t){var e=this.numListeners;for(this._index=0;this._index0},Object.defineProperty(e.prototype,"loops",{get:function(){return this._loops},set:function(t){this._loops="number"==typeof t?t:t?1e3:0},enumerable:!0,configurable:!0}),e.prototype.dispatchRestart=function(){this.dispatchEvent(e.RESTART_EVENT)},e.prototype.tryRestartLoop=function(){return this._loops--,!(this._loops<=0)&&(!!this.restart()||(this._loops=0,!1))},e.prototype.completeInternally=function(t,n){void 0===t&&(t=!0),void 0===n&&(n=!0),n&&this.tryRestartLoop()||t&&this.dispatchEvent(e.COMPLETE_EVENT)},e.prototype.dispatchComplete=function(){this.dispatchEvent(e.COMPLETE_EVENT)},e.prototype.dispatchStop=function(t){void 0===t&&(t=!1),this.dispatchEvent(t?e.ERROR_EVENT:e.STOP_EVENT),this.owner=null,this._stopped=!0,this.removeAllEventListeners()},e.COMPLETE="complete",e.RESTART="restart",e.STOP="stop",e.ERROR="error",e.RESTART_EVENT=new u(e.RESTART),e.COMPLETE_EVENT=new u(e.COMPLETE),e.STOP_EVENT=new u(e.STOP),e.ERROR_EVENT=new u(e.ERROR),e}(c),g=function(t){function e(e,n,r){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=1);var i=t.call(this)||this;return i._groupID=0,i._groupVolume=1,i._groupPan=0,i._startTime=0,i._groupID=e,i._groupVolume=n,i._groupPan=r,i._sourceOpenDelegate=function(t){return i._sourceOpen(t)},i._updateEndDelegate=function(t){return i._updateEnd(t)},i._audio=new Audio,i._audio.ontimeupdate=function(t){return i._onTimeUpdate(t)},i._updateSource(),i}return n(e,t),e.stopAllSounds=function(t){void 0===t&&(t=-1);var n=e._channels.length;if(t<0){for(var r=0;r0)&&(this._isLooping=this.loops>0,this._sourceDirty=!0),this._sourceDirty&&this._updateSource(),this._buffer=e,this._offset=n,this._audio.volume=this._groupVolume*this._volume,this._isQueuing||this._isOpening||this._queueBuffer()},e.prototype.stopInternally=function(e){void 0===e&&(e=!1),this._audio.pause(),this._isPlaying=!1,this._isLooping=!1,t.prototype.completeInternally.call(this,e,e)},e.prototype.stop=function(){this.stopInternally(!1),this.dispatchStop(!1)},e.prototype._sourceOpen=function(t){if(this._isOpening=!1,this._mediaSource.activeSourceBuffers.length)return console.log("ERR: double sourceopen event called"),void this.dispatchStop(!0);this._sourceBuffer=this._mediaSource.addSourceBuffer("audio/mpeg"),this._sourceBuffer.addEventListener("updateend",this._updateEndDelegate),this._isPlaying&&this._queueBuffer()},e.prototype._queueBuffer=function(){this._isQueuing=!0,this._startTime=this._sourceBuffer.timestampOffset,this._sourceBuffer.appendBuffer(this._buffer)},e.prototype._updateEnd=function(t){this._isQueuing=!1,this._isLooping&&this._mediaSource.endOfStream(),this._duration=this._sourceBuffer.timestampOffset-this._startTime,this._audio.currentTime=this._startTime+this._offset,this._audio.play()},e.prototype._onTimeUpdate=function(t){!this._isLooping&&this._duration0&&(t=this.removeSilent(t,n.startOffset,n.samplesCount,n.sampleRate)),e._decodeCache[this._id]=t),t=e._decodeCache[this._id],this._isPlaying&&this.executeBuffer(t)},e.prototype.executeBuffer=function(t){this._source&&this._disposeSource(),this._isDecoding=!1,this._source=this._audioCtx.createBufferSource(),this._source.connect(this._gainNode),this._source.buffer=t,this._duration=t.duration,this._pan=0,this._startTime=this._audioCtx.currentTime-this._currentTime,this._source.onended=this._onEndedDelegate;try{var e=this._groupVolume,n=this._pan;this._groupVolume=-1,this._pan=-1,this.groupVolume=e,this.pan=n,this._source.start(this._audioCtx.currentTime,this._currentTime)}catch(t){console.warn("[WebAudioChannel] Error starting audio: "+t),this.dispatchStop(!0),this._disposeSource()}},e.prototype._onError=function(t){console.warn("[WebAudioChannel] Error with decoding audio data:",t),e._errorCache[this._id]=!0,this._isDecoding=!1,this.stopInternally(!1),this.dispatchStop(!0)},e.prototype._onEnded=function(t){this.stopInternally(!0)},e.prototype._disposeSource=function(){this._source.onended=null,this._source.stop(this._audioCtx.currentTime),this._source.disconnect(),this._source=null},e.prototype.removeSilent=function(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),n=n||t.length,r=r||t.sampleRate,e=Math.ceil(t.sampleRate*e/r),n=t.sampleRate*n/r|0;for(var i=Math.min(t.length,n+e),o=this._audioCtx.createBuffer(t.numberOfChannels,n,t.sampleRate),a=0;athis.maxlength){var e=t+255&-256,n=new ArrayBuffer(e),r=new Uint8Array(this.arraybytes,0,this.length);new Uint8Array(n,0,this.length).set(r),this.arraybytes=n,this.maxlength=e}},e.prototype.writeObject=function(t){console.log("writeObject not implemented yet in core/ByteArray")},e.prototype.readObject=function(){return console.log("readObject not implemented yet in core/ByteArray"),{}},e.prototype.writeByte=function(t){this.ensureWriteableSpace(1),new Int8Array(this.arraybytes)[this.position++]=~~t,this.position>this.length&&(this.length=this.position)},e.prototype.readByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;return new Int8Array(this.arraybytes)[this.position++]},e.prototype.readBytes=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0),null==n&&(n=t.length),t.ensureWriteableSpace(e+n);var r=new Int8Array(t.arraybytes),i=new Int8Array(this.arraybytes);r.set(i.subarray(this.position,this.position+n),e),this.position+=n,n+e>t.length&&(t.length+=n+e-t.length)},e.prototype.writeUnsignedByte=function(t){this.ensureWriteableSpace(1),new Uint8Array(this.arraybytes)[this.position++]=255&~~t,this.position>this.length&&(this.length=this.position)},e.prototype.readUnsignedByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;return new Uint8Array(this.arraybytes)[this.position++]},e.prototype.writeUnsignedShort=function(t){if(this.ensureWriteableSpace(2),0==(1&this.position)){new Uint16Array(this.arraybytes)[this.position>>1]=65535&~~t}else{new Uint16Array(this.unalignedarraybytestemp,0,1)[0]=65535&~~t;var e=new Uint8Array(this.arraybytes,this.position,2),n=new Uint8Array(this.unalignedarraybytestemp,0,2);e.set(n)}this.position+=2,this.position>this.length&&(this.length=this.position)},e.prototype.readUTFBytes=function(t){for(var e="",n=this.position+t,r=new DataView(this.arraybytes);this.positionthis.length+2)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(1&this.position)){var t=new Uint16Array(this.arraybytes),e=this.position>>1;return this.position+=2,t[e]}t=new Uint16Array(this.unalignedarraybytestemp,0,1);var n=new Uint8Array(this.arraybytes,this.position,2);return new Uint8Array(this.unalignedarraybytestemp,0,2).set(n),this.position+=2,t[0]},e.prototype.writeUnsignedInt=function(t){if(this.ensureWriteableSpace(4),0==(3&this.position)){new Uint32Array(this.arraybytes)[this.position>>2]=4294967295&~~t}else{new Uint32Array(this.unalignedarraybytestemp,0,1)[0]=4294967295&~~t;var e=new Uint8Array(this.arraybytes,this.position,4),n=new Uint8Array(this.unalignedarraybytestemp,0,4);e.set(n)}this.position+=4,this.position>this.length&&(this.length=this.position)},e.prototype.writeInt=function(t){if(this.ensureWriteableSpace(4),0==(3&this.position)){new Int32Array(this.arraybytes)[this.position>>2]=~~t}else{new Int32Array(this.unalignedarraybytestemp,0,1)[0]=~~t;var e=new Uint8Array(this.arraybytes,this.position,4),n=new Uint8Array(this.unalignedarraybytestemp,0,4);e.set(n)}this.position+=4,this.position>this.length&&(this.length=this.position)},e.prototype.readUnsignedInt=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(3&this.position)){var t=new Uint32Array(this.arraybytes),e=this.position>>2;return this.position+=4,t[e]}t=new Uint32Array(this.unalignedarraybytestemp,0,1);var n=new Uint8Array(this.arraybytes,this.position,4);return new Uint8Array(this.unalignedarraybytestemp,0,4).set(n),this.position+=4,t[0]},e.prototype.writeFloat=function(t){if(this.ensureWriteableSpace(4),0==(3&this.position)){new Float32Array(this.arraybytes)[this.position>>2]=t}else{new Float32Array(this.unalignedarraybytestemp,0,1)[0]=t;var e=new Uint8Array(this.arraybytes,this.position,4),n=new Uint8Array(this.unalignedarraybytestemp,0,4);e.set(n)}this.position+=4,this.position>this.length&&(this.length=this.position)},e.prototype.readFloat=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;if(0==(3&this.position)){var t=new Float32Array(this.arraybytes),e=this.position>>2;return this.position+=4,t[e]}t=new Float32Array(this.unalignedarraybytestemp,0,1);var n=new Uint8Array(this.arraybytes,this.position,4);return new Uint8Array(this.unalignedarraybytestemp,0,4).set(n),this.position+=4,t[0]},e}(function(){function t(){this.position=0,this.length=0,this._mode=""}return t.prototype.writeByte=function(t){throw"Virtual method"},t.prototype.readByte=function(){throw"Virtual method"},t.prototype.writeUnsignedByte=function(t){throw"Virtual method"},t.prototype.readUnsignedByte=function(){throw"Virtual method"},t.prototype.writeUnsignedShort=function(t){throw"Virtual method"},t.prototype.readUnsignedShort=function(){throw"Virtual method"},t.prototype.writeUnsignedInt=function(t){throw"Virtual method"},t.prototype.readUnsignedInt=function(){throw"Virtual method"},t.prototype.writeFloat=function(t){throw"Virtual method"},t.prototype.toFloatBits=function(t){throw"Virtual method"},t.prototype.readFloat=function(t){throw"Virtual method"},t.prototype.fromFloatBits=function(t){throw"Virtual method"},t.prototype.getBytesAvailable=function(){throw new s("ByteArrayBase, getBytesAvailable() not implemented ")},t.prototype.toString=function(){return"[ByteArray] ( "+this._mode+" ) position="+this.position+" length="+this.length},t.prototype.compareEqual=function(t,e){(null==e||e>this.length-this.position)&&(e=this.length-this.position),e>t.length-t.position&&(e=t.length-t.position);for(var n=e,r=!0;r&&e>=4;)e-=4,this.readUnsignedInt()!=t.readUnsignedInt()&&(r=!1);for(;r&&e>=1;)e--,this.readUnsignedByte()!=t.readUnsignedByte()&&(r=!1);return this.position-=n-e,t.position-=n-e,r},t.prototype.writeBase64String=function(t){},t.prototype.dumpToConsole=function(){var t=this.position;this.position=0;function e(t,e){for(var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i>(i<<2)&15]+r;return r}for(var n=0;nthis.length-this.position)&&(e=this.length-this.position),e>0?t.internalGetBase64String(e,this.readUnsignedByte,this):""},t.internalGetBase64String=function(e,n,r){for(var i,o,a,s,u,l,c,h="",p=t.Base64Key;e>=3;)s=(i=n.apply(r))>>2,u=(3&i)<<4|(o=n.apply(r))>>4,l=(15&o)<<2|(a=n.apply(r))>>6,c=63&a,h+=p.charAt(s)+p.charAt(u)+p.charAt(l)+p.charAt(c),e-=3;return 2==e?(s=(i=n.apply(r))>>2,u=(3&i)<<4|(o=n.apply(r))>>4,l=(15&o)<<2,h+=p.charAt(s)+p.charAt(u)+p.charAt(l)+"="):1==e&&(s=(i=n.apply(r))>>2,u=(3&i)<<4,h+=p.charAt(s)+p.charAt(u)+"=="),h},t.Base64Key="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t}()),v=function(){function t(){}return t.arrayBufferToBase64=function(t,e){for(var n="",r=new Uint8Array(t),i=r.byteLength,o=0;o0,this._audio.src=e._base64Cache[o]||(e._base64Cache[o]=v.arrayBufferToBase64(n,"audio/mp3"));var s=this._audio;this._audio.addEventListener("loadedmetadata",(function(){s.currentTime=r,s.play()}),!1),this._audio.addEventListener("error",(function(t){console.log("error in audio",t),a.dispatchStop(!0)}),!1),this._audio.addEventListener("canplay",(function(t){console.log("canplay in audio",t)}),!1),this._audio.addEventListener("canplaythrough",(function(t){console.log("canplaythrough in audio",t)}),!1),this._audio.addEventListener("abort",(function(t){console.log("abort in audio",t),a.dispatchStop(!0)}),!1),this._audio.addEventListener("loadstart",(function(t){console.log("loadstart in audio",t)}),!1),this._audio.addEventListener("suspend",(function(t){console.log("suspend in audio",t)}),!1)},e.prototype.stopInternally=function(e){void 0===e&&(e=!1),this._audio.pause(),this._isPlaying=!1,this._isLooping=!1,t.prototype.completeInternally.call(this,e,e)},e.prototype.stop=function(){this.stopInternally(!1),this.dispatchStop(!1)},e.prototype._onTimeUpdate=function(t){!this._isLooping&&this._audio.duration5e7?g:_;t.isIE&&(r=b);for(var i=0;r._channels[i]&&r._channels[i].isPlaying();)i++;if(i==r.maxChannels){for(var o=void 0,a=r._channels.length,s=0;s=0&&(this.detachChannel(e),this._audioChannels.splice(n,1),this._channelsPlaying--),0===this._channelsPlaying&&(this.stopInternal(!1),this._onSoundComplete&&this._onSoundComplete())},Object.defineProperty(e.prototype,"pan",{get:function(){return this._pan},set:function(t){this._pan!=t&&(this._pan=t,this._audioChannel&&(this._audioChannel.pan=this._pan))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"channelGroup",{get:function(){return this._channelGroup},set:function(t){if(this._channelGroup!=t){this._channelGroup=t;for(var e=C.getVolume(t),n=0;n>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t.f32_RGBA_To_f32_ARGB=function(t){return(255&t)<<24|(4278190080&t)>>>24<<16|(16711680&t)>>>16<<8|(65280&t)>>>8},t.f32_RGB_To_f32_ARGB=function(t){return(255&t)<<24|(4278190080&t)>>>24<<16|(16711680&t)>>>16<<8|(65280&t)>>>8},t.prototype.getAlphaFromF32RGBA=function(t){return 255&t},t.ARGBtoFloat32=function(t,e,n,r){return t<<24|e<<16|n<<8|r},t.componentToHex=function(t){var e=t.toString(16);return 1==e.length?"0"+e:e},t.RGBToHexString=function(e){return"#"+t.componentToHex(e[1])+t.componentToHex(e[2])+t.componentToHex(e[3])},t.ARGBToHexString=function(e){return"#"+t.componentToHex(e[0])+t.componentToHex(e[1])+t.componentToHex(e[2])+t.componentToHex(e[3])},t.interpolateFloat32Color=function(t,e,n){var r=1-n;return((4278190080&t)>>>24)*r+((4278190080&e)>>>24)*n<<24|((16711680&t)>>>16)*r+((16711680&e)>>>16)*n<<16|((65280&t)>>>8)*r+((65280&e)>>>8)*n<<8|(255&t)*r+(255&e)*n},t}(),w=function(){function t(t,e,n,r,i,o,a,s){void 0===t&&(t=1),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=0),this._isDirty=!1,t instanceof Float32Array?this._rawData=t:(this._rawData=new Float32Array(8),this.redMultiplier=Number(t),this.greenMultiplier=e,this.blueMultiplier=n,this.alphaMultiplier=r,this.redOffset=i,this.greenOffset=o,this.blueOffset=a,this.alphaOffset=s)}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isIdentity",{get:function(){return!this._isDirty},enumerable:!0,configurable:!0}),t.prototype.concat=function(t){this._rawData[0]*=t._rawData[0],this._rawData[1]*=t._rawData[1],this._rawData[2]*=t._rawData[2],this._rawData[3]*=t._rawData[3],this._rawData[4]+=t._rawData[4],this._rawData[5]+=t._rawData[5],this._rawData[6]+=t._rawData[6],this._rawData[7]+=t._rawData[7],this._isDirty=this._isDirty||t._isDirty},Object.defineProperty(t.prototype,"alphaMultiplier",{get:function(){return this._rawData[3]},set:function(t){this._rawData[3]=t,this._isDirty=this._isDirty||1!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alphaOffset",{get:function(){return this._rawData[7]},set:function(t){this._rawData[7]=t,this._isDirty=this._isDirty||0!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blueMultiplier",{get:function(){return this._rawData[2]},set:function(t){this._rawData[2]=t,this._isDirty=this._isDirty||1!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blueOffset",{get:function(){return this._rawData[6]},set:function(t){this._rawData[6]=t,this._isDirty=this._isDirty||0!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"greenMultiplier",{get:function(){return this._rawData[1]},set:function(t){this._rawData[1]=t,this._isDirty=this._isDirty||1!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"greenOffset",{get:function(){return this._rawData[5]},set:function(t){this._rawData[5]=t,this._isDirty=this._isDirty||0!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"redMultiplier",{get:function(){return this._rawData[0]},set:function(t){this._rawData[0]=t,this._isDirty=this._isDirty||1!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"redOffset",{get:function(){return this._rawData[4]},set:function(t){this._rawData[4]=t,this._isDirty=this._isDirty||0!==t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._rawData[4]<<16|this._rawData[5]<<8|this._rawData[6]},set:function(t){var e=x.float32ColorToARGB(t);this._rawData[4]=e[1],this._rawData[5]=e[2],this._rawData[6]=e[3],this._rawData[0]=0,this._rawData[1]=0,this._rawData[2]=0,this._isDirty=!0},enumerable:!0,configurable:!0}),t.prototype.copyRawDataFrom=function(t){var e=this._rawData;e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],this._isDirty=!0},t.prototype.clear=function(){this._rawData[0]=1,this._rawData[1]=1,this._rawData[2]=1,this._rawData[3]=1,this._rawData[4]=0,this._rawData[5]=0,this._rawData[6]=0,this._rawData[7]=0,this._isDirty=!1},t.prototype.clone=function(){var e=new t;return e.copyFrom(this),e},t.prototype.copyFrom=function(t){var e=t._rawData,n=this._rawData;n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],this._isDirty=t._isDirty},t.prototype.copyTo=function(t){t.copyFrom(this)},t.prototype.prepend=function(t){this._rawData[4]+=t._rawData[4]*this._rawData[0],this._rawData[5]+=t._rawData[5]*this._rawData[1],this._rawData[6]+=t._rawData[6]*this._rawData[2],this._rawData[7]+=t._rawData[7]*this._rawData[3],this.redMultiplier*=t.redMultiplier,this.greenMultiplier*=t.greenMultiplier,this.blueMultiplier*=t.blueMultiplier,this.alphaMultiplier*=t.alphaMultiplier,this._isDirty=this._isDirty||t._isDirty},t.prototype._isRenderable=function(){return 0!=this._rawData[3]||this._rawData[7]>0},t}(),S=function(t){function e(e,n){var r=t.call(this,e)||this;return r._transform=n,r}return n(e,t),Object.defineProperty(e.prototype,"transform",{get:function(){return this._transform},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._transform)},e.INVALIDATE_MATRIX3D="invalidateMatrix3D",e.INVALIDATE_COLOR_TRANSFORM="invalidateColorTransform",e}(u),D=function(t){function e(e,n){return void 0===e&&(e=null),void 0===n&&(n=0),t.call(this,e||"ArgumentError",n)||this}return n(e,t),e}(a),T=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._rawData=new Float32Array(2),this._rawData[0]=t,this._rawData[1]=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._rawData[0]},set:function(t){this._rawData[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._rawData[1]},set:function(t){this._rawData[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return Math.sqrt(this._rawData[0]*this._rawData[0]+this._rawData[1]*this._rawData[1])},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this._rawData[0]+e._rawData[0],this._rawData[1]+e._rawData[1])},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this._rawData[0]=t._rawData[0],this._rawData[1]=t._rawData[1]},t.prototype.equals=function(t){return this._rawData[0]===t._rawData[0]&&this._rawData[1]==t._rawData[1]},t.prototype.normalize=function(t){void 0===t&&(t=1);var e=this.length;if((0!==this.x||0!==this.y)&&e){var n=t/e;this._rawData[0]*=n,this._rawData[1]*=n}},t.prototype.offset=function(t,e){this._rawData[0]+=t,this._rawData[1]+=e},t.prototype.setTo=function(t,e){this._rawData[0]=t,this._rawData[1]=e},t.prototype.subtract=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.toString=function(){return"[Point] (x="+this.x+", y="+this.y+")"},t.distance=function(t,e){var n=e.x-t.x,r=e.y-t.y;return 0===n?Math.abs(r):0===r?Math.abs(n):Math.sqrt(n*n+r*r)},t.interpolate=function(e,n,r){var i=1-r,o=e._rawData,a=n._rawData;return new t(o[0]*r+a[0]*i,o[1]*r+a[1]*i)},t.polar=function(e,n){return new t(e*Math.cos(n),e*Math.sin(n))},t}(),P=function(){function t(t,e,n,r,i,o){if(void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.rawData=new Float32Array(6),t instanceof Float32Array)this.copyRawDataFrom(t);else{var a=this.rawData;a[0]=Number(t),a[1]=e,a[2]=n,a[3]=r,a[4]=i,a[5]=o}}return Object.defineProperty(t.prototype,"a",{get:function(){return this.rawData[0]},set:function(t){this.rawData[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.rawData[1]},set:function(t){this.rawData[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"c",{get:function(){return this.rawData[2]},set:function(t){this.rawData[2]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"d",{get:function(){return this.rawData[3]},set:function(t){this.rawData[3]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tx",{get:function(){return this.rawData[4]},set:function(t){this.rawData[4]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ty",{get:function(){return this.rawData[5]},set:function(t){this.rawData[5]=t},enumerable:!0,configurable:!0}),t.prototype.copyRawDataFrom=function(t,e){void 0===e&&(e=0);var n=this.rawData;n[0]=t[e+0],n[1]=t[e+1],n[2]=t[e+2],n[3]=t[e+3],n[4]=t[e+4],n[5]=t[e+5]},t.prototype.clone=function(){var e=this.rawData;return new t(e[0],e[1],e[2],e[3],e[4],e[5])},t.prototype.concat=function(t){var e=this.rawData,n=t.rawData,r=e[0]*n[0],i=0,o=0,a=e[3]*n[3],s=e[4]*n[0]+n[4],u=e[5]*n[3]+n[5];0===e[1]&&0===e[2]&&0===n[1]&&0===n[2]||(r+=e[1]*n[2],a+=e[2]*n[1],i+=e[0]*n[1]+e[1]*n[3],o+=e[2]*n[0]+e[3]*n[2],s+=e[5]*n[2],u+=e[4]*n[1]),e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=u},t.prototype.copyColumnFrom=function(t,e){var n=this.rawData,r=e._rawData;if(t>2)throw"Column "+t+" out of bounds (2)";0==t?(n[0]=r[0],n[1]=r[1]):1==t?(n[2]=r[0],n[3]=r[1]):(n[4]=r[0],n[5]=r[1])},t.prototype.copyColumnTo=function(t,e){var n=this.rawData,r=e._rawData;if(t>2)throw new D("ArgumentError, Column "+t+" out of bounds [0, ..., 2]");0==t?(r[0]=n[0],r[1]=n[1],r[2]=0):1==t?(r[0]=n[2],r[1]=n[3],r[2]=0):(r[0]=n[4],r[1]=n[5],r[2]=1)},t.prototype.copyFrom=function(t){var e=this.rawData,n=t.rawData;e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5]},t.prototype.copyRowFrom=function(t,e){var n=this.rawData,r=e._rawData;if(t>2)throw new D("ArgumentError, Row "+t+" out of bounds [0, ..., 2]");0==t?(n[0]=r[0],n[2]=r[1],n[4]=r[2]):(n[1]=r[0],n[3]=r[1],n[5]=r[2])},t.prototype.copyRowTo=function(t,e){var n=this.rawData,r=e._rawData;if(t>2)throw new D("ArgumentError, Row "+t+" out of bounds [0, ..., 2]");0==t?(r[0]=n[0],r[1]=n[2],r[2]=n[4]):1==t?(r[0]=n[1],r[1]=n[3],r[2]=n[5]):(r[0]=0,r[1]=0,r[2]=1)},t.prototype.createBox=function(t,e,n,r,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0);var o=this.rawData;if(0!==n){var a=Math.cos(n),s=Math.sin(n);o[0]=a*t,o[1]=s*e,o[2]=-s*t,o[3]=a*e}else o[0]=t,o[1]=0,o[2]=0,o[3]=e;o[4]=r,o[5]=i},t.prototype.createGradientBox=function(t,e,n,r,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),this.createBox(t/1638.4,e/1638.4,n,r+t/2,i+e/2)},t.prototype.deltaTransformPoint=function(t){var e=this.rawData;return new T(t.x*e[0]+t.y*e[2],t.x*e[1]+t.y*e[3])},t.prototype.identity=function(){var t=this.rawData;t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0},t.prototype.invert=function(){var t=this.rawData,e=t[1],n=t[2],r=t[4],i=t[5];if(0===e&&0===n){var o=t[0]=1/t[0],a=t[3]=1/t[3];return t[1]=t[2]=0,t[4]=-o*r,void(t[5]=-a*i)}var s=t[0],u=t[3],l=s*u-e*n;if(0!==l){l=1/l;var c;c=t[0]=u*l,e=t[1]=-e*l,n=t[2]=-n*l,u=t[3]=s*l,t[4]=-(c*r+n*i),t[5]=-(e*r+u*i)}else this.identity()},t.prototype.multiply=function(e){var n=new t;return n.a=this.a*e.a+this.b*e.c,n.b=this.a*e.b+this.b*e.d,n.c=this.c*e.a+this.d*e.c,n.d=this.c*e.b+this.d*e.d,n.tx=this.tx*e.a+this.ty*e.c+e.tx,n.ty=this.tx*e.b+this.ty*e.d+e.ty,n},t.prototype.rotate=function(t){if(0!==t){var e=this.rawData,n=Math.cos(t),r=Math.sin(t),i=e[0],o=e[1],a=e[2],s=e[3],u=e[4],l=e[5];e[0]=i*n-o*r,e[1]=i*r+o*n,e[2]=a*n-s*r,e[3]=a*r+s*n,e[4]=u*n-l*r,e[5]=u*r+l*n}},t.prototype.scale=function(t,e){var n=this.rawData;1!==t&&(n[0]*=t,n[1]*=t,n[4]*=t),1!==e&&(n[2]*=e,n[3]*=e,n[5]*=e)},t.prototype.setTo=function(t,e,n,r,i,o){var a=this.rawData;a[0]=t,a[2]=e,a[1]=n,a[3]=r,a[4]=i,a[5]=o},t.prototype.toString=function(){return"[Matrix] (a="+this.a+", b="+this.b+", c="+this.c+", d="+this.d+", tx="+this.tx+", ty="+this.ty+")"},t.prototype.transformPoint=function(t){var e=this.rawData;return new T(t.x*e[0]+t.y*e[2]+e[4],t.x*e[1]+t.y*e[3]+e[5])},t.prototype.translate=function(t,e){this.rawData[4]+=t,this.rawData[5]+=e},t}(),B=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),this._rawData=new Float32Array(4);var i=this._rawData;i[0]=t,i[1]=e,i[2]=n,i[3]=r}return Object.defineProperty(t.prototype,"x",{get:function(){return this._rawData[0]},set:function(t){this._rawData[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._rawData[1]},set:function(t){this._rawData[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"z",{get:function(){return this._rawData[2]},set:function(t){this._rawData[2]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"w",{get:function(){return this._rawData[3]},set:function(t){this._rawData[3]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return Math.sqrt(this.lengthSquared)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lengthSquared",{get:function(){var t=this._rawData;return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]},enumerable:!0,configurable:!0}),t.prototype.add=function(e){var n=this._rawData,r=e._rawData;return new t(n[0]+r[0],n[1]+r[1],n[2]+r[2])},t.angleBetween=function(t,e){return Math.acos(t.dotProduct(e)/(t.length*e.length))},t.prototype.clone=function(){var e=this._rawData;return new t(e[0],e[1],e[2],e[3])},t.combine=function(e,n,r,i,o){var a=e._rawData,s=n._rawData;return(o=o||new t).setTo(a[0]*r+s[0]*i,a[1]*r+s[1]*i,a[2]*r+s[2]*i,1),o},t.prototype.copyFrom=function(t){var e=this._rawData,n=t._rawData;e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3]},t.prototype.crossProduct=function(e,n){void 0===n&&(n=null),null==n&&(n=new t);var r=this._rawData,i=e._rawData,o=n._rawData;return o[0]=r[1]*i[2]-r[2]*i[1],o[1]=r[2]*i[0]-r[0]*i[2],o[2]=r[0]*i[1]-r[1]*i[0],n},t.prototype.decrementBy=function(t){var e=this._rawData,n=t._rawData;e[0]-=n[0],e[1]-=n[1],e[2]-=n[2]},t.distance=function(t,e){var n=t._rawData,r=e._rawData,i=n[0]-r[0],o=n[1]-r[1],a=n[2]-r[2];return Math.sqrt(i*i+o*o+a*a)},t.prototype.dotProduct=function(t){var e=this._rawData,n=t._rawData;return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]},t.prototype.equals=function(t,e){void 0===e&&(e=!1);var n=this._rawData,r=t._rawData;return n[0]==r[0]&&n[1]==r[1]&&n[2]==r[2]&&(!e||n[3]==r[3])},t.prototype.identity=function(){var t=this._rawData;t[0]=0,t[1]=0,t[2]=0,t[3]=1},t.prototype.incrementBy=function(t){var e=this._rawData,n=t._rawData;e[0]+=n[0],e[1]+=n[1],e[2]+=n[2]},t.prototype.nearEquals=function(t,e,n){void 0===n&&(n=!0);var r=this._rawData,i=t._rawData;return Math.abs(r[0]-i[0])=t&&this.y<=e&&this.y+this.height>=e&&this.z<=n&&this.z+this.depth>=n},t.prototype.containsPoint=function(t){return this.x<=t.x&&this.x+this.width>=t.x&&this.y<=t.y&&this.y+this.height>=t.y&&this.z<=t.z&&this.z+this.depth>=t.z},t.prototype.containsBox=function(t){return this.x<=t.x&&this.x+this.width>=t.x+t.width&&this.y<=t.y&&this.y+this.height>=t.y+t.height&&this.z<=t.z&&this.z+this.depth>=t.z+t.depth},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y,this.z=t.z,this.width=t.width,this.height=t.height,this.depth=t.depth},t.prototype.equals=function(t){return this.x==t.x&&this.y==t.y&&this.z==t.z&&this.width==t.width&&this.height==t.height&&this.depth==t.depth},t.prototype.inflate=function(t,e,n){this.x-=t/2,this.y-=e/2,this.z-=n/2,this.width+=t/2,this.height+=e/2,this.depth+=n/2},t.prototype.inflatePoint=function(t){this.x-=t.x/2,this.y-=t.y/2,this.z-=t.z/2,this.width+=t.x/2,this.height+=t.y/2,this.depth+=t.z/2},t.prototype.intersection=function(e){if(this.intersects(e)){var n=new t;return this.x>e.x?(n.x=this.x,n.width=e.x-this.x+e.width,n.width>this.width&&(n.width=this.width)):(n.x=e.x,n.width=this.x-e.x+this.width,n.width>e.width&&(n.width=e.width)),this.y>e.y?(n.y=this.y,n.height=e.y-this.y+e.height,n.height>this.height&&(n.height=this.height)):(n.y=e.y,n.height=this.y-e.y+this.height,n.height>e.height&&(n.height=e.height)),this.z>e.z?(n.z=this.z,n.depth=e.z-this.z+e.depth,n.depth>this.depth&&(n.depth=this.depth)):(n.z=e.z,n.depth=this.z-e.z+this.depth,n.depth>e.depth&&(n.depth=e.depth)),n}return new t},t.prototype.intersects=function(t){return this.x+this.width>=t.x&&this.x<=t.x+t.width&&this.y+this.height>=t.y&&this.y<=t.y+t.height&&this.z+this.depth>=t.z&&this.z<=t.z+t.depth},t.prototype.rayIntersection=function(t,e,n){if(void 0===n&&(n=null),this.containsPoint(t))return 0;var r,i,o,a,s,u=this.width/2,l=this.height/2,c=this.depth/2,h=this.x+u,p=this.y+l,d=this.z+c,f=t.x-h,g=t.y-p,_=t.z-d,m=e.x,y=e.y,A=e.z;return m<0&&(a=(u-f)/m)>0&&(o=_+a*A,(i=g+a*y)>-l&&i-c&&o0&&(a=(-u-f)/m)>0&&(o=_+a*A,(i=g+a*y)>-l&&i-c&&o0&&(o=_+a*A,(r=f+a*m)>-u&&r-c&&o0&&(a=(-l-g)/y)>0&&(o=_+a*A,(r=f+a*m)>-u&&r-c&&o0&&(r=f+a*m,(i=g+a*y)>-l&&i-u&&r0&&(a=(-c-_)/A)>0&&(r=f+a*m,(i=g+a*y)>-l&&i-u&&rthis.x+this.width&&(n=this.x+this.width),e.x=n,(n=t.y)this.y&&(n=this.y),e.y=n,(n=t.z)this.z+this.depth&&(n=this.z+this.depth),e.z=n,e},t.prototype.offset=function(t,e,n){this.x+=t,this.y+=e,this.z+=n},t.prototype.offsetPosition=function(t){this.x+=t.x,this.y+=t.y,this.z+=t.z},t.prototype.identity=function(){this.x=0,this.y=0,this.z=0,this.width=0,this.height=0,this.depth=0},t.prototype.setTo=function(t,e,n,r,i,o){this.x=t,this.y=e,this.z=n,this.width=r,this.height=i,this.depth=o},t.prototype.toString=function(){return"[Box] (x="+this.x+", y="+this.y+", z="+this.z+", width="+this.width+", height="+this.height+", depth="+this.depth+")"},t.prototype.union=function(e,n){var r,i,o;return void 0===n&&(n=null),null==n&&(n=new t),null==e?(n.copyFrom(this),n):(this.x=0&&(r=(-h-Math.sqrt(p))/(2*c))>=0)return n.x=i+r*s,n.y=o+r*u,n.z=a+r*l,n.normalize(),r;return-1},t.prototype.containsPoint=function(t){var e=t.x-this.x,n=t.y-this.y,r=t.z-this.z;return Math.sqrt(e*e+n*n+r*r)<=this.radius},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y,this.z=t.z,this.radius=t.radius},t.prototype.union=function(e,n){if(void 0===n&&(n=null),null==n&&(n=new t),null==e)return n.copyFrom(this),n;var r=e.x-this.x,i=e.y-this.y,o=e.z-this.z;return n.radius=(Math.sqrt(r*r+i*i+o*o)+e.radius+this.radius)/2,n.x=this.x+r/2,n.y=this.y+i/2,n.z=this.z+o/2,n},t.prototype.toString=function(){return"Sphere [x:"+this.x+", y:"+this.y+", z:"+this.z+", radius:"+this.radius+"]"},t}(),R=function(){function t(t){void 0===t&&(t=null),this._position=new B,this._positionDirty=!0,null!=t?this._rawData=t:(this._rawData=new Float32Array(16),this.identity())}return t.getAxisRotationMatrix=function(e,n,r,i,o){void 0===o&&(o=null),null==o&&(o=new t);var a,s,u=o._rawData,l=i*M.DEGREES_TO_RADIANS,c=Math.cos(l),h=Math.sin(l),p=1-c;return u[0]=c+e*e*p,u[5]=c+n*n*p,u[10]=c+r*r*p,a=e*n*p,s=r*h,u[1]=a+s,u[4]=a-s,a=e*r*p,s=n*h,u[8]=a+s,u[2]=a-s,a=n*r*p,s=e*h,u[9]=a-s,u[6]=a+s,u[3]=0,u[7]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,o.invalidatePosition(),o},t.getPointAtMatrix=function(e,n,r,i){var o;void 0===i&&(i=null),null==i&&(i=new t);var a=i._rawData,s=n.clone();s.normalize(),(o=r.clone()).normalize();var u=o.crossProduct(s);return u.normalize(),u.length<.05&&(u.x=o.y,u.y=o.x,u.z=0,u.normalize()),o=s.crossProduct(u),a[0]=u.x,a[1]=u.y,a[2]=u.z,a[3]=0,a[4]=o.x,a[5]=o.y,a[6]=o.z,a[7]=0,a[8]=s.x,a[9]=s.y,a[10]=s.z,a[11]=0,a[12]=u.dotProduct(e),a[13]=o.dotProduct(e),a[14]=s.dotProduct(e),a[15]=1,i.invalidatePosition(),i},t.getQuaternionMatrix=function(e,n){void 0===n&&(n=null),null==n&&(n=new t);var r=n._rawData,i=e.x,o=e.y,a=e.z,s=e.w,u=i*i,l=i*o,c=i*a,h=i*s,p=o*o,d=o*a,f=o*s,g=a*a,_=a*s;return r[0]=1-2*(p+g),r[1]=2*(l+_),r[2]=2*(c-f),r[4]=2*(l-_),r[5]=1-2*(u+g),r[6]=2*(d+h),r[8]=2*(c+f),r[9]=2*(d-h),r[10]=1-2*(u+p),r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,n.invalidatePosition(),n},t.compare=function(t,e){for(var n=t._rawData,r=e._rawData,i=0;i<16;++i)if(n[i]!=r[i])return!1;return!0},Object.defineProperty(t.prototype,"determinant",{get:function(){var t=this._rawData;return(t[0]*t[5]-t[4]*t[1])*(t[10]*t[15]-t[14]*t[11])-(t[0]*t[9]-t[8]*t[1])*(t[6]*t[15]-t[14]*t[7])+(t[0]*t[13]-t[12]*t[1])*(t[6]*t[11]-t[10]*t[7])+(t[4]*t[9]-t[8]*t[5])*(t[2]*t[15]-t[14]*t[3])-(t[4]*t[13]-t[12]*t[5])*(t[2]*t[11]-t[10]*t[3])+(t[8]*t[13]-t[12]*t[9])*(t[2]*t[7]-t[6]*t[3])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._positionDirty&&(this._positionDirty=!1,this._position.x=this._rawData[12],this._position.y=this._rawData[13],this._position.z=this._rawData[14]),this._position},enumerable:!0,configurable:!0}),t.prototype.append=function(t){var e=this._rawData,n=t._rawData,r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],p=e[9],d=e[10],f=e[11],g=e[12],_=e[13],m=e[14],y=e[15],A=n[0],v=n[1],b=n[2],C=n[3],I=n[4],E=n[5],x=n[6],w=n[7],S=n[8],D=n[9],T=n[10],P=n[11],B=n[12],O=n[13],M=n[14],L=n[15];e[0]=r*A+i*I+o*S+a*B,e[1]=r*v+i*E+o*D+a*O,e[2]=r*b+i*x+o*T+a*M,e[3]=r*C+i*w+o*P+a*L,e[4]=s*A+u*I+l*S+c*B,e[5]=s*v+u*E+l*D+c*O,e[6]=s*b+u*x+l*T+c*M,e[7]=s*C+u*w+l*P+c*L,e[8]=h*A+p*I+d*S+f*B,e[9]=h*v+p*E+d*D+f*O,e[10]=h*b+p*x+d*T+f*M,e[11]=h*C+p*w+d*P+f*L,e[12]=g*A+_*I+m*S+y*B,e[13]=g*v+_*E+m*D+y*O,e[14]=g*b+_*x+m*T+y*M,e[15]=g*C+_*w+m*P+y*L,this._positionDirty=!0},t.prototype.appendRotation=function(e,n){this.append(t.getAxisRotationMatrix(n.x,n.y,n.z,e,t._tempMatrix))},t.prototype.appendSkew=function(e,n,r){if(0!=e||0!=n||0!=r){var i=t._tempMatrix._rawData;i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=e,i[5]=1,i[6]=0,i[7]=0,i[8]=n,i[9]=r,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this.append(t._tempMatrix)}},t.prototype.appendScale=function(e,n,r){if(1!=e||1!=n||1!=r){var i=t._tempMatrix._rawData;i[0]=e,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=n,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=r,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this.append(t._tempMatrix)}},t.prototype.appendTranslation=function(t,e,n){var r=this._rawData,i=r[3],o=r[7],a=r[11],s=r[15];r[0]+=t*i,r[1]+=e*i,r[2]+=n*i,r[4]+=t*o,r[5]+=e*o,r[6]+=n*o,r[8]+=t*a,r[9]+=e*a,r[10]+=n*a,r[12]+=t*s,r[13]+=e*s,r[14]+=n*s,this._positionDirty=!0},t.prototype.clone=function(){var e=new t;return e.copyFrom(this),e},t.prototype.copyColumnFrom=function(t,e){if(t<0||t>3)throw new D("ArgumentError, Column "+t+" out of bounds [0, ..., 3]");var n=this._rawData,r=e._rawData;n[t*=4]=r[0],n[t+1]=r[1],n[t+2]=r[2],n[t+3]=r[3],this._positionDirty=!0},t.prototype.copyColumnTo=function(t,e,n){if(void 0===n&&(n=!1),t<0||t>3)throw new D("ArgumentError, Column "+t+" out of bounds [0, ..., 3]");t*=4;var r=this._rawData,i=e._rawData;n?(i[0]=-r[t],i[1]=-r[t+1],i[2]=-r[t+2],i[3]=-r[t+3]):(i[0]=r[t],i[1]=r[t+1],i[2]=r[t+2],i[3]=r[t+3])},t.prototype.copyFrom=function(t,e){void 0===e&&(e=!1);var n=t._rawData,r=this._rawData;r[0]=n[0],r[5]=n[5],r[10]=n[10],r[15]=n[15],e?(r[1]=n[4],r[2]=n[8],r[3]=n[12],r[4]=n[1],r[6]=n[9],r[7]=n[13],r[8]=n[2],r[9]=n[6],r[11]=n[14],r[12]=n[3],r[13]=n[7],r[14]=n[11]):(r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14]),this._positionDirty=!0},t.prototype.copyTo=function(t,e){void 0===e&&(e=!1),t.copyFrom(this,e)},t.prototype.copyRawDataFrom=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this._rawData;r[0]=t[e+0],r[5]=t[e+5],r[10]=t[e+10],r[15]=t[e+15],n?(r[e+1]=t[4],r[e+2]=t[8],r[e+3]=t[12],r[e+4]=t[1],r[e+6]=t[9],r[e+7]=t[13],r[e+8]=t[2],r[e+9]=t[6],r[e+11]=t[14],r[e+12]=t[3],r[e+13]=t[7],r[e+14]=t[11]):(r[1]=t[e+1],r[2]=t[e+2],r[3]=t[e+3],r[4]=t[e+4],r[6]=t[e+6],r[7]=t[e+7],r[8]=t[e+8],r[9]=t[e+9],r[11]=t[e+11],r[12]=t[e+12],r[13]=t[e+13],r[14]=t[e+14]),this._positionDirty=!0},t.prototype.copyRawDataTo=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this._rawData;t[e]=r[0],t[e+5]=r[5],t[e+10]=r[10],t[e+15]=r[15],n?(t[e+1]=r[4],t[e+2]=r[8],t[e+3]=r[12],t[e+4]=r[1],t[e+6]=r[9],t[e+7]=r[13],t[e+8]=r[2],t[e+9]=r[6],t[e+11]=r[14],t[e+12]=r[3],t[e+13]=r[7],t[e+14]=r[11]):(t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14])},t.prototype.copyRowFrom=function(t,e){if(t<0||t>3)throw new D("ArgumentError, Row "+t+" out of bounds [0, ..., 3]");var n=this._rawData,r=e._rawData;n[t]=r[0],n[t+4]=r[1],n[t+8]=r[2],n[t+12]=r[3],this._positionDirty=!0},t.prototype.copyRowTo=function(t,e,n){if(void 0===n&&(n=!1),t<0||t>3)throw new D("ArgumentError, Row "+t+" out of bounds [0, ..., 3]");var r=this._rawData,i=e._rawData;n?(i[0]=-r[t],i[1]=-r[t+4],i[2]=-r[t+8],i[3]=-r[t+12]):(i[0]=r[t],i[1]=r[t+4],i[2]=r[t+8],i[3]=r[t+12])},t.prototype.decompose=function(e){void 0===e&&(e="eulerAngles"),null==this._components&&(this._components=[new B,new B,new B,new B]);var n=t.COL_X;n.setTo(this._rawData[0],this._rawData[1],this._rawData[2]);var r=t.COL_Y;r.setTo(this._rawData[4],this._rawData[5],this._rawData[6]);var i=t.COL_Z;i.setTo(this._rawData[8],this._rawData[9],this._rawData[10]);var o=this._components[3],a=this._components[2];o.x=n.length,n.scaleBy(1/o.x),a.x=n.dotProduct(r),B.combine(r,n,1,-a.x,r),o.y=r.length,r.scaleBy(1/o.y),a.x/=o.y,a.y=n.dotProduct(i),B.combine(i,n,1,-a.y,i),a.z=r.dotProduct(i),B.combine(i,r,1,-a.z,i),o.z=i.length,i.scaleBy(1/o.z),a.y/=o.z,a.z/=o.z,n.dotProduct(r.crossProduct(i))<0&&(o.z=-o.z,i.x=-i.x,i.y=-i.y,i.z=-i.z);var s=this._components[1];switch(e){case L.AXIS_ANGLE:s.w=Math.acos((n.x+r.y+i.z-1)/2);var u=Math.sqrt((r.z-i.y)*(r.z-i.y)+(i.x-n.z)*(i.x-n.z)+(n.y-r.x)*(n.y-r.x));s.x=(r.z-i.y)/u,s.y=(i.x-n.z)/u,s.z=(n.y-r.x)/u;break;case L.QUATERNION:var l=n.x+r.y+i.z;l>0?(s.w=Math.sqrt(1+l)/2,s.x=(r.z-i.y)/(4*s.w),s.y=(i.x-n.z)/(4*s.w),s.z=(n.y-r.x)/(4*s.w)):n.x>r.y&&n.x>i.z?(s.x=Math.sqrt(1+n.x-r.y-i.z)/2,s.w=(r.z-i.y)/(4*s.x),s.y=(n.y+r.x)/(4*s.x),s.z=(i.x+n.z)/(4*s.x)):r.y>i.z?(s.y=Math.sqrt(1+r.y-n.x-i.z)/2,s.x=(n.y+r.x)/(4*s.y),s.w=(i.x-n.z)/(4*s.y),s.z=(r.z+i.y)/(4*s.y)):(s.z=Math.sqrt(1+i.z-n.x-r.y)/2,s.x=(i.x+n.z)/(4*s.z),s.y=(r.z+i.y)/(4*s.z),s.w=(n.y-r.x)/(4*s.z));break;case L.EULER_ANGLES:s.y=Math.asin(-n.z),1!=n.z&&-1!=n.z?(s.x=Math.atan2(r.z,i.z),s.z=Math.atan2(n.y,n.x)):(s.z=0,s.x=Math.atan2(r.x,r.y))}return this._components[0].copyFrom(this.position),this._components},t.prototype.deltaTransformVector=function(t,e){void 0===e&&(e=null);var n=t.x,r=t.y,i=t.z;e||(e=new B);var o=this._rawData,a=e._rawData;return a[0]=n*o[0]+r*o[4]+i*o[8],a[1]=n*o[1]+r*o[5]+i*o[9],a[2]=n*o[2]+r*o[6]+i*o[10],a[3]=n*o[3]+r*o[7]+i*o[11],e},t.prototype.deltaTransformVectors=function(t,e){for(var n=this._rawData,r=n[0],i=n[1],o=n[2],a=n[4],s=n[5],u=n[6],l=n[8],c=n[9],h=n[10],p=0,d=t.length,f=0;f1e-11,n=this._rawData;if(e){t=1/t;var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6],c=n[7],h=n[8],p=n[9],d=n[10],f=n[11],g=n[12],_=n[13],m=n[14],y=n[15];n[0]=t*(u*(d*y-m*f)-p*(l*y-m*c)+_*(l*f-d*c)),n[1]=-t*(i*(d*y-m*f)-p*(o*y-m*a)+_*(o*f-d*a)),n[2]=t*(i*(l*y-m*c)-u*(o*y-m*a)+_*(o*c-l*a)),n[3]=-t*(i*(l*f-d*c)-u*(o*f-d*a)+p*(o*c-l*a)),n[4]=-t*(s*(d*y-m*f)-h*(l*y-m*c)+g*(l*f-d*c)),n[5]=t*(r*(d*y-m*f)-h*(o*y-m*a)+g*(o*f-d*a)),n[6]=-t*(r*(l*y-m*c)-s*(o*y-m*a)+g*(o*c-l*a)),n[7]=t*(r*(l*f-d*c)-s*(o*f-d*a)+h*(o*c-l*a)),n[8]=t*(s*(p*y-_*f)-h*(u*y-_*c)+g*(u*f-p*c)),n[9]=-t*(r*(p*y-_*f)-h*(i*y-_*a)+g*(i*f-p*a)),n[10]=t*(r*(u*y-_*c)-s*(i*y-_*a)+g*(i*c-u*a)),n[11]=-t*(r*(u*f-p*c)-s*(i*f-p*a)+h*(i*c-u*a)),n[12]=-t*(s*(p*m-_*d)-h*(u*m-_*l)+g*(u*d-p*l)),n[13]=t*(r*(p*m-_*d)-h*(i*m-_*o)+g*(i*d-p*o)),n[14]=-t*(r*(u*m-_*l)-s*(i*m-_*o)+g*(i*l-u*o)),n[15]=t*(r*(u*d-p*l)-s*(i*d-p*o)+h*(i*l-u*o))}return this._positionDirty=!0,e},t.prototype.isIdentity=function(){var t=this._rawData;return 1==t[0]&&0==t[1]&&0==t[2]&&0==t[3]&&0==t[4]&&1==t[5]&&0==t[6]&&0==t[7]&&0==t[8]&&0==t[9]&&1==t[10]&&0==t[11]&&0==t[12]&&0==t[13]&&0==t[14]&&1==t[15]},t.prototype.prepend=function(t){var e=this._rawData,n=t._rawData,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6],c=n[7],h=n[8],p=n[9],d=n[10],f=n[11],g=n[12],_=n[13],m=n[14],y=n[15],A=e[0],v=e[1],b=e[2],C=e[3],I=e[4],E=e[5],x=e[6],w=e[7],S=e[8],D=e[9],T=e[10],P=e[11],B=e[12],O=e[13],M=e[14],L=e[15];e[0]=r*A+i*I+o*S+a*B,e[1]=r*v+i*E+o*D+a*O,e[2]=r*b+i*x+o*T+a*M,e[3]=r*C+i*w+o*P+a*L,e[4]=s*A+u*I+l*S+c*B,e[5]=s*v+u*E+l*D+c*O,e[6]=s*b+u*x+l*T+c*M,e[7]=s*C+u*w+l*P+c*L,e[8]=h*A+p*I+d*S+f*B,e[9]=h*v+p*E+d*D+f*O,e[10]=h*b+p*x+d*T+f*M,e[11]=h*C+p*w+d*P+f*L,e[12]=g*A+_*I+m*S+y*B,e[13]=g*v+_*E+m*D+y*O,e[14]=g*b+_*x+m*T+y*M,e[15]=g*C+_*w+m*P+y*L,this._positionDirty=!0},t.prototype.prependRotation=function(e,n){this.prepend(t.getAxisRotationMatrix(n.x,n.y,n.z,e,t._tempMatrix))},t.prototype.prependScale=function(e,n,r){if(1!=e||1!=n||1!=r){var i=t._tempMatrix._rawData;i[0]=e,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=n,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=r,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this.prepend(t._tempMatrix)}},t.prototype.prependTranslation=function(e,n,r){var i=t._tempMatrix._rawData;i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=e,i[13]=n,i[14]=r,i[15]=1,this.prepend(t._tempMatrix)},t.prototype.recompose=function(e){var n=e[0]||this.position;this.identity();var r=e[3];!r||1==r.x&&1==r.y&&1==r.z||this.appendScale(r.x,r.y,r.z);var i,o,a=e[2];!a||0==a.x&&0==a.y&&0==a.z||this.appendSkew(a.x,a.y,a.z);var s=t._tempMatrix._rawData;s[12]=0,s[13]=0,s[14]=0,s[15]=0;var u=e[1];if(u){var l=-u.x;0!=l&&(i=Math.sin(l),o=Math.cos(l),s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o,s[6]=-i,s[7]=0,s[8]=0,s[9]=i,s[10]=o,s[11]=0,this.append(t._tempMatrix)),0!=(l=-u.y)&&(i=Math.sin(l),o=Math.cos(l),s[0]=o,s[1]=0,s[2]=i,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=-i,s[9]=0,s[10]=o,s[11]=0,this.append(t._tempMatrix)),0!=(l=-u.z)&&(i=Math.sin(l),o=Math.cos(l),s[0]=o,s[1]=-i,s[2]=0,s[3]=0,s[4]=i,s[5]=o,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,this.append(t._tempMatrix))}return this._rawData[12]=n.x,this._rawData[13]=n.y,this._rawData[14]=n.z,e[0]&&(this._positionDirty=!0),this._rawData[15]=1,!0},t.prototype.reflect=function(t){var e=t.a,n=t.b,r=t.c,i=t.d,o=-2*e*n,a=-2*e*r,s=-2*n*r,u=this._rawData;u[0]=1-2*e*e,u[4]=o,u[8]=a,u[12]=-2*e*i,u[1]=o,u[5]=1-2*n*n,u[9]=s,u[13]=-2*n*i,u[2]=a,u[6]=s,u[10]=1-2*r*r,u[14]=-2*r*i,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this._positionDirty=!0},t.prototype.transformBox=function(t,e){if(void 0===e&&(e=null),null==t)throw new D("ArgumentError, box cannot be null");e||(e=new O);var n=t.width/2,r=t.height/2,i=t.depth/2,o=t.x+n,a=t.y+r,s=t.z+i,u=this._rawData[0],l=this._rawData[4],c=this._rawData[8],h=this._rawData[12],p=this._rawData[1],d=this._rawData[5],f=this._rawData[9],g=this._rawData[13],_=this._rawData[2],m=this._rawData[6],y=this._rawData[10],A=o*u+a*l+s*c+h,v=o*p+a*d+s*f+g,b=o*_+a*m+s*y+this._rawData[14],C=Math.max(Math.abs(n*u+r*l+i*c),Math.abs(-n*u+r*l+i*c),Math.abs(n*u-r*l+i*c),Math.abs(n*u+r*l-i*c)),I=Math.max(Math.abs(n*p+r*d+i*f),Math.abs(-n*p+r*d+i*f),Math.abs(n*p-r*d+i*f),Math.abs(n*p+r*d-i*f)),E=Math.max(Math.abs(n*_+r*m+i*y),Math.abs(-n*_+r*m+i*y),Math.abs(n*_-r*m+i*y),Math.abs(n*_+r*m-i*y));return e.width=2*C,e.height=2*I,e.depth=2*E,e.x=A-C,e.y=v-I,e.z=b-E,e},t.prototype.transformSphere=function(t,e){if(void 0===e&&(e=null),null==t)throw new D("ArgumentError, sphere cannot be null");var n=new O(t.x-t.radius,t.y-t.radius,t.z-t.radius,2*t.radius,2*t.radius,2*t.radius);return this.transformBox(n,n),e||(e=new N),e.x=n.x+n.width/2,e.y=n.y+n.height/2,e.z=n.z+n.depth/2,e.radius=Math.max(n.width,n.height,n.depth),e},t.prototype.transformVector=function(t,e){if(void 0===e&&(e=null),null==t)throw new D("ArgumentError, vector cannot be null");var n=t.x,r=t.y,i=t.z,o=t.w;e||(e=new B);var a=this._rawData,s=e._rawData;return s[0]=n*a[0]+r*a[4]+i*a[8]+o*a[12],s[1]=n*a[1]+r*a[5]+i*a[9]+o*a[13],s[2]=n*a[2]+r*a[6]+i*a[10]+o*a[14],s[3]=n*a[3]+r*a[7]+i*a[11]+o*a[15],e},t.prototype.transformVectors=function(t,e){for(var n=0,r=0,i=0,o=0,a=this._rawData;n+3<=t.length;)r=t[n],i=t[n+1],o=t[n+2],e[n]=r*a[0]+i*a[4]+o*a[8]+a[12],e[n+1]=r*a[1]+i*a[5]+o*a[9]+a[13],e[n+2]=r*a[2]+i*a[6]+o*a[10]+a[14],n+=3},t.prototype.transpose=function(){var e=this._rawData,n=t._tempMatrix._rawData;this.copyRawDataTo(n,0,!0),e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],this._positionDirty=!0},t.prototype.invalidatePosition=function(){this._positionDirty=!0},t.prototype.toFixed=function(t){var e=Math.pow(10,t);return"matrix3d("+Math.round(this._rawData[0]*e)/e+","+Math.round(this._rawData[1]*e)/e+","+Math.round(this._rawData[2]*e)/e+","+Math.round(this._rawData[3]*e)/e+","+Math.round(this._rawData[4]*e)/e+","+Math.round(this._rawData[5]*e)/e+","+Math.round(this._rawData[6]*e)/e+","+Math.round(this._rawData[7]*e)/e+","+Math.round(this._rawData[8]*e)/e+","+Math.round(this._rawData[9]*e)/e+","+Math.round(this._rawData[10]*e)/e+","+Math.round(this._rawData[11]*e)/e+","+Math.round(this._rawData[12]*e)/e+","+Math.round(this._rawData[13]*e)/e+","+Math.round(this._rawData[14]*e)/e+","+Math.round(this._rawData[15]*e)/e+")"},t.prototype.toString=function(){return"matrix3d("+Math.round(1e3*this._rawData[0])/1e3+","+Math.round(1e3*this._rawData[1])/1e3+","+Math.round(1e3*this._rawData[2])/1e3+","+Math.round(1e3*this._rawData[3])/1e3+","+Math.round(1e3*this._rawData[4])/1e3+","+Math.round(1e3*this._rawData[5])/1e3+","+Math.round(1e3*this._rawData[6])/1e3+","+Math.round(1e3*this._rawData[7])/1e3+","+Math.round(1e3*this._rawData[8])/1e3+","+Math.round(1e3*this._rawData[9])/1e3+","+Math.round(1e3*this._rawData[10])/1e3+","+Math.round(1e3*this._rawData[11])/1e3+","+Math.round(1e3*this._rawData[12])/1e3+","+Math.round(1e3*this._rawData[13])/1e3+","+Math.round(1e3*this._rawData[14])/1e3+","+Math.round(1e3*this._rawData[15])/1e3+")"},t.CALCULATION_MATRIX=new t,t._tempMatrix=new t,t.COL_X=new B,t.COL_Y=new B,t.COL_Z=new B,t}(),F=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._inverseMatrix3D=new R,n._matrix=null,n._rotation=new B,n._scale=new B(1,1,1),n._skew=new B,n._rawData=e||new Float32Array(24),n._matrix3D=new R(new Float32Array(n._rawData.buffer,0,16)),n._colorTransform=new w(new Float32Array(n._rawData.buffer,64,8)),null==e&&(n._matrix3D.identity(),n._colorTransform.clear()),n._components=new Array(4),n._components[1]=n._rotation,n._components[2]=n._skew,n._components[3]=n._scale,n.invalidateComponents(),n}return n(e,t),Object.defineProperty(e.prototype,"backVector",{get:function(){return this._backVector||(this._backVector=new B),this._matrix3D.copyColumnTo(2,this._backVector,!0),this._backVector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorTransform",{get:function(){return this._colorTransform},set:function(t){if(t){var e=t._rawData,n=this._colorTransform._rawData;n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7]}else this._colorTransform.clear();this.invalidateColorTransform()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inverseMatrix3D",{get:function(){return this._inverseMatrix3DDirty&&(this._inverseMatrix3DDirty=!1,this._inverseMatrix3D.copyFrom(this.matrix3D),this._inverseMatrix3D.invert()),this._inverseMatrix3D},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"downVector",{get:function(){return this._downVector||(this._downVector=new B),this._matrix3D.copyColumnTo(1,this._downVector,!0),this._downVector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forwardVector",{get:function(){return this._forwardVector||(this._forwardVector=new B),this._matrix3D.copyColumnTo(2,this._forwardVector),this._forwardVector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftVector",{get:function(){return this._leftVector||(this._leftVector=new B),this._matrix3D.copyColumnTo(0,this._backVector,!0),this._leftVector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this._matrix||(this._matrix=new P),this._matrix3DDirty&&this.updateMatrix3D(),this._matrix.a=this._matrix3D._rawData[0],this._matrix.b=this._matrix3D._rawData[1],this._matrix.c=this._matrix3D._rawData[4],this._matrix.d=this._matrix3D._rawData[5],this._matrix.tx=this._matrix3D._rawData[12],this._matrix.ty=this._matrix3D._rawData[13],this._matrix},set:function(t){t&&(this._matrix3D.identity(),this._matrix3D._rawData[0]=t.a,this._matrix3D._rawData[1]=t.b,this._matrix3D._rawData[4]=t.c,this._matrix3D._rawData[5]=t.d,this._matrix3D._rawData[12]=t.tx,this._matrix3D._rawData[13]=t.ty,this.invalidateComponents(),this._matrix3DDirty=!1,this._inverseMatrix3DDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix3D",{get:function(){return this._matrix3DDirty&&this.updateMatrix3D(),this._matrix3D},set:function(t){if(t){var e=t._rawData,n=this._matrix3D._rawData;n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]}else this._matrix3D.identity();this.invalidateComponents(),this._matrix3DDirty=!1,this._inverseMatrix3DDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelBounds",{get:function(){return this._pixelBounds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._matrix3D.position},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightVector",{get:function(){return this._rightVector||(this._rightVector=new B),this._matrix3D.copyColumnTo(0,this._rightVector),this._rightVector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._componentsDirty&&this._updateComponents(),this._rotation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._componentsDirty&&this._updateComponents(),this._scale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this._componentsDirty&&this._updateComponents(),this._skew},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"upVector",{get:function(){return this._upVector||(this._upVector=new B),this._matrix3D.copyColumnTo(1,this._upVector),this._upVector},enumerable:!0,configurable:!0}),e.prototype.append=function(t){console.log("append("+t+") is not implemented yet in core/Transform")},e.prototype.clearColorTransform=function(){this._colorTransform&&(this._colorTransform.clear(),this.invalidateColorTransform())},e.prototype.clearMatrix3D=function(){this._matrix3D.identity(),this.invalidateComponents()},e.prototype.clone=function(){var t=new e;return this.copyRawDataTo(t),t},e.prototype.copyRawDataTo=function(t){this._matrix3DDirty&&this.updateMatrix3D();var e=t._rawData,n=this._rawData;e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e[16]=n[16],e[17]=n[17],e[18]=n[18],e[19]=n[19],e[20]=n[20],e[21]=n[21],e[22]=n[22],e[23]=n[23],this.invalidateComponents(),this.invalidateColorTransform()},e.prototype.dispose=function(){},e.prototype.invalidateColorTransform=function(){this._invalidateColorTransform||(this._invalidateColorTransform=new S(S.INVALIDATE_COLOR_TRANSFORM,this)),this.dispatchEvent(this._invalidateColorTransform)},e.prototype.invalidateComponents=function(){this.invalidatePosition(),this._componentsDirty=!0},e.prototype.invalidateMatrix3D=function(){this._inverseMatrix3DDirty=!0,this._matrix3DDirty||(this._matrix3DDirty=!0,this._invalidateMatrix3D||(this._invalidateMatrix3D=new S(S.INVALIDATE_MATRIX3D,this)),this.dispatchEvent(this._invalidateMatrix3D))},e.prototype.invalidatePosition=function(){this._inverseMatrix3DDirty=!0,this._matrix3D.invalidatePosition(),this._invalidateMatrix3D||(this._invalidateMatrix3D=new S(S.INVALIDATE_MATRIX3D,this)),this.dispatchEvent(this._invalidateMatrix3D)},e.prototype.lookAt=function(t,e){void 0===e&&(e=null),null==e&&(e=B.Y_AXIS);var n=R.getPointAtMatrix(new B,t.subtract(this._matrix3D.position),e,R.CALCULATION_MATRIX).decompose()[1];this.rotateTo(n.x,n.y,n.z)},e.prototype.moveBackward=function(t){this.translateLocal(B.Z_AXIS,-t)},e.prototype.moveDown=function(t){this.translateLocal(B.Y_AXIS,-t)},e.prototype.moveForward=function(t){this.translateLocal(B.Z_AXIS,t)},e.prototype.moveLeft=function(t){this.translateLocal(B.X_AXIS,-t)},e.prototype.moveRight=function(t){this.translateLocal(B.X_AXIS,t)},e.prototype.moveTo=function(t,e,n){this._matrix3D._rawData[12]=t,this._matrix3D._rawData[13]=e,this._matrix3D._rawData[14]=n,this.invalidatePosition()},e.prototype.moveUp=function(t){this.translateLocal(B.Y_AXIS,t)},e.prototype.pitch=function(t){this.rotate(B.X_AXIS,t)},e.prototype.roll=function(t){this.rotate(B.Z_AXIS,t)},e.prototype.rotate=function(t,e){this.matrix3D.prependRotation(e,t),this.invalidateComponents()},e.prototype.rotateTo=function(t,e,n){this._componentsDirty&&this._updateComponents(),this._rotation.x=t,this._rotation.y=e,this._rotation.z=n,this.invalidateMatrix3D()},e.prototype.scaleTo=function(t,e,n){this._componentsDirty&&this._updateComponents(),this._scale.x=t,this._scale.y=e,this._scale.z=n,this.invalidateMatrix3D()},e.prototype.skewTo=function(t,e,n){this._componentsDirty&&this._updateComponents(),this._skew.x=t,this._skew.y=e,this._skew.z=n,this.invalidateMatrix3D()},e.prototype.translate=function(t,e){var n=t.x,r=t.y,i=t.z,o=e/Math.sqrt(n*n+r*r+i*i);this.matrix3D.appendTranslation(n*o,r*o,i*o),this.invalidatePosition()},e.prototype.translateLocal=function(t,e){var n=t.x,r=t.y,i=t.z,o=e/Math.sqrt(n*n+r*r+i*i);this.matrix3D.prependTranslation(n*o,r*o,i*o),this.invalidatePosition()},e.prototype.updateMatrix3D=function(){this._matrix3D.recompose(this._components),this._matrix3DDirty=!1},e.prototype.yaw=function(t){this.rotate(B.Y_AXIS,t)},e.prototype._updateComponents=function(){var t,e=this._matrix3D.decompose();t=e[1],this._rotation.x=t.x,this._rotation.y=t.y,this._rotation.z=t.z,t=e[2],this._skew.x=t.x,this._skew.y=t.y,this._skew.z=t.z,t=e[3],this._scale.x=t.x,this._scale.y=t.y,this._scale.z=t.z,this._componentsDirty=!1},e}(c),k=function(t){function e(e,n){return void 0===e&&(e=""),void 0===n&&(n=0),t.call(this,"PartialImplementationError - this function is in development. Required Dependency: "+e,n)||this}return n(e,t),e}(a),U=function(t){function e(e,n){return void 0===e&&(e=null),void 0===n&&(n=0),t.call(this,e||"RangeError",n)||this}return n(e,t),e}(a),j=function(t){function e(e,n,r,i){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null);var o=t.call(this,e)||this;return o._url=n,o._content=r,o._assets=i,o}return n(e,t),Object.defineProperty(e.prototype,"content",{get:function(){return this._content},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"assets",{get:function(){return this._assets},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._url,this._content,this._assets)},e.LOADER_START="loaderStart",e.LOADER_COMPLETE="loaderComplete",e}(u),V=function(t){function e(e,n){void 0===n&&(n="");var r=t.call(this,e)||this;return r._message=n,r}return n(e,t),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._message)},e.PARSE_COMPLETE="parseComplete",e.PARSE_ERROR="parseError",e.READY_FOR_DEPENDENCIES="readyForDependencies",e}(u),Q=function(t){function e(e,n){var r=t.call(this,e)||this;return r._projection=n,r}return n(e,t),Object.defineProperty(e.prototype,"projection",{get:function(){return this._projection},enumerable:!0,configurable:!0}),e.INVALIDATE_FRUSTUM_MATRIX3D="invalidateFrustumMatrix3D",e.INVALIDATE_VIEW_MATRIX3D="invalidateViewMatrix3D",e}(u),G=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.TIMER="timer",e.TIMER_COMPLETE="timerComplete",e}(u),z=function(t){function e(e,n){var r=t.call(this,e)||this;return r._urlLoader=n,r}return n(e,t),Object.defineProperty(e.prototype,"urlLoader",{get:function(){return this._urlLoader},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._urlLoader)},e.HTTP_STATUS="httpStatus",e.LOAD_ERROR="loadError",e.LOAD_PROGRESS="loadProgress",e.LOAD_START="loadStart",e.LOAD_COMPLETE="loadComplete",e}(u),H=function(){function t(){}return t.BACK=0,t.FRONT=1,t.IN=0,t.OUT=1,t.INTERSECT=2,t}(),X=function(){function t(e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),this.a=e,this.b=n,this.c=r,this.d=i,this._iAlignment=0==e&&0==n?t.ALIGN_XY_AXIS:0==n&&0==r?t.ALIGN_YZ_AXIS:0==e&&0==r?t.ALIGN_XZ_AXIS:t.ALIGN_ANY}return t.prototype.fromPoints=function(e,n,r){var i=n.x-e.x,o=n.y-e.y,a=n.z-e.z,s=r.x-e.x,u=r.y-e.y,l=r.z-e.z;this.a=o*l-a*u,this.b=a*s-i*l,this.c=i*u-o*s,this.d=this.a*e.x+this.b*e.y+this.c*e.z,0==this.a&&0==this.b?this._iAlignment=t.ALIGN_XY_AXIS:0==this.b&&0==this.c?this._iAlignment=t.ALIGN_YZ_AXIS:0==this.a&&0==this.c?this._iAlignment=t.ALIGN_XZ_AXIS:this._iAlignment=t.ALIGN_ANY},t.prototype.fromNormalAndPoint=function(e,n){this.a=e.x,this.b=e.y,this.c=e.z,this.d=this.a*n.x+this.b*n.y+this.c*n.z,0==this.a&&0==this.b?this._iAlignment=t.ALIGN_XY_AXIS:0==this.b&&0==this.c?this._iAlignment=t.ALIGN_YZ_AXIS:0==this.a&&0==this.c?this._iAlignment=t.ALIGN_XZ_AXIS:this._iAlignment=t.ALIGN_ANY},t.prototype.normalize=function(){var t=1/Math.sqrt(this.a*this.a+this.b*this.b+this.c*this.c);return this.a*=t,this.b*=t,this.c*=t,this.d*=t,this},t.prototype.distance=function(e){return this._iAlignment==t.ALIGN_YZ_AXIS?this.a*e.x-this.d:this._iAlignment==t.ALIGN_XZ_AXIS?this.b*e.y-this.d:this._iAlignment==t.ALIGN_XY_AXIS?this.c*e.z-this.d:this.a*e.x+this.b*e.y+this.c*e.z-this.d},t.prototype.classifyPoint=function(e,n){return void 0===n&&(n=.01),this.d!=this.d?H.FRONT:(r=this._iAlignment==t.ALIGN_YZ_AXIS?this.a*e.x-this.d:this._iAlignment==t.ALIGN_XZ_AXIS?this.b*e.y-this.d:this._iAlignment==t.ALIGN_XY_AXIS?this.c*e.z-this.d:this.a*e.x+this.b*e.y+this.c*e.z-this.d)<-n?H.BACK:r>n?H.FRONT:H.INTERSECT;var r},t.prototype.toString=function(){return"Plane3D [a:"+this.a+", b:"+this.b+", c:"+this.c+", d:"+this.d+"]"},t.ALIGN_ANY=0,t.ALIGN_XY_AXIS=1,t.ALIGN_YZ_AXIS=2,t.ALIGN_XZ_AXIS=3,t}(),Y=function(){function t(){}return t.initDistributions=function(){this._distributions=new Array,this._distributions[0]=new Array(.3082841,.4320919),this._distributions[1]=new Array(.3082841,.4320919,-.2274942,-.6640266),this._distributions[2]=new Array(.8742689,.0009265686,-.6864116,-.5536607,-.2325206,.7678371),this._distributions[3]=new Array(.3913446,-.7084417,-.7511101,-.5935929,-.2323436,.5320091,.8435315,.5035911),this._distributions[4]=new Array(.2122471,-.5771395,-.8543506,-.1763534,.5189021,.8323698,-.3616908,.5865368,.9523004,-.04948437),this._distributions[5]=new Array(.5791035,.3496495,.2959551,-.6006749,-.2419119,-.06879545,-.7403072,.6110353,-.04555973,.8059174,-.5275017,-.737129),this._distributions[6]=new Array(.06941478,.8519508,-.7441907,.2426432,.6439992,-.2405252,-.1007523,-.2327587,-.6427067,-.7248485,.8050759,.5492936,.3573822,-.8824506),this._distributions[7]=new Array(.8509863,.4452587,-.09507271,.2073005,.1706571,-.6434793,.8029777,-.2718274,-.4401725,.8196304,.2715359,.8598521,-.8121575,-.006447683,-.6486837,-.7237598),this._distributions[8]=new Array(.6951686,-.2680728,-.04933243,.3710589,.6592212,.3661054,-.01579228,-.6909603,-.3275101,-.1756866,.3811549,.9218544,-.216032,.9755028,-.7065172,.3355389,-.6579109,-.6798355),this._distributions[9]=new Array(.6181276,-.09790418,-.2537868,-.5570995,-.1964931,.3459414,.3474613,-.8885581,.5135743,.5753114,-.9549091,.1480672,-.8711916,-.4293123,-.6928071,.6190156,-.13369,.8892705,.0548224,-.1246777),this._distributions[10]=new Array(.4853027,-.5080479,-.1331675,-.506597,.139575,.01316885,.803486,-.07568797,.5240274,.4883182,-.4334005,.1207938,-.7794577,-.3985141,.1576432,-.9861221,-.3712867,.6959021,.1517378,.9847429,-.9762396,.1661073),this._distributions[11]=new Array(-.2790166,-.01252619,.3389016,.3921154,.2408341,-.313211,-.8151779,-.3898362,-.6347761,.3486495,.09471484,-.7722448,-.1385674,.6364574,.2456331,.9295807,-.3864306,-.8247881,.6111673,-.7164014,.8287669,.05466961,.837706,.5415626),this._distributions[12]=new Array(.056417,.3185693,-.8245888,.1882799,.8575996,.1136829,.1070375,.875332,.4076743,-.06000621,-.4311306,.7239349,.2677574,-.538472,-.08486642,-.2083647,-.888989,-.3906443,-.4768958,-.6664082,.09334993,-.9861541,.808736,-.455949,.5889823,.7660807),this._distributions[13]=new Array(-.2681346,-.3955857,-.1315102,-.8852947,-.5143692,.09551838,.4344836,-.546945,-.8620899,-.3813288,.1650431,.02034803,-.1543657,.3842218,-.828457,.5376903,-.6145,-.7818927,-.2639062,.8784655,.1912684,.9720125,.3135219,.5224229,.7850655,.4592297,.7465045,-.1368916),this._distributions[14]=new Array(.4241029,.695281,.150511,-.02304107,-.2482675,.9120338,.8057325,.2622084,-.2445909,.2765962,.8588713,-.1772072,.3117845,-.4385471,-.3923851,-.3298936,-.1751254,-.7405846,.6926506,-.684163,-.9304563,-.3254691,-.8533293,.1523024,.2510415,-.917345,-.6239773,-.7105472,-.6104624,.6041355),this._distributions[15]=new Array(.5844554,.06651045,.1343258,.6756578,.3799674,-.6301104,.5590436,.7940555,.09574714,.02262517,.8697868,.393301,.003945862,-.421735,.9043913,-.2432393,-.4844007,.7190998,-.3201078,.2972371,-.3852352,-.6341155,-.5413069,-.09223081,-.8468984,-.5126905,.004156174,-.8633173,-.9681889,-.03305046,-.846509,.4414353),this._distributions[16]=new Array(.4506488,.657668,.4621297,.07441051,-.2782125,.6201044,.9750003,.09110117,.1019436,.2986514,.03457398,.9631706,.542098,-.5505635,.8675668,.4938077,-.5414361,.2655292,-.7941836,.6003053,-.09847672,-.1001604,-.9316511,-.08572888,.07286467,-.611899,-.5232627,-.4082253,-.5481608,-.827938,-.1551939,-.9621193,.9220031,-.3315949),this._distributions[17]=new Array(.197908,-.4697656,-.4474689,-.3428435,.8529873,-.2228634,.6022478,-.5469642,.2545276,-.931133,-.1507547,-.7855865,-.07606658,.1011628,.3046715,.2785755,.4698432,-.1064076,.6831254,.4152522,.1374381,.8363233,-.2166121,.6682042,.5511393,.7996449,-.4278994,.28836,-.8875198,.2181732,-.8772842,-.2818254,-.7000262,.5762185,-.6062385,-.7439126),this._distributions[18]=new Array(.6645703,-.05678739,.5720971,.4533803,-.07660709,.08802763,.5163431,-.4426552,.1163455,-.3404382,-.4004807,-.5046007,.2932099,-.8201418,-.5322125,.03834766,-.1490209,-.8817304,-.8000439,-.3509448,.5260983,.8421043,.1197811,.6963812,.9498612,.3122156,-.9285746,.02120355,-.6670724,.7217396,.9155889,-.3510147,-.271941,.4727852,.318879,.1634057,-.2686755,.9253026),this._distributions[19]=new Array(.5064292,.422527,.8935515,-.06610427,.1199719,.175568,.403388,-.2003276,.1657927,.8154403,.9301245,.2929218,-.1644068,.6201534,.7113559,-.6589743,-.3364046,-.1799502,.02109996,-.392765,-.382213,.3219992,-.9201946,.1207967,-.726185,.4291916,-.7443482,-.2480059,-.5147594,.7418784,.1935272,-.7406143,-.3643523,-.5559214,-.7147766,-.6326278,-.2524151,-.9096627,.5161405,.7908453),this._distributions[20]=new Array(.7921003,-.3032096,.5992879,-.009052323,.2538549,-.1872749,.7053444,.3677175,.5417761,-.8170255,.9749611,.1210478,.1969143,-.6117041,-.1824499,-.4634196,-.1181338,-.8668742,-.3050112,-.1352596,-.4409327,-.7082354,-.03225285,.1171548,.3113096,.3250439,-.8166144,-.463995,-.01014475,.4715334,-.6868284,.05091889,-.4011163,.2717285,-.06756835,.8307694,-.7938535,.4352129,-.4663842,.7165329,.559729,.8093995),this._distributions[21]=new Array(.07832243,.426151,-.3856795,.5799953,.01970797,.06706189,.4822682,.3014512,-.1532982,.87485,-.4959527,.07888043,.260601,-.2304784,.4996209,.7167382,.585986,-.04265174,-.7679967,.5509416,-.9041753,.1802134,-.8407655,-.4442826,-.2058258,-.2636995,-.4984115,-.5928579,.2926032,-.7886473,-.06933882,-.621177,.578115,-.4813387,.8981777,-.3291056,.1942733,.9255584,.8084362,.5066984,.9920095,.03103104,-.2403206,-.9389018),this._distributions[22]=new Array(-.5691095,.1014316,-.7788262,.384012,-.8253665,-.1645582,-.1830993,.002997211,-.2555013,-.4177977,-.6640869,-.4794711,-.2351242,.5850121,.02436554,.2825883,.006061143,-.8200245,.1618791,-.3063331,-.3765897,-.7249815,.6092919,-.6769328,-.5956934,.6957655,.5383642,.4522677,-.1489165,.9125596,.4167473,.1335986,.1898309,.5874342,.2288171,.9624356,.7540846,-.07672304,.8986252,.2788797,.3555991,-.9262139,.8454325,-.4027667,.4945236,-.2935512),this._distributions[23]=new Array(-.4481403,-.3758374,-.8877251,.08739938,.05015831,-.1339983,-.4070427,-.8534173,.1019274,-.5503222,-.445998,.1997541,-.8686263,-.2788867,-.7695944,-.6033704,-.05515742,-.885711,-.7714347,.5790485,.3466263,-.8799297,.4487582,-.5321087,-.2461368,.6053771,-.05568117,.2457351,-.4668669,.8523816,.8103387,-.4255538,.4054182,-.175663,-.2802011,-.08920153,.2665959,.382935,.555679,.1621837,.105246,.8420411,.6921161,.6902903,.880946,.2483067,.9699264,-.1021767),this._distributions[24]=new Array(-.1703323,-.3119385,.2916039,-.2988263,-.008472982,-.9277695,-.7730271,-.3277904,.3440474,-.6815342,-.2910278,.03461745,-.6764899,-.657078,-.3505501,-.7311988,-.03478927,.3258755,-.6048835,.159423,.2035525,.02212214,.5116573,.2226856,.6664805,-.2500189,.7147882,-.6609634,.03030632,-.5763278,-.2516585,.6116219,-.9434413,-.0116792,.9061816,.2491155,.182867,.6076167,.286593,.9485695,-.5992439,.6970096,-.2082874,.9416641,.9880044,-.1541709,-.9122881,.331555,.7324886,.6725098),this._distributions[25]=new Array(.3869598,-.04974834,.7168844,-.0693711,-.07166742,.1725325,.4599592,.3232779,.5872094,-.4198674,.2442266,-.625667,.1254557,.4500048,-.2290154,-.1803567,.890583,.3373493,.1256081,.7853789,-.2676466,.5305805,-.7063224,.252168,-.3989835,.1189921,.09617215,-.2451447,.6302541,.6085876,.9380925,-.3234899,.5086241,-.8573482,.03576187,-.9876697,-.0876712,-.6365195,-.5276513,.823456,-.6935764,-.2240411,-.5212318,-.5383121,-.2116208,.9639363,-.9840096,.02743555,-.3991577,-.8994547,-.7830126,.614068),this._distributions[26]=new Array(-.8366601,.4464895,-.5917366,-.02073906,-.9845258,.1635625,-.3097973,.4379579,-.5478154,.7173221,-.1685888,.9261969,.01503595,.6046097,.4452421,.5449086,.0315687,.1944619,.3753404,.8688548,.4143643,.1396648,.8711032,.4304703,.7328773,.1461501,.6374492,-.3521495,.145613,-.1341466,.9040975,-.135123,-.7839059,-.5450199,-.516019,-.3320859,-.206158,-.4431106,-.9703014,-.2368356,-.2473119,-.0864351,.2130725,-.4604077,-.003726701,-.7122303,-.4072131,-.6833169,.1632999,-.9776646,.4686888,-.680495,-.2293511,-.9509777),this._distributions[27]=new Array(.107311,-.1311369,-.4194764,-.3148777,.6171439,-.2745973,.2796618,.1937153,-.09106886,.4180236,.6044006,.05577846,.02927299,-.6738263,-.2580845,.1179939,-.09023564,-.3830024,.3570953,-.5000587,.81591,-.5518309,.9300217,-.1257987,.4904627,-.8381903,-.3163182,-.8632009,.1137595,-.9875998,.8390043,.3538185,.2149114,.4993694,.5191584,.3833552,.5002763,.7061465,-.2567276,.9068756,-.5197366,.3467845,.03668867,.9734009,-.5347553,.66747,-.9028882,.1023768,-.8967977,.412834,-.5821944,.0426479,-.8032165,-.2397038,-.5597343,-.6358021),this._distributions[28]=new Array(-.6562496,-.1781036,-.9301494,.1185208,-.3861143,-.4153562,-.1560799,-.1099607,-.5587025,.395218,-.5322112,-.699701,-.5008639,.08726846,-.970524,-.1963461,-.813577,-.5185111,-.1644458,.298,-.3216791,.639982,.3315373,.3339162,.2383235,-.00105722,.1137828,.5450742,-.01899921,.8798413,.2849685,.8255596,.6974412,.2123175,.7588523,.5470437,.5102502,-.1687844,.5853448,.8033476,.2590716,-.5262504,.5607718,-.6342825,.8666443,-.1491841,.8341052,-.4935003,-.1568441,-.6634066,.2512113,-.8769391,-.2559827,-.9572457,-.01928852,-.3966542,-.750667,.6409678),this._distributions[29]=new Array(.3454786,-.04837726,.2649553,.2406852,.5599093,-.3839145,-.1111814,-.05502108,.7586042,-.05818377,.2519488,-.4665135,-.1264972,.2602723,-.08766216,-.3671907,.6428129,.3999204,-.6105871,-.1246869,-.4589451,-.7646643,-.03021116,-.7899352,-.6036922,-.4293956,-.2481938,.6534185,.102798,.6784465,-.6392644,.4821358,-.6789002,.1779133,-.9140783,-.1989647,-.9262617,.3381507,.4794891,-.8093274,.3959447,.668478,.9602883,.2272305,-.123672,.9210883,.2375148,.9523395,-.52898,.7973378,-.382433,.1228794,.695015,.6948439,.7530277,-.6458191,.8777987,-.3272956,.2318525,-.962768),this._distributions[30]=new Array(.4518921,-.1146195,.4720805,-.4238748,.3655423,.1806341,.1589939,-.23568,.7673324,-.5149941,.01163658,.09045836,.7010971,.1245747,.7518286,-.1855433,.4960719,.4601022,.2566979,-.6308268,-.0654714,-.5126389,-.1823319,-.1343282,-.1464312,.4883236,-.3858738,.203523,.1484799,.4432284,-.477109,-.116241,.2719092,.7208626,.9104174,.3578536,-.5956199,.7662588,-.6996251,.3678654,-.2514512,.9251933,.1275825,-.9478135,-.204608,-.8611552,.4264838,-.877443,.9854161,.05521112,.5912951,.7997434,.1140349,.982093,-.9324368,-.2094094,-.42436,-.6441524,-.6722705,-.3554261,-.7844236,.08587621),this._distributions[31]=new Array(-.4206714,-.5613642,-.8733016,-.3373051,-.1046226,-.2902999,-.1318562,-.8434365,.1145093,-.5962623,-.4965627,-.1873259,-.5011808,-.8546229,-.7165636,-.5743566,.1090901,.2017643,.3404809,-.220455,-.1989015,.2372122,-.4538706,.0979171,.4514146,-.572846,.2314168,-.8514503,-.4247236,.5650803,-.943347,.04514639,-.1309718,.5221877,-.7004157,.4561877,.6306441,.04448673,.4301621,.5766876,.1078042,.7245752,.3875354,.2794483,.702876,-.2924213,.7360667,-.6210318,.7486517,.6531103,.4898235,.8591025,.6549174,.3854057,-.2596106,.7916998,.9251194,-.05296265,-.5620695,.820877,-.01228026,.9937211,.9612103,.2628758)},t.getDistribution=function(t){return this._distributions||this.initDistributions(),t<1||t>32?null:this._distributions[t-1]},t}(),q=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this._rawData=new Float32Array(4);var i=this._rawData;i[0]=t,i[1]=e,i[2]=n,i[3]=r}return t.prototype.axCallPublicProperty=function(t,e){return null},t.prototype.axGetPublicProperty=function(t){return null},t.prototype.axSetPublicProperty=function(t){return null},Object.defineProperty(t.prototype,"height",{get:function(){return this._rawData[3]},set:function(t){this._rawData[3]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._rawData[2]},set:function(t){this._rawData[2]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this._rawData[0]},set:function(t){this._rawData[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._rawData[1]},set:function(t){this._rawData[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this._rawData[1]+this._rawData[3]},set:function(t){this._rawData[3]=t-this._rawData[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return null==this._bottomRight&&(this._bottomRight=new T),this._bottomRight._rawData[0]=this._rawData[0]+this._rawData[2],this._bottomRight._rawData[1]=this._rawData[1]+this._rawData[3],this._bottomRight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._rawData[0]},set:function(t){this._rawData[2]+=this._rawData[0]-t,this._rawData[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._rawData[0]+this._rawData[2]},set:function(t){this._rawData[2]=t-this._rawData[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return null==this._size&&(this._size=new T),this._size._rawData[0]=this._rawData[2],this._size._rawData[1]=this._rawData[3],this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this._rawData[1]},set:function(t){this._rawData[3]+=this._rawData[1]-t,this._rawData[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return null==this._topLeft&&(this._topLeft=new T),this._topLeft._rawData[0]=this._rawData[0],this._topLeft._rawData[1]=this._rawData[1],this._topLeft},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=this._rawData;return new t(e[0],e[1],e[2],e[3])},t.prototype.contains=function(t,e){var n=this._rawData;return n[0]<=t&&n[0]+n[2]>=t&&n[1]<=e&&n[1]+n[3]>=e},t.prototype.containsPoint=function(t){var e=this._rawData,n=t._rawData;return e[0]<=n[0]&&e[0]+e[2]>=n[0]&&e[1]<=n[1]&&e[1]+e[3]>=n[1]},t.prototype.containsRect=function(t){var e=this._rawData,n=t._rawData;return e[0]<=n[0]&&e[0]+e[2]>=n[0]+n[2]&&e[1]<=n[1]&&e[1]+e[3]>=n[1]+n[3]},t.prototype.copyFrom=function(t){var e=this._rawData,n=t._rawData;e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3]},t.prototype.equals=function(t){var e=this._rawData,n=t._rawData;return e[0]==n[0]&&e[1]==n[1]&&e[2]==n[2]&&e[3]==n[3]},t.prototype.inflate=function(t,e){var n=this._rawData;n[0]-=t/2,n[1]-=e/2,n[2]+=t/2,n[3]+=e/2},t.prototype.inflatePoint=function(t){var e=this._rawData;e[0]-=t.x/2,e[1]-=t.y/2,e[2]+=t.x/2,e[3]+=t.y/2},t.prototype.intersection=function(e){var n=this._rawData,r=e._rawData;if(this.intersects(e)){var i=new t,o=i._rawData;return n[0]>r[0]?(o[0]=n[0],o[2]=r[0]-n[0]+r[2],o[2]>n[2]&&(o[2]=n[2])):(o[0]=r[0],o[2]=n[0]-r[0]+n[2],o[2]>r[2]&&(o[2]=r[2])),n[1]>r[1]?(o[1]=n[1],o[3]=r[1]-n[1]+r[3],o[3]>n[3]&&(o[3]=n[3])):(o[1]=r[1],o[3]=n[1]-r[1]+n[3],o[3]>r[3]&&(o[3]=r[3])),i}return new t},t.prototype.intersects=function(t){var e=this._rawData,n=t._rawData;return e[0]+e[2]>n[0]&&e[0]n[1]&&e[1]=0?(o=s.substring(0,s.lastIndexOf(this._separator)),a=parseInt(s.substring(o.length-1)),isNaN(a)&&(o=s,a=0)):(o=s,a=0),0==a&&this._next_suffix.hasOwnProperty(o)&&(a=this._next_suffix[o]);do{a++,i=o.concat(this._separator,a.toString())}while(n.hasOwnProperty(i));this._next_suffix[o]=a,this._pUpdateNames(e.adaptee.assetNamespace,i,e,t,n,r)},e.prototype.create=function(){return new e(this._separator)},e}($),nt=function(){function t(t){}return t.APPEND_NUM_SUFFIX=new et,t.IGNORE=new tt,t.THROW_ERROR=new Z,t}(),rt=function(){function t(){}return t.TEXT="text",t.VARIABLES="variables",t.BLOB="blob",t.ARRAY_BUFFER="arraybuffer",t.BINARY="binary",t}(),it=function(){function t(){}return t.POST="POST",t.GET="GET",t}(),ot=function(){function t(t){void 0===t&&(t=null),this._variables=new Object,null!==t&&this.decode(t)}return t.prototype.decode=function(t){t=t.split("+").join(" ");for(var e,n=/[?&]?([^=]+)=([^&]*)/g;e=n.exec(t);)this._variables[decodeURIComponent(e[1])]=decodeURIComponent(e[2])},t.prototype.toString=function(){return""},Object.defineProperty(t.prototype,"variables",{get:function(){return this._variables},set:function(t){this._variables=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formData",{get:function(){var t=new FormData;for(var e in this._variables)t.append(e,this._variables[e]);return t},enumerable:!0,configurable:!0}),t}(),at=function(t){function e(){var e=t.call(this)||this;return e._bytesLoaded=0,e._bytesTotal=0,e._dataFormat=rt.TEXT,e._loadError=!1,e}return n(e,t),Object.defineProperty(e.prototype,"url",{get:function(){return this._request?this._request.url:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataFormat",{get:function(){return this._dataFormat},set:function(t){this._dataFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bytesLoaded",{get:function(){return this._bytesLoaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bytesTotal",{get:function(){return this._bytesTotal},enumerable:!0,configurable:!0}),e.prototype.load=function(t){this._request=t,this.initXHR(),t.method===it.POST?this.postRequest(t):this.getRequest(t)},e.prototype.isSupported=function(){return null!=window},e.prototype.close=function(){this._XHR.abort(),this.disposeXHR()},e.prototype.dispose=function(){this._XHR&&this._XHR.abort(),this.disposeXHR()},e.prototype.setResponseType=function(t,e){switch(e){case rt.ARRAY_BUFFER:case rt.BLOB:case rt.TEXT:t.responseType=e;break;case rt.VARIABLES:t.responseType=rt.TEXT;break;case rt.BINARY:t.responseType=""}},e.prototype.getRequest=function(t){try{this._XHR.open(t.method,t.url,t.async),this.setResponseType(this._XHR,this._dataFormat),this._XHR.send()}catch(t){this.handleXmlHttpRequestException(t)}},e.prototype.postRequest=function(t){if(this._loadError=!1,this._XHR.open(t.method,t.url,t.async),null!=t.data)if(t.data instanceof ot){var e=t.data;try{this._XHR.responseType="text",this._XHR.send(e.formData)}catch(t){this.handleXmlHttpRequestException(t)}}else this.setResponseType(this._XHR,this._dataFormat),t.data?this._XHR.send(t.data):this._XHR.send();else this._XHR.send()},e.prototype.handleXmlHttpRequestException=function(t){t.code},e.prototype.initXHR=function(){var t=this;this._XHR||(this._XHR=new XMLHttpRequest,this._XHR.onloadstart=function(e){return t.onLoadStart(e)},this._XHR.onprogress=function(e){return t.onProgress(e)},this._XHR.onabort=function(e){return t.onAbort(e)},this._XHR.onerror=function(e){return t.onLoadError(e)},this._XHR.onload=function(e){return t.onLoadComplete(e)},this._XHR.ontimeout=function(e){return t.onTimeOut(e)},this._XHR.onloadend=function(e){return t.onLoadEnd(e)},this._XHR.onreadystatechange=function(e){return t.onReadyStateChange(e)})},e.prototype.disposeXHR=function(){null!==this._XHR&&(this._XHR.onloadstart=null,this._XHR.onprogress=null,this._XHR.onabort=null,this._XHR.onerror=null,this._XHR.onload=null,this._XHR.ontimeout=null,this._XHR.onloadend=null,this._XHR=null)},e.prototype.decodeURLVariables=function(t){var e=new Object;t=t.split("+").join(" ");for(var n,r=/[?&]?([^=]+)=([^&]*)/g;n=r.exec(t);)e[decodeURIComponent(n[1])]=decodeURIComponent(n[2]);return e},e.prototype.onReadyStateChange=function(t){4==this._XHR.readyState&&(this._status=this._XHR.status,404==this._status&&(this._loadError=!0,this.dispatchEvent(this._loadErrorEvent||(this._loadErrorEvent=new z(z.LOAD_ERROR,this)))),this.dispatchEvent(this._statusEvent||(this._statusEvent=new z(z.HTTP_STATUS,this))))},e.prototype.onLoadEnd=function(t){this._loadError},e.prototype.onTimeOut=function(t){},e.prototype.onAbort=function(t){},e.prototype.onProgress=function(t){this._bytesTotal=t.total,this._bytesLoaded=t.loaded,this.dispatchEvent(this._progressEvent||(this._progressEvent=new z(z.LOAD_PROGRESS,this)))},e.prototype.onLoadStart=function(t){this.dispatchEvent(this._loadStartEvent||(this._loadStartEvent=new z(z.LOAD_START,this)))},e.prototype.onLoadComplete=function(t){if(!0!==this._loadError){switch(this._dataFormat){case rt.TEXT:this._data=this._XHR.responseText;break;case rt.VARIABLES:this._data=this.decodeURLVariables(this._XHR.responseText);break;case rt.BLOB:case rt.ARRAY_BUFFER:case rt.BINARY:this._data=this._XHR.response;break;default:this._data=this._XHR.responseText}this.dispatchEvent(this._loadCompleteEvent||(this._loadCompleteEvent=new z(z.LOAD_COMPLETE,this)))}},e.prototype.onLoadError=function(t){this._loadError=!0,this.dispatchEvent(this._loadErrorEvent||(this._loadErrorEvent=new z(z.LOAD_ERROR,this)))},e}(c),st=function(){function t(t,e,n,r,i,o,a,s){void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),this._assets=[],this._dependencies=[],this._id=t,this._sub_id=s,this._request=e,this._data=n,this._parser=r,this._parentParser=i,this._retrieveAsRawData=o,this._suppressAssetEvents=a}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sub_id",{get:function(){return this._sub_id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return this._request},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parser",{get:function(){return this._parser},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentParser",{get:function(){return this._parentParser},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"retrieveAsRawData",{get:function(){return this._retrieveAsRawData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suppresAssetEvents",{get:function(){return this._suppressAssetEvents},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"assets",{get:function(){return this._assets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dependencies",{get:function(){return this._dependencies},enumerable:!0,configurable:!0}),t.prototype.setData=function(t){this._data=t},t.prototype.setParser=function(t){this._parser=t},t.prototype.resolve=function(){this._parentParser&&this._parentParser._iResolveDependency(this)},t.prototype.resolveFailure=function(){this._parentParser&&this._parentParser._iResolveDependencyFailure(this)},t.prototype.resolveName=function(t){return this._parentParser?this._parentParser._iResolveDependencyName(this,t):t.name},t}(),ut=function(){function t(e,n){void 0===e&&(e=!0),void 0===n&&(n=null),this._includeDependencies=e,this._dependencyBaseUrl=n||"",this._embeddedDataByUrl={},this._remappedUrls={},this._materialMode=t.UNDEFINED,this._externalAssetMode=t.PRELOADED}return Object.defineProperty(t.prototype,"includeDependencies",{get:function(){return this._includeDependencies},set:function(t){this._includeDependencies=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"materialMode",{get:function(){return this._materialMode},set:function(t){this._materialMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"externalAssetMode",{get:function(){return this._externalAssetMode},set:function(t){this._externalAssetMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dependencyBaseUrl",{get:function(){return this._dependencyBaseUrl},set:function(t){this._dependencyBaseUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overrideAbsolutePaths",{get:function(){return this._overrideAbsPath},set:function(t){this._overrideAbsPath=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overrideFullURLs",{get:function(){return this._overrideFullUrls},set:function(t){this._overrideFullUrls=t},enumerable:!0,configurable:!0}),t.prototype.mapUrl=function(t,e){this._remappedUrls[t]=e},t.prototype.mapUrlToData=function(t,e){this._embeddedDataByUrl[t]=e},t.prototype._iHasDataForUrl=function(t){return this._embeddedDataByUrl.hasOwnProperty(t)},t.prototype._iGetDataForUrl=function(t){return this._embeddedDataByUrl[t]},t.prototype._iHasMappingForUrl=function(t){return this._remappedUrls.hasOwnProperty(t)},t.prototype._iGetRemappedUrl=function(t){return this._remappedUrls[t]},t.UNDEFINED=0,t.SINGLEPASS_MATERIALS=1,t.MULTIPASS_MATERIALS=2,t.ON_DEMAND="onDemand",t.PRELOADED="preloaded",t}(),lt=function(t){function e(e){void 0===e&&(e=0);var n=t.call(this)||this;return n._materialMode=e,n._stack=new Array,n._onReadyForDependenciesDelegate=function(t){return n._onReadyForDependencies(t)},n._onParseCompleteDelegate=function(t){return n._onParseComplete(t)},n._onParseErrorDelegate=function(t){return n._onParseError(t)},n._onLoadProgressDelegate=function(t){return n._onLoadProgress(t)},n._onLoadCompleteDelegate=function(t){return n._onLoadComplete(t)},n._onLoadErrorDelegate=function(t){return n._onLoadError(t)},n._onTextureSizeErrorDelegate=function(t){return n._onTextureSizeError(t)},n._onAssetCompleteDelegate=function(t){return n._onAssetComplete(t)},n}return n(e,t),e.enableParser=function(t){e._parsers.indexOf(t)<0&&e._parsers.push(t)},e.enableParsers=function(t){for(var n=0;n=0;n--)if(e._parsers[n].supportsData(t))return new e._parsers[n];return null},e.prototype._parseDependency=function(t){var e=t.parser;if(e||t.setParser(e=this._getParserFromData(t.data)),e)e.addEventListener(V.READY_FOR_DEPENDENCIES,this._onReadyForDependenciesDelegate),e.addEventListener(V.PARSE_COMPLETE,this._onParseCompleteDelegate),e.addEventListener(V.PARSE_ERROR,this._onParseErrorDelegate),e.addEventListener(l.TEXTURE_SIZE_ERROR,this._onTextureSizeErrorDelegate),e.addEventListener(l.ASSET_COMPLETE,this._onAssetCompleteDelegate),t.request&&t.request.url&&(e._iFileName=t.request.url),e.materialMode=this._materialMode,e.parseAsync(t.data);else{var n="No parser defined. To enable all parsers for auto-detection, use Parsers.enableAllBundled()";if(!this.hasEventListener(V.PARSE_ERROR))throw new Error(n);this.dispatchEvent(new V(V.PARSE_ERROR,n)),this._retrieveNext()}},e.prototype.getParserFromSuffix=function(t){for(var n=this.getSuffix(t),r=e._parsers.length-1;r>=0;r--){var i=e._parsers[r];if(i.supportsType(n))return new i}return null},e.prototype.getSuffix=function(t){var e=t.indexOf("?")>0?t.split("?")[0]:t;return e.substr(e.lastIndexOf(".")+1).toLowerCase()},e._parsers=new Array,e}(c),ct=function(t){function e(){var e,n=t.call(this)||this;return n._loaderSessionsGarbage=new Array,n._assets=new Array,n._assetDictionary=new Object,n._loaderSessions=new Array,n.conflictStrategy=nt.IGNORE.create(),n.conflictPrecedence=J.FAVOR_NEW,n._onAssetRenameDelegate=function(t){return n._onAssetRename(t)},n._onAssetConflictResolvedDelegate=function(t){return n._onAssetConflictResolved(t)},n._onLoaderStartDelegate=function(t){return n._onLoaderStart(t)},n._onLoaderCompleteDelegate=function(t){return n._onLoaderComplete(t)},n._onTextureSizeErrorDelegate=function(t){return n._onTextureSizeError(t)},n._onAssetCompleteDelegate=function(t){return n._onAssetComplete(t)},n._onLoadErrorDelegate=function(t){return n._onLoadError(t)},n._onParseErrorDelegate=function(t){return n._onParseError(t)},n._errorDelegateSelector=((e={})[z.LOAD_ERROR]=n._onLoadErrorDelegate,e[V.PARSE_ERROR]=n._onParseErrorDelegate,e),n}return n(e,t),e.prototype.addEventListener=function(e,n){if(e==z.LOAD_ERROR||e==V.PARSE_ERROR)for(var r=void 0;r=0)){var e=this.getAsset(t.adaptee.name,t.adaptee.assetNamespace),n=t.adaptee.assetNamespace||d.DEFAULT_NAMESPACE;null!=e&&this._strategy.resolveConflict(t,e,this._assetDictionary[n],this._strategyPreference),this._assets.push(t),this._assetDictionary.hasOwnProperty(n)||(this._assetDictionary[n]=new Object),this._assetDictionary[n][t.adaptee.name.toString().toLowerCase()]=t,t.adaptee.addEventListener(l.RENAME,this._onAssetRenameDelegate),t.adaptee.addEventListener(l.ASSET_CONFLICT_RESOLVED,this._onAssetConflictResolvedDelegate)}},e.prototype.removeAsset=function(t,e){void 0===e&&(e=!0),this.removeAssetFromDict(t),t.adaptee.removeEventListener(l.RENAME,this._onAssetRenameDelegate),t.adaptee.removeEventListener(l.ASSET_CONFLICT_RESOLVED,this._onAssetConflictResolvedDelegate);var n=this._assets.indexOf(t);n>=0&&this._assets.splice(n,1),e&&t.dispose()},e.prototype.removeAssetByName=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!0);var r=this.getAsset(t,e);return r&&this.removeAsset(r,n),r},e.prototype.removeAllAssets=function(t){if(void 0===t&&(t=!0),t)for(var e=this._assets.length,n=0;n0&&this._currentCount>=this._repeatCount?(this.stop(),this.dispatchEvent(new G(G.TIMER)),this.dispatchEvent(new G(G.TIMER_COMPLETE))):this.dispatchEvent(new G(G.TIMER))},e}(c);function ft(){return Date.now()}var gt,_t=function(t){function e(e){var n=t.call(this)||this;return n._materialMode=0,n._dataFormat=e,n._dependencies=new Array,n._pOnIntervalDelegate=function(t){return n._pOnInterval(t)},n}return n(e,t),e.supportsType=function(t){throw new s},Object.defineProperty(e.prototype,"content",{get:function(){return this._pContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parsingFailure",{get:function(){return this._parsingFailure},set:function(t){this._parsingFailure=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parsingPaused",{get:function(){return this._parsingPaused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parsingComplete",{get:function(){return this._parsingComplete},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"materialMode",{get:function(){return this._materialMode},set:function(t){this._materialMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataFormat",{get:function(){return this._dataFormat},enumerable:!0,configurable:!0}),e.prototype.parseAsync=function(t,e){void 0===e&&(e=30),this._data=t,this._pStartParsing(e)},e.prototype.parseSync=function(t){this._data=t;for(var n=e.MORE_TO_PARSE;n==e.MORE_TO_PARSE;)n=this._pProceedParsing();return this._pContent},Object.defineProperty(e.prototype,"dependencies",{get:function(){return this._dependencies},enumerable:!0,configurable:!0}),e.prototype._iResolveDependency=function(t){throw new s},e.prototype._iResolveDependencyFailure=function(t){throw new s},e.prototype._iResolveDependencyName=function(t,e){return e.name},e.prototype._iResumeParsing=function(){this._parsingPaused=!1,this._timer&&this._timer.start(),this._isParsing||this._pOnInterval()},e.prototype._pFinalizeAsset=function(t,e){void 0===e&&(e=null),t.name=e||t.name||t.assetType,this.dispatchEvent(new l(l.ASSET_COMPLETE,t))},e.prototype._pProceedParsing=function(){throw new s},e.prototype._pDieWithError=function(t){void 0===t&&(t="Unknown parsing error"),this._timer&&(this._timer.removeEventListener(G.TIMER,this._pOnIntervalDelegate),this._timer.stop(),this._timer=null),this.dispatchEvent(new V(V.PARSE_ERROR,t))},e.prototype._pAddDependency=function(t,e,n,r,i,o,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=0);var s=new st(t,e,r,n,this,i,o,a);return this._dependencies.push(s),s},e.prototype._pPauseAndRetrieveDependencies=function(){this._pPauseParsing(),this.dispatchEvent(new V(V.READY_FOR_DEPENDENCIES))},e.prototype._pPauseParsing=function(){this._timer&&this._timer.stop(),this._parsingPaused=!0},e.prototype._pHasTime=function(){return ft()-this._lastFrameTimeo?H.FRONT:i<-o?H.BACK:H.INTERSECT},e.prototype._update=function(){var e;t.prototype._update.call(this),this._targetCoordinateSpace!=this._picker.node&&(this._targetCoordinateSpace==this._picker.node.parent?e=this._picker.node.container.transform.matrix3D:(e=this._picker.node.getMatrix3D().clone()).append(this._targetCoordinateSpace.getInverseMatrix3D())),this._box=this._picker._getBoxBoundsInternal(e,this._strokeFlag,this._fastFlag,this._box),null!=this._box&&(this._halfExtentsX=this._box.width/2,this._halfExtentsY=this._box.height/2,this._halfExtentsZ=this._box.depth/2,this._centerX=this._box.x+this._halfExtentsX,this._centerY=this._box.y+this._halfExtentsY,this._centerZ=this._box.z+this._halfExtentsZ)},e}(kt),jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._radius=0,e._centerX=0,e._centerY=0,e._centerZ=0,e}return n(e,t),e.prototype.nullify=function(){this._centerX=this._centerY=this._centerZ=0,this._radius=0},e.prototype.isInFrustum=function(t,e){this._invalid&&this._update();for(var n=0;no?H.FRONT:i<-o?H.BACK:H.INTERSECT},e.prototype._update=function(){var e;t.prototype._update.call(this),this._targetCoordinateSpace&&(this._targetCoordinateSpace==this._picker.node?e=this._picker.node.container.transform.matrix3D:(e=this._picker.node.getMatrix3D().clone(),this._targetCoordinateSpace.parent&&e.append(this._targetCoordinateSpace.parent.getInverseMatrix3D()))),this._sphere=this._picker._getSphereBoundsInternal(null,e,this._strokeFlag,this._fastFlag,this._sphere);var n=this._picker.node.getMatrix3D(),r=this._sphere.x,i=this._sphere.y,o=this._sphere.z,a=this._sphere.radius,s=n._rawData,u=s[0],l=s[4],c=s[8],h=s[12],p=s[1],d=s[5],f=s[9],g=s[13],_=s[2],m=s[6],y=s[10],A=s[14];this._centerX=r*u+i*l+o*c+h,this._centerY=r*p+i*d+o*f+g,this._centerZ=r*_+i*m+o*y+A;var v=u+l+c,b=p+d+f,C=_+m+y;this._radius=a*Math.sqrt((v*v+b*b+C*C)/3)},e}(kt),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isInFrustum=function(t,e){return!0},e.prototype.classifyToPlane=function(t){return H.INTERSECT},e}(kt),Qt=function(){function t(e,n){this.id=p.Next(),this._picker=e,this._strokeFlag=t._strokeDict[n],this._fastFlag=t._fastDict[n],this._boundingVolumeClass=t._boundsDict[n]}return Object.defineProperty(t.prototype,"picker",{get:function(){return this._picker},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeFlag",{get:function(){return this._strokeFlag},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fastFlag",{get:function(){return this._fastFlag},enumerable:!0,configurable:!0}),t.prototype.requestAbstraction=function(t){return this._boundingVolumeClass},t.prototype.dispose=function(){},t._strokeDict=((Pt={})[St.BOX]=!1,Pt[St.BOX_FAST]=!1,Pt[St.BOX_BOUNDS]=!0,Pt[St.BOX_BOUNDS_FAST]=!0,Pt[St.SPHERE]=!1,Pt[St.SPHERE_FAST]=!1,Pt[St.SPHERE_BOUNDS]=!0,Pt[St.SPHERE_FAST]=!0,Pt[St.NULL]=!1,Pt),t._fastDict=((Bt={})[St.BOX]=!1,Bt[St.BOX_FAST]=!0,Bt[St.BOX_BOUNDS]=!1,Bt[St.BOX_BOUNDS_FAST]=!0,Bt[St.SPHERE]=!1,Bt[St.SPHERE_FAST]=!0,Bt[St.SPHERE_BOUNDS]=!1,Bt[St.SPHERE_FAST]=!0,Bt[St.NULL]=!1,Bt),t._boundsDict=((Ot={})[St.BOX]=Ut,Ot[St.BOX_FAST]=Ut,Ot[St.BOX_BOUNDS]=Ut,Ot[St.BOX_BOUNDS_FAST]=Ut,Ot[St.SPHERE]=jt,Ot[St.SPHERE_FAST]=jt,Ot[St.SPHERE_BOUNDS]=jt,Ot[St.SPHERE_FAST]=jt,Ot[St.NULL]=Vt,Ot),t}(),Gt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._boundingVolumePools=new Object,r._orientedBoxBounds=[],r._orientedBoxBoundsDirty=[!0,!0],r._orientedSphereBounds=[],r._orientedSphereBoundsDirty=[!0,!0],r._pickables=[],r.shapeFlag=!1,r.id=p.Next(),r._view=n.view,r._node=e.parent,r._pickGroup=n,r._pickingCollision=new Tt(e,n),r}return n(e,t),Object.defineProperty(e.prototype,"pickingCollision",{get:function(){return this._pickingCollision},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pickGroup",{get:function(){return this._pickGroup},enumerable:!0,configurable:!0}),e.prototype.getBoundingVolume=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),null==t&&(t=this._node),null==e&&(e=this._node.container.defaultBoundingVolume);var n=this._boundingVolumePools[e]||(this._boundingVolumePools[e]=new Qt(this,e));return t.getAbstraction(n)},e.prototype.hitTestPoint=function(t,e,n){return void 0===n&&(n=!1),this._hitTestPointInternal(this._node,t,e,n,!1)},e.prototype._hitTestPointInternal=function(t,e,n,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),!(-1==this._node.getMaskId()||i&&r))return!1;this._invalid&&this._update();var o=new T(e,n);this._node.globalToLocal(o,o);var a=this._getBoxBoundsInternal(null,!1,!0);if(null==a||!a.contains(o.x,o.y,0))return!1;if(!r||"[asset TextField]"==this._node.container.assetType||"[asset Billboard]"==this._node.container.assetType)return!0;for(var s=this._pickables.length,u=!1,l=0;l0){var r=t.search(/<.*>/g),i=null;-1!=r&&(i=t.slice(r).match(/([\w\.\-\+]+)/gi),t=t.slice(0,r));for(var o,a={},s=0;(o=t.indexOf("#native"))>0;){var u=o,l=(o=t.indexOf("native#",o))>-1?o+7:t.length;a["nat"+s]=t.substring(u+7,l-7),t=t.substring(0,u)+"nat"+s+t.substring(l),s++}var c=t.match(/([\w\.\+\[\]]+)/gi);if(!c||c.length<1)t.length>=3&&console.log("Warning: bad line "+e+": "+t);else switch(c[0]){case"part":this.addHeader(c[1],Number(c[2]));break;case"endpart":if(!this.cur)throw"Unexpected endpart";return this.cur.data.position=0,void(this.cur=null);default:if(!this.cur)return void console.log("Warning: bad line "+e+": "+t+" (Outside of any part definition)");if("comment"==this.cur.name)return;var h=pe.map[c[0]];if(!h)throw"Bad opcode "+c[0]+" "+e+": "+t;this.emitOpcode(this.cur,h.opcode);var p=1;if(h.dest&&"none"!=h.dest){if(!this.emitDest(this.cur,c[p++],h.dest))throw"Bad destination register "+c[p-1]+" "+e+": "+t}else this.emitZeroDword(this.cur);if(h.a&&"none"!=h.a.format){if(!this.emitSource(this.cur,c[p++],h.a,a))throw"Bad source register "+c[p-1]+" "+e+": "+t}else this.emitZeroQword(this.cur);if(h.b&&"none"!=h.b.format){if("sampler"==h.b.format){if(!this.emitSampler(this.cur,c[p++],h.b,i))throw"Bad sampler register "+c[p-1]+" "+e+": "+t}else if(!this.emitSource(this.cur,c[p++],h.b,a))throw"Bad source register "+c[p-1]+" "+e+": "+t}else this.emitZeroQword(this.cur)}}},t.prototype.emitHeader=function(t){switch(t.data.writeUnsignedByte(160),t.data.writeUnsignedInt(t.version),t.version>=16&&t.data.writeUnsignedByte(0),t.data.writeUnsignedByte(161),t.name){case"fragment":t.data.writeUnsignedByte(1);break;case"vertex":t.data.writeUnsignedByte(0);break;case"cpu":t.data.writeUnsignedByte(2);break;default:t.data.writeUnsignedByte(255)}},t.prototype.emitOpcode=function(t,e){t.data.writeUnsignedInt(e)},t.prototype.emitZeroDword=function(t){t.data.writeUnsignedInt(0)},t.prototype.emitZeroQword=function(t){t.data.writeUnsignedInt(0),t.data.writeUnsignedInt(0)},t.prototype.emitDest=function(t,e,n){var r=e.match(/([fov]?[tpocidavs])(\d*)(\.[xyzw]{1,4})?/i);if(!ge.map[r[1]])return!1;var i={num:r[2]?r[2]:0,code:ge.map[r[1]].code,mask:this.stringToMask(r[3])};return t.data.writeUnsignedShort(i.num),t.data.writeUnsignedByte(i.mask),t.data.writeUnsignedByte(i.code),!0},t.prototype.stringToMask=function(t){if(!t)return 15;var e=0;return-1!=t.indexOf("x")&&(e|=1),-1!=t.indexOf("y")&&(e|=2),-1!=t.indexOf("z")&&(e|=4),-1!=t.indexOf("w")&&(e|=8),e},t.prototype.stringToSwizzle=function(t){if(!t)return 228;var e={x:0,y:1,z:2,w:3},n=0;if("."!=t.charAt(0))throw"Missing . for swizzle";return t.length>1&&(n|=e[t.charAt(1)]),t.length>2?n|=e[t.charAt(2)]<<2:n|=(3&n)<<2,t.length>3?n|=e[t.charAt(3)]<<4:n|=(12&n)<<2,t.length>4?n|=e[t.charAt(4)]<<6:n|=(48&n)<<2,n},t.prototype.emitSampler=function(t,e,n,r){var i=e.match(/fs(\d*)/i);if(!i||!i[1])return!1;t.data.writeUnsignedShort(parseInt(i[1])),t.data.writeUnsignedByte(0),t.data.writeUnsignedByte(0);for(var o=5,a=0,s=0;s>u.shift&u.mask)&&console.log("Warning, duplicate sampler option"),a|=u.mask<=float(%b)) {;\n",0,!1,!0,!0,null,null,null,!0,null,null),new be("if (float(%a)=16&&(t.readUnsignedByte(),e.version>>=1),161!=t.readUnsignedByte())throw"Bad AGAL: Missing 0xa1 magic byte.";switch(e.progid=t.readUnsignedByte(),e.progid){case 1:e.type="fragment";break;case 0:e.type="vertex";break;case 2:e.type="cpu";break;default:e.type=""}for(var n=new ve,r=[];t.position>4,t.readmode&=15,t.special=r.readUnsignedByte(),t.wrap=t.special>>4,t.special&=15,t.mipmap=r.readUnsignedByte(),t.filter=t.mipmap>>4,t.mipmap&=15,n.samplers[t.regnum]=t):(t.indexregtype=r.readUnsignedByte(),t.indexselect=r.readUnsignedByte(),t.indirectflag=r.readUnsignedByte()),t.indirectflag&&(n.hasindirect=!0),!t.indirectflag&&e)for(var i=0;i0&&(this._header+="uniform vec4 "+i+"c["+o+"];\n");for(var a=0;a>p&1))continue;_=t.SWIZZLE[p],f=this.regtostring(u.dest.regtype,u.dest.regnum,e,i,r),f+="."+_}else if(f=this.regtostring(u.dest.regtype,u.dest.regnum,e,i,r),15!=u.dest.mask){var m=0;switch(_="",1&u.dest.mask&&(m++,_+="x"),2&u.dest.mask&&(m++,_+="y"),4&u.dest.mask&&(m++,_+="z"),8&u.dest.mask&&(m++,_+="w"),f+="."+_,m){case 1:g="float";break;case 2:g="vec2";break;case 3:g="vec3";break;default:throw"Unexpected destination mask"}}else g="vec4",_="xyzw";if(2==u.dest.regtype&&!this._usedTemps[u.dest.regnum]){var y=i+"t"+u.dest.regnum;"vec4"===g?f="vec4 "+y:d=" vec4 "+y+";\n"+d,this._usedTemps[u.dest.regnum]=!0}d=(d=(d=d.replace("%dest",f)).replace("%cast",g)).replace("%dm",_)}var A=15;if(!l.ndwm&&l.dest&&u.dest&&(A=u.dest.mask),u.a&&(d=(d=d.replace("%a",this.sourcetostring(u.a,0,A,l.scalar,e,i,r))).replace("%ia",""+u.a.regnum)),u.b&&(d=(d=d.replace("%b",this.sourcetostring(u.b,p,A,l.scalar,e,i,r))).replace("%ib",""+u.b.regnum),5==u.b.regtype)){var v=t.SAMPLERS[u.b.dim],b=["vec2","vec3","vec3"][u.b.dim];d=(d=(d=d.replace("%texdim",r?"":v)).replace("%texsize",b)).replace("%lod","")}this._body+=d}}return"vertex"==e.header.type&&(this._body+=" gl_Position = vec4(outpos.x, outpos.y, outpos.z*2.0 - outpos.w, outpos.w);\n"),s&&"fragment"==e.header.type&&(this._header="#extension GL_OES_standard_derivatives : enable\n"+this._header),e.writedepth&&(this._body+=" gl_FragDepth = clamp(tmp_FragDepth,0.0,1.0);\n"),this._body+="}\n",this._header+this._body},t.prototype.regtostring=function(t,e,n,r,i){switch(t){case 0:return"va"+e;case 1:return n.header.type[0]+"c["+e+"]";case 2:return r+"t"+e;case 3:return"vertex"==n.header.type?"outpos":i?"outColor":"gl_FragColor";case 4:return"vi"+e;case 5:return"fs"+e;case 15:if(void 0===n.native[e])throw"Native mapping not presented for register:"+e;return n.native[e];default:throw"Unknown register type"}},t.prototype.sourcetostring=function(e,n,r,i,o,a,s){var u,l=t.SWIZZLE;if(e.indirectflag){u="vcarrr[int("+this.regtostring(e.indexregtype,e.regnum,o,a,s)+"."+l[e.indexselect]+")";var c=n+e.indexoffset;c<0&&(u+=c.toString()),c>0&&(u+="+"+c.toString()),u+="]"}else u=this.regtostring(e.regtype,e.regnum+n,o,a,s);return 5==e.regtype||15==e.regtype?u:i?u+"."+l[e.swizzle>>0&3]:(228==e.swizzle&&15==r||(u+=".",1&r&&(u+=l[e.swizzle>>0&3]),2&r&&(u+=l[e.swizzle>>2&3]),4&r&&(u+=l[e.swizzle>>4&3]),8&r&&(u+=l[e.swizzle>>6&3])),u)},t.SWIZZLE=["x","y","z","w"],t.SAMPLERS=["2D","Cube","3D",""],t.maxvertexconstants=128,t.maxfragconstants=28,t.maxtemp=8,t.maxstreams=8,t.maxtextures=8,t}();!function(t){t[t.DESTINATION_ALPHA=0]="DESTINATION_ALPHA",t[t.DESTINATION_COLOR=1]="DESTINATION_COLOR",t[t.ONE=2]="ONE",t[t.ONE_MINUS_DESTINATION_ALPHA=3]="ONE_MINUS_DESTINATION_ALPHA",t[t.ONE_MINUS_DESTINATION_COLOR=4]="ONE_MINUS_DESTINATION_COLOR",t[t.ONE_MINUS_SOURCE_ALPHA=5]="ONE_MINUS_SOURCE_ALPHA",t[t.ONE_MINUS_SOURCE_COLOR=6]="ONE_MINUS_SOURCE_COLOR",t[t.SOURCE_ALPHA=7]="SOURCE_ALPHA",t[t.SOURCE_COLOR=8]="SOURCE_COLOR",t[t.ZERO=9]="ZERO"}(Xt||(Xt={})),function(t){t[t.COLOR=1]="COLOR",t[t.DEPTH=2]="DEPTH",t[t.STENCIL=4]="STENCIL",t[t.ALL=7]="ALL"}(Yt||(Yt={})),function(t){t[t.ALWAYS=0]="ALWAYS",t[t.EQUAL=1]="EQUAL",t[t.GREATER=2]="GREATER",t[t.GREATER_EQUAL=3]="GREATER_EQUAL",t[t.LESS=4]="LESS",t[t.LESS_EQUAL=5]="LESS_EQUAL",t[t.NEVER=6]="NEVER",t[t.NOT_EQUAL=7]="NOT_EQUAL"}(qt||(qt={})),function(t){t[t.TRIANGLES=0]="TRIANGLES",t[t.LINES=1]="LINES"}(Kt||(Kt={})),function(t){t[t.MIPLINEAR=0]="MIPLINEAR",t[t.MIPNEAREST=1]="MIPNEAREST",t[t.MIPNONE=2]="MIPNONE"}(Wt||(Wt={})),function(t){t[t.BASELINE=0]="BASELINE",t[t.BASELINE_CONSTRAINED=1]="BASELINE_CONSTRAINED",t[t.BASELINE_EXTENDED=2]="BASELINE_EXTENDED"}(Jt||(Jt={})),function(t){t[t.FRAGMENT=0]="FRAGMENT",t[t.SAMPLER=1]="SAMPLER",t[t.VERTEX=2]="VERTEX"}($t||($t={})),function(t){t[t.DECREMENT_SATURATE=0]="DECREMENT_SATURATE",t[t.DECREMENT_WRAP=1]="DECREMENT_WRAP",t[t.INCREMENT_SATURATE=2]="INCREMENT_SATURATE",t[t.INCREMENT_WRAP=3]="INCREMENT_WRAP",t[t.INVERT=4]="INVERT",t[t.KEEP=5]="KEEP",t[t.SET=6]="SET",t[t.ZERO=7]="ZERO"}(Zt||(Zt={})),function(t){t[t.LINEAR=0]="LINEAR",t[t.NEAREST=1]="NEAREST"}(te||(te={})),function(t){t[t.BGRA=0]="BGRA",t[t.BGRA_PACKED=1]="BGRA_PACKED",t[t.BGR_PACKED=2]="BGR_PACKED",t[t.COMPRESSED=3]="COMPRESSED",t[t.COMPRESSED_ALPHA=4]="COMPRESSED_ALPHA"}(ee||(ee={})),function(t){t[t.BACK=0]="BACK",t[t.FRONT=1]="FRONT",t[t.FRONT_AND_BACK=2]="FRONT_AND_BACK",t[t.NONE=3]="NONE"}(ne||(ne={})),function(t){t[t.FLOAT_1=0]="FLOAT_1",t[t.FLOAT_2=1]="FLOAT_2",t[t.FLOAT_3=2]="FLOAT_3",t[t.FLOAT_4=3]="FLOAT_4",t[t.BYTE_1=4]="BYTE_1",t[t.BYTE_2=5]="BYTE_2",t[t.BYTE_3=6]="BYTE_3",t[t.BYTE_4=7]="BYTE_4",t[t.UNSIGNED_BYTE_1=8]="UNSIGNED_BYTE_1",t[t.UNSIGNED_BYTE_2=9]="UNSIGNED_BYTE_2",t[t.UNSIGNED_BYTE_3=10]="UNSIGNED_BYTE_3",t[t.UNSIGNED_BYTE_4=11]="UNSIGNED_BYTE_4",t[t.SHORT_1=12]="SHORT_1",t[t.SHORT_2=13]="SHORT_2",t[t.SHORT_3=14]="SHORT_3",t[t.SHORT_4=15]="SHORT_4",t[t.UNSIGNED_SHORT_1=16]="UNSIGNED_SHORT_1",t[t.UNSIGNED_SHORT_2=17]="UNSIGNED_SHORT_2",t[t.UNSIGNED_SHORT_3=18]="UNSIGNED_SHORT_3",t[t.UNSIGNED_SHORT_4=19]="UNSIGNED_SHORT_4"}(re||(re={})),function(t){t[t.CLAMP=0]="CLAMP",t[t.REPEAT=1]="REPEAT"}(ie||(ie={})),function(t){t[t.AUTO=0]="AUTO",t[t.WEBGL=1]="WEBGL",t[t.FLASH=2]="FLASH",t[t.GLES=3]="GLES",t[t.NATIVE=4]="NATIVE",t[t.SOFTWARE=5]="SOFTWARE"}(oe||(oe={}));var De=function(){function t(t,e){void 0===t&&(t=-1),void 0===e&&(e=null),this.id=t,this.type=e,this.wrap=0,this.filter=0,this.mipfilter=0,this.boundedTexture=null,this._dirty=!0}return Object.defineProperty(t.prototype,"valid",{get:function(){return null!==this.type&&this.id>=0},enumerable:!1,configurable:!0}),t.prototype.set=function(t,e,n){return this._dirty=this._dirty||t!=t||e!=e||n!=n,this.wrap=t,this.filter=e,this.mipfilter=n,this},t.prototype.equals=function(t){return this.type===t.type&&this.wrap===t.wrap&&this.filter===t.filter&&this.mipfilter===t.mipfilter},t.prototype.copyFrom=function(t){return this.type=t.type,this.wrap=t.wrap,this.filter=t.filter,this.mipfilter=t.mipfilter,this},t.prototype.dispose=function(){this.id=-1,this.type=null,this.wrap=0,this.filter=0,this.mipfilter=0},t}(),Te=function(){return function(t,e,n){this.x=t,this.y=e,this.id=n}}(),Pe=function(t){function e(e,n){var r=t.call(this,e)||this;return r._image=n,r}return n(e,t),Object.defineProperty(e.prototype,"image",{get:function(){return this._image},enumerable:!1,configurable:!0}),e.INVALIDATE_MIPMAPS="invalidateMipmaps",e}(u),Be=function(t){function e(e,n){var r=t.call(this,e)||this;return r._stage=n,r}return n(e,t),Object.defineProperty(e.prototype,"stage",{get:function(){return this._stage},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._stage)},e.STAGE_ERROR="stageError",e.CONTEXT_CREATED="contextCreated",e.CONTEXT_DISPOSED="contextDisposed",e.CONTEXT_RECREATED="contextRecreated",e.INVALIDATE_SIZE="invalidateSize",e}(u),Oe=function(t){function e(e,n){var r=t.call(this,e)||this;return r._rttManager=n,r}return n(e,t),Object.defineProperty(e.prototype,"rttManager",{get:function(){return this._rttManager},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._rttManager)},e.RESIZE="rttManagerResize",e}(u),Me=function(t){function e(e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=t.call(this)||this;return i._repeat=e,i._smooth=n,i._mipmap=r,i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeat",{get:function(){return this._repeat},set:function(t){this._repeat!=t&&(this._repeat=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"smooth",{get:function(){return this._smooth},set:function(t){this._smooth!=t&&(this._smooth=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(t){this._mipmap!=t&&(this._mipmap=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageRect",{get:function(){return this._imageRect},set:function(t){this._imageRect!=t&&(this._imageRect=t,this._updateRect())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameRect",{get:function(){return this._frameRect},set:function(t){this._frameRect!=t&&(this._frameRect=t,this._updateRect())},enumerable:!1,configurable:!0}),e.prototype._updateRect=function(){},e.assetType="[asset Sampler]",e}(d),Le=function(){function t(){}return t.getImageBuffer=function(t){var e=this.CANVAS||(this.CANVAS=document.createElement("canvas")),n=e.getContext("2d");return t instanceof HTMLImageElement?(e.width=t.naturalWidth,e.height=t.naturalHeight):(e.width=t.width,e.height=t.height),n.drawImage(t,0,0),n.getImageData(0,0,e.width,e.height).data},t.imageToBitmapImage2D=function(e,n,r){var i,o;void 0===n&&(n=!0),void 0===r&&(r=null),r||(r=new this._defaultFactoryCtor),e instanceof HTMLImageElement?(i=e.naturalWidth,o=e.naturalHeight):(i=e.width,o=e.height);var a=r.createImage2D(i,o,!0,null,n);return a.addLazySymbol({needParse:!0,definition:{width:i,height:o,isPMA:!0,data:null},lazyParser:function(){return this.needParse=!1,this.definition.data=t.getImageBuffer(e),this.lazyParser=null,this}}),a},t.isImage2DValid=function(t){return null==t||this.isDimensionValid(t.width,t.powerOfTwo)&&this.isDimensionValid(t.height,t.powerOfTwo)},t.isHTMLImageElementValid=function(t){return null==t||this.isDimensionValid(t.width)&&this.isDimensionValid(t.height)},t.isDimensionValid=function(t,e){return void 0===e&&(e=!0),t>=1&&t<=this.MAX_SIZE&&(!e||this.isPowerOfTwo(t))},t.isPowerOfTwo=function(t){return!!t&&(t&-t)==t},t.getBestPowerOf2=function(t){for(var e=1;ethis.MAX_SIZE&&(e=this.MAX_SIZE),e},t.getDefaultImage2D=function(){return this._defaultBitmapImage2D||this.createDefaultImage2D(),this._defaultBitmapImage2D},t.getDefaultImageCube=function(){return this._defaultBitmapImageCube||this.createDefaultImageCube(),this._defaultBitmapImageCube},t.getDefaultSampler=function(){return this._defaultSampler||this.createDefaultSampler(),this._defaultSampler},t.createDefaultImageCube=function(){this._defaultBitmapImage2D||this.createDefaultImage2D();for(var t=new this._defaultBitmapCubeCtor(this._defaultBitmapImage2D.width),e=0;e<6;e++)t.drawBitmap(e,this._defaultBitmapImage2D.data,0,0,this._defaultBitmapImage2D.width,this._defaultBitmapImage2D.height);this._defaultBitmapImageCube=t},t.createDefaultSampler=function(){this._defaultSampler=new Me},t.createDefaultImage2D=function(){var t,e,n=new this._defaultBitmap2DCtor(8,8,!1,0);for(t=0;t<8;t++)for(e=0;e<8;e++)1&e^1&t&&n.setPixel(t,e,16777215);return n},t.registerDefaults=function(t,e,n){this._defaultBitmap2DCtor=t,this._defaultBitmapCubeCtor=e,this._defaultFactoryCtor=n},t.MAX_SIZE=8192,t}(),Ne=function(t){function e(){var e=t.call(this)||this;return e._pFormat="bgra",e}return n(e,t),Object.defineProperty(e.prototype,"format",{get:function(){return this._pFormat},enumerable:!1,configurable:!0}),e.prototype.invalidateMipmaps=function(){this.dispatchEvent(new Pe(Pe.INVALIDATE_MIPMAPS,this))},e}(d),Re=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.usages=0,r._invalidMipmaps=!0,r._invalidMapper=!0,r._stage=n,r._onInvalidateMipmapsDelegate=function(t){return r._onInvalidateMipmaps(t)},r._asset.addEventListener(Pe.INVALIDATE_MIPMAPS,r._onInvalidateMipmapsDelegate),r}return n(e,t),e.prototype.getTexture=function(){return this._texture||(this._createTexture(),this._invalid=!0),this._texture},e.prototype.getType=function(){throw new s},e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._texture&&(this._texture.dispose(),this._texture=null)},e.prototype.activate=function(t,e){void 0===e&&(e=null),e||(e=Le.getDefaultSampler());var n=!(!e.mipmap||this._stage.globalDisableMipmap)&&e.mipmap;this._stage.setSamplerAt(t,e),this._stage.context.setTextureAt(t,this.getTexture()),!this._mipmap&&n&&(this._mipmap=!0,this._invalidMipmaps=!0),this._invalidMipmaps&&(this._invalidMipmaps=!1,n&&this._texture.generateMipmaps())},e.prototype._createTexture=function(){throw new s},e.prototype._onInvalidateMipmaps=function(t){this._invalidMipmaps=!0},e}(K),Fe=function(t){function e(e,n,r){void 0===r&&(r=!0);var i=t.call(this)||this;return i._powerOfTwo=!0,i._isDisposed=!1,i._rect=new q(0,0,Math.round(e),Math.round(n)),i._powerOfTwo=r,i._testDimensions(),i}return n(e,t),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._rect.height},set:function(t){this._setSize(this._rect.width,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alphaChannel",{get:function(){return this._alphaChannel},set:function(t){this._alphaChannel=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rect",{get:function(){return this._rect},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._rect.width},set:function(t){this._setSize(t,this._rect.height)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed=!0,this.clear()},e.prototype._setSize=function(t,e){t=Math.round(t),e=Math.round(e),this._rect.width==t&&this._rect.height==e||(this.clear(),this._rect.width=t,this._rect.height=e,this._testDimensions())},e.prototype._testDimensions=function(){if(this._powerOfTwo&&(!Le.isDimensionValid(this._rect.width)||!Le.isDimensionValid(this._rect.height)))throw new Error("Invalid dimension: Width and height must be power of 2 and cannot exceed 2048")},Object.defineProperty(e.prototype,"powerOfTwo",{get:function(){return this._powerOfTwo},set:function(t){this._powerOfTwo!=t&&(this._powerOfTwo=t,this._testDimensions())},enumerable:!1,configurable:!0}),e.assetType="[image Image2D]",e}(Ne),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getType=function(){return"2d"},e.prototype._createTexture=function(){this._texture=this._stage.context.createTexture(this._asset.width,this._asset.height,ee.BGRA,!0)},e}(Re);function Ue(t,e){return t.priority-e.priority}var je=function(){function t(){}return t.createManager=function(t){t=Object.assign({name:Ve.name+":"+this.managers.length},t||{});var e=new Ve(t);return this.managers.push(e),this.managers.sort(Ue),e},t.executeAll=function(){for(var t=0,e=this.managers;t=t.MIN_QUANT)&&(e+=t.MIN_QUANT),this._lastCorrectedTime=e},enumerable:!1,configurable:!0}),t.prototype.addTask=function(t){return!(!t||this._tasks.has(t))&&(this._tasks.add(t),!0)},t.prototype.removeTask=function(t){return this._tasks.delete(t)},t.prototype.execute=function(t){if(void 0===t&&(t=!1),this._tasks.size){var e=this.correctedTime;if(!t){if(!this._lastExecutionTime)return void(this._lastExecutionTime=e);if(e-this._lastExecutionTime(a.keepAliveTime||this.keepAliveTime)&&(a.unload(),n[n.length]=a,n.length>=this.maxUnloadTask)){this._lastExecutionTime-=this.exectuionTimeout-this.unloadTaskShift;break}}for(var s=0,u=n;sQe-1&&(t=Qe-1),this.seed=t}return t.prototype.next=function(){var t=this.seed%Ge*16807-2836*(this.seed/Ge|0);return t<=0&&(t+=Qe),t},t}();function qe(t){return t*t*(3-2*t)}function Ke(t,e,n){return e+t*(n-e)}var We=function(){function t(t,e){this.gradient=t,this.lattice_selector=e}return t.prototype.noise2=function(t,e,n){var r=e[0]+Xe,i=0|r,o=i+1,a=r-(0|r),s=a-1,u=e[1]+Xe,l=0|u,c=l+1,h=u-(0|u),p=h-1;n&&(i>=n.wrap_x&&(i-=n.width),o>=n.wrap_x&&(o-=n.width),l>=n.wrap_y&&(l-=n.height),c>=n.wrap_y&&(c-=n.height)),i&=He,o&=He,l&=He,c&=He;var d=this.lattice_selector[i],f=this.lattice_selector[o],g=this.lattice_selector[d+l],_=this.lattice_selector[f+l],m=this.lattice_selector[d+c],y=this.lattice_selector[f+c],A=qe(a),v=qe(h),b=this.gradient[t][g],C=a*b[0]+h*b[1],I=this.gradient[t][_],E=Ke(A,C,s*I[0]+h*I[1]),x=this.gradient[t][m],w=a*x[0]+p*x[1],S=this.gradient[t][y],D=Ke(A,w,s*S[0]+p*S[1]);return Ke(v,E,D)},t.prototype.turbulence=function(t,e,n,r,i,o,a,s,u){void 0===u&&(u=null);var l=null;if(o){if(0!==n[0]){var c=Math.floor(s[0]*n[0])/s[0],h=Math.ceil(s[0]*n[0])/s[0];n[0]/c=0;s--){a=r[s];e=o.next(),o.seed=e;u=e%ze;r[s]=r[u],r[u]=a}for(s=0;s<258;s++){r[ze+s]=r[s];for(a=0;a<4;a++)for(u=0;u<2;u++)i[a][ze+s][u]=i[a][s][u]}return new t(i,r)},t}(),Je=function(){function t(){}return t.drawBitmap=function(e,n,r,i,o,a,s,u,l,c,h){if(void 0===h&&(h=null),h||l!=i||c!=o){h||(h=new P).scale(l/i,c/o);var p=Math.sqrt(h.a*h.a+h.b*h.b),d=Math.sqrt(h.c*h.c+h.d*h.d),f=i*p,g=o*d;if(h.tx+=s,h.ty+=u,s=Math.floor(h.tx),u=Math.floor(h.ty),h.invert(),p>=1||d>=1)for(var _=new T,m=s;m=e||i>=n||i<0)){var a=4*(r+i*e);t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=o[3],t[a]=255&t[a],t[a+1]=255&t[a+1],t[a+2]=255&t[a+2],t[a+3]=255&t[a+3]}},t.sampleBilinear=function(e,n,r,i,o,a,s){void 0===a&&(a=1),void 0===s&&(s=1);var u=t.sample(e,n,r,i,o),l=t.sample(e+a,n,r,i,o),c=t.sample(e,n+s,r,i,o),h=t.sample(e+a,n+s,r,i,o),p=e;p-=Math.floor(p);var d=t.interpolateColor(u,l,p),f=t.interpolateColor(c,h,p),g=n;return g-=Math.floor(g),t.interpolateColor(d,f,g)},t.sample=function(t,e,n,r,i){t=Math.floor(t),e=Math.floor(e);var o=[0,0,0,0];if(t<0||t>=r||e<0||e>=i)return o;var a=4*(t+e*r);return o[0]=n[a],o[1]=n[a+1],o[2]=n[a+2],o[3]=n[a+3],o},t.sampleBox=function(e,n,r,i,o,a,s){var u,l,c,h,p=0,d=[0,0,0,0],f=Math.floor(n),g=Math.ceil(i);for(f=Math.max(Math.min(f,s-1),0),g=Math.max(Math.min(g,s-1),0),l=f;li&&(h*=1-(l-i));var _=Math.floor(e),m=Math.ceil(r);for(_=Math.max(Math.min(_,a-1),0),m=Math.max(Math.min(m,a-1),0),u=_;ur&&(c*=1-(u-r)),d[0]+=y[0]*c,d[1]+=y[1]*c,d[2]+=y[2]*c,d[3]+=y[3]*c,p+=c}}return d[0]/=p,d[1]/=p,d[2]/=p,d[3]/=p,d[0]=255&d[0],d[1]=255&d[1],d[2]=255&d[2],d[3]=255&d[3],d},t.interpolateColor=function(t,e,n){var r=[];return r[0]=t[0]+(e[0]-t[0])*n,r[1]=t[1]+(e[1]-t[1])*n,r[2]=t[2]+(e[2]-t[2])*n,r[3]=t[3]+(e[3]-t[3])*n,r},t}(),$e="WeakRef"in window,Ze=!1;function tn(t,e){return void 0===e&&(e=!0),((e?4278190080&t:4278190080)|(255&t)<<16|65280&t|(16711680&t)>>16&255)>>>0}var en=function(t){function e(n,r,i,o,a,s){void 0===i&&(i=!0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=null);var u=t.call(this,n,r,a)||this;return u._isSymbolSource=!1,u._isWeakRef=!1,u._unpackPMA=!0,u._locked=!1,u._floodStack=[],u._nestedBitmap=[],u.wasUpload=!1,u._needUpload=!1,u.isUnloaded=!1,u.lastUsedTime=0,s&&e.getManager(s),u._transparent=i,u._stage=s,null!=o&&u.fillRect(u._rect,o),u}return n(e,t),e.getManager=function(t){if(!t)return null;if(this._unloadManager)return this._unloadManager;var e=t.context.hasFence;return this._unloadManager=je.createManager({name:"BitmapImage2D"+(e?"async":""),priority:0,maxUnloadTasks:e?we.MAX_BITMAP_UNLOAD_TASKS_ASYNC:we.MAX_BITMAP_UNLOAD_TASKS,exectionPeriod:100}),this._unloadManager},e.prototype.getDataInternal=function(t,e){if(void 0===t&&(t=!0),this.applySymbol(),this._data||!t&&!this._alphaChannel||(this._data=new Uint8ClampedArray(this.width*this.height*4)),this._alphaChannel){for(var n=this._alphaChannel,r=this._data,i=0;i-1&&!!this._nestedBitmap.splice(e,1)},e.prototype.dropAllReferences=function(t){if(void 0===t&&(t=!0),this._nestedBitmap.length){for(var e=0,n=this._nestedBitmap;e>>0)===e&&n||p!==e&&!n)&&(l=!0,o=hs?h:s,a=cu?c:u)}return l?new q(o,a,s-o+1,u-a+1):new q(0,0,0,0)},e.prototype.hitTest=function(t,e,n,r,i){if(n instanceof T)return(this.getPixel32(n.x-t.x,n.y-t.y)>>24&255)>=e;if(n instanceof q){if((n=n.clone()).x-=t.x,n.y-=t.y,!this._rect.intersects(n))return!1;for(var o=n.y;o>24&255)>=e)return!0}}else null!==n&&console.warn("[BitmapImage2D] HitTest not implemented for:",n.assetType);return!1},e.prototype.floodFill=function(t,e,n){this.dropAllReferences();var r=t,i=e;t|=0,e|=0;var o=new Uint32Array(this.getDataInternal(!0).buffer),a=this._rect.width,s=this._rect.height,u=this._floodStack;u.length=a*s*2;var l=o[t+e*a],c=x.float32ColorToARGB(n),h=c[0],p=c[1],d=c[2],f=c[3],g=((h=this._transparent?h:255)<<24|(f=f*h/255|0)<<16|(d=d*h/255|0)<<8|(p=p*h/255|0))>>>0;if(g!==l){var _,m,y=0,A=0;for(u[A++]=t,u[A++]=e;A>0;){if(A/2>o.length)throw"[BitmapImage2D] FloodFill bug, to many interation: "+r+":"+i;for(e=u[--A],y=t=u[--A];y>=0&&o[e*a+y]===l;)y--;for(y++,_=m=!1;y0&&o[(e-1)*a+y]===l?(u[A++]=y,u[A++]=e-1,_=!0):_&&e>0&&o[(e-1)*a+y]!==l&&(_=!1),!m&&e>>0,this._unpackPMA=!1}else s=tn(16777215&e,!1);if(0==n&&0==r&&i==this._rect.width&&o==this._rect.height)a.fill(s);else{var d=void 0,f=void 0;for(d=0;d>>0:0},e.prototype.getPixels=function(t){if(t.equals(this._rect))return this.getDataInternal(!0,!1);for(var e,n=this.getDataInternal(!0,!1),r=new Uint8ClampedArray(t.width*t.height*4),i=0|t.x,o=0|t.y,a=0|t.width,s=0|t.height,u=0;u0){for(var a=0;a=0&&(this._toStr+=this._index),r>-1&&(this._toStr+="."+t.COMPONENTS[r])}return t.prototype.toString=function(){return this._toStr},Object.defineProperty(t.prototype,"regName",{get:function(){return this._regName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),t.COMPONENTS=["x","y","z","w"],t}(),fn=function(){function t(t,e,n){void 0===n&&(n=!0),this._regName=t,this._regCount=e,this._persistent=n,this.initRegisters(t,e)}return t.prototype.requestFreeVectorReg=function(){for(var t=0;t0))for(var e=0;e<4;++e)if(0==this._usedSingleCount[e][t])return this._persistent&&this._usedSingleCount[e][t]++,this._registerComponents[e][t];throw new Error("Register overflow!")},t.prototype.addUsage=function(t,e){t._component>-1?this._usedSingleCount[t._component][t.index]+=e:this._usedVectorCount[t.index]+=e},t.prototype.removeUsage=function(t){if(t._component>-1){if(--this._usedSingleCount[t._component][t.index]<0)throw new Error("More usages removed than exist!")}else if(--this._usedVectorCount[t.index]<0)throw new Error("More usages removed than exist!")},t.prototype.dispose=function(){this._vectorRegisters=null,this._registerComponents=null,this._usedSingleCount=null,this._usedVectorCount=null},t.prototype.hasRegisteredRegs=function(){for(var t=0;t0)return!0;for(var e=0;e<4;++e)if(this._usedSingleCount[e][t]>0)return!0;return!1},t.prototype._initArray=function(t,e){for(var n=t.length,r=0;r0?this._stepSize:this._amount>e.MAX_AUTO_SAMPLES?this._amount/e.MAX_AUTO_SAMPLES:1},e.MAX_AUTO_SAMPLES=15,e}(mn),An=function(){function t(){this._tasks=[],this._temp=[],this.imageScale=1}return Object.defineProperty(t.prototype,"isValid",{get:function(){for(var t=0,e=this._tasks;t>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(t>>0&255)/255,n[3]=e,n},t.colorToU8=function(t,e,n,r){return void 0===r&&(r=0),n[0+r]=t>>16&255,n[1+r]=t>>8&255,n[2+r]=t>>0&255,n[3+r]=255*e|0,n},t.nonAlocUnion=function(t,e,n){var r=t._rawData,i=e._rawData,o=n._rawData;return o.set(r),i[0]-1&&(this._store.splice(e,1),!0)},t.prototype.clear=function(){this._manager&&this._manager.clear()},t.GLOBAL_POOL_ID=0,t}(),jn=function(){function t(t,e){this._context=t,this.canUnload=!0,this._lastMemoryUsage=0,this._gl=t._gl,this._buffer=this._gl.createBuffer(),this._numIndices=e,t.stats.counter.index++}return Object.defineProperty(t,"pool",{get:function(){return this._pool||(this._pool=new Un(t))},enumerable:!1,configurable:!0}),t.create=function(t,e){return this.pool.create(t,e)},t.prototype.uploadFromArray=function(t,e,n){void 0===e&&(e=0),this.uploadFromByteArray(t.buffer,e,n)},t.prototype.uploadFromByteArray=function(t,e,n){void 0===e&&(e=0),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,this._buffer),this._context.stats.memory.index-=this._lastMemoryUsage,this._lastMemoryUsage=t.byteLength-2*e,this._context.stats.memory.index+=this._lastMemoryUsage,e?this._gl.bufferSubData(this._gl.ELEMENT_ARRAY_BUFFER,2*e,t):this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,t,this._gl.STATIC_DRAW)},t.prototype.dispose=function(){t.pool.store(this)||this.unload()},t.prototype.apply=function(t,e){this._numIndices=e},t.prototype.unload=function(){t.pool.remove(this),this._gl.deleteBuffer(this._buffer),this._buffer=null,this._context.stats.counter.index--,this._context.stats.memory.index-=this._lastMemoryUsage},Object.defineProperty(t.prototype,"numIndices",{get:function(){return this._numIndices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glBuffer",{get:function(){return this._buffer},enumerable:!1,configurable:!0}),t}(),Vn={35664:{size:2,method:"uniform2fv"},35665:{size:3,method:"uniform3fv"},35666:{size:4,method:"uniform4fv"},35674:{size:4,method:"uniformMatrix2fv"},35675:{size:9,method:"uniformMatrix3fv"},35676:{size:16,method:"uniformMatrix4fv"},35678:{size:1,method:"uniform1i"},5126:{size:1,method:"uniform1f"}},Qn=/(#define|#version|precision).*\n/gi,Gn=function(){function t(e){this._context=e,this._id=t.ProgramID++,this._uniformCache=new Array(16),this._focusId=0,this._gl=e._gl}return Object.defineProperty(t.prototype,"focusId",{get:function(){return this._focusId},enumerable:!1,configurable:!0}),t.prototype.upload=function(e,n){var r=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT).precision,i=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT).precision,o=t._aglslParser.parse(t._tokenizer.decribeAGALPart(e),r?"highp":"mediump",2===this._context.glVersion),a=t._aglslParser.parse(t._tokenizer.decribeAGALPart(n),i?"highp":"mediump",2===this._context.glVersion);this.name||(this.name="PROG_AGAL_"+this._id),this.uploadRaw(o,a)},t.prototype.uploadRaw=function(e,n){this.name||(this.name="PROG_GLSL_"+this._id);var r=e+n;if(r in t.programCache)return this._program=t.programCache[r],void this._program.usage++;e=this.insertName(e),n=this.insertName(n);var i=this._gl.createShader(this._gl.VERTEX_SHADER),o=this._gl.createShader(this._gl.FRAGMENT_SHADER),a=this._gl.createProgram();if(this._context.stats.counter.program++,this._gl.shaderSource(i,e),this._gl.compileShader(i),!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS))throw new Error(this._gl.getShaderInfoLog(i));if(this._gl.shaderSource(o,n),this._gl.compileShader(o),!this._gl.getShaderParameter(o,this._gl.COMPILE_STATUS))throw new Error(this._gl.getShaderInfoLog(o));if(this._gl.attachShader(a,i),this._gl.attachShader(a,o),this._gl.linkProgram(a),!this._gl.getProgramParameter(a,this._gl.LINK_STATUS))throw new Error(this._gl.getProgramInfoLog(a));this._gl.deleteShader(i),this._gl.deleteShader(o),this._program={program:a,uniforms:{},attributes:{},usage:1},t.programCache[r]=this._program,this.reset(),this.grabLocationData(e,n)},t.prototype.grabLocationData=function(t,e){for(var n=this._program.uniforms,r=this._program.attributes,i=this._gl,o=this._program.program,a=i.getProgramParameter(o,i.ACTIVE_UNIFORMS),s=i.getProgramParameter(o,i.ACTIVE_ATTRIBUTES),u=0;u=0;){var f=e.indexOf(";",p+2),g=(_=e.substring(p,f).split(" "))[_.length-1];n["fs"+d]||(n["fs"+d]=n[g]),p=e.indexOf("uniform sampler",f),d++}for(p=t.indexOf("attribute",0),d=0;p>=0;){f=t.indexOf(";",p+2);var _,m=(_=t.substring(p,f).split(" "))[_.length-1];r["va"+d]||(r["va"+d]=r[m]),p=t.indexOf("attribute",f),d++}},t.prototype.insertName=function(t){var e=t.match(Qn)||[],n=e[e.length-1],r=n?t.lastIndexOf(n)+n.length:0;return t.substr(0,r)+"\n#define SHADER_NAME "+this.name+"\n\n"+t.substr(r)},t.prototype.reset=function(){this._uniformCache.fill("")},t.prototype.getUniformLocation=function(e,n){void 0===n&&(n=-1);var r="number"==typeof n?t._getAGALUniformName(e,n):n,i=this._program.uniforms[r];return i?i.location:null},t.prototype.getAttribLocation=function(t){var e=this._program.attributes["va"+t];return e?e.location:-1},t._getAGALUniformName=function(t,e){return void 0===e&&(e=-1),-1===e?this._uniformLocationNameDictionary[t]:this._uniformLocationNameDictionary[t]+e},t.prototype._needCache=function(t,e){var n=this._uniformCache[t],r=e instanceof Float32Array?new Uint32Array(e.buffer).join(""):""+e;return n&&r===n?void 0:r},t.prototype.uploadUniform=function(t,e){var n=this._program.uniforms[t];if(!n)return!1;if(!Vn[n.type])throw"[ProgramWebGL] Unsupported uniform type:"+n.type;var r=Vn[n.type],i=r.size,o=r.method;if(1===i)return"number"==typeof e||1===n.size?this._gl[o](n.location,"number"==typeof e?e:e[0]):this._gl[o+"v"](n.location,e),!0;var a=e;if(a.length!==n.size*i)throw"[ProgramWebGL] Invalid data length for "+t+", expected "+n.size*i+", actual "+a.length;n.type===this._gl.FLOAT_MAT2||n.type===this._gl.FLOAT_MAT3||n.type===this._gl.FLOAT_MAT4?this._gl[o](n.location,!1,a):this._gl[o](n.location,a)},t.prototype.uniform1i=function(t,e,n){var r=this.getUniformLocation(t,e);r&&this._gl.uniform1i(r,n)},t.prototype.uniform4fv=function(t,e){var n=this.getUniformLocation(t);n&&this._gl.uniform4fv(n,e)},t.prototype.dispose=function(){this.reset()},t.prototype.focusProgram=function(){this._focusId++,this._uniformCache.fill(""),this._gl.useProgram(this._program.program)},Object.defineProperty(t.prototype,"glProgram",{get:function(){return this._program},enumerable:!1,configurable:!0}),t.programCache={},t.ProgramID=0,t._tokenizer=new xe,t._aglslParser=new Se,t._uniformLocationNameDictionary=["fc","fs","vc"],t}(),zn=function(t){function e(e,n,r){var i=t.call(this,e)||this;if(i.textureType="texture2d",i._isFilled=!1,i._isPMA=!1,i._isRT=!1,i._isMipmaped=!1,i.lastUsedTime=0,!n||!r)throw new Error("Incorrected size of texture { width: "+n+", height: "+r+"}");return i._width=n,i._height=r,i._glTexture=i._gl.createTexture(),i._context.stats.counter.texture++,i._context.stats.memory.texture+=n*r*8,i}return n(e,t),e.store=function(t){var n=t._width<<16|t._height,r=e._pool[n]||(e._pool[n]=[]);return r.indexOf(t)>-1?(t.lastUsedTime=this.unloadManager.correctedTime,!0):!(r.length>=this.SIZE_POOL_LIMIT)&&(r.push(t),t.lastUsedTime=this.unloadManager.correctedTime,this.unloadManager.addTask(t),!0)},e.remove=function(t){var n=t._width<<16|t._height,r=e._pool[n];if(!r||!r.length)return!1;var i=r.indexOf(t);return i>-1&&!!r.splice(i,1)},e.create=function(t,n,r){var i,o=n<<16|0|r,a=null===(i=e._pool[o])||void 0===i?void 0:i.pop();return a?(this.unloadManager.removeTask(a),a):new e(t,n,r)},Object.defineProperty(e.prototype,"canUnload",{get:function(){return this._glTexture&&!this._isRT},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPOT",{get:function(){return!(this._width&this._width-1||this._height&this._height-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.unload()},e.prototype.unload=function(){e.remove(this),this._context.stats.counter.texture--,this._context.stats.memory.texture-=this.width*this.height*8,this._context._texContext.disposeTexture(this),this._glTexture=null,this._state.dispose()},e.prototype.uploadFromArray=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1),this._context._texContext.uploadFromArray(this,t,e,n),this._isFilled=!0,this._isPMA=n},e.prototype.uploadFromURL=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1),this._context._texContext.uploadFromArray(this,null,e,n),this._isFilled=!0,this._isPMA=n},e.prototype.uploadCompressedTextureFromArray=function(t,e,n){},e.prototype.generateMipmaps=function(){if(this.isPOT||2===this._context.glVersion){var t=this._context._texContext.bindTexture(this,!0);this._gl.generateMipmap(this._gl.TEXTURE_2D),this._context._texContext.bindTexture(t,!0),this._isMipmaped=!0}},e.SIZE_POOL_LIMIT=10,e.unloadManager=je.createManager({keepAliveTime:2e4,name:"TextureWebGL",priority:1e3}),e._pool={},e}(Fn),Hn=function(){function t(t,e,n){this._context=t,this._lastMemoryUsage=0,this.instanced=!1,this.dynamic=!1,this.canUnload=!0,this._gl=t._gl,this._buffer=this._gl.createBuffer(),this._numVertices=e,this._dataPerVertex=n,t.stats.counter.vertex++}return Object.defineProperty(t,"pool",{get:function(){return this._pool||(this._pool=new Un(t))},enumerable:!1,configurable:!0}),t.create=function(t,e,n){return this.pool.create(t,e,n)},t.prototype.initAsDynamic=function(t){void 0===t&&(t=this._numVertices),0!==t&&(this._numVertices=t,this.dynamic=!0,this._context.stats.memory.vertex-=this._lastMemoryUsage,this._lastMemoryUsage=t*this._dataPerVertex,this._context.stats.memory.vertex+=this._lastMemoryUsage,this._gl.bindBuffer(this._gl.ARRAY_BUFFER,this._buffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,t*this._dataPerVertex,this._gl.DYNAMIC_DRAW))},t.prototype.uploadFromArray=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this._numVertices),this.uploadFromByteArray(t,e,n)},t.prototype.uploadFromByteArray=function(t,e,n){var r=this._gl;r.bindBuffer(r.ARRAY_BUFFER,this._buffer),(e||t.byteLength>>n,a=t._height>>>n;if(e&&e.length!==o*a*4)throw new Error("Array is not the correct length for texture dimensions: expected: "+o*a*4+", exist: "+e.length);e instanceof Array&&(e=new Uint8Array(e));var s=this.bindTexture(t,!0,i.TEXTURE_2D);i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),i.texImage2D(i.TEXTURE_2D,n,i.RGBA,o,a,0,i.RGBA,i.UNSIGNED_BYTE,e),this.bindTexture(s,!0,i.TEXTURE_2D)},t.prototype.setTextureAt=function(t,e){var n=this._context._gl,r=this._samplerStates[t],i=Kn[e.textureType];return(e||r.type)&&n.activeTexture(n.TEXTURE0+t),e?(e._state.id=t,this.bindTexture(e,!1,i),r.commit(i,e),t):(r.type&&(r.boundedTexture&&(r.boundedTexture._state.id=-1),this.bindTexture(null,!1,r.type),r.boundedTexture=null,r.type=null),-1)},t.prototype.setSamplerStateAt=function(t,e,n,r){if(!this._samplerStates[t])throw"Sampler is out of bounds.";this._samplerStates[t].set(Wn[e],Jn[n],$n[n][r])},t.prototype.unsafeCopyToTexture=function(t,e,n){var r=this._context._gl,i=this.bindTexture(t,!1);r.copyTexSubImage2D(r.TEXTURE_2D,0,n.x,n.y,e.x,e.y,e.width,e.height),this.bindTexture(i,!0)},t.prototype.setRenderToTexture=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),this._currentRT&&this._currentRT.present(),this.setFrameBuffer(t,e,n)},t.prototype.setRenderToBackBuffer=function(){this._currentRT&&this._currentRT.present(),this.bindRenderTarget(null,!0)},t.prototype.setFrameBuffer=function(t,e,n){var r=t.width,i=t.height;t._renderTarget||this.initFrameBuffer(t,n,e),this.bindRenderTarget(t._renderTarget,!0),e?(this._context.enableDepth(),this._context.enableStencil()):(this._context.disableDepth(),this._context.disableStencil()),this._context.setViewport(0,0,r,i)},t.prototype.initFrameBuffer=function(t,e,n){var r=t.width,i=t.height,o=new Yn(this._context,r,i,!n);if(o.linkTexture(t),e&&2===this._context.glVersion){var a=new qn(this._context,r,i,!n);a.linkTarget(o),o=a}t._renderTarget=o},t.prototype.presentFrameBufferTo=function(t,e,n,r){var i=this._context._gl,o=this._currentRT;e._renderTarget||this.initFrameBuffer(e,!1,!1);var a=e._renderTarget.drawBuffer;!t||!t.isMsaaTarget||i instanceof WebGLRenderingContext?(this.bindRenderTarget(t,!0),this.unsafeCopyToTexture(e,n,r)):a&&(i.bindFramebuffer(i.READ_FRAMEBUFFER,t.drawBuffer),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,a),i.blitFramebuffer(0|n.x,0|n.y,n.width+n.x|0,n.height+n.y|0,0|r.x,0|r.y,r.x+n.width|0,r.y+n.height|0,i.COLOR_BUFFER_BIT,i.LINEAR)),this.blitTextureToRenderbuffer(e),this.bindRenderTarget(o,!0)},t.prototype.blitTextureToRenderbuffer=function(t){var e=this._context._gl;if(t._renderTarget.isMsaaTarget&&e instanceof WebGL2RenderingContext){var n=t._width,r=t._height;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,t._renderTarget.readBuffer),e.bindFramebuffer(e.READ_FRAMEBUFFER,t._renderTarget.drawBuffer),e.blitFramebuffer(0,0,n,r,0,0,n,r,e.COLOR_BUFFER_BIT,e.LINEAR)}},t.prototype.disposeTexture=function(t){var e=this._context._gl;t===this._lastBoundedTexture&&(this._lastBoundedTexture=null),e.deleteTexture(t._glTexture),t._renderTarget&&t._renderTarget.dispose()},t.MAX_SAMPLERS=16,t}(),cr=function(){function t(e){this._context=e,this._isRequireUnbound=!1;var n=e._gl;if(!t.isSupported(n))throw"[VaoContextWebGL] VAO not supported!";if(window.WebGL2RenderingContext&&n instanceof window.WebGL2RenderingContext)this._createVertexArray=n.createVertexArray.bind(n),this._deleteVertexArray=n.deleteVertexArray.bind(n),this._bindVertexArray=n.bindVertexArray.bind(n);else{var r=n.getExtension("OES_vertex_array_object");this._createVertexArray=r.createVertexArrayOES.bind(r),this._deleteVertexArray=r.deleteVertexArrayOES.bind(r),this._bindVertexArray=r.bindVertexArrayOES.bind(r)}}return t.isSupported=function(t){return!!(window.WebGL2RenderingContext&&t instanceof window.WebGL2RenderingContext)||t.getSupportedExtensions().indexOf("OES_vertex_array_object")>-1},t.prototype.createVertexArray=function(){return this._context.stats.counter.vao++,this._createVertexArray()},t.prototype.unbindVertexArrays=function(){this._bindVertexArray(null),this._lastBoundedVao=null,this._isRequireUnbound=!1},t.prototype.bindVertexArray=function(t){this._context.stateChangeCallback&&this._context.stateChangeCallback("bindVertexArray"),t!==this._lastBoundedVao&&(t?(this._isRequireUnbound=!1,this._lastBoundedVao=t,this._bindVertexArray(t._vao)):this._isRequireUnbound=!0)},t.prototype.deleteVertexArray=function(t){this._lastBoundedVao===t&&this._bindVertexArray(null),this._deleteVertexArray(t._vao),this._lastBoundedVao=null,this._context.stats.counter.vao--},t}(),hr=function(){function t(t){this._context=t,this._vao=t._vaoContext.createVertexArray()}return t.prototype.attachIndexBuffer=function(t){this._indexBuffer||(this.bind(),this._context.bindIndexBuffer(t),this._indexBuffer=t)},t.prototype.bind=function(){this._context._vaoContext.bindVertexArray(this)},t.prototype.unbind=function(t){void 0===t&&(t=!1),t?this._context._vaoContext.unbindVertexArrays():this._context._vaoContext.bindVertexArray(null)},t.prototype.dispose=function(){this._context._vaoContext.deleteVertexArray(this),this._vao=null},t}(),pr=function(){function t(){for(var t=[],e=0;e0)&&(this._contex.stats.memory.pbo-=this._size,e>0&&(this._size=e),n.bufferData(n.PIXEL_PACK_BUFFER,this._size,n.DYNAMIC_READ),this._alreadyInit=!0,this._contex.stats.memory.pbo+=this._size),t._lastBounded=this},t.prototype.unbind=function(){t._lastBounded===this&&(this._gl.bindBuffer(this._gl.PIXEL_PACK_BUFFER,null),t._lastBounded=null)},t.prototype.dispose=function(){this.unbind(),this._gl.deleteBuffer(this._buffer),this._buffer=null,this._size=0,this._gl=null,this._contex.stats.counter.pbo--,this._contex.stats.memory.pbo+=this._size},t}(),fr=function(){function t(t){this._context=t,this.pool=[],this._tasks=[],this._gl=t._gl}return t.prototype.readPixels=function(t,e,n,r){var i=this,o=this.pool.pop()||new dr(this._context);o.bind(n*r*4);var a=this._gl;a.readPixels(t,e,n,r,a.RGBA,a.UNSIGNED_BYTE,0);var s=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);return a.isSync(s)?new Promise((function(t){i._tasks.push({task:t,pbo:o,fence:s})})):(console.warn("[FenceContextWebGL] Fence return invalid state, closig task immediate:",s),Promise.resolve(o))},t.prototype.tick=function(){if(0!==this._tasks.length){var t=this._gl,e=this._tasks;this._tasks=[];for(var n=0;n=0&&this._currentProgram.uniform1i($t.SAMPLER,t,n)},t.prototype.setSamplerStateAt=function(t,e,n,r){this.stateChangeCallback&&this.stateChangeCallback("setSamplerStateAt"),this._texContext.setSamplerStateAt(t,e,n,r),this.assertLost("setSamplerStateAt")},t.prototype.setVertexBufferAt=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=4),this.stateChangeCallback&&this.stateChangeCallback("setVertexBufferAt");var i=this._currentProgram?this._currentProgram.getAttribLocation(t):-1,o=this._gl;if(this.hasVao&&this._vaoContext._isRequireUnbound&&this._vaoContext.unbindVertexArrays(),e){(this._currentArrayBuffer!=e||this.hasVao&&this._vaoContext._lastBoundedVao)&&(this._currentArrayBuffer=e,o.bindBuffer(o.ARRAY_BUFFER,e?e.glBuffer:null));var a=ur[r];o.enableVertexAttribArray(i),o.vertexAttribPointer(i,a.size,a.type,a.normalized,e.dataPerVertex,n),this._instancedEnabled&&e.instanced&&(this._angleInstanced?this._angleInstanced.vertexAttribDivisorANGLE(i,1):o.vertexAttribDivisor(i,1)),this.assertLost("setVertexBufferAt")}else i>-1&&o.disableVertexAttribArray(t)},t.prototype.setRenderToTexture=function(t,e,n,r,i){void 0===e&&(e=!1),void 0===n&&(n=0),this.stateChangeCallback&&this.stateChangeCallback("setRenderToTexture"),this._texContext.setRenderToTexture(t,e,n>1),this.assertLost("setRenderToTexture")},t.prototype.setRenderToBackBuffer=function(){this.stateChangeCallback&&this.stateChangeCallback("setRenderToBackBuffer"),this._texContext.setRenderToBackBuffer(),this.assertLost("setRenderToBackBuffer")},t.prototype.copyToTexture=function(t,e,n){if(this.stateChangeCallback&&this.stateChangeCallback("setRenderToBackBuffer"),!this._texContext._currentRT)throw"[ContextWebGL] Try to copy from invalid frambuffer";this._texContext.presentFrameBufferTo(this._texContext._currentRT,t,e,n),this.assertLost("copyToTexture")},t.prototype.updateBlendStatus=function(){var t=this._blendState;if(t.dirty){var e=t.values,n=t.deltaDirty();t.lock(!0),e[0]||!n[0]?(n[0]&&this._gl.enable(this._gl.BLEND),(n[1]||n[0])&&this._gl.blendEquation(e[1]),(n[0]||n[2]||n[3]||-1!==e[4])&&(-1!==e[4]?this._gl.blendFuncSeparate(e[2],e[3],e[4],e[5]):this._gl.blendFunc(e[2],e[3]))):this._gl.disable(this._gl.BLEND)}},t.prototype.finish=function(){this._gl.flush(),this._gl.finish(),this._fenceContext&&this._fenceContext.tick(),this.assertLost("finish")},t.prototype.translateTriangleFace=function(t,e){switch(t){case ne.BACK:return e==gt.LEFT_HANDED?this._gl.FRONT:this._gl.BACK;case ne.FRONT:return e==gt.LEFT_HANDED?this._gl.BACK:this._gl.FRONT;case ne.FRONT_AND_BACK:return this._gl.FRONT_AND_BACK;default:throw"Unknown ContextGLTriangleFace type."}},t}(),vr=function(t){function e(){var e=t.call(this,256,256,!0)||this;return e._data=new Uint8Array(262144),e._gradMap={},e._count=0,e}return n(e,t),e.getAtlassForHash=function(t,n){var r;void 0===n&&(n=!0);for(var i=0,o=this.gradientAtlasses;i 0.) color.a /= a;\n\n\tfloat shadow = texture2D(uBlur, vUv[0] + uDir).a;\n\tfloat high = texture2D(uBlur, vUv[0] - uDir).a;\n\t"+(n&&"inner"!==n?"":"vec4 outColor = bevel(shadow, high) * color.a;")+"\n\t"+("outer"===n?"vec4 outColor = bevel(shadow, high) * (1.0 - color.a);":"")+"\n\t"+("full"===n?"vec4 outColor = bevel(shadow, high);":"")+"\n\t"+(e?"gl_FragColor = outColor;":"gl_FragColor = color * (1.0 - outColor.a) + outColor;")+"\n\n\t//gl_FragColor *= a;\n}"},e.prototype._regenColorMap=function(){if(this._gradInvalid&&"gradient"===this._renderMode){var t=vr.computeHash(this._colors,this._alphas,this._ratios);if(this._gradInvalid=!1,this._currentHash!==t){var e=this._currentAtlass=vr.getAtlassForHash(t,!0);e.hasGradient(t)?this._currentIndex=e.getGradient(t).index:this._currentIndex=e.setGradient(this._colors,this._alphas,this.ratios).index,this._currentHash=t,this._gradInvalid=!1}}},e.prototype.preActivate=function(t){"gradient"===this._renderMode&&this._regenColorMap()},e.prototype.activate=function(e,n,r){t.prototype.computeVertexData.call(this);var i=this._source,o=this._program3D,a=o.focusId!==this._focusId;if(o.uploadUniform("uTexMatrix",this._vertexConstantData),a||this._dirInvalid){var s=this.angle*Math.PI/180;o.uploadUniform("uDir",[Math.cos(s)*this.distance/i.width,Math.sin(s)*this.distance/i.height])}o.uploadUniform("uStrength",this.strength),o.uploadUniform("uTexMatrixSource",[0,0,this.inputRect.width/this.sourceImage.width,this.inputRect.height/this.sourceImage.height]),this.sourceImage.getAbstraction(e).activate(1),"gradient"===this._renderMode?(this._currentAtlass.getAbstraction(e).activate(2),o.uploadUniform("uGradIndex",this._currentIndex/this._currentAtlass.height)):(this._gradInvalid||a)&&(o.uploadUniform("uSColor",vn.colorToArray(this._shadowColor,this._shadowAlpha)),o.uploadUniform("uHColor",vn.colorToArray(this._highlightColor,this._highlightAlpha))),this._focusId=o.focusId,this._dirInvalid=!1},e}(mn),Ir=function(t){function e(e){var n=t.call(this,e)||this;return n._bevelTask=new Cr,n.distance=1,n.angle=45,n.highlightColor=16777215,n.highlightAlpha=1,n.shadowColor=1,n.shadowAlpha=0,n.alphas=[],n.colors=[],n.ratios=[],n.strength=1,n.type="inner",n.knockout=!1,n.addTask(n._bevelTask),n.applyProps(e),n}return n(e,t),e.prototype.applyProps=function(t){for(var e=0,n=this[Cn];e0){var i=this.angle*Math.PI/180;n.x+=Math.sin(i)*r*2,n.y+=Math.sin(i)*r*2}return e.x-=n.x,e.y-=n.y,e.width+=n.x,e.height+=n.y,e},e.prototype.setRenderState=function(e,n,r,i,o){t.prototype.setRenderState.call(this,e,n,r,i,o);var a=this._hBlurTask.target,s=o.popTemp(a.width,a.height);this._bevelTask.inputRect.copyFrom(this._vBlurTask.inputRect),this._bevelTask.destRect.copyFrom(i),this._vBlurTask.inputRect.setTo(0,0,0,0),this._vBlurTask.destRect.setTo(0,0,0,0),this._vBlurTask.target=s,this._bevelTask.source=s,this._bevelTask.sourceImage=e,this._bevelTask.target=n,this._temp.push(s)},e.filterName="bevel",r([In,bn("_bevelTask")],e.prototype,"distance",void 0),r([In,bn("_bevelTask")],e.prototype,"angle",void 0),r([In,bn("_bevelTask")],e.prototype,"highlightColor",void 0),r([In,bn("_bevelTask")],e.prototype,"highlightAlpha",void 0),r([In,bn("_bevelTask")],e.prototype,"shadowColor",void 0),r([In,bn("_bevelTask")],e.prototype,"shadowAlpha",void 0),r([In,bn("_bevelTask")],e.prototype,"alphas",void 0),r([In,bn("_bevelTask")],e.prototype,"colors",void 0),r([In,bn("_bevelTask")],e.prototype,"ratios",void 0),r([In,bn("_bevelTask")],e.prototype,"strength",void 0),r([In],e.prototype,"quality",void 0),r([In,bn("_bevelTask")],e.prototype,"type",void 0),r([In,bn("_bevelTask")],e.prototype,"knockout",void 0),e}(Ln),Er=new Float32Array([1,1,1,1,0,0,0,0]),xr=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0]),wr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.activateInternaly=!1,e._dataChanged=!1,e._mode="",e._focusId=-1,e}return n(e,t),Object.defineProperty(e.prototype,"transform",{get:function(){return this._transform},set:function(t){if(this._transform!==t||t){if(this._transform=t,this._dataChanged=!0,this._fragData&&8===this._fragData.length||(this._fragData=new Float32Array(8)),t){this._fragData.set(t._rawData);for(var e=4;e<8;e++)this._fragData[e]/=255;this._fragData[7]>0&&(this._fragData[7]=0)}else this._fragData.set(Er);var n=t?"transform":"";this._mode!==n&&(this._mode=n,this.invalidateProgram())}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this._matrix},set:function(t){if(this._matrix=t,this._fragData&&20===this._fragData.length||(this._fragData=new Float32Array(20)),t)for(var e=0;e<4;e++){for(var n=0;n<4;n++)this._fragData[n+4*e]=t[n+5*e];this._fragData[16+e]=t[4+5*e]/255}else this._fragData.set(xr);var r=t?"matrix":"";this._mode!==r&&(this._mode=r,this.invalidateProgram())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"CopyPixel:"+this._mode},enumerable:!1,configurable:!0}),e.prototype.getFragmentCode=function(){return"\nprecision highp float;\nuniform sampler2D fs0;\n\nvarying vec2 vUv;\n\n"+("transform"===(t=this._mode)?"\nuniform vec4 uTransformData[2];\n\nvec4 transform(vec4 color) {\n\tif (color.a > 0.0) {\n\t\tcolor.rgb /= color.a;\n\t}\n\n\tcolor *= clamp(uTransformData[0], 0.0, 1.0);\t\n\tcolor += uTransformData[1];\n\n\tcolor.rgb *= clamp(color.a, 0., 1.);\n\treturn color;\n}\n":"matrix"===t?"\nuniform vec4 uTransformData[5];\n\nvec4 transform(vec4 color) {\n\tif (color.a > 0.0) {\n\t\tcolor.rgb /= color.a;\n\t}\n\n\tvec4 ret = uTransformData[4];\n\tret.r += dot(color, uTransformData[0]);\n\tret.g += dot(color, uTransformData[1]);\n\tret.b += dot(color, uTransformData[2]);\n\tret.a += dot(color, uTransformData[3]);\n\n\tret = clamp(ret, 0., 1.);\n\tret.rgb *= ret.a;\n\t\n\treturn ret;\n}\n":"")+"\nvoid main() {\n\tvec4 color = texture2D(fs0, vUv);\n\n gl_FragColor = "+(t?"transform(color)":"color")+";\n}";var t},e.prototype.activate=function(e,n,r){t.prototype.computeVertexData.call(this);var i=this._program3D;i.uploadUniform("uTexMatrix",this._vertexConstantData),this._mode&&(this._dataChanged||i.focusId!==this._focusId)&&i.uploadUniform("uTransformData",this._fragData),this._focusId=i.focusId,this._dataChanged=!1},e}(mn),Sr=((mr={})[""]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],mr[pn.NORMAL]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],mr[pn.LAYER]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],mr[pn.ERASE]=[Xt.ZERO,Xt.ONE_MINUS_SOURCE_ALPHA],mr),Dr=function(t){function e(e){var n=t.call(this)||this;return n._blendDst=Xt.ONE_MINUS_SOURCE_ALPHA,n._blendSrc=Xt.ONE,n._requireBlend=!0,n._blend="",n._copyPixelTask=new wr,n.addTask(n._copyPixelTask),e&&n.applyProps(e),n}return n(e,t),Object.defineProperty(e.prototype,"blendDst",{get:function(){return this._blendDst},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendSrc",{get:function(){return this._blendSrc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireBlend",{get:function(){return this._requireBlend},set:function(t){!this._requireBlend&&t&&(this.blend=""),this._requireBlend=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blend",{get:function(){return this._blend},set:function(t){var e=Sr[t];this._requireBlend=!!e,e&&(this._blendDst=e[1],this._blendSrc=e[0])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorTransform",{get:function(){return this._copyPixelTask.transform},set:function(t){this._copyPixelTask.transform=t,t||(this._requireBlend=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this._copyPixelTask.matrix},set:function(t){this._copyPixelTask.matrix=t,t||(this._requireBlend=!1)},enumerable:!1,configurable:!0}),e.prototype.applyProps=function(t){this.matrix=null==t?void 0:t.matrix},e.filterName="colorMatrix",e}(An),Tr=function(t){function e(){var e=t.call(this)||this;return e._opDecode={"<":"slt ","<=":"sge ",">":"slt ",">=":"sge ","==":"seq ","!=":"sne "},e._thDecode={"<":!1,"<=":!0,">":!0,">=":!1,"==":!1,"!=":!1},e._operation="<",e._threshold=0,e._thresholdRGBA=new B,e._color=0,e._colorRGBA=new B,e._mask=0,e._maskRGBA=new B,e._copySource=!1,e._decodeVector=new B(65025,255,1,16581375),e._fragmentConstantData=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,65025,255,1,16581375]),e}return n(e,t),Object.defineProperty(e.prototype,"operation",{get:function(){return this._operation},set:function(t){this._operation!=t&&(this._operation=t,this._op=this._opDecode[t],this._th=this._thDecode[t],this.invalidateProgram())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"threshold",{get:function(){return this._threshold},set:function(t){this._threshold!=t&&(this._threshold=t,this._thresholdRGBA.x=(t>>16&255)/255,this._thresholdRGBA.y=(t>>8&255)/255,this._thresholdRGBA.z=(255&t)/255,this._thresholdRGBA.w=(t>>24&255)/255)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(t){if(this._color!=t){this._color=t;var e=(t>>24&255)/255;this._colorRGBA.x=e*(t>>16&255)/255,this._colorRGBA.y=e*(t>>8&255)/255,this._colorRGBA.z=e*(255&t)/255,this._colorRGBA.w=e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask!=t&&(this._mask=t,this._maskRGBA.x=(t>>16&255)/255,this._maskRGBA.y=(t>>8&255)/255,this._maskRGBA.z=(255&t)/255,this._maskRGBA.w=(t>>24&255)/255)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"copySource",{get:function(){return this._copySource},set:function(t){this._copySource!=t&&(this._copySource=t,this.invalidateProgram())},enumerable:!1,configurable:!0}),e.prototype.getFragmentCode=function(){var t=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(t,1);var e=this._registerCache.getFreeTextureReg();this.sourceSamplerIndex=e.index;var n=this._registerCache.getFreeFragmentConstant();this._fragmentConstantsIndex=n.index;var r,i=this._registerCache.getFreeFragmentConstant(),o=this._registerCache.getFreeFragmentConstant(),a=this._registerCache.getFreeFragmentConstant();if(this._copySource){var s=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(s,1);var u=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(u,1),r="tex "+t+", "+this._uvVarying+", "+e+" <2d,linear,clamp>\nmul "+s+", "+t+", "+o+"\ndp4 "+s+", "+s+", "+a+"\n"+this._op+s+", "+(this._th?n:s)+", "+(this._th?s:n)+"\nsub "+u+", "+a+".zzzz, "+s+"\nmul "+s+", "+s+", "+i+"\nmul "+u+", "+u+", "+t+"\nadd "+t+", "+s+", "+u+"\nmov oc, "+t+"\n",this._registerCache.removeFragmentTempUsage(u),this._registerCache.removeFragmentTempUsage(s)}else r="tex "+t+", "+this._uvVarying+", "+e+" <2d,linear,clamp>\nmul "+t+", "+t+", "+o+"\ndp4 "+t+", "+t+", "+a+"\n"+this._op+t+", "+(this._th?n:t)+", "+(this._th?t:n)+"\nmul "+t+", "+t+", "+i+"\nmov oc, "+t+"\n";return this._registerCache.removeFragmentTempUsage(t),r},e.prototype.activate=function(e,n,r){t.prototype.computeVertexData.call(this);var i=new B(this._thresholdRGBA.x*this._maskRGBA.x,this._thresholdRGBA.y*this._maskRGBA.y,this._thresholdRGBA.z*this._maskRGBA.z,this._thresholdRGBA.w*this._maskRGBA.w).dotProduct(this._decodeVector),o=this._fragmentConstantsIndex,a=this._fragmentConstantData;a[o]=i,a[o+1]=i,a[o+2]=i,a[o+3]=i,a[o+4]=this._colorRGBA.x,a[o+5]=this._colorRGBA.y,a[o+6]=this._colorRGBA.z,a[o+7]=this._colorRGBA.w,a[o+8]=this._maskRGBA.x,a[o+9]=this._maskRGBA.y,a[o+10]=this._maskRGBA.z,a[o+11]=this._maskRGBA.w;var s=e.context;s.setProgramConstantsFromArray($t.VERTEX,this._vertexConstantData),s.setProgramConstantsFromArray($t.FRAGMENT,this._fragmentConstantData)},e}(_n),Pr=function(t){function e(){var e=t.call(this)||this;return e._thresholdTask=new Tr,e.addTask(e._thresholdTask),e}return n(e,t),r([bn("_thresholdTask")],e.prototype,"operation",void 0),r([bn("_thresholdTask")],e.prototype,"color",void 0),r([bn("_thresholdTask")],e.prototype,"mask",void 0),r([bn("_thresholdTask")],e.prototype,"copySource",void 0),r([bn("_thresholdTask")],e.prototype,"threshold",void 0),e}(An),Br=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),"\nprecision highp float;\nuniform vec4 uPosMatrix;\nuniform vec4 uTexMatrix["+t+"];\n\n/* AGAL legacy atribb resolver MUST reolver this as va0 */\nattribute vec4 aPos; // position\n\nvarying vec2 vUv["+t+"];\n"+(e?"varying vec4 vUvLim["+t+"];":"")+"\n\nvoid main() {\n\tvec4 pos = aPos;\n\n\tpos.xy = pos.xy * uPosMatrix.zw + uPosMatrix.xy;\n\tpos.z = pos.z * 2.0 - pos.w;\n\n gl_Position = pos;\n\t"+function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),Array.from({length:t},(function(t,n){var r="vUv["+n+"] = aPos.xy * uTexMatrix["+n+"].zw + uTexMatrix["+n+"].xy;";return e&&(r+="\nvUvLim["+n+"] = vec4(uTexMatrix["+n+"].xy, uTexMatrix["+n+"].zw + uTexMatrix["+n+"].xy);"),r})).join("\n")}(t,e)+"\n}\n\n"},Or=function(t){function e(e,n){void 0===e&&(e=1),void 0===n&&(n=!1);var r=t.call(this,!1)||this;r._uvBlocks=e,r._limits=n,r.uvMatrices=[],r._dataBuffer=new Float32Array(4*e+4),r.posMatrix=r._dataBuffer.subarray(0,4),r._vertexConstantData=r._dataBuffer.subarray(0,8),r._uvMatricesBuffer=r._dataBuffer.subarray(4,4+4*e);for(var i=0;i 1. || uv.y < 0. || uv.y > 1.;":"")+"\n\n\t"+("color"===a?"gl_FragColor = outside ? uColor : texture2D(fs0, uv);":"gl_FragColor = texture2D(fs0, uv);")+"\n\t\n\t//gl_FragColor = map;\n}\n\n"}({compX:Math.log2(this.componentX),compY:Math.log2(this.componentY),mode:this.mode})},e.prototype.activate=function(e,n,r){t.prototype.computeVertexData.call(this);var i=this.inputRect,o=this.destRect,a=this.mapBitmap,s=this._program3D;this.uvMatrices[1].set([0,0,a.width/o.width,a.height/o.height],0),this.uploadVertexData(),s.uploadUniform("uScale",[this.scaleX/i.width,this.scaleY/i.height]),s.uploadUniform("uMapPoint",[this.mapPoint.x/a.width,this.mapPoint.y/a.height]),"color"===this.mode&&s.uploadUniform("uColor",this._uColor),this.mapBitmap.getAbstraction(e).activate(1)},e}(Or),Lr=function(t){function e(e){var n=t.call(this)||this;return n._displacement=new Mr,n.addTask(n._displacement),n.applyProps(e),n}return n(e,t),e.prototype.applyProps=function(t){if(t)for(var e=0,n=this[Cn];e 0.0) {\n\t\tvec4 composite = main * uProps[2];\n\n\t\tcolor = \n\t\t\touter * (composite + (1. - main.a) * color) + \n\t\t\tinner * (composite * (1. - color.a) + color);\n\t}\n\t\n\tgl_FragColor = color;\n}"},e.prototype.activate=function(t){var e=this.sourceImage,n=this._source;this.uvMatrices[1].set([0,0,this.inputRect.width/e.width,this.inputRect.height/e.height],0);var r=Math.PI*this._angle/180;this._uDir[0]=-Math.cos(r)*this._distance/n.width,this._uDir[1]=-Math.sin(r)*this._distance/n.height,this.sourceImage.getAbstraction(t).activate(1),this.uploadVertexData(),this._program3D.uploadUniform("uColor",this._uColor),this._program3D.uploadUniform("uProps",this._uProps),this._program3D.uploadUniform("uDir",this._uDir)},e}(Or),Rr=function(t){function e(e){var n=t.call(this,e)||this;return n._shadowTask=new Nr,n.distance=0,n.angle=0,n.color=0,n.alpha=1,n.strength=1,n.inner=!1,n.knockout=!1,n.hideObject=!1,n.addTask(n._shadowTask),n.applyProps(e),n}return n(e,t),e.prototype.applyProps=function(t){if(t){for(var n=0,r=this[Cn];n0){var i=this.angle*Math.PI/180;n.x+=Math.sin(i)*r*2,n.y+=Math.sin(i)*r*2}return e.x-=n.x,e.y-=n.y,e.width+=n.x,e.height+=n.y,e},e.prototype.setRenderState=function(e,n,r,i,o){t.prototype.setRenderState.call(this,e,n,r,i,o);var a=this._hBlurTask.target,s=o.popTemp(a.width,a.height);this._shadowTask.inputRect.copyFrom(this._vBlurTask.inputRect),this._shadowTask.destRect.copyFrom(i),this._vBlurTask.inputRect.setTo(0,0,0,0),this._vBlurTask.destRect.setTo(0,0,0,0),this._vBlurTask.target=s,this._shadowTask.source=s,this._shadowTask.sourceImage=e,this._shadowTask.target=n,this._temp.push(s)},e.filterName="dropShadow",e.filterNameAlt="glow",r([In,bn("_shadowTask")],e.prototype,"distance",void 0),r([In,bn("_shadowTask")],e.prototype,"angle",void 0),r([In,bn("_shadowTask")],e.prototype,"color",void 0),r([In,bn("_shadowTask")],e.prototype,"alpha",void 0),r([In,bn("_shadowTask")],e.prototype,"strength",void 0),r([In],e.prototype,"quality",void 0),r([In,bn("_shadowTask")],e.prototype,"inner",void 0),r([In,bn("_shadowTask")],e.prototype,"knockout",void 0),r([In,bn("_shadowTask")],e.prototype,"hideObject",void 0),e}(Ln);var Fr,kr=((yr={})[""]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],yr[pn.NORMAL]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],yr[pn.LAYER]=[Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA],yr[pn.ERASE]=[Xt.ZERO,Xt.ONE_MINUS_SOURCE_ALPHA],yr),Ur=function(){function t(e){this._samplerIds=Array.from({length:t.SAMPLERS_LIMIT},(function(t){return 0})),this._instanceData=new Float32Array(t.TASKS_LIMIT*t.DATA_COUNT),this._instanceView=this._instanceData,this._copyTasks=[],this._images=[],this._blendDst=Xt.ONE_MINUS_SOURCE_ALPHA,this._blendSrc=Xt.ONE,this._requireBlend=!0,this._blend="",this._mustBeFlushed=!1,this._manager=e,this._stage=e.stage}return Object.defineProperty(t.prototype,"blendDst",{get:function(){return this._blendDst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendSrc",{get:function(){return this._blendSrc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireBlend",{get:function(){return this._requireBlend},set:function(t){!this._requireBlend&&t&&(this.blend=""),this._requireBlend=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blend",{get:function(){return this._blend},set:function(t){var e=kr[t];this._requireBlend=!!e,e&&(this._blendDst=e[1],this._blendSrc=e[0])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mustBeFlushed",{get:function(){return this._mustBeFlushed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prog",{get:function(){var e;return this._prog||(this._prog=this._stage.context.createProgram(),this._prog.name="CopyShaderInstanced:"+t.SAMPLERS_LIMIT,this._prog.uploadRaw("\nprecision highp float;\n\n/* AGAL legacy atrib resolver require this names */\nattribute vec4 va0; // position\nattribute vec4 va1; // posMatrix\nattribute vec4 va2; // uvMatrix\nattribute float va3; // SamplerId\n\nvarying vec2 vUv;\nvarying float vId;\n\nvoid main() {\n\tvec4 pos = va0;\n\t\n\tpos.xy = pos.xy * va1.zw + va1.xy;\n\tpos.z = pos.z * 2.0 - pos.w;\n\n\tvUv = va0.xy * va2.zw + va2.xy;\n\tvId = va3;\n\tgl_Position = pos;\n}",(void 0===(e=t.SAMPLERS_LIMIT)&&(e=1),"\nprecision highp float;\nuniform sampler2D uTex["+e+"];\n\nvarying vec2 vUv;\nvarying float vId;\n\nvoid main() {\n\t"+function(t){for(var e=[],n=0;nt.MAX_TMP_TEXTURE||n>t.MAX_TMP_TEXTURE)&&(console.warn("[Filter manager] Temporary texture size "+e+"x"+n+" is bigger that limit, clamp to "+t.MAX_TMP_TEXTURE),e=Math.min(e,t.MAX_TMP_TEXTURE),n=Math.min(n,t.MAX_TMP_TEXTURE));var i,o=e+"_"+n+"_"+~~(r=r&&2===this.context.glVersion);return this._texturePool[o]?i=this._texturePool[o].pop():this._texturePool[o]=[],i||((i=new Fe(e,n,!0)).poolKey=o,i.antialiasQuality=r?8:0),i},t.prototype.pushTemp=function(t){var e=t;e&&e.poolKey&&this._texturePool[e.poolKey].push(e)},t.prototype._initFilterElements=function(){this._filterVertexBuffer||(this._filterVertexBuffer=this.context.createVertexBuffer(6,8),this._filterVertexBuffer.uploadFromArray(new Float32Array([0,0,1,1,1,0,0,0,0,1,1,1]),0,6),this._filterSampler=new Me(!1,!1,!1))},t.prototype._bindFilterElements=function(){var t=this.context;if(this._filterVAO)this._filterVAO.bind();else{var e=t.hasVao?t.createVao():null;e&&e.bind(),t.setVertexBufferAt(0,this._filterVertexBuffer,0,re.FLOAT_2),this._filterVAO=e}},t.prototype._unbindFilterElements=function(){this._filterVAO&&this._filterVAO.unbind(!0)},t.prototype.getFilter=function(t,e){if(!this._filterCache[t]&&!this._filterConstructors[t])return console.warn("[FilterManager] Filter not implemented:",t),null;var n=this._filterCache[t];return n?(n.applyProps(e),n):this._filterCache[t]=new this._filterConstructors[t](e)},t.prototype.applyFilter=function(t,e,n,r,i,o){var a="string"==typeof i?o:i;if(!a||!a.filterName)return!1;var s=a.filterName,u=this.getFilter(s,a);return!(!u||!u.isValid)&&(this.context.setBlendFactors(Xt.ONE,Xt.ONE_MINUS_SOURCE_ALPHA),this.renderFilter(t,e,n||t.rect,r||t.rect,u),!0)},t.prototype.computeFiltersPadding=function(t,e,n){void 0===n&&(n=t.clone());for(var r=0,i=e;re.width||r.y<-n.height||r.y>e.height)){var s=jr;s.copyFrom(n);var u=Vr;if(u.setTo(r.x,r.y,n.width,n.height),s.x<0&&(s.width-=-s.x,u.x+=-s.x,s.x=0),s.y<0&&(s.height-=-s.y,u.y+=-s.y,s.y=0),s.right>t.width){var l=t.width-s.right;s.width-=l}if(s.bottom>t.height){l=t.height-s.bottom;s.height-=l}u.x<0&&(s.x+=-u.x,s.width-=-u.x,u.x=0),u.y<0&&(s.y+=-u.y,s.height-=-u.y,u.y=0),s.width>e.width-u.x&&(s.width=e.width-u.x),s.height>e.height-u.y&&(s.height=e.height-u.y),u.width=s.width,u.height=s.height;var c,h=2===this.context.glVersion&&e.antialiasQuality>0;if(!this._copyFilterInstanced||this._copyFilterInstanced.target===e&&this._copyFilterInstanced.target!==t||this.flushDelayedTask("Manually"),e===t){c=this.popTemp(t.width,t.height),this._stage.setRenderTarget(t,!1,0,0,!0),this._stage.setScissor(null);var p=c.getAbstraction(this._stage);this.context.copyToTexture(p.getTexture(),t.rect,Gr),this._stage.setRenderTarget(c,!1,0,0,!0)}if(i||h||o){var d=this._copyPixelFilter=this.getFilter(Dr.filterName);d instanceof Ur&&(d.requireBlend!==i||d.target!==e&&d.target)&&d.flush(),d.blend=o,d.requireBlend=i,d instanceof Ur?(d.target=e,d.addCopyTask(s,u,c||t),this.context.stateChangeCallback=null,d.mustBeFlushed||e===t?d.flush():this.context.stateChangeCallback=function(t){return a.flushDelayedTask(t)}):(this.renderFilter(t,e,s,u,d),d.requireBlend=!0)}else{this.flushDelayedTask("copyPixelByTexture"),c||(this._stage.setRenderTarget(t,!1,0,0,!0),this._stage.setScissor(null));var f=e.getAbstraction(this._stage);this.context.copyToTexture(f.getTexture(),s,u.topLeft)}c&&this.pushTemp(c),this._stage.setRenderTarget(null)}},t.prototype.flushDelayedTask=function(t){this._copyFilterInstanced&&this._copyFilterInstanced.length&&(this.context.stateChangeCallback=null,console.debug("[Instanced] Instanced copyPixel was flushed by:",t,this._copyFilterInstanced.length),this._copyFilterInstanced.flush())},t.prototype.threshold=function(t,e,n,r,i,o,a,s,u){r.x<-n.width||r.x>e.width||r.y<-n.height||r.y>e.height||(this._thresholdFilter||(this._thresholdFilter=new Pr),this._thresholdFilter.operation=i,this._thresholdFilter.threshold=o,this._thresholdFilter.color=a,this._thresholdFilter.mask=s,this._thresholdFilter.copySource=u,this.renderFilter(t,e,n,r,this._thresholdFilter))},t.prototype.colorTransform=function(t,e,n,r){this._copyPixelFilter||(this._copyPixelFilter=this.getFilter(Dr.filterName)),this._copyPixelFilter.blend="",this._copyPixelFilter.requireBlend=!1,this._copyPixelFilter.colorTransform=r,this.renderFilter(t,e,n,n,this._copyPixelFilter),this._copyPixelFilter.colorTransform=null},t.MAX_TMP_TEXTURE=4096,t.MIN_TMP_TEXTURE=64,t}(),Hr=((Fr={})[1]=[re.BYTE_1,re.BYTE_2,re.BYTE_3,re.BYTE_4],Fr[2]=[re.SHORT_1,re.SHORT_2,re.SHORT_3,re.SHORT_4],Fr[4]=[re.FLOAT_1,re.FLOAT_2,re.FLOAT_3,re.FLOAT_4],Fr[5]=[re.UNSIGNED_BYTE_1,re.UNSIGNED_BYTE_2,re.UNSIGNED_BYTE_3,re.UNSIGNED_BYTE_4],Fr[6]=[re.UNSIGNED_SHORT_1,re.UNSIGNED_SHORT_2,re.UNSIGNED_SHORT_3,re.UNSIGNED_SHORT_4],Fr),Xr={x:0,y:0},Yr=function(t){function e(e,n,r,i,o){void 0===o&&(o=Jt.BASELINE);var a=t.call(this)||this;return a._programData=new Array,a._x=0,a._y=0,a._touchPoints=new Array,a._stageIndex=-1,a._antiAlias=4,a._renderTarget=null,a._renderSurfaceSelector=0,a._renderMipmapSelector=0,a._frameEndCallbackOnce=[],a._initialised=!1,a.globalDisableMipmap=!1,a.globalDisableSmooth=!1,a.numUsedStreams=0,a.numUsedTextures=0,a.id=K.ID_COUNT++,a._programDataPool=new Rn(a),a._container=e,a._container&&(a._container.addEventListener("webglcontextlost",(function(t){return a.onContextLost(t)})),a._container.addEventListener("webglcontextrestored",(function(t){return a.onContextRestored(t)}))),a._stageIndex=n,a._stageManager=r,a._enableDepthAndStencil=!0,bt.setElementX(a._container,0),bt.setElementY(a._container,0),a._width=a._container.clientWidth,a._height=a._container.clientHeight,a.visible=!0,a.filterManager=new zr(a),a}return n(e,t),Object.defineProperty(e.prototype,"pixelRatio",{get:function(){return this._context.pixelRatio},set:function(t){this._context.pixelRatio=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"glVersion",{get:function(){return this._context.glVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this._screenX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this._screenY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touchPoints",{get:function(){return this._touchPoints},enumerable:!1,configurable:!0}),e.prototype.requiestFrameEnd=function(t){this._frameEndCallbackOnce.indexOf(t)>-1||"function"!=typeof t||this._frameEndCallbackOnce.push(t)},e.prototype.present=function(){this._context.present(),je.executeAll();for(var t=0,e=this._frameEndCallbackOnce;t=e.STAGE_MAX_QUANTITY)throw new D("Index is out of bounds [0.."+e.STAGE_MAX_QUANTITY+"]");if(!this._stages[t]){if(e._numStages++,document&&null==e.htmlCanvas)(a=document.createElement("canvas")).id="stage"+t,document.body.appendChild(a);else if(e.htmlCanvas)var a=e.htmlCanvas;var s=this._stages[t]=new Yr(a,t,this,n,r);s.addEventListener(Be.CONTEXT_CREATED,this._onContextCreatedDelegate),s.requestContext(n,r,i,o)}return this._stages[t]},e.prototype.iRemoveStage=function(t){e._numStages--,t.removeEventListener(Be.CONTEXT_CREATED,this._onContextCreatedDelegate),this._stages[t.stageIndex]=null},e.prototype.getFreeStage=function(t,e,n,r){void 0===t&&(t=!1),void 0===e&&(e=Jt.BASELINE),void 0===n&&(n=oe.AUTO),void 0===r&&(r=!1);for(var i=0,o=this._stages.length;ithis._viewWidth?(this._renderToTextureRect.x=Math.floor(.5*(this._textureWidth-this._viewWidth)),this._renderToTextureRect.width=this._viewWidth):(this._renderToTextureRect.x=0,this._renderToTextureRect.width=this._textureWidth),this.dispatchEvent(new Oe(Oe.RESIZE,this)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewHeight",{get:function(){return this._viewHeight},set:function(t){t!=this._viewHeight&&(this._viewHeight=t,this._buffersInvalid=!0,this._textureHeight=this._powerOfTwo?Le.getBestPowerOf2(this._viewHeight):this._viewHeight,this._textureHeight>this._viewHeight?(this._renderToTextureRect.y=Math.floor(.5*(this._textureHeight-this._viewHeight)),this._renderToTextureRect.height=this._viewHeight):(this._renderToTextureRect.y=0,this._renderToTextureRect.height=this._textureHeight),this.dispatchEvent(new Oe(Oe.RESIZE,this)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderToTextureVertexBuffer",{get:function(){return this._buffersInvalid&&this.updateRTTBuffers(),this._renderToTextureVertexBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderToScreenVertexBuffer",{get:function(){return this._buffersInvalid&&this.updateRTTBuffers(),this._renderToScreenVertexBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"indexBuffer",{get:function(){return this._buffersInvalid&&this.updateRTTBuffers(),this._indexBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderToTextureRect",{get:function(){return this._buffersInvalid&&this.updateRTTBuffers(),this._renderToTextureRect},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textureWidth",{get:function(){return this._textureWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textureHeight",{get:function(){return this._textureHeight},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){e.deleteRTTBufferManager(this._stage),this._indexBuffer&&(this._indexBuffer.dispose(),this._renderToScreenVertexBuffer.dispose(),this._renderToTextureVertexBuffer.dispose(),this._renderToScreenVertexBuffer=null,this._renderToTextureVertexBuffer=null,this._indexBuffer=null)},e.prototype.updateRTTBuffers=function(){var t,e,n,r,i=this._stage.context;null==this._renderToTextureVertexBuffer&&(this._renderToTextureVertexBuffer=i.createVertexBuffer(4,20)),null==this._renderToScreenVertexBuffer&&(this._renderToScreenVertexBuffer=i.createVertexBuffer(4,20)),this._indexBuffer||(this._indexBuffer=i.createIndexBuffer(6),this._indexBuffer.uploadFromArray(new Uint16Array([2,1,0,3,2,0]),0,6)),this._textureRatioX=n=Math.min(this._viewWidth/this._textureWidth,1),this._textureRatioY=r=Math.min(this._viewHeight/this._textureHeight,1);var o=.5*(1-n),a=.5*(n+1),s=.5*(1-r),u=.5*(r+1);t=new Float32Array([-n,-r,o,s,0,n,-r,a,s,1,n,r,a,u,2,-n,r,o,u,3]),e=new Float32Array([-1,-1,o,s,0,1,-1,a,s,1,1,1,a,u,2,-1,1,o,u,3]),this._renderToTextureVertexBuffer.uploadFromArray(t,0,4),this._renderToScreenVertexBuffer.uploadFromArray(e,0,4),this._buffersInvalid=!1},e}(c),Wr=function(){return function(){}}(),Jr=function(){function t(){}return t.prototype.createImage2D=function(t,e,n,r,i){return void 0===n&&(n=!0),void 0===r&&(r=null),void 0===i&&(i=!0),new en(t,e,n,r,i)},t}();var $r=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this,rt.BLOB)||this;return r._factory=e||new Jr,r._alphaChannel=n,r}return n(e,t),e.supportsType=function(t){return t=t.toLowerCase().trim(),this.SUPPORTED_TYPES.includes(t)},e.supportsData=function(t){if(t instanceof HTMLImageElement)return!0;if(!(t instanceof A))return!1;var e=t;return e.position=0,55551==e.readUnsignedShort()||(e.position=0,16973==e.readShort()||(e.position=1,"PNG"==e.readUTFBytes(3)||(e.position=0,"GIF"==e.readUTFBytes(3)&&14393==e.readShort()&&97==e.readByte()||(e.position=0,"ATF"==e.readUTFBytes(3)))))},e.prototype._pFinalizeAsset=function(e,n){this._alphaChannel&&(e.alphaChannel=this._alphaChannel),t.prototype._pFinalizeAsset.call(this,e,n)},e.prototype._pProceedParsing=function(){var t,e,n=this;if(this._loadingImage)return _t.MORE_TO_PARSE;if(!this._htmlImageElement&&this.data instanceof HTMLImageElement&&(this._htmlImageElement=this.data),this._htmlImageElement){var r=Le.imageToBitmapImage2D(this._htmlImageElement,!1,this._factory);return this._pFinalizeAsset(r,this._iFileName),this._pContent=r,_t.PARSING_DONE}if(this.data instanceof pt)return t=new cn(this.data),this._pFinalizeAsset(t,this._iFileName),this._pContent=t,_t.PARSING_DONE;if(this.data instanceof A)this.data.position=0,e=new Blob([this.data.arraybytes]);else if(this.data instanceof ArrayBuffer)e=new Blob([this.data]);else{if(!(this.data instanceof Blob))throw"Unknow data";e=this.data}var i=function(t,e){if("createImageBitmap"in self)return self.createImageBitmap(t).then(e),null;var n=URL.createObjectURL(t),r=new Image;return r.src=n,r.naturalWidth?r:(r.onload=function(t){e(r),URL.revokeObjectURL(n)},null)}(e,(function(t){return n._htmlImageElement=t,n.onLoadComplete(null),!0}));return i instanceof HTMLImageElement&&i.naturalWidth&&(this._htmlImageElement=i,t=Le.imageToBitmapImage2D(this._htmlImageElement,!1,this._factory),this._pFinalizeAsset(t,this._iFileName),this._pContent=t),this._loadingImage=!0,_t.MORE_TO_PARSE},e.prototype.onLoadComplete=function(t){this._loadingImage=!1},e.SUPPORTED_TYPES=["jpg","jpeg","png","gif"],e}(_t),Zr=function(t){function e(){return t.call(this,rt.TEXT)||this}return n(e,t),e.supportsType=function(t){return"cube"==(t=t.toLowerCase())},e.supportsData=function(t){try{return!!JSON.parse(t)}catch(t){return!1}},e.prototype._iResolveDependency=function(t){},e.prototype._iResolveDependencyFailure=function(t){},e.prototype._pProceedParsing=function(){if(null!=this._imgDependencyDictionary){var t=new un(this._getBitmapImage2D(e.posX).width),n=new q(0,0,t.size,t.size);return t.setPixels(un.posX,n,this._getBitmapImage2D(e.posX).data),t.setPixels(un.negX,n,this._getBitmapImage2D(e.negX).data),t.setPixels(un.posY,n,this._getBitmapImage2D(e.posY).data),t.setPixels(un.negY,n,this._getBitmapImage2D(e.negY).data),t.setPixels(un.posZ,n,this._getBitmapImage2D(e.posZ).data),t.setPixels(un.negZ,n,this._getBitmapImage2D(e.negZ).data),this._imgDependencyDictionary=null,t.name=this._iFileName,this._pFinalizeAsset(t,this._iFileName),_t.PARSING_DONE}try{var r=JSON.parse(this.data),i=r.data,o=void 0;if(6!=i.length&&this._pDieWithError("ImageCubeParser: Error - cube texture should have exactly 6 images"),r){this._imgDependencyDictionary=new Object;for(var a=0;a0||e.blendMode&&!(e.blendMode===pn.LAYER||e.blendMode===pn.NORMAL);return this._renderToImage!==n&&(this._renderToImage=n,this._renderToImage||this.partition.clearLocalNode()),this._renderToImage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boundsVisible",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pool",{get:function(){return this._pool},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorTransformDisabled",{get:function(){return this._colorTransformDisabled},set:function(t){this._colorTransformDisabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transformDisabled",{get:function(){return this._transformDisabled},set:function(t){this._transformDisabled!=t&&(this._transformDisabled=t,this._colorTransformDisabled=t,this._transformDisabled?this._activeTransform=e._nullTransform:this._activeTransform=this.container.transform)},enumerable:!0,configurable:!0}),e.prototype.getScale9Container=function(){var t;return this._hierarchicalPropsDirty&Mt.SCALE9&&(this._scale9Container=this.container.scale9Grid?this.container:null===(t=this._parent)||void 0===t?void 0:t.getScale9Container(),this._hierarchicalPropsDirty^=Mt.SCALE9),this._scale9Container},e.prototype.getPosition=function(){return this._positionDirty&&(this.container._registrationMatrix3D&&this.container.alignmentMode===Nt.REGISTRATION_POINT?(this._position.x=-this.container._registrationMatrix3D._rawData[12],this._position.y=-this.container._registrationMatrix3D._rawData[13],this._position.z=-this.container._registrationMatrix3D._rawData[14],this._position=this.getMatrix3D().transformVector(this._position,this._position)):this.getMatrix3D().copyColumnTo(3,this._position),this._positionDirty=!1),this._position},e.prototype.getInverseMatrix3D=function(){return this._inverseMatrix3DDirty&&(this._inverseMatrix3D||(this._inverseMatrix3D=new R),this._inverseMatrix3DDirty=!1,this._inverseMatrix3D.copyFrom(this.getMatrix3D()),this._inverseMatrix3D.invert()),this._inverseMatrix3D||(this._inverseMatrix3D=new R)},e.prototype.getMatrix3D=function(){return this._hierarchicalPropsDirty&Mt.SCENE_TRANSFORM&&(this._matrix3D.copyFrom(this._activeTransform.matrix3D),this.container._registrationMatrix3D&&(this._matrix3D.prepend(this.container._registrationMatrix3D),this.container.alignmentMode!=Nt.REGISTRATION_POINT&&this._matrix3D.appendTranslation(-this.container._registrationMatrix3D._rawData[12]*this._activeTransform.scale.x,-this.container._registrationMatrix3D._rawData[13]*this._activeTransform.scale.y,-this.container._registrationMatrix3D._rawData[14]*this._activeTransform.scale.z)),this._parent&&this._matrix3D.append(this._parent.getMatrix3D()),!this.container.maskMode&&this.container.scrollRect?this._matrix3D.prependTranslation(-this.container.scrollRect.x,-this.container.scrollRect.y,0):this.container.maskMode&&this.container.scrollRect&&this._matrix3D.prependTranslation(this.container.scrollRect.x,this.container.scrollRect.y,0),this._hierarchicalPropsDirty^=Mt.SCENE_TRANSFORM,this.container._iController&&this.container._iController.updateController()),this._matrix3D},e.prototype.getRenderMatrix3D=function(t){if(this.container.orientationMode==Lt.CAMERA_PLANE){var e=t.decompose();return e[0].copyFrom(this.getPosition()),e[3].copyFrom(this._activeTransform.scale),this._orientationMatrix.recompose(e),this.container._registrationMatrix3D&&(this._orientationMatrix.prepend(this.container._registrationMatrix3D),this.container.alignmentMode!=Nt.REGISTRATION_POINT&&this._orientationMatrix.appendTranslation(-this.container._registrationMatrix3D._rawData[12]*this._activeTransform.scale.x,-this.container._registrationMatrix3D._rawData[13]*this._activeTransform.scale.y,-this.container._registrationMatrix3D._rawData[14]*this._activeTransform.scale.z)),this._orientationMatrix}return this.getMatrix3D()},e.prototype.getColorTransform=function(){return this._colorTransformDisabled?e._nullColorTransform:(this._hierarchicalPropsDirty&Mt.COLOR_TRANSFORM&&(this._colorTransform||(this._colorTransform=new w),this._parent&&this._parent.getColorTransform()?(this._colorTransform.copyFrom(this._parent.getColorTransform()),this._colorTransform.prepend(this.container.transform.colorTransform)):this._colorTransform.copyFrom(this.container.transform.colorTransform),this._hierarchicalPropsDirty^=Mt.COLOR_TRANSFORM),this._colorTransform||e._nullColorTransform)},e.prototype.getMaskId=function(){return this._hierarchicalPropsDirty&Mt.MASK_ID&&(this._maskId=-1!=this.container.maskId?this.container.maskId:this._parent?this._parent.getMaskId():-1,this._hierarchicalPropsDirty^=Mt.MASK_ID),this._maskId},e.prototype.getMasks=function(t){if(void 0===t&&(t=!1),!t)return this._masks;if(this.container.masks){var e=this.container.masks.length;this._masks.length=e;for(var n=0;n=0;e--)this._childNodes[e].acceptTraverser(t);this._entityNode&&this._entityNode.acceptTraverser(t)}},e.prototype.addChildAt=function(t,e){var n=t.getAbstraction(this._pool);return n.setParent(this),e==this._numChildNodes?this._childNodes.push(n):this._childNodes.splice(e,0,n),this._numChildNodes++,n},e.prototype.removeChildAt=function(t){this._numChildNodes--;var e=t===this._numChildNodes?this._childNodes.pop():this._childNodes.splice(t,1)[0];return e.setParent(null),e},e.prototype.invalidateEntity=function(t){null==this._entityNode&&(this._entityNode=t.getAbstraction(this.partition),this._entityNode.setParent(this)),this._partition.invalidateEntity(this._entityNode)},e.prototype.clearEntity=function(){this._partition.clearEntity(this._entityNode),this._entityNode.setParent(null),this._entityNode=null},e.prototype.startDrag=function(){this._isDragEntity=!0},e.prototype.stopDrag=function(){this._isDragEntity=!1},e.prototype.isDragEntity=function(){return this._isDragEntity},e.prototype.isMouseDisabled=function(){var t;return!this.container.mouseEnabled||(null===(t=this.parent)||void 0===t?void 0:t.isMouseChildrenDisabled())},e.prototype.isMouseChildrenDisabled=function(){var t;return this._hierarchicalPropsDirty&Mt.MOUSE_ENABLED&&(this._mouseChildrenDisabled=!this.container.mouseChildren||(null===(t=this.parent)||void 0===t?void 0:t.isMouseChildrenDisabled()),this._hierarchicalPropsDirty^=Mt.MOUSE_ENABLED),this._mouseChildrenDisabled},e.prototype.isDescendant=function(t){for(var e=this;e.parent;)if((e=e.parent)==t)return!0;return!1},e.prototype.isAncestor=function(t){return t.isDescendant(this)},e.prototype.invalidateHierarchicalProperty=function(t){var e=(this._hierarchicalPropsDirty^t)&t;if(e){this._hierarchicalPropsDirty|=e;for(var n=0;n>16&255)/255,this._backgroundGreen=(t>>8&255)/255,this._backgroundBlue=(255&t)/255)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focalLength",{get:function(){return this._focalLength},set:function(t){this._focalLength!=t&&(this._focalLength=t,this._updateFocalLength())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRatio",{get:function(){return this._pixelRatio},set:function(t){this._pixelRatio!=t&&(this._pixelRatio=t,this._updatePixelRatio())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"projection",{get:function(){return this._projection},set:function(t){if(null==t)throw new a("projection cannot be null");this._projection!=t&&(this._projection.removeEventListener(Q.INVALIDATE_VIEW_MATRIX3D,this._onInvalidateViewMatrix3DDelegate),this._projection=t,this._projection.addEventListener(Q.INVALIDATE_VIEW_MATRIX3D,this._onInvalidateViewMatrix3DDelegate),this._invalidateViewMatrix3D())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(t){this._target!=t&&this._updateTarget(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frustumMatrix3D",{get:function(){return this._frustumMatrix3DDirty&&(this._frustumMatrix3DDirty=!1,this._frustumMatrix3D.recompose(this._components),this._frustumMatrix3D.prepend(this._projection.frustumMatrix3D)),this._frustumMatrix3D},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewMatrix3D",{get:function(){return this._viewMatrix3DDirty&&(this._viewMatrix3DDirty=!1,this._viewMatrix3D.recompose(this._components),this._viewMatrix3D.prepend(this._projection.viewMatrix3D)),this._viewMatrix3D},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inverseViewMatrix3D",{get:function(){return this._inverseViewMatrix3DDirty&&(this._inverseViewMatrix3DDirty=!1,this._inverseViewMatrix3D.copyFrom(this.viewMatrix3D),this._inverseViewMatrix3D.invert()),this._inverseViewMatrix3D},enumerable:!0,configurable:!0}),e.prototype.clear=function(t,e,n,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=Yt.ALL),this._stage.setRenderTarget(this._target,e,n,r),this._stage.setScissor(null==this._target?this._rect:null),t&&this._stage.clear(this._backgroundRed,this._backgroundGreen,this._backgroundBlue,this.backgroundAlpha,this.backgroundDepth,this.backgroundStencil,i)},e.prototype.present=function(){this._shareContext||null!=this._target||this._stage.present()},e.prototype.project=function(t,e){return void 0===e&&(e=null),(e=this._projection.project(t,e)).x=(e.x+1)*this.width/2,e.y=(e.y+1)*this.height/2,e},e.prototype.unproject=function(t,e,n,r){return void 0===r&&(r=null),this._projection.unproject(2*t/this.width-1,2*e/this.height-1,n,r)},e.prototype.dispose=function(){this._target?(this._target.removeEventListener(l.INVALIDATE,this._onInvalidateSizeDelegate),this._target=null):(this._stage.removeEventListener(Be.INVALIDATE_SIZE,this._onInvalidateSizeDelegate),this._shareContext||null!=this._target||this._stage.dispose(),this._stage=null),this._projection&&(this._projection.removeEventListener(Q.INVALIDATE_VIEW_MATRIX3D,this._onInvalidateViewMatrix3DDelegate),this._projection=null)},e.prototype._onInvalidateSize=function(t){this._updateDimensions(),this._updateFocalLength(),this._updatePixelRatio(),this.preserveDimensions&&(this._shareContext||null!=this._target)||this._invalidateSize()},e.prototype._onInvalidateViewMatrix3D=function(t){this._invalidateViewMatrix3D()},e.prototype._updateTarget=function(t){this._target?this._target.removeEventListener(l.INVALIDATE,this._onInvalidateSizeDelegate):this._stage.removeEventListener(Be.INVALIDATE_SIZE,this._onInvalidateSizeDelegate),this._target=t,this._target?this._target.addEventListener(l.INVALIDATE,this._onInvalidateSizeDelegate):this._stage.addEventListener(Be.INVALIDATE_SIZE,this._onInvalidateSizeDelegate),this._updateDimensions(),this._updateFocalLength(),this._updatePixelRatio(),this.preserveDimensions&&(this._shareContext||null!=this._target)||this._invalidateSize()},e.prototype._updateDimensions=function(){this._target?this._target instanceof Fe?(this._targetWidth=this._target.width,this._targetHeight=this._target.height):this._target instanceof an&&(this._targetWidth=this._target.size,this._targetHeight=this._target.size):(this._targetWidth=this._stage.width,this._targetHeight=this._stage.height),this.preserveDimensions&&(this._shareContext||this._target)?(this._offset.x=this._rect.x/this._targetWidth,this._offset.y=this._rect.y/this._targetHeight,this._scale.x=this._rect.width/this._targetWidth,this._scale.y=this._rect.height/this._targetHeight):(this._rect.x=this._offset.x*this._targetWidth,this._rect.y=this._offset.y*this._targetHeight,this._rect.width=this._scale.x*this._targetWidth,this._rect.height=this._scale.y*this._targetHeight)},e.prototype._updateFocalLength=function(){this.preserveFocalLength?this.projection.scale=this._focalLength/this._rect.height:this._focalLength=this._projection.scale*this._rect.height},e.prototype._updatePixelRatio=function(){this.preservePixelRatio?this._projection.ratio=this._pixelRatio*this._rect.width/this._rect.height:this._pixelRatio=this._projection.ratio*this._rect.height/this._rect.width},e.prototype._invalidateViewMatrix3D=function(){this._frustumMatrix3DDirty=!0,this._viewMatrix3DDirty=!0,this._inverseViewMatrix3DDirty=!0,this.dispatchEvent(new ae(ae.INVALIDATE_VIEW_MATRIX3D,this))},e.prototype._invalidateSize=function(){this.dispatchEvent(new ae(ae.INVALIDATE_SIZE,this))},e}(d),mi=function(t){function e(e){var n=t.call(this)||this;return n._children=new Array,n._updateQueue={},n.isUpdated=!1,n._rootNode=e,n}return n(e,t),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootNode",{get:function(){return this._rootNode},enumerable:!0,configurable:!0}),e.prototype.getLocalView=function(t){if(!this._localView){var n=e._defaultProjection;n||((n=new vt).coordinateSystem=gt.LEFT_HANDED,n.originX=-1,n.originY=-1,n.transform=new F,n.transform.moveTo(0,0,-1e3),n.transform.lookAt(new B)),this._localView=new _i(n,t,null,null,null,!0),this._localView.backgroundAlpha=0}return this._localView},e.prototype.clearLocalView=function(){this._localView&&(this._localView=null)},e.prototype.getLocalNode=function(){return this._localNode||(this._localNode=fi.getRootNode(this._rootNode.container,yi),this._localNode.transformDisabled=!0,this.addChild(this._localNode.partition)),this._localNode},e.prototype.clearLocalNode=function(){this._localNode&&(this.removeChild(this._localNode.partition),this._localNode.onClear(null),this._localNode=null)},e.prototype.addChild=function(t){this._children.push(t),t.setParent(this),this._invalid||this.invalidate()},e.prototype.removeChild=function(t){this._children.splice(this._children.indexOf(t),1)[0],t.setParent(null),this._invalid||this.invalidate()},e.prototype.setParent=function(t){this._parent=t},e.prototype.traverse=function(t){this.isUpdated=this._invalid,this._invalid=!1,this._rootNode.acceptTraverser(t)},e.prototype.invalidateEntity=function(t){this._invalid||this.invalidate(),this._updateQueue[t.id]=t},e.prototype.updateEntity=function(t){t.entity._iInternalUpdate(),this.updateNode(t)},e.prototype.updateNode=function(t){},e.prototype.clearEntity=function(t){this._invalid||this.invalidate(),delete this._updateQueue[t.id]},e.prototype.findParentForNode=function(t){return this._rootNode},e.prototype.updateEntities=function(){for(var t in this._updateQueue)this.updateEntity(this._updateQueue[t]);this._updateQueue={}},e.prototype.invalidate=function(){this._invalid=!0,t.prototype.invalidate.call(this),this._parent&&this._parent.invalidate()},e.prototype.clear=function(){t.prototype.clear.call(this),this._localView.dispose(),this._localView=null;for(var e=0;ee.pickingCollision.rayEntryDistance?1:t.pickingCollision.rayEntryDistance0?t/n.width:1;if(0!==r.z){var a=e.tmpMatrix;a.copyFrom(i),a.appendScale(o||1e-4,1,1);var s=a.decompose()[3];this._node.container.transform.scaleTo(s.x,s.y,s.z)}else{var u=this._node.container.transform.scale;this._node.container.transform.scaleTo(u.x*o||1e-4,u.y,u.z)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var t=this.getBoxBounds();return null==t?0:t.height*this._node.container.transform.scale.y},set:function(t){var n=this.getBoxBounds();if(null!=n){var r=this.node.container.transform.matrix3D,i=this.node.container.transform.rotation;r.transformBox(n,n);var o=n.height>0?t/n.height:1;if(0!==i.z){var a=e.tmpMatrix;a.copyFrom(r),a.appendScale(1,o||1e-4,1);var s=a.decompose()[3];this._node.container.transform.scaleTo(s.x,s.y,s.z)}else{var u=this._node.container.transform.scale;this._node.container.transform.scaleTo(u.x,u.y*o||1e-4,u.z)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){var t=this.getBoxBounds();return null==t?0:t.depth*this._node.container.transform.scale.z},set:function(t){var e=this.getBoxBounds();null!=e&&0!=e.depth&&this._node.container.transform.scaleTo(this._node.container.transform.scale.x,this._node.container.transform.scale.y,t/e.depth)},enumerable:!0,configurable:!0}),e.prototype.onInvalidate=function(e){t.prototype.onInvalidate.call(this,e),this.dispatchEvent(new Rt(Rt.INVALIDATE_BOUNDS,this))},e.prototype.traverse=function(){this._boundsPickers.length=0,this._partition.traverse(this),this._invalid=!1},e.prototype.getTraverser=function(t){var e=this._pickGroup.getBoundsPicker(t);return this._invalid&&this._boundsPickers.push(e),e},e.prototype.enterNode=function(t){return!0},e.prototype.getBoundingVolume=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),null==t&&(t=this._node),null==e&&(e=this._node.container.defaultBoundingVolume);var n=this._boundingVolumePools[e]||(this._boundingVolumePools[e]=new Qt(this,e));return t.getAbstraction(n)},e.prototype.getBoxBounds=function(t,e,n){return void 0===t&&(t=null),void 0===e&&(e=!1),void 0===n&&(n=!1),this.getBoundingVolume(t,e?n?St.BOX_BOUNDS_FAST:St.BOX_BOUNDS:n?St.BOX_FAST:St.BOX).getBox()},e.prototype.getSphereBounds=function(t,e,n){return void 0===t&&(t=null),void 0===e&&(e=!1),void 0===n&&(n=!1),this.getBoundingVolume(t,e?n?St.SPHERE_BOUNDS_FAST:St.SPHERE_BOUNDS:n?St.SPHERE_FAST:St.SPHERE).getSphere()},e.prototype.hitTestPoint=function(t,e,n){return void 0===n&&(n=!1),this._hitTestPointInternal(this._node,t,e,n,!1)},e.prototype._hitTestPointInternal=function(t,n,r,i,o){if(void 0===i&&(i=!1),void 0===o&&(o=!1),!(-1==this._node.getMaskId()||o&&i))return!1;this._invalid&&this.traverse();var a=e.tmpPoint;a.setTo(n,r),this._node.globalToLocal(a,a);var s=this.getBoxBounds(null,!1,!0);if(null==s||!s.contains(a.x,a.y,0))return!1;if(!i||"[asset TextField]"==this._node.container.assetType||"[asset Billboard]"==this._node.container.assetType)return!0;var u=this._boundsPickers.length;if(u)for(var l=0;l0)for(var a=new R,s=0;s0)for(var u=new R,l=0;l0)for(;ne.parent.getMatrix3D().position.x?1:-1})),r=0;r0){var e=0,n=0,r=0,i=0;if(t)for(;e0){var e=this._customTabNodes.length,n=0,r=0,i=0;if(t)for(;e>0;)if(e--,this._customTabNodes[e])for(r=this._customTabNodes[e].length-1;r>=0;r--)if(this._customTabNodes[e][r]==t){for(i=r-1;i>0;)if(i--,this._customTabNodes[e][i])return this._customTabNodes[e][i];for(n=e-1;n>0;)if(n--,this._customTabNodes[n])for(i=this._customTabNodes[n].length-1;i>=0;i--)if(this._customTabNodes[n][i])return this._customTabNodes[n][i];for(n=this._customTabNodes.length;n>0;)if(n--,this._customTabNodes[n])for(i=this._customTabNodes[n].length-1;i>=0;i--)if(this._customTabNodes[n][i])return this._customTabNodes[n][i]}for(n=this._customTabNodes.length-1;n>0;)if(n--,this._customTabNodes[n])for(i=this._customTabNodes[n].length-1;i>=0;i--)if(this._customTabNodes[n][i])return this._customTabNodes[n][i];return t}if(t)for(e=this._tabNodes.length-1;e>=0;e--)if(this._tabNodes[e]==t)return 0==e?this._tabNodes[this._tabNodes.length-1]:this._tabNodes[e-1];return this._tabNodes[0]},e.prototype.enterNode=function(t){return!t.isInvisible()},e.prototype.dispose=function(){},e.prototype.applyEntity=function(t){var e=t,n=e.entity;n.tabEnabled&&("[asset TextField]"==n.assetType&&"input"!=n.type||(n.tabIndex>=0?(this._customTabNodes.length=0){var n=this._view.projection.transform.matrix3D.position;this.vertexConstantData[this.cameraPositionIndex]=n.x,this.vertexConstantData[this.cameraPositionIndex+1]=n.y,this.vertexConstantData[this.cameraPositionIndex+2]=n.z}this._stage.context.setDepthTest(this.writeDepth&&!this.usesBlending,this.depthCompareMode),this._stage.context.setBlendFactors(this._blendFactor[0],this._blendFactor[1],this._blendFactor[2],this._blendFactor[3]),this.activeElements=null},t.prototype._deactivate=function(){this._stage.context.setDepthTest(!0,qt.LESS_EQUAL),this.activeElements=null},t.prototype._setRenderState=function(t){var e;if(t.node.container.animator&&t.node.container.animator.setRenderState(this,t),this.usesUVTransform){var n=t.uvMatrix;n?(e=n.rawData,this.vertexConstantData[this.uvMatrixIndex]=e[0],this.vertexConstantData[this.uvMatrixIndex+1]=e[2],this.vertexConstantData[this.uvMatrixIndex+3]=e[4],this.vertexConstantData[this.uvMatrixIndex+4]=e[1],this.vertexConstantData[this.uvMatrixIndex+5]=e[3],this.vertexConstantData[this.uvMatrixIndex+7]=e[5]):(this.vertexConstantData[this.uvMatrixIndex]=1,this.vertexConstantData[this.uvMatrixIndex+1]=0,this.vertexConstantData[this.uvMatrixIndex+3]=0,this.vertexConstantData[this.uvMatrixIndex+4]=0,this.vertexConstantData[this.uvMatrixIndex+5]=1,this.vertexConstantData[this.uvMatrixIndex+7]=0)}if(this.usesColorTransform){var r=t.node.getColorTransform();r?(e=r._rawData,this.fragmentConstantData[this.colorTransformIndex]=e[0],this.fragmentConstantData[this.colorTransformIndex+1]=e[1],this.fragmentConstantData[this.colorTransformIndex+2]=e[2],this.fragmentConstantData[this.colorTransformIndex+3]=e[3],this.fragmentConstantData[this.colorTransformIndex+4]=e[4]/255,this.fragmentConstantData[this.colorTransformIndex+5]=e[5]/255,this.fragmentConstantData[this.colorTransformIndex+6]=e[6]/255,this.fragmentConstantData[this.colorTransformIndex+7]=e[7]/255):(this.fragmentConstantData[this.colorTransformIndex]=1,this.fragmentConstantData[this.colorTransformIndex+1]=1,this.fragmentConstantData[this.colorTransformIndex+2]=1,this.fragmentConstantData[this.colorTransformIndex+3]=1,this.fragmentConstantData[this.colorTransformIndex+4]=0,this.fragmentConstantData[this.colorTransformIndex+5]=0,this.fragmentConstantData[this.colorTransformIndex+6]=0,this.fragmentConstantData[this.colorTransformIndex+7]=0)}if(this.sceneNormalMatrixIndex>=0&&this.sceneNormalMatrix.copyFrom(t.node.getInverseMatrix3D()),this.usesTangentSpace&&this.cameraPositionIndex>=0){t.node.getInverseMatrix3D().copyRawDataTo(this._pInverseSceneMatrix);var i=this._view.projection.transform.matrix3D.position,o=i.x,a=i.y,s=i.z;this.vertexConstantData[this.cameraPositionIndex]=this._pInverseSceneMatrix[0]*o+this._pInverseSceneMatrix[4]*a+this._pInverseSceneMatrix[8]*s+this._pInverseSceneMatrix[12],this.vertexConstantData[this.cameraPositionIndex+1]=this._pInverseSceneMatrix[1]*o+this._pInverseSceneMatrix[5]*a+this._pInverseSceneMatrix[9]*s+this._pInverseSceneMatrix[13],this.vertexConstantData[this.cameraPositionIndex+2]=this._pInverseSceneMatrix[2]*o+this._pInverseSceneMatrix[6]*a+this._pInverseSceneMatrix[10]*s+this._pInverseSceneMatrix[14]}},t.prototype.invalidateProgram=function(){this._invalidProgram=!0},t.prototype.dispose=function(){this._programData.dispose(),this._programData=null,this._registerCache.dispose(),this._registerCache=null,this._sharedRegisters=null},t.prototype._updateProgram=function(){if(this._invalidProgram=!1,this._sharedRegisters=new ni,this._registerCache=new gn(this.profile),this.reset(),this._includeDependencies(),this._initRegisterIndices(),this._compileDependencies(),this._vertexCode+=this._pass._getVertexCode(this._registerCache,this._sharedRegisters),this._fragmentCode+=this._pass._getFragmentCode(this._registerCache,this._sharedRegisters),this._postAnimationFragmentCode+=this._pass._getPostAnimationFragmentCode(this._registerCache,this._sharedRegisters),this.usesPremultipliedAlpha){var t=this._sharedRegisters.shadedTarget;this._postAnimationFragmentCode+="mul "+t+".xyz, "+t+", "+t+".w\n"}this._postAnimationFragmentCode+="mov "+this._registerCache.fragmentOutputRegister+", "+this._sharedRegisters.shadedTarget+"\n",this._registerCache.removeFragmentTempUsage(this._sharedRegisters.shadedTarget),this._compileAnimationCode(),this._initConstantData();var e=this._stage.getProgramData(this._animationVertexCode+this._vertexCode,this._fragmentCode+this._animationFragmentCode+this._postAnimationFragmentCode);this._programData!=e&&(this._programData&&this._programData.dispose(),this._programData=e,e.usages++)},t.prototype._initRegisterIndices=function(){this.commonsDataIndex=-1,this.cameraPositionIndex=-1,this.curvesIndex=-1,this.uvIndex=-1,this.uvMatrixIndex=-1,this.colorTransformIndex=-1,this.secondaryUVIndex=-1,this.normalIndex=-1,this.colorBufferIndex=-1,this.tangentIndex=-1,this.sceneMatrixIndex=-1,this.sceneNormalMatrixIndex=-1,this.jointIndexIndex=-1,this.jointWeightIndex=-1,this.imageIndices.length=0,this._sharedRegisters.animatedPosition=this._registerCache.getFreeVertexVectorTemp(),this._registerCache.addVertexTempUsages(this._sharedRegisters.animatedPosition,1),this._sharedRegisters.animatableAttributes.push(this._registerCache.getFreeVertexAttribute()),this._sharedRegisters.animationTargetRegisters.push(this._sharedRegisters.animatedPosition),this._vertexCode="",this._fragmentCode="",this._postAnimationFragmentCode="",(this.usesCommonData||this.normalDependencies>0)&&(this._sharedRegisters.commons=this._registerCache.getFreeFragmentConstant(),this.commonsDataIndex=4*this._sharedRegisters.commons.index),(this.tangentDependencies>0||this.outputsNormals)&&(this._sharedRegisters.tangentInput=this._registerCache.getFreeVertexAttribute(),this.tangentIndex=this._sharedRegisters.tangentInput.index,this._sharedRegisters.animatedTangent=this._registerCache.getFreeVertexVectorTemp(),this._registerCache.addVertexTempUsages(this._sharedRegisters.animatedTangent,1),this.usesTangentSpace&&(this._sharedRegisters.bitangent=this._registerCache.getFreeVertexVectorTemp(),this._registerCache.addVertexTempUsages(this._sharedRegisters.bitangent,1)),this._sharedRegisters.animatableAttributes.push(this._sharedRegisters.tangentInput),this._sharedRegisters.animationTargetRegisters.push(this._sharedRegisters.animatedTangent)),this.normalDependencies>0&&(this._sharedRegisters.normalInput=this._registerCache.getFreeVertexAttribute(),this.normalIndex=this._sharedRegisters.normalInput.index,this._sharedRegisters.animatedNormal=this._registerCache.getFreeVertexVectorTemp(),this._registerCache.addVertexTempUsages(this._sharedRegisters.animatedNormal,1),this._sharedRegisters.animatableAttributes.push(this._sharedRegisters.normalInput),this._sharedRegisters.animationTargetRegisters.push(this._sharedRegisters.animatedNormal)),this.uvDependencies>0&&(this._sharedRegisters.uvInput=this._registerCache.getFreeVertexAttribute(),this.uvIndex=this._sharedRegisters.uvInput.index,this.usesUVTransform||(this._sharedRegisters.animatedUV=this._registerCache.getFreeVertexVectorTemp(),this._registerCache.addVertexTempUsages(this._sharedRegisters.animatedUV,1))),this._sharedRegisters.shadedTarget=this._registerCache.getFreeFragmentVectorTemp(),this._registerCache.addFragmentTempUsages(this._sharedRegisters.shadedTarget,1)},t.prototype._compileDependencies=function(){this.colorDependencies>0&&this._compileColorCode(),this.globalPosDependencies>0&&this._compileGlobalPositionCode(),this.usesPositionFragment&&this._compilePositionCode(),this.usesCurves&&this._compileCurvesCode(),this.usesColorTransform&&this._compileColorTransformCode(),this.uvDependencies>0&&this._compileUVCode(),this.secondaryUVDependencies>0&&this._compileSecondaryUVCode(),this.normalDependencies>0&&this._compileNormalCode(),this.viewDirDependencies>0&&this._compileViewDirCode(),this._vertexCode+=this._renderElements._getVertexCode(this,this._registerCache,this._sharedRegisters),this._fragmentCode+=this._renderElements._getFragmentCode(this,this._registerCache,this._sharedRegisters)},t.prototype._initConstantData=function(){var t=this._registerCache,e=this._numUsedVertexConstants=t.numUsedVertexConstants,n=this._numUsedFragmentConstants=t.numUsedFragmentConstants;if(this._numUsedStreams=t.numUsedStreams,this._numUsedTextures=t.numUsedTextures,this.vertexConstantData&&this.vertexConstantData.length===4*e||(this.vertexConstantData=new Float32Array(4*e)),this.fragmentConstantData&&this.fragmentConstantData.length===4*n||(this.fragmentConstantData=new Float32Array(4*this._registerCache.numUsedFragmentConstants)),this.viewMatrixIndex>=0){var r=new Float32Array(this.vertexConstantData.buffer,4*this.viewMatrixIndex,16);this.viewMatrix?this.viewMatrix._rawData=r:this.viewMatrix=new R(r)}else this.viewMatrix&&(this.viewMatrix=null);if(this.sceneMatrixIndex>=0){r=new Float32Array(this.vertexConstantData.buffer,4*this.sceneMatrixIndex,16);this.sceneMatrix?this.sceneMatrix._rawData=r:this.sceneMatrix=new R(r)}else this.sceneMatrix&&(this.sceneMatrix=null);if(this.commonsDataIndex>=0&&(this.fragmentConstantData[this.commonsDataIndex]=.5,this.fragmentConstantData[this.commonsDataIndex+1]=0,this.fragmentConstantData[this.commonsDataIndex+2]=1/255,this.fragmentConstantData[this.commonsDataIndex+3]=1),this.uvMatrixIndex>=0&&(this.vertexConstantData[this.uvMatrixIndex]=1,this.vertexConstantData[this.uvMatrixIndex+1]=0,this.vertexConstantData[this.uvMatrixIndex+2]=0,this.vertexConstantData[this.uvMatrixIndex+3]=0,this.vertexConstantData[this.uvMatrixIndex+4]=0,this.vertexConstantData[this.uvMatrixIndex+5]=1,this.vertexConstantData[this.uvMatrixIndex+6]=0,this.vertexConstantData[this.uvMatrixIndex+7]=0),this.colorTransformIndex>=0&&(this.fragmentConstantData[this.colorTransformIndex]=1,this.fragmentConstantData[this.colorTransformIndex+1]=1,this.fragmentConstantData[this.colorTransformIndex+2]=1,this.fragmentConstantData[this.colorTransformIndex+3]=1,this.fragmentConstantData[this.colorTransformIndex+4]=0,this.fragmentConstantData[this.colorTransformIndex+5]=0,this.fragmentConstantData[this.colorTransformIndex+6]=0,this.fragmentConstantData[this.colorTransformIndex+7]=0),this.sceneNormalMatrixIndex>=0){r=new Float32Array(this.vertexConstantData.buffer,4*this.sceneNormalMatrixIndex,16);this.sceneNormalMatrix?this.sceneNormalMatrix._rawData=r:this.sceneNormalMatrix=new R(r)}else this.sceneNormalMatrix&&(this.sceneNormalMatrix=null);this.cameraPositionIndex>=0&&(this.vertexConstantData[this.cameraPositionIndex+3]=1),this._pass._initConstantData(),this._usesAnimation&&this._renderMaterial.animationSet.doneAGALCode(this)},t.prototype._compileColorCode=function(){this._sharedRegisters.colorInput=this._registerCache.getFreeVertexAttribute(),this.colorBufferIndex=this._sharedRegisters.colorInput.index,this._sharedRegisters.colorVarying=this._registerCache.getFreeVarying(),this._vertexCode+="mov "+this._sharedRegisters.colorVarying+", "+this._sharedRegisters.colorInput+"\n"},t.prototype._compileGlobalPositionCode=function(){var t=this._sharedRegisters.globalPositionVertex=this._registerCache.getFreeVertexVectorTemp();this._registerCache.addVertexTempUsages(t,this.globalPosDependencies);var e=this._registerCache.getFreeVertexConstant();this._registerCache.getFreeVertexConstant(),this._registerCache.getFreeVertexConstant(),this._registerCache.getFreeVertexConstant(),this.sceneMatrixIndex=4*e.index;var n=this._sharedRegisters;this._vertexCode+="m44 "+n.globalPositionVertex+", "+n.animatedPosition+", "+e+"\n",this.usesGlobalPosFragment&&(n.globalPositionVarying=this._registerCache.getFreeVarying(),this._vertexCode+="mov "+n.globalPositionVarying+", "+n.globalPositionVertex+"\n")},t.prototype._compilePositionCode=function(){var t=this._sharedRegisters;t.positionVarying=this._registerCache.getFreeVarying(),this._vertexCode+="mov "+t.positionVarying+", "+t.animatedPosition+"\n"},t.prototype._compileCurvesCode=function(){var t=this._sharedRegisters;t.curvesInput=this._registerCache.getFreeVertexAttribute(),this.curvesIndex=t.curvesInput.index,t.curvesVarying=this._registerCache.getFreeVarying(),this._vertexCode+="mov "+t.curvesVarying+", "+t.curvesInput+"\n";var e=this._registerCache.getFreeFragmentSingleTemp();this._fragmentCode+="mul "+e+", "+t.curvesVarying+".y, "+t.curvesVarying+".y\nsub "+e+", "+e+", "+t.curvesVarying+".z\nmul "+e+", "+e+", "+t.curvesVarying+".x\nkil "+e+"\n"},t.prototype._compileColorTransformCode=function(){var t=this._registerCache.getFreeFragmentConstant(),e=this._registerCache.getFreeFragmentConstant(),n=this._sharedRegisters.shadedTarget;this.colorTransformIndex=4*t.index,this._postAnimationFragmentCode+="mul "+n+", "+n+", "+t+"\n",this._postAnimationFragmentCode+="add "+n+", "+n+", "+e+"\n"},t.prototype._compileUVCode=function(){var t=this._sharedRegisters;if(t.uvVarying=this._registerCache.getFreeVarying(),this.usesUVTransform){var e=this._registerCache.getFreeVertexConstant(),n=this._registerCache.getFreeVertexConstant();this.uvMatrixIndex=4*e.index,this._vertexCode+="dp4 "+t.uvVarying+".x, "+t.uvInput+", "+e+"\ndp4 "+t.uvVarying+".y, "+t.uvInput+", "+n+"\nmov "+t.uvVarying+".zw, "+t.uvInput+".zw \n"}else this._vertexCode+="mov "+t.uvVarying+", "+t.animatedUV+"\n"},t.prototype._compileSecondaryUVCode=function(){var t=this._registerCache.getFreeVertexAttribute(),e=this._sharedRegisters;this.secondaryUVIndex=t.index,e.secondaryUVVarying=this._registerCache.getFreeVarying(),this._vertexCode+="mov "+e.secondaryUVVarying+", "+t+"\n"},t.prototype._compileViewDirCode=function(){var t=this._registerCache.getFreeVertexConstant(),e=this._sharedRegisters;if(e.viewDirVarying=this._registerCache.getFreeVarying(),e.viewDirFragment=this._registerCache.getFreeFragmentVectorTemp(),this._registerCache.addFragmentTempUsages(e.viewDirFragment,this.viewDirDependencies),this.cameraPositionIndex=4*t.index,this.usesTangentSpace){var n=this._registerCache.getFreeVertexVectorTemp();this._vertexCode+="sub "+n+", "+t+", "+e.animatedPosition+"\nm33 "+e.viewDirVarying+".xyz, "+n+", "+e.animatedTangent+"\nmov "+e.viewDirVarying+".w, "+e.animatedPosition+".w\n"}else this._vertexCode+="sub "+e.viewDirVarying+", "+t+", "+e.globalPositionVertex+"\n",this._registerCache.removeVertexTempUsage(this._sharedRegisters.globalPositionVertex);this._fragmentCode+="nrm "+e.viewDirFragment+".xyz, "+e.viewDirVarying+"\nmov "+e.viewDirFragment+".w, "+e.viewDirVarying+".w\n"},t.prototype._compileNormalCode=function(){var t,e=this._sharedRegisters;if(e.normalFragment=this._registerCache.getFreeFragmentVectorTemp(),this._registerCache.addFragmentTempUsages(e.normalFragment,this.normalDependencies),this.outputsNormals&&!this.outputsTangentNormals)return this._vertexCode+=this._pass._getNormalVertexCode(this._registerCache,e),void(this._fragmentCode+=this._pass._getNormalFragmentCode(this._registerCache,e));if(this.outputsNormals&&this.usesTangentSpace||((t=new Array(3))[0]=this._registerCache.getFreeVertexConstant(),t[1]=this._registerCache.getFreeVertexConstant(),t[2]=this._registerCache.getFreeVertexConstant(),this._registerCache.getFreeVertexConstant(),this.sceneNormalMatrixIndex=4*t[0].index,e.normalVarying=this._registerCache.getFreeVarying()),this.outputsNormals)if(this.usesTangentSpace)this._vertexCode+="nrm "+e.animatedNormal+".xyz, "+e.animatedNormal+"\nnrm "+e.animatedTangent+".xyz, "+e.animatedTangent+"\ncrs "+e.bitangent+".xyz, "+e.animatedNormal+", "+e.animatedTangent+"\n",this._fragmentCode+=this._pass._getNormalFragmentCode(this._registerCache,e);else{e.tangentVarying=this._registerCache.getFreeVarying(),e.bitangentVarying=this._registerCache.getFreeVarying();var n=this._registerCache.getFreeVertexVectorTemp();this._vertexCode+="m33 "+n+".xyz, "+e.animatedNormal+", "+t[0]+"\nnrm "+e.animatedNormal+".xyz, "+n+"\nm33 "+n+".xyz, "+e.animatedTangent+", "+t[0]+"\nnrm "+e.animatedTangent+".xyz, "+n+"\nmov "+e.tangentVarying+".x, "+e.animatedTangent+".x \nmov "+e.tangentVarying+".z, "+e.animatedNormal+".x \nmov "+e.tangentVarying+".w, "+e.normalInput+".w \nmov "+e.bitangentVarying+".x, "+e.animatedTangent+".y \nmov "+e.bitangentVarying+".z, "+e.animatedNormal+".y \nmov "+e.bitangentVarying+".w, "+e.normalInput+".w \nmov "+e.normalVarying+".x, "+e.animatedTangent+".z \nmov "+e.normalVarying+".z, "+e.animatedNormal+".z \nmov "+e.normalVarying+".w, "+e.normalInput+".w \ncrs "+n+".xyz, "+e.animatedNormal+", "+e.animatedTangent+"\nmov "+e.tangentVarying+".y, "+n+".x \nmov "+e.bitangentVarying+".y, "+n+".y \nmov "+e.normalVarying+".y, "+n+".z \n",this._registerCache.removeVertexTempUsage(e.animatedTangent);var r=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(r,1);var i=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(i,1);var o=this._registerCache.getFreeFragmentVectorTemp();this._registerCache.addFragmentTempUsages(o,1),this._fragmentCode+="nrm "+r+".xyz, "+e.tangentVarying+"\nmov "+r+".w, "+e.tangentVarying+".w\t\nnrm "+i+".xyz, "+e.bitangentVarying+"\nnrm "+o+".xyz, "+e.normalVarying+"\n",this._fragmentCode+=this._pass._getNormalFragmentCode(this._registerCache,e)+"m33 "+e.normalFragment+".xyz, "+e.normalFragment+", "+r+"\nmov "+e.normalFragment+".w, "+e.normalVarying+".w\n",this._registerCache.removeFragmentTempUsage(i),this._registerCache.removeFragmentTempUsage(r),this._registerCache.removeFragmentTempUsage(o)}else this._vertexCode+="m33 "+e.normalVarying+".xyz, "+e.animatedNormal+", "+t[0]+"\nmov "+e.normalVarying+".w, "+e.animatedNormal+".w\n",this._fragmentCode+="nrm "+e.normalFragment+".xyz, "+e.normalVarying+"\nmov "+e.normalFragment+".w, "+e.normalVarying+".w\n",this.tangentDependencies>0&&(e.tangentVarying=this._registerCache.getFreeVarying(),this._vertexCode+="m33 "+e.tangentVarying+".xyz, "+e.animatedTangent+", "+t[0]+"\nmov "+e.tangentVarying+".w, "+e.animatedTangent+".w\n");this.usesTangentSpace||this._registerCache.removeVertexTempUsage(e.animatedNormal)},t.prototype._compileAnimationCode=function(){this._animationVertexCode="",this._animationFragmentCode="";var t=this._sharedRegisters;if(this._usesAnimation){var e=this._renderMaterial.animationSet;this._animationVertexCode+=e.getAGALVertexCode(this,this._registerCache,t),this.uvDependencies>0&&!this.usesUVTransform&&(this._animationVertexCode+=e.getAGALUVCode(this,this._registerCache,t)),this.usesFragmentAnimation&&(this._animationFragmentCode+=e.getAGALFragmentCode(this,this._registerCache,t.shadedTarget))}else{for(var n=t.animatableAttributes.length,r=0;r0&&!this.usesUVTransform&&(this._animationVertexCode+="mov "+t.animatedUV+","+t.uvInput+"\n")}},t.prototype.setVertexConst=function(t,e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),t*=4,this.vertexConstantData[t++]=e,this.vertexConstantData[t++]=n,this.vertexConstantData[t++]=r,this.vertexConstantData[t]=i},t.prototype.setVertexConstFromArray=function(t,e){t*=4;for(var n=0;n=0),this._maskId=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stageElements",{get:function(){return this._elementsDirty&&this._updateElements(),this._stageElements},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderMaterial",{get:function(){return this._materialDirty&&this._updateMaterial(),this._renderMaterial},enumerable:!0,configurable:!0}),e.prototype._updateMaskHack=function(t){},e.prototype.executeRender=function(t,e,n,r){var i=this._renderMaterial._activePass;i._setRenderState(this);var o=i.shader,a=this.stageElements;o.activeElements!=a&&(o.activeElements=a,a._setRenderState(this,o)),this._stageElements.draw(this,o,this._count,this._offset)},e.prototype.onClear=function(e){this._asset.removeEventListener(Li.INVALIDATE_ELEMENTS,this._onInvalidateElementsDelegate),this._asset.removeEventListener(Li.INVALIDATE_MATERIAL,this._onInvalidateMaterialDelegate),this._asset.removeEventListener(Li.INVALIDATE_STYLE,this._onInvalidateStyleDelegate),t.prototype.onClear.call(this,e),this.renderSceneTransform=null,this._stage=null,this.next=null,this.maskOwners=null,this._renderMaterial.removeOwner(this),this._renderMaterial=null,this._stageElements=null},e.prototype._onInvalidateElements=function(t){this._elementsDirty=!0},e.prototype._onInvalidateMaterial=function(t){this._materialDirty=!0,this._styleDirty=!0},e.prototype._onInvalidateStyle=function(t){this._styleDirty=!0},e.prototype._getStageElements=function(){throw new s},e.prototype._getRenderMaterial=function(){throw new s},e.prototype._getStyle=function(){throw new s},e.prototype._updateElements=function(){this._stageElements=this._getStageElements(),this._elementsDirty=!1},e.prototype._updateMaterial=function(){var t=this._getRenderMaterial();this._renderMaterial!=t&&(this._renderMaterial&&this._renderMaterial.removeOwner(this),this._renderMaterial=t,this._renderMaterial.addOwner(this)),this._materialDirty=!1},e.prototype._updateStyle=function(){var t=this._getStyle();this._materialDirty&&this._updateMaterial();var e=this._renderMaterial.numImages,n=this._renderMaterial.material;this._images.length=e,this._samplers.length=e,this._uvMatrix=t?t.uvMatrix:n.style?n.style.uvMatrix:null;for(var r,i,o,a=this._renderMaterial.material.getNumTextures(),s=0;s=0?l=p[u]:(l=d++,p[u]=l,r[l]=u),h[o++]=l;return a=new ri(e.size*e.dimensions,h.length/e.dimensions),(e=e.clone(a)).set(h),a},t.getSubVertices=function(t,e){if(!e.length)return t;var n,r,i=t.stride,o=t.bufferView,a=new Uint8Array(e.length*i),s=0,u=0,l=e.length;for(s=0;sthis.EPS},t.Behind=function(t,e,n){return t.dotProduct(n)-e<-this.EPS},t.OnPlane=function(t,e,n){return!this.InFront(t,e,n)&&!this.Behind(t,e,n)},t.Intersect=function(t,e,n,r){var i=n/(n-r);return(new Ki).copyFrom(t).lerpTo(e,i)},t.SliceNaive=function(t,e,n,r,i,o,a){var s=this.Intersect(e,n,i,o);if(i<0)if(a<0){var u=this.Intersect(n,r,o,a);t.push(new Wi([n,u,s])).push(new Wi([u,r,e])).push(new Wi([s,u,e]))}else{var l=this.Intersect(e,r,i,a);t.push(new Wi([e,s,l])).push(new Wi([s,n,r])).push(new Wi([l,s,r]))}else if(a<0){l=this.Intersect(e,r,i,a);t.push(new Wi([e,s,l])).push(new Wi([l,s,n])).push(new Wi([n,r,l]))}else{u=this.Intersect(n,r,o,a);t.push(new Wi([n,u,s])).push(new Wi([e,s,u])).push(new Wi([r,e,u]))}return t},t.SliceAllNaive=function(t,e,n){var r=new Ji;r.polySize=t.polySize;for(var i=new B,o=0;o0||(f-t)*(m-g)+(g-e)*-(_-f)>0||(_-t)*(d-m)+(m-e)*-(p-_)>0)){if(I&&-128!=I[l*b+2]){var w=(Z=.5*(((K=t-p)*(q=m-d)-(Y=_-p)*(W=e-d))/(J=(H=f-p)*q-Y*(X=g-d)))+($=(H*W-K*X)/J))*Z-$,S=I[l*b];if(w>0&&-128==S)break t;if(w<0&&127==S)break t}return!0}}if(u>150){var D=E.cells,T=D.length?E.divisions:E.divisions=Math.min(Math.ceil(Math.sqrt(u)),32),P=T/r.width,B=T/r.height,O=r.x,M=r.y;if(!D.length){D.length=T*T;for(var L=0;L0||(f-t)*(m-g)+(g-e)*-(_-f)>0||(_-t)*(d-m)+(m-e)*-(p-_)>0)){if(I&&-128!=I[l*b+2]){w=(Z=.5*(((K=t-p)*(q=m-d)-(Y=_-p)*(W=e-d))/(J=(H=f-p)*q-Y*(X=g-d)))+($=(H*W-K*X)/J))*Z-$,S=I[l*b];if(w>0&&-128==S)continue;if(w<0&&127==S)continue}return E.lastCollisionIndex=L,!0}}return E.lastCollisionIndex=-1,!1}for(L=0;L0||(f-t)*(m-g)+(g-e)*-(_-f)>0||(_-t)*(d-m)+(m-e)*-(p-_)>0)){if(I&&-128!=I[l*b+2]){var H,X,Y,q,K,W,J,$,Z;w=(Z=.5*(((K=t-p)*(q=m-d)-(Y=_-p)*(W=e-d))/(J=(H=f-p)*q-Y*(X=g-d)))+($=(H*W-K*X)/J))*Z-$,S=I[l*b];if(w>0&&-128==S)continue;if(w<0&&127==S)continue}return E.lastCollisionIndex=L,!0}}return E.lastCollisionIndex=-1,!1},t.getBoxBounds=function(t,e,n,r,i,o,a){var s;void 0===a&&(a=0);var u,l,c=t.dimensions,h=t.stride,p=0,d=0,f=0,g=0,_=0,m=0;if(e?(l=o*e.dimensions,u=e.get(o,a),s=t.get(t.count)):(l=o,s=t.get(o,a)),0==l)return i;var y,A,v,b,C,I=0;for(n&&(C=n._rawData),null==i?(i=r||new O,y=u?u[I]*h:I*h,n?3==c?(A=s[y]*C[0]+s[y+1]*C[4]+s[y+2]*C[8]+C[12],v=s[y]*C[1]+s[y+1]*C[5]+s[y+2]*C[9]+C[13],b=s[y]*C[2]+s[y+1]*C[6]+s[y+2]*C[10]+C[14]):(A=s[y]*C[0]+s[y+1]*C[4]+C[12],v=s[y]*C[1]+s[y+1]*C[5]+C[13]):(A=s[y],v=s[y+1],b=3==c?s[y+2]:0),g=p=A,_=d=v,m=f=3==c?b:0,I++):(g=(p=i.x)+i.width,_=(d=i.y)+i.height,m=(f=i.z)+i.depth);Ig&&(g=A),v_&&(_=v),3==c&&(bm&&(m=b));return i.width=g-(i.x=p),i.height=_-(i.y=d),i.depth=m-(i.z=f),i},t.getSphereBounds=function(t,e,n,r,i,o,a){void 0===a&&(a=0);for(var s,u,l,c,h=t.get(o,a),p=t.dimensions,d=t.stride,f=0,g=o*d,_=0;_=l[d]&&(h.from=h.to=d),u.y>=c[d]&&(p.from=p.to=d);for(d=0;d<3;d++)u.right>l[d]&&d>=h.from&&(h.to=d),u.bottom>c[d]&&d>=p.from&&(p.to=d);var f=Array.from({length:9},(function(t){return 0}));if(s.scale9Indices=f,s.scale9Grid=r,s.originalScale9Bounds=n,o){if(2!==s.positions.dimensions)throw"Emit UV support only 2D position buffer";var g=s.positions.get(s._numVertices,0).slice(0),_=a.rawData;for(d=0;d=l[d%3]&&w=c[d/3|0]&&S0?1:-1),F=f*X.x+g*+X.y+_*X.z,!q&&F<0||q&&0!=F){if(k=-(f*E+g*x+_*w),s=-(f*H.x+g*H.y+_*H.z+k)/F,Q=(h=(m=H.x+s*X.x)-E)*D+(p=(y=H.y+s*X.y)-x)*P+(d=(A=H.z+s*X.z)-w)*O,G=h*M+p*L+d*N,v=1/((j=D*D+P*P+O*O)*(V=M*M+L*L+N*N)-(U=D*M+P*L+O*N)*U),!isFinite(v))continue;if(I=v*(-U*Q+j*G),(C=v*(V*Q-U*G))<0)continue;if(I<0)continue;if(!((b=1-C-I)<0)&&s>0&&s=0},e.isIE=!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g),e.assetType="[asset TriangleElements]",e}(eo),oo=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._vaoIsInvalid=!0,r._triangleElements=e,!r._triangleElements.isDynamic&&Ri&&n.context.hasVao&&(r._vao=n.context.createVao()),r}return n(e,t),e.prototype._onInvalidateIndices=function(e){t.prototype._onInvalidateIndices.call(this,e),this._vaoIsInvalid=!0},e.prototype._onInvalidateVertices=function(e){t.prototype._onInvalidateVertices.call(this,e),this._vaoIsInvalid=!0},e.prototype.onInvalidate=function(e){t.prototype.onInvalidate.call(this,e),this._vaoIsInvalid=!0},e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._triangleElements=null,this._vaoIsInvalid=!0,this._vao&&(this._vao.dispose(),this._vao=null)},e.prototype._setRenderState=function(e,n){this._vao&&this._vao.bind(),t.prototype._setRenderState.call(this,e,n),this._vao&&!this._vaoIsInvalid||(n.normalIndex>=0&&this._triangleElements.autoDeriveNormals&&this._triangleElements.normals,n.tangentIndex>=0&&this._triangleElements.autoDeriveTangents&&this._triangleElements.tangents,n.curvesIndex>=0&&this.activateVertexBufferVO(n.curvesIndex,this._triangleElements.getCustomAtributes("curves")),n.uvIndex>=0&&this.activateVertexBufferVO(n.uvIndex,this._triangleElements.uvs||this._triangleElements.positions),n.secondaryUVIndex>=0&&this.activateVertexBufferVO(n.secondaryUVIndex,this._triangleElements.getCustomAtributes("secondaryUVs")||this._triangleElements.uvs||this._triangleElements.positions),n.normalIndex>=0&&this.activateVertexBufferVO(n.normalIndex,this._triangleElements.normals),n.tangentIndex>=0&&this.activateVertexBufferVO(n.tangentIndex,this._triangleElements.tangents),n.jointIndexIndex>=0&&this.activateVertexBufferVO(n.jointIndexIndex,this._triangleElements.jointIndices),n.jointWeightIndex>=0&&this.activateVertexBufferVO(n.jointIndexIndex,this._triangleElements.jointWeights),this.activateVertexBufferVO(0,this._triangleElements.positions),this._vaoIsInvalid=!1)},e.prototype.draw=function(t,e,n,r){var i=e.supportModernAPI;if(e.sceneMatrixIndex>=0)e.sceneMatrix.copyFrom(t.renderSceneTransform,!0),e.viewMatrix.copyFrom(e.view.viewMatrix3D,!0);else{var o=R.CALCULATION_MATRIX;o.copyFrom(t.renderSceneTransform),o.append(e.view.viewMatrix3D),e.viewMatrix.copyFrom(o,!0)}if(i)e.syncUniforms();else{var a=this._stage.context;a.setProgramConstantsFromArray($t.VERTEX,e.vertexConstantData),a.setProgramConstantsFromArray($t.FRAGMENT,e.fragmentConstantData)}this._indices?this.getIndexBufferGL().draw(Kt.TRIANGLES,3*r,3*n||this.numIndices):this._stage.context.drawVertices(Kt.TRIANGLES,r,n||this.numVertices),this._vao&&this._vao.unbind()},e.prototype._pGetOverflowElements=function(){return new e(this._triangleElements,this._stage)},e}(Xi),ao=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._includeDependencies=function(t){},e.prototype._getVertexCode=function(t,e,n){var r="",i=t.globalPosDependencies>0?n.globalPositionVertex:n.animatedPosition,o=e.getFreeVertexConstant();if(e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.viewMatrixIndex=4*o.index,t.projectionDependencies>0){n.projectionFragment=e.getFreeVarying();var a=e.getFreeVertexVectorTemp();r+="m44 "+a+", "+i+", "+o+"\nmov "+n.projectionFragment+", "+a+"\nmov op, "+a+"\n"}else r+="m44 op, "+i+", "+o+"\n";return r},e.prototype._getFragmentCode=function(t,e,n){return""},e}(Mi);ro.registerElements(ao,io),Yr.registerAbstraction(oo,io);var so=function(){function t(){}return t.prototype.sortBlendedRenderables=function(t){var e,n,r,i,o,a;if(!t||!t.next)return t;for(r=t,n=t.next;n;)(n=n.next)&&(r=r.next,n=n.next);if(e=r.next,r.next=null,t=this.sortBlendedRenderables(t),e=this.sortBlendedRenderables(e),!t)return e;if(!e)return t;for(;t&&e;)t.zIndexh?1:-1}else s=u>l?1:-1;s<0?(a=t,t=t.next):(a=e,e=e.next),i?(o.next=a,o=a):(i=a,o=a)}return t?o.next=t:e&&(o.next=e),i},t}(),uo=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._cameraForward=new B,r._depthTextureDirty=!0,r._depthPrepass=!1,r._pNumElements=0,r._disableColor=!1,r._disableClear=!1,r._renderBlended=!0,r._numCullPlanes=0,r._partition=e,r._maskId=e.rootNode.getMaskId(),r._onSizeInvalidateDelegate=function(t){return r.onSizeInvalidate(t)},r._onContextUpdateDelegate=function(t){return r.onContextUpdate(t)},r.renderableSorter=new so,r._renderGroup=n.renderGroup,r._renderGroup.addEventListener(Be.CONTEXT_CREATED,r._onContextUpdateDelegate),r._renderGroup.addEventListener(Be.CONTEXT_RECREATED,r._onContextUpdateDelegate),r._renderGroup.addEventListener(ae.INVALIDATE_SIZE,r._onSizeInvalidateDelegate),r._view=r._renderGroup.view,r._stage=r._renderGroup.stage,r._stage.context&&(r._context=r._stage.context),r}return n(e,t),Object.defineProperty(e.prototype,"partition",{get:function(){return this._partition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cullPlanes",{get:function(){return this._customCullPlanes},set:function(t){this._customCullPlanes=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderBlended",{get:function(){return this._renderBlended},set:function(t){this._renderBlended=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disableColor",{get:function(){return this._disableColor},set:function(t){this._disableColor!=t&&(this._disableColor=t,this._invalid=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disableClear",{get:function(){return this._disableClear},set:function(t){this._disableClear!=t&&(this._disableClear=t,this._invalid=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numElements",{get:function(){return this._pNumElements},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._renderGroup.removeEventListener(Be.CONTEXT_CREATED,this._onContextUpdateDelegate),this._renderGroup.removeEventListener(Be.CONTEXT_RECREATED,this._onContextUpdateDelegate),this._renderGroup.removeEventListener(ae.INVALIDATE_SIZE,this._onSizeInvalidateDelegate),this._onContextUpdateDelegate=null,this._onSizeInvalidateDelegate=null,this._view=null,this._stage=null,this._context=null},e.prototype.render=function(t,e,n,r){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this._enableDepthAndStencil=t,this._surfaceSelector=e,this._mipmapSelector=n,this._maskConfig=r,this._maskConfig&&(this._disableClear=!0,this._disableColor=!0),this._renderGroup.update(this._partition),this._view.target&&this._view.target.invalidateMipmaps(),this._view.clear(!this._depthPrepass&&!this._disableClear,t,e,n,!this._view.shareContext||this._view.target?Yt.ALL:Yt.DEPTH),this._context.setBlendFactors(Xt.ONE,Xt.ZERO),this._context.setDepthTest(!0,qt.LESS_EQUAL),this.executeRender(t,e,n),this._view.shareContext&&!this._view.target||this._snapshotRequired&&this._snapshotBitmapImage2D&&(this._context.drawToBitmapImage2D(this._snapshotBitmapImage2D),this._snapshotRequired=!1)},e.prototype.traverse=function(){this._pBlendedRenderableHead=null,this._pOpaqueRenderableHead=null,this._pNumElements=0,this._activeMaskOwners=null,this._cameraTransform=this._view.projection.transform.matrix3D,this._cameraForward=this._view.projection.transform.forwardVector,this._cullPlanes=this._customCullPlanes?this._customCullPlanes:this._view.projection.viewFrustumPlanes,this._numCullPlanes=this._cullPlanes?this._cullPlanes.length:0,e._collectionMark++,this._partition.traverse(this),this.renderableSorter&&(this._pOpaqueRenderableHead=this.renderableSorter.sortOpaqueRenderables(this._pOpaqueRenderableHead),this._pBlendedRenderableHead=this.renderableSorter.sortBlendedRenderables(this._pBlendedRenderableHead)),this._invalid=!1},e.prototype._iRenderCascades=function(t,e,n,r){},e.prototype.executeRender=function(t,e,n){this.traverse(),this._disableColor?this._context.setColorMask(!1,!1,!1,!1):this._context.setColorMask(!0,!0,!0,!0),this._maskConfig?this._context.enableStencil():this._context.disableStencil(),this.drawRenderables(this._pOpaqueRenderableHead),this._renderBlended&&this.drawRenderables(this._pBlendedRenderableHead)},e.prototype.onInvalidate=function(e){t.prototype.onInvalidate.call(this,e),this._renderGroup.invalidate()},e.prototype.queueSnapshot=function(t){this._snapshotRequired=!0,this._snapshotBitmapImage2D=t},e.prototype.drawRenderables=function(t){for(var e,n,r,i;t;){for(i=(r=t.renderMaterial)?r.numPasses:1,(this._activeMasksDirty||this._checkMaskOwners(t.maskOwners))&&((this._activeMaskOwners=t.maskOwners)?this._renderMasks(this._activeMaskOwners):this._maskConfig||this._context.disableStencil(),this._activeMasksDirty=!1),e=0;e>1,n=this._maskConfig?Math.pow(2,e+1<<1):1,r=n;if(r>255)console.warn("[RenderBase] Mask bit overflow, maskConfig %d",r);else{this._context.enableStencil();for(var i,o,a,s=t.length,u=!0,l=0;l\n"},e.prototype.activate=function(){var t=this._shader.renderMaterial.samplers[this._imageIndex];this._shader.renderMaterial.images[this._imageIndex].activate(this._textureIndex,t)},e.prototype._setRenderState=function(t){var e=t.samplers[this._imageIndex],n=t.images[this._imageIndex];n&&e&&n.activate(this._textureIndex,e)},e}(Gi);Di.registerAbstraction(fo,po);var go=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this,n)||this;return r.setNumImages(1),r.image=e,r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sampler",{get:function(){return this._samplers[0]},set:function(t){this._samplers[0]!=t&&this.setSamplerAt(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return this._images[0]},set:function(t){if(this._images[0]!=t){if(!Le.isImage2DValid(t))throw new a("Invalid imageData: Width and height must be power of 2 and cannot exceed 2048");this.setImageAt(t,0)}},enumerable:!0,configurable:!0}),e.assetType="[texture ImageTexture2D]",e}(co),_o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getFragmentCode=function(e,n,r,i){var o,a="";if(this._texture.mappingMode==Si.RADIAL&&(a+="mul "+(o=n.getFreeFragmentVectorTemp())+".xy, "+i+", "+i+"\n",a+="add "+o+".x, "+o+".x, "+o+".y\n",a+="sub "+o+".y, "+o+".y, "+o+".y\n",a+="sqt "+o+".x, "+o+".x, "+o+".x\n",i=o),this._shader.useImageRect){var s=n.getFreeFragmentConstant();this._samplerIndex=4*s.index,a+="mul "+(o=n.getFreeFragmentVectorTemp())+", "+i+", "+s+".xy\n",a+="add "+o+", "+o+", "+s+".zw\n",i=o}if(a+=t.prototype._getFragmentCode.call(this,e,n,r,i),this._shader.usesPremultipliedAlpha){var u=n.getFreeFragmentSingleTemp();a+="sge "+u+" #native vec4(0.0) native#, "+e+".w \n",a+="add "+u+", "+u+","+e+".w \n",a+="div "+e+".xyz, "+e+", "+u+"\n"}return a},e.prototype.activate=function(){t.prototype.activate.call(this);var e=this._shader.renderMaterial.samplers[this._imageIndex];if(this._shader.useImageRect){var n=this._samplerIndex,r=this._shader.fragmentConstantData;e.imageRect?(r[n]=e.imageRect.width,r[n+1]=e.imageRect.height,r[n+2]=e.imageRect.x,r[n+3]=e.imageRect.y):(r[n]=1,r[n+1]=1,r[n+2]=0,r[n+3]=0)}},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e);var n=e.samplers[this._imageIndex];if(this._shader.useImageRect&&n){var r=this._samplerIndex,i=this._shader.fragmentConstantData;n.imageRect?(i[r]=n.imageRect.width,i[r+1]=n.imageRect.height,i[r+2]=n.imageRect.x,i[r+3]=n.imageRect.y):(i[r]=1,i[r+1]=1,i[r+2]=0,i[r+3]=0)}},e}(fo);Di.registerAbstraction(_o,go);var mo=function(t){function e(n,r){var i=t.call(this,n,r)||this;return i._renderMatrix=new R,i._bounds=new O,i._paddedBounds=new q,i._boundsScale=1,i._textures=new Array,i._blendMode=pn.NORMAL,i.animateUVs=!1,i.bothSides=!1,i.curves=!1,i.imageRect=!1,i.useColorTransform=!0,i.alphaThreshold=0,i._lockBlendMode=!1,i.node=n.rootNode,i._onTextureInvalidate=function(t){return i.invalidate()},i._onInvalidateProperties=function(t){return i._invalidateStyle()},i._onInvalidateParentNode=function(t){return i.onInvalidate(null)},n.parent&&(i._parentNode=n.parent.rootNode,i._parentNode.addEventListener(Ft.INVALIDATE_MATRIX3D,i._onInvalidateParentNode)),i.node.container.addEventListener(Li.INVALIDATE_STYLE,i._onInvalidateParentNode),i.style=new Qi,i.texture=new go,i._boundsPicker=i._renderGroup.pickGroup.getBoundsPicker(i._partition),i._boundsDirty=!0,i._traverserClass=e,i}return n(e,t),e.isValidForCache=function(t){},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.getPaddedBounds=function(){return this._boundsDirty&&this._updateBounds(),this._paddedBounds},e.prototype.getBounds=function(){return this._boundsDirty&&this._updateBounds(),this._bounds},Object.defineProperty(e.prototype,"blendMode",{get:function(){if(this._lockBlendMode)return pn.LAYER;var t=this.node.container.blendMode;switch(t){case pn.LAYER:case pn.MULTIPLY:case pn.NORMAL:case pn.ADD:case pn.SCREEN:case pn.ALPHA:return t}return pn.LAYER},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._boundsDirty&&this._updateBounds(),this._style},set:function(t){this._style!=t&&(this._style&&this._style.removeEventListener(Vi.INVALIDATE_PROPERTIES,this._onInvalidateProperties),this._style=t,this._style&&this._style.addEventListener(Vi.INVALIDATE_PROPERTIES,this._onInvalidateProperties),this._invalidateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.removeTexture(this._texture),this._texture=t,this._texture&&this.addTexture(this._texture),this.invalidatePasses())},enumerable:!0,configurable:!0}),e.prototype.render=function(e,n,r,i){var o=this;void 0===e&&(e=!0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0);var a,s=this._stage,u=this._style.image;if(!u)return t.prototype.render.call(this,e,n,r,i);2===s.context.glVersion&&we.ENABLE_MULTISAMPLE_TEXTURE&&(a=s.filterManager.popTemp(u.width,u.height,!0)),this._lockBlendMode=!0,this.node.colorTransformDisabled=!1,this._initRender(a||u),t.prototype.render.call(this,e,n,r,i),this.node.colorTransformDisabled=this.node.transformDisabled,this._lockBlendMode=!1;var l=this.node.container.filters;l&&l.length>0?(l.forEach((function(t){return t&&(t.imageScale=o._boundsScale)})),s.filterManager.applyFilters(a||u,u,u.rect,u.rect,l)):a&&s.filterManager.copyPixels(a,u,u.rect,u.rect.topLeft,!1),a&&s.filterManager.pushTemp(a)},e.prototype.preActivateRenderPass=function(){},e.prototype.getNumTextures=function(){return this._textures.length},e.prototype.getTextureAt=function(t){return this._textures[t]},e.prototype.addTexture=function(t){this._textures.push(t),t.addEventListener(l.INVALIDATE,this._onTextureInvalidate),this.invalidate()},e.prototype.removeTexture=function(t){this._textures.splice(this._textures.indexOf(t),1),t.removeEventListener(l.INVALIDATE,this._onTextureInvalidate),this.invalidate()},e.prototype.requestAbstraction=function(t){return yo},e.prototype.invalidatePasses=function(){this.dispatchEvent(new Pi(Pi.INVALIDATE_PASSES,this))},e.prototype.enterNode=function(e){var n=t.prototype.enterNode.call(this,e);return n&&e.boundsVisible&&this.applyEntity(e.getBoundsPrimitive(this._renderGroup.pickGroup)),n},e.prototype.onInvalidate=function(e){t.prototype.onInvalidate.call(this,e),this.dispatchEvent(new Li(Li.INVALIDATE_ELEMENTS,this)),this.dispatchEvent(new Li(Li.INVALIDATE_STYLE,this)),this.invalidate(),this.invalidatePasses(),this._boundsDirty=!0},e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this.texture.clear(),this.texture=null,this.style.image.clear(),this.style.image=null},e.prototype._invalidateStyle=function(){this.dispatchEvent(new Li(Li.INVALIDATE_STYLE,this))},e.prototype._updateBounds=function(){this._boundsDirty=!1;var t=this._renderMatrix,e=this.node.container,n=this._paddedBounds,r=this.rootView,i=r?Math.min(3,r.projection.scale):1;this._boundsScale=i,this._parentNode?t.copyFrom(this._parentNode.getMatrix3D()):t.identity(),1!==i&&t.appendScale(i,i,i);var o=this._boundsPicker.getBoxBounds(this.node,!0,!0);o?(this._bounds.copyFrom(o),t.transformBox(this._bounds,this._bounds),t.invert(),n.setTo(this._bounds.x,this._bounds.y,this._bounds.width,this._bounds.height),e.filters&&e.filters.length>0&&(e.filters.forEach((function(t){return t&&(t.imageScale=i)})),this._stage.filterManager.computeFiltersPadding(n,e.filters,n)),n.x=n.x-2|0,n.y=n.y-2|0,n.width=n.width+4|0,n.height=n.height+4|0,this._style.image?this._style.image._setSize(n.width,n.height):(this._style.image=new Fe(n.width,n.height,!1),this._style.sampler=new Me(!1,Fi,!1))):console.error("[CachedRenderer] Bounds invalid, supress calculation",this.node)},e.prototype._initRender=function(t){var e=this._paddedBounds,n=this._boundsScale,r=this._renderMatrix,i=e.x-this._bounds.x,o=e.y-this._bounds.y,a=this._view,s=a.projection;r._rawData[14]=-1e3,s.far=4e3,s.near=1,s.transform.matrix3D=r,s.ratio=t.width/t.height,s.originX=-1-2*(e.x-.5*i)/t.width,s.originY=-1-2*(e.y-.5*o)/t.height,s.scale=1e3*n/t.height,a.target=t},e.registerMaterial=function(t,n){e.materialClassPool[n.assetType]=t},e.assetType="[renderer CacheRenderer]",e.materialClassPool={},e.renderGroupPool={},e.defaultBackground=0,e}(uo),yo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getStageElements=function(){var t=this._asset,e=t.getPaddedBounds(),n=t.getBounds(),r=e.x-n.x,i=e.y-n.y,o=R.CALCULATION_MATRIX;o.copyFrom(this.renderSceneTransform),o.appendScale(t._boundsScale,t._boundsScale,t._boundsScale),o.appendTranslation(.5*r,.5*i,0),o.invert();var a=[e.left,e.top,0,e.right,e.bottom,0,e.right,e.top,0,e.left,e.top,0,e.left,e.bottom,0,e.right,e.bottom,0];o.transformVectors(a,a);var s=this._elements;return s?s.setPositions(a):((s=this._elements=new io(new ri(5,6))).setPositions(a),s.setUVs([0,0,1,1,1,0,0,0,0,1,1,1])),s.getAbstraction(this._stage)},e.prototype.executeRender=function(e,n,r,i){void 0===e&&(e=!0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),t.prototype.executeRender.call(this,e,n,r,i)},e.prototype._getRenderMaterial=function(){return this._asset.getAbstraction(this.renderGroup.getRenderElements(this.stageElements.elements))},e.prototype._getStyle=function(){return this._asset.style},e.assetType="[render Renderer]",e}(Ui);mo.registerMaterial(qi,mo);var Ao=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.enterNode=function(e){return e._collectionMark!=uo._collectionMark&&e.isCastingShadow()?t.prototype.enterNode.call(this,e):(e._collectionMark=uo._collectionMark,!1)},e.registerMaterial=function(t,n){e.materialClassPool[n.assetType]=t},e.materialClassPool={},e.renderGroupPool={},e.defaultBackground=0,e}(uo),vo=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.enterNode=function(e){return e._collectionMark!=uo._collectionMark&&e.isCastingShadow()?t.prototype.enterNode.call(this,e):(e._collectionMark=uo._collectionMark,!1)},e.registerMaterial=function(t,n){e.materialClassPool[n.assetType]=t},e.materialClassPool={},e.renderGroupPool={},e.defaultBackground=0,e}(uo),bo=function(){function t(t){var e=this;this._filterSizesInvalid=!0,this._onRTTResizeDelegate=function(t){return e.onRTTResize(t)},this._stage=t,this._rttManager=Kr.getInstance(t),this._rttManager.addEventListener(Oe.RESIZE,this._onRTTResizeDelegate),this._sampler=new Me(!1,!1,!1),this._renderToTextureRect=new q}return t.prototype.onRTTResize=function(t){this._filterSizesInvalid=!0},Object.defineProperty(t.prototype,"requireDepthRender",{get:function(){return this._requireDepthRender},enumerable:!0,configurable:!0}),t.prototype.getMainInputTexture=function(t){return this._filterTasksInvalid&&this.updateFilterTasks(t),this._mainInputTexture},Object.defineProperty(t.prototype,"filters",{get:function(){return this._filters},set:function(t){if(this._filters=t,this._filterTasksInvalid=!0,this._requireDepthRender=!1,this._filters){for(var e=0;e1&&(a.setProgram(this._tasks[0].getProgram(t)),a.setVertexBufferAt(this._tasks[0]._positionIndex,u,0,re.FLOAT_2)),i=0;ir*x))if(!((G=b*E-C*I)>x*x||G<0))return!0}if(l>150){var w=A.cells,S=w.length?A.divisions:A.divisions=Math.min(Math.ceil(Math.sqrt(l)),32),D=S/i.width,T=S/i.height,P=i.x,B=i.y;if(!w.length){w.length=S*S;for(var O=0;Or*x))if(!((G=b*E-C*I)>x*x||G<0))return A.lastCollisionIndex=O,!0}return A.lastCollisionIndex=-1,!1}for(O=0;Or*x))if(!((G=b*E-C*I)>x*x||G<0))return A.lastCollisionIndex=O,!0}return A.lastCollisionIndex=-1,!1},t.getBoxBounds=function(t,e,n,r,i,o,a,s){var u;void 0===s&&(s=0);var l,c,h=t.dimensions,p=t.stride,d=0,f=0,g=0,_=0;if(e?(c=a*e.dimensions,l=e.get(a,s),u=t.get(t.count)):(c=a,u=t.get(a,s)),0==c)return o;var m,y,A,v,b=0;n&&(v=n._rawData);for(b=0;bg&&(g=y),A_&&(_=A));var C=new O(d,f);return C.right=g,C.bottom=_,this.mergeThinkness(C,r,n),C.union(o,o||i)},t.mergeThinkness=function(t,e,n){var r,i=null===(r=n)||void 0===r?void 0:r._rawData,o=n?e.x*i[0]+e.y*i[4]:e.x,a=n?e.x*i[1]+e.y*i[5]:e.y;return t.x-=o,t.y-=a,t.right+=o,t.bottom+=a,t},t.getSphereBounds=function(t,e,n,r,i,o,a){void 0===a&&(a=0);for(var s,u,l,c,h=t.get(o,a),p=t.dimensions,d=t.stride,f=0,g=o*d,_=0;_s[h]&&(l.from=l.to=h),a.y>u[h]&&(c.from=c.to=h);for(h=0;h<3;h++)a.right>=s[h]&&h>=l.from&&(l.to=h),a.bottom>=u[h]&&h>=c.from&&(c.to=h);o.scale9Grid=r,o.originalScale9Bounds=n;var p=o.scale9Indices=Array.from({length:9},(function(t){return 0})),d=this.restoreLineSegments(o);if(l.from===l.to&&c.from===c.to){var f=new Float32Array(3*d.length);for(h=0;hu[C]&&.5*(y.y+m.y)<=u[C+1]&&(v=C);for(var S=l.from;S<=l.to;S++){var D=s[S+1]-y.x,T=s[S+1]-m.x;if(D*T<0){x=D/(D-T),w=new B(y.x+x*(m.x-y.x),y.y+x*(m.y-y.y),0,0);d.push(w,m,y,w),b=!0;break}.5*(y.x+m.x)>s[S]&&.5*(y.x+m.x)<=s[S+1]&&(A=S)}if(b)break}b||(g[A+3*v]||(g[A+3*v]=[]),g[A+3*v].push(y.x,y.y,0,m.x,m.y,0),_+=2)}var P=new Float32Array(3*_),O=new Float32Array(_);O.fill(o.thickness.get(1)[0]);var M=0;for(h=0;h<9;h++)g[h]&&(P.set(g[h],3*M),M+=g[h].length/3,p[h]=M);return o.initialScale9Positions=P,o.setPositions(P),o.setThickness(O),o.invalidate(),o},t.restoreLineSegments=function(t){var e,n,r,i=t.positions,o=t.indices,a=t._numElements||t._numVertices,s=i.dimensions,u=i.stride;o?(r=a*o.dimensions,e=o.get(a,0),n=i.get(i.count)):(r=a,n=i.get(a,0));for(var l=[],c=0;c.5?this.half_thickness:.5/this._thicknessScale.x,this._thicknessScale.y=!n||this.half_thickness*this._thicknessScale.y>.5?this.half_thickness:.5/this._thicknessScale.y):this.scaleMode==Io.HAIRLINE&&(this._thicknessScale.x=.5/this._thicknessScale.x,this._thicknessScale.y=.5/this._thicknessScale.y)):this._thicknessScale.identity(),this._thicknessScale},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colors",{get:function(){return this._colors||this.setColors(this._colors),this._colors},enumerable:!0,configurable:!0}),e.prototype.prepareScale9=function(t,e,n,r,i){return xo.prepareScale9(this,t,e,n)},e.prototype.updateScale9=function(t,e){this.scale9Indices&&xo.updateScale9(this,this.originalScale9Bounds,t,e,!1,!1)},e.prototype.getBoxBounds=function(t,e,n,r,i,o,a,s){return void 0===e&&(e=null),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=0),void 0===s&&(s=0),a=a||this._numElements||this._numVertices,this._boundsRequests++,xo.getBoxBounds(this.positions,this.indices,r,this.getThicknessScale(t,e,n),i,o,a,s)},e.prototype.getSphereBounds=function(t,e,n,r,i,o,a,s){return void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=0),void 0===s&&(s=0),xo.getSphereBounds(this.positions,e,n,i,o,a||this._numVertices,s)},e.prototype.hitTestPoint=function(t,e,n,r,i,o,a,s,u,l){void 0===a&&(a=0),void 0===s&&(s=0);var c=this.getThicknessScale(t,e,!0),h=(c.x+c.y)/2;return xo.hitTest(n,r,0,h,o,this,a||this._numElements||this._numVertices,s)},e.prototype.setPositions=function(t,e){void 0===e&&(e=0);var n=2*this.dimension;if(t instanceof ai)this.clearVertices(this._positions),this._positions=t;else if(t){for(var r=0,i=0,o=0,a=new Float32Array(4*n*(t.length/6)),s=new Uint16Array(t.length);r=0&&this.activateVertexBufferVO(n.colorBufferIndex,this._lineElements.colors),this.activateVertexBufferVO(0,this._lineElements.positions,r.dimension),this.activateVertexBufferVO(o.secondaryPositionIndex,this._lineElements.positions,r.dimension,2*r.dimension*2),this.activateVertexBufferVO(o.thicknessIndex,this._lineElements.thickness),n.uvIndex>=0&&this.activateVertexBufferVO(n.uvIndex,this._lineElements.positions,2),this._vaoIsInvalid=!1);var a=o.uOffsets.oMisc,s=n.vertexConstantData;this._scale.copyFrom(e.node.getMatrix3D().decompose()[3]);var u=this._lineElements.scaleMode,l=this._lineElements.half_thickness;u==Io.NORMAL?(s[a+0]=l*this._scale.x*this._thickness/1e3>.5/(i.focalLength*i.pixelRatio)?this._scale.x*this._thickness/1e3:.5/(l*i.focalLength*i.pixelRatio),s[a+1]=l*this._scale.y*this._thickness/1e3>.5/i.focalLength?this._scale.y*this._thickness/1e3:.5/(l*i.focalLength)):u==Io.HAIRLINE?(s[a+0]=this._thickness/(i.focalLength*i.pixelRatio),s[a+1]=this._thickness/i.focalLength):(s[a+0]=this._thickness/Math.min(i.width,i.height),s[a+1]=this._thickness/Math.min(i.width,i.height)),s[a+2]=i.projection.near},e.prototype.draw=function(t,e,n,r){var i=this._stage.context;e.viewMatrix.copyFrom(e.view.frustumMatrix3D,!0);var o=R.CALCULATION_MATRIX;o.copyFrom(t.node.getMatrix3D()),o.append(e.view.projection.transform.inverseMatrix3D),e.sceneMatrix.copyFrom(o,!0),i.setProgramConstantsFromArray($t.VERTEX,e.vertexConstantData),i.setProgramConstantsFromArray($t.FRAGMENT,e.fragmentConstantData),this._indices?this.getIndexBufferGL().draw(Kt.TRIANGLES,3*r,3*n||this.numIndices):this._stage.context.drawVertices(Kt.TRIANGLES,r,n||this.numVertices),this._vao&&this._vao.unbind()},e.prototype._pGetOverflowElements=function(){return new e(this._lineElements,this._stage)},e}(Xi),Do=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.secondaryPositionIndex=-1,e.thicknessIndex=-1,e.uOffsets={oMisc:0},e}return n(e,t),e.prototype._includeDependencies=function(t){},e.prototype._getVertexCode=function(t,e,n){var r=t.globalPosDependencies>0?n.globalPositionVertex:n.animatedPosition,i=e.getFreeVertexAttribute();this.secondaryPositionIndex=i.index;var o=e.getFreeVertexAttribute();this.thicknessIndex=o.index;var a=e.getFreeVertexConstant();e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.viewMatrixIndex=4*a.index;var s=e.getFreeVertexConstant();this.uOffsets.oMisc=4*s.index;var u=e.getFreeVertexConstant();e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.sceneMatrixIndex=4*u.index;var l=e.getFreeVertexVectorTemp();e.addVertexTempUsages(l,1);var c=e.getFreeVertexVectorTemp();e.addVertexTempUsages(c,1);var h=e.getFreeVertexVectorTemp();e.addVertexTempUsages(h,1);var p=e.getFreeVertexVectorTemp();e.addVertexTempUsages(p,1);var d=e.getFreeVertexVectorTemp();e.addVertexTempUsages(d,1);var f=e.getFreeVertexVectorTemp();e.addVertexTempUsages(f,1);var g=["m44 "+l+", "+r+", "+u,"m44 "+c+", "+i+", "+u,"sub "+h+", "+c+", "+l+" \t\t\t","slt "+p+".x, "+l+".z, "+s+".z","sub "+p+".y, #native( 1.0 )native#, "+p+".x\t\t\t","add "+f+".x, "+l+".z, "+s+".z\t\t\t","sub "+f+".y, "+l+".z, "+c+".z\t\t\t","seq "+f+".z, "+f+".y, #native( vec4(0.0) )native#","add "+f+".y, "+f+".y, "+f+".z","div "+f+".z, "+f+".x, "+f+".y","mul "+f+".xyz, "+f+".zzz, "+h+".xyz\t","add "+d+".xyz, "+l+".xyz, "+f+".xyz\t","mov "+d+".w, #native( 1.0 )native#\t\t\t","mul "+l+", "+l+", "+p+".yyyy\t\t\t","mul "+d+", "+d+", "+p+".xxxx\t\t\t","add "+l+", "+l+", "+d+"\t\t\t\t","nrm "+h+".xyz, "+h+".xyz\t\t\t","nrm "+p+".xyz, "+l+".xyz\t\t\t","mov "+p+".w, #native( 1.0 )native#\t\t\t\t","crs "+d+".xyz, "+h+", "+p+"\t\t\t","nrm "+d+".xyz, "+d+".xyz\t\t\t","mul "+d+".xyz, "+d+".xyz, "+o+".xxx\t","mov "+d+".w, #native( 1.0 )native#\t\t\t","mul "+f+".x, "+l+".z, #native( -1.0 )native#\t\t\t","mul "+d+".xyz, "+d+".xyz, "+f+".xxx\t","mul "+d+".xyz, "+d+".xyz, "+s+".xy\t","add "+l+".xyz, "+l+".xyz, "+d+".xyz\t","m44 op, "+l+", "+a,""];return e.removeVertexTempUsage(l),e.removeVertexTempUsage(c),e.removeVertexTempUsage(h),e.removeVertexTempUsage(p),e.removeVertexTempUsage(d),e.removeVertexTempUsage(f),g.join("\n")},e.prototype._getFragmentCode=function(t,e,n){return""},e}(Mi);function To(t,e){if(void 0===e&&(e="assertion failed"),""===t&&(t=!0),!t)throw"undefined"!=typeof console&&"assert"in console?(console.assert(!1,e),new Error(e)):new Error(e)}function Po(t,e,n,r,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),r>0||i>0&&i>>24&3,e[n++]=128|o>>>18&63,e[n++]=128|o>>>12&63,e[n++]=128|o>>>6&63,e[n++]=128|63&o):0!=(4294901760&o)?(e[n++]=240|o>>>18&7,e[n++]=128|o>>>12&63,e[n++]=128|o>>>6&63,e[n++]=128|63&o):0!=(4294965248&o)?(e[n++]=224|o>>>12&15,e[n++]=128|o>>>6&63,e[n++]=128|63&o):(e[n++]=192|o>>>6&31,e[n++]=128|63&o)}}return e.subarray(0,n)}function Ro(t){for(var e=0,n="";e>1|128))===i)break;i=i>>1|128,--o}while(o>=0);if(o<=0){n+=String.fromCharCode(r);continue}for(var a=r&(1<=o;--u){var l=t[e++];if(128!=(192&l)){s=!0;break}a=a<<6|63&l}if(s){for(var c=e-(7-u);c=65536?String.fromCharCode(a-65536>>10&1023|55296,1023&a|56320):String.fromCharCode(a)}}return n}!function(t){t[t.None=0]="None",t[t.PremultipliedAlphaARGB=1]="PremultipliedAlphaARGB",t[t.StraightAlphaARGB=2]="StraightAlphaARGB",t[t.StraightAlphaRGBA=3]="StraightAlphaRGBA",t[t.JPEG=4]="JPEG",t[t.PNG=5]="PNG",t[t.GIF=6]="GIF"}(Bo||(Bo={}));var Fo,ko=function(){function t(t){void 0===t&&(t=32),this._list=[],this._maxSize=t}return t.prototype.acquire=function(e){if(t._enabled)for(var n=this._list,r=0;r=e)return n.splice(r,1),i}return new ArrayBuffer(e)},t.prototype.release=function(e){if(t._enabled){var n=this._list;n.length===this._maxSize&&n.shift(),n.push(e)}},t.prototype.ensureUint8ArrayLength=function(t,e){if(t.length>=e)return t;var n=Math.max(t.length+e,1+(3*t.length>>1)),r=new Uint8Array(this.acquire(n),0,n);return r.set(t),this.release(t.buffer),r},t.prototype.ensureFloat64ArrayLength=function(t,e){if(t.length>=e)return t;var n=Math.max(t.length+e,1+(3*t.length>>1)),r=new Float64Array(this.acquire(n*Float64Array.BYTES_PER_ELEMENT),0,n);return r.set(t),this.release(t.buffer),r},t._enabled=!0,t}();!function(t){var e=new ArrayBuffer(8);function n(t){return 256*t<<16>>16}function r(t){return t/256}t.i8=new Int8Array(e),t.u8=new Uint8Array(e),t.i32=new Int32Array(e),t.f32=new Float32Array(e),t.f64=new Float64Array(e),t.nativeLittleEndian=1===new Int8Array(new Int32Array([1]).buffer)[0],t.floatToInt32=function(e){return t.f32[0]=e,t.i32[0]},t.int32ToFloat=function(e){return t.i32[0]=e,t.f32[0]},t.swap16=function(t){return(255&t)<<8|t>>8&255},t.swap32=function(t){return(255&t)<<24|(65280&t)<<8|t>>8&65280|t>>24&255},t.toS8U8=n,t.fromS8U8=r,t.clampS8U8=function(t){return r(n(t))},t.toS16=function(t){return t<<16>>16},t.bitCount=function(t){return 16843009*((t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135)>>24},t.ones=function(t){return 16843009*((t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135)>>24},t.trailingZeros=function(e){return t.ones((e&-e)-1)},t.getFlags=function(t,e){var n="";for(t=0;t>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},t.roundToMultipleOfPowerOfTwo=function(t,e){var n=(1<=this._size?(this._buffer=n,this._blockPosition=this._size):(this._buffer.set(n,this._blockPosition),this._blockPosition+=n.length)),e||this._blockPosition>=this._size?(this.isDone=!0,this.onData&&this.onData(this._buffer),this._buffer):r.read().then(this._processBlocks)},t.prototype.push=function(t){8!==t.length?(this._writer.write(t),this._isRunned||(this._isRunned=!0,this._reader.read().then(this._processBlocks).catch(this.onError))):this.onData&&this.onData(t)},t.prototype.close=function(){this._isRunned&&this.isDone&&(this._writer.close(),this._isRunned=!1)},t}();!function(t){t[t.INIT=0]="INIT",t[t.BLOCK_0=1]="BLOCK_0",t[t.BLOCK_1=2]="BLOCK_1",t[t.BLOCK_2_PRE=3]="BLOCK_2_PRE",t[t.BLOCK_2=4]="BLOCK_2",t[t.DONE=5]="DONE",t[t.ERROR=6]="ERROR",t[t.VERIFY_HEADER=7]="VERIFY_HEADER"}(Ho||(Ho={}));var ra,ia,oa,aa,sa,ua,la,ca,ha=32768,pa=65536,da=function(){function t(t){}return t.prototype.push=function(t){},t.prototype.close=function(){},t.create=function(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=!0),n&&!na.isSupported&&console.warn("[NativeDeflate] Is not supported!"),n&&na.isSupported&&$o){if(e)return new na(t,e);console.debug("[NativeDeflate] size not presented, can`t use a native implementation")}return new fa(t)},t.prototype._processZLibHeader=function(t,e,n){if(e+2>n)return 0;var r=t[e]<<8|t[e+1],i=null;return 2048!=(3840&r)?i="inflate: unknown compression method":r%31!=0?i="inflate: bad FCHECK":0!=(32&r)&&(i="inflate: FDICT bit set"),i?(this.onError&&this.onError(i),-1):2},t.inflate=function(e,n,r){var i=0,o=new Uint8Array(n),a=t.create(r,0,!1);return a.onData=function(t){var e=Math.min(t.length,o.length-i);e&&Po(o,t,i,0,e),i+=e},a.onError=function(t){throw new Error(t)},a.push(e),a.close(),o},t}(),fa=function(t){function e(e){var n=t.call(this,e)||this;return n._buffer=null,n._bufferSize=0,n._bufferPosition=0,n._bitBuffer=0,n._bitLength=0,n._window=new Uint8Array(65794),n._windowPosition=0,n._state=e?Ho.VERIFY_HEADER:Ho.INIT,n._isFinalBlock=!1,n._literalTable=null,n._distanceTable=null,n._block0Read=0,n._block2State=null,n._copyState={state:0,len:0,lenBits:0,dist:0,distBits:0},ga||(!function(){ra=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ia=new Uint16Array(30),oa=new Uint8Array(30);for(var t=0,e=0,n=1;t<30;++t)ia[t]=n,n+=1<<(oa[t]=~~((e+=t>2?1:0)/2));var r=new Uint8Array(288);for(t=0;t<32;++t)r[t]=5;aa=_a(r.subarray(0,32)),sa=new Uint16Array(29),ua=new Uint8Array(29);for(t=0,e=0,n=3;t<29;++t)sa[t]=n-(28==t?1:0),n+=1<<(ua[t]=~~((e+=t>4?1:0)/4%6));for(t=0;t<288;++t)r[t]=t<144||t>279?8:t<256?9:7;la=_a(r)}(),ga=!0),n}return n(e,t),e.prototype.push=function(t){if(!this._buffer||this._buffer.length0?(this._bufferPosition+=i,this._state=Ho.INIT):0===i?n=!0:this._state=Ho.ERROR}this._windowPosition-r>0&&this.onData(this._window.subarray(r,this._windowPosition)),this._windowPosition>=pa&&("copyWithin"in this._buffer?this._window.copyWithin(0,this._windowPosition-ha,this._windowPosition):this._window.set(this._window.subarray(this._windowPosition-ha,this._windowPosition)),this._windowPosition=ha)}while(!n&&this._bufferPosition>=3,i-=3,a>>1){case 0:if(r=0,i=0,n-o<4)return!0;var s=e[o]|e[o+1]<<8,u=e[o+2]|e[o+3]<<8;if(o+=4,65535!=(s^u)){this._error("inflate: invalid block 0 length"),t=Ho.ERROR;break}0===s?t=Ho.INIT:(this._block0Read=s,t=Ho.BLOCK_0);break;case 1:t=Ho.BLOCK_1,this._literalTable=la,this._distanceTable=aa;break;case 2:if((n-o<<3)+i<26)return!0;for(;i<14;)r|=e[o++]<>10&15);if((n-o<<3)+i<14+3*l)return!0;var c={numLiteralCodes:257+(31&r),numDistanceCodes:1+(r>>5&31),codeLengthTable:void 0,bitLengths:void 0,codesRead:0,dupBits:0};r>>=14,i-=14;for(var h=new Uint8Array(19),p=0;p>=3,i-=3;for(;p<19;p++)h[ra[p]]=0;c.bitLengths=new Uint8Array(c.numLiteralCodes+c.numDistanceCodes),c.codeLengthTable=_a(h),this._block2State=c,t=Ho.BLOCK_2_PRE;break;default:return this._error("inflate: unsupported block type"),t=Ho.ERROR,!1}return this._isFinalBlock=!!(1&a),this._state=t,this._bufferPosition=o,this._bitBuffer=r,this._bitLength=i,!1},e.prototype._error=function(t){this.onError&&this.onError(t)},e.prototype._decodeBlock0=function(){var t=this._bufferPosition,e=this._windowPosition,n=this._block0Read,r=65794-e,i=this._bufferSize-t,o=in){var r=this._bufferPosition,i=this._bufferSize;do{if(r>=i)return this._bufferPosition=r,this._bitBuffer=e,this._bitLength=n,-1;e|=this._buffer[r++]<n);this._bufferPosition=r}return this._bitBuffer=e>>t,this._bitLength=n-t,e&(1<n){var i=this._bufferPosition,o=this._bufferSize;do{if(i>=o)return this._bufferPosition=i,this._bitBuffer=e,this._bitLength=n,-1;e|=this._buffer[i++]<n);this._bufferPosition=i}var a=t.codes[e&(1<>16;return 32768&a?(this._error("inflate: invalid encoding"),this._state=Ho.ERROR,-1):(this._bitBuffer=e>>s,this._bitLength=n-s,65535&a)},e.prototype._decodeBlock2Pre=function(){var t=this._block2State,e=t.numLiteralCodes+t.numDistanceCodes,n=t.bitLengths,r=t.codesRead,i=r>0?n[r-1]:0,o=t.codeLengthTable;if(t.dupBits>0){if((s=this._readBits(t.dupBits))<0)return!0;for(;s--;)n[r++]=i;t.dupBits=0}for(;r0&&(e=this._readBits(h.distBits))<0)return!0;for(o=h.dist+e,r=h.len,t=c-o;r--;)l[c++]=l[t++];if(h.state=0,c>=pa)return this._windowPosition=c,!1}do{if((n=this._readCode(s))<0)return this._windowPosition=c,!0;if(n<256)l[c++]=n;else{if(!(n>256)){this._state=Ho.INIT;break}if(this._windowPosition=c,i=ua[n-=257],r=sa[n],(e=0===i?0:this._readBits(i))<0)return h.state=1,h.len=r,h.lenBits=i,!0;if(r+=e,(n=this._readCode(u))<0)return h.state=2,h.len=r,!0;if(a=oa[n],o=ia[n],(e=0===a?0:this._readBits(a))<0)return h.state=3,h.len=r,h.dist=o,h.distBits=a,!0;for(t=c-(o+=e);r--;)l[c++]=l[t++]}}while(c>p&1);for(p=h;p65535;)r.set(new Uint8Array([0,255,255,0,0]),i),i+=5,r.set(t.subarray(o,o+65535),i),o+=65535,i+=65535,e-=65535;r.set(new Uint8Array([0,255&e,e>>8&255,255&~e,~e>>8&255]),i),i+=5,r.set(t.subarray(o,e),i),this.onData(r),this._adler32&&this._adler32.update(t,0,e)},t.prototype.close=function(){if(this._state=ca.DONE,this.onData(new Uint8Array([1,0,0,255,255])),this._adler32){var t=this._adler32.getChecksum();this.onData(new Uint8Array([255&t,t>>8&255,t>>16&255,t>>>24&255]))}},t}(),Aa=function(){function t(){this.available=0,this.pos=0,this.buffer=new Uint8Array(2e3)}return t.prototype.append=function(t){var e=this.pos+this.available,n=e+t.length;if(n>this.buffer.length){for(var r=2*this.buffer.length;r0;){for(var s=Math.min(Math.min(a,r-n),r-o),u=0;u>>1|0)|0)>>31;(r=r+(n&i)|0)===n&&(this.corrupted=!0),n>=0&&n>>11)*o;return i>>>0>5)|0,r=0|a,n=0):(o=o-(o>>5)|0,i=i-a|0,r=r-a|0,n=1),t[e]=65535&o,r>=0&&r=225)throw new Error("Incorrect LZMA properties");this.lc=e%9,e=e/9|0,this.pb=e/5|0,this.lp=e%5,this.dictSizeInProperties=0;for(var n=0;n<4;n++)this.dictSizeInProperties|=t[n+1]<<8*n;this.dictSize=this.dictSizeInProperties,this.dictSize<4096&&(this.dictSize=4096)},t.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.reps[3]=0,this.state=0,this.leftToUnpack=this.unpackSize},t.prototype.decodeLiteral=function(t,e){var n=this.outWindow,r=this.rangeDec,i=0;n.isEmpty()||(i=n.getByte(1));var o=1,a=768*(((n.totalPos&(1<>8-this.lc));if(t>=7){var s=n.getByte(e+1);do{var u=s>>7&1;s<<=1;var l=r.decodeBit(this.litProbs,a+((1+u<<8)+o));if(o=o<<1|l,u!==l)break}while(o<256)}for(;o<256;)o=o<<1|r.decodeBit(this.litProbs,a+o);return o-256&255},t.prototype.decodeDistance=function(t){var e=t;e>3&&(e=3);var n=this.rangeDec,r=this.posSlotDecoder[e].decode(n);if(r<4)return r;var i=(r>>1)-1,o=(2|1&r)<=i||!n.checkDistance(g))return Ra}b+=2;var I=!1;if(void 0!==a&&a0&&r.set(this.buffer),r.set(t,e),void(this.buffer=r)}var i=new Uint8Array(n);if(e>0&&i.set(this.buffer),i.set(t.subarray(0,n-e),e),this._inStream=new Aa,this._inStream.append(i.subarray(n-5)),this._outStream=new va(function(t){this.onData.call(null,t)}.bind(this)),this._decoder=new Na(this._inStream,this._outStream),this._state===La.WAIT_FOR_SWF_HEADER)this._decoder.decodeProperties(i.subarray(12,17)),this._decoder.markerIsMandatory=!1,this._decoder.unpackSize=((i[4]|i[5]<<8|i[6]<<16|i[7]<<24)>>>0)-8;else{this._decoder.decodeProperties(i.subarray(0,5));for(var o=0,a=!1,s=0;s<8;s++){var u=i[5+s];255!==u&&(a=!0),o|=u<<8*s}this._decoder.markerIsMandatory=!a,this._decoder.unpackSize=a?o:void 0}this._decoder.create(),t=t.subarray(n),this._state=La.PROCESS_DATA}else if(this._state!==La.PROCESS_DATA)return;try{this._inStream.append(t);var l=this._decoder.decode(!0);this._inStream.compact(),l!==Ua&&this._checkError(l)}catch(t){this._decoder.flushOutput(),this._decoder=null,this._error(t)}},t.prototype.close=function(){if(this._state===La.PROCESS_DATA){this._state=La.CLOSED;try{var t=this._decoder.decode(!1);this._checkError(t)}catch(t){this._decoder.flushOutput(),this._error(t)}this._decoder=null}},t.prototype._error=function(t){this._state=La.ERROR,this.onError&&this.onError(t)},t.prototype._checkError=function(t){var e;t===Ra?e="LZMA decoding error":t===Ua?e="Decoding is not complete":t===Fa?void 0!==this._decoder.unpackSize&&this._decoder.unpackSize!==this._outStream.processed&&(e="Finished with end marker before than specified size"):e="Internal LZMA Error",e&&this._error(e)},t}();function Va(t){return"string"==typeof t?t:null==t?null:t+""}for(var Qa,Ga=function(){return function(t,e,n){this.buffer=t,this.length=e,this.littleEndian=n}}(),za=new Uint32Array(33),Ha=1,Xa=0;Ha<=32;Ha++)za[Ha]=Xa=Xa<<1|1;!function(t){t[t.U8=1]="U8",t[t.I32=2]="I32",t[t.F32=4]="F32"}(Qa||(Qa={}));var Ya,qa=function(){function t(e){void 0===e&&(e=t.INITIAL_SIZE),this._buffer||(this._buffer=new ArrayBuffer(e),this._length=0,this._position=0,this._resetViews(),this._littleEndian=t._nativeLittleEndian,this._bitBuffer=0,this._bitLength=0)}return t.FromArrayBuffer=function(e,n){void 0===n&&(n=-1);var r=Object.create(t.prototype);return r._buffer=e,r._length=-1===n?e.byteLength:n,r._position=0,r._resetViews(),r._littleEndian=t._nativeLittleEndian,r._bitBuffer=0,r._bitLength=0,r},t.FromPlainObject=function(e){var n=t.FromArrayBuffer(e.buffer,e.length);return n._littleEndian=e.littleEndian,n},t.prototype.toPlainObject=function(){return new Ga(this._buffer,this._length,this._littleEndian)},t.prototype.clone=function(){var e=t.FromArrayBuffer(new Uint8Array(this._u8).buffer,this._length);return e._position=this._position,e._littleEndian=this._littleEndian,e._bitBuffer=this._bitBuffer,e._bitLength=this._bitLength,e},t.prototype._resetViews=function(){this._u8=new Uint8Array(this._buffer),this._i32=null,this._f32=null},t.prototype._requestViews=function(t){0==(3&this._buffer.byteLength)&&(null===this._i32&&t&Qa.I32&&(this._i32=new Int32Array(this._buffer)),null===this._f32&&t&Qa.F32&&(this._f32=new Float32Array(this._buffer)))},t.prototype.getBytes=function(){return new Uint8Array(this._buffer,0,this._length)},t.prototype._ensureCapacity=function(e){var n=this._buffer;if(!(n.byteLength>=e)){for(var r=Math.max(n.byteLength,1);r4294967295&&(To(this.sec),this.sec.throwError("RangeError",Xo));var i=t._arrayBufferPool.acquire(r),o=this._u8;this._buffer=i,this._resetViews(),this._u8.set(o);for(var a=this._u8,s=o.length;s>24},t.prototype.readUnsignedByte=function(){return this._position+1>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo)),this._u8[this._position++]},t.prototype.readBytes=function(t,e,n){var r=this._position;e>>>=0,0===(n>>>=0)&&(n=this._length-r),r+n>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo)),t.length>16},t.prototype.readUnsignedShort=function(){var t=this._u8,e=this._position;e+2>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo));var n=t[e+0],r=t[e+1];return this._position=e+2,this._littleEndian?r<<8|n:n<<8|r},t.prototype.readInt=function(){var t=this._u8,e=this._position;e+4>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo));var n=t[e+0],r=t[e+1],i=t[e+2],o=t[e+3];return this._position=e+4,this._littleEndian?o<<24|i<<16|r<<8|n:n<<24|r<<16|i<<8|o},t.prototype.readUnsignedInt=function(){return this.readInt()>>>0},t.prototype.readFloat=function(){var t=this._position;if(t+4>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo)),this._position=t+4,this._requestViews(Qa.F32),this._littleEndian&&0==(3&t)&&this._f32)return this._f32[t>>2];var e=this._u8,n=Fo.u8;return this._littleEndian?(n[0]=e[t+0],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3]):(n[3]=e[t+0],n[2]=e[t+1],n[1]=e[t+2],n[0]=e[t+3]),Fo.f32[0]},t.prototype.readDouble=function(){var t=this._u8,e=this._position;e+8>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo));var n=Fo.u8;return this._littleEndian?(n[0]=t[e+0],n[1]=t[e+1],n[2]=t[e+2],n[3]=t[e+3],n[4]=t[e+4],n[5]=t[e+5],n[6]=t[e+6],n[7]=t[e+7]):(n[0]=t[e+7],n[1]=t[e+6],n[2]=t[e+5],n[3]=t[e+4],n[4]=t[e+3],n[5]=t[e+2],n[6]=t[e+1],n[7]=t[e+0]),this._position=e+8,Fo.f64[0]},t.prototype.writeBoolean=function(t){this.writeByte(t?1:0)},t.prototype.writeByte=function(t){var e=this._position+1;this._ensureCapacity(e),this._u8[this._position++]=t,e>this._length&&(this._length=e)},t.prototype.writeUnsignedByte=function(t){var e=this._position+1;this._ensureCapacity(e),this._u8[this._position++]=t,e>this._length&&(this._length=e)},t.prototype.writeRawBytes=function(t){var e=this._position+t.length;this._ensureCapacity(e),this._u8.set(t,this._position),this._position=e,e>this._length&&(this._length=e)},t.prototype.writeBytes=function(t,e,n){Lo(t)&&(To(this.sec),this.sec.throwError("TypeError",Yo,"bytes")),e>>>=0,n>>>=0,arguments.length<2&&(e=0),arguments.length<3&&(n=0),e===Mo(e,0,t.length)&&e+n===Mo(e+n,0,t.length)||(To(this.sec),this.sec.throwError("RangeError",Xo)),0===n&&(n=t.length-e),this.writeRawBytes(new Uint8Array(t._buffer,e,n))},t.prototype.writeShort=function(t){this.writeUnsignedShort(t)},t.prototype.writeUnsignedShort=function(t){var e=this._position;this._ensureCapacity(e+2);var n=this._u8;this._littleEndian?(n[e+0]=t,n[e+1]=t>>8):(n[e+0]=t>>8,n[e+1]=t),e+=2,this._position=e,e>this._length&&(this._length=e)},t.prototype.writeInt=function(t){this.writeUnsignedInt(t)},t.prototype.write2Ints=function(t,e){this.write2UnsignedInts(t,e)},t.prototype.write4Ints=function(t,e,n,r){this.write4UnsignedInts(t,e,n,r)},t.prototype.writeUnsignedInt=function(e){var n=this._position;if(this._ensureCapacity(n+4),this._requestViews(Qa.I32),this._littleEndian===t._nativeLittleEndian&&0==(3&n)&&this._i32)this._i32[n>>2]=e;else{var r=this._u8;this._littleEndian?(r[n+0]=e,r[n+1]=e>>8,r[n+2]=e>>16,r[n+3]=e>>24):(r[n+0]=e>>24,r[n+1]=e>>16,r[n+2]=e>>8,r[n+3]=e)}n+=4,this._position=n,n>this._length&&(this._length=n)},t.prototype.write2UnsignedInts=function(e,n){var r=this._position;this._ensureCapacity(r+8),this._requestViews(Qa.I32),this._littleEndian===t._nativeLittleEndian&&0==(3&r)&&this._i32?(this._i32[0+(r>>2)]=e,this._i32[1+(r>>2)]=n,r+=8,this._position=r,r>this._length&&(this._length=r)):(this.writeUnsignedInt(e),this.writeUnsignedInt(n))},t.prototype.write4UnsignedInts=function(e,n,r,i){var o=this._position;this._ensureCapacity(o+16),this._requestViews(Qa.I32),this._littleEndian===t._nativeLittleEndian&&0==(3&o)&&this._i32?(this._i32[0+(o>>2)]=e,this._i32[1+(o>>2)]=n,this._i32[2+(o>>2)]=r,this._i32[3+(o>>2)]=i,o+=16,this._position=o,o>this._length&&(this._length=o)):(this.writeUnsignedInt(e),this.writeUnsignedInt(n),this.writeUnsignedInt(r),this.writeUnsignedInt(i))},t.prototype.writeFloat=function(e){var n=this._position;if(this._ensureCapacity(n+4),this._requestViews(Qa.F32),this._littleEndian===t._nativeLittleEndian&&0==(3&n)&&this._f32)this._f32[n>>2]=e;else{var r=this._u8;Fo.f32[0]=e;var i=Fo.u8;this._littleEndian?(r[n+0]=i[0],r[n+1]=i[1],r[n+2]=i[2],r[n+3]=i[3]):(r[n+0]=i[3],r[n+1]=i[2],r[n+2]=i[1],r[n+3]=i[0])}n+=4,this._position=n,n>this._length&&(this._length=n)},t.prototype.write2Floats=function(e,n){var r=this._position;this._ensureCapacity(r+8),this._requestViews(Qa.F32),this._littleEndian===t._nativeLittleEndian&&0==(3&r)&&this._f32?(this._f32[0+(r>>2)]=e,this._f32[1+(r>>2)]=n,r+=8,this._position=r,r>this._length&&(this._length=r)):(this.writeFloat(e),this.writeFloat(n))},t.prototype.write6Floats=function(e,n,r,i,o,a){var s=this._position;this._ensureCapacity(s+24),this._requestViews(Qa.F32),this._littleEndian===t._nativeLittleEndian&&0==(3&s)&&this._f32?(this._f32[0+(s>>2)]=e,this._f32[1+(s>>2)]=n,this._f32[2+(s>>2)]=r,this._f32[3+(s>>2)]=i,this._f32[4+(s>>2)]=o,this._f32[5+(s>>2)]=a,s+=24,this._position=s,s>this._length&&(this._length=s)):(this.writeFloat(e),this.writeFloat(n),this.writeFloat(r),this.writeFloat(i),this.writeFloat(o),this.writeFloat(a))},t.prototype.writeDouble=function(t){var e=this._position;this._ensureCapacity(e+8);var n=this._u8;Fo.f64[0]=t;var r=Fo.u8;this._littleEndian?(n[e+0]=r[0],n[e+1]=r[1],n[e+2]=r[2],n[e+3]=r[3],n[e+4]=r[4],n[e+5]=r[5],n[e+6]=r[6],n[e+7]=r[7]):(n[e+0]=r[7],n[e+1]=r[6],n[e+2]=r[5],n[e+3]=r[4],n[e+4]=r[3],n[e+5]=r[2],n[e+6]=r[1],n[e+7]=r[0]),e+=8,this._position=e,e>this._length&&(this._length=e)},t.prototype.readRawBytes=function(){return new Int8Array(this._buffer,0,this._length)},t.prototype.writeUTF=function(t){var e=No(t=Va(t));this.writeShort(e.length),this.writeRawBytes(e)},t.prototype.writeUTFBytes=function(t){var e=No(t=Va(t));this.writeRawBytes(e)},t.prototype.readUTF=function(){return this.readUTFBytes(this.readShort())},t.prototype.readUTFBytes=function(t){t>>>=0;var e=this._position;return e+t>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo)),this._position+=t,Ro(new Uint8Array(this._buffer,e,t))},Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){(t>>>=0)>this._buffer.byteLength&&this._ensureCapacity(t),this._length=t,this._position=Mo(this._position,0,this._length)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bytesAvailable",{get:function(){return this._length-this._position},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){this._position=t>>>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bytes",{get:function(){return this._u8},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ints",{get:function(){return this._requestViews(Qa.I32),this._i32},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectEncoding",{get:function(){return this._objectEncoding},set:function(t){t>>>=0,this._objectEncoding=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endian",{get:function(){return this._littleEndian?"littleEndian":"bigEndian"},set:function(e){e=Va(e),this._littleEndian="auto"===e?t._nativeLittleEndian:"littleEndian"===e},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return Ro(new Uint8Array(this._buffer,0,this._length))},t.prototype.toBlob=function(t){return new Blob([new Uint8Array(this._buffer,this._position,this._length)],{type:t})},t.prototype.writeMultiByte=function(t,e){if(t=Va(t),"UTF-8"==(e=Va(e))){var n=No(t);this.writeRawBytes(n)}else console.log("packageInternal flash.utils.ObjectOutput::writeMultiByte only encoding supported is UTF-8")},t.prototype.readMultiByte=function(t,e){console.log("packageInternal flash.utils.ObjectInput::readMultiByte")},t.prototype.getValue=function(t){if(!((t|=0)>=this._length))return this._u8[t]},t.prototype.setValue=function(t,e){var n=(t|=0)+1;this._ensureCapacity(n),this._u8[t]=e,n>this._length&&(this._length=n)},t.prototype.readFixed=function(){return this.readInt()/65536},t.prototype.readFixed8=function(){return this.readShort()/256},t.prototype.readFloat16=function(){var t=this.readUnsignedShort(),e=t>>15?-1:1,n=(31744&t)>>10,r=1023&t;return n?31===n?r?NaN:e*(1/0):e*Math.pow(2,n-15)*(1+r/1024):e*Math.pow(2,-14)*(r/1024)},t.prototype.readEncodedU32=function(){var t=this.readUnsignedByte();return 128&t&&16384&(t=127&t|this.readUnsignedByte()<<7)&&2097152&(t=16383&t|this.readUnsignedByte()<<14)&&268435456&(t=2097151&t|this.readUnsignedByte()<<21)?268435455&t|this.readUnsignedByte()<<28:t},t.prototype.readBits=function(t){return this.readUnsignedBits(t)<<32-t>>32-t},t.prototype.readUnsignedBits=function(t){for(var e=this._bitBuffer,n=this._bitLength;t>n;)e=e<<8|this.readUnsignedByte(),n+=8;var r=e>>>(n-=t)&za[t];return this._bitBuffer=e,this._bitLength=n,r},t.prototype.readFixedBits=function(t){return this.readBits(t)/65536},t.prototype.readString=function(t){var e=this._position;if(t)e+t>this._length&&(To(this.sec),this.sec.throwError("flash.errors.EOFError",qo)),this._position+=t;else{t=0;for(var n=e;n>2)-2,r=t[n]+","+t[n+1];this.isReversed?(this.startPoint=r,this.endPoint=e):(this.startPoint=e,this.endPoint=r)},t.prototype.connectsTo=function(t){return t!==this&&(To(this.endPoint),To(t.startPoint),this.endPoint===t.startPoint)},t.prototype.startConnectsTo=function(t){return t!==this&&this.startPoint===t.startPoint},t.prototype.flipDirection=function(){var t;t=this.startPoint,this.startPoint=this.endPoint,this.endPoint=t,this.isReversed=!this.isReversed},t.prototype.serializeAJS=function(t,e,n){if(e&&(e.morphSource=t.morphSource=!0),this.isReversed)this._serializeReversedAJS(t,e,n);else{var r=this.commands.bytes,i=this.data.length>>2,o=this.morphData?this.morphData.ints:null,a=this.data.ints,s=0;a[0]===n.x&&a[1]===n.y&&s++;for(var u=this.commands.length,l=2*s,c=s;c>2)-2,o=this.commands.bytes;To(9===o[0]);var a=this.data.ints,s=this.morphData?this.morphData.ints:null;if(a[i]===n.x&&a[i+1]===n.y||(t.moveTo(a[i]/20,a[i+1]/20),e&&e.moveTo(s[i]/20,s[i+1]/20)),1===r)return n.x=a[0],void(n.y=a[1]);for(var u=r;u-- >1;)switch(i-=2,o[u]){case 9:t.moveTo(a[i]/20,a[i+1]/20),e&&e.moveTo(s[i]/20,s[i+1]/20);break;case 10:t.lineTo(a[i]/20,a[i+1]/20),e&&e.lineTo(s[i]/20,s[i+1]/20);break;case 11:i-=2,t.curveTo(a[i+2]/20,a[i+3]/20,a[i]/20,a[i+1]/20),e&&e.curveTo(s[i+2]/20,s[i+3]/20,s[i]/20,s[i+1]/20)}n.x=a[0],n.y=a[1]},t._counter=0,t}();!function(t){t.LINEAR="linear",t.RADIAL="radial"}(Ka||(Ka={}));var Ja,$a=function(){function t(t){this.fillStyle=t}return Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),t.data_type="[graphicsdata FillStyle]",t}(),Za=function(){function t(t,e,n,r,i,o,a,s){if(e.length!=n.length||e.length!=r.length)throw"GradientFillStyle: Error - colors, alphas and ratios must be of same length";this.colors=e,this.colors_r=[],this.colors_g=[],this.colors_b=[],this.colors_r.length=this.colors_g.length=this.colors_g.length=this.colors.length,this.alphas=n,this.ratios=r,this.matrix=i,this.type=t,this.uvRectangle=new q,this.ratios.sort((function(t,e){return t-e})),this.ratio_min=this.ratios[0],this.ratio_max=this.ratios[this.ratios.length-1];for(var u,l=e.length;l>0;)l--,u=x.float32ColorToARGB(e[l]),this.colors_r[l]=u[1],this.colors_g[l]=u[2],this.colors_b[l]=u[3]}return t.prototype.getUVMatrix=function(){if(this._uvMatrix)return this._uvMatrix;this.matrix||(this.matrix=new P);var t,e=1638.4,n=819.2,r=this.matrix.a,i=this.matrix.b,o=this.matrix.c,a=this.matrix.d,s=this.matrix.tx,u=this.matrix.ty,l=a/(r*a-i*o),c=-i/(r*a-i*o),h=-o/(r*a-i*o),p=r/(r*a-i*o),d=(o*u-a*s)/(r*a-i*o),f=-(r*u-i*s)/(r*a-i*o);return this.type==Ka.LINEAR?t=new P(l/e*(1-1/256),0,h/e*(1-1/256),0,this.uvRectangle.x+(d+n)/e*(1-1/256),this.uvRectangle.y):this.type==Ka.RADIAL?t=new P(l/n,c/n,h/n,p/n,(d+n)/n-1,(f+n)/n-1):this._uvMatrix=this.matrix,this._uvMatrix=t},t.prototype.getColorAtPosition=function(t){var e=-1,n=-1;if(t<=this.ratio_min)e=0,n=0;else if(t>=this.ratio_max)e=this.ratios.length-1,n=this.ratios.length-1;else for(var r=0;r=this.ratios[r]&&t<=this.ratios[r+1]){e=r,n=r+1;break}}if(e==n)return[this.alphas[e],this.colors_r[e],this.colors_g[e],this.colors_b[e]];var i=(t-this.ratios[e])/(this.ratios[n]-this.ratios[e]),o=1-i;return[this.alphas[n]*i+this.alphas[e]*o,this.colors_r[n]*i+this.colors_r[e]*o,this.colors_g[n]*i+this.colors_g[e]*o,this.colors_b[n]*i+this.colors_b[e]*o]},t.prototype.toString=function(){for(var t="",e=this.colors.length;e>0;)e--,t+=this.colors[e]+"#"+this.alphas[e]+"#"+this.ratios[e]+"#";return t},Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),t.data_type="[graphicsdata GradientFillStyle]",t}(),ts=function(){function t(t,e,n,r){this.material=t,this.matrix=e,this.repeat=n,this.smooth=r}return Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),t.prototype.getUVMatrix=function(){this.matrix||(this.matrix=new P),this._uvMatrix||(this._uvMatrix=new P);var t,e,n=this.material.getTextureAt(0).getImageAt(0);n?(t=n.width,e=n.height):(console.warn("[BitmapFillStyle] - getUVMatrix - no texture found"),t=512,e=512);var r=this.matrix.a,i=this.matrix.b,o=this.matrix.c,a=this.matrix.d,s=this.matrix.tx,u=this.matrix.ty,l=a/(r*a-i*o),c=-i/(r*a-i*o),h=-o/(r*a-i*o),p=r/(r*a-i*o),d=(o*u-a*s)/(r*a-i*o),f=-(r*u-i*s)/(r*a-i*o);return this._uvMatrix.a=l/t,this._uvMatrix.b=c/e,this._uvMatrix.c=h/t,this._uvMatrix.d=p/e,this._uvMatrix.tx=d/t,this._uvMatrix.ty=f/e,this._uvMatrix},t.data_type="[graphicsdata BitmapFillStyle]",t}(),es=function(){function t(t,e){void 0===t&&(t=16777215),void 0===e&&(e=1),this.color=t,this.alpha=e}return t.prototype.getUVMatrix=function(){return this.uvMatrix},Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),t.data_type="[graphicsdata SolidFillStyle]",t}(),ns=function(){function t(){}return t.ROUND=1,t.NONE=0,t.SQUARE=2,t}(),rs=function(){function t(){}return t.BEVEL=1,t.MITER=2,t.ROUND=0,t}(),is=function(){function t(t,e,n,r,i,o){void 0===e&&(e=10),void 0===n&&(n=rs.ROUND),void 0===r&&(r=ns.SQUARE),void 0===i&&(i=10),void 0===o&&(o=Io.NORMAL),this.fillStyle=t,this.thickness=e,this.jointstyle=n,this.capstyle=r,this.miterLimit=i,this.scaleMode=o}return Object.defineProperty(t.prototype,"half_thickness",{get:function(){return this.thickness/2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),t.data_type="[graphicsdata StrokeStyle]",t}(),os=function(){function t(t,e){this.fillStyle=t,this.lineStyle=e,this._head=null}return t.prototype.addSegment=function(t){To(t),To(null===t.next),To(null===t.prev);var e=this._head;e&&(To(t!==e),e.next=t,t.prev=e),this._head=t},t.prototype.removeSegment=function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev)},t.prototype.insertSegment=function(t,e){var n=e.prev;t.prev=n,t.next=e,n&&(n.next=t),e.prev=t},t.prototype.head=function(){return this._head},t.prototype.rgbaToArgb=function(t){return(255&t)<<24|(4278190080&t)>>>24<<16|(16711680&t)>>>16<<8|(65280&t)>>>8},t.prototype.getAlpha=function(t){return 255&t},t.prototype.rgbToArgb=function(t){return(4278190080&t)>>>24<<24|(255&t)<<16|(65280&t)>>>8<<8|(16711680&t)>>>16},t.prototype.applyStyle=function(t,e,n){var r,i;switch(void 0===n&&(n=!0),e.type){case Ya.Solid:e.alpha=(255&e.color)/255,e.color=this.rgbaToArgb(e.color),i=new es(e.color,e.alpha);break;case Ya.LinearGradient:case Ya.RadialGradient:case Ya.FocalRadialGradient:for(var o=e.type===Ya.LinearGradient?Ka.LINEAR:Ka.RADIAL,a=[],s=0;s0},t.prototype.fitColor=function(){return this.availableRows>0||this.colorPosition>0},t.prototype.addGradient=function(t){if(!(this.availableRows<=0)){this.gradientRow++,this.availableRows--;for(var e=0;e<256;e++)this.bitmap.setPixelFromArray(e,this.gradientRow,t.getColorAtPosition(e));return this.bitmap.invalidate(),t.uvRectangle.x=1/512,t.uvRectangle.y=1/512+this.gradientRow/256,t.uvRectangle.width=1-1/512,t.uvRectangle.height=t.uvRectangle.y,this.availableRows}console.error("[TextureAtlass] There are not free space for gradient:",t)},t.prototype.addColor=function(t,e){if(void 0===e&&(e=1),this.colorPosition--,this.colorPosition<0&&(this.colorRow--,this.availableRows--,this.colorPosition=255,this.availableRows<0))return this.availableRows=0,console.error("[TextureAtlass] There are not free space for color:",t.toString(16)),null;var n=x.float32ColorToARGB(t);return n[0]=e,this.bitmap.setPixelFromArray(this.colorPosition,this.colorRow,n),this.bitmap.invalidate(),new T(1/512+this.colorPosition/256,1/512+this.colorRow/256)},t._allTextureAtlas=[],t._allGradients={},t._allColors={},t}(),ps=function(){function t(){}return t.getMaterialForColor=function(e,n){var r;if(void 0===n&&(n=1),0==e&&(e=1),16744704==e&&(n=1),!t.materialClass)throw"no materialClass registered on MaterialManager!";if(t._useTextureAtlasForColors){if(r=hs.getTextureForColor(e,n),t._colorMaterials[r.bitmap.id])return r.material=t._colorMaterials[r.bitmap.id],r;var i=new t.materialClass(r.bitmap);return i.alphaBlending=!0,i.useColorTransform=!0,i.bothSides=!0,t._colorMaterials[r.bitmap.id]=i,r.material=i,r}r={};var o=e+"_"+Math.round(100*n).toString();if(t._colorMaterials[o])return r.material=t._colorMaterials[o],r;var a=new t.materialClass(e,n);return a.alphaBlending=!0,a.useColorTransform=!0,a.bothSides=!0,r.material=a,t._colorMaterials[o]=a,r},t.getMaterialForGradient=function(e){if(!t.materialClass)throw"no materialClass registered on MaterialManager!";var n=hs.getTextureForGradient(e),r=n.bitmap.id.toString()+e.type.toString();if(t._textureMaterials[r])return n.material=t._textureMaterials[r],n;var i=new t.materialClass(n.bitmap);return i.useColorTransform=!0,i.alphaBlending=!0,i.bothSides=!0,t._textureMaterials[r]=i,n.material=i,n},t.getMaterialForBitmap=function(e,n){void 0===n&&(n=!1);var r=new((n=n&&!!this.specialBitmapMaterialClass)?this.specialBitmapMaterialClass:this.materialClass)(e);return n||(r.ambientMethod.texture=new t.textureClass(e)),r.alphaBlending=!0,r.useColorTransform=!0,r.bothSides=!0,r},t._colorMaterials={},t._textureMaterials={},t._useTextureAtlasForColors=!0,t.get_material_for_color=t.getMaterialForColor,t.get_material_for_gradient=t.getMaterialForGradient,t.get_material_for_BitmapImage2D=t.getMaterialForBitmap,t}(),ds=function(){function t(){}return t.drawRectangles=function(t,e,n){if(!(t.length%4>0)){var r=[];r.length=t.length/4*12;var i=0,o=0,a=t.length,s=0,u=0,l=0,c=0;for(i=0;i0,l=this.getSign(n,r,a,s,i,o)>0,c=this.getSign(i,o,a,s,t,e)>0;return u==l&&l==c},t.getControlXForCurveX=function(t,e,n){return e},t.getControlYForCurveY=function(t,e,n){return e},t.drawPoint=function(t,e,n,r){this.addTriangle(t-2,e-2,t+2,e-2,t+2,e+2,0,n,r),this.addTriangle(t-2,e-2,t-2,e+2,t+2,e+2,0,n,r)},t.drawElipse=function(t,e,n,r,i,o,a,s,u){for(var l=(a-o)/s,c=t+n*Math.cos(o*(Math.PI/180)),h=e+r*Math.sin(o*(Math.PI/180)),p=1;p<=l;p++){var d=t+n*Math.cos((o+p*s)*(Math.PI/180)),f=e+r*Math.sin((o+p*s)*(Math.PI/180));this.addTriangle(t,e,d,f,c,h,0,i,u),c=d,h=f}},t.drawElipseStrokes=function(t,e,n,r,i,o,a,s){var u=(a-o)/s,l=t+n*Math.cos(o*(Math.PI/180)),c=e+r*Math.sin(o*(Math.PI/180));i.moveTo(l,c);for(var h=1;h<=u;h++){var p=t+n*Math.cos((o+h*s)*(Math.PI/180)),d=e+r*Math.sin((o+h*s)*(Math.PI/180));i.lineTo(p,d)}},t.addTriangle=function(e,n,r,i,o,a,s,u,l){var c=e,h=n,p=r,d=i,f=o,g=a;t.isClockWiseXY(c,h,p,d,f,g)&&(e=f,n=g,r=p,i=d,o=c,a=h);var _=u.length;0==s?(u[_++]=e,u[_++]=n,l&&(u[_++]=45736980577097704e-57),u[_++]=r,u[_++]=i,l&&(u[_++]=45736980577097704e-57),u[_++]=o,u[_++]=a,l&&(u[_++]=45736980577097704e-57)):s<0?(u[_++]=e,u[_++]=n,l&&(u[_++]=11708844992641982e-54),u[_++]=r,u[_++]=i,l&&(u[_++]=22778106537599901e-57),u[_++]=o,u[_++]=a,l&&(u[_++]=17796490496925177e-59)):s>0&&(u[_++]=e,u[_++]=n,l&&(u[_++]=11708846393940446e-54),u[_++]=r,u[_++]=i,l&&(u[_++]=22779507836064226e-57),u[_++]=o,u[_++]=a,l&&(u[_++]=1793662034335766e-58))},t.createCap=function(t,e,n,r,i,o,a,s,u,l,c,h,p,d){if(a*=l,s*=l,u==ns.ROUND){var f=t+a*c,g=e+s*h,_=n+a*c,m=r+s*h,y=i+a*c,A=o+s*h;this.tesselateCurve(n,r,_,m,f,g,p,!0),this.tesselateCurve(f,g,y,A,i,o,p,!0),this.addTriangle(n,r,f,g,i,o,-1,p,d)}else if(u==ns.SQUARE){_=n+a*c,m=r+s*h,y=i+a*c,A=o+s*h;this.addTriangle(y,A,_,m,n,r,0,p,d),this.addTriangle(y,A,n,r,i,o,0,p,d)}},t.getLineFormularData=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new T;return 0!=n&&0!=r&&(i.x=r/n),i.y=-(i.x*t.x-t.y),i},t.getQuadricBezierPosition=function(t,e,n,r){var i=1-t;return i*i*e+2*i*t*n+t*t*r},t.subdivideCurve=function(e,n,r,i,o,a,s,u,l,c,h,p,d,f){var g=Math.atan2(i-n,r-e)*M.RADIANS_TO_DEGREES,_=Math.atan2(a-i,o-r)*M.RADIANS_TO_DEGREES-g;if(_>180&&(_-=360),_<-180&&(_+=360),Math.abs(_)>=175)return d.push(e,n,r,i,o,a),void f.push(s,u,l,c,h,p);var m=!1;if(_<0?(m=t.getSign(e,n,l,c,o,a)>0,m=((n-a)*(r-e)+(o-e)*(i-n))*((n-a)*(l-e)+(o-e)*(c-n))<0):(m=t.getSign(s,u,l,c,h,p)>0,m=((u-a)*(r-s)+(h-s)*(i-u))*((u-p)*(l-s)+(h-s)*(c-u))<0),m)return d.push(e,n,r,i,o,a),void f.push(s,u,l,c,h,p);var y=e+.5*(r-e),A=n+.5*(i-n),v=r+.5*(o-r),b=i+.5*(a-i),C=y+.5*(v-y),I=A+.5*(b-A),E=s+.5*(l-s),x=u+.5*(c-u),w=l+.5*(h-l),S=c+.5*(p-c),D=E+.5*(w-E),T=x+.5*(S-x);this.subdivideCurve(e,n,y,A,C,I,s,u,E,x,D,T,d,f),this.subdivideCurve(C,I,v,b,o,a,D,T,w,S,h,p,d,f)},t.tesselateCurve=function(e,n,r,i,o,a,s,u,l){void 0===u&&(u=!1),void 0===l&&(l=0);if(l>=ta)return u?void s.push(e,n,r,i,o,a):void s.push(r,i,o,a);var c=o-e,h=a-n,p=e+.5*(r-e),d=n+.5*(i-n),f=r+.5*(o-r),g=i+.5*(a-i),_=p+.5*(f-p),m=d+.5*(g-d);if(c*c+h*h<1)u?s.push(e,n,_,m,o,a):s.push(o,a);else{for(var y=Math.atan2(i-n,r-e)*M.RADIANS_TO_DEGREES,A=Math.atan2(a-i,o-r)*M.RADIANS_TO_DEGREES-y;A>180;)A-=360;for(;A<-180;)A+=360;(A=A<0?-A:A)<=1?u?s.push(e,n,_,m,o,a):s.push(o,a):(u&&s.push(e,n,_,m,o,a),l++,t.tesselateCurve(e,n,p,d,_,m,s,u,l),t.tesselateCurve(_,m,f,g,o,a,s,u,l))}},t}();function fs(t,e){if(!t)throw e||"Assertion Failed!"}!function(t){t[t.ODD=0]="ODD",t[t.NONZERO=1]="NONZERO",t[t.POSITIVE=2]="POSITIVE",t[t.NEGATIVE=3]="NEGATIVE",t[t.ABS_GEQ_TWO=4]="ABS_GEQ_TWO"}(ls||(ls={})),function(t){t[t.POLYGONS=0]="POLYGONS",t[t.CONNECTED_POLYGONS=1]="CONNECTED_POLYGONS",t[t.BOUNDARY_CONTOURS=2]="BOUNDARY_CONTOURS"}(cs||(cs={}));var gs=function(){function t(){}return t.vertEq=function(t,e){return t.s===e.s&&t.t===e.t},t.vertLeq=function(t,e){return t.s0?i0?(n.t-r.t)*i+(n.t-e.t)*o:0},t.transEval=function(e,n,r){fs(t.transLeq(e,n)&&t.transLeq(n,r));var i=n.t-e.t,o=r.t-n.t;return i+o>0?i0?(n.s-r.s)*i+(n.s-e.s)*o:0},t.vertCCW=function(t,e,n){return t.s*(e.t-n.t)+e.s*(n.t-t.t)+n.s*(t.t-e.t)>=0},t.interpolate=function(t,e,n,r){return(t=t<0?0:t)<=(n=n<0?0:n)?0===n?(e+r)/2:e+t/(t+n)*(r-e):r+n/(t+n)*(e-r)},t.intersect=function(e,n,r,i,o){var a,s,u;t.vertLeq(e,n)||(u=e,e=n,n=u),t.vertLeq(r,i)||(u=r,r=i,i=u),t.vertLeq(e,r)||(u=e,e=r,r=u,u=n,n=i,i=u),t.vertLeq(r,n)?t.vertLeq(n,i)?((a=t.edgeEval(e,r,n))+(s=t.edgeEval(r,n,i))<0&&(a=-a,s=-s),o.s=t.interpolate(a,r.s,s,n.s)):((a=t.edgeSign(e,r,n))+(s=-t.edgeSign(e,i,n))<0&&(a=-a,s=-s),o.s=t.interpolate(a,r.s,s,i.s)):o.s=(r.s+n.s)/2,t.transLeq(e,n)||(u=e,e=n,n=u),t.transLeq(r,i)||(u=r,r=i,i=u),t.transLeq(e,r)||(u=e,e=r,r=u,u=n,n=i,i=u),t.transLeq(r,n)?t.transLeq(n,i)?((a=t.transEval(e,r,n))+(s=t.transEval(r,n,i))<0&&(a=-a,s=-s),o.t=t.interpolate(a,r.t,s,n.t)):((a=t.transSign(e,r,n))+(s=-t.transSign(e,i,n))<0&&(a=-a,s=-s),o.t=t.interpolate(a,r.t,s,i.t)):o.t=(r.t+n.t)/2},t}(),_s=function(){this.next=null,this.prev=null,this.anEdge=null,this.trail=null,this.n=0,this.marked=!1,this.inside=!1},ms=function(){function t(t){this.side=t,this.next=null,this.Org=null,this.Sym=null,this.Onext=null,this.Lnext=null,this.Lface=null,this.activeRegion=null,this.winding=0}return Object.defineProperty(t.prototype,"Rface",{get:function(){return this.Sym.Lface},set:function(t){this.Sym.Lface=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dst",{get:function(){return this.Sym.Org},set:function(t){this.Sym.Org=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Oprev",{get:function(){return this.Sym.Lnext},set:function(t){this.Sym.Lnext=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Lprev",{get:function(){return this.Onext.Sym},set:function(t){this.Onext.Sym=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dprev",{get:function(){return this.Lnext.Sym},set:function(t){this.Lnext.Sym=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Rprev",{get:function(){return this.Sym.Onext},set:function(t){this.Sym.Onext=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dnext",{get:function(){return this.Sym.Onext.Sym},set:function(t){this.Sym.Onext.Sym=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Rnext",{get:function(){return this.Sym.Lnext.Sym},set:function(t){this.Sym.Lnext.Sym=t},enumerable:!0,configurable:!0}),t}(),ys=function(){this.next=null,this.prev=null,this.anEdge=null,this.coords=[0,0,0],this.s=0,this.t=0,this.pqHandle=0,this.n=0,this.idx=0},As=function(){function t(){var t=new ys,e=new _s,n=new ms(0),r=new ms(1);t.next=t.prev=t,t.anEdge=null,e.next=e.prev=e,n.next=n,n.Sym=r,r.next=r,r.Sym=n,this.vHead=t,this.fHead=e,this.eHead=n,this.eHeadSym=r}return t.prototype.makeEdge_=function(t){var e=new ms(0),n=new ms(1);t.Sym.sidethis.size||this.leq(o[e].key,o[n].key)){i[t].handle=e,o[e].node=t;break}i[t].handle=n,o[n].node=t,t=r}},t.prototype.floatUp_=function(t){var e,n,r,i=this.nodes,o=this.handles;for(e=i[t].handle;;){if(n=i[r=t>>1].handle,0===r||this.leq(o[n].key,o[e].key)){i[t].handle=e,o[e].node=t;break}i[t].handle=n,o[n].node=t,t=r}},t.prototype.init=function(){for(var t=this.size;t>=1;--t)this.floatDown_(t);this.initialized=!0},t.prototype.min=function(){return this.handles[this.nodes[1].handle].key},t.prototype.insert=function(t){var e,n;if(2*(e=++this.size)>this.max){var r,i;for(this.max*=2,i=this.nodes.length,this.nodes.length=this.max+1,r=i;r0&&(t[1].handle=t[this.size].handle,e[t[1].handle].node=1,e[n].key=null,e[n].node=this.freeList,this.freeList=n,--this.size,this.size>0&&this.floatDown_(1)),r},t.prototype.delete=function(t){var e,n=this.nodes,r=this.handles;fs(t>=1&&t<=this.max&&null!==r[t].key),n[e=r[t].node].handle=n[this.size].handle,r[n[e].handle].node=e,--this.size,e<=this.size&&(e<=1||this.leq(r[n[e>>1].handle].key,r[n[e].handle].key)?this.floatDown_(e):this.floatUp_(e)),r[t].key=null,r[t].node=this.freeList,this.freeList=t},t}(),Is=function(){this.eUp=null,this.nodeUp=null,this.windingNumber=0,this.inside=!1,this.sentinel=!1,this.dirty=!1,this.fixUpperEdge=!1},Es=function(){this.key=null,this.next=null,this.prev=null},xs=function(){function t(t,e){this.frame=t,this.leq=e,this.head=new Es,this.head.next=this.head,this.head.prev=this.head}return t.prototype.min=function(){return this.head.next},t.prototype.max=function(){return this.head.prev},t.prototype.insert=function(t){return this.insertBefore(this.head,t)},t.prototype.search=function(t){var e=this.head;do{e=e.next}while(null!==e.key&&!this.leq(this.frame,t,e.key));return e},t.prototype.insertBefore=function(t,e){do{t=t.prev}while(null!==t.key&&!this.leq(this.frame,t.key,e));var n=new Es;return n.key=e,n.next=t.next,t.next.prev=n,n.prev=t,t.next=n,n},t.prototype.delete=function(t){t.next.prev=t.prev,t.prev.next=t.next},t}(),ws=function(){function t(){}return t.regionBelow=function(t){return t.nodeUp.prev.key},t.regionAbove=function(t){return t.nodeUp.next.key},t.debugEvent=function(t){},t.addWinding=function(t,e){t.winding+=e.winding,t.Sym.winding+=e.Sym.winding},t.edgeLeq=function(t,e,n){var r=t.event,i=e.eUp,o=n.eUp;return i.Dst===r?o.Dst===r?gs.vertLeq(i.Org,o.Org)?gs.edgeSign(o.Dst,i.Org,o.Org)<=0:gs.edgeSign(i.Dst,o.Org,i.Org)>=0:gs.edgeSign(o.Dst,r,o.Org)<=0:o.Dst===r?gs.edgeSign(i.Dst,r,i.Org)>=0:gs.edgeEval(i.Dst,r,i.Org)>=gs.edgeEval(o.Dst,r,o.Org)},t.deleteRegion=function(t,e){e.fixUpperEdge&&fs(0===e.eUp.winding),e.eUp.activeRegion=null,t.dict.delete(e.nodeUp)},t.fixUpperEdge=function(t,e,n){fs(e.fixUpperEdge),t.mesh.delete(e.eUp),e.fixUpperEdge=!1,e.eUp=n,n.activeRegion=e},t.topLeftRegion=function(e,n){var r,i=n.eUp.Org;do{n=t.regionAbove(n)}while(n.eUp.Org===i);if(n.fixUpperEdge){if(null===(r=e.mesh.connect(t.regionBelow(n).eUp.Sym,n.eUp.Lnext)))return null;t.fixUpperEdge(e,n,r),n=t.regionAbove(n)}return n},t.topRightRegion=function(e){var n=e.eUp.Dst;do{e=t.regionAbove(e)}while(e.eUp.Dst===n);return e},t.addRegionBelow=function(t,e,n){var r=new Is;return r.eUp=n,r.nodeUp=t.dict.insertBefore(e.nodeUp,r),r.fixUpperEdge=!1,r.sentinel=!1,r.dirty=!1,n.activeRegion=r,r},t.isWindingInside=function(t,e){switch(t.windingRule){case ls.ODD:return 0!=(1&e);case ls.NONZERO:return 0!==e;case ls.POSITIVE:return e>0;case ls.NEGATIVE:return e<0;case ls.ABS_GEQ_TWO:return e>=2||e<=-2}throw new Error("Invalid winding rulle")},t.computeWinding=function(e,n){n.windingNumber=t.regionAbove(n).windingNumber+n.eUp.winding,n.inside=t.isWindingInside(e,n.windingNumber)},t.finishRegion=function(e,n){var r=n.eUp,i=r.Lface;i.inside=n.inside,i.anEdge=r,t.deleteRegion(e,n)},t.finishLeftRegions=function(e,n,r){for(var i,o=null,a=n,s=n.eUp;a!==r;){if(a.fixUpperEdge=!1,(i=(o=t.regionBelow(a)).eUp).Org!=s.Org){if(!o.fixUpperEdge){t.finishRegion(e,a);break}i=e.mesh.connect(s.Lprev,i.Sym),t.fixUpperEdge(e,o,i)}s.Onext!==i&&(e.mesh.splice(i.Oprev,i),e.mesh.splice(s,i)),t.finishRegion(e,a),s=o.eUp,a=o}return s},t.addRightEdges=function(e,n,r,i,o,a){var s,u,l,c,h=!0;l=r;do{fs(gs.vertLeq(l.Org,l.Dst)),t.addRegionBelow(e,n,l.Sym),l=l.Onext}while(l!==i);for(null===o&&(o=t.regionBelow(n).eUp.Rprev),u=n,c=o;(l=(s=t.regionBelow(u)).eUp.Sym).Org===c.Org;)l.Onext!==c&&(e.mesh.splice(l.Oprev,l),e.mesh.splice(c.Oprev,l)),s.windingNumber=u.windingNumber-l.winding,s.inside=t.isWindingInside(e,s.windingNumber),u.dirty=!0,!h&&t.checkForRightSplice(e,u)&&(t.addWinding(l,c),t.deleteRegion(e,u),e.mesh.delete(c)),h=!1,u=s,c=l;u.dirty=!0,fs(u.windingNumber-l.winding===s.windingNumber),a&&t.walkDirtyRegions(e,u)},t.spliceMergeVertices=function(t,e,n){t.mesh.splice(e,n)},t.vertexWeights=function(t,e,n){var r=gs.vertL1dist(e,t),i=gs.vertL1dist(n,t),o=.5*i/(r+i),a=.5*r/(r+i);t.coords[0]+=o*e.coords[0]+a*n.coords[0],t.coords[1]+=o*e.coords[1]+a*n.coords[1],t.coords[2]+=o*e.coords[2]+a*n.coords[2]},t.getIntersectData=function(e,n,r,i,o,a){n.coords[0]=n.coords[1]=n.coords[2]=0,n.idx=-1,t.vertexWeights(n,r,i),t.vertexWeights(n,o,a)},t.checkForRightSplice=function(e,n){var r=t.regionBelow(n),i=n.eUp,o=r.eUp;if(gs.vertLeq(i.Org,o.Org)){if(gs.edgeSign(o.Dst,i.Org,o.Org)>0)return!1;gs.vertEq(i.Org,o.Org)?i.Org!==o.Org&&(e.pq.delete(i.Org.pqHandle),t.spliceMergeVertices(e,o.Oprev,i)):(e.mesh.splitEdge(o.Sym),e.mesh.splice(i,o.Oprev),n.dirty=r.dirty=!0)}else{if(gs.edgeSign(i.Dst,o.Org,i.Org)<0)return!1;t.regionAbove(n).dirty=n.dirty=!0,e.mesh.splitEdge(i.Sym),e.mesh.splice(o.Oprev,i)}return!0},t.checkForLeftSplice=function(e,n){var r,i=t.regionBelow(n),o=n.eUp,a=i.eUp;if(fs(!gs.vertEq(o.Dst,a.Dst)),gs.vertLeq(o.Dst,a.Dst)){if(gs.edgeSign(o.Dst,a.Dst,o.Org)<0)return!1;t.regionAbove(n).dirty=n.dirty=!0,r=e.mesh.splitEdge(o),e.mesh.splice(a.Sym,r),r.Lface.inside=n.inside}else{if(gs.edgeSign(a.Dst,o.Dst,a.Org)>0)return!1;n.dirty=i.dirty=!0,r=e.mesh.splitEdge(a),e.mesh.splice(o.Lnext,a.Sym),r.Rface.inside=n.inside}return!0},t.checkForIntersect=function(e,n){var r,i,o=t.regionBelow(n),a=n.eUp,s=o.eUp,u=a.Org,l=s.Org,c=a.Dst,h=s.Dst,p=new ys;if(fs(!gs.vertEq(h,c)),fs(gs.edgeSign(c,e.event,u)<=0),fs(gs.edgeSign(h,e.event,l)>=0),fs(u!==e.event&&l!==e.event),fs(!n.fixUpperEdge&&!o.fixUpperEdge),u===l)return!1;if(Math.min(u.t,c.t)>Math.max(l.t,h.t))return!1;if(gs.vertLeq(u,l)){if(gs.edgeSign(h,u,l)>0)return!1}else if(gs.edgeSign(c,l,u)<0)return!1;return t.debugEvent(e),gs.intersect(c,u,h,l,p),fs(Math.min(u.t,c.t)<=p.t),fs(p.t<=Math.max(l.t,h.t)),fs(Math.min(h.s,c.s)<=p.s),fs(p.s<=Math.max(l.s,u.s)),gs.vertLeq(p,e.event)&&(p.s=e.event.s,p.t=e.event.t),r=gs.vertLeq(u,l)?u:l,gs.vertLeq(r,p)&&(p.s=r.s,p.t=r.t),gs.vertEq(p,u)||gs.vertEq(p,l)?(t.checkForRightSplice(e,n),!1):!gs.vertEq(c,e.event)&&gs.edgeSign(c,e.event,p)>=0||!gs.vertEq(h,e.event)&&gs.edgeSign(h,e.event,p)<=0?h===e.event?(e.mesh.splitEdge(a.Sym),e.mesh.splice(s.Sym,a),n=t.topLeftRegion(e,n),a=t.regionBelow(n).eUp,t.finishLeftRegions(e,t.regionBelow(n),o),t.addRightEdges(e,n,a.Oprev,a,a,!0),!0):c===e.event?(e.mesh.splitEdge(s.Sym),e.mesh.splice(a.Lnext,s.Oprev),o=n,n=t.topRightRegion(n),i=t.regionBelow(n).eUp.Rprev,o.eUp=s.Oprev,s=t.finishLeftRegions(e,o,null),t.addRightEdges(e,n,s.Onext,a.Rprev,i,!0),!0):(gs.edgeSign(c,e.event,p)>=0&&(t.regionAbove(n).dirty=n.dirty=!0,e.mesh.splitEdge(a.Sym),a.Org.s=e.event.s,a.Org.t=e.event.t),gs.edgeSign(h,e.event,p)<=0&&(n.dirty=o.dirty=!0,e.mesh.splitEdge(s.Sym),s.Org.s=e.event.s,s.Org.t=e.event.t),!1):(e.mesh.splitEdge(a.Sym),e.mesh.splitEdge(s.Sym),e.mesh.splice(s.Oprev,a),a.Org.s=p.s,a.Org.t=p.t,a.Org.pqHandle=e.pq.insert(a.Org),t.getIntersectData(e,a.Org,u,c,l,h),t.regionAbove(n).dirty=n.dirty=o.dirty=!0,!1)},t.walkDirtyRegions=function(e,n){for(var r,i,o=t.regionBelow(n);;){for(;o.dirty;)n=o,o=t.regionBelow(o);if(!n.dirty&&(o=n,null===(n=t.regionAbove(n))||!n.dirty))return;if(n.dirty=!1,r=n.eUp,i=o.eUp,r.Dst!==i.Dst&&t.checkForLeftSplice(e,n)&&(o.fixUpperEdge?(t.deleteRegion(e,o),e.mesh.delete(i),i=(o=t.regionBelow(n)).eUp):n.fixUpperEdge&&(t.deleteRegion(e,n),e.mesh.delete(r),r=(n=t.regionAbove(o)).eUp)),r.Org!==i.Org)if(r.Dst===i.Dst||n.fixUpperEdge||o.fixUpperEdge||r.Dst!==e.event&&i.Dst!==e.event)t.checkForRightSplice(e,n);else if(t.checkForIntersect(e,n))return;r.Org===i.Org&&r.Dst===i.Dst&&(t.addWinding(i,r),t.deleteRegion(e,n),e.mesh.delete(r),n=t.regionAbove(o))}},t.connectRightVertex=function(e,n,r){var i,o=r.Onext,a=t.regionBelow(n),s=n.eUp,u=a.eUp,l=!1;s.Dst!==u.Dst&&t.checkForIntersect(e,n),gs.vertEq(s.Org,e.event)&&(e.mesh.splice(o.Oprev,s),n=t.topLeftRegion(e,n),o=t.regionBelow(n).eUp,t.finishLeftRegions(e,t.regionBelow(n),a),l=!0),gs.vertEq(u.Org,e.event)&&(e.mesh.splice(r,u.Oprev),r=t.finishLeftRegions(e,a,null),l=!0),l?t.addRightEdges(e,n,r.Onext,o,o,!0):(i=gs.vertLeq(u.Org,s.Org)?u.Oprev:s,i=e.mesh.connect(r.Lprev,i),t.addRightEdges(e,n,i,i.Onext,i.Onext,!1),i.Sym.activeRegion.fixUpperEdge=!0,t.walkDirtyRegions(e,n))},t.connectLeftDegenerate=function(e,n,r){var i,o,a,s,u;return i=n.eUp,gs.vertEq(i.Org,r)?(fs(!1),void t.spliceMergeVertices(e,i,r.anEdge)):gs.vertEq(i.Dst,r)?(fs(!1),n=t.topRightRegion(n),o=s=(a=(u=t.regionBelow(n)).eUp.Sym).Onext,u.fixUpperEdge&&(fs(o!==a),t.deleteRegion(e,u),e.mesh.delete(a),a=o.Oprev),e.mesh.splice(r.anEdge,a),gs.edgeGoesLeft(o)||(o=null),void t.addRightEdges(e,n,a.Onext,s,o,!0)):(e.mesh.splitEdge(i.Sym),n.fixUpperEdge&&(e.mesh.delete(i.Onext),n.fixUpperEdge=!1),e.mesh.splice(r.anEdge,i),void t.sweepEvent(e,r))},t.connectLeftVertex=function(e,n){var r,i,o,a,s,u,l=new Is;if(l.eUp=n.anEdge.Sym,r=e.dict.search(l).key,i=t.regionBelow(r))if(a=r.eUp,s=i.eUp,0!==gs.edgeSign(a.Dst,n,a.Org))if(o=gs.vertLeq(s.Dst,a.Dst)?r:i,r.inside||o.fixUpperEdge){if(o===r)u=e.mesh.connect(n.anEdge.Sym,a.Lnext);else u=e.mesh.connect(s.Dnext,n.anEdge).Sym;o.fixUpperEdge?t.fixUpperEdge(e,o,u):t.computeWinding(e,t.addRegionBelow(e,r,u)),t.sweepEvent(e,n)}else t.addRightEdges(e,r,n.anEdge,n.anEdge,null,!0);else t.connectLeftDegenerate(e,r,n)},t.sweepEvent=function(e,n){e.event=n,t.debugEvent(e);for(var r=n.anEdge;null===r.activeRegion;)if((r=r.Onext)===n.anEdge)return void t.connectLeftVertex(e,n);var i=t.topLeftRegion(e,r.activeRegion);fs(null!==i);var o=t.regionBelow(i),a=o.eUp,s=t.finishLeftRegions(e,o,null);s.Onext===a?t.connectRightVertex(e,i,s):t.addRightEdges(e,i,s.Onext,a,a,!0)},t.addSentinel=function(t,e,n,r){var i=new Is,o=t.mesh.makeEdge();o.Org.s=n,o.Org.t=r,o.Dst.s=e,o.Dst.t=r,t.event=o.Dst,i.eUp=o,i.windingNumber=0,i.inside=!1,i.fixUpperEdge=!1,i.sentinel=!0,i.dirty=!1,i.nodeUp=t.dict.insert(i)},t.initEdgeDict=function(e){e.dict=new xs(e,t.edgeLeq);var n=e.bmax[0]-e.bmin[0],r=e.bmax[1]-e.bmin[1],i=e.bmin[0]-n,o=e.bmax[0]+n,a=e.bmin[1]-r,s=e.bmax[1]+r;t.addSentinel(e,i,o,a),t.addSentinel(e,i,o,s)},t.doneEdgeDict=function(e){for(var n,r=0;null!==(n=e.dict.min().key);)n.sentinel||(fs(n.fixUpperEdge),fs(1==++r)),fs(0===n.windingNumber),t.deleteRegion(e,n)},t.removeDegenerateEdges=function(e){var n,r,i,o=e.mesh.eHead;for(n=o.next;n!==o;n=r)r=n.next,i=n.Lnext,gs.vertEq(n.Org,n.Dst)&&n.Lnext.Lnext!==n&&(t.spliceMergeVertices(e,i,n),e.mesh.delete(n),i=(n=i).Lnext),i.Lnext===n&&(i!==n&&(i!==r&&i!==r.Sym||(r=r.next),e.mesh.delete(i)),n!==r&&n!==r.Sym||(r=r.next),e.mesh.delete(n))},t.initPriorityQ=function(t){var e,n,r,i=0;for(n=(r=t.mesh.vHead).next;n!==r;n=n.next)i++;for(i+=8,e=t.pq=new Cs(i,gs.vertLeq),n=(r=t.mesh.vHead).next;n!==r;n=n.next)n.pqHandle=e.insert(n);return n===r&&(e.init(),!0)},t.donePriorityQ=function(t){t.pq=null},t.removeDegenerateFaces=function(e,n){var r,i,o;for(r=n.fHead.next;r!==n.fHead;r=i)i=r.next,fs((o=r.anEdge).Lnext!==o),o.Lnext.Lnext===o&&(t.addWinding(o.Onext,o),e.mesh.delete(o));return!0},t.computeInterior=function(e,n){var r,i;if(void 0===n&&(n=!0),t.removeDegenerateEdges(e),!t.initPriorityQ(e))return!1;for(t.initEdgeDict(e);null!==(r=e.pq.extractMin());){for(;null!==(i=e.pq.min())&&gs.vertEq(i,r);)i=e.pq.extractMin(),t.spliceMergeVertices(e,r.anEdge,i.anEdge);t.sweepEvent(e,r)}return e.event=e.dict.min().key.eUp.Org,t.debugEvent(e),t.doneEdgeDict(e),t.donePriorityQ(e),!!t.removeDegenerateFaces(e,e.mesh)&&(n&&e.mesh.check(),!0)},t}(),Ss=function(){function t(){this.mesh=new As,this.normal=[0,0,0],this.sUnit=[0,0,0],this.tUnit=[0,0,0],this.bmin=[0,0],this.bmax=[0,0],this.windingRule=ls.ODD,this.dict=null,this.pq=null,this.event=null,this.vertexIndexCounter=0,this.vertices=[],this.vertexIndices=[],this.vertexCount=0,this.elements=[],this.elementCount=0}return t.prototype.dot_=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.prototype.normalize_=function(t){var e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(!e)throw"Zero-size vector!";e=Math.sqrt(e),t[0]/=e,t[1]/=e,t[2]/=e},t.prototype.longAxis_=function(t){var e=0;return Math.abs(t[1])>Math.abs(t[0])&&(e=1),Math.abs(t[2])>Math.abs(t[e])&&(e=2),e},t.prototype.computeNormal_=function(t){var e,n,r,i,o,a,s=[0,0,0],u=[0,0,0],l=[0,0,0],c=[0,0,0],h=[0,0,0],p=[null,null,null],d=[null,null,null],f=this.mesh.vHead;e=f.next;for(var g=0;g<3;++g)i=e.coords[g],u[g]=i,d[g]=e,s[g]=i,p[g]=e;for(e=f.next;e!==f;e=e.next)for(var _=0;_<3;++_)(i=e.coords[_])s[_]&&(s[_]=i,p[_]=e);var m=0;if(s[1]-u[1]>s[0]-u[0]&&(m=1),s[2]-u[2]>s[m]-u[m]&&(m=2),u[m]>=s[m])return t[0]=0,t[1]=0,void(t[2]=1);for(a=0,n=d[m],r=p[m],l[0]=n.coords[0]-r.coords[0],l[1]=n.coords[1]-r.coords[1],l[2]=n.coords[2]-r.coords[2],e=f.next;e!==f;e=e.next)c[0]=e.coords[0]-r.coords[0],c[1]=e.coords[1]-r.coords[1],c[2]=e.coords[2]-r.coords[2],h[0]=l[1]*c[2]-l[2]*c[1],h[1]=l[2]*c[0]-l[0]*c[2],h[2]=l[0]*c[1]-l[1]*c[0],(o=h[0]*h[0]+h[1]*h[1]+h[2]*h[2])>a&&(a=o,t[0]=h[0],t[1]=h[1],t[2]=h[2]);a<=0&&(t[0]=t[1]=t[2]=0,t[this.longAxis_(l)]=1)},t.prototype.checkOrientation_=function(){for(var t,e,n=this.mesh.fHead,r=this.mesh.vHead,i=0,o=n.next;o!==n;o=o.next)if(!((e=o.anEdge).winding<=0))do{i+=(e.Org.s-e.Dst.s)*(e.Org.t+e.Dst.t),e=e.Lnext}while(e!==o.anEdge);if(i<0){for(t=r.next;t!==r;t=t.next)t.t=-t.t;this.tUnit[0]=-this.tUnit[0],this.tUnit[1]=-this.tUnit[1],this.tUnit[2]=-this.tUnit[2]}},t.prototype.projectPolygon_=function(){var t,e,n=this.mesh.vHead,r=[0,0,0],i=!1;r[0]=this.normal[0],r[1]=this.normal[1],r[2]=this.normal[2],r[0]||r[1]||r[2]||(this.computeNormal_(r),i=!0),t=this.sUnit,e=this.tUnit;var o=this.longAxis_(r);t[o]=0,t[(o+1)%3]=1,t[(o+2)%3]=0,e[o]=0,e[(o+1)%3]=0,e[(o+2)%3]=r[o]>0?1:-1;for(var a=n.next;a!==n;a=a.next)a.s=this.dot_(a.coords,t),a.t=this.dot_(a.coords,e);i&&this.checkOrientation_();for(var s=!0,u=n.next;u!==n;u=u.next)s?(this.bmin[0]=this.bmax[0]=u.s,this.bmin[1]=this.bmax[1]=u.t,s=!1):(u.sthis.bmax[0]&&(this.bmax[0]=u.s),u.tthis.bmax[1]&&(this.bmax[1]=u.t))},t.prototype.addWinding_=function(t,e){t.winding+=e.winding,t.Sym.winding+=e.Sym.winding},t.prototype.tessellateMonoRegion_=function(t,e){var n,r;if((n=e.anEdge).Lnext===n||n.Lnext.Lnext===n)throw"Mono region invalid";for(;gs.vertLeq(n.Dst,n.Org);n=n.Lprev);for(;gs.vertLeq(n.Org,n.Dst);n=n.Lnext);r=n.Lprev;for(;n.Lnext!==r;)if(gs.vertLeq(n.Dst,r.Org)){for(;r.Lnext!==n&&(gs.edgeGoesLeft(r.Lnext)||gs.edgeSign(r.Org,r.Dst,r.Lnext.Dst)<=0);)r=t.connect(r.Lnext,r).Sym;r=r.Lprev}else{for(;r.Lnext!==n&&(gs.edgeGoesRight(n.Lprev)||gs.edgeSign(n.Dst,n.Org,n.Lprev.Org)>=0);)n=t.connect(n,n.Lprev).Sym;n=n.Lnext}if(r.Lnext===n)throw"Mono region invalid";for(;r.Lnext.Lnext!==n;)r=t.connect(r.Lnext,r).Sym;return!0},t.prototype.tessellateInterior_=function(t){for(var e,n=t.fHead.next;n!==t.fHead;n=e)if(e=n.next,n.inside&&!this.tessellateMonoRegion_(t,n))return!1;return!0},t.prototype.discardExterior_=function(t){for(var e,n=t.fHead.next;n!==t.fHead;n=e)e=n.next,n.inside||t.zapFace(n)},t.prototype.setWindingNumber_=function(t,e,n){for(var r,i=t.eHead.next;i!==t.eHead;i=r)r=i.next,i.Rface.inside!==i.Lface.inside?i.winding=i.Lface.inside?e:-e:n?t.delete(i):i.winding=0},t.prototype.getNeighbourFace_=function(t){return t.Rface&&t.Rface.inside?t.Rface.n:-1},t.prototype.outputPolymesh_=function(t,e,n,r){var i,o,a=0,s=0;n>3&&t.mergeConvexFaces(n);for(var u=t.vHead.next;u!==t.vHead;u=u.next)u.n=-1;for(var l=t.fHead.next;l!==t.fHead;l=l.next)if(l.n=-1,l.inside){i=l.anEdge,o=0;do{-1===(u=i.Org).n&&(u.n=s,s++),o++,i=i.Lnext}while(i!==l.anEdge);if(o>n)throw"Face vertex greater that support polygon";l.n=a,++a}this.elementCount=a,e===cs.CONNECTED_POLYGONS&&(a*=2),this.elements=[],this.elements.length=a*n,this.vertexCount=s,this.vertices=[],this.vertices.length=s*r,this.vertexIndices=[],this.vertexIndices.length=s;for(u=t.vHead.next;u!==t.vHead;u=u.next)if(-1!==u.n){var c=u.n*r;this.vertices[c+0]=u.coords[0],this.vertices[c+1]=u.coords[1],r>2&&(this.vertices[c+2]=u.coords[2]),this.vertexIndices[u.n]=u.idx}var h=0;for(l=t.fHead.next;l!==t.fHead;l=l.next)if(l.inside){i=l.anEdge,o=0;do{u=i.Org;this.elements[h++]=u.n,o++,i=i.Lnext}while(i!==l.anEdge);for(var p=o;p2&&(this.vertices[s++]=n.Org.coords[2]),this.vertexIndices[u++]=n.Org.idx,o++,n=n.Lnext}while(n!==r);this.elements[l++]=i,this.elements[l++]=o,i+=o}},t.prototype.addContour=function(t,e){null===this.mesh&&(this.mesh=new As),t<2&&(t=2),t>3&&(t=3);for(var n=null,r=0;r2?e[r+2]:0,n.Org.idx=this.vertexIndexCounter++,n.winding=1,n.Sym.winding=-1},t.prototype.tesselate=function(t,e,n,r,i,o){if(void 0===t&&(t=ls.ODD),void 0===e&&(e=cs.POLYGONS),void 0===o&&(o=!0),this.vertices=[],this.elements=[],this.vertexIndices=[],this.vertexIndexCounter=0,i&&(this.normal[0]=i[0],this.normal[1]=i[1],this.normal[2]=i[2]),this.windingRule=t,r<2&&(r=2),r>3&&(r=3),!this.mesh)return!1;this.projectPolygon_(),ws.computeInterior(this,o);var a=this.mesh;return e===cs.BOUNDARY_CONTOURS?this.setWindingNumber_(a,1,!0):this.tessellateInterior_(a),o&&a.check(),e===cs.BOUNDARY_CONTOURS?this.outputContours_(a,r):this.outputPolymesh_(a,e,n,r),!0},t}();function Ds(t){var e=t.windingRule,n=void 0===e?ls.ODD:e,r=t.elementType,i=void 0===r?cs.POLYGONS:r,o=t.polySize,a=void 0===o?3:o,s=t.vertexSize,u=void 0===s?2:s,l=t.normal,c=void 0===l?[0,0,1]:l,h=t.contours,p=void 0===h?[]:h,d=t.strict,f=void 0===d||d,g=t.debug,_=void 0!==g&&g;if(!p&&f)throw new Error("Contours can't be empty");if(p){for(var m=new Ss,y=0;ye)throw"Size should be a greater 0";if(!t)throw"Invalid pointer!";return(e=new(n=n||Uint8Array)(d.HEAP8.buffer,t,e)).F=t,e.I=function(){d._free(t)},e}var g=d.Tess=function(){if(!i){var t=d.cwrap;i=t("tessNewTess","number",["number"]),o=t("tessDeleteTess",null,["number"]),a=t("tessAddContour","number",["number","number","number","number","number"]),s=t("tessTesselate","number","number number number number number number".split(" ")),u=t("tessGetVertexCount","number",["number"]),l=t("tessGetVertices","number",["number"]),c=t("tessGetElementCount","number",["number"]),h=t("tessGetElements","number",["number"]),p=t("tessGetVertexIndices","number",["number"])}if(this.F=i(0),this.G=[],!this.F)throw"Unknown error, tesselator wasn't init!"};Object.assign(g.prototype,{dispose:function(){this.F&&(o(this.F),this.G.forEach((function(t){t.I&&t.I()})),this.G=[],this.F=0)},addContours:function(t,e){if(!this.F)throw"Tessealtor wasn't be inited!";e=e||2;var n=this.G=[];"number"==typeof t[0]&&(t=[t]);for(var r=0;r=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++o)),127>=a){if(r>=n)break;i[r++]=a}else{if(2047>=a){if(r+1>=n)break;i[r++]=192|a>>6}else{if(65535>=a){if(r+2>=n)break;i[r++]=224|a>>12}else{if(r+3>=n)break;i[r++]=240|a>>18,i[r++]=128|a>>12&63}i[r++]=128|a>>6&63}i[r++]=128|63&a}}i[r]=0}}return e},array:function(t){var e=$(t.length);return S.set(t,e),e}},a=E(t),s=[];if(t=0,r)for(var u=0;u=n);)++r;if(16(i=224==(240&i)?(15&i)<<12|o<<6|a:(7&i)<<18|o<<12|a<<6|63&e[t++])?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else n+=String.fromCharCode(i)}t=n}}else t="";return t}function B(){var t=C.buffer;w=t,e.HEAP8=S=new Int8Array(t),e.HEAP16=new Int16Array(t),e.HEAP32=new Int32Array(t),e.HEAPU8=D=new Uint8Array(t),e.HEAPU16=new Uint16Array(t),e.HEAPU32=new Uint32Array(t),e.HEAPF32=new Float32Array(t),e.HEAPF64=new Float64Array(t)}var O,M=[],L=[],N=[],R=[];function F(){var t=e.preRun.shift();M.unshift(t)}var k=0,U=null;function j(t){throw e.onAbort&&e.onAbort(t),A(t),I=!0,t=new WebAssembly.RuntimeError("abort("+t+"). Build with -s ASSERTIONS=1 for more info."),r(t),t}function V(t){return String.prototype.startsWith?t.startsWith("data:application/octet-stream;base64,"):0===t.indexOf("data:application/octet-stream;base64,")}e.preloadedImages={},e.preloadedAudios={};var Q="data:application/octet-stream;base64,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AAsgAyAHTA0AIAUgAyAHa0ECdBAcIANBAnRqIABBf3NBAnRqIQULIAEoAgAiASALRw0ADAILAAsDQAJAIAEtABVFDQBBACEEIAEoAggiAiEGA0AgBSAGKAIQKAIkNgIAIAQiAEEBaiEEIAVBBGohBSAGKAIMIgYgAkcNAAsgAyAETA0AIAUgAyAEa0ECdBAcIANBAnRqIABBf3NBAnRqIQULIAEoAgAiASALRw0ACwsPC0HhFUGhFUHyBEH3FRAAAAsgAEEBNgIEC9gBAQJ/IwBBMGsiASQAIAEgACkCiAE3AyggASAAKQKAATcDICABIAApAng3AxggASAAKQJwNwMQIAEgACkCaDcDCCAAKAJMEBggACgCACICBEAgAUEIaiACEC0gAEEANgIACyAAKAJUIgIEQCABKAIUIAIgASgCEBEBACAAQQA2AlQLIAAoAlgiAgRAIAEoAhQgAiABKAIQEQEAIABBADYCWAsgACgCYCICBEAgASgCFCACIAEoAhARAQAgAEEANgJgCyABKAIUIAAgASgCEBEBACABQTBqJAAL/wICA38BfiAAQYgWIAAbIgIoAgAiAEUEQCACQYgWKAIAIgA2AgALIAIoAgRFBEAgAkGMFigCADYCBAsgAigCCEUEQCACQZAWKAIANgIICyACKAIMQawCIAARAAAiAUUEQEEADwsgASACKQIANwJoIAEgAikCIDcCiAEgASACKQIYNwKAASABIAIpAhAiBDcCeCABIAIpAgg3AnAgBKdFBEAgAUGABDYCeAsgASgCfEUEQCABQYAENgJ8CyABKAKAAUUEQCABQYACNgKAAQsgASgChAFFBEAgAUGABDYChAELIAEoAogBIgBFBEAgAUGAAjYCiAFBgAIhAAsgAUHoAGohAyABQgA3AiwgAUEANgIQIAFCADcCCCABQgA3AjQgAUEANgI8QRAhAgJAIABBEE4EQEGAICECIABBgSBIDQELIAEgAjYCiAEgAiEACyADQdkVQRwgABAZIQAgAUIANwJQIAFCADcCACABIAA2AkwgAUIANwJYIAFCADcCYCABCwYAIAEQFQsIACABIAIQJQsGACABEBYLvAUCBX8CfQJAAkAgASgCCCIBKAIMIgIgAUYNACACKAIMIAFGDQADQAJAIAEoAgQoAhAiAyoCGCIHIAEoAhAiAioCGCIIXUUE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cSggdSwgdiApICYmIFRyYW5zTGVxKCB2LCB3ICkAdGVzdHJhbnNFdmFsAHRlc3RyYW5zU2lnbgBNZXNoIEVkZ2VzAE1lc2ggVmVydGljZXMATWVzaCBGYWNlcwBmLT5wcmV2ID09IGZQcmV2AHNyYy9tZXNoLmMAdGVzc01lc2hDaGVja01lc2gAZS0+U3ltICE9IGUAZS0+U3ltLT5TeW0gPT0gZQBlLT5MbmV4dC0+T25leHQtPlN5bSA9PSBlAGUtPk9uZXh0LT5TeW0tPkxuZXh0ID09IGUAZS0+TGZhY2UgPT0gZgBmLT5wcmV2ID09IGZQcmV2ICYmIGYtPmFuRWRnZSA9PSBOVUxMAHYtPnByZXYgPT0gdlByZXYAZS0+T3JnID09IHYAdi0+cHJldiA9PSB2UHJldiAmJiB2LT5hbkVkZ2UgPT0gTlVMTABlLT5TeW0tPm5leHQgPT0gZVByZXYtPlN5bQBlLT5PcmcgIT0gTlVMTABlLT5Ec3QgIT0gTlVMTABlLT5TeW0tPm5leHQgPT0gZVByZXYtPlN5bSAmJiBlLT5TeW0gPT0gJm1lc2gtPmVIZWFkU3ltICYmIGUtPlN5bS0+U3ltID09IGUgJiYgZS0+T3JnID09IE5VTEwgJiYgZS0+RHN0ID09IE5VTEwgJiYgZS0+TGZhY2UgPT0gTlVMTCAmJiBlLT5SZmFjZSA9PSBOVUxMAGZyZWUgIT0gSU5WX0hBTkRMRQBzcmMvcHJpb3JpdHlxLmMAcHFIZWFwSW5zZXJ0AGhDdXJyID49IDEgJiYgaEN1cnIgPD0gcHEtPm1heCAmJiBoW2hDdXJyXS5rZXkgIT0gTlVMTABwcUhlYXBEZWxldGUAcHEgIT0gTlVMTABwcURlbGV0ZVByaW9yaXR5UQBMRVEoICoqKGkrMSksICoqaSApAHBxSW5pdABjdXJyICE9IElOVl9IQU5ETEUAcHFJbnNlcnQAY3VyciA8IHBxLT5tYXggJiYgcHEtPmtleXNbY3Vycl0gIT0gTlVMTABwcURlbGV0ZQBjaGlsZCA8PSBwcS0+bWF4AEZsb2F0RG93bgBUT0xFUkFOQ0VfTk9OWkVSTwBzcmMvc3dlZXAuYwBDb25uZWN0TGVmdERlZ2VuZXJhdGUAcmVnLT5maXhVcHBlckVkZ2UARml4VXBwZXJFZGdlAEZBTFNFAElzV2luZGluZ0luc2lkZQByZWctPmVVcC0+d2luZGluZyA9PSAwAERlbGV0ZVJlZ2lvbgAhIFZlcnRFcSggZHN0TG8sIGRzdFVwICkAQ2hlY2tGb3JJbnRlcnNlY3QARWRnZVNpZ24oIGRzdFVwLCB0ZXNzLT5ldmVudCwgb3JnVXAgKSA8PSAwAEVkZ2VTaWduKCBkc3RMbywgdGVzcy0+ZXZlbnQsIG9yZ0xvICkgPj0gMABvcmdVcCAhPSB0ZXNzLT5ldmVudCAmJiBvcmdMbyAhPSB0ZXNzLT5ldmVudAAhIHJlZ1VwLT5maXhVcHBlckVkZ2UgJiYgISByZWdMby0+Zml4VXBwZXJFZGdlAE1JTiggb3JnVXAtPnQsIGRzdFVwLT50ICkgPD0gaXNlY3QudABpc2VjdC50IDw9IE1BWCggb3JnTG8tPnQsIGRzdExvLT50ICkATUlOKCBkc3RMby0+cywgZHN0VXAtPnMgKSA8PSBpc2VjdC5zAGlzZWN0LnMgPD0gTUFYKCBvcmdMby0+cywgb3JnVXAtPnMgKQAhIFZlcnRFcSggZVVwLT5Ec3QsIGVMby0+RHN0ICkAQ2hlY2tGb3JMZWZ0U3BsaWNlAFZlcnRMZXEoIGUtPk9yZywgZS0+RHN0ICkAQWRkUmlnaHRFZGdlcwByZWdQcmV2LT53aW5kaW5nTnVtYmVyIC0gZS0+d2luZGluZyA9PSByZWctPndpbmRpbmdOdW1iZXIARG9uZUVkZ2VEaWN0ACsrZml4ZWRFZGdlcyA9PSAxAHJlZy0+d2luZGluZ051bWJlciA9PSAwAGUtPkxuZXh0ICE9IGUAUmVtb3ZlRGVnZW5lcmF0ZUZhY2VzAHVwLT5MbmV4dCAhPSB1cCAmJiB1cC0+TG5leHQtPkxuZXh0ICE9IHVwAHNyYy90ZXNzLmMAdGVzc01lc2hUZXNzZWxsYXRlTW9ub1JlZ2lvbgBsby0+TG5leHQgIT0gdXAAUmVnaW9ucwBmYWNlVmVydHMgPD0gcG9seVNpemUAT3V0cHV0UG9seW1lc2gAQYgWCwkMAAAADQAAAA4AQbAWCwNADVA=";if(!V(Q)){var G=Q;Q=e.locateFile?e.locateFile(G,y):y+G}function z(){try{if(v)return new Uint8Array(v);var t=Q;if(V(t))try{var e=X(t.slice(37)),n=new Uint8Array(e.length);for(t=0;t>4,i=(15&i)<<4|o>>2;var s=(3&o)<<6|a;e+=String.fromCharCode(r),64!==o&&(e+=String.fromCharCode(i)),64!==a&&(e+=String.fromCharCode(s))}while(n>>=0;var e=D.length;if(2147483648=n;n*=2){var r=e*(1+.2/n);r=Math.min(r,t+100663296),0<(r=Math.max(16777216,t,r))%65536&&(r+=65536-r%65536);t:{try{C.grow(Math.min(2147483648,r)-w.byteLength+65535>>>16),B();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},c:function(){return 0|b},j:function(t,e){var n=W();try{return O.get(t)(e)}catch(t){if(J(n),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},g:function(t,e,n){var r=W();try{return O.get(t)(e,n)}catch(t){if(J(r),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},f:function(t,e){var n=W();try{O.get(t)(e)}catch(t){if(J(n),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},e:function(t,e,n){var r=W();try{O.get(t)(e,n)}catch(t){if(J(r),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},h:function(t,e,n,r){var i=W();try{O.get(t)(e,n,r)}catch(t){if(J(i),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},i:function(t,e,n,r,i,o){var a=W();try{O.get(t)(e,n,r,i,o)}catch(t){if(J(a),t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}},b:function(t){b=0|t}};!function(){function t(t){e.asm=t.exports,C=e.asm.m,B(),O=e.asm.n,k--,e.monitorRunDependencies&&e.monitorRunDependencies(k),0==k&&U&&(t=U,U=null,t())}function n(e){t(e.instance)}function i(t){return(v||"function"!=typeof fetch?Promise.resolve().then(z):fetch(Q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+Q+"'";return t.arrayBuffer()})).catch((function(){return z()}))).then((function(t){return WebAssembly.instantiate(t,o)})).then(t,(function(t){A("failed to asynchronously prepare wasm: "+t),j(t)}))}var o={a:Y};if(k++,e.monitorRunDependencies&&e.monitorRunDependencies(k),e.instantiateWasm)try{return e.instantiateWasm(o,t)}catch(t){return A("Module.instantiateWasm callback failed with error: "+t),!1}(v||"function"!=typeof WebAssembly.instantiateStreaming||V(Q)||"function"!=typeof fetch?i(n):fetch(Q,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,o).then(n,(function(t){return A("wasm streaming compile failed: "+t),A("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(r)}();var q=e.___wasm_call_ctors=function(){return(q=e.___wasm_call_ctors=e.asm.o).apply(null,arguments)};e._malloc=function(){return(e._malloc=e.asm.p).apply(null,arguments)},e._free=function(){return(e._free=e.asm.q).apply(null,arguments)},e._tessNewTess=function(){return(e._tessNewTess=e.asm.r).apply(null,arguments)},e._tessDeleteTess=function(){return(e._tessDeleteTess=e.asm.s).apply(null,arguments)},e._tessAddContour=function(){return(e._tessAddContour=e.asm.t).apply(null,arguments)},e._tessTesselate=function(){return(e._tessTesselate=e.asm.u).apply(null,arguments)},e._tessGetVertexCount=function(){return(e._tessGetVertexCount=e.asm.v).apply(null,arguments)},e._tessGetVertices=function(){return(e._tessGetVertices=e.asm.w).apply(null,arguments)},e._tessGetVertexIndices=function(){return(e._tessGetVertexIndices=e.asm.x).apply(null,arguments)},e._tessGetElementCount=function(){return(e._tessGetElementCount=e.asm.y).apply(null,arguments)},e._tessGetElements=function(){return(e._tessGetElements=e.asm.z).apply(null,arguments)};var K,W=e.stackSave=function(){return(W=e.stackSave=e.asm.A).apply(null,arguments)},J=e.stackRestore=function(){return(J=e.stackRestore=e.asm.B).apply(null,arguments)},$=e.stackAlloc=function(){return($=e.stackAlloc=e.asm.C).apply(null,arguments)},Z=e._setThrew=function(){return(Z=e._setThrew=e.asm.D).apply(null,arguments)};function tt(){function t(){if(!K&&(K=!0,e.calledRun=!0,!I)){if(H(L),H(N),n(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();R.unshift(t)}H(R)}}if(!(00;var c={sampler:new Me,style:new Qi,material:null};o.fillStyle.data_type in Rs||console.error("Unknown style:",o.fillStyle.data_type),Rs[o.fillStyle.data_type](o.fillStyle,c),(a=a||as.getShape(s)).style=c.style,a.material=c.material,a.originalFillStyle=o.fillStyle,a.isSimpleRect=i.isSimpleRect,t.addShapeInternal(a)}}},t.prepareContours=function(t,e){void 0===e&&(e=!1),t.prepare();for(var n=t._positions,r=[],i=0;i=6)if(e){for(var a=new Array(o.length),s=0,u=o.length;s0?Ls.multy_contours+=1:Ls.single_contours+=1,0===e.length?null:Ms.tesselate({contours:e,windingRule:0,elementType:0,polySize:3,vertexSize:2})},t.fillBuffer=function(t,e){for(var n=t.elements.length,r=this.USE_TESS_FIX?1/this.TESS_SCALE:1,i=0,o=0,a=0,s=0,u=0,l=0,c=0,h=0;h0&&(a=2*r.elements.length,o+=2*r.elements.length);n||(n=new ri(2*Float32Array.BYTES_PER_ELEMENT,o/2|0)),n.count=o/2|0;var u=new Float32Array(n.buffer);s?u.set(s):r&&(this.fillBuffer(r,u),Ms.dispose());for(var l=t.verts.length,c=0;c180&&(J-=360),J<-180&&(J+=360),$=W,f.x=-1*p.y,f.y=p.x,b=A+f.x*nt,C=v+f.y*rt,I=A-f.x*nt,E=v-f.y*rt,q=!1,2!=c||K?(Z=180-J,J<0&&(Z=-180-J),0==J||180==Math.abs(J)?q=2==c:Math.abs(Z)<5?q=!0:(q=!0,Z=-.5*Z*M.DEGREES_TO_RADIANS,g.x=p.x*Math.cos(Z)+p.y*Math.sin(Z),g.y=p.y*Math.cos(Z)-p.x*Math.sin(Z),g.normalize(),Math.abs(J)<=1||Math.abs(J)>=359||Math.abs(J)>=179&&Math.abs(J)<=181?(tt=J<0?nt:-nt,et=J<0?rt:-rt):(tt=nt/Math.sin(Z),et=rt/Math.sin(Z)),x=A-g.x*tt,w=v-g.y*et,S=A+g.x*tt,D=v+g.y*et,J>0?(O=A-a*nt,L=v-s*rt,b=x,C=w,I=P=A-f.x*nt,E=B=v-f.y*rt):(F=A+a*nt,k=v+s*rt,I=S,E=D,b=N=A+f.x*nt,C=R=v+f.y*rt),Y=!0,i.jointstyle==rs.MITER&&(Math.sqrt((tt*tt+et*et)/(nt*nt+rt*rt)-1)<=i.miterLimit?(Y=!1,I=S,E=D,b=x,C=w):J>0?(P-=p.x*(i.miterLimit*nt),B-=p.y*(i.miterLimit*rt),_.x=-1*s,_.y=a,O-=_.x*(i.miterLimit*nt),L-=_.y*(i.miterLimit*rt)):(N-=p.x*(i.miterLimit*nt),R-=p.y*(i.miterLimit*rt),_.x=-1*s,_.y=a,F-=_.x*(i.miterLimit*nt),k-=_.y*(i.miterLimit*rt))),Y&&(it[at++]=i.jointstyle!=rs.ROUND?ks.BUILD_JOINT:ks.BUILD_ROUND_JOINT,J>0?(ot[st++]=x,ot[st++]=w,ot[st++]=O,ot[st++]=L,ot[st++]=P,ot[st++]=B):(ot[st++]=F,ot[st++]=k,ot[st++]=S,ot[st++]=D,ot[st++]=N,ot[st++]=R),i.jointstyle==rs.ROUND&&(ot[st++]=A-g.x*Math.abs(nt),ot[st++]=v-g.y*Math.abs(rt),J>0?(ot[st++]=O,ot[st++]=L,ot[st++]=P,ot[st++]=B):(ot[st++]=F,ot[st++]=k,ot[st++]=N,ot[st++]=R))))):q=!0,a=f.x,s=f.y,q&&(it[at++]=ks.LINE_TO,ot[st++]=b,ot[st++]=C,ot[st++]=I,ot[st++]=E),A=m,v=y,c==o.length-2&&(it[at++]=ks.NO_OP,K?(ot[st++]=ot[0],ot[st++]=ot[1],ot[st++]=ot[2],ot[st++]=ot[3]):(ot[st++]=A+f.x*nt,ot[st++]=v+f.y*rt,ot[st++]=A-f.x*nt,ot[st++]=v-f.y*rt)));for(at=0,st=0,c=0;c=ks.BUILD_JOINT&&(G=ot[st++],z=ot[st++],U=ot[st++],j=ot[st++],V=ot[st++],Q=ot[st++],ds.addTriangle(U,j,V,Q,G,z,0,u,e),it[c]==ks.BUILD_ROUND_JOINT&&(H=ot[st++],X=ot[st++],U=ot[st++],j=ot[st++],V=ot[st++],Q=ot[st++],ds.tesselateCurve(U,j,H,X,V,Q,u,!0)));K||(d.x=o[2]-o[0],d.y=o[3]-o[1],d.normalize(),ds.createCap(o[0],o[1],ot[0],ot[1],ot[2],ot[3],d.x,d.y,i.capstyle,-1,nt,rt,u,e),d.x=o[o.length-2]-o[o.length-4],d.y=o[o.length-1]-o[o.length-3],d.normalize(),ds.createCap(o[o.length-2],o[o.length-1],ot[ot.length-4],ot[ot.length-3],ot[ot.length-2],ot[ot.length-1],d.x,d.y,i.capstyle,1,nt,rt,u,e))}if(0!=u.length){var lt=new ai(Float32Array,e?3:2);lt.set(u);var ct=lt.attributesBuffer.cloneBufferView();lt.dispose();var ht=new io(ct);return ht.setPositions(new li(ct)),ht}},t}(),js=function(){function t(){}return t.EVEN_ODD="evenOdd",t.NON_ZERO="nonZero",t}(),Vs=function(){function t(t,e,n){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=js.EVEN_ODD),this._orientedBoxBoundsDirty=!0,this._isSimpleRect=!1,this.morphSource=!1,this._verts=[],this._lastDirtyID=0,this._dirtyID=-1,this._connectedIdx=[],this._positionOffset=[],this.forceClose=!1,this._cache={},this._cacheSharedSegments={},this._data=[],this._commands=[],this._style=null,this.verts=[],this._positions=[],null!=t&&null!=e?(this._data[0]=e,this._commands[0]=t):(this._data[0]=[],this._commands[0]=[]),this._startPoint=new T,this._cur_point=new T,this._winding_rule=n,this._winding_directions=[]}return Object.defineProperty(t.prototype,"isSimpleRect",{get:function(){return this._isSimpleRect},set:function(t){this._isSimpleRect=t&&1===this.commands.length&&12===this.verts.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verts",{get:function(){return this._verts},set:function(t){this._verts=t,this._isSimpleRect=!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this._lastDirtyID!==this._dirtyID},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data_type",{get:function(){return t.data_type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._style},set:function(t){this._style=t,this._dirtyID++},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return null==this._style?null:this._style.data_type==$a.data_type?this._style:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return null==this._style?null:this._style.data_type==is.data_type?this._style:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"commands",{get:function(){return this._commands},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),t.prototype.cacheSegment=function(t,e,n,r,i,o,a,s,u){void 0===s&&(s=null),void 0===u&&(u=null);var l=n.toString()+"#";l+=r>o?r.toString()+"#"+o.toString():o.toString()+"#"+r.toString(),l+=i>a?i.toString()+"#"+a.toString():a.toString()+"#"+i.toString(),null!=s&&null!=u&&(l+=s.toString()+"#"+u.toString());var c=this._cache[l];null==c&&(this._cache[l]=c=[]),c.push(t),c.push(e),c.length>2&&(this._cacheSharedSegments[l]=c)},t.prototype.curveTo=function(t,e,n,r){if(this.isSimpleRect=!1,t!=n||e!=r){if(this._cur_point.x==n&&this._cur_point.y==r&&(this._cur_point.x!=t||this._cur_point.y!=e))return this.lineTo(t,e),void this.moveTo(n,r);if(this._cur_point.x==n&&this._cur_point.y==r||this._cur_point.x!=t||this._cur_point.y!=e)if(this._cur_point.x!=n||this._cur_point.y!=r||this._cur_point.x!=t||this._cur_point.y!=e){if(0==this._commands[this._commands.length-1].length&&(this._commands[this._commands.length-1].push(ks.MOVE_TO),this._data[this._data.length-1].push(this._cur_point.x),this._data[this._data.length-1].push(this._cur_point.y)),!this.morphSource){var i=n-this._cur_point.x,o=r-this._cur_point.y;if(Math.sqrt(i*i+o*o)<=Zo)return this.data[this.data.length-1][this.data[this.data.length-1].length-2]=n,void(this.data[this.data.length-1][this.data[this.data.length-1].length-1]=r)}this._commands[this._commands.length-1].push(ks.CURVE_TO),this._data[this._data.length-1].push(t),this._data[this._data.length-1].push(e),this._data[this._data.length-1].push(n),this._data[this._data.length-1].push(r),this._cur_point.x=n,this._cur_point.y=r,this._dirtyID++}else this.lineTo(n,r);else this.lineTo(n,r)}else this.lineTo(t,e)},t.prototype.cubicCurveTo=function(t,e,n,r,i,o){if(this.isSimpleRect=!1,console.log("cubicCurveTo not yet fully supported."),this._cur_point.x!=i||this._cur_point.y!=o){if(0==this._commands[this._commands.length-1].length&&(this._commands[this._commands.length-1].push(ks.MOVE_TO),this._data[this._data.length-1].push(this._cur_point.x,this._cur_point.y)),!this.morphSource){var a=i-this._cur_point.x,s=o-this._cur_point.y;if(a*a+s*s<=Zo*Zo)return this.data[this.data.length-1][this.data[this.data.length-1].length-2]=i,void(this.data[this.data.length-1][this.data[this.data.length-1].length-1]=o)}this._commands[this._commands.length-1].push(ks.CURVE_TO),this._data[this._data.length-1].push(t,e,i,o),this._cur_point.x=i,this._cur_point.y=o,this._dirtyID++}},t.prototype.lineTo=function(t,e){if(0==this._commands[this._commands.length-1].length&&(this._commands[this._commands.length-1].push(ks.MOVE_TO),this._data[this._data.length-1].push(this._cur_point.x),this._data[this._data.length-1].push(this._cur_point.y)),!this.morphSource){var n=t-this._cur_point.x,r=e-this._cur_point.y;if(n*n+r*r<=Zo*Zo)return this.data[this.data.length-1][this.data[this.data.length-1].length-2]=t,void(this.data[this.data.length-1][this.data[this.data.length-1].length-1]=e)}this._commands[this._commands.length-1].push(ks.LINE_TO),this._data[this._data.length-1].push(t,e),this._cur_point.x=t,this._cur_point.y=e,this._dirtyID++},t.prototype.moveTo=function(t,e){var n=Math.abs(this._cur_point.x-t),r=Math.abs(this._cur_point.y-e);n<.01&&r<.01||(this._commands[this._commands.length-1].length>0&&(this._commands.push([ks.MOVE_TO]),this._data.push([t,e])),this._startPoint.x=t,this._startPoint.y=e,this._cur_point.x=t,this._cur_point.y=e,this._dirtyID++)},t.prototype.wideLineTo=function(t,e){},t.prototype.wideMoveTo=function(t,e){},t.prototype.prepare=function(){if(this._dirtyID!==this._lastDirtyID){this._lastDirtyID=this._dirtyID;var t,e,n,r,i,o,a,s=[],u=[],l=0,c=0,h=0,p=this.commands.length;if(1===p&&!this.commands[0])return!1;for(var d=0;d.01&&this.forceClose&&(f[f.length]=ks.LINE_TO,g[g.length]=g[0],g[g.length]=g[1])}p=this.commands.length;for(d=0;do&&(o=u),la&&(a=l),h>=f-2&&p=this._store.length))for(var e=0,n=this._store.splice(0,this._store.length-t);e=this._limit)&&(this._store.push(t),!0)))},t.prototype.release=function(t){var e=this._store.indexOf(t);return-1!==e&&(this._store.splice(e,1),!0)},t.prototype.clear=function(){this.resize(0)},t.prototype.dispose=function(){for(var t=0,e=this._store;t=this._shapes.length)throw new U("Index is out of range");var e=this._shapes.splice(t,1)[0];e.removeEventListener(Li.INVALIDATE_ELEMENTS,this._onInvalidateDelegate),e.removeEventListener(Li.INVALIDATE_MATERIAL,this._onInvalidateDelegate),e.removeEventListener(Li.INVALIDATE_STYLE,this._onInvalidateDelegate),e.removeEventListener(l.INVALIDATE,this._onInvalidateDelegate),e.usages--,e.usages||this.tryPoolShape(e)||e.dispose(),this.invalidate()},e.prototype.getShapeAt=function(t){return this._shapes[t]},e.prototype.getShapeIndex=function(t){return this._shapes.indexOf(t)},e.prototype.applyTransformation=function(t){for(var e=this._shapes.length,n=0;n0&&this._clearCount>=this._poolingConfig.clearsCount)||this._rStrokePool.enabled===this._poolingConfig.stroke&&this._rFillPool.enabled===this._poolingConfig.fill||(console.warn("[Graphics] To many clears, pooling shapes internally!",this.id,this._internalShapesId.length),this._rFillPool.enabled=this._poolingConfig.fill,this._rStrokePool.enabled=this._poolingConfig.stroke);for(var e=this._shapes.length,n=0;n=0;i--)t.applyTraversable(this._shapes[i])},e.prototype._onInvalidate=function(t){this.invalidate()},e.prototype.draw_fills=function(t){void 0===t&&(t=!0),Fs.draw_pathes(this),t&&(this._active_fill_path=null,this._queued_fill_pathes.length=0)},e.prototype.draw_strokes=function(t){void 0===t&&(t=!0),Us.draw_pathes(this),t&&(this._active_stroke_path=null,this._queued_stroke_pathes.length=0)},e.prototype.beginBitmapFill=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=!0),void 0===r&&(r=!1),this.draw_fills(),this._bitmapFillPool||(this._bitmapFillPool={});var i=this._bitmapFillPool[t.id];i?(i.fillStyle.matrix=e,i.fillStyle.repeat=n,i.fillStyle.smooth=r):i=this._bitmapFillPool[t.id]=new $a(new ts(ps.getMaterialForBitmap(t),e,n,r)),this._fillStyle=i},e.prototype.beginFill=function(t,e){void 0===e&&(e=1),0==t&&(t=65793),this.draw_fills(),this._fillStyle=new $a(new es(t,e))},e.prototype.beginGradientFill=function(t,e,n,r,i,o,a,s){void 0===i&&(i=null),void 0===o&&(o="pad"),void 0===a&&(a="rgb"),void 0===s&&(s=0),this.draw_fills(),this._fillStyle=new $a(new Za(t,e,n,r,i,o,a,s))},e.prototype.copyFrom=function(t){t.copyTo(this)},e.prototype.cubicCurveTo=function(t,e,n,r,i,o){throw new k("cubicCurveTo")},e.prototype.curveTo=function(t,e,n,r){this._drawingDirty=!0,this._createGraphicPathes(),null!=this._active_fill_path&&this._active_fill_path.curveTo(t,e,n,r),null!=this._active_stroke_path&&this._active_stroke_path.curveTo(t,e,n,r),this._current_position.x=n,this._current_position.y=r,this.invalidate()},e.prototype.drawCircle=function(t,e,n){if(this._drawingDirty=!0,this._createGraphicPathes(),null!=this._active_fill_path){this._active_fill_path.moveTo(t,e);var r=n;null!=this._active_stroke_path&&(r-=this._active_stroke_path.style.thickness/2),ds.drawElipse(t,e,r,r,this._active_fill_path.verts,0,360,5,!1)}null!=this._active_stroke_path&&ds.drawElipseStrokes(t,e,n,n,this._active_stroke_path,0,360,2),this.invalidate()},e.prototype.drawEllipse=function(t,e,n,r){if(this._drawingDirty=!0,this._createGraphicPathes(),t+=n/=2,e+=r/=2,null!=this._active_fill_path){this._active_fill_path.moveTo(t,e);var i=n,o=r;null!=this._active_stroke_path&&(i-=this._active_stroke_path.style.thickness/2,o-=this._active_stroke_path.style.thickness/2),ds.drawElipse(t,e,i,o,this._active_fill_path.verts,0,360,6,!1)}null!=this._active_stroke_path&&ds.drawElipseStrokes(t,e,n,r,this._active_stroke_path,0,360,2),this.invalidate()},e.prototype.drawGraphicsData=function(t){},e.prototype.drawPath=function(t,e,n){},e.prototype.drawRect=function(t,e,n,r){if(this._drawingDirty=!0,this._createGraphicPathes(),null!=this._active_fill_path){this._active_fill_path.moveTo(t,e);var i=n,o=r,a=0;null!=this._active_stroke_path&&(a=this._active_stroke_path.style.thickness/2,i-=this._active_stroke_path.style.thickness,o-=this._active_stroke_path.style.thickness),ds.addTriangle(t+a,e+o+a,t+a,e+a,t+i+a,e+a,0,this._active_fill_path.verts,!1),ds.addTriangle(t+a,e+o+a,t+a+i,e+a,t+i+a,e+o+a,0,this._active_fill_path.verts,!1),this._active_fill_path.isSimpleRect=!0}null!=this._active_stroke_path&&(this._active_stroke_path.moveTo(t,e),this._active_stroke_path.lineTo(t+n,e),this._active_stroke_path.lineTo(t+n,e+r),this._active_stroke_path.lineTo(t,e+r),this._active_stroke_path.lineTo(t,e)),this.invalidate()},e.prototype.drawRoundRect=function(t,e,n,r,i,o){void 0===o&&(o=NaN),this._drawingDirty=!0,this._createGraphicPathes(),isNaN(o)&&(o=i);var a=n,s=r,u=i/2,l=o/2,c=0;null!=this._active_fill_path&&(this._active_fill_path.moveTo(t,e),null!=this._active_stroke_path&&(c=this._active_stroke_path.style.thickness/2,a-=this._active_stroke_path.style.thickness,s-=this._active_stroke_path.style.thickness),ds.addTriangle(t+c,e+s-l,t+c,e+l,t+a-c,e+l,0,this._active_fill_path.verts,!1),ds.addTriangle(t+c,e+s-l,t+a-c,e+l,t+a-c,e+s-l,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u,e+c,t+a-u,e+l,t+u,e+l,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u,e+c,t+a-u,e+c,t+a-u,e+l,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u,e+s-l,t+a-u,e+s-c,t+u,e+s-c,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u,e+s-l,t+a-u,e+s-l,t+a-u,e+s-c,0,this._active_fill_path.verts,!1),ds.drawElipse(t+u,e+l,u-c,l-c,this._active_fill_path.verts,180,270,5,!1),ds.drawElipse(t+a-u,e+l,u-c,l-c,this._active_fill_path.verts,270,360,5,!1),ds.drawElipse(t+a-u,e+s-l,u-c,l-c,this._active_fill_path.verts,0,90,5,!1),ds.drawElipse(t+u,e+s-l,u-c,l-c,this._active_fill_path.verts,90,180,5,!1)),null!=this._active_stroke_path&&(this._active_stroke_path.moveTo(t+u,e),this._active_stroke_path.lineTo(t+a-u,e),ds.drawElipseStrokes(t+a-u,e+l,u,l,this._active_stroke_path,270,360,2),this._active_stroke_path.lineTo(t+a,e+s-l),ds.drawElipseStrokes(t+a-u,e+s-l,u,l,this._active_stroke_path,0,90,2),this._active_stroke_path.lineTo(t+u,e+s),ds.drawElipseStrokes(t+u,e+s-l,u,l,this._active_stroke_path,90,180,2),this._active_stroke_path.lineTo(t,e+l),ds.drawElipseStrokes(t+u,e+l,u,l,this._active_stroke_path,180,270,2)),this.invalidate()},e.prototype.drawRoundRectComplex=function(t,e,n,r,i,o,a,s){var u=n,l=r,c=i,h=o,p=a,d=s;this._drawingDirty=!0,this._createGraphicPathes();var f=0;null!=this._active_fill_path&&(this._active_fill_path.moveTo(t,e),null!=this._active_stroke_path&&(f=this._active_stroke_path.style.thickness/2,u-=this._active_stroke_path.style.thickness,l-=this._active_stroke_path.style.thickness),ds.addTriangle(t+c,e+c,t+u-h,e+h,t+u-d,e+l-d,0,this._active_fill_path.verts,!1),ds.addTriangle(t+c,e+c,t+u-d,e+l-d,t+p,e+l-p,0,this._active_fill_path.verts,!1),ds.addTriangle(t+f,e+c,t+c,e+c,t+f,e+l-p,0,this._active_fill_path.verts,!1),ds.addTriangle(t+c,e+c,t+f,e+l-p,t+p,e+l-p,0,this._active_fill_path.verts,!1),ds.addTriangle(t+c,e+f,t+c,e+c,t+u-h,e+f,0,this._active_fill_path.verts,!1),ds.addTriangle(t+c,e+c,t+u-h,e+h,t+u-h,e+f,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u-f,e+h,t+u-h,e+h,t+u-f,e+l-d,0,this._active_fill_path.verts,!1),ds.addTriangle(t+u-h,e+h,t+u-d,e+l-d,t+u-f,e+l-d,0,this._active_fill_path.verts,!1),ds.addTriangle(t+p,e+l-f,t+u-d,e+l-f,t+p,e+l-p,0,this._active_fill_path.verts,!1),ds.addTriangle(t+p,e+l-p,t+u-d,e+l-f,t+u-d,e+l-d,0,this._active_fill_path.verts,!1),ds.drawElipse(t+c,e+c,c-f,c-f,this._active_fill_path.verts,180,270,5,!1),ds.drawElipse(t+u-h,e+h,h-f,h-f,this._active_fill_path.verts,270,360,5,!1),ds.drawElipse(t+u-d,e+l-d,d-f,d-f,this._active_fill_path.verts,0,90,5,!1),ds.drawElipse(t+p,e+l-p,p-f,p-f,this._active_fill_path.verts,90,180,5,!1)),null!=this._active_stroke_path&&(this._active_stroke_path.moveTo(t,e),console.warn("[Graphics] - drawRoundRectComplex for strokes currently disabled")),this.invalidate()},e.prototype.drawTriangles=function(t,e,n,r){this._drawingDirty=!0,this._active_fill_path,this._active_stroke_path},e.prototype.endFill=function(){this._active_stroke_path&&this._active_fill_path&&(this._active_stroke_path.forceClose=!0),this._endFillInternal(!0),this._active_fill_path=null,this._active_stroke_path=null,this._fillStyle=null},e.prototype._endFillInternal=function(t){if(void 0===t&&(t=!1),this._queuedShapeTags.length){var e=this._queuedShapeTags,n=e.length;this._queuedShapeTags=[];for(var r=0;r0&&n>0;this._drawingDirty=!0,this._lineStyle=u?new is(new es(e,n),t,a,o,s):null}},e.prototype.lineTo=function(t,e){this._drawingDirty=!0,this._createGraphicPathes(),null!=this._active_fill_path&&this._active_fill_path.lineTo(t,e),null!=this._active_stroke_path&&this._active_stroke_path.lineTo(t,e),this._current_position.x=t,this._current_position.y=e,this.invalidate()},e.prototype.moveTo=function(t,e){this._drawingDirty=!0,this._createGraphicPathes(),null!=this._active_fill_path&&this._active_fill_path.moveTo(t,e),null!=this._active_stroke_path&&this._active_stroke_path.moveTo(t,e),this._current_position.x=t,this._current_position.y=e,this.invalidate()},e.prototype.processLazyTesselation=function(t){if(t.lazyTaskDone=null,t.needParse=!1,t.parsingTime<30){var e=this._queuedShapeTags.indexOf(t);e>-1&&this._queuedShapeTags.splice(e,1),this.convertRecordsToShapeData(t,t.parsingTime>1)}else console.debug("[Graphics] Supress lazy shape convertion:",t)},e.prototype.queueShapeTag=function(t){this._queuedShapeTags.push(t),this._drawingDirty=!0},e.prototype._createGraphicPathes=function(){null==this._fillStyle||null!=this._active_fill_path&&this._active_fill_path.style==this._fillStyle||(this._active_fill_path=new Vs,this._active_fill_path.style=this._fillStyle,0==this._current_position.x&&0==this._current_position.y||this._active_fill_path.moveTo(this._current_position.x,this._current_position.y),this._queued_fill_pathes.push(this._active_fill_path)),null==this._lineStyle||null!=this._active_stroke_path&&this._active_stroke_path.style==this._lineStyle||(this._active_stroke_path=new Vs,this._active_stroke_path.style=this._lineStyle,0==this._current_position.x&&0==this._current_position.y||this._active_stroke_path.moveTo(this._current_position.x,this._current_position.y),this._queued_stroke_pathes.push(this._active_stroke_path))},e.prototype._addShapes=function(t,e){var n;void 0===e&&(e=!1);for(var r=t.length,i=0;i=Ya.ClippedBitmap){var l=zs.processStyle(t.fillStyles[1],!1,!1,t.parser),c=t.fillBounds||t.lineBounds;this.addShapeInternal(e.getShapeForBitmapStyle(l,c))}else{for(var h,p=zs.createPathsList(i,!1,!!a,u),d=zs.createPathsList(o,!0,!!a,u),f={fill0:0,fill1:0,line:0},g=[],_=[],m=r.length,y=0,A=0,v=0,b=0,C=0,I=0;C>1),i=n+(a>>1),e+=o,n+=a}else r=e+t.controlDeltaX|0,i=n+t.controlDeltaY|0,e=r+t.anchorDeltaX|0,n=i+t.anchorDeltaY|0;return{cx:r,cy:i,x:e,y:n}},e._pool=new Array,e.assetType="[asset Graphics]",e}(d);console.debug("AwayJS - Graphics - 0.5.67"),wt&&wt.register(Os.instance);var qs,Ks=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.view=this.view,t.entity=this.entity,t},e.FOCUS_IN="focusIn3d",e.FOCUS_OUT="focusOut3d",e}(u),Ws=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n="triangle");var r=t.call(this)||this;if(r._primitiveDirty=!0,r._uvDirty=!0,r._scaleU=1,r._scaleV=1,r._material=e,r._elementsType=n,r._elementsType==Eo.TRIANGLE){var i=new io(new ri);i.autoDeriveNormals=!1,i.autoDeriveTangents=!1,r._elements=i}else r._elementsType==Eo.LINE&&(r._elements=new wo(new ri));return r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elementsType",{get:function(){return this._elementsType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this._material},set:function(t){if(t!=this._material){this._material=t;for(var e=this._pObjects.length,n=0;n.007?C/x:0,h=-A,p=I):(_=x>.007?C/x:0,m=0,h=I,p=A),s==this._segmentsW?(r[l]=r[g],r[l+1]=r[g+1],r[l+2]=r[g+2],i[l]=i[g]+C*E*.5,i[l+1]=i[g+1]+h*E*.5,i[l+2]=i[g+2]+p*E*.5,o[l]=x>.007?-I/x:1,o[l+1]=_,o[l+2]=m):(r[l]=C,r[l+1]=h,r[l+2]=p,i[l]=C*E,i[l+1]=h*E,i[l+2]=p*E,o[l]=x>.007?-I/x:1,o[l+1]=_,o[l+2]=m),s>0&&u>0){var w=(this._segmentsW+1)*u+s,S=(this._segmentsW+1)*u+s-1,D=(this._segmentsW+1)*(u-1)+s-1,T=(this._segmentsW+1)*(u-1)+s;u==this._segmentsH?(r[l]=r[g],r[l+1]=r[g+1],r[l+2]=r[g+2],n[c++]=w,n[c++]=D,n[c++]=T):1==u?(n[c++]=w,n[c++]=S,n[c++]=D):(n[c++]=w,n[c++]=S,n[c++]=D,n[c++]=w,n[c++]=D,n[c++]=T)}l+=a}}}else if(e==Eo.LINE){var P=t,B=this._segmentsH*this._segmentsW*2+this._segmentsW,O=new Float32Array(6*B),M=new Float32Array(B);for(l=0,c=0,u=0;u<=this._segmentsH;++u){y=Math.PI*u/this._segmentsH,A=-this._radius*Math.cos(y),v=this._radius*Math.sin(y);for(s=0;s<=this._segmentsW;++s){b=2*Math.PI*s/this._segmentsW,C=v*Math.cos(b),I=v*Math.sin(b);if(this._yUp?(h=-A,p=I):(h=I,p=A),s>0&&(O[l++]=C,O[l++]=h,O[l++]=p,M[c++]=1,u>0)){var L=1==u?3-(6*(this._segmentsW-s)+12*s):3-12*this._segmentsW;O[l]=O[l+++L],O[l]=O[l+++L],O[l]=O[l+++L],O[l++]=C,O[l++]=h,O[l++]=p,M[c++]=1}s=0;n--){var r=t[n];r?r.maskMode=!0:(console.warn("[DisplayObject] Timeline mask has null value, skipping it"),t.splice(n,1))}return t},Object.defineProperty(e.prototype,"scriptMask",{get:function(){return this._scriptMask},set:function(t){if(t!==this._scriptMask){if(this._scriptMask){var e=this._masks.indexOf(this._scriptMask);-1!==e&&this._masks.splice(e,1)}this._scriptMask=t,this._masks=this._mergeMasks(this._masks,t),this._invalidateHierarchicalProperty(Mt.MASKS)}},enumerable:!0,configurable:!0}),e.prototype.updateTimelineMask=function(t){this._masks=this._mergeMasks(t,this._scriptMask),this._invalidateHierarchicalProperty(Mt.MASKS)},Object.defineProperty(e.prototype,"masks",{get:function(){return this._masks},set:function(t){if(this._masks!=t){if(this._masks=t,t&&t.length){for(var e=t.length,n=!1,r=0;r0;)e--,this._children[e].dispatchFrameEvents(t);this.dispatchEvent(t[1])},e.prototype.dispatchEnterFrame=function(t){for(var e=this._children.length;e>0;)--e0;)--e=0},e.prototype.disposeValues=function(){this._animator&&this._animator.dispose();for(var e=this._children.length-1;e>=0;e--)this.removeChild(this._children[e]);t.prototype.disposeValues.call(this)},e.prototype.getChildAt=function(t){var e=this._children[t];if(null==e)throw new U("Index does not exist in the child list of the caller");return e},e.prototype.getChildByName=function(t){for(var e=this._children.length,n=0;nthis._children.length)throw new U("endIndex is out of range of the child list");for(var n=e-1;n>=t;n--)this.removeChildAtInternal(n)},e.prototype.setChildIndex=function(t,e){var n=this.getChildIndex(t);if(n<0)throw new D("Parameter child must be child of this object");if(e>this._children.length)throw new U("Parameter index is out of range of the child list");n!=e&&(this.removeChildAt(n),this.addChildAt(t,n=0&&this._sessionID_childs&&(delete this._sessionID_childs[t._sessionID],t._sessionID=-1))},e.prototype.swapChildren=function(t,e){t.parent==this&&e.parent==this&&this.swapChildrenAt(this.getChildIndex(t),this.getChildIndex(e))},e.prototype.swapChildrenAt=function(t,e){if(t!=e){if(t>=this._children.length||e>=this._children.length)throw"[scene/DisplayobjectContainer] - swapChildrenAt - Range Error";var n,r;t=0&&(delete this._sessionID_childs[this._children[t]._sessionID],this._children[t]._sessionID,this._children[t]._avmDepthID),this._children[e]._sessionID>=0&&(delete this._sessionID_childs[this._children[e]._sessionID],this._children[e]._sessionID,this._children[t]._avmDepthID))}},e.prototype.removeChildAtInternal=function(t){var e=this._children.splice(t,1)[0];return e._setParent(null),this.dispatchEvent(new se(se.REMOVE_CHILD_AT,e,t)),e},e.prototype._updateMaskMode=function(){this.maskMode&&(this.mouseChildren=!1),t.prototype._updateMaskMode.call(this)},e.assetType="[asset DisplayObjectContainer]",e}(eu);mi.registerAbstraction(Ai,nu);var ru=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this)||this;return r._isEntity=!1,r._onGraphicsInvalidateDelegate=function(t){return r._onGraphicsInvalidate(t)},r.graphics=e||Ys.getGraphics(),r.material=n,r}return n(e,t),e.getNewSprite=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),e._sprites.length){var r=e._sprites.pop();return r.graphics=t||Ys.getGraphics(),r.material=n,r}return new e(t,n)},e.clearPool=function(){e._sprites=[]},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){return this._iSourcePrefab&&this._iSourcePrefab._iValidate(),this._graphics},set:function(t){if(null==t)throw new Error("Cannot have graphics set to null");this._setGraphics(t)},enumerable:!0,configurable:!0}),e.prototype._setGraphics=function(t){this._graphics!=t&&(this._graphics&&(this._graphics.removeEventListener(l.INVALIDATE,this._onGraphicsInvalidateDelegate),this._graphics.usages--),this._graphics=t,this._graphics.usages++,this._onGraphicsInvalidate(null))},e.prototype._setParent=function(e){t.prototype._setParent.call(this,e),e?this._graphics.addEventListener(l.INVALIDATE,this._onGraphicsInvalidateDelegate):this._graphics.removeEventListener(l.INVALIDATE,this._onGraphicsInvalidateDelegate)},e.prototype.isEntity=function(){return this._graphics&&this._graphics.count>0},e.prototype.dispose=function(){this.disposeValues(),e._sprites.push(this)},e.prototype.disposeValues=function(){t.prototype.disposeValues.call(this)},e.prototype.clone=function(){var t=e.getNewSprite();return this.copyTo(t),t},e.prototype.copyTo=function(e,n){void 0===n&&(n=!1),t.prototype.copyTo.call(this,e),e._iSourcePrefab=this._iSourcePrefab,this._graphics.copyTo(e._graphics,n)},e.prototype._iInternalUpdate=function(){t.prototype._iInternalUpdate.call(this)},e.prototype._onGraphicsInvalidate=function(t){var e=this.isEntity();this._isEntity!=e&&(e||this._clearEntity(),this._isEntity=e),this.invalidate()},e.prototype._acceptTraverser=function(e){t.prototype._acceptTraverser.call(this,e),this.graphics._acceptTraverser(e)},e.prototype.bakeTransformations=function(){this._graphics.applyTransformation(this.transform.matrix3D),this.transform.clearMatrix3D()},e._sprites=new Array,e.assetType="[asset Sprite]",e}(nu);mi.registerAbstraction(Ai,ru);var iu=Object.create(null);function ou(t,e){void 0===e&&(e="");var n=iu[t._id+e];return iu[t._id+e]=!0,n||console.warn("[MorphSprite] - id",t.id,e,t),!n}var au,su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._frameCaches={},e}return n(e,t),e.getNewMorphSprite=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),e._morphSprites.length){var r=e._morphSprites.pop();return r.graphics=t||Ys.getGraphics(),r.material=n,r}return new e(t,n)},e.prototype._setGraphics=function(t){this._graphics!=t&&(this._graphics&&(this._graphics.removeEventListener(l.INVALIDATE,this._onGraphicsInvalidateDelegate),this._graphics.usages--),this._graphics||(this._graphics=Ys.getGraphics()),this._graphics.copyFrom(t),this._onGraphicsInvalidate(null))},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.reset=function(){t.prototype.reset.call(this),this.setRatio(0)},e.prototype._blendStyle=function(t,e,n,r){var i,o,a,s=1-r,u=r,l=t.style.fillStyle,c=e.style.fillStyle;if(t.style.data_type!=e.style.data_type)throw"Error in morph data - different styles of pathes";switch(l.data_type){case es.data_type:var h=c;o=s*(v=l).alpha+u*h.alpha,i=x.interpolateFloat32Color(v.color,h.color,r),a=new es(i,o);break;case Za.data_type:for(var p=[],d=[],f=[],g=(h=c,(v=l).colors.length),_=0;_=0&&n.id!=this._initalMcID)){if(this._initalMcID=n.id,this._framescripts[e]||(this._framescripts[e]=[]),Array.isArray(t))for(var i=0;i=0&&this._framescripts[e]){if(n&&!this._framescripts_translated[e]){var r=t.className?t.className:t.name;this._framescripts[e]=this.symbolDecoder.prepareFrameScriptsForAVM1(this._framescripts[e],e,r,t.id),this._framescripts_translated[e]=!0}return this._framescripts[e]}return null},Object.defineProperty(t.prototype,"numFrames",{get:function(){return this.keyframe_indices.length},enumerable:!0,configurable:!0}),t.prototype.getKeyframeIndexForFrameIndex=function(t){return this.keyframe_indices[t]},t.prototype.getChildInstance=function(t,e){return this.symbolDecoder.createChildInstanceForTimeline(this,t,e)},t.prototype.extractHitArea=function(t){t.reset(!1),this.gotoFrame(t,this.numFrames-1,!1);for(var e,n,r=t.numChildren,i=new nu;r>0;)r--,(e=(n=t.getChildAt(r)).clone()).x=n.x,e.scaleX=n.scaleX,e.y=n.y,e.scaleY=n.scaleY,e.rotationZ=n.rotationZ,i.addChild(e);return i.pickObjectFromTimeline=!0,t.pickObject=i,t.reset(!1),i},t.prototype.getCurrentFrameLabel=function(t){var e=this.keyframe_to_frameidx[t.constructedKeyFrameIndex];for(var n in this._labels)if(this._labels[n].keyFrameIndex==t.constructedKeyFrameIndex&&e==t.currentFrameIndex)return this._labels[n].name;return null},t.prototype.getCurrentLabel=function(t){var e=null,n=-1;for(var r in this._labels){var i=this._labels[r].keyFrameIndex;i>n&&i<=t.constructedKeyFrameIndex&&(n=i,e=this._labels[r].name)}return e},t.prototype.jumpToLabel=function(t,e,n){if(void 0===n&&(n=0),this._labels[e]){var r=this._labels[e].keyFrameIndex;r>=0&&(t.currentFrameIndex=this.keyframe_firstframes[r]+n)}else console.warn("[TIMELINE] - jumpToLabel with invalid label",t,e,n)},t.prototype.getScriptForLabel=function(t,e,n){void 0===n&&(n=!1);var r=this._labels[e.toLowerCase()].keyFrameIndex;if(r<0)return null;var i=this.keyframe_firstframes[r];return i>=0&&this._framescripts[i]?this.get_script_for_frame(t,i,n):null},t.prototype.gotoFrame=function(t,e,n,r,i){void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===i&&(i=!1);var o=t.constructedKeyFrameIndex,a=this.keyframe_indices[e];if(o!=a||i)if(o+1!=a){var s=this.keyframe_constructframes[a],u=s,l=a>o;l&&o>s&&(u=o+1),t.adapter.constructFrame(this,u,a,l,e,r,n),this.applyCollectedUpdateCommands(t),t.constructedKeyFrameIndex=a}else this.constructNextFrame(t,n,!0);else t.adapter.queueFrameScripts(this,e,n)},t.prototype.applyCollectedUpdateCommands=function(t){var e,n=this._update_indices.length;for(e=0;e=e.t;)e.dt-=e.t,e.f(),e.isTimeout&&delete this._active_intervals[n]},t.add_child_to_dispose=function(t){this._queued_dispose.push(t)},t.get_queue=function(){return t._queue||(t._queue={queued_mcs:[],queued_scripts:[],queued_mcs_pass2:[],queued_scripts_pass2:[],constructors:[]}),t._queue},t.add_script_to_queue=function(e,n){var r=t.get_queue(),i=r.queued_mcs_pass2.length,o=0;for(o=0;o=0&&n&&n.dispatchStaticEvent&&(n.dispatchStaticEvent("added",n),e.just_added_to_timeline=!1,e.hasDispatchedAddedToStage=e.isOnDisplayList(),e.hasDispatchedAddedToStage&&n.dispatchStaticEvent("addedToStage",n))},t.isOnStage=function(t){for(var e=t;e&&!e.isAVMScene;)e=e.parent;return!(!e||!e.isAVMScene)},t.execute_avm1_constructors=function(){var e=t.get_queue();if(0!=e.queued_mcs.length||0!=e.queued_mcs_pass2.length){for(var n=e.queued_mcs_pass2.length;n>0;)n--,e.queued_mcs.push(e.queued_mcs_pass2[n]),e.queued_scripts.push(e.queued_scripts_pass2[n]);e.queued_mcs_pass2.length=0,e.queued_scripts_pass2.length=0;var r,i=e.queued_mcs;if(t.useAVM1){for(n=i.length;n>0;)if(r=i[--n],t.isOnStage(r)&&r.onInitialize){var o=r.onInitialize;r.onInitialize=null,o()}for(n=0;nt)return n-1;return e.length-1},e.prototype.getSceneIndex=function(t){for(var e=this.scenes,n=0;n=0;r--)this.removeChildAt(r);if(this.graphics.clear(),e){var i=this._timeline.keyframe_indices.length;this._isPlaying=Boolean(i>1),this._currentSceneIndex=0,i?(this._currentFrameIndex=0,this._timeline.constructNextFrame(this,e&&!this.doingSwap&&!this.preventScript,!0)):this._currentFrameIndex=-1}this._skipAdvance=!0},Object.defineProperty(e.prototype,"currentFrameIndex",{get:function(){return this._currentFrameIndex},set:function(t){this.jumpToIndex(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentFrameIndexRelative",{get:function(){return this._currentFrameIndex-this.currentScene.offset},set:function(t){this.jumpToIndex(t,this._currentSceneIndex)},enumerable:!0,configurable:!0}),e.prototype.jumpToIndex=function(t,e){var n=!0,r=0,i=this._timeline.keyframe_indices.length;if(this.resetStreamStopped(),!i)return!1;var o=this.scenes;if(void 0===e)e=this.getSceneIndexByFrame(t);else{var a=o[e="string"==typeof e?this.getSceneIndex(e):e];-1===a.numFrames&&(a.numFrames=i-a.offset),r=a.offset,i=a.numFrames}return this._currentSceneIndex=e,t<0?t=0:t>=i&&(t=i-1,n=!1),t+=r,this._skipAdvance=!1,!(this._currentFrameIndex===t&&!this._sceneDirty)&&(this._sceneDirty=!1,this._currentFrameIndex=t,this._timeline.gotoFrame(this,t,n,!1,!1),!0)},e.prototype.addButtonListeners=function(){this._isButton=!0,this.stop(),this.addEventListener(vu.MOUSE_OVER,this._onMouseOver),this.addEventListener(vu.MOUSE_OUT,this._onMouseOut),this.addEventListener(vu.MOUSE_DOWN,this._onMouseDown),this.addEventListener(vu.MOUSE_UP,this._onMouseUp),this.addEventListener(vu.DRAG_OVER,this._onDragOver),this.addEventListener(vu.DRAG_OUT,this._onDragOut),this.mouseChildren=!1},e.prototype.removeButtonListeners=function(){this.removeEventListener(vu.MOUSE_OVER,this._onMouseOver),this.removeEventListener(vu.MOUSE_OUT,this._onMouseOut),this.removeEventListener(vu.MOUSE_DOWN,this._onMouseDown),this.removeEventListener(vu.MOUSE_UP,this._onMouseUp),this.removeEventListener(vu.DRAG_OVER,this._onDragOver),this.removeEventListener(vu.DRAG_OUT,this._onDragOut)},e.prototype.swapChildrenAt=function(t,e){console.warn("[scene/MovieClip] - swapChildrenAt - not implemented")},e.prototype.swapDepths=function(t,e){console.warn("[scene/MovieClip] - swapDepths - not implemented")},e.prototype.getTimelineChildAtSessionID=function(t){return this._sessionID_childs[t]},e.prototype.constructFrame=function(t,e,n,r,i,o,a){console.warn("[scene/MovieClip] - constructFrame not implemented")},e.prototype.addTimelineChildAtDepth=function(t,e,n){return console.warn("[scene/MovieClip] - addTimelineChildAtDepth not implemented"),null},e.prototype.removeTimelineChildAtDepth=function(t){console.warn("[scene/MovieClip] - removeTimelineChildAtDepth not implemented")},e.prototype.removeChildAtInternal=function(e){var n=this._children[e];return n._adapter&&n.adapter.freeFromScript(),this.adapter.unregisterScriptObject(n),delete this._sessionID_childs[n._sessionID],n._sessionID=-1,n.adapter&&n.adapter.dispatchStaticEvent&&n.adapter.dispatchStaticEvent("removed",n.adapter),this.isOnDisplayList()&&n.adapter.dispatch_REMOVED_FROM_STAGE&&n.adapter.dispatch_REMOVED_FROM_STAGE(n),t.prototype.removeChildAtInternal.call(this,e)},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.play=function(){this._timeline.keyframe_indices.length>1&&(this._isPlaying=!0)},e.prototype.stop=function(){this.resetStreamStopped(),this._isPlaying=!1},e.prototype.clone=function(){var t=e.getNewMovieClip(this._timeline);return this.copyTo(t),t},e.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.loop=this.loop,e._soundStreams=this._soundStreams,e._scenes=this._scenes,e.symbolID=this.symbolID},e.prototype.advanceFrameInternal=function(){this._timeline&&this._timeline.numFrames>0&&this._isPlaying&&!this._skipAdvance&&(this._currentFrameIndex===this._timeline.numFrames-1?this.loop?0!==this._currentFrameIndex&&(this._currentFrameIndex=0,this._currentSceneIndex=0,this.resetStreamStopped(),this._timeline.gotoFrame(this,0,!0,!0,!0)):this._isPlaying=!1:(this._currentFrameIndex++,this._currentSceneIndex=this.getSceneIndexByFrame(this._currentFrameIndex),this._timeline.constructNextFrame(this))),t.prototype.advanceFrame.call(this),this._skipAdvance=!1},e.prototype.advanceFrame=function(){for(0==this._skipFramesForStream&&this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex);this._skipFramesForStream>0;)bu.execute_queue(),this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex)},e.prototype.logHierarchy=function(t){void 0===t&&(t=0),this.printHierarchyName(t,this);for(var n,r=this._children.length,i=0;i0?n.globalPositionVertex:n.animatedPosition,o=e.getFreeVertexConstant();e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.viewMatrixIndex=4*o.index;var a=e.getFreeVertexConstant();t.scenePositionIndex=4*a.index;var s=e.getFreeVertexConstant(),u=e.getFreeVertexVectorTemp();return r+="mul "+u+", "+i+", "+s+"\nadd "+u+", "+u+", "+a+"\n",t.projectionDependencies>0?(n.projectionFragment=e.getFreeVarying(),r+="m44 "+u+", "+u+", "+o+"\nmov "+n.projectionFragment+", "+u+"\nmov op, "+u+"\n"):r+="m44 op, "+u+", "+o+"\n",r},e.prototype._getFragmentCode=function(t,e,n){return""},e}(Mi),xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._skyboxProjection=new R,e}return n(e,t),e.prototype.draw=function(t,e,n,r){var i=e.scenePositionIndex,o=e.view.projection.transform.matrix3D.position;e.vertexConstantData[i++]=2*o.x,e.vertexConstantData[i++]=2*o.y,e.vertexConstantData[i++]=2*o.z,e.vertexConstantData[i++]=1,e.vertexConstantData[i++]=e.vertexConstantData[i++]=e.vertexConstantData[i++]=e.view.projection.far/Math.sqrt(3),e.vertexConstantData[i]=1;var a=new B;this._skyboxProjection.copyFrom(e.view.viewMatrix3D),this._skyboxProjection.copyRowTo(2,a);var s=a.x,u=a.y,l=a.z,c=-(a.x*o.x+a.y*o.y+a.z*o.z+Math.sqrt(s*s+u*u+l*l)),h=new B(s>=0?1:-1,u>=0?1:-1,1,1),p=this._skyboxProjection.clone();p.invert();var d=p.transformVector(h);this._skyboxProjection.copyRowTo(3,h);var f=(d.x*h.x+d.y*h.y+d.z*h.z+d.w*h.w)/(s*d.x+u*d.y+l*d.z+c*d.w);this._skyboxProjection.copyRowFrom(2,new B(s*f,u*f,l*f,c*f)),e.sceneMatrixIndex>=0&&e.sceneMatrix.copyFrom(t.renderSceneTransform,!0),e.viewMatrix.copyFrom(this._skyboxProjection,!0);var g=this._stage.context;g.setProgramConstantsFromArray($t.VERTEX,e.vertexConstantData),g.setProgramConstantsFromArray($t.FRAGMENT,e.fragmentConstantData),this._indices?this.getIndexBufferGL().draw(Kt.TRIANGLES,0,this.numIndices):this._stage.context.drawVertices(Kt.TRIANGLES,r,n||this.numVertices)},e}(oo);ro.registerElements(Eu,Iu),Yr.registerAbstraction(xu,Iu);var wu=function(t){function e(e,n){void 0===e&&(e=16777215);var r=t.call(this)||this;return r._textures=new Array,r._blendMode=pn.NORMAL,r.animateUVs=!1,r.bothSides=!1,r.curves=!1,r.imageRect=!1,r.useColorTransform=!1,r.alphaThreshold=0,r._onTextureInvalidateDelegate=function(t){return r.onTextureInvalidate(t)},r._owners=[r],r.style=new Qi,e instanceof an?(r._style.image=e,r.texture=new po):r._style.color=Number(e),r}return n(e,t),Object.defineProperty(e.prototype,"animationSet",{get:function(){return this._animationSet},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this._blendMode!=t&&(this._blendMode=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iOwners",{get:function(){return this._owners},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.removeTexture(this._texture),this._texture=t,this._texture&&this.addTexture(this._texture),this.invalidatePasses())},enumerable:!0,configurable:!0}),e.prototype.getNumTextures=function(){return this._textures.length},e.prototype.getTextureAt=function(t){return this._textures[t]},e.prototype.isEntity=function(){return!0},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.invalidatePasses=function(){this.dispatchEvent(new Pi(Pi.INVALIDATE_PASSES,this))},e.prototype.invalidateElements=function(){this.dispatchEvent(new Li(Li.INVALIDATE_ELEMENTS,this))},e.prototype.invalidateMaterial=function(){this.dispatchEvent(new Li(Li.INVALIDATE_MATERIAL,this))},e.prototype.invalidateStyle=function(){this.dispatchEvent(new Li(Li.INVALIDATE_STYLE,this))},e.prototype.addTexture=function(t){this._textures.push(t),t.addEventListener(l.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},e.prototype.removeTexture=function(t){this._textures.splice(this._textures.indexOf(t),1),t.removeEventListener(l.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},e.prototype.onTextureInvalidate=function(t){this.invalidate()},e.prototype._onInvalidateProperties=function(t){this.invalidateMaterial(),this.invalidatePasses()},e.prototype._acceptTraverser=function(t){t.applyTraversable(this)},e.prototype.iAddOwner=function(t){},e.prototype.iRemoveOwner=function(t){},e.prototype._getDefaultBoundingVolume=function(){return St.NULL},e.prototype.testCollision=function(t,e){return t.traversable=null,!1},e.assetType="[asset Skybox]",e}(nu),Su=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._skybox=e,r._shader=new Di(n,r,r,r._stage),r._texture=r._skybox.texture.getAbstraction(r._shader),r._pAddPass(r),r}return n(e,t),e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._texture.onClear(new l(l.CLEAR,this._skybox.texture)),this._texture=null,this._skybox=null},e.prototype._pUpdateRender=function(){t.prototype._pUpdateRender.call(this),this.requiresBlending=this._material.blendMode!=pn.NORMAL,this.shader.setBlendMode(this._material.blendMode==pn.NORMAL&&this.requiresBlending?pn.LAYER:this._material.blendMode)},e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),e.usesPositionFragment=!0},e.prototype._getFragmentCode=function(t,e){return this._texture._getFragmentCode(e.shadedTarget,t,e,e.positionVarying)},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._texture._setRenderState(e)},e.prototype._activate=function(){t.prototype._activate.call(this),this._stage.context.setDepthTest(!1,qt.LESS),this._texture.activate()},e}(Oi),Du=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getStageElements=function(){var t=e._elements;return t||((t=new Iu(new ri(11,4))).autoDeriveNormals=!1,t.autoDeriveTangents=!1,t.setIndices(Array(0,1,2,2,3,0,6,5,4,4,7,6,2,6,7,7,3,2,4,5,1,1,0,4,4,0,3,3,7,4,2,1,5,5,6,2)),t.setPositions(Array(-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1))),t.getAbstraction(this._stage)},e.prototype._getRenderMaterial=function(){return this._asset.getAbstraction(this.renderGroup.getRenderElements(this.stageElements.elements))},e.prototype._getStyle=function(){return this._asset.style},e}(Ui),Tu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isInFrustum=function(t,e,n,r){return!this.isInvisible()},e.prototype.isCastingShadow=function(){return!1},e}(Ai);Co.registerMaterial(Su,wu),ji.registerRenderable(Du,wu),mi.registerAbstraction(Tu,wu);var Pu,Bu=function(){function t(){}return t.CENTER="center",t.LEFT="left",t.NONE="none",t.RIGHT="right",t}(),Ou=function(){function t(){}return t.DYNAMIC="dynamic",t.INPUT="input",t.STATIC="input",t}();!function(t){t.STANDART="standart",t.BOLD="bold",t.ITALIC="italic",t.BOLDITALIC="boldItalic"}(Pu||(Pu={}));var Mu=function(){function t(){}return t.CENTER="center",t.JUSTIFY="justify",t.LEFT="left",t.RIGHT="right",t}(),Lu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.clone=function(){return new e(this.type)},e.CASTS_SHADOW_CHANGE="castsShadowChange",e}(u),Nu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.clone=function(){return new e(this.type)},e.TEXTURE_CHANGE="textureChange",e}(u),Ru=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.SHADER_INVALIDATED="shaderInvalidated",e}(u),Fu=function(t){function e(e){return void 0===e&&(e=null),t.call(this,e)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[texture DepthTextureCube]",e}(po),ku=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initVO=function(t){this._decodeReg=null,this._decodeIndex=-1},e.prototype._initConstants=function(){var t=this._shader.fragmentConstantData,e=this._decodeIndex;t[e]=1,t[e+1]=1/255,t[e+2]=1/65025,t[e+3]=1/16581375},e.prototype._getFragmentCode=function(e,n,r,i){-1==this._decodeIndex&&(this._decodeIndex=4*(this._decodeReg=n.getFreeFragmentConstant()).index);var o=n.getFreeFragmentVectorTemp();return t.prototype._getFragmentCode.call(this,o,n,r,i)+"dp4 "+e+".w, "+o+", "+this._decodeReg+"\n"},e}(fo);Di.registerAbstraction(ku,Fu);var Uu=function(t){function e(e){return void 0===e&&(e=null),t.call(this,e)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[texture ShadowTexture2D]",e}(go),ju=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getFragmentCode=function(e,n,r,i){return t.prototype._getFragmentCode.call(this,e,n,r,i)+"slt "+e+".w, "+i+".z, "+e+".w\n"},e}(ku);Di.registerAbstraction(ju,Uu);var Vu=function(t){function e(){var e=t.call(this)||this;return e._textures=new Array,e._owners=new Array,e._counts=new Array,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.iAddOwner=function(t){var e=this._owners.indexOf(t);if(-1!=e)this._counts[e]++;else{this._owners.push(t),this._counts.push(1);for(var n=this._textures.length,r=0;ru&&(u=r),(i=this._localFrustum[c+1])l&&(l=i),(o=this._localFrustum[c+2])>this._maxZ&&(this._maxZ=o),c+=3;this._minZ=1;var d=u-a,f=l-s,g=1/(this._maxZ-this._minZ);a<0&&(a-=this._snap),s<0&&(s-=this._snap),a=Math.floor(a/this._snap)*this._snap,s=Math.floor(s/this._snap)*this._snap;var _=2*this._snap;u=a+(d=Math.floor(d/_+2)*_),l=s+(f=Math.floor(f/_+2)*_),d=1/d,f=1/f;var m=n._rawData;m[0]=2*d,m[5]=2*f,m[10]=g,m[12]=-(u+a)*d,m[13]=-(l+s)*f,m[14]=-this._minZ*g,m[15]=1,m[1]=m[2]=m[3]=m[4]=m[6]=m[7]=m[8]=m[9]=m[11]=0,n.invalidatePosition()},e.assetType="[asset DirectionalShadowMapper]",e}(Gu),Xu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsView=!0,e.needsGlobalVertexPos=!0},e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._shader.vertexConstantData,n=this._vertexScalingIndex;e[n]=.5,e[n+1]=.5,e[n+2]=0,e[n+3]=1,this._depthProjectionMatrix=new R(new Float32Array(this._shader.vertexConstantData.buffer,4*(n+4),16))},e.prototype._getVertexCode=function(t,e){var n="",r=t.getFreeVertexVectorTemp(),i=t.getFreeVertexConstant();this._vertexScalingIndex=4*i.index;var o=t.getFreeVertexConstant();return t.getFreeVertexConstant(),t.getFreeVertexConstant(),t.getFreeVertexConstant(),this._depthMapCoordReg=t.getFreeVarying(),n+="m44 "+r+", "+e.globalPositionVertex+", "+o+"\ndiv "+r+", "+r+", "+r+".w\nmul "+r+".xy, "+r+".xy, "+i+".xy\nadd "+this._depthMapCoordReg+", "+r+", "+i+".xxwz\n"},e.prototype._activate=function(){t.prototype._activate.call(this),this._shader.vertexConstantData[this._vertexScalingIndex+3]=-1/(this._mapper.depth*this._mapper.epsilon),this._depthProjectionMatrix.copyFrom(this._mapper.depthProjection,!0)},e}(zu);Di.registerAbstraction(Xu,Hu);var Yu=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._color=16777215,n._colorR=1,n._colorG=1,n._colorB=1,n._ambientColor=16777215,n._ambient=0,n._specular=1,n._diffuse=1,n._shadowsEnabled=!1,n._ambientR=0,n._ambientG=0,n._ambientB=0,n._specularR=1,n._specularG=1,n._specularB=1,n._diffuseR=1,n._diffuseG=1,n._diffuseB=1,n._onInvalidateConcatenatedMatrix3DDelegate=function(t){return n._onInvalidateConcatenatedMatrix3D(t)},n.transform=e||new F,n}return n(e,t),Object.defineProperty(e.prototype,"transform",{get:function(){return this._transform},set:function(t){this._transform!=t&&(this._transform&&this._transform.removeEventListener(S.INVALIDATE_MATRIX3D,this._onInvalidateConcatenatedMatrix3DDelegate),this._transform=t,this._transform&&this._transform.addEventListener(S.INVALIDATE_MATRIX3D,this._onInvalidateConcatenatedMatrix3DDelegate))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowsEnabled",{get:function(){return this._shadowsEnabled},set:function(t){this._shadowsEnabled!=t&&(this._shadowsEnabled=t,t&&null==this._shadowMapper?(this._shadowMapper=this._createShadowMapper(),this._shadowMapper.light=this):t||(this._shadowMapper.dispose(),this._shadowMapper=null),this.dispatchEvent(new Lu(Lu.CASTS_SHADOW_CHANGE)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specular",{get:function(){return this._specular},set:function(t){t<0&&(t=0),this._specular=t,this._updateSpecular()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diffuse",{get:function(){return this._diffuse},set:function(t){t<0&&(t=0),this._diffuse=t,this._updateDiffuse()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(t){this._color=t,this._colorR=(this._color>>16&255)/255,this._colorG=(this._color>>8&255)/255,this._colorB=(255&this._color)/255,this._updateDiffuse(),this._updateSpecular()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ambient",{get:function(){return this._ambient},set:function(t){t<0?t=0:t>1&&(t=1),this._ambient=t,this._updateAmbient()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ambientColor",{get:function(){return this._ambientColor},set:function(t){this._ambientColor!=t&&(this._ambientColor=t,this._updateAmbient())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowMapper",{get:function(){return this.shadowsEnabled=!0,this._shadowMapper},set:function(t){this._shadowMapper!=t&&(this._shadowMapper=t,this._shadowMapper.light=this)},enumerable:!0,configurable:!0}),e.prototype._createShadowMapper=function(){throw new s},e.prototype._updateSpecular=function(){this._specularR=this._colorR*this._specular,this._specularG=this._colorG*this._specular,this._specularB=this._colorB*this._specular},e.prototype._updateDiffuse=function(){this._diffuseR=this._colorR*this._diffuse,this._diffuseG=this._colorG*this._diffuse,this._diffuseB=this._colorB*this._diffuse},e.prototype._updateAmbient=function(){this._ambientR=(this._ambientColor>>16&255)/255*this._ambient,this._ambientG=(this._ambientColor>>8&255)/255*this._ambient,this._ambientB=(255&this._ambientColor)/255*this._ambient},e.prototype._onInvalidateConcatenatedMatrix3D=function(t){},e}(d),qu=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this,n)||this;return r._sceneDirectionDirty=!0,e&&(r.direction=e),r._sceneDirection=new B,r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sceneDirection",{get:function(){return this._sceneDirectionDirty&&this._updateSceneDirection(),this._sceneDirection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction=t,this._tmpLookAt||(this._tmpLookAt=new B),this._tmpLookAt.x=this.transform.position.x+this._direction.x,this._tmpLookAt.y=this.transform.position.y+this._direction.y,this._tmpLookAt.z=this.transform.position.z+this._direction.z,this.transform.lookAt(this._tmpLookAt)},enumerable:!0,configurable:!0}),e.prototype._onInvalidateConcatenatedMatrix3D=function(t){this._sceneDirectionDirty=!0},e.prototype._updateSceneDirection=function(){this._sceneDirectionDirty=!1,this.transform.matrix3D.copyColumnTo(2,this._sceneDirection),this._sceneDirection.normalize()},e.prototype._createShadowMapper=function(){return new Hu},e.assetType="[light DirectionalLight]",e}(Yu),Ku=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this)||this;return r.diffuseSampler=new Me,r.specularSampler=new Me,r.diffuseMap=e,r.specularMap=n,r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[light LightProbe]",e}(Yu),Wu=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r._mapper=e,r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mapper",{get:function(){return this._mapper},enumerable:!0,configurable:!0}),e.assetType="[texture ShadowTextureCube]",e}(po),Ju=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getFragmentCode=function(e,n,r,i){var o=n.getFreeFragmentConstant();this._positionIndex=4*o.index;var a=n.getFreeFragmentConstant(),s="",u=n.getFreeFragmentVectorTemp();return s+="sub "+u+", "+i+", "+o+"\ndp3 "+u+".w, "+u+".xyz, "+u+".xyz\nnrm "+u+".xyz, "+u+".xyz\n",s+=t.prototype._getFragmentCode.call(this,e,n,r,u)+"add "+u+".w, "+u+".w, "+a+".x\nmul "+u+".w, "+u+".w, "+o+".w\nslt "+e+".w, "+u+".w, "+e+".w\n"},e.prototype._activate=function(){t.prototype.activate.call(this);var e=this._shader.fragmentConstantData,n=this._positionIndex,r=this._texture.mapper.light.transform.matrix3D.position,i=this._texture.mapper.light.fallOff;e[n]=r.x,e[n+1]=r.y,e[n+2]=r.z,e[n+3]=1/(2*i*i),e[n+4]=-Math.pow(1/(i*this._texture.mapper.epsilon),2)},e}(ku);Di.registerAbstraction(Ju,Wu);var $u=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._needsRender=new Array,n._size=512,n._imageCube=e||new an(n._size),n._textureMap=new Wu(n,n._imageCube),n.iAddTexture(n._textureMap),n.initCameras(),n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){t.prototype.dispose.call(this),this._textureMap.image=null,this._textureMap=null,this._imageCube=null},e.prototype.initCameras=function(){this._depthProjections=new Array,this.addProjection(0,90,0),this.addProjection(0,-90,0),this.addProjection(-90,0,0),this.addProjection(90,0,0),this.addProjection(0,0,0),this.addProjection(0,180,0)},e.prototype.addProjection=function(t,e,n){var r=new vt;r.transform=new F,r.transform.rotateTo(t,e,n),r.near=.01,r.fieldOfView=90,this._depthProjections.push(r)},e.prototype._updateSize=function(){this._imageCube._setSize(this._size)},e.prototype._updateProjection=function(t){for(var e=this._light.fallOff,n=this._light.transform.matrix3D.position,r=0;r<6;++r)this._depthProjections[r].far=e,this._depthProjections[r].transform.moveTo(n.x,n.y,n.z),this._needsRender[r]=!0},e.prototype._renderMap=function(t,e){for(var n=ro.getInstance(new _i(null,e.stage),vo).getRenderer(t),r=0;r<6;++r)this._needsRender[r]&&(n.view.target=this._imageCube,n.view.projection=this._depthProjections[r],n.render(null,r))},e.assetType="[asset PointShadowMapper]",e}(Gu),Zu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsGlobalFragmentPos=!0},e.prototype._getVertexCode=function(t,e){return this._depthMapCoordReg=e.globalPositionVarying,""},e}(zu);Di.registerAbstraction(Zu,$u);var tl=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this,n)||this;return r._radius=9e4,r._fallOff=1e5,e&&(r._transform.matrix3D._rawData[12]=e.x,r._transform.matrix3D._rawData[13]=e.y,r._transform.matrix3D._rawData[14]=e.z,r._transform.invalidatePosition()),r._fallOffFactor=1/(r._fallOff*r._fallOff-r._radius*r._radius),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._radius<0?this._radius=0:this._radius>this._fallOff&&(this._fallOff=this._radius),this._fallOffFactor=1/(this._fallOff*this._fallOff-this._radius*this._radius)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fallOff",{get:function(){return this._fallOff},set:function(t){this._fallOff=t,this._fallOff<0&&(this._fallOff=0),this._fallOff0){var i=e.getFreeFragmentConstant();this._colorIndex=4*i.index,r+="sub "+t+".w, "+t+".w, "+i+".x\nkil "+t+".w\nadd "+t+".w, "+t+".w, "+i+".x\n"}}else{var o=e.getFreeFragmentConstant();this._colorIndex=4*o.index,r+="mov "+t+", "+o+"\n"}return r},e.prototype._activate=function(){if(this._texture)this._texture.activate(),this._invalid&&this._shader.alphaThreshold>0&&(this._shader.fragmentConstantData[this._colorIndex]=this._shader.alphaThreshold);else if(this._invalid){var t=this._colorIndex,e=this._shader.fragmentConstantData,n=this._shader.numLights?16777215:this._shader.renderMaterial.style.color;e[t]=(n>>16&255)/255*this._method.strength,e[t+1]=(n>>8&255)/255*this._method.strength,e[t+2]=(255&n)/255*this._method.strength,e[t+3]=this._method.alpha}},e.prototype._setRenderState=function(t){this._texture&&this._texture._setRenderState(t)},e}(Qu);Di.registerAbstraction(nl,el);var rl=function(t){function e(e){var n=t.call(this)||this;return n._castingLight=e,e.shadowsEnabled=!0,n._shadowMapper=e.shadowMapper,n.iAddTexture(e.shadowMapper.textureMap),n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"castingLight",{get:function(){return this._castingLight},enumerable:!0,configurable:!0}),e.assetType="[asset AmbientDepthMethod]",e}(el),il=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=e.castingLight.shadowMapper.textureMap;return r._shadowTexture=i.getAbstraction(r._shader),r}return n(e,t),e.prototype._initVO=function(t){this._shadowTexture._initVO(t)},e.prototype._initConstants=function(){this._shadowTexture._initConstants();var t=this._shader.fragmentConstantData,e=this._decRegIndex;t[e]=1,t[e+1]=1/255,t[e+2]=1/65025,t[e+3]=1/16581375},e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentConstant();return this._decRegIndex=4*i.index,r+=this._shadowTexture._getFragmentCode(t,e,n,n.uvVarying)+"dp4 "+t+".x, "+t+", "+i+"\nmov "+t+".yz, "+t+".xx\t\t\t\nmov "+t+".w, "+i+".x\nsub "+t+".xyz, "+i+".xxx, "+t+".xyz\n"},e}(nl);Di.registerAbstraction(il,rl);var ol=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._onShaderInvalidatedDelegate=function(t){return n.onShaderInvalidated(t)},n._baseMethod=e||n.createBaseMethod(),n._baseMethod.addEventListener(Ru.SHADER_INVALIDATED,n._onShaderInvalidatedDelegate),n}return n(e,t),Object.defineProperty(e.prototype,"baseMethod",{get:function(){return this._baseMethod},set:function(t){this._baseMethod!=t&&(this._baseMethod.removeEventListener(Ru.SHADER_INVALIDATED,this._onShaderInvalidatedDelegate),this._baseMethod=t,this._baseMethod.addEventListener(Ru.SHADER_INVALIDATED,this._onShaderInvalidatedDelegate),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.prototype.createBaseMethod=function(){throw new s},e.prototype.iAddOwner=function(e){t.prototype.iAddOwner.call(this,e),this._baseMethod.iAddOwner(e)},e.prototype.iRemoveOwner=function(e){t.prototype.iRemoveOwner.call(this,e),this._baseMethod.iRemoveOwner(e)},e.prototype.dispose=function(){this._baseMethod.removeEventListener(Ru.SHADER_INVALIDATED,this._onShaderInvalidatedDelegate)},e.prototype.onShaderInvalidated=function(t){this.invalidateShaderProgram()},e}(Vu),al=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.chunkVO=new Yi,r._baseChunk=e.baseMethod.getAbstraction(n),r}return n(e,t),e.prototype._isUsed=function(){return!0},e.prototype._usesTangentSpace=function(){return this._baseChunk._usesTangentSpace()},e.prototype._initVO=function(t){this._baseChunk._initVO(t)},e.prototype._initConstants=function(){this._baseChunk._initConstants()},e.prototype._activate=function(){this._baseChunk._activate()},e.prototype._setRenderState=function(t){this._baseChunk._setRenderState(t)},e.prototype._deactivate=function(){this._baseChunk._deactivate(),this._invalid=!1},e.prototype._getVertexCode=function(t,e){return this._baseChunk._getVertexCode(t,e)},e.prototype._getFragmentCode=function(t,e,n){return this._baseChunk._getFragmentCode(t,e,n)},e.prototype._reset=function(t){this._baseChunk._reset(t),this._invalid=!0,this._cleanCompilationData()},e.prototype._cleanCompilationData=function(){this._baseChunk._cleanCompilationData()},e}(K),sl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getFragmentPreLightingCode=function(t,e){return this._baseChunk._getFragmentPreLightingCode(t,e)},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i=this._baseChunk._getFragmentCodePerLight(t,e,n,r);return this._totalLightColorReg=this._baseChunk._totalLightColorReg,i},e.prototype._getFragmentCodePerProbe=function(t,e,n,r){var i=this._baseChunk._getFragmentCodePerProbe(t,e,n,r);return this._totalLightColorReg=this._baseChunk._totalLightColorReg,i},e}(al),ul=function(t){function e(){var e=t.call(this)||this;return e._multiply=!0,e._ambientColorR=1,e._ambientColorG=1,e._ambientColorB=1,e._color=16777215,e._colorR=1,e._colorG=1,e._colorB=1,e}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multiply",{get:function(){return this._multiply},set:function(t){this._multiply!=t&&(this._multiply=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(t){this._color!=t&&(this._color=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.iRemoveTexture(this._texture),this._texture=t,this._texture&&this.iAddTexture(this._texture),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._texture=null},e.prototype.copyFrom=function(t){var e=t;this.texture=e.texture,this.multiply=e.multiply,this.color=e.color},e.assetType="[asset DiffuseBasicMethod]",e}(Vu),ll=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._ambientColorR=1,r._ambientColorG=1,r._ambientColorB=1,r._color=16777215,r._colorR=1,r._colorG=1,r._colorB=1,r._method=e,r._shader=n,r}return n(e,t),e.prototype.onInvalidate=function(e){t.prototype.onInvalidate.call(this,e),this._updateProperties()},e.prototype._isUsed=function(){return Boolean(this._shader.numLights)},e.prototype._initVO=function(t){this._method.texture?(this._texture=this._method.texture.getAbstraction(this._shader),this._texture._initVO(t),this._method.texture instanceof ho?t.needsNormals=!0:this._shader.uvDependencies++):this._texture&&(this._texture=null),this._shader.numLights&&(this._shader.usesCommonData=!0,t.needsNormals=!0)},e.prototype._initConstants=function(){this._texture&&this._texture._initConstants(),this._updateProperties()},e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._totalLightColorReg=null},e.prototype._getFragmentPreLightingCode=function(t,e){return this._pIsFirstLight=!0,t.addFragmentTempUsages(this._totalLightColorReg=t.getFreeFragmentVectorTemp(),1),""},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="dp3 "+i+".x, "+t+", "+r.normalFragment+"\nmax "+i+".w, "+i+".x, "+r.commons+".y\n",this._shader.usesLightFallOff&&(o+="mul "+i+".w, "+i+".w, "+t+".w\n"),null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),o+="mul "+i+", "+i+".w, "+e+"\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+i+"\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._getFragmentCodePerProbe=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="tex "+i+", "+r.normalFragment+", "+t+" \nmul "+i+".xyz, "+i+".xyz, "+e+"\n",null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+i+"\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._getFragmentCode=function(t,e,n){var r,i="";n.shadowTarget&&(i+=this._applyShadow(e,n)),e.addFragmentTempUsages(r=e.getFreeFragmentVectorTemp(),1);var o=e.getFreeFragmentConstant();if(this._ambientColorRegister=4*o.index,this._texture)i+=this._texture._getFragmentCode(r,e,n,this._method.texture instanceof ho?n.normalFragment:n.uvVarying);else{var a=e.getFreeFragmentConstant();this._diffuseColorRegister=4*a.index,i+="mov "+r+", "+a+"\n"}return i+="sat "+this._totalLightColorReg+", "+this._totalLightColorReg+"\nmul "+r+".xyz, "+r+", "+this._totalLightColorReg+"\n",this._method.multiply?i+="add "+r+".xyz, "+r+", "+o+"\nmul "+t+".xyz, "+t+", "+r+"\n":this._texture?i+="mul "+t+".xyz, "+t+", "+o+"\nmul "+this._totalLightColorReg+".xyz, "+t+", "+this._totalLightColorReg+"\nsub "+t+".xyz, "+t+", "+this._totalLightColorReg+"\nadd "+t+".xyz, "+t+", "+r+"\n":i+="mul "+this._totalLightColorReg+".xyz, "+o+", "+this._totalLightColorReg+"\nsub "+this._totalLightColorReg+".xyz, "+o+", "+this._totalLightColorReg+"\nadd "+r+".xyz, "+r+", "+this._totalLightColorReg+"\nmul "+t+".xyz, "+t+", "+r+"\n",e.removeFragmentTempUsage(this._totalLightColorReg),e.removeFragmentTempUsage(r),i},e.prototype._applyShadow=function(t,e){return"mul "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+e.shadowTarget+".w\n"},e.prototype._activate=function(){if(this._texture)this._texture.activate();else{var t=this._diffuseColorRegister,e=this._shader.fragmentConstantData;this._method.multiply?(e[t]=this._colorR*this._ambientColorR,e[t+1]=this._colorG*this._ambientColorG,e[t+2]=this._colorB*this._ambientColorB):(e[t]=this._colorR,e[t+1]=this._colorG,e[t+2]=this._colorB),e[t+3]=1}},e.prototype._updateProperties=function(){this._ambientColor=this._shader.renderMaterial.style.color,this._ambientColorR=(this._ambientColor>>16&255)/255,this._ambientColorG=(this._ambientColor>>8&255)/255,this._ambientColorB=(255&this._ambientColor)/255,this._color=this._method.color,this._colorR=(this._color>>16&255)/255,this._colorG=(this._color>>8&255)/255,this._colorB=(255&this._color)/255},e.prototype._setRenderState=function(t){this._texture&&this._texture._setRenderState(t);var e=this._ambientColorRegister,n=this._shader.fragmentConstantData;n[e]=this._shader.ambientR*this._ambientColorR,n[e+1]=this._shader.ambientG*this._ambientColorG,n[e+2]=this._shader.ambientB*this._ambientColorB,n[e+3]=1},e}(Qu);Di.registerAbstraction(ll,ul);var cl=function(t){function e(e){return void 0===e&&(e=null),t.call(this,e)||this}return n(e,t),e.prototype.createBaseMethod=function(){return new ul},Object.defineProperty(e.prototype,"texture",{get:function(){return this._baseMethod.texture},set:function(t){this._baseMethod.texture=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._baseMethod.color},set:function(t){this._baseMethod.color=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multiply",{get:function(){return this._baseMethod.multiply},set:function(t){this._baseMethod.multiply=t},enumerable:!0,configurable:!0}),e}(ol),hl=function(t){function e(e,n,r){void 0===e&&(e=3),void 0===n&&(n=.1),void 0===r&&(r=null);var i=t.call(this,r)||this;return i._levels=e,i._smoothness=n,i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return this._levels},set:function(t){this._levels=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothness",{get:function(){return this._smoothness},set:function(t){this._smoothness=t},enumerable:!0,configurable:!0}),e.assetType="[asset DiffuseCelMethod]",e}(cl),pl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r._baseChunk._modulateFunction=function(t,e,n){return r.clampDiffuse(t,e,n)},r}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._shader.fragmentConstantData,n=this._clampDataIndex;e[n+1]=1,e[n+2]=0},e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._clampDataRegister=null},e.prototype._getFragmentPreLightingCode=function(e,n){return this._clampDataRegister=e.getFreeFragmentConstant(),this._clampDataIndex=4*this._clampDataRegister.index,t.prototype._getFragmentPreLightingCode.call(this,e,n)},e.prototype._activate=function(){if(t.prototype._activate.call(this),this._invalid){var e=this._shader.fragmentConstantData,n=this._clampDataIndex;e[n]=this._method.levels,e[n+3]=this._method.smoothness}},e.prototype.clampDiffuse=function(t,e,n){return"mul "+t+".w, "+t+".w, "+this._clampDataRegister+".x\nfrc "+t+".z, "+t+".w\nsub "+t+".y, "+t+".w, "+t+".z\nmov "+t+".x, "+this._clampDataRegister+".x\nsub "+t+".x, "+t+".x, "+this._clampDataRegister+".y\nrcp "+t+".x,"+t+".x\nmul "+t+".w, "+t+".y, "+t+".x\nsub "+t+".y, "+t+".w, "+t+".x\ndiv "+t+".z, "+t+".z, "+this._clampDataRegister+".w\nsat "+t+".z, "+t+".z\nmul "+t+".w, "+t+".w, "+t+".z\nsub "+t+".z, "+this._clampDataRegister+".y, "+t+".z\nmul "+t+".y, "+t+".y, "+t+".z\nadd "+t+".w, "+t+".w, "+t+".y\nsat "+t+".w, "+t+".w\n"},e}(sl);Di.registerAbstraction(pl,hl);var dl=function(t){function e(e){var n=t.call(this)||this;return n._gradient=e,n.iAddTexture(n._gradient),n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gradient",{get:function(){return this._gradient},set:function(t){this._gradient!=t&&(this._gradient&&this.iRemoveTexture(this._gradient),this._gradient=t,this._gradient&&this.iAddTexture(this._gradient),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.assetType="[asset DiffuseGradientMethod]",e}(ul),fl=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e);var n=this._method.gradient||new go;this._gradient=n.getAbstraction(this._shader),this._gradient._initVO(e)},e.prototype._initConstants=function(){this._gradient._initConstants()},e.prototype._getFragmentPreLightingCode=function(e,n){var r=t.prototype._getFragmentPreLightingCode.call(this,e,n);return this._pIsFirstLight=!0,r},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="dp3 "+i+".w, "+t+".xyz, "+r.normalFragment+".xyz\nmul "+i+".w, "+i+".w, "+r.commons+".x\nadd "+i+".w, "+i+".w, "+r.commons+".x\nmul "+i+".xyz, "+i+".w, "+t+".w\n",null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),o+=this._gradient._getFragmentCode(i,n,r,i)+"mul "+i+".xyz, "+i+".xyz, "+e+".xyz\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+".xyz, "+i+".xyz\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._activate=function(){t.prototype._activate.call(this),this._gradient.activate()},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._gradient._setRenderState(e)},e}(ll);Di.registerAbstraction(fl,dl);var gl=function(t){function e(e,n,r,i){void 0===n&&(n="multiply"),void 0===r&&(r=!1),void 0===i&&(i=null);var o=t.call(this,i)||this;return o._lightMap=e,o.blendMode=n,o._useSecondaryUV=r,o._lightMap&&o.iAddTexture(o._lightMap),o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){if(t!=e.ADD&&t!=e.MULTIPLY)throw new Error("Unknown blendmode!");this._blendMode!=t&&(this._blendMode=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lightMap",{get:function(){return this._lightMap},set:function(t){this._lightMap!=t&&(this._lightMap&&this.iRemoveTexture(this._lightMap),this._lightMap=t,this._lightMap&&this.iAddTexture(this._lightMap),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useSecondaryUV",{get:function(){return this._useSecondaryUV},set:function(t){this._useSecondaryUV!=t&&(this._useSecondaryUV=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.MULTIPLY="multiply",e.ADD="add",e.assetType="[asset DiffuseLightMapMethod]",e}(cl),_l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){var e=this._method.lightMap||new go;this._lightMap=e.getAbstraction(this._shader),this._lightMap._initVO(t),this._method.useSecondaryUV?this._shader.secondaryUVDependencies++:this._shader.uvDependencies++},e.prototype._initConstants=function(){this._lightMap._initConstants()},e.prototype._getFragmentCode=function(e,n,r){var i,o=n.getFreeFragmentVectorTemp();switch(i=this._lightMap._getFragmentCode(o,n,r,this._method.useSecondaryUV?r.secondaryUVVarying:r.uvVarying),this._method.blendMode){case gl.MULTIPLY:i+="mul "+this._totalLightColorReg+", "+this._totalLightColorReg+", "+o+"\n";break;case gl.ADD:i+="add "+this._totalLightColorReg+", "+this._totalLightColorReg+", "+o+"\n"}return i+=t.prototype._getFragmentCode.call(this,e,n,r)},e.prototype._activate=function(){t.prototype._activate.call(this),this._lightMap.activate()},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._lightMap._setRenderState(e)},e}(sl);Di.registerAbstraction(_l,gl);var ml=function(t){function e(e){void 0===e&&(e=.5);var n=t.call(this)||this;return n.wrapFactor=e,n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapFactor",{get:function(){return this._wrapFactor},set:function(t){this._wrapFactor=t,this._wrapFactor=1/(t+1),this.invalidate()},enumerable:!0,configurable:!0}),e.assetType="[asset DiffuseWrapMethod]",e}(ul),yl=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._wrapDataRegister=null},e.prototype._getFragmentPreLightingCode=function(e,n){var r=t.prototype._getFragmentPreLightingCode.call(this,e,n);return this._pIsFirstLight=!0,this._wrapDataRegister=e.getFreeFragmentConstant(),this._wrapDataIndex=4*this._wrapDataRegister.index,r},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="dp3 "+i+".x, "+t+".xyz, "+r.normalFragment+".xyz\nadd "+i+".y, "+i+".x, "+this._wrapDataRegister+".x\nmul "+i+".y, "+i+".y, "+this._wrapDataRegister+".y\nsat "+i+".w, "+i+".y\nmul "+i+".xz, "+i+".w, "+t+".wz\n",null!=this._modulateFunction&&(o+=this._modulateFunction(t,n,r)),o+="mul "+i+", "+i+".x, "+e+"\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+".xyz, "+i+".xyz\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._activate=function(){if(t.prototype._activate.call(this),this._invalid){var e=this._wrapDataIndex,n=this._shader.fragmentConstantData;n[e]=this._method.wrapFactor,n[e+1]=1/(this._method.wrapFactor+1)}},e}(ll);Di.registerAbstraction(yl,ml);var Al=function(t){function e(e,n){void 0===n&&(n=!1);var r=t.call(this)||this;return r._texture=e,r._useSecondaryUV=n,r._texture&&r.iAddTexture(r._texture),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.iRemoveTexture(this._texture),this._texture=t,this._texture&&this.iAddTexture(this._texture),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useSecondaryUV",{get:function(){return this._useSecondaryUV},set:function(t){this._useSecondaryUV!=t&&(this._useSecondaryUV=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.assetType="[asset EffectAlphaMaskMethod]",e}(Vu),vl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){var e=this._method.texture||new go;this._alphaMask=e.getAbstraction(this._shader),this._alphaMask._initVO(t),this._method.useSecondaryUV?this._shader.secondaryUVDependencies++:this._shader.uvDependencies++},e.prototype._initConstants=function(){this._alphaMask._initConstants()},e.prototype._getFragmentCode=function(t,e,n){var r=e.getFreeFragmentVectorTemp();return this._alphaMask._getFragmentCode(r,e,n,this._method.useSecondaryUV?n.secondaryUVVarying:n.uvVarying)+"mul "+t+", "+t+", "+r+".x\n"},e.prototype._activate=function(){t.prototype._activate.call(this),this._alphaMask.activate()},e.prototype._setRenderState=function(t){this._alphaMask._setRenderState(t)},e}(Qu);Di.registerAbstraction(vl,Al);var bl=function(t){function e(e){var n=t.call(this)||this;if(20!=e.length)throw new Error("Matrix length must be 20!");return n._matrix=e,n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this._matrix},set:function(t){if(20!=t.length)throw new Error("Matrix length must be 20!");this._matrix=t,this.invalidate()},enumerable:!0,configurable:!0}),e.assetType="[asset EffectColorMatrixMethod]",e}(Vu),Cl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentConstant();e.getFreeFragmentConstant(),e.getFreeFragmentConstant(),e.getFreeFragmentConstant();var o=e.getFreeFragmentConstant();this._colorMatrixIndex=4*i.index;var a=e.getFreeFragmentVectorTemp();return r+="m44 "+a+", "+t+", "+i+"\nadd "+t+", "+a+", "+o+"\n"},e.prototype._activate=function(){if(this._invalid){var t=this._method.matrix,e=this._colorMatrixIndex,n=this._shader.fragmentConstantData;n[e]=t[0],n[e+1]=t[1],n[e+2]=t[2],n[e+3]=t[3],n[e+4]=t[5],n[e+5]=t[6],n[e+6]=t[7],n[e+7]=t[8],n[e+8]=t[10],n[e+9]=t[11],n[e+10]=t[12],n[e+11]=t[13],n[e+12]=t[15],n[e+13]=t[16],n[e+14]=t[17],n[e+15]=t[18],n[e+16]=t[4],n[e+17]=t[9],n[e+18]=t[14],n[e+19]=t[19]}},e}(Qu);Di.registerAbstraction(Cl,bl);var Il=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._colorTransform=e,n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorTransform",{get:function(){return this._colorTransform},set:function(t){this._colorTransform=t,this.invalidate()},enumerable:!0,configurable:!0}),e.assetType="[asset EffectColorTransformMethod]",e}(Vu),El=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentConstant(),o=e.getFreeFragmentConstant();return this._colorTransformIndex=4*i.index,r+="mul "+t+", "+t+", "+i+"\nadd "+t+", "+t+", "+o+"\n"},e.prototype._activate=function(){if(this._invalid){var t=this._colorTransformIndex,e=this._shader.fragmentConstantData,n=this._method.colorTransform._rawData;e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7]}},e}(Qu);Di.registerAbstraction(El,Il);var xl=function(t){function e(e,n){void 0===n&&(n=1);var r=t.call(this)||this;return r._envMap=e,r._alpha=n,r.iAddTexture(r._envMap),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"envMap",{get:function(){return this._envMap},set:function(t){this._envMap!=t&&(this._envMap&&this.iRemoveTexture(this._envMap),this._envMap=t,this._envMap&&this.iAddTexture(this._envMap),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){t!=this._mask&&(this._mask&&this.iRemoveTexture(this._mask),this._mask=t,this._mask&&this.iAddTexture(this._mask),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){this._alpha=t,this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){},e.assetType="[asset EffectEnvMapMethod]",e}(Vu),wl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){t.needsNormals=!0,t.needsView=!0,this._envMap=this._method.envMap.getAbstraction(this._shader),this._envMap._initVO(t),this._method.mask?(this._maskMap=this._method.mask.getAbstraction(this._shader),this._shader.uvDependencies++):this._maskMap&&(this._maskMap=null)},e.prototype._initConstants=function(){this._envMap._initConstants()},e.prototype.dispose=function(){this._envMap=null,this._maskMap=null},e.prototype._activate=function(){this._envMap.activate(),this._maskMap&&this._maskMap.activate(),this._invalid&&this._updateProperties()},e.prototype._setRenderState=function(t){this._envMap._setRenderState(t),this._maskMap&&this._maskMap._setRenderState(t)},e.prototype._getFragmentCode=function(t,e,n){var r=e.getFreeFragmentConstant(),i="";this._fragmentIndex=4*r.index;var o=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(o,1);var a=e.getFreeFragmentVectorTemp();return e.addFragmentTempUsages(a,1),i+="dp3 "+o+".w, "+n.viewDirFragment+".xyz, "+n.normalFragment+".xyz\nadd "+o+".w, "+o+".w, "+o+".w\nmul "+o+".xyz, "+n.normalFragment+".xyz, "+o+".w\nsub "+o+".xyz, "+o+".xyz, "+n.viewDirFragment+".xyz\n"+this._envMap._getFragmentCode(o,e,n,o)+"sub "+a+".w, "+o+".w, fc0.x\nkil "+a+".w\nsub "+o+", "+o+", "+t+"\n",this._maskMap&&(i+=this._maskMap._getFragmentCode(a,e,n,n.uvVarying)+"mul "+o+", "+a+", "+o+"\n"),i+="mul "+o+", "+o+", "+r+".x\nadd "+t+", "+t+", "+o+"\n",e.removeFragmentTempUsage(o),e.removeFragmentTempUsage(a),i},e.prototype._updateProperties=function(){this._shader.fragmentConstantData[this._fragmentIndex]=this._method.alpha},e}(Qu);Di.registerAbstraction(wl,xl);var Sl=function(t){function e(e,n,r){void 0===e&&(e=0),void 0===n&&(n=1e3),void 0===r&&(r=8421504);var i=t.call(this)||this;return i._minDistance=e,i._maxDistance=n,i._fogColor=r,i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDistance",{get:function(){return this._minDistance},set:function(t){this._minDistance=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDistance",{get:function(){return this._maxDistance},set:function(t){this._maxDistance=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fogColor",{get:function(){return this._fogColor},set:function(t){this._fogColor=t,this.invalidate()},enumerable:!0,configurable:!0}),e.assetType="[asset EffectFogMethod]",e}(Vu),Dl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){t.needsProjection=!0},e.prototype._activate=function(){if(this._invalid){var t=this._shader.fragmentConstantData,e=this._fogColorIndex,n=this._method.fogColor;t[e]=(n>>16&255)/255,t[e+1]=(n>>8&255)/255,t[e+2]=(255&n)/255,t[e+3]=1,t[e+4]=this._method.minDistance,t[e+5]=1/(this._method.maxDistance-this._method.minDistance),t[e+6]=0,t[e+7]=0}},e.prototype._getFragmentCode=function(t,e,n){var r=e.getFreeFragmentConstant(),i=e.getFreeFragmentConstant(),o=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(o,1);var a=e.getFreeFragmentVectorTemp(),s="";return this._fogColorIndex=4*r.index,s+="sub "+a+".w, "+n.projectionFragment+".z, "+i+".x\nmul "+a+".w, "+a+".w, "+i+".y\nsat "+a+".w, "+a+".w\nsub "+o+", "+r+", "+t+"\nmul "+o+", "+o+", "+a+".w\nadd "+t+", "+t+", "+o+"\n",e.removeFragmentTempUsage(o),s},e}(Qu);Di.registerAbstraction(Dl,Sl);var Tl=function(t){function e(e,n,r,i){void 0===n&&(n=1),void 0===r&&(r=5),void 0===i&&(i=0);var o=t.call(this,e,n)||this;return o._fresnelPower=r,o._normalReflectance=i,o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fresnelPower",{get:function(){return this._fresnelPower},set:function(t){this._fresnelPower=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normalReflectance",{get:function(){return this._normalReflectance},set:function(t){this._normalReflectance!=t&&(this._normalReflectance=t,this.invalidate())},enumerable:!0,configurable:!0}),e.assetType="[asset EffectFresnelEnvMapMethod]",e}(xl),Pl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._getFragmentCode=function(t,e,n){var r=e.getFreeFragmentConstant(),i="",o=n.viewDirFragment,a=n.normalFragment;this._fragmentIndex=4*r.index;var s=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(s,1);var u=e.getFreeFragmentVectorTemp();return e.addFragmentTempUsages(u,1),i+="dp3 "+s+".w, "+o+".xyz, "+a+".xyz\nadd "+s+".w, "+s+".w, "+s+".w\nmul "+s+".xyz, "+a+".xyz, "+s+".w\nsub "+s+".xyz, "+s+".xyz, "+o+".xyz\n"+this._envMap._getFragmentCode(s,e,n,s)+"sub "+u+".w, "+s+".w, fc0.x\nkil "+u+".w\nsub "+s+", "+s+", "+t+"\n",i+="dp3 "+o+".w, "+o+".xyz, "+a+".xyz\nsub "+o+".w, "+r+".w, "+o+".w\npow "+o+".w, "+o+".w, "+r+".z\nsub "+a+".w, "+r+".w, "+o+".w\nmul "+a+".w, "+r+".y, "+a+".w\nadd "+o+".w, "+o+".w, "+a+".w\nmul "+o+".w, "+r+".x, "+o+".w\n",this._maskMap&&(i+=this._maskMap._getFragmentCode(u,e,n,n.uvVarying)+"mul "+o+".w, "+u+".x, "+o+".w\n"),i+="mul "+s+", "+s+", "+o+".w\nadd "+t+", "+t+", "+s+"\n",e.removeFragmentTempUsage(s),e.removeFragmentTempUsage(u),i},e.prototype._updateProperties=function(){var t=this._fragmentIndex,e=this._shader.fragmentConstantData;e[t]=this._method.alpha,e[t+1]=this._method.normalReflectance,e[t+2]=this._method.fresnelPower},e}(wl);Di.registerAbstraction(Pl,Tl);var Bl=function(t){function e(n,r,i){void 0===r&&(r="multiply"),void 0===i&&(i=!1);var o=t.call(this)||this;if(r!=e.ADD&&r!=e.MULTIPLY)throw new Error("Unknown blendmode!");return o._lightMap=n,o._blendMode=r,o._useSecondaryUV=i,o._lightMap&&o.iAddTexture(o._lightMap),o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){if(this._blendMode!=t){if(t!=e.ADD&&t!=e.MULTIPLY)throw new Error("Unknown blendmode!");this._blendMode=t,this.invalidateShaderProgram()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lightMap",{get:function(){return this._lightMap},set:function(t){this._lightMap!=t&&(this._lightMap&&this.iRemoveTexture(this._lightMap),this._lightMap=t,this._lightMap&&this.iAddTexture(this._lightMap),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useSecondaryUV",{get:function(){return this._useSecondaryUV},set:function(t){this._useSecondaryUV!=t&&(this._useSecondaryUV=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.MULTIPLY="multiply",e.ADD="add",e.assetType="[asset EffectLightMapMethod]",e}(Vu),Ol=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){this._lightMap=this._method.lightMap.getAbstraction(this._shader),this._lightMap._initVO(t),this._method.useSecondaryUV?this._shader.secondaryUVDependencies++:this._shader.uvDependencies++},e.prototype._initConstants=function(){this._lightMap._initConstants()},e.prototype._getFragmentCode=function(t,e,n){var r,i=e.getFreeFragmentVectorTemp();switch(r=this._lightMap._getFragmentCode(i,e,n,this._method.useSecondaryUV?n.secondaryUVVarying:n.uvVarying),this._method.blendMode){case Bl.MULTIPLY:r+="mul "+t+", "+t+", "+i+"\n";break;case Bl.ADD:r+="add "+t+", "+t+", "+i+"\n"}return r},e.prototype._activate=function(){this._lightMap.activate()},e.prototype._setRenderState=function(t){this._lightMap._setRenderState(t)},e}(Qu);Di.registerAbstraction(Ol,Bl);var Ml=function(t){function e(e,n,r){void 0===n&&(n="multiply"),void 0===r&&(r=1);var i=t.call(this)||this;return i._onTextureChangedDelegate=function(t){return i._onTextureChanged(t)},i._projector=e,i._exposure=r,i._mode=n,i._projector.addEventListener(Nu.TEXTURE_CHANGE,i._onTextureChangedDelegate),i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exposure",{get:function(){return this._exposure},set:function(t){this._exposure!=t&&(this._exposure=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode!=t&&(this._mode=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"projector",{get:function(){return this._projector},set:function(t){this._projector!=t&&(this._projector&&this._projector.removeEventListener(Nu.TEXTURE_CHANGE,this._onTextureChangedDelegate),this._projector=t,this._projector&&this._projector.addEventListener(Nu.TEXTURE_CHANGE,this._onTextureChangedDelegate),this.updateTexture())},enumerable:!0,configurable:!0}),e.prototype._onTextureChanged=function(t){this.updateTexture()},e.prototype.updateTexture=function(){this._texture&&this.iRemoveTexture(this._texture),this._texture=this._projector?this._projector.texture:null,this._texture&&this.iAddTexture(this._texture),this.invalidateShaderProgram()},e.OVERLAY="overlay",e.MULTIPLY="multiply",e.ADD="add",e.MIX="mix",e.assetType="[asset EffectProjectiveTextureMethod]",e}(Vu),Ll=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){this._texture=this._method.projector.texture.getAbstraction(this._shader),this._texture._initVO(t)},e.prototype._initConstants=function(){this._texture._initConstants();var t=this._exposureIndex,e=this._shader.fragmentConstantData;e[t]=this._method.exposure,e[t+1]=.5,e[t+2]=4,e[t+3]=-1,this._projectionMatrix=new R(new Float32Array(this._shader.vertexConstantData.buffer,4*this._projectionIndex,16))},e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._uvVarying=null,this._projectionMatrix=null},e.prototype._getVertexCode=function(t,e){var n="",r=t.getFreeVertexConstant();return t.getFreeVertexConstant(),t.getFreeVertexConstant(),t.getFreeVertexConstant(),this._projectionIndex=4*r.index,this._uvVarying=t.getFreeVarying(),n+="m44 "+this._uvVarying+", "+e.animatedPosition+", "+r+"\n"},e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(i,1);var o=e.getFreeFragmentVectorTemp(),s=e.getFreeFragmentConstant();if(this._exposureIndex=4*s.index,r+=this._texture._getFragmentCode(i,e,n,this._uvVarying),r+="mul "+i+", "+i+", "+s+".xxx\nadd "+i+", "+i+", "+s+".xxx\n",this._method.mode==Ml.MULTIPLY)r+="mul "+t+".xyz, "+t+".xyz, "+i+".xyz\t\t\t\n";else if(this._method.mode==Ml.ADD)r+="add "+t+".xyz, "+t+".xyz, "+i+".xyz\t\t\t\n";else if(this._method.mode==Ml.MIX)r+="sub "+i+".xyz, "+i+".xyz, "+t+".xyz\t\t\t\t\nmul "+i+".xyz, "+i+".xyz, "+i+".w\t\t\t\t\t\t\nadd "+t+".xyz, "+t+".xyz, "+i+".xyz\t\t\t\n";else{if(this._method.mode!=Ml.OVERLAY)throw new a('Unknown mode "'+this._method.mode+'"');r+="sge "+o+", "+t+", "+s+".yyy\n",r+="sub "+t+", "+t+", "+o+"\n",r+="sub "+i+", "+i+", "+o+"\n",r+="mul "+i+", "+i+", "+t+"\n",r+="sub "+t+", "+s+".yyy, "+o+"\n",r+="mul "+t+", "+s+".zzz, "+t+"\n",r+="mul "+i+", "+i+", "+t+"\n",r+="add "+t+", "+i+", "+o+"\n"}return e.removeFragmentTempUsage(i),r},e.prototype._setRenderState=function(t){var e=R.CALCULATION_MATRIX;e.copyFrom(this._method.projector.projection.viewMatrix3D),e.prepend(t.renderSceneTransform),this._projectionMatrix.copyFrom(e,!0),this._texture._setRenderState(t)},e.prototype._activate=function(){this._texture.activate(),this._invalid&&(this._shader.fragmentConstantData[this._exposureIndex]=this._method.exposure)},e}(Qu);Di.registerAbstraction(Ll,Ml);var Nl=function(t){function e(e,n,r,i,o,a){void 0===n&&(n=1),void 0===r&&(r=.1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=t.call(this,e,n)||this;return s._dispersionR=0,s._dispersionG=0,s._dispersionB=0,s._refractionIndex=r,s._dispersionR=i,s._dispersionG=o,s._dispersionB=a,s}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"refractionIndex",{get:function(){return this._refractionIndex},set:function(t){this._refractionIndex=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dispersionR",{get:function(){return this._dispersionR},set:function(t){this._dispersionR!=t&&(this._dispersionR=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dispersionG",{get:function(){return this._dispersionG},set:function(t){this._dispersionG!=t&&(this._dispersionG=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dispersionB",{get:function(){return this._dispersionB},set:function(t){this._dispersionB!=t&&(this._dispersionB=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.assetType="[asset EffectRefractionEnvMapMethod]",e}(xl),Rl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),this._useDispersion=!(this._method.dispersionR==this._method.dispersionB&&this._method.dispersionR==this._method.dispersionG)},e.prototype._getFragmentCode=function(t,e,n){var r,i,o,a=e.getFreeFragmentConstant(),s=e.getFreeFragmentConstant(),u="";this._fragmentIndex=4*a.index,r=e.getFreeFragmentVectorTemp(),e.addFragmentTempUsages(r,1),i=e.getFreeFragmentVectorTemp(),e.addFragmentTempUsages(i,1),o=e.getFreeFragmentVectorTemp(),e.addFragmentTempUsages(o,1);var l=n.viewDirFragment,c=n.normalFragment;return u+="neg "+l+".xyz, "+l+".xyz\n",u+="dp3 "+o+".x, "+l+".xyz, "+c+".xyz\nmul "+o+".w, "+o+".x, "+o+".x\nsub "+o+".w, "+s+".x, "+o+".w\nmul "+o+".w, "+a+".x, "+o+".w\nmul "+o+".w, "+a+".x, "+o+".w\nsub "+o+".w, "+s+".x, "+o+".w\nsqt "+o+".y, "+o+".w\nmul "+o+".x, "+a+".x, "+o+".x\nadd "+o+".x, "+o+".x, "+o+".y\nmul "+o+".xyz, "+o+".x, "+c+".xyz\nmul "+r+", "+a+".x, "+l+"\nsub "+r+".xyz, "+r+".xyz, "+o+".xyz\nnrm "+r+".xyz, "+r+".xyz\n"+this._envMap._getFragmentCode(i,e,n,r)+"sub "+i+".w, "+i+".w, fc0.x\t\nkil "+i+".w\n",this._useDispersion&&(u+="dp3 "+o+".x, "+l+".xyz, "+c+".xyz\nmul "+o+".w, "+o+".x, "+o+".x\nsub "+o+".w, "+s+".x, "+o+".w\nmul "+o+".w, "+a+".y, "+o+".w\nmul "+o+".w, "+a+".y, "+o+".w\nsub "+o+".w, "+s+".x, "+o+".w\nsqt "+o+".y, "+o+".w\nmul "+o+".x, "+a+".y, "+o+".x\nadd "+o+".x, "+o+".x, "+o+".y\nmul "+o+".xyz, "+o+".x, "+c+".xyz\nmul "+r+", "+a+".y, "+l+"\nsub "+r+".xyz, "+r+".xyz, "+o+".xyz\nnrm "+r+".xyz, "+r+".xyz\n"+this._envMap._getFragmentCode(o,e,n,r)+"mov "+i+".y, "+o+".y\n",u+="dp3 "+o+".x, "+l+".xyz, "+c+".xyz\nmul "+o+".w, "+o+".x, "+o+".x\nsub "+o+".w, "+s+".x, "+o+".w\nmul "+o+".w, "+a+".z, "+o+".w\nmul "+o+".w, "+a+".z, "+o+".w\nsub "+o+".w, "+s+".x, "+o+".w\nsqt "+o+".y, "+o+".w\nmul "+o+".x, "+a+".z, "+o+".x\nadd "+o+".x, "+o+".x, "+o+".y\nmul "+o+".xyz, "+o+".x, "+c+".xyz\nmul "+r+", "+a+".z, "+l+"\nsub "+r+".xyz, "+r+".xyz, "+o+".xyz\nnrm "+r+".xyz, "+r+".xyz\n"+this._envMap._getFragmentCode(o,e,n,r)+"mov "+i+".z, "+o+".z\n"),u+="sub "+i+".xyz, "+i+".xyz, "+t+".xyz\nmul "+i+".xyz, "+i+".xyz, "+a+".w\nadd "+t+".xyz, "+t+".xyz, "+i+".xyz\n",e.removeFragmentTempUsage(o),e.removeFragmentTempUsage(r),e.removeFragmentTempUsage(i),u+="neg "+l+".xyz, "+l+".xyz\n"},e.prototype._updateProperties=function(){var t=this._fragmentIndex,e=this._shader.fragmentConstantData,n=this._method.refractionIndex;e[t]=this._method.dispersionR+n,this._useDispersion&&(e[t+1]=this._method.dispersionG+n,e[t+2]=this._method.dispersionB+n),e[t+3]=this._method.alpha},e}(wl);Di.registerAbstraction(Rl,Nl);var Fl=function(t){function e(e,n,r,i){void 0===e&&(e=16777215),void 0===n&&(n=.4),void 0===r&&(r=2),void 0===i&&(i="mix");var o=t.call(this)||this;return o._blendMode=i,o._strength=n,o._power=r,o._color=e,o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(t){this._power!=t&&(this._color=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this._strength},set:function(t){this._strength!=t&&(this._strength=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"power",{get:function(){return this._power},set:function(t){this._power!=t&&(this._power=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this._blendMode!=t&&(this._blendMode=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.ADD="add",e.MULTIPLY="multiply",e.MIX="mix",e.assetType="[asset EffectRimLightMethod]",e}(Vu),kl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(t){t.needsNormals=!0,t.needsView=!0},e.prototype._activate=function(){if(this._invalid){var t=this._rimColorIndex,e=this._shader.fragmentConstantData,n=this._method.color;e[t]=(n>>16&255)/255,e[t+1]=(n>>8&255)/255,e[t+2]=(255&n)/255,e[t+3]=1,e[t+4]=this._method.strength,e[t+5]=this._method.power}},e.prototype._getFragmentCode=function(t,e,n){var r=e.getFreeFragmentConstant(),i=e.getFreeFragmentConstant(),o=e.getFreeFragmentVectorTemp(),a="";return this._rimColorIndex=4*r.index,a+="dp3 "+o+".x, "+n.viewDirFragment+".xyz, "+n.normalFragment+".xyz\nsat "+o+".x, "+o+".x\nsub "+o+".x, "+r+".w, "+o+".x\npow "+o+".x, "+o+".x, "+i+".y\nmul "+o+".x, "+o+".x, "+i+".x\nsub "+o+".x, "+r+".w, "+o+".x\nmul "+t+".xyz, "+t+".xyz, "+o+".x\nsub "+o+".w, "+r+".w, "+o+".x\n",this._method.blendMode==Fl.ADD?a+="mul "+o+".xyz, "+o+".w, "+r+".xyz\nadd "+t+".xyz, "+t+".xyz, "+o+".xyz\n":this._method.blendMode==Fl.MULTIPLY?a+="mul "+o+".xyz, "+o+".w, "+r+".xyz\nmul "+t+".xyz, "+t+".xyz, "+o+".xyz\n":a+="sub "+o+".xyz, "+r+".xyz, "+t+".xyz\nmul "+o+".xyz, "+o+".xyz, "+o+".w\nadd "+t+".xyz, "+t+".xyz, "+o+".xyz\n",a},e}(Qu);Di.registerAbstraction(kl,Fl);var Ul=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n._texture=e,n._texture&&n.iAddTexture(n._texture),n}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.iRemoveTexture(this._texture),this._texture=t,this._texture&&this.iAddTexture(this._texture),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var e=t;null!=e.texture&&(this.texture=e.texture)},e.prototype.dispose=function(){this._texture&&(this._texture=null)},e.assetType="[asset NormalBasicMethod]",e}(Vu),jl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._isUsed=function(){return!(!this._texture||!this._shader.normalDependencies)},e.prototype._initVO=function(t){this._method.texture&&(this._texture=this._method.texture.getAbstraction(this._shader),this._texture._initVO(t),this._shader.uvDependencies++)},e.prototype._initConstants=function(){this._method.texture&&this._texture._initConstants()},e.prototype._outputsTangentNormals=function(){return!0},e.prototype._activate=function(){this._texture&&this._texture.activate()},e.prototype._setRenderState=function(t){this._texture&&this._texture._setRenderState(t)},e.prototype._getFragmentCode=function(t,e,n){var r="";return this._texture&&(r+=this._texture._getFragmentCode(t,e,n,n.uvVarying)),r+="sub "+t+".xyz, "+t+".xyz, "+n.commons+".xxx\nnrm "+t+".xyz, "+t+"\n"},e}(Qu);Di.registerAbstraction(jl,Ul);var Vl=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.texture=e,o._worldXYRatio=n/r,o._worldXZRatio=i/r,o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"worldXYRatio",{get:function(){return this._worldXYRatio},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"worldXZRatio",{get:function(){return this._worldXZRatio},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this._worldXYRatio=e._worldXYRatio,this._worldXZRatio=e._worldXZRatio},e.assetType="[asset NormalHeightMapMethod]",e}(Ul),Ql=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._fragmentConstantsIndex,n=this._shader.fragmentConstantData,r=this._method.texture.image;n[e]=1/r.width,n[e+1]=1/r.height,n[e+2]=0,n[e+3]=1,n[e+4]=this._method.worldXYRatio,n[e+5]=this._method.worldXZRatio},Object.defineProperty(e.prototype,"tangentSpace",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(i,1);var o=e.getFreeFragmentConstant(),a=e.getFreeFragmentConstant();return this._fragmentConstantsIndex=4*o.index,r+=this._texture._getFragmentCode(t,e,n,n.uvVarying)+"add "+i+", "+n.uvVarying+", "+o+".xzzz\n"+this._texture._getFragmentCode(i,e,n,i)+"sub "+t+".x, "+t+".x, "+i+".x\nadd "+i+", "+n.uvVarying+", "+o+".zyzz\n"+this._texture._getFragmentCode(i,e,n,i)+"sub "+t+".z, "+t+".z, "+i+".x\nmov "+t+".y, "+o+".w\nmul "+t+".xz, "+t+".xz, "+a+".xy\nnrm "+t+".xyz, "+t+".xyz\n",e.removeFragmentTempUsage(i),r},e}(jl);Di.registerAbstraction(Ql,Vl);var Gl=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this,e)||this;return r._water1OffsetX=0,r._water1OffsetY=0,r._water2OffsetX=0,r._water2OffsetY=0,r._secondaryNormalMap=n,r._secondaryNormalMap&&r.iAddTexture(r._secondaryNormalMap),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"water1OffsetX",{get:function(){return this._water1OffsetX},set:function(t){this._water1OffsetX=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"water1OffsetY",{get:function(){return this._water1OffsetY},set:function(t){this._water1OffsetY=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"water2OffsetX",{get:function(){return this._water2OffsetX},set:function(t){this._water2OffsetX=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"water2OffsetY",{get:function(){return this._water2OffsetY},set:function(t){this._water2OffsetY=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryNormalMap",{get:function(){return this._secondaryNormalMap},set:function(t){this._secondaryNormalMap!=t&&(this._secondaryNormalMap&&this.iRemoveTexture(this._secondaryNormalMap),this._secondaryNormalMap=t,this._secondaryNormalMap&&this.iAddTexture(this._secondaryNormalMap),this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){t.prototype.dispose.call(this),this._secondaryNormalMap=null},e.assetType="[asset NormalSimpleWaterMethod]",e}(Ul),zl=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._fragmentConstantsIndex,n=this._shader.fragmentConstantData;n[e]=.5,n[e+1]=0,n[e+2]=0,n[e+3]=1},e.prototype._initVO=function(e){t.prototype._initVO.call(this,e);var n=this._method.secondaryNormalMap;n&&(this._secondaryNormalMap=n.getAbstraction(this._shader),this._shader.uvDependencies++)},e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._secondaryNormalMap=null},e.prototype._activate=function(){if(t.prototype._activate.call(this),this._invalid){var e=this._shader.fragmentConstantData,n=this._fragmentConstantsIndex;e[n+4]=this._method.water1OffsetX,e[n+5]=this._method.water1OffsetY,e[n+6]=this._method.water2OffsetX,e[n+7]=this._method.water2OffsetY}this._secondaryNormalMap&&this._secondaryNormalMap.activate()},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._secondaryNormalMap&&this._secondaryNormalMap._setRenderState(e)},e.prototype._getFragmentCode=function(t,e,n){var r="",i=e.getFreeFragmentVectorTemp();e.addFragmentTempUsages(i,1);var o=e.getFreeFragmentConstant(),a=e.getFreeFragmentConstant();return this._fragmentConstantsIndex=4*o.index,r+="add "+i+", "+n.uvVarying+", "+a+".xyxy\n",this._texture&&(r+=this._texture._getFragmentCode(t,e,n,i)),r+="add "+i+", "+n.uvVarying+", "+a+".zwzw\n",this._secondaryNormalMap&&(r+=this._secondaryNormalMap._getFragmentCode(i,e,n,i)),r+="add "+t+", "+t+", "+i+"\t\t\nmul "+t+", "+t+", "+o+".x\t\nsub "+t+".xyz, "+t+".xyz, "+n.commons+".xxx\t\nnrm "+t+".xyz, "+t+".xyz\t\t\t\t\t\t\t\n"},e}(jl);Di.registerAbstraction(zl,Gl);var Hl=function(t){function e(e){var n=t.call(this,e.shadowMapper)||this;return n._castingLight=e,n}return n(e,t),Object.defineProperty(e.prototype,"castingLight",{get:function(){return this._castingLight},enumerable:!0,configurable:!0}),e}(ol),Xl=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),this._baseTexture=this._baseChunk.texture},e}(al),Yl=function(t){function e(n,r,i){void 0===r&&(r=4),void 0===i&&(i=1);var o=t.call(this,n)||this;return o._depthMapSize=o._castingLight.shadowMapper.size,o.numSamples=r,o.range=i,++e._grainUsages,e._grainTexture||o.initGrainTexture(),o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numSamples",{get:function(){return this._numSamples},set:function(t){t<1?t=1:t>24&&(t=24),this._numSamples!=t&&(this._numSamples=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return 2*this._range},set:function(t){this._range=t/2},enumerable:!0,configurable:!0}),e.prototype.initGrainTexture=function(){e._grainBitmapImage2D=new en(64,64,!1);for(var t,n,r=new Array,i=1/(this._depthMapSize*this._range),o=0;o<4096;++o)(t=2*(Math.random()-.5))<0?t-=i:t+=i,(n=2*(Math.random()-.5))<0?n-=i:n+=i,t>1?t=1:t<-1&&(t=-1),n>1?n=1:n<-1&&(n=-1),r[o]=Math.floor(255*(.5*t+.5))<<16|Math.floor(255*(.5*n+.5))<<8;e._grainBitmapImage2D.setArray(e._grainBitmapImage2D.rect,r),e._grainTexture=new go(e._grainBitmapImage2D)},e.prototype.dispose=function(){0==--e._grainUsages&&(e._grainTexture.dispose(),e._grainBitmapImage2D.dispose(),e._grainTexture=null)},e.assetType="[asset ShadowDitheredMethod]",e}(Hl),ql=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsProjection=!0,this._grainMap=Yl._grainTexture.getAbstraction(this._shader)},e.prototype._initConstants=function(){t.prototype._initConstants.call(this),this._shader.fragmentConstantData[this._fragmentConstantsIndex]=1/this._method.numSamples},e.prototype._activate=function(){t.prototype._activate.call(this);var e=this._shader.fragmentConstantData,n=this._fragmentConstantsIndex;e[n+1]=(this._shader.renderMaterial.renderGroup.view.width-1)/63,e[n+2]=(this._shader.renderMaterial.renderGroup.view.height-1)/63,e[n+3]=2*this._method.range/this._method.castingLight.shadowMapper.size,this._grainMap.activate()},e.prototype._getFragmentCode=function(e,n,r){var i=n.getFreeFragmentConstant();this._fragmentConstantsIndex=4*i.index;var o="",a=this._method.numSamples,s=n.getFreeFragmentVectorTemp();n.addFragmentTempUsages(s,1);var u=n.getFreeFragmentVectorTemp();n.addFragmentTempUsages(u,1);var l=r.projectionFragment;o+="div "+s+", "+l+", "+l+".w\nmul "+s+".xy, "+s+".xy, "+i+".yz\n";for(var c=a;c>0;)o+=c==a?this._grainMap._getFragmentCode(s,n,r,s):"mov "+u+", "+s+".zwxy \n"+this._grainMap._getFragmentCode(s,n,r,u),o+="sub "+s+".zw, "+s+".xy, fc0.xx\nmul "+s+".zw, "+s+".zw, "+i+".w\n",o+=c==a?"add "+s+".xy, "+s+".zw, "+this._baseChunk.depthMapCoordReg+".xy\n"+this._baseTexture._getFragmentCode(e,n,r,s):this._addSample(s,e,n,r),c>4&&(o+="add "+s+".xy, "+s+".xy, "+s+".zw\n"+this._addSample(s,e,n,r)),c>1&&(o+="sub "+s+".xy, "+this._baseChunk.depthMapCoordReg+".xy, "+s+".zw\n"+this._addSample(s,e,n,r)),c>5&&(o+="sub "+s+".xy, "+s+".xy, "+s+".zw\n"+this._addSample(s,e,n,r)),c>2&&(o+="neg "+s+".w, "+s+".w\nadd "+s+".xy, "+s+".wz, "+this._baseChunk.depthMapCoordReg+".xy\n"+this._addSample(s,e,n,r)),c>6&&(o+="add "+s+".xy, "+s+".xy, "+s+".wz\n"+this._addSample(s,e,n,r)),c>3&&(o+="sub "+s+".xy, "+this._baseChunk.depthMapCoordReg+".xy, "+s+".wz\n"+this._addSample(s,e,n,r)),c>7&&(o+="sub "+s+".xy, "+s+".xy, "+s+".wz\n"+this._addSample(s,e,n,r)),c-=8;return n.removeFragmentTempUsage(u),n.removeFragmentTempUsage(s),o+="mul "+e+".w, "+e+".w, "+i+".x\n"+t.prototype._getFragmentCode.call(this,e,n,r)},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._grainMap._setRenderState(e)},e.prototype._addSample=function(t,e,n,r){var i=n.getFreeFragmentVectorTemp();n.addFragmentTempUsages(i,1);var o=this._baseTexture._getFragmentCode(i,n,r,t)+"add "+e+".w, "+e+".w, "+i+".w\n";return n.removeFragmentTempUsage(i),o},e}(Xl);Di.registerAbstraction(ql,Yl);var Kl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[asset ShadowFilteredMethod]",e}(Hl),Wl=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._shader.fragmentConstantData,n=this._fragmentConstantsIndex;e[n]=.5;var r=this._method.castingLight.shadowMapper.size;e[n+1]=r,e[n+2]=1/r},e.prototype._getFragmentCode=function(e,n,r){var i=n.getFreeFragmentConstant();this._fragmentConstantsIndex=4*i.index;var o="",a=n.getFreeFragmentVectorTemp();n.addFragmentTempUsages(a,1);var s=n.getFreeFragmentVectorTemp();return n.addFragmentTempUsages(s,1),o+="mov "+a+", "+this._baseChunk.depthMapCoordReg+"\n"+this._baseTexture._getFragmentCode(s,n,r,a)+"mov "+a+".w, "+s+".w\nadd "+a+".x, "+this._baseChunk.depthMapCoordReg+".x, "+i+".z\n"+this._baseTexture._getFragmentCode(s,n,r,a)+"mul "+s+".x, "+this._baseChunk.depthMapCoordReg+".x, "+i+".y\nfrc "+s+".x, "+s+".x\nsub "+s+".w, "+s+".w, "+a+".w\nmul "+s+".w, "+s+".w, "+s+".x\nadd "+e+".w, "+a+".w, "+s+".w\nmov "+a+".x, "+this._baseChunk.depthMapCoordReg+".x\nadd "+a+".y, "+this._baseChunk.depthMapCoordReg+".y, "+i+".z\n"+this._baseTexture._getFragmentCode(s,n,r,a)+"mov "+a+".w, "+s+".w\nadd "+a+".x, "+this._baseChunk.depthMapCoordReg+".x, "+i+".z\n"+this._baseTexture._getFragmentCode(s,n,r,a)+"mul "+s+".x, "+this._baseChunk.depthMapCoordReg+".x, "+i+".y\nfrc "+s+".x, "+s+".x\nsub "+s+".w, "+s+".w, "+a+".w\nmul "+s+".w, "+s+".w, "+s+".x\nadd "+a+".w, "+a+".w, "+s+".w\nmul "+s+".x, "+this._baseChunk.depthMapCoordReg+".y, "+i+".y\nfrc "+s+".x, "+s+".x\nsub "+a+".w, "+a+".w, "+e+".w\nmul "+a+".w, "+a+".w, "+s+".x\nadd "+e+".w, "+e+".w, "+a+".w\n",n.removeFragmentTempUsage(s),n.removeFragmentTempUsage(a),t.prototype._getFragmentCode.call(this,e,n,r),o},e}(Xl);Di.registerAbstraction(Wl,Kl);var Jl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[asset ShadowHardMethod]",e}(Hl),$l=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._getFragmentCode=function(e,n,r){var i=this._baseTexture._getFragmentCode(e,n,r,this._baseChunk.depthMapCoordReg);return i+=t.prototype._getFragmentCode.call(this,e,n,r)},e}(Xl);Di.registerAbstraction($l,Jl);var Zl=function(t){function e(e,n,r){void 0===n&&(n=5),void 0===r&&(r=1);var i=t.call(this,e)||this;return i.numSamples=n,i.range=r,i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return this._offsets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numSamples",{get:function(){return this._numSamples},set:function(t){this._numSamples=t,this._numSamples<1?this._numSamples=1:this._numSamples>32&&(this._numSamples=32),this._offsets=Y.getDistribution(this._numSamples),this.invalidateShaderProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(t){this._range=t},enumerable:!0,configurable:!0}),e.assetType="[asset ShadowSoftMethod]",e}(Hl),tc=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this),this._shader.fragmentConstantData[this._fragmentConstantsIndex]=1/this._method.numSamples,this._shader.fragmentConstantData[this._fragmentConstantsIndex+1]=0},e.prototype._activate=function(){t.prototype._activate.call(this);for(var e=.5*this._method.range/this._method.castingLight.shadowMapper.size,n=this._shader.fragmentConstantData,r=this._fragmentConstantsIndex+2,i=this._method.numSamples<<1,o=0;o>1,l=0;l0,t.needsView=this._shader.numLights>0,this._method.texture?(this._texture=this._method.texture.getAbstraction(this._shader),this._texture._initVO(t),this._shader.uvDependencies++):this._texture&&(this._texture=null)},e.prototype._initConstants=function(){this._method.texture&&this._texture._initConstants()},e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._totalLightColorReg=null,this._specularTexData=null,this._specularDataRegister=null},e.prototype._getFragmentPreLightingCode=function(t,e){var n="";return this._pIsFirstLight=!0,this._specularDataRegister=t.getFreeFragmentConstant(),this._specularDataIndex=4*this._specularDataRegister.index,this._texture&&(this._specularTexData=t.getFreeFragmentVectorTemp(),t.addFragmentTempUsages(this._specularTexData,1),n+=this._texture._getFragmentCode(this._specularTexData,t,e,e.uvVarying)),this._totalLightColorReg=t.getFreeFragmentVectorTemp(),t.addFragmentTempUsages(this._totalLightColorReg,1),n},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="add "+i+", "+t+", "+r.viewDirFragment+"\nnrm "+i+".xyz, "+i+"\ndp3 "+i+".w, "+r.normalFragment+", "+i+"\nsat "+i+".w, "+i+".w\n",this._texture?o+="mul "+this._specularTexData+".w, "+this._specularTexData+".y, "+this._specularDataRegister+".w\npow "+i+".w, "+i+".w, "+this._specularTexData+".w\n":o+="pow "+i+".w, "+i+".w, "+this._specularDataRegister+".w\n",this._shader.usesLightFallOff&&(o+="mul "+i+".w, "+i+".w, "+t+".w\n"),null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),o+="mul "+i+".xyz, "+e+", "+i+".w\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+i+"\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._getFragmentCodePerProbe=function(t,e,n,r){var i,o="";this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1));var a=r.normalFragment,s=r.viewDirFragment;return o+="dp3 "+i+".w, "+a+", "+s+"\nadd "+i+".w, "+i+".w, "+i+".w\nmul "+i+", "+i+".w, "+a+"\nsub "+i+", "+i+", "+s+"\ntex "+i+", "+i+", "+t+" \nmul "+i+".xyz, "+i+", "+e+"\n",null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+i+"\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e.prototype._getFragmentCode=function(t,e,n){var r="";return n.shadowTarget&&(r+="mul "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+n.shadowTarget+".w\n"),this._texture&&(r+="mul "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+this._specularTexData+".x\n",e.removeFragmentTempUsage(this._specularTexData)),r+="mul "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+", "+this._specularDataRegister+"\nadd "+t+".xyz, "+t+", "+this._totalLightColorReg+"\n",e.removeFragmentTempUsage(this._totalLightColorReg),r},e.prototype._activate=function(){if(this._texture&&this._texture.activate(),this._invalid){var t=this._specularDataIndex,e=this._shader.fragmentConstantData;e[t]=(this._method.color>>16&255)/255*this._method.strength,e[t+1]=(this._method.color>>8&255)/255*this._method.strength,e[t+2]=(255&this._method.color)/255*this._method.strength,e[t+3]=this._method.gloss}},e.prototype._setRenderState=function(t){this._texture&&this._texture._setRenderState(t)},e}(Qu);Di.registerAbstraction(nc,ec);var rc=function(t){function e(){return t.call(this)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[asset SpecularAnisotropicMethod]",e}(ec),ic=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsTangents=this._shader.numLights>0},e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";return this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1)),o+="nrm "+i+".xyz, "+r.tangentVarying+".xyz\ndp3 "+i+".w, "+i+".xyz, "+t+".xyz\ndp3 "+i+".z, "+i+".xyz, "+r.viewDirFragment+".xyz\n",o+="sin "+i+".x, "+i+".w\nsin "+i+".y, "+i+".z\nmul "+i+".x, "+i+".x, "+i+".y\ncos "+i+".z, "+i+".z\ncos "+i+".w, "+i+".w\nmul "+i+".w, "+i+".w, "+i+".z\nsub "+i+".w, "+i+".x, "+i+".w\n",this._texture?o+="mul "+this._specularTexData+".w, "+this._specularTexData+".y, "+this._specularDataRegister+".w\npow "+i+".w, "+i+".w, "+this._specularTexData+".w\n":o+="pow "+i+".w, "+i+".w, "+this._specularDataRegister+".w\n",o+="mul "+i+".w, "+i+".w, "+t+".w\n",null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),o+="mul "+i+".xyz, "+e+".xyz, "+i+".w\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+".xyz, "+i+".xyz\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e}(nc);Di.registerAbstraction(ic,rc);var oc=function(t){function e(e){return void 0===e&&(e=null),t.call(this,e)||this}return n(e,t),e.prototype.createBaseMethod=function(){return new ec},Object.defineProperty(e.prototype,"gloss",{get:function(){return this._baseMethod.gloss},set:function(t){this._baseMethod.gloss=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this._baseMethod.strength},set:function(t){this._baseMethod.strength=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._baseMethod.color},set:function(t){this._baseMethod.color=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._baseMethod.texture},set:function(t){this._baseMethod.texture=t},enumerable:!0,configurable:!0}),e}(ol),ac=function(t){function e(e,n,r){void 0===e&&(e=.5),void 0===n&&(n=.1),void 0===r&&(r=null);var i=t.call(this,r)||this;return i._specularCutOff=e,i._smoothness=n,i}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothness",{get:function(){return this._smoothness},set:function(t){this._smoothness!=t&&(this._smoothness=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specularCutOff",{get:function(){return this._specularCutOff},set:function(t){this._specularCutOff!=t&&(this._specularCutOff=t,this.invalidate())},enumerable:!0,configurable:!0}),e.assetType="[asset SpecularCelMethod]",e}(oc),sc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r._baseChunk._modulateFunction=function(t,e,n){return r.clampSpecular(t,e,n)},r}return n(e,t),e.prototype._activate=function(){if(t.prototype._activate.call(this),this._invalid){var e=this._cutoffDataIndex,n=this._shader.fragmentConstantData;n[e]=this._method.smoothness,n[e+1]=this._method.specularCutOff}},e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._cutoffDataRegister=null},e.prototype.clampSpecular=function(t,e,n){return"sub "+t+".y, "+t+".w, "+this._cutoffDataRegister+".y\ndiv "+t+".y, "+t+".y, "+this._cutoffDataRegister+".x\nsat "+t+".y, "+t+".y\nsge "+t+".w, "+t+".w, "+this._cutoffDataRegister+".y\nmul "+t+".w, "+t+".w, "+t+".y\n"},e.prototype._getFragmentPreLightingCode=function(e,n){return this._cutoffDataRegister=e.getFreeFragmentConstant(),this._cutoffDataIndex=4*this._cutoffDataRegister.index,t.prototype._getFragmentPreLightingCode.call(this,e,n)},e}(sl);Di.registerAbstraction(sc,ac);var uc=function(t){function e(e,n,r,i){void 0===e&&(e=!0),void 0===n&&(n=5),void 0===r&&(r=.028),void 0===i&&(i=null);var o=t.call(this,i)||this;return o._basedOnSurface=e,o._fresnelPower=n,o._normalReflectance=r,o}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"basedOnSurface",{get:function(){return this._basedOnSurface},set:function(t){this._basedOnSurface!=t&&(this._basedOnSurface=t,this.invalidateShaderProgram())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fresnelPower",{get:function(){return this._fresnelPower},set:function(t){this._fresnelPower!=t&&(this._fresnelPower=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normalReflectance",{get:function(){return this._normalReflectance},set:function(t){this._normalReflectance!=t&&(this._normalReflectance=t,this.invalidate())},enumerable:!0,configurable:!0}),e.assetType="[asset SpecularFresnelMethod]",e}(oc),lc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._method=e,r._shader=n,r._baseChunk._modulateFunction=function(t,e,n){return r.modulateSpecular(t,e,n)},r}return n(e,t),e.prototype._cleanCompilationData=function(){t.prototype._cleanCompilationData.call(this),this._fresnelDataRegister=null},e.prototype._activate=function(){if(t.prototype._activate.call(this),this._invalid){var e=this._shader.fragmentConstantData,n=this._fresnelDataIndex;e[n]=this._method.normalReflectance,e[n+1]=this._method.fresnelPower,e[n+2]=1,e[n+3]=0}},e.prototype._getFragmentPreLightingCode=function(e,n){return this._fresnelDataRegister=e.getFreeFragmentConstant(),this._fresnelDataIndex=4*this._fresnelDataRegister.index,t.prototype._getFragmentPreLightingCode.call(this,e,n)},e.prototype.modulateSpecular=function(t,e,n){return"dp3 "+t+".y, "+n.viewDirFragment+".xyz, "+(this._method.basedOnSurface?n.normalFragment:t)+".xyz\nsub "+t+".y, "+this._fresnelDataRegister+".z, "+t+".y\npow "+t+".x, "+t+".y, "+this._fresnelDataRegister+".y\nsub "+t+".y, "+this._fresnelDataRegister+".z, "+t+".y\nmul "+t+".y, "+this._fresnelDataRegister+".x, "+t+".y\nadd "+t+".y, "+t+".x, "+t+".y\nmul "+t+".w, "+t+".w, "+t+".y\n"},e}(sl);Di.registerAbstraction(lc,uc);var cc=function(t){function e(){return t.call(this)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[asset SpecularPhongMethod]",e}(ec),hc=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype._getFragmentCodePerLight=function(t,e,n,r){var i,o="";this._pIsFirstLight?i=this._totalLightColorReg:(i=n.getFreeFragmentVectorTemp(),n.addFragmentTempUsages(i,1));var a=r.viewDirFragment,s=r.normalFragment;return o+="dp3 "+i+".w, "+t+", "+s+"\nadd "+i+".w, "+i+".w, "+i+".w\nmul "+i+".xyz, "+s+", "+i+".w\nsub "+i+".xyz, "+i+", "+t+"\nadd "+i+".w, "+i+".w, "+r.commons+".w\nsat "+i+".w, "+i+".w\nmul "+i+".xyz, "+i+", "+i+".w\ndp3 "+i+".w, "+i+", "+a+"\nsat "+i+".w, "+i+".w\n",this._texture?o+="mul "+this._specularTexData+".w, "+this._specularTexData+".y, "+this._specularDataRegister+".w\npow "+i+".w, "+i+".w, "+this._specularTexData+".w\n":o+="pow "+i+".w, "+i+".w, "+this._specularDataRegister+".w\n",this._shader.usesLightFallOff&&(o+="mul "+i+".w, "+i+".w, "+t+".w\n"),null!=this._modulateFunction&&(o+=this._modulateFunction(i,n,r)),o+="mul "+i+".xyz, "+e+".xyz, "+i+".w\n",this._pIsFirstLight||(o+="add "+this._totalLightColorReg+".xyz, "+this._totalLightColorReg+".xyz, "+i+".xyz\n",n.removeFragmentTempUsage(i)),this._pIsFirstLight=!1,o},e}(nc);Di.registerAbstraction(hc,cc);var pc=function(){function t(){}return t.LIGHTS=1,t.PROBES=2,t.ALL=3,t}(),dc=function(t){function e(e,n){var r=t.call(this)||this;return r._preserveAlpha=!0,r._forceSeparateMVP=!1,r._renderMaterial=e,r._renderElements=n,r._stage=n.stage,r}return n(e,t),Object.defineProperty(e.prototype,"shader",{get:function(){return this._shader},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preserveAlpha",{get:function(){return this._preserveAlpha},set:function(t){this._preserveAlpha!=t&&(this._preserveAlpha=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forceSeparateMVP",{get:function(){return this._forceSeparateMVP},set:function(t){this._forceSeparateMVP!=t&&(this._forceSeparateMVP=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.invalidate=function(){this._shader.invalidateProgram(),this.dispatchEvent(new Ti(Ti.INVALIDATE,this))},e.prototype.dispose=function(){this._renderMaterial=null,this._renderElements=null,this._stage=null,this._shader&&(this._shader.dispose(),this._shader=null)},e.prototype._setRenderState=function(t){this._shader._setRenderState(t)},e.prototype._activate=function(){this._shader._activate()},e.prototype._deactivate=function(){this._shader._deactivate()},e.prototype._includeDependencies=function(t){t.alphaThreshold=this._renderMaterial.material.alphaThreshold,t.useImageRect=this._renderMaterial.material.imageRect,t.usesCurves=this._renderMaterial.material.curves,t.useBothSides=this._renderMaterial.material.bothSides,t.usesUVTransform=this._renderMaterial.material.animateUVs,t.usesColorTransform=this._renderMaterial.material.useColorTransform,this._forceSeparateMVP&&this._shader.globalPosDependencies++},e.prototype._initConstantData=function(){},e.prototype._getVertexCode=function(t,e){return""},e.prototype._getFragmentCode=function(t,e){return""},e.prototype._getPostAnimationFragmentCode=function(t,e){return""},e.prototype._getNormalVertexCode=function(t,e){return""},e.prototype._getNormalFragmentCode=function(t,e){return""},e}(c),fc=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o._includeCasters=!0,o._lightingPass=r,o}return n(e,t),e.prototype._includeDependencies=function(){this.numPointLights=this._lightingPass.numPointLights,this.numDirectionalLights=this._lightingPass.numDirectionalLights,this.numLightProbes=this._lightingPass.numLightProbes;var e=this._lightingPass.numPointLights+this._lightingPass.numDirectionalLights,n=this._lightingPass.numLightProbes,r=this._lightingPass._iUsesDiffuse(this)?this._lightingPass.diffuseLightSources:0,i=this._lightingPass._iUsesSpecular(this)?this._lightingPass.specularLightSources:0,o=r|i;this.usesLightFallOff=this._lightingPass.enableLightFallOff&&this.profile!=Jt.BASELINE_CONSTRAINED,this.usesCommonData=this.usesLightFallOff||this.usesCommonData,this.numLights=e+n,this.usesLights=e>0&&0!=(o&pc.LIGHTS),this.usesProbes=n>0&&0!=(o&pc.PROBES),this.usesLightsForSpecular=e>0&&0!=(i&pc.LIGHTS),this.usesProbesForSpecular=n>0&&0!=(i&pc.PROBES),this.usesLightsForDiffuse=e>0&&0!=(r&pc.LIGHTS),this.usesProbesForDiffuse=n>0&&0!=(r&pc.PROBES),this.usesShadows=this._lightingPass._iUsesShadows(this),t.prototype._includeDependencies.call(this)},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._lightingPass.lightPicker&&this._lightingPass.lightPicker.collectLights(e.node),this.usesLights&&this.updateLights(),this.usesProbes&&this.updateProbes()},e.prototype._initRegisterIndices=function(){if(t.prototype._initRegisterIndices.call(this),this.lightVertexConstantIndex=-1,this.lightFragmentConstantIndex=-1,this.probeWeightsIndex=-1,this._numProbeRegisters=Math.ceil(this.numLightProbes/4),this.usesTangentSpace||!this.usesGlobalPosFragment?(this._pointLightVertexConstants=new Array(this.numPointLights),this._pointLightFragmentConstants=new Array(2*this.numPointLights)):(this._pointLightVertexConstants=null,this._pointLightFragmentConstants=new Array(3*this.numPointLights)),this.usesTangentSpace?(this._dirLightVertexConstants=new Array(this.numDirectionalLights),this._dirLightFragmentConstants=new Array(2*this.numDirectionalLights)):(this._dirLightVertexConstants=null,this._dirLightFragmentConstants=new Array(3*this.numDirectionalLights)),this.usesLights){var e=void 0,n=void 0;if(this._dirLightVertexConstants)for(n=this._dirLightVertexConstants.length,e=0;e0?this._sharedRegisters.shadowTarget=this._sharedRegisters.normalFragment:(this._sharedRegisters.shadowTarget=this._registerCache.getFreeFragmentVectorTemp(),this._registerCache.addFragmentTempUsages(this._sharedRegisters.shadowTarget,1))},e.prototype._compileLightCode=function(){for(var t,e,n,r,i=0,o=0,a=this.usesLightsForSpecular,s=this.usesLightsForDiffuse,u=0;u(n=this._lightingPass.lightPicker.directionalLights.length)&&(c=1,o-=n);cthis.numDirectionalLights&&(n=this.numDirectionalLights),a=0;au)for(a=s+12*(this.numDirectionalLights-u);s(n=this._lightingPass.lightPicker.pointLights.length)?(c=1,o-=n):c=0;cu)for(a=s+12*(u-this.numPointLights);sthis.numLightProbes&&(r=this.numLightProbes);for(var a=0;athis._numEffectDependencies-1?null:this._methods[t+this._methods.length-this._numEffectDependencies]},e.prototype.addEffectMethodAt=function(t,e){this._addDependency(t,!0,e)},e.prototype.removeEffectMethod=function(t){this._removeDependency(t,!0)},e.prototype.removeEffectMethodAt=function(t){var e=this.getEffectMethodAt(t);null!=e&&this._removeDependency(e,!0)},Object.defineProperty(e.prototype,"normalMethod",{get:function(){return this._normalMethod},set:function(t){this._normalMethod!=t&&(this._normalMethod&&(this._removeDependency(this._normalMethod),this._normalChunk=null),this._normalMethod=t,t&&(this._normalChunk=t.getAbstraction(this._shader),this._addDependency(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ambientMethod",{get:function(){return this._ambientMethod},set:function(t){this._ambientMethod!=t&&(this._ambientMethod&&(this._removeDependency(this._ambientMethod),this._ambientChunk=null),this._ambientMethod=t,t&&(this._ambientChunk=t.getAbstraction(this._shader),this._addDependency(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowMethod",{get:function(){return this._shadowMethod},set:function(t){this._shadowMethod!=t&&(this._shadowMethod&&(this._removeDependency(this._shadowMethod),this._shadowChunk=null),this._shadowMethod=t,t&&(this._shadowChunk=t.getAbstraction(this._shader),this._addDependency(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diffuseMethod",{get:function(){return this._diffuseMethod},set:function(t){this._diffuseMethod!=t&&(this._diffuseMethod&&(this._removeDependency(this._diffuseMethod),this._diffuseChunk=null),t&&(this._diffuseChunk=t.getAbstraction(this._shader),this._addDependency(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specularMethod",{get:function(){return this._specularMethod},set:function(t){this._specularMethod!=t&&(this._specularMethod&&(this._removeDependency(this._specularMethod),this._specularChunk=null),t&&(this._specularChunk=t.getAbstraction(this._shader),this._addDependency(t)))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(this._lightPicker&&this._lightPicker.removeEventListener(l.INVALIDATE,this._onLightsChangeDelegate);this._methods.length;)this._removeDependency(this._methods[0]);t.prototype.dispose.call(this),this._chunks=null,this._methods=null},e.prototype.onMethodInvalidated=function(t){this.invalidate()},e.prototype._activate=function(){var e;t.prototype._activate.call(this);for(var n=this._chunks.length,r=0;r0?e.globalPosDependencies++:this.numPointLights>0&&e.usesLights&&(e.globalPosDependencies++,this._mode&gc.EFFECTS&&(e.usesGlobalPosFragment=!0)))},e.prototype.setupAndCountDependencies=function(t,e){var n=e.chunkVO;e._reset(n),e._initVO(n),n.needsProjection&&t.projectionDependencies++,(n.needsGlobalVertexPos||n.needsGlobalFragmentPos)&&(t.globalPosDependencies++,n.needsGlobalFragmentPos&&(t.usesGlobalPosFragment=!0)),n.needsNormals&&t.normalDependencies++,n.needsTangents&&t.tangentDependencies++,n.needsView&&t.viewDirDependencies++},e.prototype._getPreLightingVertexCode=function(t,e){return""},e.prototype._getPreLightingFragmentCode=function(t,e){var n="";return this._diffuseChunk&&this._diffuseChunk.chunkVO.useChunk&&(n+=this._diffuseChunk._getFragmentPreLightingCode(t,e)),this._specularChunk&&this._specularChunk.chunkVO.useChunk&&(n+=this._specularChunk._getFragmentPreLightingCode(t,e)),n},e.prototype._getPerLightDiffuseFragmentCode=function(t,e,n,r){return this._diffuseChunk._getFragmentCodePerLight(t,e,n,r)},e.prototype._getPerLightSpecularFragmentCode=function(t,e,n,r){return this._specularChunk._getFragmentCodePerLight(t,e,n,r)},e.prototype._getPerProbeDiffuseFragmentCode=function(t,e,n,r){return this._diffuseChunk._getFragmentCodePerProbe(t,e,n,r)},e.prototype._getPerProbeSpecularFragmentCode=function(t,e,n,r){return this._specularChunk._getFragmentCodePerProbe(t,e,n,r)},e.prototype._getNormalVertexCode=function(t,e){return this._normalChunk._getVertexCode(t,e)},e.prototype._getNormalFragmentCode=function(t,e){var n=this._normalChunk._getFragmentCode(e.normalFragment,t,e);return this._normalChunk.chunkVO.needsView&&t.removeFragmentTempUsage(e.viewDirFragment),(this._normalChunk.chunkVO.needsGlobalFragmentPos||this._normalChunk.chunkVO.needsGlobalVertexPos)&&t.removeVertexTempUsage(e.globalPositionVertex),n},e.prototype._getVertexCode=function(t,e){var n,r="";this._ambientChunk&&this._ambientChunk.chunkVO.useChunk&&(r+=this._ambientChunk._getVertexCode(t,e)),this._shadowChunk&&(r+=this._shadowChunk._getVertexCode(t,e)),this._diffuseChunk&&this._diffuseChunk.chunkVO.useChunk&&(r+=this._diffuseChunk._getVertexCode(t,e)),this._specularChunk&&this._specularChunk.chunkVO.useChunk&&(r+=this._specularChunk._getVertexCode(t,e));for(var i=this._chunks.length,o=i-this._numEffectDependencies;o0&&(n=t.getFreeFragmentSingleTemp(),t.addFragmentTempUsages(n,1),i+="mov "+n+", "+e.shadedTarget+".w\n");for(var o=this._chunks.length,a=o-this._numEffectDependencies;a0&&(i+="mov "+e.shadedTarget+".w, "+n+"\n",t.removeFragmentTempUsage(n)),this._colorTransformChunk&&this._colorTransformChunk.chunkVO.useChunk&&(i+=this._colorTransformChunk._getFragmentCode(e.shadedTarget,t,e)),i},e.prototype._iUsesShadows=function(t){return Boolean(this._shadowChunk&&(this._lightPicker.castingDirectionalLights.length>0||this._lightPicker.castingPointLights.length>0))},e.prototype._iUsesSpecular=function(t){return Boolean(this._specularChunk)},e.prototype._iUsesDiffuse=function(t){return Boolean(this._diffuseChunk)},e.prototype.onLightsChange=function(t){this._updateLights()},e.prototype._updateLights=function(){var t=this.numDirectionalLights,e=this.numPointLights,n=this.numLightProbes;this._lightPicker&&this._mode&gc.LIGHTING?(this.numDirectionalLights=this.calculateNumDirectionalLights(this._lightPicker.numDirectionalLights),this.numPointLights=this.calculateNumPointLights(this._lightPicker.numPointLights),this.numLightProbes=this.calculateNumProbes(this._lightPicker.numLightProbes),this._includeCasters&&(this.numDirectionalLights+=this._lightPicker.numCastingDirectionalLights,this.numPointLights+=this._lightPicker.numCastingPointLights)):(this.numDirectionalLights=0,this.numPointLights=0,this.numLightProbes=0),t==this.numDirectionalLights&&e==this.numPointLights&&n==this.numLightProbes||(this._updateShader(),this.invalidate())},e.prototype.calculateNumDirectionalLights=function(t){return Math.min(t-this.directionalLightsOffset,this._maxLights)},e.prototype.calculateNumPointLights=function(t){var e=this._maxLights-this.numDirectionalLights;return Math.min(t-this.pointLightsOffset,e)},e.prototype.calculateNumProbes=function(t){var e=0;return 0!=(this._renderMaterial.specularLightSources&pc.PROBES)&&++e,0!=(this._renderMaterial.diffuseLightSources&pc.PROBES)&&++e,Math.min(t-this.lightProbesOffset,4/e|0)},e}(dc),mc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._diffuseR=1,r._diffuseG=1,r._diffuseB=1,r._diffuseA=1,r._shader=new Di(n,e,r,r._stage),r.invalidate(),r}return n(e,t),e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),null!=this._shaderTexture&&e.uvDependencies++},e.prototype.invalidate=function(){t.prototype.invalidate.call(this);var e=this._renderMaterial.material.getTextureAt(0);this._shaderTexture=e?e.getAbstraction(this._shader):null},e.prototype.dispose=function(){this._shaderTexture&&(this._shaderTexture.onClear(new l(l.CLEAR,this._renderMaterial.material.getTextureAt(0))),this._shaderTexture=null),t.prototype.dispose.call(this)},e.prototype._getFragmentCode=function(t,e){var n,r="";this.preserveAlpha&&(n=t.getFreeFragmentSingleTemp(),t.addFragmentTempUsages(n,1),r+="mov "+n+", "+e.shadedTarget+".w\n");var i=e.shadedTarget;if(null!=this._shaderTexture){if(r+=this._shaderTexture._getFragmentCode(i,t,e,e.uvVarying),this._shader.alphaThreshold>0){var o=t.getFreeFragmentConstant();this._fragmentConstantsIndex=4*o.index,r+="sub "+i+".w, "+i+".w, "+o+".x\nkil "+i+".w\nadd "+i+".w, "+i+".w, "+o+".x\n"}}else if(-1!=this._shader.colorBufferIndex)r+="mov "+i+", "+e.colorVarying+"\n";else{var a=t.getFreeFragmentConstant();this._fragmentConstantsIndex=4*a.index,r+="mov "+i+", "+a+"\n"}return this.preserveAlpha&&(r+="mul "+e.shadedTarget+".w, "+e.shadedTarget+".w, "+n+"\n",t.removeFragmentTempUsage(n)),r},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),null!=this._shaderTexture&&this._shaderTexture._setRenderState(e)},e.prototype._activate=function(){if(t.prototype._activate.call(this),null!=this._shaderTexture)this._shaderTexture.activate(),this._shader.alphaThreshold>0&&(this._shader.fragmentConstantData[this._fragmentConstantsIndex]=this._shader.alphaThreshold);else if(-1==this._shader.colorBufferIndex){var e=this._fragmentConstantsIndex,n=this._shader.fragmentConstantData;n[e]=this._diffuseR,n[e+1]=this._diffuseG,n[e+2]=this._diffuseB,n[e+3]=this._diffuseA}},e}(dc),yc=function(t){function e(e){var n=t.call(this)||this;return n._onCastShadowChangeDelegate=function(t){return n.onCastShadowChange(t)},n.lights=e,n}return n(e,t),Object.defineProperty(e.prototype,"lights",{get:function(){return this._lights},set:function(t){var e,n=0,r=0,i=0,o=0,a=0;this._lights&&this.clearListeners(),this._lights=t,this._allPickedLights=t,this._pointLights=new Array,this._castingPointLights=new Array,this._directionalLights=new Array,this._castingDirectionalLights=new Array,this._lightProbes=new Array;for(var s=t.length,u=0;u1e-5?1/o:5e7,this._lightProbeWeights[a]=o,h+=o;for(h=1/h,a=0;a4)throw new Error("numCascades must be an integer between 1 and 4");return r._numCascades=n,r.init(),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._image2D.removeEventListener(l.CLEAR,this._onClearDelegate),t.prototype.dispose.call(this)},e.prototype.getSplitRatio=function(t){return this._splitRatios[t]},e.prototype.setSplitRatio=function(t,e){if(e<0?e=0:e>1&&(e=1),t>=this._numCascades)throw new Error("index must be smaller than the number of cascades!");this._splitRatios[t]=e},e.prototype.getDepthProjections=function(t){return this._depthProjections[t].viewMatrix3D},e.prototype.init=function(){this._splitRatios=new Array(this._numCascades),this._nearPlaneDistances=new Array(this._numCascades);for(var t=1,e=this._numCascades-1;e>=0;--e)this._splitRatios[e]=t,t*=.4;for(this._texOffsetsX=Array(-1,1,-1,1),this._texOffsetsY=Array(1,1,-1,-1),this._pScissorRects=new Array(4),this._depthProjections=new Array,e=0;e4)throw new Error("numCascades must be an integer between 1 and 4");this._numCascades=t,this._scissorRectsInvalid=!0,this.init(),this.dispatchEvent(new l(l.INVALIDATE,this))}},enumerable:!0,configurable:!0}),e.prototype._renderMap=function(t,e){this._scissorRectsInvalid&&this.updateScissorRects()},e.prototype.updateScissorRects=function(){var t=.5*this._image2D.width;this._pScissorRects[0]=new q(0,0,t,t),this._pScissorRects[1]=new q(t,0,t,t),this._pScissorRects[2]=new q(0,t,t,t),this._pScissorRects[3]=new q(t,t,t,t),this._scissorRectsInvalid=!1},e.prototype._updateProjection=function(t){var e,n=t.near,r=t.far-n;this._updateProjectionFromFrustumCorners(t,t.viewFrustumCorners,this._matrix),this._matrix.appendScale(.96,.96,1),this._overallDepthProjection.frustumMatrix3D=this._matrix,this._updateCullPlanes(t);for(var i=0;ip&&(p=i),(o=this._localFrustum[g+1])d&&(d=o),(a=this._localFrustum[g+2])>f&&(f=a),(s=i+(this._localFrustum[g+12]-i)*e)p&&(p=s),(u=o+(this._localFrustum[g+13]-o)*e)d&&(d=u),(l=a+(this._localFrustum[g+14]-a)*e)>f&&(f=l),g+=3;var _=p-c,m=d-h,y=1/(f-1);c<0&&(c-=this._snap),h<0&&(h-=this._snap),c=Math.floor(c/this._snap)*this._snap,h=Math.floor(h/this._snap)*this._snap;var A=2*this._snap;p=c+(_=Math.floor(_/A+1)*A),d=h+(m=Math.floor(m/A+1)*A),_=1/_,m=1/m;var v=t._rawData;v[0]=2*_,v[5]=2*m,v[10]=y,v[12]=-(p+c)*_,v[13]=-(d+h)*m,v[14]=-1*y,v[15]=1,v[1]=v[2]=v[3]=v[4]=v[6]=v[7]=v[8]=v[9]=v[11]=0,t.appendScale(.96,.96,1),t.appendTranslation(n,r,0),t.appendScale(.5,.5,1)},Object.defineProperty(e.prototype,"_iNearPlaneDistances",{get:function(){return this._nearPlaneDistances},enumerable:!0,configurable:!0}),e.assetType="[asset CascadeShadowMapper]",e}(Hu),vc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsProjection=!0},e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._shader.fragmentConstantData,n=this._shader.vertexConstantData,r=this._fragmentConstantsIndex;e[r]=1,e[r+1]=1/255,e[r+2]=1/65025,e[r+3]=1/16581375,e[r+6]=.5,e[r+7]=-.5,n[r=this._vertexConstantsIndex]=.5,n[r+1]=-.5,n[r+2]=0;var i=this._mapper.numCascades;this._projectionMatrices=new Array(i);for(var o=0;o=0;--h){var p=this._depthMapCoordVaryings[h];r+="slt "+l+".z, "+n.projectionFragment+".z, "+u[h]+"\n";var d=e.getFreeFragmentVectorTemp();r+="sub "+d+", "+p+", "+c+"\nmul "+d+", "+d+", "+l+".z\nadd "+c+", "+c+", "+d+"\n"}return e.removeFragmentTempUsage(l),r+="div "+c+", "+c+", "+c+".w\nmul "+c+".xy, "+c+".xy, "+a+".zw\nadd "+c+".xy, "+c+".xy, "+a+".zz\n",e.removeFragmentTempUsage(c),r},e.prototype._activate=function(){this._shader.vertexConstantData[this._vertexConstantsIndex+3]=-1/(this._mapper.depth*this._mapper.epsilon);for(var t=this._mapper.numCascades,e=0;e1?t=1:t<0&&(t=0),this._coverageRatio=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fadeRatio",{get:function(){return this._fadeRatio},set:function(t){this._fadeRatio=t},enumerable:!0,configurable:!0}),e.prototype._updateProjection=function(t){for(var e=t.viewFrustumCorners,n=0;n<12;++n){var r=e[n];this._localFrustum[n]=r,this._localFrustum[n+12]=r+(e[n+12]-r)*this._coverageRatio}this._updateProjectionFromFrustumCorners(t,this._localFrustum,this._matrix),this._overallDepthProjection.frustumMatrix3D=this._matrix},e.assetType="[asset NearDirectionalShadowMapper]",e}(Hu),Cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._initConstants=function(){t.prototype._initConstants.call(this);var e=this._shader.fragmentConstantData,n=this._fragmentDistanceIndex;e[n+2]=0,e[n+3]=1},e.prototype._initVO=function(e){t.prototype._initVO.call(this,e),e.needsProjection=!0},e.prototype._getFragmentCode=function(e,n,r){var i=t.prototype._getFragmentCode.call(this,e,n,r),o=n.getFreeFragmentConstant(),a=n.getFreeFragmentSingleTemp();return this._fragmentDistanceIndex=4*o.index,i+="abs "+a+", "+r.projectionFragment+".w\nsub "+a+", "+a+", "+o+".x\nmul "+a+", "+a+", "+o+".y\nsat "+a+", "+a+"\nsub "+a+", "+o+".w,"+a+"\nsub "+e+".w, "+o+".w,"+e+".w\nmul "+e+".w, "+e+".w, "+a+"\nsub "+e+".w, "+o+".w,"+e+".w\n"},e.prototype._setRenderState=function(e){var n=this._shader.view.projection.near,r=this._shader.view.projection.far-n,i=this._mapper.coverageRatio,o=i*(1-this._mapper.fadeRatio);i=n+i*r,o=n+o*r;var a=this._shader.fragmentConstantData,s=this._fragmentDistanceIndex;a[s]=o,a[s+1]=1/(i-o),t.prototype._setRenderState.call(this,e)},e}(Xu);Di.registerAbstraction(Cc,bc);var Ic=function(t){function e(e){return void 0===e&&(e=null),t.call(this,e)||this}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.assetType="[texture DepthTexture2D]",e}(go);Di.registerAbstraction(ku,Ic);var Ec=function(t){function e(e,n){void 0===e&&(e=16777215),void 0===n&&(n=1);var r=t.call(this)||this;return r._textures=new Array,r._pUseColorTransform=!1,r._alphaBlending=!1,r._alpha=1,r._pAlphaThreshold=0,r._pAnimateUVs=!1,r._style=new Qi,r._iBaseScreenPassIndex=0,r._bothSides=!1,r._pBlendMode=pn.NORMAL,r._imageRect=!1,r._curves=!1,r._onInvalidatePropertiesDelegate=function(t){return r._onInvalidateProperties(t)},r._style.addEventListener(Vi.INVALIDATE_PROPERTIES,r._onInvalidatePropertiesDelegate),e instanceof Ne?r._style.image=e:r._style.color=Number(e),r.alpha=n,r._onTextureInvalidateDelegate=function(t){return r.onTextureInvalidate(t)},r}return n(e,t),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){t>1?t=1:t<0&&(t=0),this._alpha!=t&&(this._alpha=t,null==this._colorTransform&&(this._colorTransform=new w),this._colorTransform.alphaMultiplier=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorTransform",{get:function(){return this._colorTransform},set:function(t){this._colorTransform=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alphaBlending",{get:function(){return this._alphaBlending},set:function(t){this._alphaBlending!=t&&(this._alphaBlending=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"curves",{get:function(){return this._curves},set:function(t){this._curves!=t&&(this._curves=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageRect",{get:function(){return this._imageRect},set:function(t){this._imageRect!=t&&(this._imageRect=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(t){this._style!=t&&(this._style&&this._style.removeEventListener(Vi.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this._style=t,this._style&&this._style.addEventListener(Vi.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animateUVs",{get:function(){return this._pAnimateUVs},set:function(t){this._pAnimateUVs!=t&&(this._pAnimateUVs=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useColorTransform",{get:function(){return this._pUseColorTransform},set:function(t){this._pUseColorTransform!=t&&(this._pUseColorTransform=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bothSides",{get:function(){return this._bothSides},set:function(t){this._bothSides!=t&&(this._bothSides=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._pBlendMode},set:function(t){this._pBlendMode!=t&&(this._pBlendMode=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alphaThreshold",{get:function(){return this._pAlphaThreshold},set:function(t){t<0?t=0:t>1&&(t=1),this._pAlphaThreshold!=t&&(this._pAlphaThreshold=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),e.prototype.getNumTextures=function(){return this._textures.length},e.prototype.getTextureAt=function(t){return this._textures[t]},e.prototype.dispose=function(){this.clear()},e.prototype.invalidatePasses=function(){this.dispatchEvent(new Pi(Pi.INVALIDATE_PASSES,this))},e.prototype.invalidateTextures=function(){this.dispatchEvent(new Pi(Pi.INVALIDATE_TEXTURES,this))},e.prototype.addTextureAt=function(t,e){var n=this._textures.indexOf(t);n!=e&&(-1!=n&&this._textures.splice(n,1),this._textures.splice(e,0,t),t.addEventListener(l.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate())},e.prototype.addTexture=function(t){-1==this._textures.indexOf(t)&&(this._textures.push(t),t.addEventListener(l.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate())},e.prototype.removeTexture=function(t){this._textures.splice(this._textures.indexOf(t),1),t.removeEventListener(l.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},e.prototype.onTextureInvalidate=function(t){this.invalidatePasses(),this.invalidateTextures()},e.prototype._onInvalidateProperties=function(t){this.invalidatePasses(),this.invalidateTextures()},e}(d),xc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._shader=new Di(n,r,r,r._stage),r._pAddPass(r),r.invalidate(),r}return n(e,t),e.prototype.invalidate=function(){t.prototype.invalidate.call(this);var e=this._material.getTextureAt(0);this._shaderTexture=e?e.getAbstraction(this._shader):null},e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),e.projectionDependencies++,e.alphaThreshold>0&&e.uvDependencies++},e.prototype._initConstantData=function(){var t=this._fragmentConstantsIndex,e=this._shader.fragmentConstantData;e[t]=1,e[t+1]=255,e[t+2]=65025,e[t+3]=16581375,e[t+4]=1/255,e[t+5]=1/255,e[t+6]=1/255,e[t+7]=0},e.prototype._getFragmentCode=function(t,e){var n="",r=e.shadedTarget,i=t.getFreeFragmentConstant(),o=t.getFreeFragmentConstant();this._fragmentConstantsIndex=4*i.index;var a=t.getFreeFragmentVectorTemp();t.addFragmentTempUsages(a,1);var s=t.getFreeFragmentVectorTemp();if(t.addFragmentTempUsages(s,1),n+="div "+a+", "+e.projectionFragment+", "+e.projectionFragment+".w\nmul "+a+", "+i+", "+a+".z\nfrc "+a+", "+a+"\nmul "+s+", "+a+".yzww, "+o+"\n",this._shaderTexture&&this._shader.alphaThreshold>0){var u=t.getFreeFragmentVectorTemp();n+=this._shaderTexture._getFragmentCode(u,t,e,e.uvVarying),n+="sub "+u+".w, "+u+".w, "+t.getFreeFragmentConstant()+".x\nkil "+u+".w\n"}return n+="sub "+r+", "+a+", "+s+"\n",t.removeFragmentTempUsage(a),t.removeFragmentTempUsage(s),n},e.prototype._activate=function(){t.prototype._activate.call(this),this._shaderTexture&&this._shader.alphaThreshold>0&&(this._shaderTexture.activate(),this._shader.fragmentConstantData[this._fragmentConstantsIndex+8]=this._shader.alphaThreshold)},e}(Oi),wc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._shader=new Di(n,r,r,r._stage),r._pAddPass(r),r.invalidate(),r}return n(e,t),e.prototype.invalidate=function(){t.prototype.invalidate.call(this);var e=this._material.getTextureAt(0);this._shaderTexture=e?e.getAbstraction(this._shader):null},e.prototype._initConstantData=function(){var t=this._fragmentConstantsIndex,e=this._shader.fragmentConstantData;e[t+4]=1/255,e[t+5]=1/255,e[t+6]=1/255,e[t+7]=0},e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),e.projectionDependencies++,e.viewDirDependencies++,e.alphaThreshold>0&&e.uvDependencies++,e.viewDirDependencies>0&&e.globalPosDependencies++},e.prototype._getFragmentCode=function(t,e){var n,r=e.shadedTarget,i=t.getFreeFragmentConstant(),o=t.getFreeFragmentConstant();this._fragmentConstantsIndex=4*i.index;var a=t.getFreeFragmentVectorTemp();t.addFragmentTempUsages(a,1);var s=t.getFreeFragmentVectorTemp();if(t.addFragmentTempUsages(s,1),n="dp3 "+a+".z, "+e.viewDirVarying+".xyz, "+e.viewDirVarying+".xyz\nmul "+a+", "+i+", "+a+".z\nfrc "+a+", "+a+"\nmul "+s+", "+a+".yzww, "+o+"\n",this._shaderTexture&&this._shader.alphaThreshold>0){var u=t.getFreeFragmentVectorTemp();n+=this._shaderTexture._getFragmentCode(u,t,e,e.uvVarying),n+="sub "+u+".w, "+u+".w, "+t.getFreeFragmentConstant()+".x\nkil "+u+".w\n"}return n+="sub "+r+", "+a+", "+s+"\n"},e.prototype._activate=function(){t.prototype._activate.call(this);var e=this._shader.view.projection.far;e=1/(2*e*e);var n=this._fragmentConstantsIndex,r=this._shader.fragmentConstantData;r[n]=1*e,r[n+1]=255*e,r[n+2]=65025*e,r[n+3]=16581375*e,this._shaderTexture&&this._shader.alphaThreshold>0&&(this._shaderTexture.activate(),r[n+8]=this._shader.alphaThreshold)},e}(Oi),Sc=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=1);var r=t.call(this,e,n)||this;return r._preserveAlpha=!1,e instanceof Ne&&(r.texture=new go),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preserveAlpha",{get:function(){return this._preserveAlpha},set:function(t){this._preserveAlpha!=t&&(this._preserveAlpha=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.removeTexture(this._texture),this._texture=t,this._texture&&this.addTexture(this._texture))},enumerable:!0,configurable:!0}),e.assetType="[materials BasicMaterial]",e}(Ec),Dc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._basicMaterial=e,r._pAddPass(r._pass=new mc(r,n)),r}return n(e,t),e.prototype.onClear=function(e){t.prototype.onClear.call(this,e),this._basicMaterial=null},e.prototype._pUpdateRender=function(){t.prototype._pUpdateRender.call(this),this.requiresBlending=this._basicMaterial.blendMode!=pn.NORMAL||this._basicMaterial.alphaBlending||this._basicMaterial.colorTransform&&this._basicMaterial.colorTransform.alphaMultiplier<1,this._pass.preserveAlpha=this._basicMaterial.preserveAlpha,this._pass.shader.setBlendMode(this._basicMaterial.blendMode==pn.NORMAL&&this.requiresBlending?pn.LAYER:this._basicMaterial.blendMode)},e}(Bi);mo.registerMaterial(Dc,Sc),Co.registerMaterial(Dc,Sc),Ao.registerMaterial(xc,Sc),vo.registerMaterial(wc,Sc),Ni.setDefaultMaterialClass(Sc);var Tc=function(){function t(){}return t.SINGLE_PASS="singlePass",t.MULTI_PASS="multiPass",t}(),Pc=function(t){function e(e,n){void 0===e&&(e=16777215),void 0===n&&(n=1);var r=t.call(this,e,n)||this;return r._effectMethods=new Array,r._enableLightFallOff=!0,r._specularLightSources=1,r._diffuseLightSources=3,r._ambientMethod=new el,r._diffuseMethod=new ul,r._normalMethod=new Ul,r._specularMethod=new ec,r._depthCompareMode=qt.LESS_EQUAL,r._mode=Tc.SINGLE_PASS,r._ambientMethod.iAddOwner(r),r._diffuseMethod.iAddOwner(r),r._normalMethod.iAddOwner(r),r._specularMethod.iAddOwner(r),r._onLightChangeDelegate=function(t){return r.onLightsChange(t)},e instanceof Ne&&(r._ambientMethod.texture=new go),r}return n(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lightPicker",{get:function(){return this._pLightPicker},set:function(t){this._pLightPicker!=t&&(this._pLightPicker&&this._pLightPicker.removeEventListener(l.INVALIDATE,this._onLightChangeDelegate),this._pLightPicker=t,this._pLightPicker&&this._pLightPicker.addEventListener(l.INVALIDATE,this._onLightChangeDelegate),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableLightFallOff",{get:function(){return this._enableLightFallOff},set:function(t){this._enableLightFallOff!=t&&(this._enableLightFallOff=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diffuseLightSources",{get:function(){return this._diffuseLightSources},set:function(t){this._diffuseLightSources!=t&&(this._diffuseLightSources=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specularLightSources",{get:function(){return this._specularLightSources},set:function(t){this._specularLightSources!=t&&(this._specularLightSources=t,this.invalidatePasses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode!=t&&(this._mode=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthCompareMode",{get:function(){return this._depthCompareMode},set:function(t){this._depthCompareMode!=t&&(this._depthCompareMode=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ambientMethod",{get:function(){return this._ambientMethod},set:function(t){this._ambientMethod!=t&&(this._ambientMethod&&this._ambientMethod.iRemoveOwner(this),this._ambientMethod=t,this._ambientMethod&&this._ambientMethod.iAddOwner(this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowMethod",{get:function(){return this._shadowMethod},set:function(t){this._shadowMethod!=t&&(this._shadowMethod&&this._shadowMethod.iRemoveOwner(this),this._shadowMethod=t,this._shadowMethod&&this._shadowMethod.iAddOwner(this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diffuseMethod",{get:function(){return this._diffuseMethod},set:function(t){this._diffuseMethod!=t&&(this._diffuseMethod&&this._diffuseMethod.iRemoveOwner(this),this._diffuseMethod=t,this._diffuseMethod&&this._diffuseMethod.iAddOwner(this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specularMethod",{get:function(){return this._specularMethod},set:function(t){this._specularMethod!=t&&(this._specularMethod&&this._specularMethod.iRemoveOwner(this),this._specularMethod=t,this._specularMethod&&this._specularMethod.iAddOwner(this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normalMethod",{get:function(){return this._normalMethod},set:function(t){this._normalMethod!=t&&(this._normalMethod&&this._normalMethod.iRemoveOwner(this),this._normalMethod=t,this._normalMethod&&this._normalMethod.iAddOwner(this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numEffectMethods",{get:function(){return this._effectMethods.length},enumerable:!0,configurable:!0}),e.prototype.addEffectMethod=function(t){t.iAddOwner(this),this._effectMethods.push(t),this.invalidate()},e.prototype.getEffectMethodAt=function(t){return this._effectMethods[t]},e.prototype.addEffectMethodAt=function(t,e){t.iAddOwner(this),this._effectMethods.splice(e,0,t),this.invalidate()},e.prototype.removeEffectMethod=function(t){t.iRemoveOwner(this),this._effectMethods.splice(this._effectMethods.indexOf(t),1),this.invalidate()},e.prototype.onLightsChange=function(t){this.invalidate()},e.assetType="[materials MethodMaterial]",e}(Ec),Bc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._methodMaterial=e,r._renderElements=n,r}return n(e,t),Object.defineProperty(e.prototype,"numLights",{get:function(){return this._methodMaterial.lightPicker?this._methodMaterial.lightPicker.numLightProbes+this._methodMaterial.lightPicker.numDirectionalLights+this._methodMaterial.lightPicker.numPointLights+this._methodMaterial.lightPicker.numCastingDirectionalLights+this._methodMaterial.lightPicker.numCastingPointLights:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numNonCasters",{get:function(){return this._methodMaterial.lightPicker?this._methodMaterial.lightPicker.numLightProbes+this._methodMaterial.lightPicker.numDirectionalLights+this._methodMaterial.lightPicker.numPointLights:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lightPicker",{get:function(){return this._methodMaterial.lightPicker},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableLightFallOff",{get:function(){return this._methodMaterial.enableLightFallOff},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diffuseLightSources",{get:function(){return this._methodMaterial.diffuseLightSources},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specularLightSources",{get:function(){return this._methodMaterial.specularLightSources},enumerable:!0,configurable:!0}),e.prototype._pUpdateRender=function(){if(t.prototype._pUpdateRender.call(this),this.initPasses(),this.setBlendAndCompareModes(),this._pClearPasses(),this._methodMaterial.mode==Tc.MULTI_PASS&&(this._casterLightPass&&this._pAddPass(this._casterLightPass),this._nonCasterLightPasses))for(var e=0;e0||this._methodMaterial.mode==Tc.SINGLE_PASS?this.initEffectPass():this._pass&&this.removeEffectPass(),this._methodMaterial.shadowMethod&&this._methodMaterial.mode==Tc.MULTI_PASS?this.initCasterLightPass():this._casterLightPass&&this.removeCasterLightPass(),this.numNonCasters>0&&this._methodMaterial.mode==Tc.MULTI_PASS?this.initNonCasterLightPasses():this._nonCasterLightPasses&&this.removeNonCasterLightPasses()},e.prototype.setBlendAndCompareModes=function(){var t=Boolean(this._casterLightPass||this._pass);if(this._casterLightPass&&(this._casterLightPass.forceSeparateMVP=t,this._casterLightPass.shader.setBlendMode(pn.NORMAL),this._casterLightPass.shader.depthCompareMode=this._methodMaterial.depthCompareMode),this._nonCasterLightPasses){var e=0;this._casterLightPass||(this._nonCasterLightPasses[0].forceSeparateMVP=t,this._nonCasterLightPasses[0].shader.setBlendMode(pn.NORMAL),this._nonCasterLightPasses[0].shader.depthCompareMode=this._methodMaterial.depthCompareMode,e=1);for(var n=e;nE&&(E=S),(D=g[2*_+1])I&&(I=D);this._font_chars[s].fnt_rect=new q(w/this._font_chars[s].char_width,x/this._font_em_size,(E-w)/this._font_chars[s].char_width,(I-x)/this._font_em_size),T+=(E-w+t+t)*(I-x+t+t),C[C.length]={idx:s,minx:w,miny:x,width:E-w,height:I-x}}C.sort((function(t,e){return t.height>e.height?-1:1}));var B=0;m=n;var O,M=1;if(e)this.initFontSize(e),M=this._size_multiply;else{M=m/Math.sqrt(T)*1.2;for(var L=!0,N=0;L;){L=!1,y=0,A=t;for(s=0;s=m&&(y=t,A+=B+2*t,B=0),N>B&&(B=N),A+N+2*t>=m){L=!0,M*=.995;break}y+=C[s].width*M+t}}}this._fntSizeLimit=M*this._font_em_size*.5,y=0,A=t;for(s=0;s=m&&(y=t,A+=B+2*t,B=0),C[s].height*=M,C[s].height>B&&(B=C[s].height),A+B+2*t>=m&&(y=t,A=t,B=0,v[++b]=[]),O.fnt_channel=b,_=0;_E&&(E=S),D>I&&(I=D);O.fnt_uv=new q(y/m,1-A/m,(E-y)/m,(I-A)/m),y+=C[s].width*M+t}var R=[];for(s=0;s=0&&(0==this._fntSizeLimit||this._fntSizeLimit>=e.size),l=t.getTextShapeForIdentifierAndFormat(e.color.toString()+u.toString()+"0",e),c={},h={};u&&(i=x.float32ColorToARGB(e.color),(o=new Pc(this._fnt_channels[0])).colorTransform=new w(i[1]/255,i[2]/255,i[3]/255),o.bothSides=!0,o.alphaBlending=!0,o.useColorTransform=!0,o.style.sampler=new Me(!1,!0,!0)),l.fntMaterial=u?o:null,c[e.color.toString()+u.toString()+"0"]=l;var p=n+5*r,d=this._size_multiply,f=t.selectionBeginIndex,g=t.selectionEndIndex,_=0;t.selectable&&((s=e.clone()).color=16777215,a=t.getTextShapeForIdentifierAndFormat(u.toString()+"0",s),h[u.toString()+"0"]=a,(o=new Pc(this._fnt_channels[0])).bothSides=!0,o.alphaBlending=!0,o.useColorTransform=!0,o.style.sampler=new Me(!1,!0,!0),a.fntMaterial=u?o:null,s.underline&&n+1=f&&T=f&&T0){y+=12*b.length;for(var V=new Float32Array(y),Q=this._fillBuffer(V,A,!1),G=0,z=b;G0){V=new Float32Array(m);this._fillBuffer(V,v,!0),a.addChunk(V)}},e.prototype.createPointGlyph_9679=function(){var t=[];ds.drawElipse(this._font_em_size/2,this._font_em_size/2,this._font_em_size/8,this._font_em_size/8,t,0,360,5,!1);var e=new ai(Float32Array,2);e.set(t);var n=e.attributesBuffer.cloneBufferView();e.dispose();var r=new Oc(n,null,null);return r.char_width=this._font_em_size,this._font_chars.push(r),this._font_chars_dic[9679]=r,r},e.prototype.getChar=function(t){var e=this._font_chars_dic[t];if(e){if(null==e.fill_data&&null==e.stroke_data&&null!=e.fill_data_path&&(1==e.fill_data_path.commands[0][0]&&0==e.fill_data_path.data[0][0]&&0==e.fill_data_path.data[0][1]&&(e.fill_data_path.data[0].shift(),e.fill_data_path.data[0].shift(),e.fill_data_path.commands[0].shift(),e.fill_data_path.commands[0][0]=2),e.fill_data=Fs.pathToAttributesBuffer(e.fill_data_path,!0),!e.fill_data))return Lc(this,"tess"+t)&&console.debug("[TesselatedFontTable] Error:tesselating glyph:",t.charCodeAt(0)),null}else{if(this._opentype_font){var n=this._opentype_font.charToGlyph(String.fromCharCode(parseInt(t)));if(n){var r=n.getPath(),i=new Vs,o=0,a=r.commands.length,s=0,u=0,l=this._ascent,c=this._opentype_font.unitsPerEm/72;for(o=0;o0){if(i!=this._usesCurves)throw"TesselatedFontTable: Can not set different types of graphic-glyphs\n\t\t\t\t\t(curves vs non-cuves) on the same FontTable!"}else this._usesCurves=i;var s=new Oc(n,r,a);s.char_width=e,s.glyph_idx=o,s.name=t,this._glyphIdxToChar[o]=s,this._font_chars.push(s),this._font_chars_dic[t]=s},e.prototype._fillBuffer=function(t,e,n){void 0===n&&(n=!1);for(var r=this._size_multiply,i=0,o=0,a=e;o0)for(var o in this._font_styles)return console.log("font style not found return different",o),this._font_styles[o];return null},e.assetType="[asset Font]",e}(d),Uc=function(){function t(){}return t.getDeviceFont=function(t){if(t=this.getDeviceFontName(t),this._deviceFonts[t])return this._deviceFonts[t];var e=new kc;return e.name=t,this._deviceFonts[t]=e,this._deviceFonts[t]},t.getDeviceFontName=function(t){if(!t)return"sans";for(var e in this.deviceFontMap){if(this.deviceFontMap[e].indexOf(t)>=0)return e}return console.warn("[DeviceFontManager] - no mapping exists for "+t+"\n\t\t - falling back to sans"),"sans"},t.deviceFontMap={},t._deviceFonts={},t}();Uc.deviceFontMap.sans=["_sans","Arial"],Uc.deviceFontMap["Arial Narrow"]=["Arial Narrow"],Uc.deviceFontMap["Arial Black"]=["Arial Black"],Uc.deviceFontMap.serif=[],Uc.deviceFontMap.typewriter=[];var jc,Vc=function(){function t(){}return t.defineFont_CFF=function(t,e){void 0===e&&(e=d.DEFAULT_NAMESPACE),this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[e]||(this._embbedCFF_fonts[e]={});var n=this._embbedCFF_fonts[e][t];return n||((n=new kc).name=t,this._embbedCFF_fonts[e][t]=n,n)},t.getFont_CFF=function(t,e){if(void 0===e&&(e=d.DEFAULT_NAMESPACE),!t)return Uc.getDeviceFont(t);var n=e||d.DEFAULT_NAMESPACE;this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[n]||(this._embbedCFF_fonts[n]={});var r=this._embbedCFF_fonts[n][t];if(r)return r;for(var i in this._embbedCFF_fonts)if(this._embbedCFF_fonts[i][t])return this._embbedCFF_fonts[i][t];return Uc.getDeviceFont(t)},t.defineFont=function(t,e){if(void 0===e&&(e=d.DEFAULT_NAMESPACE),this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[e]||(this._registered_fonts[e]={}),this.deviceFontsLoading)return Uc.getDeviceFont(t);var n=this._registered_fonts[e][t];return n||((n=new kc).name=t,-1===this._namespaces.indexOf(e)&&this._namespaces.push(e),this._registered_fonts[e][t]=n,n)},t.registerFontForClassName=function(t,e){this._registered_fonts_by_className[e]=t},t.getFont=function(t,e){if(void 0===e&&(e=void 0),!t)return Uc.getDeviceFont(t);if(this._registered_fonts_by_className[t])return this._registered_fonts_by_className[t];var n=e||d.DEFAULT_NAMESPACE;this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[n]||(this._registered_fonts[n]={});var r=this._registered_fonts[n][t];if(r)return r;if(this._namespaces.length>0&&!e)for(var i=0,o=this._namespaces;ithis._length)){var e=this.verts;if(0===t)return this._length=0,void(e.length=0);for(var n=0,r=t;n0;)r-=e[n].length,n++;r<0&&(e[n-1]=e[n-1].subarray(0,r+e[n-1].length)),e.length=n,this._length=t}},enumerable:!0,configurable:!0}),t.prototype.addChunk=function(t){this._length+=t.length,this.verts.push(t)},Object.defineProperty(t.prototype,"tall",{get:function(){return this.verts[this.verts.length-1]},enumerable:!0,configurable:!0}),t}();class Wc{constructor(){this.childNodes=[]}get innerText(){return this.rawText}}!function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE"}(Qc||(Qc={}));var Jc=Qc;class $c extends Wc{constructor(t){super(),this.rawText=t,this.nodeType=Jc.COMMENT_NODE}get text(){return this.rawText}toString(){return`\x3c!--${this.rawText}--\x3e`}}var Zc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function th(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function eh(t){var e={exports:{}};return t(e,e.exports),e.exports -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */}var nh=eh((function(t,e){!function(n){var r=e,i=t&&t.exports==r&&t,o="object"==typeof Zc&&Zc;o.global!==o&&o.window!==o||(n=o);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,u=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},h=/["&'<>`]/g,p={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},d=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,f=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,_={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},m={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},y={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},A=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],v=String.fromCharCode,b={}.hasOwnProperty,C=function(t,e){return b.call(t,e)},I=function(t,e){if(!t)return e;var n,r={};for(n in e)r[n]=C(t,n)?t[n]:e[n];return r},E=function(t,e){var n="";return t>=55296&&t<=57343||t>1114111?(e&&S("character reference outside the permissible Unicode range"),"�"):C(y,t)?(e&&S("disallowed character reference"),y[t]):(e&&function(t,e){for(var n=-1,r=t.length;++n65535&&(n+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=v(t))},x=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},w=function(t){return"&#"+t+";"},S=function(t){throw Error("Parse error: "+t)},D=function(t,e){(e=I(e,D.options)).strict&&f.test(t)&&S("forbidden code point");var n=e.encodeEverything,r=e.useNamedReferences,i=e.allowUnsafeSymbols,o=e.decimal?w:x,p=function(t){return o(t.charCodeAt(0))};return n?(t=t.replace(s,(function(t){return r&&C(c,t)?"&"+c[t]+";":p(t)})),r&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(t=t.replace(l,(function(t){return"&"+c[t]+";"})))):r?(i||(t=t.replace(h,(function(t){return"&"+c[t]+";"}))),t=(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(l,(function(t){return"&"+c[t]+";"}))):i||(t=t.replace(h,p)),t.replace(a,(function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1);return o(1024*(e-55296)+n-56320+65536)})).replace(u,p)};D.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var T=function(t,e){var n=(e=I(e,T.options)).strict;return n&&d.test(t)&&S("malformed character reference"),t.replace(g,(function(t,r,i,o,a,s,u,l,c){var h,p,d,f,g,y;return r?_[g=r]:i?(g=i,(y=o)&&e.isAttributeValue?(n&&"="==y&&S("`&` did not start a character reference"),t):(n&&S("named character reference was not terminated by a semicolon"),m[g]+(y||""))):a?(d=a,p=s,n&&!p&&S("character reference was not terminated by a semicolon"),h=parseInt(d,10),E(h,n)):u?(f=u,p=l,n&&!p&&S("character reference was not terminated by a semicolon"),h=parseInt(f,16),E(h,n)):(n&&S("named character reference was not terminated by a semicolon"),t)}))};T.options={isAttributeValue:!1,strict:!1};var P={version:"1.2.0",encode:D,decode:T,escape:function(t){return t.replace(h,(function(t){return p[t]}))},unescape:T};if(r&&!r.nodeType)if(i)i.exports=P;else for(var B in P)C(P,B)&&(r[B]=P[B]);else n.he=P}(Zc)}));class rh extends Wc{constructor(t){super(),this.rawText=t,this.nodeType=Jc.TEXT_NODE}get text(){return this.rawText}get isWhitespace(){return/^(\s| )*$/.test(this.rawText)}toString(){return this.text}}let ih={};function oh(t,e){return t?e?t.toLowerCase()===e.toLowerCase():!t:!e}const ah={f145(t,e,n){if(e=e||"",n=n||[],t.id!==e.substr(1))return!1;for(let e=n,r=0;r(e=e||"",t.id===e.substr(1)),f1(t,e){if(e=e||"",t.id!==e.substr(1))return!1},f5:()=>!0,f55(t,e,n,r){r=r||"";return t.attributes.hasOwnProperty(r)},f245(t,e,n,r,i){r=(r||"").toLowerCase(),i=i||"";const o=t.attributes;return Object.keys(o).some((t=>{const e=o[t];return t.toLowerCase()===r&&e===i}))},f25(t,e,n,r,i){r=(r||"").toLowerCase(),i=i||"";const o=t.attributes;return Object.keys(o).some((t=>{const e=o[t];return t.toLowerCase()===r&&e===i}))},f2(t,e,n,r,i){r=(r||"").toLowerCase(),i=i||"";const o=t.attributes;return Object.keys(o).some((t=>{const e=o[t];return t.toLowerCase()===r&&e===i}))},f345(t,e,n){if(e=e||"",n=n||[],!oh(t.tagName,e))return!1;for(let e=n,r=0;r(e=e||"",oh(t.tagName,e)),f3:(t,e)=>(e=e||"",oh(t.tagName,e))};class sh{constructor(t){this.nextMatch=0,this.matchers=t.split(" ").map((t=>{if(ih[t])return ih[t];const e=t.split("."),n=e[0],r=e.slice(1).sort();let i="f",o="",a="";if(n&&"*"!==n){let t;if(n.startsWith("#"))i+="1";else if(t=/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/.exec(n),t){o=t[1];let e=t[2];if("="!==e&&"!="!==e)throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");"="===e&&(e="=="),a=t[7]||t[8],i+="2"}else(t=/^\[(.*?)\]/.exec(n))?(o=t[1],i+="5"):i+="3"}r.length>0&&(i+="4"),i+="5";const s={func:ah[i],tagName:n||"",classes:r||"",attr_key:o||"",value:a||""};return ih[t]=s}))}advance(t){return!!(this.nextMatche!==t))}exchangeChild(t,e){let n=-1;for(let e=0;et+e.rawText),"")}get text(){return nh.decode(this.rawText)}get structuredText(){let t=[];const e=[t];return function n(r){if(r.nodeType===Jc.ELEMENT_NODE)lh.get(r.rawTagName)?(t.length>0&&e.push(t=[]),r.childNodes.forEach(n),t.length>0&&e.push(t=[])):r.childNodes.forEach(n);else if(r.nodeType===Jc.TEXT_NODE)if(r.isWhitespace)t.prependWhitespace=!0;else{let e=r.text;t.prependWhitespace&&(e=` ${e}`,t.prependWhitespace=!1),t.push(e)}}(this),e.map((t=>t.join("").trim().replace(/\s{2,}/g," "))).join("\n").replace(/\s+$/,"")}toString(){const t=this.rawTagName;if(t){const e=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i.test(t),n=this.rawAttrs?` ${this.rawAttrs}`:"";return e?`<${t}${n}>`:`<${t}${n}>${this.innerHTML}`}return this.innerHTML}get innerHTML(){return this.childNodes.map((t=>t.toString())).join("")}set_content(t,e={}){if(t instanceof Wc)t=[t];else if("string"==typeof t){const n=mh(t,e);t=n.childNodes.length?n.childNodes:[new rh(t)]}this.childNodes=t}get outerHTML(){return this.toString()}trimRight(t){for(let e=0;e-1&&(n.rawText=n.rawText.substr(0,r),this.childNodes.length=e+1)}}return this}get structure(){const t=[];let e=0;function n(n){t.push(" ".repeat(e)+n)}return function t(r){const i=r.id?`#${r.id}`:"",o=r.classNames.length?`.${r.classNames.join(".")}`:"";n(r.rawTagName+i+o),e++,r.childNodes.forEach((e=>{e.nodeType===Jc.ELEMENT_NODE?t(e):e.nodeType===Jc.TEXT_NODE&&(e.isWhitespace||n("#text"))})),e--}(this),t.join("\n")}removeWhitespace(){let t=0;return this.childNodes.forEach((e=>{if(e.nodeType===Jc.TEXT_NODE){if(e.isWhitespace)return;e.rawText=e.rawText.trim()}else e.nodeType===Jc.ELEMENT_NODE&&e.removeWhitespace();this.childNodes[t++]=e})),this.childNodes.length=t,this}querySelectorAll(t){let e;if(t instanceof sh)e=t,e.reset();else{if(t.includes(",")){const e=t.split(",");return Array.from(e.reduce(((t,e)=>this.querySelectorAll(e.trim()).reduce(((t,e)=>t.add(e)),t)),new Set))}e=new sh(t)}const n=[];return this.childNodes.reduce(((r,i)=>{for(n.push([i,0,!1]);n.length;){const i=uh(n),o=i[0];if(0===i[1]){if(o.nodeType!==Jc.ELEMENT_NODE){n.pop();continue}const a=o;if(i[2]=e.advance(a),i[2]&&e.matched){r.push(a),r.push(...a.querySelectorAll(t)),e.rewind(),n.pop();continue}}i[1]{const n=JSON.stringify(e[t]);return void 0===n||"null"===n?t:`${t}=${n}`})).join(" ")}hasAttribute(t){return t in this.attributes}getAttribute(t){return this.attributes[t]}setAttribute(t,e){if(arguments.length<2)throw new Error("Failed to execute 'setAttribute' on 'Element'");const n=this.rawAttributes;n[t]=String(e),this._attrs&&(this._attrs[t]=nh.decode(n[t])),this.rawAttrs=Object.keys(n).map((t=>{const e=JSON.stringify(n[t]);return"null"===e||'""'===e?t:`${t}=${e}`})).join(" ")}setAttributes(t){this._attrs&&delete this._attrs,this._rawAttrs&&delete this._rawAttrs,this.rawAttrs=Object.keys(t).map((e=>{const n=t[e];return"null"===n||'""'===n?e:`${e}=${JSON.stringify(String(n))}`})).join(" ")}insertAdjacentHTML(t,e){if(arguments.length<2)throw new Error("2 arguments required");const n=mh(e);if("afterend"===t){const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t+1,0,...n.childNodes),n.childNodes.forEach((t=>{t instanceof ch&&(t.parentNode=this.parentNode)}))}else if("afterbegin"===t)this.childNodes.unshift(...n.childNodes);else if("beforeend"===t)n.childNodes.forEach((t=>{this.appendChild(t)}));else{if("beforebegin"!==t)throw new Error(`The value provided ('${t}') is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'`);{const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t,0,...n.childNodes),n.childNodes.forEach((t=>{t instanceof ch&&(t.parentNode=this.parentNode)}))}}}}const hh=/)-->|<(\/?)([a-z][-.:0-9_a-z]*)\s*([^>]*?)(\/?)>/gi,ph=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/gi,dh={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},fh={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},gh={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},_h="documentfragmentcontainer";function mh(t,e={lowerCaseTagName:!1,comment:!1}){const n=e.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},r=Object.keys(n),i=r.map((t=>new RegExp(t,"i"))),o=r.filter((t=>n[t])).map((t=>new RegExp(t,"i")));function a(t){return o.some((e=>e.test(t)))}function s(t){return i.some((e=>e.test(t)))}const u=new ch(null,{});let l=u;const c=[u];let h,p=-1;for(t=`<${_h}>${t}`;h=hh.exec(t);){if(p>-1&&p+h[0].length`,r=e.lowerCaseTagName?t.toLocaleLowerCase().indexOf(n,hh.lastIndex):t.indexOf(n,hh.lastIndex);if(a(h[2])){let e;e=-1===r?t.substr(hh.lastIndex):t.substring(hh.lastIndex,r),e.length>0&&l.appendChild(new rh(e))}-1===r?p=hh.lastIndex=t.length+1:(p=hh.lastIndex=r+n.length,h[1]="true")}}if(h[1]||h[4]||dh[h[2]])for(;;){if(l.rawTagName===h[2]){c.pop(),l=uh(c);break}{const t=l.tagName;if(gh[t]&&gh[t][h[2]]){c.pop(),l=uh(c);continue}break}}}else if(e.comment){const e=t.substring(p-3,p-h[0].length+4);l.appendChild(new $c(e))}}const d=Boolean(1===c.length);if(!e.noFix){const t=u;for(t.valid=d;c.length>1;){const t=c.pop(),e=uh(c);t.parentNode&&t.parentNode.parentNode&&(t.parentNode===e&&t.tagName===e.tagName?(e.removeChild(t),t.childNodes.forEach((t=>{e.parentNode.appendChild(t)})),c.pop()):(e.removeChild(t),t.childNodes.forEach((t=>{e.appendChild(t)}))))}return t.childNodes.forEach((t=>{t instanceof ch&&(t.parentNode=null)})),t}const f=new rh(t);return f.valid=d,f}var yh=[{test:/\>/g,replace:">"}],Ah=function(){function t(){}return t.get=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.processHTML=function(t,e){e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/'/g,"'")).replace(new RegExp(" ","g")," ")).replace(new RegExp("√","g"),String.fromCharCode(8730))).replace(new RegExp("×","g"),String.fromCharCode(215))).replace(new RegExp("<\\\\","g"),"","g"),"
")).replace(new RegExp("
","g"),"
")).replace(new RegExp("
","g"),"
")).replace(new RegExp("","g"),"")).replace(new RegExp("","g"),"")).replace(new RegExp("","g"),"

")).replace(new RegExp("","g"),"")).replace(new RegExp("","g"),"")).replace(new RegExp("","g"),"")).replace(new RegExp("& ","g"),"& ");for(var n=0,r=[],i=[],o=[];n0;)if("p"==r[--a]){s=a;break}if(s<0)i[i.length]=n,o[o.length]=4;else{for(a=r.length-1;a>s;)i[i.length]=n,o[o.length]="",r.pop(),a--;r.pop()}}else if("/"==e[n+1]&&"b"==e[n+2]){var u=r.length;for(s=-1;u>0;)if("b"==r[--u]){s=u;break}if(s<0)i[i.length]=n,o[o.length]=4;else{for(u=r.length-1;u>s;)i[i.length]=n,o[o.length]="",r.pop(),u--;r.pop()}}else if("/"==e[n+1]&&"i"==e[n+2]){var l=r.length;for(s=-1;l>0;)if("i"==r[--l]){s=l;break}if(s<0)i[i.length]=n,o[o.length]=4;else{for(l=r.length-1;l>s;)i[i.length]=n,o[o.length]="",r.pop(),l--;r.pop()}}else if("/"==e[n+1]&&"u"==e[n+2]){var c=r.length;for(s=-1;c>0;)if("u"==r[--c]){s=c;break}if(s<0)i[i.length]=n,o[o.length]=4;else{for(c=r.length-1;c>s;)i[i.length]=n,o[o.length]="",r.pop(),c--;r.pop()}}else if("/"==e[n+1]&&"l"==e[n+2]&&"i"==e[n+3]){var h=r.length;for(s=-1;h>0;)if("li"==r[--h]){s=h;break}if(s<0)i[i.length]=n,o[o.length]=7;else{for(h=r.length-1;h>s;)i[i.length]=n,o[o.length]="",r.pop(),h--;r.pop()}}else if("/"==e[n+1]&&"f"==e[n+2]&&"o"==e[n+3]&&"n"==e[n+4]&&"t"==e[n+5]){var p=r.length;for(s=-1;p>0;)if("font"==r[--p]){s=p;break}if(s<0)i[i.length]=n,o[o.length]=7;else{for(p=r.length-1;p>s;)i[i.length]=n,o[o.length]="",r.pop(),p--;r.pop()}}n++}else n++;for(var d=r.length;d>0;)d--,i[i.length]=n,o[o.length]="";for(var f=0,g=o.length,_=0;_0,this.readHTMLTextPropertiesRecursive(t,y,m,t._textFormat)),""==m.text||13!=m.text.charCodeAt(m.text.length-1)&&10!=m.text.charCodeAt(m.text.length-1)||(m.text=m.text.slice(0,m.text.length-1)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),t._textFormatsIdx[t._textFormatsIdx.length-1]=m.text.length,m.text},t.prototype.readHTMLTextPropertiesRecursive=function(t,e,n,r){var i=[],o=[];if(e.attributes){if(e.attributes.size||e.attributes.SIZE)a=(a=e.attributes.size?e.attributes.size:e.attributes.SIZE).replace(/[^0-9.]/g,""),i[i.length]=parseInt(a),o[o.length]="size";if(e.attributes.color||e.attributes.COLOR)a=(a=e.attributes.color?e.attributes.color:e.attributes.COLOR).replace("#","0x"),i[i.length]=parseInt(a),o[o.length]="color";if(e.attributes.indent||e.attributes.INDENT)a=(a=e.attributes.indent?e.attributes.indent:e.attributes.INDENT).replace(/[^0-9.]/g,""),i[i.length]=parseInt(a),o[o.length]="indent";if(e.attributes.leftMargin||e.attributes.LEFTMARGIN)a=(a=e.attributes.leftMargin?e.attributes.leftMargin:e.attributes.LEFTMARGIN).replace(/[^0-9.]/g,""),i[i.length]=parseInt(a),o[o.length]="leftMargin";if(e.attributes.rightMargin||e.attributes.RIGHTMARGIN)a=(a=e.attributes.rightMargin?e.attributes.rightMargin:e.attributes.RIGHTMARGIN).replace(/[^0-9.]/g,""),i[i.length]=parseInt(a),o[o.length]="rightMargin";if(e.attributes.align||e.attributes.ALIGN){var a=e.attributes.align?e.attributes.align:e.attributes.ALIGN;i[i.length]=a,o[o.length]="align"}if(e.attributes.face||e.attributes.FACE){a=e.attributes.face?e.attributes.face:e.attributes.FACE;i[i.length]=a,o[o.length]="font"}}"b"==e.tagName||"b"==e.rawTagName?r.bold||(i[i.length]=!0,o[o.length]="bold"):"i"==e.tagName||"i"==e.rawTagName?r.italic||(i[i.length]=!0,o[o.length]="italic"):"u"==e.tagName||"u"==e.rawTagName?r.underline||(i[i.length]=!0,o[o.length]="underline"):"font"==e.tagName||"font"==e.rawTagName||("li"==e.tagName||"li"==e.rawTagName?n.text+="\n ● ":("br"!=e.tagName&&"br"!=e.rawTagName||!t.multiline)&&("sbr"!=e.tagName&&"sbr"!=e.rawTagName||!t.multiline)||(n.text+="\n"));for(var s=!1,u=i.length;u>0;)if(r[o[--u]]!=i[u]){s=!0;break}var l=r;if(s){for(l=r.clone(),u=i.length;u>0;)l[o[--u]]=i[u];t._textFormats.push(l),t._textFormatsIdx[t._textFormatsIdx.length-1]=n.text.length,t._textFormatsIdx.push(n.text.length)}if(e.childNodes&&e.childNodes.length>0)for(var c=0;c"}],bh=function(t){function e(){var e=t.call(this)||this;return e._isEntity=!1,e.textOffsetX=0,e.textOffsetY=0,e._selectionBeginIndex=0,e._selectionEndIndex=0,e._biggestLine=0,e._iText="",e._text="",e._iTextWoLineBreaks="",e.inMaskMode=!1,e.cursorIntervalID=-1,e.cursorBlinking=!1,e.showSelection=!1,e._textDirty=!1,e._positionsDirty=!1,e._glyphsDirty=!1,e._shapesDirty=!1,e._textShapesDirty=!1,e.chars_codes=[],e.chars_codes_prev=[],e.chars_width=[],e.tf_per_char=[],e.tf_per_char_prev=[],e.last_word_vertices_count=0,e.words=[],e._textRuns_formats=[],e._textRuns_words=[],e._paragraph_textRuns_indices=[],e._maxWidthLine=0,e._labelData=null,e.lines_wordStartIndices=[],e.lines_wordEndIndices=[],e.lines_start_y=[],e.lines_start_x=[],e.lines_charIdx_start=[],e.lines_charIdx_end=[],e.lines_width=[],e.lines_height=[],e.lines_numSpacesPerline=[],e.char_positions_x=[],e.char_positions_y=[],e.sourceTextField=null,e._maskWidth=0,e._maskHeight=0,e._maskTextOffsetX=0,e._maskTextOffsetY=0,e.isStatic=!1,e._internalScale=new B(1,1,1),e.onKeyDelegate=function(t){return e.onKey(t)},e.startSelectionByMouseDelegate=function(t){return e.startSelectionByMouse(t)},e.stopSelectionByMouseDelegate=function(t){return e.stopSelectionByMouse(t)},e.updateSelectionByMouseDelegate=function(t){return e.updateSelectionByMouse(t)},e._onGraphicsInvalidateDelegate=function(t){return e._onGraphicsInvalidate(t)},e._onClipboardPasteDelegate=function(t){return e.onClipboardPaste(t)},e.cursorIntervalID=-1,e._tabEnabled=!0,e.cursorType="",e.textOffsetX=0,e.textOffsetY=0,e.textShapes={},e._textColor=0,e._width=100,e._height=100,e._textWidth=0,e._textHeight=0,e._type=Ou.DYNAMIC,e._selectable=!1,e._numLines=0,e.multiline=!1,e._autoSize=Bu.NONE,e._wordWrap=!1,e._background=!1,e._backgroundColor=16777215,e._border=!1,e._borderColor=0,e.html=!1,e.maxChars=0,e._selectionBeginIndex=0,e._selectionEndIndex=0,e._scrollH=0,e._scrollV=0,e._textFormats=[],e._graphics=Ys.getGraphics(),e._graphics.addEventListener(l.INVALIDATE,e._onGraphicsInvalidateDelegate),e.mouseEnabled=e._selectable,e}return n(e,t),e.getNewTextField=function(){return e._textFields.length?e._textFields.pop():new e},e.clearPool=function(){e._textFields=[]},e.prototype.updateMaskMode=function(){if(this.inMaskMode&&(this._maskWidth==this._width&&this._maskHeight==this._height&&this._maskTextOffsetX==this.textOffsetX&&this._maskTextOffsetY==this.textOffsetY||(this._maskWidth=this._width,this._maskHeight=this._height,this._maskTextOffsetX=this.textOffsetX,this._maskTextOffsetY=this.textOffsetY,this.maskChild.graphics.clear(),this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill()),this._graphics.clear()),!this.inMaskMode)return this.inMaskMode=!0,this.maskChild||(this.maskChild=new ru),this.textChild||(this.textChild=new qc),this.textChild.mouseEnabled=!1,this.textChild.parentTextField=this,this.maskChild.mouseEnabled=!1,this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill(),this.addChild(this.maskChild),this.addChild(this.textChild),this.maskChild.maskMode=!0,this._graphics.clear(),void(this.targetGraphics=this.textChild.graphics);this._textWidth>this._width||this._textHeight>this._height?this.textChild.masks=[this.maskChild]:this.textChild.masks=null},e.prototype.getMouseCursor=function(){return this.cursorType},Object.defineProperty(e.prototype,"isInFocus",{get:function(){return this._isInFocus},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.setFocus=function(e,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0),this._isInFocus!=e&&(t.prototype.setFocus.call(this,e,n,r),this.enableInput(e),this._selectable&&(this.setSelection(0,0),this._glyphsDirty=!0,this._invalidateEntity()))},e.prototype.enableInput=function(t){if(void 0===t&&(t=!0),this.cursorIntervalID>=0&&(window.clearInterval(this.cursorIntervalID),this.cursorIntervalID=-1),t&&this._isInFocus&&this.selectable){this.drawSelectionGraphics();var e=this;this.cursorIntervalID=window.setInterval((function(){e.cursorBlinking=!e.cursorBlinking,e.selectable||(e.cursorBlinking=!0),e._shapesDirty=!0,e.invalidate()}),500)}},e.prototype.findCharIdxForMouse=function(t){var e=new T(t.position.x,t.position.y),n=this.getLineIndexAtPoint(e.x,e.y),r=this.getCharIndexAtPoint(e.x,e.y,n);return n>=this.lines_start_x.length&&(n=this.lines_start_x.length-1),n<0&&(n=0),n>=0&&r<0&&void 0!==this.lines_start_x[n]&&(r=e.x<=this.lines_start_x[n]?this.lines_charIdx_start[n]:this.lines_charIdx_end[n]),(n<0||r<0)&&(r=0),r},e.prototype.startSelectionByMouse=function(t){this._selectionBeginIndex=this.findCharIdxForMouse(t),this._selectionEndIndex=this._selectionBeginIndex,this.cursorShape&&this.cursorShape.invalidate(),this.cursorShape=void 0,this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this._shapesDirty=!0,this._textShapesDirty=!0,this.cursorBlinking=!1,this.drawSelectionGraphics()},e.prototype.stopSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},e.prototype.updateSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},e.prototype.drawSelectionGraphics=function(){this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length),this._selectionEndIndex<0&&(this._selectionEndIndex=0),this._selectionEndIndex>this.char_positions_x.length&&(this._selectionEndIndex=this.char_positions_x.length),this._selectionBeginIndex===this._selectionEndIndex?(this.showSelection=!1,this.drawCursor()):(this.showSelection=!0,this.cursorBlinking=!0,this.drawSelectedBG())},e.prototype.scrollToCursor=function(t,e){},e.prototype.drawCursor=function(){if(this._shapesDirty=!0,!this.cursorBlinking&&this.selectable&&this.selectionBeginIndex===this.selectionEndIndex){var t=0,e=0,n=this.newTextFormat;0==this.char_positions_x.length?(t=this.textOffsetX+this._width/2+this._textWidth/2,"justify"==n.align||"center"==n.align||("right"==n.align?t=this.textOffsetX+this._width-2:"left"==n.align&&(t=this.textOffsetX+4+this._textWidth))):this._selectionBeginIndex==this.char_positions_x.length?(t=this.char_positions_x[this._selectionBeginIndex-1]+this.chars_width[this._selectionBeginIndex-1],e=this.char_positions_y[this._selectionBeginIndex-1],n=this.tf_per_char[this._selectionBeginIndex-1]):(t=this.char_positions_x[this._selectionBeginIndex],e=this.char_positions_y[this._selectionBeginIndex],n=this.tf_per_char[this._selectionBeginIndex]),n.font_table.initFontSize(n.size);var r=n.font_table.getLineHeight(),i=this.getTextColorForTextFormat(n),o=this.internalScale.x;o<=0&&(o=1);var a=[t-.5*o,e,o,r];if(this.cursorShape?ds.updateRectanglesShape(this.cursorShape,a):(this.cursorShape=ds.drawRectangles(a,i,1),this.cursorShape.usages++),this.cursorShape.style.color!==i){var s=x.float32ColorToARGB(i)[0],u=ps.get_material_for_color(i,s/255||1);if(u.colorPos){this.cursorShape.style=new Qi;var l=new Me;u.material.animateUVs=!0,this.cursorShape.style.color=i,this.cursorShape.style.addSamplerAt(l,u.material.getTextureAt(0)),this.cursorShape.style.uvMatrix=new P(0,0,0,0,u.colorPos.x,u.colorPos.y)}}this.scrollToCursor(t,e)}},e.prototype.drawSelectedBG=function(){this._shapesDirty=!0,this._textShapesDirty=!0,this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length);var t=this._selectionBeginIndex,e=this._selectionEndIndex;this._selectionEndIndexthis.char_positions_x.length?this.char_positions_x.length:e,h=t;h=0&&i!=r&&(l.push(a,i,s,u),s=0,a=n),s+=this.chars_width[h],i=r,o.font_table.initFontSize(o.size),u=Math.max(u,o.font_table.getLineHeight());if(s>0)return l.push(a,i,s,u),void(this.bgShapeSelect?ds.updateRectanglesShape(this.bgShapeSelect,l):(this.bgShapeSelect=ds.drawRectangles(l,0,1),this.bgShapeSelect.usages++));this.scrollToCursor(a+s,i+u)},e.prototype.drawBG=function(){this._graphics.beginFill(this.backgroundColor,this._background?1:0),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this.width,this.height),this._graphics.endFill()},e.prototype.drawBorder=function(){var t=this.border?.25*this.internalScale.x:0,e=this.border?.25*this.internalScale.y:0;this._graphics.beginFill(this._borderColor,1),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+this._height-2*e,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.drawRect(this.textOffsetX+this._width-2*t,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.endFill()},e.prototype.getTextShapeForIdentifierAndFormat=function(t,e){return this.textShapes.hasOwnProperty(t)||(this.textShapes[t]=new Kc,this.textShapes[t].format=e),this.textShapes[t]},Object.defineProperty(e.prototype,"autoSize",{get:function(){return this._autoSize},set:function(t){if(this._autoSize!=t){if("string"==typeof t){if(t!=Bu.CENTER&&t!=Bu.NONE&&t!=Bu.LEFT&&t!=Bu.RIGHT)return}else"boolean"==typeof t&&(t=t?Bu.LEFT:Bu.NONE),"number"==typeof t&&(t=t>0?Bu.LEFT:Bu.NONE);this._autoSize=t,this._positionsDirty=!0,this._autoSize!=Bu.NONE&&this.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"internalScale",{get:function(){return this._internalScale},enumerable:!0,configurable:!0}),e.prototype._iInternalUpdate=function(){t.prototype._iInternalUpdate.call(this),this.reConstruct(!0)},e.prototype._onGraphicsInvalidate=function(t){var e=this.isEntity();this._isEntity!=e&&(e||this._clearEntity(),this._isEntity=e),this.invalidate()},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!=t&&(this._background=t,this._shapesDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._shapesDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"border",{get:function(){return this._border},set:function(t){t!=this._border&&(this._border=t,this._shapesDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._borderColor},set:function(t){t!=this.borderColor&&(this._borderColor=t,this._shapesDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomScrollV",{get:function(){return this._bottomScrollV},set:function(t){t!=this._bottomScrollV&&(this._bottomScrollV=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caretIndex",{get:function(){return this._caretIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._autoSize!=Bu.NONE&&this.reConstruct(),this._height},set:function(t){this._height!=t&&this._autoSize==Bu.NONE&&(this._height=t,this._positionsDirty=!0,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"htmlText",{get:function(){return this._htmlText},set:function(t){if(t!=this._htmlText){this._htmlText=t;var e=Ah.get().processHTML(this,t);this._labelData=null,this._text=e,this._iText=e,this._iTextWoLineBreaks=e.replace(/(\r\n|\n|\\n|\r)/gm,""),this._textDirty=!0,this._autoSize!=Bu.NONE?this.invalidate():this._invalidateEntity(),this.newTextFormat=this._textFormats[this._textFormats.length-1]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._iText.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollH",{get:function(){return this.reConstruct(),this._maxScrollH},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollV",{get:function(){return this.reConstruct(),this._maxScrollV},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numLines",{get:function(){return this.reConstruct(),this._numLines},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrict",{get:function(){return this._restrict},set:function(t){t!=this._restrict&&(this._restrict=t,this._restrictRegex=null,void 0!==t&&((t=t.toString()).length>=2&&"-"==t[0]&&!isNaN(parseInt(t[1]))&&(t="0"+t),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"")).replace(/\^/g,"")).replace(/([^a-zA-Z0-9])\-/g,"$1\\-")).replace(/\./g,"\\.")).replace(/\/g,"\\>")).replace(/\+/g,"\\+")).replace(/\*/g,"\\*")).replace(/\?/g,"\\?")).replace(/\[/g,"\\[")).replace(/\]/g,"\\]")).replace(/\$/g,"\\$")).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")).replace(/\{/g,"\\{")).replace(/\}/g,"\\}")).replace(/\=/g,"\\=")).replace(/\!/g,"\\!")).replace(/\:/g,"\\:")).replace(/\|/g,"\\|")).replace(/\//g,"\\/")).replace(/\%/g,"\\%"),this._restrictRegex=new RegExp("[^"+t+"]","g")))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollH",{get:function(){return this._scrollH},set:function(t){t!=this._scrollH&&(this._scrollH=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollV",{get:function(){return this._scrollV},set:function(t){Math.floor(t)!=this._scrollV&&(this._scrollV=Math.floor(t),this._scrollV>this._maxScrollV&&(this._scrollV=this._maxScrollV),this.textChild&&(this.textChild.y=-this.lines_start_y[this._scrollV]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this.selectable!=t&&(this._selectable=t,this.mouseEnabled=t,this.cursorType=t?"text":"",t?(this.addEventListener(vu.DRAG_START,this.startSelectionByMouseDelegate),this.addEventListener(vu.DRAG_STOP,this.stopSelectionByMouseDelegate),this.addEventListener(vu.DRAG_MOVE,this.updateSelectionByMouseDelegate)):(this.removeEventListener(vu.DRAG_START,this.startSelectionByMouseDelegate),this.removeEventListener(vu.DRAG_STOP,this.stopSelectionByMouseDelegate),this.removeEventListener(vu.DRAG_MOVE,this.updateSelectionByMouseDelegate)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionBeginIndex",{get:function(){return this._selectionBeginIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionEndIndex",{get:function(){return this._selectionEndIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){if(t=(t=void 0===t?"":t.toString()).replace(String.fromCharCode(160)," "),this._text!=t){this._labelData=null,this._text=t,""==t||13!=t.charCodeAt(t.length-1)&&10!=t.charCodeAt(t.length-1)||(t=t.slice(0,t.length-1)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&"\\"==t[t.length-3]&&(t=t.slice(0,t.length-3)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&(t=t.slice(0,t.length-2));for(var e=0,n=vh;e0;)e--,this._textFormats[e]&&(this._textFormats[e].color=t);this._textDirty=!0}this._glyphsDirty=!0,this._invalidateEntity()}},enumerable:!0,configurable:!0}),e.prototype.getTextColorForTextFormat=function(t){return t.hasPropertySet("color")?t.color:this._textColor},Object.defineProperty(e.prototype,"textInteractionMode",{get:function(){return this._textInteractionMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this.reConstruct(),this._textWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this.reConstruct(),this.type==Ou.INPUT&&""==this._iText?(this.textFormat.font_table.initFontSize(this.textFormat.size),this.textFormat.font_table.getLineHeight()):this._textHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type!=t&&(this._type=t,this._textDirty=!0,this._invalidateEntity(),t==Ou.INPUT?(this.enableInput(!0),this.addEventListener(Xc.KEYDOWN,this.onKeyDelegate)):(this.enableInput(!1),this.removeEventListener(Xc.KEYDOWN,this.onKeyDelegate)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this._autoSize==Bu.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x},set:function(t){this._autoSize==Bu.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x!=t&&(this._transform.matrix3D._rawData[12]=t,this._transform.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._autoSize==Bu.NONE||this._wordWrap||this.reConstruct(),this._width},set:function(t){this._width!=t&&(this._width=t,this._positionsDirty=!0,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!=t&&(this._wordWrap=t,this._positionsDirty=!0,t||this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.advanceFrame=function(){},e.prototype.isEntity=function(){return!0},e.prototype.clear=function(){t.prototype.clear.call(this)},e.prototype.dispose=function(){this.disposeValues(),e._textFields.push(this)},e.prototype.disposeValues=function(){t.prototype.disposeValues.call(this),this.maskChild&&(this.maskChild.dispose(),this.maskChild=null),this.textChild&&(this.textChild.dispose(),this.textChild=null),this.cursorShape&&(this.cursorShape.dispose(),this.cursorShape=null),this.bgShapeSelect&&(this.bgShapeSelect.dispose(),this.bgShapeSelect=null),this._labelData&&(this._labelData=null),this._clearTextShapes(),this._textFormat=null},e.prototype.reConstruct=function(t){void 0===t&&(t=!1),(this._textDirty||this._positionsDirty||this._glyphsDirty||this._shapesDirty)&&(this._textDirty&&(this._positionsDirty=!0,this.chars_codes_prev=Array.from(this.chars_codes),this.tf_per_char_prev=Array.from(this.tf_per_char),this._words_amount_prev=this.words.length,this.chars_codes.length=0,this.chars_width.length=0,this.char_positions_x.length=0,this.char_positions_y.length=0,this.tf_per_char.length=0,this.words.length=0,this._textRuns_words.length=0,this._textRuns_formats.length=0,this._paragraph_textRuns_indices.length=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this._maxScrollH=0,this._maxScrollV=0,this._maxWidthLine=0,!this._textFormat&&this._textFormats.length>0&&(this._textFormat=this._textFormats[0]),""!=this._iText&&null!=this._textFormat&&this.buildParagraphs()),this._positionsDirty&&(this._glyphsDirty=!0,""!=this._iText&&null!=this._textFormat?this.getWordPositions():(this._textWidth=0,this._textHeight=0,this._autoSize!=Bu.NONE&&(this.wordWrap||this.adjustPositionForAutoSize(0),this._height=4,this._type==Ou.INPUT&&(this.newTextFormat.font_table.initFontSize(this.newTextFormat.size),this._height=this.newTextFormat.font_table.getLineHeight()+4)),this._type==Ou.INPUT&&this.drawSelectionGraphics()),this.updateMaskMode()),this._textDirty=!1,this._positionsDirty=!1,t&&(this._textShapesDirty||0==this.chars_codes_prev.length||(this.chars_codes_prev.length>this.chars_codes.length||this.chars_codes_prev[0]!==this.chars_codes[0])&&(this._textShapesDirty=!0),this._glyphsDirty&&(this._labelData?this.buildGlyphsForLabelData():this.buildGlyphs()),this._glyphsDirty=!1,this._labelData||(this.buildShapes(),this._shapesDirty=!1)))},e.prototype.reset=function(){t.prototype.reset.call(this),this.sourceTextField&&this.sourceTextField.copyTo(this)},e.prototype.onClipboardPaste=function(t){var e=(t.clipboardData||self.clipboardData).getData("text");e&&(t.preventDefault(),this._selectionBeginIndex>0||this._selectionEndIndex>this.length?this._insertNewText(e):this.text=e)},e.prototype.buildParagraphs=function(){var t=this._iText.toString(),e=this._textFormatsIdx.length,n=0,r=0;this._paragraph_textRuns_indices[this._paragraph_textRuns_indices.length]=this._textRuns_formats.length;for(var i=0;ir){this._textRuns_formats[this._textRuns_formats.length]=u,this._textRuns_words[this._textRuns_words.length]=this.words.length;for(var h=r;h=l&&(s=!0),s?(this.words[this.words.length]=this.chars_codes.length-1,this.words[this.words.length]=0,this.words[this.words.length]=0,this.words[this.words.length]=f,this.words[this.words.length]=1,o++):(this.words[this.words.length-2]+=f,this.words[this.words.length-1]++),s=!1)}else h+=1}this._textRuns_words[this._textRuns_words.length]=o,this._textRuns_words[this._textRuns_words.length]=n,this._textRuns_words[this._textRuns_words.length]=a,this._maxWidthLine=0;h--){p=this.chars_codes[h],u=this.tf_per_char_prev[h];if(this.chars_codes_prev[h]&&(this.chars_codes_prev[h]!=p||this.tf_per_char_prev[h]._style_name!=u._style_name)){this._textShapesDirty=!0;break}}else this._textShapesDirty=!0},e.prototype.adjustPositionForAutoSize=function(t){var e=this._width;this._width=4+t,this._autoSize==Bu.RIGHT?(this._transform.matrix3D._rawData[12]-=this._width-e,this._transform.invalidatePosition()):this._autoSize==Bu.CENTER&&(this._transform.matrix3D._rawData[12]-=(this._width-e)/2,this._transform.invalidatePosition())},e.prototype.getWordPositions=function(){var t,e=0,n=this._textRuns_formats.length,r=0,i=0,o=0,a=0,s=0;this._numLines=0;var u=0,l=0,c=0,h=this.textOffsetY+2;if(this._autoSize!=Bu.NONE&&!this._wordWrap&&this._textDirty){var p=this._maxWidthLine+this._textFormat.indent+this._textFormat.leftMargin+this._textFormat.rightMargin;this.adjustPositionForAutoSize(p)}var d=this._width-(this._textFormat.indent+this._textFormat.leftMargin+this._textFormat.rightMargin),f=0,g=this._paragraph_textRuns_indices.length;u=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0;var _=[],m=[];for(f=0;f0?I/2:2:t.align==Mu.RIGHT?x+=I>0?I-2:2:t.align==Mu.LEFT&&(x+=2);var T=0,P=x;this.lines_start_x[E]=x,this.lines_start_y[E]=h,this.lines_charIdx_start[E]=D;var B=0;for(r=v;r0?M-2:0,this.words[r+2]=h+M,w=v;wa&&(this._biggestLine=E,a=B)}if(this._textWidth=a,this._textHeight=h,this.autoSize!=Bu.NONE&&(this._height=this._textHeight+4),this._textWidth>this._width){v=this.lines_charIdx_start[this._biggestLine],w=this.lines_charIdx_end[this._biggestLine];for(var L=0;w>v;)if(w--,(L+=this.chars_width[w])>this._width){this._maxScrollH=w;break}}if(this._textHeight>this._height){var N=this.lines_height.length;for(L=4;N>0;)if(N--,(L+=this.lines_height[N])>this._height){this._maxScrollV=N+1;break}}this.updateMaskMode()},e.prototype.buildGlyphsForLabelData=function(){this._clearTextShapes();for(var t,e,n=[],r=[],i=[],o=[],a=this.staticMatrix.tx/20,s=this.staticMatrix.ty/20,u=0,l=0;l0?n[l].font_table=n[l-1].font_table:console.log("error - no font for label"),t.fontHeight?n[l].size=t.fontHeight/20:l>0&&(n[l].size=n[l-1].size),t.color?n[l].color=x.f32_RGBA_To_f32_ARGB(t.color):l>0&&(n[l].color=n[l-1].color),null!=t.moveY&&(u=s+=t.moveY/20-u),null!=t.moveX&&(a=this.staticMatrix.tx/20+t.moveX/20),o.push(a),o.push(s);for(var c=0;cf?h.x:f;for(var _ in this._textWidth=f,this._textHeight=g,this.targetGraphics=this._graphics,this.targetGraphics.clear(),this.drawBG(),(this.border||!this._background&&this._type!=Ou.INPUT)&&this.drawBorder(),this.textShapes){e=this.textShapes[_];for(var m=new li(e.length/2),y=new Float32Array(m.attributesBuffer.buffer),A=0,v=0,b=e.verts;v=this.char_positions_x.length||(e.x=this.char_positions_x[t],e.width=this.chars_width[t],e.y=this.char_positions_y[t],e.height=10),e},e.prototype.getCharIndexAtPoint=function(t,e,n){void 0===n&&(n=-1),n<0&&(n=this.getLineIndexAtPoint(t,e));for(var r=this.lines_charIdx_start[n],i=this.lines_charIdx_end[n],o=r;o=this.char_positions_x[o]){if(t<=this.char_positions_x[o]+this.chars_width[o]/2)return o;if(t<=this.char_positions_x[o]+this.chars_width[o])return o+1}return-1},e.prototype.getFirstCharInParagraph=function(t){return console.log("Textfield.getFirstCharInParagraph() not implemented"),this._firstCharInParagraph},e.prototype.getImageReference=function(t){return console.log("TextField.getImageReference() not implemented"),this._imageReference},e.prototype.getLineIndexAtPoint=function(t,e){for(var n=this.lines_start_y.length,r=0;r=this.lines_start_y[r]&&e<=this.lines_start_y[r+1])return r;return e>=this.lines_start_y[n-1]?n-1:0},e.prototype.getLineIndexOfChar=function(t){this.buildParagraphs();for(var e=this.lines_charIdx_start.length-1,n=void 0;n=this.lines_charIdx_start[n]&&t<=this.lines_charIdx_end[n+1])return n;return e},e.prototype.getLineLength=function(t){return 0==this.lines_width.length?0:t>=this.lines_width.length?this.lines_width[this.lines_width.length-1]:this.lines_width[t]},e.prototype.getLineMetrics=function(t){var e=new Hc;return this.lines_width.length?(t>=this.lines_width.length&&(t=this.lines_width.length-1),e.x=this.lines_start_x[t],e.width=this.lines_width[t],e.height=this.lines_height[t],e):e},e.prototype.getLineOffset=function(t){return 0==this.lines_charIdx_start.length?0:t>=this.lines_charIdx_start.length?this.lines_charIdx_start[this.lines_charIdx_start.length-1]:this.lines_charIdx_start[t]},e.prototype.getLineText=function(t){return 0==this.lines_charIdx_start.length?"":(t>=this.lines_width.length&&(t=this.lines_width.length-1),this._iText.slice(this.lines_charIdx_start[t],this.lines_charIdx_end[t]))},e.prototype.getParagraphLength=function(t){return this._paragraphLength},e.prototype.getTextFormat=function(t,e){if(void 0===t&&(t=-1),void 0===e&&(e=-1),!this.tf_per_char||!this.tf_per_char.length)return this._textFormat?this._textFormat.clone():new zc;t<0&&(t=0),e>this.tf_per_char.length&&(e=this.tf_per_char.length);for(var n=this.tf_per_char[t].clone(),r=this.tf_per_char[t],i=t+1;i=this._iTextWoLineBreaks.length){var r=this._textFormats.length;if(1===this._textFormats.length&&this._textFormats[0].equal(t))return;for(var i=0;i0&&(l=c),c=this._textFormatsIdx[f],o=this._textFormats[f],l<=e&&c>e){for(ln){g=o.clone();t.applyToFormat(g),s.push(g),u.push(n),s.push(o),u.push(c)}}else s.push(this._textFormats[f]),u.push(this._textFormatsIdx[f]);for(this._textFormats.length=0,this._textFormatsIdx.length=0,a=0;athis._selectionBeginIndex?(this._selectionEndIndex+=1,n||(this._selectionBeginIndex=this._selectionEndIndex)):(this._selectionBeginIndex+=1,n||(this._selectionEndIndex=this._selectionBeginIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionBeginIndex=this._selectionEndIndex:this._selectionEndIndex=this._selectionBeginIndex,a=!0;else if("ArrowLeft"==t)n||this._selectionEndIndex==this._selectionBeginIndex?this._selectionEndIndex>this._selectionBeginIndex?(this._selectionBeginIndex-=1,n||(this._selectionEndIndex=this._selectionBeginIndex)):(this._selectionEndIndex-=1,n||(this._selectionBeginIndex=this._selectionEndIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionEndIndex=this._selectionBeginIndex:this._selectionBeginIndex=this._selectionEndIndex,a=!0;else if("Enter"==t&&this.multiline)this._insertNewText("\n"),a=!0;else if(1==t.length){if(this._restrictRegex){var l=t.replace(this._restrictRegex,"");if(l.lengtht.length&&(t=l)}if(""==t)return}if(this.newTextFormat.font_table){var p=this.newTextFormat.font_table,d=t.charCodeAt(0).toString(),f=!1;if(!(f=(f=(f=f||p.hasChar(d))||p.hasChar(d.toLowerCase()))||p.hasChar(d.toUpperCase())))return void console.log("Char not found",d)}this._insertNewText(t),a=!0}else t.length>1&&console.log("invalid keyboard input: ",t);a&&(this._glyphsDirty=!0,this.invalidate(),s!==this._iText&&this.dispatchEvent(e._onChangedEvent))}if(t&&t.length>0&&this.adapter!=this){var g=void 0;switch(t){case"Backspace":g=8;break;case"Delete":g=46;break;case"ArrowRight":g=39;break;case"ArrowLeft":g=37;break;case".":g=189;break;default:g=t.charCodeAt(0)}this.adapter.dispatchKeyEvent(g,n,r,i)}},e.prototype._insertNewText=function(t){if(this._selectionBeginIndex!=this._selectionEndIndex){var e=this._iText.slice(0,this._selectionBeginIndex),n=this._iText.slice(this._selectionEndIndex,this._iText.length);if(this.maxChars>0&&e.length+n.length+t.length>this.maxChars){var r=this.maxChars-e.length+n.length;r>0&&(t=t.slice(0,r))}this.text=e+t+n,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}else if(this.maxChars>0&&this._iText.length>=this.maxChars);else{e=this._iText.slice(0,this._selectionBeginIndex),n=this._iText.slice(this._selectionEndIndex,this._iText.length);this.text=e+t+n,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}},e.prototype.clone=function(){var t=e.getNewTextField();return this.copyTo(t),t},e.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.autoSize=this.autoSize,e.type=this._type,e.html=this.html,e.width=this._width,e.height=this._height,this._textFormat&&(e.textFormat=this._textFormat.clone()),e.textColor=this._textColor,e.border=this._border,e.borderColor=this._borderColor,e.background=this._background,e.backgroundColor=this._backgroundColor,e.textOffsetX=this.textOffsetX,e.textOffsetY=this.textOffsetY,e.staticMatrix=this.staticMatrix,e.selectable=this._selectable,e.multiline=this.multiline,e.wordWrap=this.wordWrap,e.maxChars=this.maxChars,e.sourceTextField=this,e.html?e.htmlText=this.htmlText:e.text=this.text,this._labelData&&e.setLabelData(this._labelData)},e.prototype._clearTextShapes=function(){var t;for(var e in this._textShapesDirty=!1,this.last_word_vertices_count=0,this.tf_per_char_prev.length=0,this.chars_codes_prev.length=0,this._words_amount_prev=0,this.targetGraphics&&this.targetGraphics.clear(),this.textShapes)(t=this.textShapes[e]).shape&&t.shape.dispose(),t.shape=null,t.elements=null,t.length=0,delete this.textShapes[e]},e._textFields=[],e.assetType="[asset TextField]",e._onChangedEvent=new Yc(Yc.CHANGED),e}(nu);mi.registerAbstraction(Ai,bh);var Ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createMovieClip=function(t,e){return void 0===t&&(t=null),new Cu(t)},e.prototype.createSprite=function(t,e,n){return void 0===t&&(t=null),t?t.getNewObject():new ru},e.prototype.createDisplayObjectContainer=function(t){return new nu},e.prototype.createTextField=function(t){return new bh},e.prototype.createBillboard=function(t,e){return new cu(t)},e.prototype.createMaterial=function(t,e,n){return new Pc(t,e)},e.prototype.createFrameScripts=function(t,e,n,r){throw"[DefaultSceneGraphFactory] - createFrameScripts should be overwritten by AVM"},e}(Jr),Ih=new T(0,0),Eh=function(t){function e(e,n,r,i,o,a){void 0===r&&(r=!0),void 0===i&&(i=4294967295),void 0===o&&(o=!0),void 0===a&&(a=null);var s=t.call(this,e,n,r,null,o,a)||this;return s._initalFillColor=null,s._lastUsedFill=null,s._internalSync=!1,s._msaaNeedDrop=!1,s._enforceMSAASupport=!1,s._antialiasQuality=Zs,s._initalFillColor=i,s._lastUsedFill=i,s}return n(e,t),e.getImage=function(t,n,r,i,o,a,s){void 0===r&&(r=!0),void 0===i&&(i=4294967295),void 0===o&&(o=!0),void 0===a&&(a=null),void 0===s&&(s=!1);var u=new e(t,n,r,i,o,a);return s?u._enforceMSAASupport=!0:(u._msaaNeedDrop=!0,u._antialiasQuality=0),u},e.tryStoreImage=function(t,e){e.filterManager.pushTemp(t)},e.getTemp=function(t,e,n,r){void 0===r&&(r=!1);var i=n.filterManager.popTemp(t,e,r&&Zs>1);return i.antialiasQuality=r?Zs:0,i},e.prototype._dropMSAA=function(){!this._msaaNeedDrop&&this.canUseMSAAInternaly&&(this._enforceMSAASupport=!1,this._msaaNeedDrop=!0,this.wasUpload&&t.prototype.unload.call(this),console.debug("[SceneImage2D Experemental] Drop MSAA support because a setPixel* operation called after upload.",this.id))},Object.defineProperty(e.prototype,"canUseMSAAInternaly",{get:function(){if(this._enforceMSAASupport)return!0;var t=tu,e=tu;return this._stage&&(e=Math.min(this._stage.height,e),t=Math.min(this._stage.width,t)),this.width>=t&&this.height>=e&&!this._msaaNeedDrop},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"antialiasQuality",{get:function(){return this.canUseMSAAInternaly?this._antialiasQuality:0},enumerable:!0,configurable:!0}),e.prototype.syncData=function(t){var e=this;if(void 0===t&&(t=!1),t&&this._asyncRead)return this._asyncRead;if(!t&&this._asyncRead)throw"[SceneImage2D] Synced read not allowed while async read is requested!";if(this.applySymbol(),!this._imageDataDirty)return!!t&&Promise.resolve(!1);var n=this._stage.context;return this._stage.setRenderTarget(this,!1),this._data||(this._data=new Uint8ClampedArray(this.width*this.height*4)),this._internalSync=!0,this._asyncRead=n.drawToBitmapImage2D(this,!1,t),this._internalSync=!1,this._stage.setRenderTarget(null),t?this._asyncRead.then((function(t){return e._imageDataDirty=!1,e._unpackPMA=!1,e._asyncRead=null,!0})):(this._imageDataDirty=!1,this._unpackPMA=!1,!0)},e.prototype.getDataInternal=function(e,n){if(void 0===e&&(e=!0),void 0===n&&(n=!1),!n&&this._imageDataDirty&&!this._internalSync)return this.syncData(!1),this._data;if(null===this._initalFillColor)return t.prototype.getDataInternal.call(this,e,!0);var r=t.prototype.getDataInternal.call(this,!1,!0);return r||(t.prototype.fillRect.call(this,this.rect,this._initalFillColor),this._initalFillColor=null,this._data)},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!0,configurable:!0}),e.prototype.createRenderer=function(){var t=new vt;t.coordinateSystem=gt.RIGHT_HANDED,t.originX=-1,t.originY=1,e._root=new nu,e._rootNode=fi.getRootNode(e._root,yi),e._renderer=ro.getInstance(new _i(t,this._stage,null,null,null,!0),Co).getRenderer(e._rootNode.partition),e._renderer.disableClear=!0,e._renderer.view.backgroundAlpha=0,e._renderer.view.projection=t,e._renderer.view.projection.transform=new F,e._renderer.view.projection.transform.scaleTo(1,-1,1),e._renderer.view.projection.transform.moveTo(0,0,-1e3),e._renderer.renderableSorter=null},e.prototype.createBillboardRenderer=function(){var t=new vt;t.coordinateSystem=gt.RIGHT_HANDED,t.originX=-1,t.originY=1,e._billboardRoot=new nu,e._billboardRenderer=ro.getInstance(new _i(t,this._stage,null,null,null,!0),Co).getRenderer(fi.getRootNode(e._billboardRoot,yi).partition),e._billboardRenderer.disableClear=!0,e._billboardRenderer.view.backgroundAlpha=0,e._billboardRenderer.view.projection=t,e._billboardRenderer.view.projection.transform=new F,e._billboardRenderer.view.projection.transform.moveTo(0,0,-1e3),e._billboardRenderer.view.projection.transform.lookAt(new B),e._billboardRenderer.renderableSorter=null;var n=new Pc(new en(128,128,!0,0));n.bothSides=!0,n.alphaBlending=!0,e._billboard=new cu(n),e._billboard.style=new Qi,e._billboardRoot.addChild(e._billboard)},e.prototype.dispose=function(){this.dropAllReferences(),this.unmarkToUnload(),this.unuseWeakRef(),this._data=null,this._locked=!1,t.prototype.dispose.call(this)},e.prototype.unload=function(){var e=this,n=this.syncData(!0);"boolean"==typeof n?t.prototype.unload.call(this):n.then((function(){return t.prototype.unload.call(e)}))},e.prototype.deepClone=function(t){this.copyPixels(t,this._rect,new T(0,0))},e.prototype.fillRect=function(t,e){this.dropAllReferences();var n=x.float32ColorToARGB(e),r=this._transparent?n[0]/255:1,i=t!==this._rect&&!this._rect.equals(t);this._stage.setRenderTarget(this,!0,0,0,!0),this._stage.setScissor(t),this._lastUsedFill=i?null:e,this._stage.clear(n[1]/255*r,n[2]/255*r,n[3]/255*r,r),this._stage.setScissor(null),this._imageDataDirty=!0},e.prototype.copyPixels=function(t,e,n,r,i,o){if(this._lastUsedFill=null,this.dropAllReferences(),this.unmarkToUnload(),o=this.transparent!==t.transparent||o,!t._imageDataDirty&&e.equals(this._rect)&&this._rect.equals(t.rect)&&!o&&(!this.wasUpload||!t.wasUpload)){var a=t.getDataInternal(!0);return this._data?this._data.set(a):this._data=a.slice(),this._unpackPMA=t._unpackPMA,this._initalFillColor=null,this._imageDataDirty=!1,void this.invalidateGPU()}t.width,t.height,null!==this._initalFillColor&&(this.fillRect(this._rect,this._initalFillColor),this._initalFillColor=null),this._stage.copyPixels(t,this,e,n,r,i,o),this._imageDataDirty=!0},e.prototype.threshold=function(t,e,n,r,i,o,a,s){this._lastUsedFill=null,this.dropAllReferences(),this.unmarkToUnload(),this._stage.threshold(t,this,e,n,r,i,o,a,s),this._imageDataDirty=!0},e.prototype.applyFilter=function(t,e,n,r){return!1},e.prototype.colorTransform=function(t,e){this.dropAllReferences(),this.unmarkToUnload(),this._lastUsedFill=null,this._stage.colorTransform(this,this,t,e),this._imageDataDirty=!0},e.prototype.setPixel=function(e,n,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel.call(this,e,n,r)},e.prototype.setPixel32=function(e,n,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel32.call(this,e,n,r)},e.prototype.setPixels=function(e,n){this.wasUpload&&this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixels.call(this,e,n)},e.prototype.getPixel32=function(e,n){return this.syncData(),t.prototype.getPixel32.call(this,e,n)},e.prototype.getPixel=function(t,e){return 16777215&this.getPixel32(t,e)},e.prototype.draw=function(t,e,n,r,i,o){this.dropAllReferences(),this.unmarkToUnload(),t instanceof eu?this._drawAsDisplay(t,e,n,r,i,o):this._drawAsBitmap(t,e,n,r,i,o),this._lastUsedFill=null,this._imageDataDirty=!0},e._mapSupportedBlendMode=function(t){switch(void 0===t&&(t=""),t){case null:case"":case pn.NORMAL:case pn.LAYER:return pn.LAYER;case pn.MULTIPLY:case pn.ADD:case pn.ALPHA:return t}return pn.LAYER},e.prototype._drawAsBitmap=function(t,n,r,i,o,a){e._billboardRenderer||this.createBillboardRenderer(),null!==this._initalFillColor&&(this.fillRect(this._rect,this._initalFillColor),this._initalFillColor=null);var s=e._billboardRenderer,u=e._billboardRoot,l=e._billboard;if(l.sampler.smooth=a,s.disableClear=!0,s.view.target=this,s.view.projection.scale=1e3/this.rect.height,l.material.style.image=t,l.material.blendMode=e._mapSupportedBlendMode(i),l.material.useColorTransform=!!r,n){var c=u.transform.matrix3D;c.identity(),c._rawData[0]=n.a,c._rawData[1]=-n.b,c._rawData[4]=n.c,c._rawData[5]=-n.d,c._rawData[12]=n.tx,c._rawData[13]=this.rect.height-n.ty,u.transform.invalidateComponents()}else u.transform.rotateTo(0,0,0),u.transform.scaleTo(1,-1,1),u.transform.moveTo(0,this.rect.height,0);u.transform.colorTransform=r,s.render()},e.prototype._drawAsDisplay=function(t,n,r,i,o,a){void 0===i&&(i=""),i=i||pn.LAYER,e._renderer||this.createRenderer();var s=e._root,u=e._rootNode,l=e._renderer,c=this.canUseMSAAInternaly,h=!t.isAsset(cu)&&2===this._stage.context.glVersion&&Zs>1&&!c,p=this;h||null===this._initalFillColor||(this.fillRect(this._rect,this._initalFillColor),this._initalFillColor=null);var d=i!==pn.LAYER||null===this._lastUsedFill,f=d||h;f&&(p=e.getTemp(this.width,this.height,this._stage,h),null!==this._lastUsedFill?(l.disableClear=!1,l.view.backgroundColor=this._lastUsedFill,l.view.backgroundAlpha=(this._lastUsedFill>>>24&255)/255):(l.disableClear=!1,l.view.backgroundColor=0,l.view.backgroundAlpha=0));var g=l.view.projection.transform,_=g.matrix3D;if(_.identity(),n){var m=_._rawData;m[0]=n.a,m[1]=n.b,m[4]=n.c,m[5]=n.d,m[10]=1,m[12]=n.tx,m[13]=n.ty}_.appendScale(1,-1,1),_.appendTranslation(0,this._rect.height,1e3),_.invert(),g.matrix3D=_,l.antiAlias=(c?this.antialiasQuality:p.antialiasQuality)||0,l.view.target=p,l.view.projection.scale=1e3/this._rect.height,l.view.projection.ratio=this._rect.width/this._rect.height,l.view.x=-(p.width-this.width),l.view.y=-(p.height-this.height),l.view.width=this.width,l.view.height=this.height,u.addChildAt(t,0).transformDisabled=!0,s.transform.colorTransform=r,s.blendMode=e._mapSupportedBlendMode(i),l.render(),l.antiAlias=0,l.disableClear=!0,u.removeChildAt(0),f&&(this._stage.filterManager.copyPixels(p,this,this._rect,Ih,d,i),e.tryStoreImage(p,this._stage))},e.prototype.reset=function(){},e.assetType="[image SceneImage2D]",e}(en);Yr.registerAbstraction(nn,Eh);var xh=function(){function t(t){this._pickerLookup=new Array,this.allowKeyInput=!0,this._collisionIsEnabledButton=!1,this._eventBubbling=!0,this._allowFocusOnUnfocusable=!0,this._cursorType="auto",this._nullVector=new B,this._queuedEvents=new Array,this._mouseUp=new vu(vu.MOUSE_UP),this._mouseUpOutside=new vu(vu.MOUSE_UP_OUTSIDE),this._mouseClick=new vu(vu.CLICK),this._mouseOut=new vu(vu.MOUSE_OUT),this._dragOut=new vu(vu.DRAG_OUT),this._dragOver=new vu(vu.DRAG_OVER),this._mouseDown=new vu(vu.MOUSE_DOWN),this._mouseMove=new vu(vu.MOUSE_MOVE),this._mouseOver=new vu(vu.MOUSE_OVER),this._mouseWheel=new vu(vu.MOUSE_WHEEL),this._mouseDoubleClick=new vu(vu.DOUBLE_CLICK),this._rollOver=new vu(vu.ROLL_OVER),this._rollOut=new vu(vu.ROLL_OUT),this._dragMove=new vu(vu.DRAG_MOVE),this._dragStart=new vu(vu.DRAG_START),this._dragStop=new vu(vu.DRAG_STOP),this._useSoftkeyboard=!1,this._isAVM1Dragging=!1,this._isDown=!1,this._stage=t,this.onClick=this.onClick.bind(this),this.onDoubleClick=this.onDoubleClick.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.buttonEnabledDirty=!1,this._isTouch="ontouchstart"in self||navigator.msMaxTouchPoints>0,this._showCursor=!0,this._mouseDragging=!1;var e=this._stage.container;e.addEventListener("click",this.onClick),e.addEventListener("dblclick",this.onClick),e.addEventListener("touchstart",this.onMouseDown),e.addEventListener("mousedown",this.onMouseDown),window.addEventListener("touchmove",this.onMouseMove),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),e.addEventListener("touchend",this.onMouseUp),e.addEventListener("touchend",this.onClick),e.addEventListener("mousewheel",this.onMouseWheel),e.addEventListener("mouseover",this.onMouseOver),e.addEventListener("mouseout",this.onMouseOut),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("contextmenu",(function(t){return t.preventDefault()}))}return t.prototype.startDragObject=function(t){this._isAVM1Dragging=!0,this._mouseDragCollision||(this._mouseDragCollision=t)},t.prototype.stopDragObject=function(){this._isAVM1Dragging=!1},Object.defineProperty(t.prototype,"showCursor",{get:function(){return this._showCursor},set:function(t){this._showCursor=t,this.cursorType=this._cursorType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cursorType",{get:function(){return this._cursorType},set:function(t){this._cursorType=t,this._stage.container.style.cursor=this._showCursor?t:"none"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventBubbling",{get:function(){return this._eventBubbling},set:function(t){this._eventBubbling=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useSoftkeyboard",{get:function(){return this._useSoftkeyboard},set:function(t){this._useSoftkeyboard=t,t?t&&(window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)):(window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){var t=this._stage.container;t.removeEventListener("click",this.onClick),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("touchstart",this.onMouseDown),t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("touchmove",this.onMouseMove),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchend",this.onMouseUp),t.removeEventListener("touchend",this.onClick),t.removeEventListener("wheel",this.onMouseWheel),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),this._stage=null,this._mouseMoveEvent=null,this._mouseUp=null,this._mouseUpOutside=null,this._mouseClick=null,this._mouseOut=null,this._dragOut=null,this._dragOver=null,this._mouseDown=null,this._mouseMove=null,this._mouseOver=null,this._mouseWheel=null,this._mouseDoubleClick=null,this._dragMove=null,this._dragStart=null,this._dragStop=null},t.clearInstance=function(t){this._instancePool[t.id]&&(this._instancePool[t.id].dispose(),delete this._instancePool[t.id])},t.getInstance=function(e){return this._instancePool[e.id]||(this._instancePool[e.id]=new t(e))},t.prototype.setFocus=function(t){this._focusContainer!=t&&(this._focusContainer&&this._focusContainer.setFocus(!1,!1),this._focusContainer=t,this._focusContainer&&this._focusContainer.setFocus(!0,!1))},t.prototype.getFocus=function(){return this._focusContainer},t.prototype.dispatchEvent=function(t,e){if(this._eventBubbling)for(;e;){if(t.commonAncestor&&e==t.commonAncestor)return;e.isMouseDisabled()||(e.container.dispatchEvent(t),bu.execute_queue()),e=t._iAllowedToPropagate?e.parent:null}else e&&(e.container.dispatchEvent(t),bu.execute_queue())},t.prototype.setupAndDispatchEvent=function(t,e,n,r){void 0===r&&(r=null),e&&(t.delta=e.wheelDelta,t.ctrlKey=e.ctrlKey,t.altKey=e.altKey,t.shiftKey=e.shiftKey),t=this.setUpEvent(t,n,r),this.dispatchEvent(t,t.rootNode)},t.prototype.fireMouseEvents=function(t){var e,n,r,i,o,a;if(void 0===t&&(t=null),t)a=t.getViewCollision(this._stage.screenX,this._stage.screenY);else if(this._updateDirty)for(var s=0;s=65&&t<=90?t-65:t>=97&&t<=122?t-71:t>=48&&t<=57?t+4:36===t?62:95===t?63:void 0}var Oh=new Array(3),Mh=new Array(4),Lh=new Array(9);function Nh(t,e,n){return Oh[0]=t,Oh[1]=e,Oh[2]=n,Oh.join("")}function Rh(t,e,n,r){return Mh[0]=t,Mh[1]=e,Mh[2]=n,Mh[3]=r,Mh.join("")}var Fh={repeatString:function(t,e){for(var n="",r=0;r>>24&3,e[n++]=128|o>>>18&63,e[n++]=128|o>>>12&63,e[n++]=128|o>>>6&63,e[n++]=128|63&o):0!=(4294901760&o)?(e[n++]=240|o>>>18&7,e[n++]=128|o>>>12&63,e[n++]=128|o>>>6&63,e[n++]=128|63&o):0!=(4294965248&o)?(e[n++]=224|o>>>12&15,e[n++]=128|o>>>6&63,e[n++]=128|63&o):(e[n++]=192|o>>>6&31,e[n++]=128|63&o)}}return e.subarray(0,n)},utf8encode:function(t){for(var e=0,n="";e>1|128))===i)break;i=i>>1|128,--o}while(o>=0);if(o<=0){n+=String.fromCharCode(r);continue}for(var a=r&(1<=o;--u){var l=t[e++];if(128!=(192&l)){s=!0;break}a=a<<6|63&l}if(s){for(var c=e-(7-u);c=65536?String.fromCharCode(a-65536>>10&1023|55296,1023&a|56320):String.fromCharCode(a)}}return n},base64EncodeBytes:function(t){for(var e,n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=t.byteLength,o=i%3,a=i-o,s=0;s>18],r[(258048&e)>>12],r[(4032&e)>>6],r[63&e]);return 1==o?n+=Nh(r[(252&(e=t[a]))>>2],r[(3&e)<<4],"=="):2==o&&(n+=Rh(r[(64512&(e=t[a]<<8|t[a+1]))>>10],r[(1008&e)>>4],r[(15&e)<<2],"=")),n},base64DecodeMap:Th,base64DecodeMapOffset:43,base64EOF:61,decodeRestrictedBase64ToBytes:function(t){for(var e,n,r,i=t.length,o="="===t.charAt(i-2)?2:"="===t.charAt(i-1)?1:0,a=new Uint8Array(3*(t.length>>2)-o),s=0,u=0;s>4,61==(e=t.charCodeAt(s++)))return a;if(n=Th[e-43],a[u++]=(15&r)<<4|(60&n)>>2,61==(e=t.charCodeAt(s++)))return a;r=Th[e-43],a[u++]=(3&n)<<6|r}return a},escapeString:function(t){return void 0!==t&&(t=t.replace(/[^\w$]/gi,"$"),/^\d/.test(t)&&(t="$"+t)),t},fromCharCodeArray:function(t){for(var e="",n=0;n=0;o--){i+=e[t>>6*o&63]}return i},toEncoding:function(t){return Ph[t]},fromEncoding:Bh,variableLengthDecodeInt32:function(t){for(var e=Bh(t.charCodeAt(0)),n=0,r=0;r>1,r=e-n-1;return t.substr(0,n)+"…"+t.substr(t.length-r,r)},multiple:function(t,e){for(var n="",r=0;r=0&&(r=Math.min(r,o))}return r===t.length?-1:r},_concat3array:Oh,_concat4array:Mh,_concat9array:Lh,concat3:Nh,concat4:Rh,concat9:function(t,e,n,r,i,o,a,s,u){return Lh[0]=t,Lh[1]=e,Lh[2]=n,Lh[3]=r,Lh[4]=i,Lh[5]=o,Lh[6]=a,Lh[7]=s,Lh[8]=u,Lh.join("")}};function kh(t){return function(t){return t/256}(function(t){return 256*t<<16>>16}(t))}function Uh(t){return t<<16>>16}Math.imul||(Math.imul=function(t,e){var n=65535&t,r=65535&e;return n*r+((t>>>16&65535)*r+n*(e>>>16&65535)<<16>>>0)|0}),Math.clz32||(Math.clz32=function(t){return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,32-function(t){return 16843009*((t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135)>>24}(t|=t>>16)});var jh="undefined"!=typeof window&&"document"in window&&"plugins"in window.document;"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Firefox"),wh.performance||(wh.performance={}),wh.performance.now||(wh.performance.now=function(){return Date.now()}),performance.now();var Vh=429496729;function Qh(t){return"string"==typeof t}function Gh(t){return"number"==typeof t}function zh(t){return"object"==typeof t||"function"==typeof t}function Hh(t){return+t}function Xh(t){if("number"==typeof t)return!0;if("string"==typeof t){var e=t.charCodeAt(0);return!(65<=e&&e<=90||97<=e&&e<=122||36===e||95===e)&&(Yh(t)||function(t){return String(Number(t))===t}(t))}return!1}function Yh(t){var e=0;if("number"==typeof t)return t===(e=0|t)&&e>=0||t>>>0===t;if("string"!=typeof t)return!1;var n=t.length;if(0===n)return!1;if("0"===t)return!0;if(n>10)return!1;var r=0;if((e=t.charCodeAt(r++)-48)<1||e>9)return!1;for(var i=0,o=0;r9)return!1;i=e,e=10*e+o}return i0&&(this._padding=this._padding.substring(0,this._padding.length-this._tab.length))},t.prototype.writeArray=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),e=e||!1;for(var r=0,i=t.length;r=e)return r;for(var o=(e-i)/t.length,a=0;a=e)return n;for(var i=(e-r)/t.length,o=0;o>3,a=n*e*o,s=n*o,u=t.length+(1&t.length),l=new ArrayBuffer(yp.length+u),c=new Uint8Array(l);if(c.set(yp),i)for(var h=0,p=yp.length;h>>(a-=e)&(1<>16,d=r(6);n>1&&(c=e[s++]=r(16)<<16>>16,h=r(6));for(var f=1<>1;A;A>>=1,m>>=1)_&A&&(y+=m);if(p+=(_&f?-1:1)*(y+m),e[s++]=p=p<-32768?-32768:p>32767?32767:p,d=(d+=l[_&~f])<0?0:d>88?88:d,n>1){_=r(u+2),m=Cp[h],y=0;for(A=f>>1;A;A>>=1,m>>=1)_&A&&(y+=m);c+=(_&f?-1:1)*(y+m),e[s++]=c=c<-32768?-32768:c>32767?32767:c,h=(h+=l[_&~f])<0?0:h>88?88:h}}}}(a,l,r),e=new Float32Array(i*r);for(s=0;s0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._sound.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sound",{get:function(){return this._sound},enumerable:!0,configurable:!0}),t.prototype.playFrom=function(t){this.stop(),this._sound.play(t)},t.prototype.stop=function(){this._sound&&this._sound.stop()},Object.defineProperty(t.prototype,"paused",{get:function(){return!1},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this._sound.isPlaying},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!!this._sound},enumerable:!0,configurable:!0}),t.prototype.queueData=function(t){t.pcm&&(this._frameData.push(t),this._byteLength+=t.data.length)},t.prototype.finish=function(){for(var t=new Int8Array(this._byteLength),e=0;e1)&&this._soundStreams.push(new Op(this.soundStreamHead)),this.lastFrameNum=t,this._soundStreams[this._soundStreams.length-1].appendBlock(t,e),this._frameToSoundStream[t]=this._soundStreams[this._soundStreams.length-1])},t.prototype.stopStream=function(t){this._frameToSoundStream[t]&&(this._frameToSoundStream[t].stopped=!0)},t.prototype.resetStreamStopped=function(){for(var t=0;t0&&this.frameIdx>this.config.settings.stopRecAfterFrame&&this.finishTest(),this._finished||(0!=this.config.settings.snapShotFrames&&this.frameIdx%this.config.settings.snapShotFrames==0&&this.takeSnapshot(),this.config.settings.onlyTraces||(this.frames[this.frames.length-1].messages.length>0?this.frames.push({messages:[],frameIdx:this.frameIdx}):this.frames[this.frames.length-1].frameIdx=this.frameIdx))},t.prototype.checkIfFinished=function(){if(this.config.frames){if(this.config.frames.length=n&&this.finishTest()}}},t.prototype.finishTest=function(){this._finished||(this._finished=!0,this.closeBrowserTab())},t.prototype.finishAndUploadTest=function(){0==this.frames[this.frames.length-1].messages.length&&this.frames.pop();var t=window.location.pathname.split("/").pop().replace(".html",""),e={player:"awayflplayer",duration:Date.now()-this.config.startRecTime,date:(new Date).toLocaleString(),url:t,swf:this.config.swfPath,swfInfos:this.swfInfo,settings:this.config.settings,frames:this.frames,events:this.events,seed:this.config.seed},n=JSON.stringify(e),r=new FormData,i=new Blob([n],{type:"text/xml"});if(this.config.recordtest){var o=this.config.swfPath.replace(/\\/g,"/");r.append("file",i,o),r.append("record","true")}else{o=this.config.swfPath.replace(/\\/g,"/")+"/"+this.config.testPath;r.append("file",i,o)}var a=new XMLHttpRequest;a.onreadystatechange=function(t){4==a.readyState&&(200==a.status||0==a.status?console.log("AWAYFLTEST END"):Fp())},a.onerror=function(t){Fp()};try{a.open("POST","http://localhost:"+this.config.port+"/upload",!0),a.send(r)}catch(t){Fp()}},t}(),Up=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._pProceedParsing=function(){var t=this.data.definition,e={sampleRate:t.sampleRate,samplesCount:t.samplesCount,startOffset:t.packaged.seek};return this._pContent=new I(new E(t.packaged.data.buffer,e)),this._pFinalizeAsset(this._pContent,this._iFileName),_t.PARSING_DONE},e}(mt),jp={},Vp=new Uint32Array(33),Qp=1,Gp=0;Qp<=32;++Qp)Vp[Qp]=Gp=Gp<<1|1;var zp,Hp,Xp,Yp,qp,Kp=function(){function t(t,e,n,r){void 0===e&&(e=0),t.buffer instanceof ArrayBuffer&&(e+=t.byteOffset,t=t.buffer),void 0===n&&(n=t.byteLength-e),void 0===r&&(r=n),this.bytes=new Uint8Array(t,e,r),this.view=new DataView(t,e,r),this.pos=0,this.end=n,this.bitBuffer=0,this.bitLength=0}return t.prototype.align=function(){this.bitBuffer=this.bitLength=0},t.prototype.ensure=function(t){if(this.pos+t>this.end)throw jp},t.prototype.remaining=function(){return this.end-this.pos},t.prototype.substream=function(e,n){var r=new t(this.bytes);return r.pos=e,r.end=n,r},t.prototype.push=function(t){var e=this.bytes,n=this.end+t.length;if(n>e.length)throw"stream buffer overfow";e.set(t,this.end),this.end=n},t.prototype.readSi8=function(){return this.view.getInt8(this.pos++)},t.prototype.readSi16=function(){var t=this.view.getInt16(this.pos,!0);return this.pos+=2,t},t.prototype.readSi32=function(){var t=this.view.getInt32(this.pos,!0);return this.pos+=4,t},t.prototype.readUi8=function(){return this.bytes[this.pos++]},t.prototype.readUi16=function(){var t=this.view.getUint16(this.pos,!0);return this.pos+=2,t},t.prototype.readUi32=function(){var t=this.view.getUint32(this.pos,!0);return this.pos+=4,t},t.prototype.readFixed=function(){var t=this.view.getInt32(this.pos,!0)/65536;return this.pos+=4,t},t.prototype.readFixed8=function(){var t=this.view.getInt16(this.pos,!0)/256;return this.pos+=2,t},t.prototype.readFloat16=function(){var t=this.view.getUint16(this.pos,!1);this.pos+=2;var e=t>>15?-1:1,n=(31744&t)>>10,r=1023&t;return n?31===n?r?NaN:e*(1/0):e*Math.pow(2,n-15)*(1+r/1024):e*Math.pow(2,-14)*(r/1024)},t.prototype.readFloat=function(){var t=this.view.getFloat32(this.pos,!0);return this.pos+=4,t},t.prototype.readDouble=function(){var t=this.view.getFloat64(this.pos,!0);return this.pos+=8,t},t.prototype.readEncodedU32=function(){var t=this.bytes,e=t[this.pos++];return 128&e&&16384&(e=127&e|t[this.pos++]<<7)&&2097152&(e=16383&e|t[this.pos++]<<14)&&268435456&(e=2097151&e|t[this.pos++]<<21)?268435455&e|t[this.pos++]<<28:e},t.prototype.readBool=function(){return!!this.bytes[this.pos++]},t.prototype.readSb=function(t){return this.readUb(t)<<32-t>>32-t},t.prototype.readUb=function(t){for(var e=this.bitBuffer,n=this.bitLength,r=0;t>n;)n>24&&(r=e<<(t-=n),n=0),e=e<<8|this.bytes[this.pos++],n+=8;return r|=e>>>(n-=t)&Vp[t],this.bitBuffer=e,this.bitLength=n,r},t.prototype.readFb=function(t){return this.readSb(t)/65536},t.prototype.readString=function(t){var e,n=this.bytes,r=this.pos;if(t>-1)e=n.subarray(r,r+=t);else{t=0;for(var i=r;n[i];i++)t++;e=n.subarray(r,r+=t),r++}this.pos=r;var o=Ro(e);return o.indexOf("\0")>=0&&(o=o.split("\0").join("")),o},t}();function Wp(t){t.align();var e=t.readUb(5),n=t.readSb(e),r=t.readSb(e),i=t.readSb(e),o=t.readSb(e);return t.align(),{xMin:n,xMax:r,yMin:i,yMax:o}}function Jp(t){return(t.readUi8()<<24|t.readUi8()<<16|t.readUi8()<<8|255)>>>0}function $p(t){return t.readUi8()<<24|t.readUi8()<<16|t.readUi8()<<8|t.readUi8()}function Zp(t){var e={a:1,b:0,c:0,d:1,tx:0,ty:0};if(t.align(),t.readUb(1)){var n=t.readUb(5);e.a=t.readFb(n),e.d=t.readFb(n)}if(t.readUb(1)){n=t.readUb(5);e.b=t.readFb(n),e.c=t.readFb(n)}n=t.readUb(5);return e.tx=t.readSb(n),e.ty=t.readSb(n),t.align(),e}function td(t,e){var n={redMultiplier:255,greenMultiplier:255,blueMultiplier:255,alphaMultiplier:255,redOffset:0,greenOffset:0,blueOffset:0,alphaOffset:0};t.align();var r=t.readUb(1),i=t.readUb(1),o=t.readUb(4);return i&&(n.redMultiplier=t.readSb(o),n.greenMultiplier=t.readSb(o),n.blueMultiplier=t.readSb(o),e&&(n.alphaMultiplier=t.readSb(o))),r&&(n.redOffset=t.readSb(o),n.greenOffset=t.readSb(o),n.blueOffset=t.readSb(o),e&&(n.alphaOffset=t.readSb(o))),t.align(),n}function ed(t,e,n,r){var i={code:n};if(i.actionBlocksPrecedence=t.pos,4===n)return i.symbolId=t.readUi16(),i.depth=t.readUi16(),i.flags|=4,i.matrix=Zp(t),t.pos26?t.readUi16():t.readUi8();if(i.depth=t.readUi16(),2048&o&&(i.className=t.readString(-1)),2&o&&(i.symbolId=t.readUi16()),4&o&&(i.matrix=Zp(t)),8&o&&(i.cxform=td(t,!0)),16&o&&(i.ratio=t.readUi16()),32&o&&(i.name=t.readString(-1)),64&o&&(i.clipDepth=t.readUi16()),256&o)for(var a=t.readUi8(),s=i.filters=[];a--;)s.push(rd(t));if(512&o&&(i.blendMode=t.readUi8()),1024&o&&(i.bmpCache=t.readUi8()),8192&o&&(i.visibility=t.readBool()),16384&o&&(i.backgroundColor=function(t){return t.readUi8()|t.readUi8()<<24|t.readUi8()<<16|t.readUi8()<<8}(t)),128&o){t.readUi16(),e>=6?t.readUi32():t.readUi16();for(var u=i.events=[],l=void 0;l=nd(t,e);){if(t.pos>r){console.log("PlaceObject handler attempted to read clip events beyond tag end"),t.pos=r;break}u.push(l)}}return i}function nd(t,e){var n=e>=6?t.readUi32():t.readUi16();if(!n)return null;var r={};6===e&&(n&=-262145),r.flags=n;var i=t.readUi32();131072&n&&(r.keyCode=t.readUi8(),i--);var o=t.pos+i;return r.actionsBlock=t.bytes.subarray(t.pos,o),t.pos=o,r}function rd(t){var e={},n=e.type=t.readUi8();switch(n){case zp.DROPSHADOW:case zp.GLOW:case zp.BEVEL:case zp.GRADIENTGLOW:case zp.GRADIENTBEVEL:var r,i=e;r=n===zp.GRADIENTGLOW||n===zp.GRADIENTBEVEL?t.readUi8():n===zp.BEVEL?2:1;for(var o=i.colors=[],a=r;a--;)o.push($p(t));if(n===zp.GRADIENTGLOW||n===zp.GRADIENTBEVEL){var s=i.ratios=[];for(a=r;a--;)s.push(t.readUi8())}return i.blurX=t.readFixed(),i.blurY=t.readFixed(),n!==zp.GLOW&&(i.angle=t.readFixed(),i.distance=t.readFixed()),i.strength=t.readFixed8(),i.inner=!!t.readUb(1),i.knockout=!!t.readUb(1),i.compositeSource=!!t.readUb(1),n===zp.BEVEL||n===zp.GRADIENTGLOW||n===zp.GRADIENTBEVEL?(i.onTop=!!t.readUb(1),i.quality=t.readUb(4)):i.quality=t.readUb(5),i;case zp.BLUR:var u=e;return u.blurX=t.readFixed(),u.blurY=t.readFixed(),u.quality=t.readUb(5),t.readUb(3),u;case zp.CONVOLUTION:var l=e,c=l.matrixX=t.readUi8(),h=l.matrixY=t.readUi8();l.divisor=t.readFloat(),l.bias=t.readFloat();var p=l.matrix=[];for(a=c*h;a--;)p.push(t.readFloat());return l.color=$p(t),t.readUb(6),l.clamp=!!t.readUb(1),l.preserveAlpha=!!t.readUb(1),l;case zp.COLORMATRIX:var d=e;for(p=d.matrix=[],a=20;a--;)p.push(t.readFloat());return d}return e}function id(t,e,n){var r={code:n};return 5===n?(r.depth=t.readUi16(),r.symbolId=t.readUi16()):r.depth=t.readUi16(),r}function od(t,e,n,r,i){var o,a={code:n};if(a.id=t.readUi16(),n>21){var s=t.readUi32();90===n&&(a.deblock=t.readFixed8()),s+=t.pos,o=a.imgData=t.bytes.subarray(t.pos,s),a.alphaData=t.bytes.subarray(s,r),t.pos=r}else o=a.imgData=t.bytes.subarray(t.pos,r),t.pos=r;switch(o[0]<<8|o[1]){case 65496:case 65497:a.mimeType="image/jpeg";break;case 35152:a.mimeType="image/png";break;case 18249:a.mimeType="image/gif";break;default:a.mimeType="application/octet-stream"}return 6===n&&(a.jpegTables={data:i}),a}function ad(t,e,n,r){var i={code:n};i.id=t.readUi16();var o,a=i.characters=[];if(7==n){for(;o=sd(t,e,n);)a.push(o);i.actionsData=t.bytes.subarray(t.pos,r),t.pos=r}else{var s=t.readUi8();i.trackAsMenu=!!(s>>7&1);for(var u=t.readUi16();o=sd(t,e,n);)a.push(o);if(u){for(var l=i.buttonActions=[];t.posr)break;l.push(c)}t.pos=r}}return i}function sd(t,e,n){var r=t.readUi8();if(!r)return null;var i={};if(e<8&&(r&=-769),i.flags=r,i.symbolId=t.readUi16(),i.depth=t.readUi16(),i.matrix=Zp(t),34===n&&(i.cxform=td(t,!0)),16&i.flags)for(var o=t.readUi8(),a=i.filters=[],s=o;s--;)a.push(rd(t));return 32&i.flags&&(i.blendMode=t.readUi8()),i}function ud(t,e){var n=t.pos,r=t.readUi16(),i=r?n+r:e,o=t.readUi16();return t.pos=i,{keyCode:(65024&o)>>9,stateTransitionFlags:511&o,actionsData:t.bytes.subarray(n+4,i)}}function ld(t,e,n){t.align();var r=t.readUb(4),i=t.readUb(4);return vd(t,e,n,!1,r,i,!1)}function cd(t,e,n){var r={code:n};r.id=t.readUi16(),r.bbox=Wp(t),r.matrix=Zp(t);for(var i,o=t.readUi8(),a=t.readUi8(),s=r.records=[];i=hd(t,e,n,o,a);)s.push(i);return r}function hd(t,e,n,r,i){t.align();var o=t.readUb(8);if(!o)return null;var a={};a.flags=o,8&o&&(a.fontId=t.readUi16()),4&o&&(a.color=33===n?$p(t):Jp(t)),1&o&&(a.moveX=t.readSi16()),2&o&&(a.moveY=t.readSi16()),8&o&&(a.fontHeight=t.readUi16());for(var s=t.readUi8(),u=a.entries=[],l=s;l--;)u.push({glyphIndex:t.readUb(r),advance:t.readSb(i)});return a}function pd(t,e,n){var r={code:n};return 15==n&&(r.soundId=t.readUi16()),89==n&&(r.soundClassName=t.readString(-1)),r.soundInfo=dd(t),r}function dd(t){var e={},n=e.flags=t.readUi8();if(1&n&&(e.inPoint=t.readUi32()),2&n&&(e.outPoint=t.readUi32()),4&n&&(e.loopCount=t.readUi16()),8&n)for(var r=t.readUi8(),i=e.envelopes=[],o=r;o--;)i.push({pos44:t.readUi32(),volumeLeft:t.readUi16(),volumeRight:t.readUi16()});return e}function fd(t,e){var n={},r=t.readUi8();n.playbackRate=r>>2&3,n.playbackSize=r>>1&1,n.playbackType=1&r;var i=t.readUi8(),o=n.streamCompression=i>>4&15;return n.streamRate=i>>2&3,n.streamSize=0==(i>>1&1)?8:16,n.streamType=1&i,n.samplesCount=t.readUi16(),2==o&&e-t.pos>=2&&(n.latencySeek=t.readSi16()),n}function gd(t,e,n,r){var i={code:n};i.id=t.readUi16();var o=i.format=t.readUi8();return i.width=t.readUi16(),i.height=t.readUi16(),i.hasAlpha=36===n,3===o&&(i.colorTableSize=t.readUi8()),i.bmpData=t.bytes.subarray(t.pos,r),t.pos=r,i}function _d(t,e,n,r){var i={code:n};i.id=t.readUi16();var o=i.flags=t.readUi8(),a=!!(4&o);e>5?i.language=t.readUi8():(o=i.flags=-65&o,t.pos+=1,i.language=0);var s=t.readUi8();i.name=t.readString(s),75===n&&(i.resolution=20);var u=t.readUi16();if(0===u)return i;var l=t.pos,c=i.offsets=[],h=u;if(8&o){for(;h--;)c.push(t.readUi32());i.mapOffset=t.readUi32()}else{for(;h--;)c.push(t.readUi16());i.mapOffset=t.readUi16()}var p=i.glyphs=[];for(h=u;h--;){1!==i.offsets[u-h]+l-t.pos?p.push(ld(t,e,n)):(t.pos+=1,p.push([]))}var d=i.codes=[];for(h=u;h--;)d.push(a?t.readUi16():t.readUi8());if(128&o){i.ascent=t.readUi16(),i.descent=t.readUi16(),i.leading=t.readSi16();var f=i.advance=[];for(h=u;h--;)f.push(t.readSi16());var g=i.bbox=[];for(h=u;h--;)g.push(Wp(t));var _=t.readUi16(),m=i.kerning=[];for(h=_;h--&&r-t.pos>=2+(a?4:2);)m.push(md(t,a))}return i}function md(t,e){var n={};return e?(n.code1=t.readUi16(),n.code2=t.readUi16()):(n.code1=t.readUi8(),n.code2=t.readUi8()),n.adjustment=t.readUi16(),n}function yd(t,e){for(var n={code:e},r=t.readEncodedU32(),i=n.scenes=[],o=r;o--;)i.push({offset:t.readEncodedU32(),name:t.readString(-1),labels:[],numFrames:-1}),i.length>1&&(i[i.length-2].numFrames=i[i.length-1].offset-i[i.length-2].offset);var a=t.readEncodedU32(),s=n.labels=[];for(o=a;o--;){var u={frame:t.readEncodedU32(),name:t.readString(-1)};s.push(u);for(var l=i[0],c=1;cu.frame)break;l=h}l.labels.push(u)}return n}function Ad(t,e,n,r){var i={code:n,needParse:!0},o=0;i.id=t.readUi16(),i.lineBounds=Wp(t);var a=46===n||84===n;a&&(o|=8,i.lineBoundsMorph=Wp(t)),(83===n||84===n)&&(i.fillBounds=Wp(t),a&&(i.fillBoundsMorph=Wp(t)),o|=7&t.readUi8()),i.flags=o,a&&(t.pos+=4);var s=t.substream(t.pos,t.end);return i.lazyParser=function(){i.needParse=!1,i.lazyParser=function(){return i};var t=performance.now();return function(t,e,n){var r=83===e.code||84===e.code,i=!!(8&e.flags);e.fillStyles=bd(t,n,e.code,i),e.lineStyles=Ed(t,n,e.code,i,r),t.align();var o=t.readUb(4),a=t.readUb(4);e.records=vd(t,n,e.code,i,o,a,r),i&&(t.align(),o=t.readUb(4),a=t.readUb(4),e.recordsMorph=vd(t,n,e.code,i,o,a,r))}(s,i,e),i.parsingTime=performance.now()-t,i},t.pos=r,i}function vd(t,e,n,r,i,o,a){for(var s,u,l=new Array(10),c=0;;){var h={},p=h.type=t.readUb(1);if(u=t.readUb(5),!p&&!u)break;if(p)if(s=2+(15&u),32&(u=(240&u)<<1))if(h.isGeneral=t.readUb(1))u|=64,h.deltaX=t.readSb(s),h.deltaY=t.readSb(s);else(h.isVertical=t.readUb(1))?(u|=128,h.deltaY=t.readSb(s)):h.deltaX=t.readSb(s);else h.controlDeltaX=t.readSb(s),h.controlDeltaY=t.readSb(s),h.anchorDeltaX=t.readSb(s),h.anchorDeltaY=t.readSb(s);else n<=2&&(u&=-17),1&u&&(s=t.readUb(5),h.moveX=t.readSb(s),h.moveY=t.readSb(s)),2&u&&(h.fillStyle0=t.readUb(i)),4&u&&(h.fillStyle1=t.readUb(i)),8&u&&(h.lineStyle=t.readUb(o)),16&u&&(h.fillStyles=bd(t,e,n,r),h.lineStyles=Ed(t,e,n,r,a),t.align(),i=t.readUb(4),o=t.readUb(4));h.flags=u,l[c++]=h}return l.length>c&&(l.length=c),l}function bd(t,e,n,r){var i=t.readUi8();n>2&&255===i&&(i=t.readUi16());for(var o=[],a=i;a--;)o.push(Cd(t,e,n,r));return o}function Cd(t,e,n,r){var i={},o=i.type=t.readUi8();switch(o){case 0:var a=i;return a.color=n>22||r?$p(t):Jp(t),r&&(a.colorMorph=$p(t)),a;case 16:case 18:case 19:var s=i;s.matrix=Zp(t),r&&(s.matrixMorph=Zp(t)),83===n?(s.spreadMode=t.readUb(2),s.interpolationMode=t.readUb(2)):t.readUb(4);for(var u=t.readUb(4),l=s.records=[],c=u;c--;)l.push(Id(t,n,r));return 19===o&&(s.focalPoint=t.readSi16(),r&&(s.focalPointMorph=t.readSi16())),s;case 64:case 65:case 66:case 67:var h=i;return h.bitmapId=t.readUi16(),h.condition=64===o||67===o,h.matrix=Zp(t),r&&(h.matrixMorph=Zp(t)),h}return i}function Id(t,e,n){var r={};return r.ratio=t.readUi8(),r.color=e>22?$p(t):Jp(t),n&&(r.ratioMorph=t.readUi8(),r.colorMorph=$p(t)),r}function Ed(t,e,n,r,i){var o=t.readUi8();n>2&&255===o&&(o=t.readUi16());for(var a=[],s=o;s--;){var u={};if(u.width=t.readUi16(),r&&(u.widthMorph=t.readUi16()),i){t.align(),u.startCapsStyle=t.readUb(2);var l=u.jointStyle=t.readUb(2),c=u.hasFill=t.readUb(1);u.noHscale=!!t.readUb(1),u.noVscale=!!t.readUb(1),u.pixelHinting=!!t.readUb(1),t.readUb(5),u.noClose=!!t.readUb(1),u.endCapsStyle=t.readUb(2),2===l&&(u.miterLimitFactor=t.readFixed8()),c?u.fillStyle=Cd(t,0,n,r):(u.color=$p(t),r&&(u.colorMorph=$p(t)))}else u.color=n>22?$p(t):Jp(t),r&&(u.colorMorph=$p(t));a.push(u)}return a}!function(t){t[t.DROPSHADOW=0]="DROPSHADOW",t[t.BLUR=1]="BLUR",t[t.GLOW=2]="GLOW",t[t.BEVEL=3]="BEVEL",t[t.GRADIENTGLOW=4]="GRADIENTGLOW",t[t.CONVOLUTION=5]="CONVOLUTION",t[t.COLORMATRIX=6]="COLORMATRIX",t[t.GRADIENTBEVEL=7]="GRADIENTBEVEL"}(zp||(zp={})),function(t){t[t.CODE_DEFINE_SHAPE=2]="CODE_DEFINE_SHAPE",t[t.CODE_DEFINE_BITS=6]="CODE_DEFINE_BITS",t[t.CODE_DEFINE_BUTTON=7]="CODE_DEFINE_BUTTON",t[t.CODE_DEFINE_FONT=10]="CODE_DEFINE_FONT",t[t.CODE_DEFINE_TEXT=11]="CODE_DEFINE_TEXT",t[t.CODE_DEFINE_SOUND=14]="CODE_DEFINE_SOUND",t[t.CODE_DEFINE_BITS_LOSSLESS=20]="CODE_DEFINE_BITS_LOSSLESS",t[t.CODE_DEFINE_BITS_JPEG2=21]="CODE_DEFINE_BITS_JPEG2",t[t.CODE_DEFINE_SHAPE2=22]="CODE_DEFINE_SHAPE2",t[t.CODE_DEFINE_SHAPE3=32]="CODE_DEFINE_SHAPE3",t[t.CODE_DEFINE_TEXT2=33]="CODE_DEFINE_TEXT2",t[t.CODE_DEFINE_BUTTON2=34]="CODE_DEFINE_BUTTON2",t[t.CODE_DEFINE_BITS_JPEG3=35]="CODE_DEFINE_BITS_JPEG3",t[t.CODE_DEFINE_BITS_LOSSLESS2=36]="CODE_DEFINE_BITS_LOSSLESS2",t[t.CODE_DEFINE_EDIT_TEXT=37]="CODE_DEFINE_EDIT_TEXT",t[t.CODE_DEFINE_SPRITE=39]="CODE_DEFINE_SPRITE",t[t.CODE_DEFINE_MORPH_SHAPE=46]="CODE_DEFINE_MORPH_SHAPE",t[t.CODE_DEFINE_FONT2=48]="CODE_DEFINE_FONT2",t[t.CODE_DEFINE_VIDEO_STREAM=60]="CODE_DEFINE_VIDEO_STREAM",t[t.CODE_DEFINE_FONT3=75]="CODE_DEFINE_FONT3",t[t.CODE_DEFINE_SHAPE4=83]="CODE_DEFINE_SHAPE4",t[t.CODE_DEFINE_MORPH_SHAPE2=84]="CODE_DEFINE_MORPH_SHAPE2",t[t.CODE_DEFINE_BINARY_DATA=87]="CODE_DEFINE_BINARY_DATA",t[t.CODE_DEFINE_BITS_JPEG4=90]="CODE_DEFINE_BITS_JPEG4",t[t.CODE_DEFINE_FONT4=91]="CODE_DEFINE_FONT4"}(Hp||(Hp={})),function(t){t[t.CODE_DEFINE_BITS=6]="CODE_DEFINE_BITS",t[t.CODE_DEFINE_BITS_JPEG2=21]="CODE_DEFINE_BITS_JPEG2",t[t.CODE_DEFINE_BITS_JPEG3=35]="CODE_DEFINE_BITS_JPEG3",t[t.CODE_DEFINE_BITS_JPEG4=90]="CODE_DEFINE_BITS_JPEG4"}(Xp||(Xp={})),function(t){t[t.CODE_DEFINE_FONT=10]="CODE_DEFINE_FONT",t[t.CODE_DEFINE_FONT2=48]="CODE_DEFINE_FONT2",t[t.CODE_DEFINE_FONT3=75]="CODE_DEFINE_FONT3",t[t.CODE_DEFINE_FONT4=91]="CODE_DEFINE_FONT4"}(Yp||(Yp={})),function(t){t[t.CODE_PLACE_OBJECT=4]="CODE_PLACE_OBJECT",t[t.CODE_PLACE_OBJECT2=26]="CODE_PLACE_OBJECT2",t[t.CODE_PLACE_OBJECT3=70]="CODE_PLACE_OBJECT3",t[t.CODE_REMOVE_OBJECT=5]="CODE_REMOVE_OBJECT",t[t.CODE_REMOVE_OBJECT2=28]="CODE_REMOVE_OBJECT2",t[t.CODE_START_SOUND=15]="CODE_START_SOUND",t[t.CODE_START_SOUND2=89]="CODE_START_SOUND2",t[t.CODE_VIDEO_FRAME=61]="CODE_VIDEO_FRAME"}(qp||(qp={}));var xd={0:void 0,1:void 0,2:Ad,4:ed,5:id,6:od,7:ad,8:void 0,9:void 0,10:function(t,e,n){var r={code:n};r.id=t.readUi16();for(var i=t.readUi16(),o=i/2,a=[],s=o-1;s--;)a.push(t.readUi16());r.offsets=[i].concat(a);var u=r.glyphs=[];for(s=o;s--;)u.push(ld(t,e,n));return r},11:cd,12:void 0,13:void 0,14:function(t,e,n,r){var i={code:n};i.id=t.readUi16();var o=t.readUi8();return i.soundFormat=o>>4&15,i.soundRate=o>>2&3,i.soundSize=o>>1&1,i.soundType=1&o,i.samplesCount=t.readUi32(),i.soundData=t.bytes.subarray(t.pos,r),t.pos=r,i},15:pd,17:void 0,18:void 0,19:void 0,20:gd,21:od,22:Ad,23:void 0,24:void 0,26:ed,28:id,32:Ad,33:cd,34:ad,35:od,36:gd,37:function(t,e,n){var r={code:n};r.id=t.readUi16(),r.bbox=Wp(t);var i=r.flags=t.readUi16();return 1&i&&(r.fontId=t.readUi16()),32768&i&&(r.fontClass=t.readString(-1)),1&i&&(r.fontHeight=t.readUi16()),4&i&&(r.color=$p(t)),2&i&&(r.maxLength=t.readUi16()),8192&i&&(r.align=t.readUi8(),r.leftMargin=t.readUi16(),r.rightMargin=t.readUi16(),r.indent=t.readSi16(),r.leading=t.readSi16()),r.variableName=t.readString(-1),128&i&&(r.initialText=t.readString(-1)),r},39:void 0,43:void 0,45:void 0,46:Ad,48:_d,56:void 0,57:void 0,58:void 0,59:void 0,60:function(t,e,n){var r={code:n};return r.id=t.readUi16(),r.numFrames=t.readUi16(),r.width=t.readUi16(),r.height=t.readUi16(),t.readUb(4),r.deblocking=t.readUb(3),r.smoothing=!!t.readUb(1),r.codecId=t.readUi8(),r},61:function(t,e,n,r){var i={code:n};return i.streamId=t.readUi16(),i.frameNum=t.readUi16(),i.videoData=t.bytes.subarray(t.pos,r),t.pos=r,i},62:void 0,64:void 0,65:void 0,66:void 0,69:void 0,70:ed,71:void 0,72:void 0,73:void 0,74:void 0,75:_d,76:void 0,77:void 0,78:function(t,e,n){var r={code:n};return r.symbolId=t.readUi16(),r.splitter=Wp(t),r},82:void 0,83:Ad,84:Ad,86:yd,87:function(t,e,n,r){var i={code:n};return i.id=t.readUi16(),t.pos+=4,i.data=t.bytes.subarray(t.pos,r),t.pos=r,i},88:void 0,89:pd,90:od,91:function(t,e,n,r){var i={code:n};i.id=t.readUi16();var o=i.flags=t.readUi8();return i.name=t.readString(-1),4&o&&(i.data=t.bytes.slice(t.pos,r),t.pos=r),i}};var wd=function(){function t(){}return t.parseData=function(e){var n=t.openType;return n||console.error("[OpenTypeParser] - opentype.js is not registered"),n.parse(e.data.buffer)},t}(),Sd=Math.pow,Dd=Math.log,Td=String.fromCharCode;function Pd(t){for(var e=0,n=t;n>=2;)n/=2,++e;return Sd(2,e)}function Bd(t){return Td(t>>8&255,255&t)}function Od(t,e){var n,r="swf-font-"+t.id,i=t.name||r;"Helvetica"==i&&(i="arial"),91==t.code&&(n=wd.parseData(t));var o,a=t.glyphs,s=a?a.length:0,u={type:"font",id:t.id,name:i,bold:!!(1&t.flags),italic:!!(2&t.flags),codes:t.codes,metrics:null,data:t.data,originalSize:!1,away:null,fontStyleName:Pu.STANDART},l=Pu.STANDART;if(u.bold&&!u.italic?l=Pu.BOLD:!u.bold&&u.italic?l=Pu.ITALIC:u.bold&&u.italic&&(l=Pu.BOLDITALIC),u.fontStyleName=l,!s&&!n)return u.away=Uc.getDeviceFont(i),u;o=n?Vc.defineFont_CFF(i,e):Vc.defineFont(i,e),u.away=o,o.name=i;var c=o.create_font_table(l,Nc.assetType);if(n)return c.changeOpenTypeFont(n),u;var h=[],p={},d=[],f=!("advance"in t),g=48===t.code,_=75===t.code;f&&(t.advance=[]);var m=Math.max.apply(null,t.codes)||35;if(t.codes){for(var y=0;yu&&(e=u),n>l&&(n=l),r5e3}(a)&&(C=20,u.originalSize=!0);var I=Math.ceil(t.ascent/C)||1024,E=-Math.ceil(t.descent/C)||0;0!=c.ascent||(c.ascent=I,c.descent=E);var x=c.ascent;t.leading;var w;for(y=0;w=d[y++];)var S=w[0],D=(v=w[1],w[2][0]);for(var T=2*Pd(d.length+1),P=[],B=(y=0,{});void 0!==(D=h[y++]);){for(var O=a[p[D]],M=0,L=0,N=[],R=-1,F=0;F-1&&(N[R].xMin>M&&(N[R].xMin=M),N[R].yMin>L&&(N[R].yMin=L),N[R].xMaxM&&(G=M),H>L&&(H=L),z>>0}c+=i}else for(d=0;d>>0;c+=i}return new Uint8ClampedArray(l.buffer)}function Ld(t){for(var e=t.width,n=t.height*e*4,r=da.inflate(t.bmpData,n,!0),i=new Uint32Array(r.buffer),o=0,a=i.length;o>24&255,c=s>>16&255,h=s>>8&255;i[o]=(u<<24|l<<16|c<<8|h)>>>0}return new Uint8ClampedArray(r.buffer)}function Nd(t){return console.log("parse15BPP"),null}function Rd(t,e){return t[e]<<8|t[e+1]}function Fd(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function kd(t,e){for(var n=0,r=t.length;n=r))do{var i=n++,o=t[n++];if(o>=192&&o<=199||o>=201&&o<=207||o>=218&&o<=239||254===o)n+=Rd(t,n);for(;n=192&&t[r][1]<=192);)r++;Array.prototype.splice.apply(t,Array.prototype.concat.call([r,0],e.parsedChunks))}(r,t.jpegTables),r.push(jd),r.forEach((function(t){var n=t[1];n>=192&&n<=195&&(e.height=Rd(t,5),e.width=Rd(t,7))})),e.data=function(t){for(var e=0,n=0;n0)&&(r.adapter.placeObjectTag=a,r.adapter.initEvents=a)}return r.partitionClass=yi,r._sessionID=n,r},t.prototype._createShape=function(t,e,n){var r=new Ys;return r.queueShapeTag(t),r.name=n||"AwayJS_shape_"+t.id.toString(),r.className=t.className,"morphshape"===t.type?new su(r):r},t.prototype._createFont=function(t,e,n){return t.away.className=t.className,t.className&&Vc.registerFontForClassName(t.away,t.className),t},t.prototype._createSprite=function(t,e,n){var r=this.framesToTimeline(e,t,t.frames,null,null);if(t.scalingGrid){var i=t.scalingGrid,o=i.xMin,a=i.xMax,s=i.yMin,u=i.yMax;r.scale9Grid=new q(o/20,s/20,(a-o)/20,(u-s)/20)}return r.className=t.className,r.name=n||"AwayJS_mc_"+t.id.toString(),r.buttonMode?this._buttonIds[t.id]=!0:this._mcIds[t.id]=!0,r},t.prototype._createText=function(t,e,n){(e=e||this.factory.createTextField(t))._symbol=t,e.textFormat=new zc,e.className=t.className;var r=this.reqursive?this.createAwaySymbol(t.tag.fontId):this._awaySymbols[t.tag.fontId];r&&(e.textFormat.font=r.away,e.textFormat.font_table=r.away.get_font_table(r.fontStyleName,Nc.assetType));var i=t.tag;return e.textFormat.size=i.fontHeight/20,e.textColor=4&i.flags?x.f32_RGBA_To_f32_ARGB(i.color):16777215,e.textFormat.leftMargin=i.leftMargin/20,e.textFormat.rightMargin=i.rightMargin/20,e.textFormat.letterSpacing=i.letterSpacing/20,e.textFormat.leading=i.leading/20,e.textFormat.align=Hd[i.align],e.textOffsetX=t.fillBounds.xMin/20,e.textOffsetY=t.fillBounds.yMin/20,e.width=(t.fillBounds.xMax-t.fillBounds.xMin)/20,e.height=(t.fillBounds.yMax-t.fillBounds.yMin)/20,e.border=!!(2048&i.flags),e.background=e.border,e.multiline=!!(32&i.flags),e.wordWrap=!!(64&i.flags),e.selectable=!!i.flags&&!(4096&i.flags),i.maxLength&&i.maxLength>0&&(e.maxChars=i.maxLength),8&i.flags?e.type="dynamic":e.type="input",512&i.flags?(e.html=!0,i.initialText&&""!=i.initialText&&(e.htmlText=i.initialText)):(e.html=!1,i.initialText&&""!=i.initialText&&(e.text=i.initialText)),e.name=n||"tf_"+t.id.toString(),e},t.prototype._createSound=function(t,e,n){var r=this.parser.awayUnresolvedSymbols[t.id];return r?(r.className=this.parser.symbolClassesMap[t.id]||null,r.name=r.className):console.warn("SWF-parser: no sound loaded for sound-id:",t.id),r},t.prototype._createButton=function(t,e,n){return(e=this.framesToTimeline(e,t,null,t.states,t.buttonActions,t.buttonSounds)).name=n||"AwayJS_button_"+t.id.toString(),e.className=t.className,this._buttonIds[t.id]=!0,e},t.prototype._createLabel=function(t,e,n){var r=null,i=!1;(e=e||this.factory.createTextField(t)).className=t.className;for(var o=0;o0)for(A=n[_].labelNames.length,y=0;y0&&f.add_framescript(n[_].actionBlocks,_,t,!0),o&&o[q]&&0!=o[q].id&&(at=u(o[q].id))&&(f.audioPool[ot]={cmd:15,id:o[q].id,sound:at,props:o[q].info},$.push(ot++)),q++,!v&&n[_].controlTags&&n[_].controlTags.length>0){for(b=n[_].controlTags.length,C=0;C-1,1&E.flags&&!g)break;if(at=null,st=-1,ut=-1,lt=-1,x){if(!(at=u(E.symbolId))){console.warn("Symbol missed:",E.symbolId);break}w=this.parser.dictionary[E.symbolId],at.isAsset(Ys)?(at.tryOptimiseSigleImage=ft,ut=E.symbolId,f.graphicsPool[E.symbolId]||(f.graphicsPool[E.symbolId]=at),(S=this.factory.createSprite(null,at,w)).mouseEnabled=!1,g&&g.awayChild.isAsset(ru)?st=g.sessionID:(null!=E&&(E.name&&""!=E.name||this._mcIds[E.symbolId]||this._buttonIds[E.symbolId])&&(E.name&&""!=E.name||(E.name="instance"+E.symbolId+"_"+nt++)),g&&(this.parser.swfFile.useAVM1?K[K.length]={depth:0|D.depth}:K[K.length]={depth:0|g.sessionID},Y[D.depth]=null,et[D.depth.toString()]=null,delete Y[D.depth]),st=d++,(E.name||E.variableName||E.events&&E.events.length>0)&&(f.placeObjectTagsForSessionIDs[st]=E),g=Y[D.depth]={sessionID:st,id:E.symbolId,masks:[],isMask:!1,clipDepth:0,depth:0,awayChild:S,name:E.name?E.name:"noname"},W[W.length]={sessionID:st,depth:D.depth,id:E.symbolId,name:E.name})):(E.name&&""!=E.name||(E.name="instance"+E.symbolId+"_"+nt++),st=d++,(E.name||E.variableName||E.events&&E.events.length>0)&&(f.placeObjectTagsForSessionIDs[st]=E),ct=!0,Y[D.depth]&&Y[D.depth].id==E.symbolId?ct=!1:Y[D.depth]&&(this.parser.swfFile.useAVM1?K[K.length]={depth:0|D.depth}:K[K.length]={depth:0|Y[D.depth].sessionID}),g=Y[D.depth]={sessionID:st,id:E.symbolId,masks:[],isMask:!1,clipDepth:0,depth:0,awayChild:at,name:E.name?E.name:"noname"},ct&&(W[W.length]={sessionID:st,depth:D.depth,id:E.symbolId,name:E.name}))}if(16&E.flags&&(at||(at=u(g.id)),at.isAsset(su)&&(lt=E.ratio)),!g)throw"error in add command";J[J.length]={child:g,placeObjectTag:E,swapGraphicsID:ut,ratio:lt,depth:D.depth};break;default:console.log("unknown timeline command tag",D)}var yt=R.length,At=K.length;if(At){yt=R.length;for(var vt=0;vtY[s].depth;)Y[bt]&&Y[bt].masks.push(Y[s].sessionID),bt--;var Ct=0,It=0,Et=[];for(s in Y){var xt=Y[s];if(xt.masks.sort(),xt.oldMasks.sort(),xt.masks.length!=xt.oldMasks.length)Et.push(xt),xt.maskingChanged=!0;else for(Ct=0,It=xt.masks.length,Ct=0;Ct=0&&(Pt++,j.push(202),V.push(Q.length),Q.push(Dt.swapGraphicsID));var Bt=E&&(this._buttonIds[E.symbolId]||this._mcIds[E.symbolId]);if(E&&(E.name&&""!=E.name||Bt)&&(Pt++,this._buttonIds[E.symbolId]?j.push(5):j.push(4),V.push(X.length),X.push(E.name)),null!=E&&4&E.flags)Pt++,j.push(1),V.push(z.length/6),0==E.matrix.a&&0==E.matrix.b&&0==E.matrix.c&&0!=E.matrix.d?E.matrix.a=1:0==E.matrix.d&&0==E.matrix.b&&0==E.matrix.c&&0!=E.matrix.a&&(E.matrix.d=1),zd(z,z.length,E.matrix),et[Dt.depth.toString()]=E.matrix;else if(null!=Dt.depth){var Ot=et[Dt.depth.toString()];Ot&&(Pt++,j.push(1),V.push(z.length/6),zd(z,z.length,Ot))}if(null!=E&&8&E.flags&&(j.push(2),V.push(H.length/8),Pt++,ht=H,pt=H.length,dt=E.cxform,ht[pt++]=dt.redMultiplier/256,ht[pt++]=dt.greenMultiplier/256,ht[pt++]=dt.blueMultiplier/256,ht[pt++]=dt.alphaMultiplier/256,ht[pt++]=dt.redOffset,ht[pt++]=dt.greenOffset,ht[pt++]=dt.blueOffset,ht[pt++]=dt.alphaOffset),null!=Dt.ratio&&Dt.ratio>=0&&(Pt++,j.push(203),V.push(Q.length),Q.push(0|Dt.ratio)),g.maskingChanged){Pt++,j.push(3),V.push(Q.length),Q.push(g.masks.length);for(var Mt=0,Lt=g.masks;Mt0&&(St++,F.push(g.sessionID),k.push(Tt),U.push(Pt))}St>0&&(it|=8,O.push(At),M.push(yt))}if(At=$.length){it|=16,yt=N.length;for(vt=0;vt0&&n[_].labelNames[0]==Ft[_]&&kt++;4==kt&&(l=!0)}return f.numKeyFrames=q,f.keyframe_durations=new Uint32Array(T),f.frame_command_indices=new Uint32Array(P),f.frame_recipe=new Uint32Array(B),f.command_length_stream=new Uint32Array(O),f.command_index_stream=new Uint32Array(M),f.add_child_stream=new Uint32Array(L),f.add_sounds_stream=new Uint32Array(N),f.remove_child_stream=new Uint32Array(R),f.update_child_stream=new Uint32Array(F),f.update_child_props_indices_stream=new Uint32Array(k),f.update_child_props_length_stream=new Uint32Array(U),f.property_type_stream=new Uint32Array(j),f.property_index_stream=new Uint32Array(V),f.properties_stream_int=new Uint32Array(Q),f.properties_stream_f32_mtx_scale_rot=new Float32Array([]),f.properties_stream_f32_mtx_pos=new Float32Array([]),f.properties_stream_f32_mtx_all=new Float32Array(z),f.properties_stream_f32_ct=new Float32Array(H),f.properties_stream_strings=X,f.properties_stream_filters=G,f.init(),l?(t.buttonMode=!0,f.isButton=!0,i&&(f.avm1ButtonActions=i),f.extractHitArea(t)):t.mouseEnabled=!1,t},t}(),Yd=function(t){function e(){var e=t.call(this,"ROOT")||this;return window.AWAY_ROOT_STAT=e,e}return n(e,t),e.rec=function(t){return this._instance||(this._instance=new e),this._instance.rec(t)},e}(function(){function t(t,e){void 0===e&&(e=!1),this.name=t,this._subrecord=e,this._records={},this._startTime=0,this._endTime=0,this._subs=[],this._state=0}return t.prototype.rec=function(e,n){if(void 0===n&&(n=!1),this._subrecord)throw"Suprecord can't support nested records!";var r=this._subs[this._subs.length-1];return r&&1===r._state||(r=this),r._records[e]||(r._records[e]=new t(e,n))},t.prototype.begin=function(){if(0===this._state){if(!this._subrecord){this._subs[this._subs.length-1]&&this._subs[this._subs.length-1].end();var t=this.rec(this.name+"_"+this._subs.length,!0);return this._subs.push(t),t.begin()}return this._state=1,this._startTime=performance.now()}},t.prototype.end=function(){for(var t in this._records)this._records[t].end();if(1===this._state)return this._subrecord?(this._state=2,this._endTime=performance.now(),this._endTime-this._startTime):this._subs[this._subs.length-1].end()},t.prototype.drop=function(){if(this.end(),!this._subrecord)return this._subs[this._subs.length-1].drop();this._state=3,this._startTime=this._endTime=0},Object.defineProperty(t.prototype,"startTime",{get:function(){if(3==this._state)return 0;var t=this._startTime||Number.MAX_VALUE;for(var e in this._records){var n=this._records[e];t=Math.min(t,n.startTime)}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){if(3==this._state)return 0;var t=this._endTime||-Number.MAX_VALUE;for(var e in this._records){var n=this._records[e];t=Math.max(t,n.endTime)}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){if(3==this._state)return 0;if(!Object.keys(this._records).length)return this._endTime-this._startTime;var t=0;for(var e in this._records)t+=this._records[e].duration;return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selfDuration",{get:function(){return Object.keys(this._records).length?this.endTime-this.startTime:this._endTime-this._startTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"density",{get:function(){return 3==this._state?0:this.duration/this.selfDuration},enumerable:!0,configurable:!0}),t.prototype.toString=function(){var t=this.selfDuration;return"Name: "+this.name+", duration: "+this.duration.toFixed(2)+"ms, self: "+t.toFixed(2)+"ms, density:"+(100*this.density).toFixed(0)+"%"},t.prototype.toTable=function(t,e){void 0===t&&(t=0);var n=" ".repeat(t)+this.toString()+"\n";if(1===this._subs.length&&1===Object.keys(this._records).length)return n;for(var r in this._records){var i=this._records[r];3!==i._state&&(e&&e(i)||(n+=i.toTable(t+1,e)))}return n},t}()),qd=function(e){function r(t){void 0===t&&(t=null);var n=e.call(this,rt.ARRAY_BUFFER)||this;return n._awayUnresolvedSymbols={},n._isEncrypted=!1,n._currentEncrActionBlocks=[],n.soundExports={},n.id=0,n.externalDependenciesCount=0,n._lockFinalize=!1,n.textFormatAlignMap=[Mu.LEFT,Mu.RIGHT,Mu.CENTER,Mu.JUSTIFY],n._buttonSounds={},n.id=r.ID++,n._swfFile=new o,n._factory=t,n._progressState=0,n._symbolDecoder=new Xd(n),n}return n(r,e),Object.defineProperty(r.prototype,"awayUnresolvedSymbols",{get:function(){return this._awayUnresolvedSymbols},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"awaySymbols",{get:function(){return this._symbolDecoder.awaySymbols},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"swfFile",{get:function(){return this._swfFile},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"factory",{get:function(){return this._factory},set:function(t){this._factory=t,r.factory=t,this._progressState=5},enumerable:!0,configurable:!0}),r.prototype.onFactoryRequest=function(t){this.factory=r.factory||new Ch},r.supportsType=function(t){return t=t.toLowerCase(),console.log("SWFParser supportsType extension: ",t,"result: ","swf"==t),"swf"==t},r.supportsData=function(t){return(67===t[0]||70===t[0]||90===t[0])&&87===t[1]&&83===t[2]},r.prototype._iResolveDependency=function(t){if(1!=t.assets.length)throw"SWFParser: error when resolving dependency";var e=this.eagerlyParsedSymbolsMap[t.id];if(e)switch(e.type){case"image":var n=t.assets[0];this._awayUnresolvedSymbols[t.id]=n;break;case"font":break;case"sound":var r=t.assets[0];this._awayUnresolvedSymbols[t.id]=r;break;default:console.log("finished unknown parsing",t)}else console.log("no eagerlyParsedSymbolsMap for id",t.id);this.externalDependenciesCount--,0==this.externalDependenciesCount&&(this.parseSymbolsToAwayJS(),this._progressState=6)},r.prototype._iResolveDependencyFailure=function(t){this.externalDependenciesCount--,0==this.externalDependenciesCount&&(this.parseSymbolsToAwayJS(),this._progressState=6)},r.prototype._iResolveDependencyName=function(t,e){var n=e.name,r=e.name;return e.name=n,r},r.prototype._pProceedParsing=function(){if(0===this._progressState){var t=this._pGetByteData(),e=new Uint8Array(t.arraybytes,0,t.length);if(!r.supportsData(e)){var n=e.slice(0,3).reduce((function(t,e){return t+String.fromCharCode(e)}),"");return console.error("[SWF Parser] unknow file type:",n),this.parsingFailure=!0,!1}Yd.rec("parser").begin(),this._progressState=1,this._swfFile.url=this._iFileName,this.initSWFLoading(e,e.length)}else if(2===this._progressState)if(this._progressState=4,this._factory)this.parseSymbols();else{if(!this.onFactoryRequest)throw"Error in SWFParser. no factory and noFactoryRequest method exists.";this.onFactoryRequest(this._swfFile),this._factory&&this.parseSymbols()}else if(5===this._progressState){if(!this.onFactoryRequest)throw"Error in SWFParser. no factory and noFactoryRequest method exists.";this._factory&&this.parseSymbols(),Yd.rec("parser").end()}return 6!==this._progressState?_t.MORE_TO_PARSE:_t.PARSING_DONE},r.prototype.parseSymbols=function(){if(Yd.rec("parser").rec("symbols").begin(),this._factory.url=this._iFileName,this._pContent=this._factory.createDisplayObjectContainer(),this._awayUnresolvedSymbols={},this._mapMatsForBitmaps={},this.abcBlocks.length&&this._factory.executeABCBytes&&this._factory.executeABCBytes(this.abcBlocks),this.externalDependenciesCount=0,this.eagerlyParsedSymbolsList.length>0)for(var t=0;t0?(this._progressState=3,this._pPauseAndRetrieveDependencies()):(this.parseSymbolsToAwayJS(),this._progressState=6,Yd.rec("parser").rec("symbols").end())},r.prototype.getMaterial=function(t){var e=this._mapMatsForBitmaps[t];if(!e){e=new Pc;var n=this.awaySymbols[t];n&&(n.isAsset(en)||n.isAsset(Eh))||(n=new en(512,512,!0,4278190335,!0)),e.ambientMethod.texture=new go(n),e.alphaBlending=!0,e.useColorTransform=!0,e.bothSides=!0,this._mapMatsForBitmaps[t]=e}return e},r.prototype.registerAwayAsset=function(t,e){this._lockFinalize||("font"!==e.type?this._pFinalizeAsset(t):this._pFinalizeAsset(e.away))},r.prototype.parseSymbolsToAwayJS=function(){Yd.rec("parser").rec("symbols").rec("away").begin();var t=0,e=Object.keys(this.dictionary).length,n=e/100|0,r={};this._symbolDecoder.reqursive=!1,this._lockFinalize=!0,console.debug("[Away Symbols] Start");for(var i=0,o=this.dictionary;i=30,"At least the header must be complete here."),this._swfFile.bytesTotal=e,this._swfFile.frames=[],this.abcBlocks=[],this.dictionary=[],this.fonts=[],this.symbolClassesMap=[],this.symbolClassesList=[],this.eagerlyParsedSymbolsMap=[],this.eagerlyParsedSymbolsList=[],this._jpegTables=null,this._currentFrameLabels=[],this._currentSoundStreamHead=null,this._currentSoundStreamBlock=null,this._currentControlTags=null,this._currentActionBlocks=null,this._currentInitActionBlocks=null,this._currentExports=null,this._endTagEncountered=!1,this._isEncrypted=!1,this._currentEncrActionBlocks=null,this.readHeaderAndInitialize(t)},r.prototype.finishLoading=function(){this._decompressor&&(this._decompressor.close(),this._decompressor=null),this._progressState=2,this.scanLoadedData()},r.prototype.getSymbol=function(t){if(this.eagerlyParsedSymbolsMap[t])return this.eagerlyParsedSymbolsMap[t];var e,n=this.dictionary[t];return n?((e=39===n.tagCode?this.parseSpriteTimeline(n):this.getParsedTag(n)).className=this.symbolClassesMap[t]||null,e.env=this.env,this._buttonSounds[e.id]&&(e.buttonSounds=this._buttonSounds[e.id]),n.scalingGrid&&(e.scalingGrid=n.scalingGrid),e):null},r.prototype.getParsedTag=function(t){this._dataStream.align(),this._dataStream.pos=t.byteOffset;var e=xd[t.tagCode],n=Math.min(t.byteOffset+t.byteLength,this._dataStream.end),r=e(this._dataStream,this._swfFile.swfVersion,t.tagCode,n,this._jpegTables);return this._dataStream.pos!==n&&this.emitTagSlopWarning(t,n),function(t,e,n){var r;switch(t.code){case 6:case 21:case 35:case 90:r=Vd(t);break;case 20:case 36:r=function(t){var e,n=Bo.None;switch(t.format){case 3:e=Md,n=Bo.PremultipliedAlphaARGB;break;case 5:e=Ld,n=Bo.PremultipliedAlphaARGB;break;case 4:e=Nd,n=Bo.PremultipliedAlphaARGB;break;default:console.log("invalid bitmap format")}var r={definition:{type:"image",id:t.id,width:t.width,height:t.height,mimeType:"application/octet-stream",data:null,dataType:n,isPMA:n===Bo.PremultipliedAlphaARGB,image:null},needParse:!0,lazyParser:function(){var n=this;return this.needParse=!1,this.definition.data=e(t),this.lazyParser=function(){return n},r},type:"image",id:t.id};return r}(t);break;case 7:case 34:r=function(t,e){for(var n,r=t.characters,i={up:[],over:[],down:[],hitTest:[]},o=0;n=r[o++];){var a=e[n.symbolId];if(a){var s={symbolId:a.id,code:4,depth:n.depth,flags:0,matrix:null,cxform:null};n.matrix&&(s.flags|=4,s.matrix=n.matrix),n.cxform&&(s.flags|=8,s.cxform=n.cxform),1&n.flags&&i.up.push(s),2&n.flags&&i.over.push(s),4&n.flags&&i.down.push(s),8&n.flags&&i.hitTest.push(s)}else console.log("undefined character in button "+t.id)}return{type:"button",id:t.id,buttonActions:t.buttonActions,states:i}}(t,e);break;case 37:r=function(t){return{type:"text",id:t.id,fillBounds:t.bbox,variableName:t.variableName,tag:t,bold:!1,italic:!1}}(t);break;case 10:case 48:case 75:case 91:r=Od(t,n._iFileName);break;case 46:case 84:case 2:case 22:case 32:case 83:r=function(t,e){var n=8&t.flags;return t.parser=e,t.type=n?"morphshape":"shape",t}(t,n);break;case 14:r=vp(t);break;case 60:return{type:"video",id:t.id,width:t.width,height:t.height,deblocking:t.deblocking,smoothing:t.smoothing,codec:t.codecId};case 39:return t;case 87:return{type:"binary",id:t.id,data:t.data};case 11:case 33:r=function(t){return{type:"label",id:t.id,fillBounds:t.bbox,matrix:t.matrix,tag:{hasText:!0,initialText:"",html:!0,readonly:!0},records:t.records,coords:null,static:!0,require:null}}(t);break;default:return t}return r}(r,this.dictionary,this)},r.prototype.readHeaderAndInitialize=function(e){var n,r=this._swfFile;if(r.swfVersion=e[3],r.mapSWFVersionToFPVersion(),this._loadStarted=Date.now(),this._uncompressedLength=((n=e)[4]|n[5]<<8|n[6]<<16|n[7]<<24)>>>0,67===e[0]?(this._decompressor=da.create(!0,this._uncompressedLength,!0),r.compression=t.Deflate):90===e[0]&&(this._decompressor=new ja(!0),r.compression=t.LZMA),r.bytesLoaded=e.length,this.swfData=new Uint8Array(r.compression===t.None?r.bytesTotal:this._uncompressedLength),this._dataStream=new Kp(this.swfData.buffer),this._dataStream.pos=8,this._dataView=this._dataStream.view,this._decompressor){this.swfData.set(e.subarray(0,8)),this._uncompressedLoadedLength=8,this._decompressor.onData=this.processFirstBatchOfDecompressedData.bind(this),this._decompressor.onError=function(t){throw new Error(t+" from:"+this.id)}.bind(this);var i=e.subarray(8);this._decompressor.push(i)}else this.swfData.set(e),this._uncompressedLoadedLength=e.length,this._decompressor=null,this.parseHeaderContents(),this.finishLoading()},r.prototype.parseHeaderContents=function(){var t=function(t){var e=t.readUb(5),n=t.readSb(e),r=t.readSb(e),i=t.readSb(e),o=t.readSb(e);t.align();var a=t.readUi8();return{frameRate:t.readUi8()+a/256,frameCount:t.readUi16(),bounds:new Oo(n,i,r,o)}}(this._dataStream);this._swfFile.bounds=this._swfFile.bounds=t.bounds,this._swfFile.frameRate=this._swfFile.frameRate=t.frameRate,this._swfFile.frameCount=this._swfFile.frameCount=t.frameCount,this._lastScanPosition=this._dataStream.pos},r.prototype.processFirstBatchOfDecompressedData=function(t){Yd.rec("parser").rec("unzip").begin(),this.processDecompressedData(t),this._decompressor&&(this._decompressor.onData=this.processDecompressedData.bind(this))},r.prototype.processDecompressedData=function(t){Yd.rec("parser").rec("unzip").end();var e=Math.min(t.length,this._uncompressedLength-this._uncompressedLoadedLength);Po(this.swfData,t,this._uncompressedLoadedLength,0,e),this._uncompressedLoadedLength+=e,this._uncompressedLoadedLength===this._uncompressedLength&&(this._decompressor&&(this._decompressor.onData=null),this.parseHeaderContents(),this.finishLoading())},r.prototype.scanLoadedData=function(){this._dataStream.pos=this._lastScanPosition,Yd.rec("parser").rec("scanTags").begin(),this.scanTagsToOffset(this._uncompressedLoadedLength,!0),Yd.rec("parser").rec("scanTags").end(),this._lastScanPosition=this._dataStream.pos},r.prototype.scanTagsToOffset=function(t,e){for(var n,r=new Vo(0,0,0);(n=this._dataStream.pos)t)return void(this._dataStream.pos=n);this.scanTag(r,e),this._dataStream.pos!==i&&this.emitTagSlopWarning(r,i)}},r.prototype.parseNextTagHeader=function(t){var e=this._dataStream.pos,n=this._dataView.getUint16(e,!0);e+=2,t.tagCode=n>>6;var r=63&n;if(63===r){if(e+4>this._uncompressedLoadedLength)return!1;r=this._dataView.getUint32(e,!0),e+=4}return this._dataStream.pos=e,t.byteOffset=e,t.byteLength=r,!0},r.prototype.Utf8ArrayToStr=function(t){var e,n,r,i,o;e="";var a=t.length;for(n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=String.fromCharCode(r);break;case 12:case 13:i=t[n++],e+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=t[n++],o=t[n++],e+=String.fromCharCode((15&r)<<12|(63&i)<<6|(63&o)<<0)}return e},r.prototype.scanTag=function(t,e){var n,r,i=this._dataStream,o=i.pos;To(o===t.byteOffset);var a=t.tagCode,s=t.byteLength;if(39===a){this.addLazySymbol(a,o,s);var u=o+s;return i.pos+=4,this.scanTagsToOffset(u,!1),void(this._dataStream.pos!==u&&this.emitTagSlopWarning(t,u))}if(Xp[a]){var l=this.addLazySymbol(a,o,s);this.decodeEmbeddedImage(l)}else{if(14===a){l=this.addLazySymbol(a,o,s);var c=this.getParsedTag(l),h=new Go(c.id,l,"sound",c);return this.eagerlyParsedSymbolsMap[h.id]=h,void this.eagerlyParsedSymbolsList.push(h)}if(Yp[a]){l=this.addLazySymbol(a,o,s);this.registerEmbeddedFont(l)}else{if(Hp[a])return this.addLazySymbol(a,o,s),void this.jumpToNextTag(s);if(e||76===a||56===a)if(qp[a])this.addControlTag(a,o,s);else switch(a){case 69:this.setFileAttributes(s);break;case 86:this.setSceneAndFrameLabelData(s);break;case 9:this._swfFile.backgroundColor=this._swfFile.backgroundColor=Jp(this._dataStream);break;case 8:this._jpegTables||(this._jpegTables=0===s?new Uint8Array(0):this.swfData.subarray(i.pos,i.pos+s-2)),this.jumpToNextTag(s);break;case 82:case 72:if(this._swfFile.useAVM1)this.jumpToNextTag(s);else{var p=o+s,d=new Uo;82===a?(d.flags=i.readUi32(),d.name=i.readString(-1)):(d.flags=0,d.name=""),d.data=this.swfData.subarray(i.pos,p),this.abcBlocks.push(d),i.pos=p}break;case 76:for(var f=o+s,g=i.readUi16();g--;){var _=i.readUi16(),m=i.readString(-1);this.symbolClassesMap[_]=m,this.symbolClassesList.push({id:_,className:m})}i.pos=f;break;case 59:if(this._swfFile.useAVM1){var y=this._currentInitActionBlocks||(this._currentInitActionBlocks=[]),A=this._dataView.getUint16(i.pos,!0),v=this.swfData.subarray(o+2,o+s),b=this._isEncrypted?null===(n=this._currentEncrActionBlocks)||void 0===n?void 0:n.pop():void 0;y.push({spriteId:A,actionsData:v,encryptedData:b})}this.jumpToNextTag(s);break;case 12:if(this._swfFile.useAVM1){var C=this._currentActionBlocks||(this._currentActionBlocks=[]);v=this.swfData.subarray(i.pos,i.pos+s),b=this._isEncrypted?null===(r=this._currentEncrActionBlocks)||void 0===r?void 0:r.pop():void 0;C.push({actionsData:v,precedence:i.pos,encryptedData:b})}this.jumpToNextTag(s);break;case 18:case 45:var I=fd(this._dataStream,o+s);this._currentSoundStreamHead=Ep.FromTag(I);break;case 19:this._currentSoundStreamBlock=this.swfData.subarray(i.pos,i.pos+=s);break;case 43:f=i.pos+s;this._currentFrameLabels[this._currentFrameLabels.length]=i.readString(-1),i.pos=f;break;case 1:this.finishFrame();break;case 0:return;case 56:f=i.pos+s;for(var E=i.readUi16(),x=this._currentExports||(this._currentExports=[]);E--;){_=i.readUi16();var w=i.readString(-1);if(i.pos>f){i.pos=f;break}x.push(new jo(_,w))}i.pos=f;break;case 17:f=i.pos+s;var S=i.readUi16();this._buttonSounds[S]={};for(var D=0;D<4;D++)this._buttonSounds[S][D]={},this._buttonSounds[S][D].id=i.readUi16(),0!=this._buttonSounds[S][D].id&&(this._buttonSounds[S][D].info=dd(i));i.pos=f;break;case 78:var T=this.getParsedTag(t);this.dictionary[T.symbolId].scalingGrid=T.splitter;break;case 23:case 13:case 62:case 57:case 71:this.jumpToNextTag(s);break;case 77:this.parseMetaData(s);break;case 74:case 73:case 65:case 66:this.jumpToNextTag(s);break;case 58:case 64:case 63:case 88:case 40:case 41:case 24:case 25:case 93:this.jumpToNextTag(s);break;case 55:case 49:this.jumpToNextTag(s);break;case 51:case 44:case 50:case 53:case 42:case 38:case 52:case 3:case 31:case 47:case 16:case 29:this.jumpToNextTag(s);break;case 255:console.log("Tag 255 present. SWF is encrypted"),this._isEncrypted=!0,this.jumpToNextTag(s);break;case 253:if(this._isEncrypted){var P=this._currentEncrActionBlocks||(this._currentEncrActionBlocks=[]),B=this.swfData.subarray(o+2,o+s);P.push({data:B,bytePos:o+2,size:s,rawTagId:a})}this.jumpToNextTag(s);break;default:a>100?console.log("Encountered undefined tag "+a+", probably used for AVM1 obfuscation. See http://ijs.mtasa.com/files/swfdecrypt.cpp."):console.log("Tag not handled by the parser: "+a+": "+function(t){return"SwfTagCode: "+t}(a)),this.jumpToNextTag(s)}else this.jumpToNextTag(s)}}},r.prototype.parseSpriteTimeline=function(t){var e=this.swfData,n=this._dataStream,r=this._dataView,i={id:t.id,type:"sprite",frames:[]},o=t.byteOffset+t.byteLength,a=i.frames,s=[],u=[],l=null,c=null,h=null,p=null;n.pos=t.byteOffset+2,i.frameCount=r.getUint16(n.pos,!0),n.pos+=2;for(var d=new Vo(0,0,0);n.poso){console.log("DefineSprite child tags exceed DefineSprite tag length and are dropped");break}if(qp[g])u.push(new Vo(g,n.pos,f)),n.pos+=f;else{switch(g){case 12:if(this._swfFile.useAVM1){h||(h=[]);var _=e.subarray(n.pos,n.pos+f);h.push({actionsData:_,precedence:n.pos})}break;case 59:if(this._swfFile.useAVM1){p||(p=[]);var m=r.getUint16(n.pos,!0);n.pos+=2;_=e.subarray(n.pos,n.pos+f);p.push({spriteId:m,actionsData:_})}break;case 43:var y=n.pos+f;s[s.length]=n.readString(-1),n.pos=y,f=0;break;case 1:a.push(new Qd(u,s.concat(),l,c,h,p,null)),s.length=0,u=[],l=null,c=null,h=null,p=null;break;case 0:n.pos=o,f=0;break;case 18:case 45:var A=n.pos,v=fd(n,y=n.pos+f);l=Ep.FromTag(v),n.pos=A;break;case 19:A=n.pos,y=n.pos+f;c=this.swfData.subarray(n.pos,y),n.pos=A}n.pos+=f,To(n.pos<=o)}}return i},r.prototype.parseMetaData=function(t){this._dataStream.pos+=t},r.prototype.jumpToNextTag=function(t){this._dataStream.pos+=t},r.prototype.emitTagSlopWarning=function(t,e){this._dataStream.pos=e},r.prototype.finishFrame=function(){0===this.pendingUpdateDelays&&this._swfFile.framesLoaded++,this._swfFile.frames.push(new Qd(this._currentControlTags,this._currentFrameLabels.concat(),this._currentSoundStreamHead,this._currentSoundStreamBlock,this._currentActionBlocks,this._currentInitActionBlocks,this._currentExports)),this._currentFrameLabels.length=0,this._currentControlTags=null,this._currentSoundStreamHead=null,this._currentSoundStreamBlock=null,this._currentActionBlocks=null,this._currentInitActionBlocks=null,this._currentExports=null},r.prototype.setFileAttributes=function(t){this._swfFile.attributes&&this.jumpToNextTag(t);var e=this.swfData[this._dataStream.pos];this._dataStream.pos+=4,this._swfFile.attributes={network:1&e,relativeUrls:2&e,noCrossDomainCaching:4&e,doAbc:8&e,hasMetadata:16&e,useGpu:32&e,useDirectBlit:64&e},this._swfFile.useAVM1=!this._swfFile.attributes.doAbc},r.prototype.setSceneAndFrameLabelData=function(t){this._swfFile.sceneAndFrameLabelData?this.jumpToNextTag(t):this._swfFile.sceneAndFrameLabelData=this._swfFile.sceneAndFrameLabelData=yd(this._dataStream,86)},r.prototype.addControlTag=function(t,e,n){(this._currentControlTags||(this._currentControlTags=[])).push(new Vo(t,e,n)),this.jumpToNextTag(n)},r.prototype.addLazySymbol=function(t,e,n){var r=this._dataView.getUint16(this._dataStream.pos,!0),i=new Qo(r,t,e,n);return this.dictionary[r]=i,i},r.prototype.decodeEmbeddedFont=function(t){var e=this.getParsedTag(t),n=new Go(e.id,t,"font",e);this.eagerlyParsedSymbolsMap[n.id]=n,this.eagerlyParsedSymbolsList.push(n);var r=Kd(e.bold,e.italic);this.fonts.push({name:e.name,id:e.id,style:r})},r.prototype.registerEmbeddedFont=function(t){var e,n,r=this._dataStream,i=this._dataView.getUint16(r.pos,!0);if(10===t.tagCode)n="__autofont__"+t.byteOffset,e="regular";else{var o=this.swfData[r.pos+2];e=Kd(!!(1&o),!!(2&o));var a=this.swfData[r.pos+4];r.pos+=5,n=r.readString(a)}this.fonts.push({name:n,id:i,style:e}),r.pos=t.byteOffset+t.byteLength},r.prototype.decodeEmbeddedImage=function(t){var e=this.getParsedTag(t),n=new Go(e.id,t,"image",e);this.eagerlyParsedSymbolsMap[n.id]=n,this.eagerlyParsedSymbolsList.push(n)},r.factory=null,r.ID=0,r}(_t);function Kd(t,e){return t&&e?"boldItalic":t?"bold":e?"italic":"regular"}var Wd=[];function Jd(t,e){var n=void 0;return(e?Wd.concat(e):Wd).forEach((function(e){var r=e.test,i=e.resolve,o=e.supressErrors,a=void 0!==o&&o,s=e.supressLoad,u=void 0!==s&&s,l=!1;"function"==typeof r?l=r(t):r instanceof RegExp?l=r.test(t):"string"==typeof r&&(l=r===t),l&&(n&&console.warn("[LOADER] Duplicate redirect rules, latest rule would be used!"),n={url:t,supressErrors:a,supressLoad:u},"function"==typeof i?n.url=i(t):i instanceof RegExp?n.url=t.match(i)[0]:"string"==typeof i?n.url=i:"string"==typeof l&&(n.url=l),void 0===n.url&&(console.warn("[LOADER] Redirect url is null, would be used original url!"),n.url=t))})),n}function $d(t,e){return"string"==typeof t&&t.includes("%")?e*parseFloat(t)/100:+t}var Zd=function(t){function e(n){var r=t.call(this)||this;return r._volume=1,r._gameConfig=null,r._curFile=null,e._instance=r,lt.enableParsers([mt,qd,$r]),r._time=0,r._currentFps=0,r._avmHandlers={},r._baseStageWidth=r._stageWidth=550,r._baseStageHeight=r._stageHeight=400,r._scaleMode=Lp.SHOW_ALL,r._align=Np.TOP_LEFT,r._scaleModeAllowUpdate=!0,r._alignAllowUpdate=!0,n.stageScaleMode&&(r._scaleMode=n.stageScaleMode,r._scaleModeAllowUpdate=!1),n.stageAlign&&(r._align=n.stageAlign,r._alignAllowUpdate=!1),n.forceINT&&(e.forceINT=n.forceINT),r.showFrameRate=n.showFPS,r._frameRate=30,r._showFrameRateIntervalID=-1,r._x=n.x?n.x:0,r._y=n.y?n.y:0,r._w=n.w?n.w:"100%",r._h=n.h?n.h:"100%",r._isPaused=!1,r._gameConfig=n,r.initAwayEninge(),r._renderer.view.backgroundColor=16777215,C.setVolume(1),r._resizeCallbackDelegate=function(t){return r.resizeCallback(t)},window.addEventListener("resize",r._resizeCallbackDelegate),r._onLoaderStartDelegate=function(t){return r.onLoaderStart(t)},r._onLoaderCompleteDelegate=function(t){return r.onLoaderComplete(t)},r._onAssetCompleteDelegate=function(t){return r._onAssetComplete(t)},r._onLoadErrorDelegate=function(t){return r._onLoadError(t)},r._gameConfig.testConfig&&(r.avmTestHandler=new kp(r._gameConfig.testConfig,r)),document.addEventListener("fullscreenchange",r.onFullscreenChanged.bind(r)),r}return n(e,t),e.instance=function(){if(!e._instance)throw"AVMStage._instance should exists but does not";return e._instance},e.prototype.dispose=function(){console.log("dispose"),this._timer.stop(),this._timer=null,this._avmHandler.dispose()},Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootNode",{get:function(){return this._rootNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pool",{get:function(){return this._pool},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pickGroup",{get:function(){return this._pickGroup},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mousePicker",{get:function(){return this._mousePicker},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mouseManager",{get:function(){return this._mouseManager},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._gameConfig},enumerable:!0,configurable:!0}),e.prototype.registerAVMStageHandler=function(t){this._avmHandlers[t.avmVersion]=t},Object.defineProperty(e.prototype,"displayState",{get:function(){return this._displayState},set:function(t){var e=this;if(document.fullscreenEnabled)switch(t){case"fullScreenInteractive":case"fullScreen":Element.prototype.requestFullscreen&&document.body.requestFullscreen().then((function(){e._displayState=t}));break;default:this._displayState=t,document.fullscreenElement&&document.exitFullscreen()}else this._displayState="normal"},enumerable:!0,configurable:!0}),e.prototype.onFullscreenChanged=function(t){document.fullscreenElement||(this._displayState="normal")},e.prototype.initAwayEninge=function(){this._root=new nu,this._rootNode=fi.getRootNode(this._root,yi),this._partition=this._rootNode.partition,this._pool=this._partition.rootNode.pool,this._view=new _i,this._view.projection.transform.moveTo(0,0,-1e3),this._pickGroup=Ii.getInstance(this._view),this._mousePicker=this._pickGroup.getRaycastPicker(this._partition),this._mousePicker.shapeFlag=!0,this._mouseManager=xh.getInstance(this._view.stage),this._renderer=ro.getInstance(this._view,Co).getRenderer(this._partition),this._rendererStage=this._view.stage,this._rendererStage.container.style.visibility="hidden",this._rendererStage.antiAlias=0,this._renderer.renderableSorter=null,this._projection=this._view.projection,this._projection.coordinateSystem=gt.RIGHT_HANDED,this._projection.originX=-1,this._projection.originY=1,this._projection.fieldOfView=360*Math.atan(window.innerHeight/1e3/2)/Math.PI},e.prototype.playSWF=function(t,e){var n=this;this._gameConfig={files:[{data:t,path:e,resourceType:"GAME"}]},this.addEventListener(j.LOADER_COMPLETE,(function(t){return n.play()})),this.loadNextResource()},e.prototype.snapshot=function(t){var e=new en(this._stageWidth,this._stageHeight,!0,4294967295,!1);this._renderer.queueSnapshot(e),this._renderer.view.target=e,this._renderer.render(),this._renderer.view.target=null,e.invalidate();for(var n=e.data,r=new en(this._stageWidth,this._stageHeight,!0,4278255615,!1),i=0,o=0,a=0;an||d>a)&&(g=n,_=n/u,f=(d=Math.min(a,g*c))/u),h+=(n-g)/2,p+=(r-_)/2,i&&(this._rendererStage.pixelRatio=1),this._projection.fieldOfView=360*Math.atan(this._stageHeight/1e3/2)/Math.PI;break;case Lp.EXACT_FIT:case Lp.NO_BORDER:this._projection.fieldOfView=360*Math.atan(r/1e3/2)/Math.PI;break;default:console.log("Stage: only implemented StageScaleMode are NO_SCALE, SHOW_ALL")}switch(this._align){case Np.TOP_LEFT:this._view.x=h,this._view.y=p;break;default:this._view.x=h,this._view.y=p,console.log("Stage: only implemented StageAlign is TOP_LEFT")}this._view.width=d,this._view.height=f,l.style.width=g+"px",l.style.height=_+"px",this._fpsTextField&&(this._fpsTextField.style.left=.5*window.innerWidth-50+"px"),this._avmHandler&&this._avmHandler.resizeStage()},e.prototype.resizeCallback=function(t){this.resizeStageInternal()},e.prototype.pause=function(){this._volume=C.getVolume(),this._isPaused=!0,C.setVolume(0)},e.prototype.unPause=function(){C.setVolume(this._volume),this._isPaused=!1},Object.defineProperty(e.prototype,"isPaused",{get:function(){return this._isPaused},set:function(t){this._isPaused=t},enumerable:!0,configurable:!0}),e.prototype.main_loop=function(t){if(!this._isPaused){if(!this._avmHandler)throw"error - can not render when no avm-stage is available";var e=Math.floor(1e3/this._frameRate);this._time+=Math.min(t,e),this._time>=e&&(this._currentFps++,this.showNextFrame(this._time),this._time-=e)}},e.prototype.requestRender=function(){bu.execute_queue(),this._renderer.render()},e.prototype.showNextFrame=function(t){if(this._isPaused)return Mp.enterFrame(),void Mp.exitFrame();Mp.enterFrame(),this.avmTestHandler&&this.avmTestHandler.dispatchEvents(),this._mouseManager.fireMouseEvents(this._mousePicker),this._avmHandler.enterFrame(t),this.avmTestHandler&&this.avmTestHandler.nextFrame(),this._renderer.render(),Mp.exitFrame()},Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(t){this._alignAllowUpdate&&(this._align=t,this.resizeCallback())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityImplementation",{get:function(){return console.log("AVMStage: get accessibilityImplementation not implemented"),this._align},set:function(t){console.log("AVMStage: accessibilityImplementation not implemented")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._renderer.view.backgroundColor},set:function(t){this._renderer.view.backgroundColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frameRate",{get:function(){return this._frameRate},set:function(t){this._frameRate=t},enumerable:!0,configurable:!0}),e.prototype.getLocalMouseX=function(t){return t.getInverseMatrix3D().transformVector(this._renderer.view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).x},e.prototype.getLocalMouseY=function(t){return t.getInverseMatrix3D().transformVector(this._renderer.view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).y},e.prototype.getLocalTouchPoints=function(t){for(var e,n=new Array,r=this._view.stage.touchPoints.length,i=0;i=0;r--)n[r]=t.pop();n.length=e}function hf(t,e){for(var n=0;n>5&255,d[r++]=n>>13&255,d[r++]=n>>21&255,d[r++]=n>>>29&255,d[r++]=0,d[r++]=0,d[r++]=0;var f=new Int32Array(16);for(r=0;r>>32-I)|0,m=b}u=u+m|0,l=l+y|0,c=c+A|0,h=h+v|0}return u},mixHash:function(t,e){return(31*t|0)+e|0}},gf=function t(e){var n;switch(typeof e){case"boolean":return e?"":"";case"number":return""+e+"";case"object":if(null===e)return"";if("hasOwnProperty"in e&&e.hasOwnProperty("length")){n="";for(var r=0;r'+t(e[r])+"";return n+""}for(var i in n="",e)n+=''+t(e[i])+"";return n+"";case"string":return""+e.replace(/&/g,"&").replace(//g,">")+"";case"undefined":return""}},_f=function(){function t(){}return Object.defineProperty(t,"interfaceID",{get:function(){return t._interfaceID},set:function(e){t._interfaceID=e},enumerable:!0,configurable:!0}),t.ensureInit=function(){window[t._interfaceID]||(window[t._interfaceID]={}),window[t._interfaceID].__flash__toXML=gf},t.initJS=function(e){t.callback=e},t.registerCallback=function(e){t.ensureInit(),window[t._interfaceID][e]=function(){for(var n=[],r=0;r0?new Cf(this.context,t[0],t[1]):new Cf(this.context,0,0)},e.prototype.distance=function(t,e){return T.distance(vf(t),vf(e))},e.prototype.interpolate=function(t,e,n){n=U_(this.context,n);var r=T.interpolate(vf(t),vf(e),n);return Cf.fromAS3Point(this.context,r)},e.prototype.polar=function(t,e){return t=U_(this.context,t),e=U_(this.context,e),Cf.fromAS3Point(this.context,T.polar(t,e))},e}(Af),Ef=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(r,{constructor:{value:n,writable:!0},length:{get:r.getLength},add:{value:r.add,writable:!0},clone:{value:r.clone,writable:!0},equals:{value:r.equals,writable:!0},normalize:{value:r.normalize,writable:!0},offset:{value:r.offset,writable:!0},subtract:{value:r.subtract,writable:!0},toString:{value:r._toString,writable:!0}}),r}return n(e,t),e.prototype.getLength=function(){return vf(this).length},e.prototype.add=function(t){return Cf.fromAS3Point(this.context,vf(this).add(vf(t)))},e.prototype.clone=function(){var t=new Cf(this.context);return this instanceof yf&&(t.alPut("x",this.alGet("x")),t.alPut("y",this.alGet("y"))),t},e.prototype.equals=function(t){return vf(this).equals(vf(t))},e.prototype.normalize=function(t){t=U_(this.context,t);var e=vf(this);e.normalize(t),bf(e,this)},e.prototype.offset=function(t,e){t=U_(this.context,t),e=U_(this.context,e);var n=vf(this);n.offset(t,e),bf(n,this)},e.prototype.subtract=function(t){return Cf.fromAS3Point(this.context,vf(this).subtract(vf(t)))},e.prototype._toString=function(){return"(x="+this.alGet("x")+", y="+this.alGet("y")+")"},e}(yf);function xf(t){var e,n,r,i,o=t.context;return t instanceof yf&&(e=Y_(o,t.alGet("x")),n=Y_(o,t.alGet("y")),r=Y_(o,t.alGet("width")),i=Y_(o,t.alGet("height"))),new q(e,n,r,i)}function wf(t,e){e.alPut("x",t.x),e.alPut("y",t.y),e.alPut("width",t.width),e.alPut("height",t.height)}var Sf=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.alPrototype=e.globals.Rectangle.alGetPrototypeProperty(),a.alPut("x",n),a.alPut("y",r),a.alPut("width",i),a.alPut("height",o),a}return n(e,t),e.fromAS3Rectangle=function(t,n){return new e(t,n.x,n.y,n.width,n.height)},e}(yf),Df=function(t){function e(e){var n=t.call(this,e)||this;return nm(n,{prototype:{value:new Tf(e,n)}}),n}return n(e,t),e.prototype.alConstruct=function(t){return t&&t.length>0?new Sf(this.context,t[0],t[1],t[2],t[3]):new Sf(this.context,0,0,0,0)},e}(Af),Tf=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(r,{constructor:{value:n,writable:!0},bottom:{get:r.getBottom,set:r.setBottom},bottomRight:{get:r.getBottomRight,set:r.setBottomRight},left:{get:r.getLeft,set:r.setLeft},right:{get:r.getRight,set:r.setRight},size:{get:r.getSize,set:r.setSize},top:{get:r.getTop,set:r.setTop},topLeft:{get:r.getTopLeft,set:r.setTopLeft},clone:{value:r.clone,writable:!0},contains:{value:r.contains,writable:!0},containsPoint:{value:r.containsPoint,writable:!0},containsRectangle:{value:r.containsRectangle,writable:!0},equals:{value:r.equals,writable:!0},inflate:{value:r.inflate,writable:!0},inflatePoint:{value:r.inflatePoint,writable:!0},intersection:{value:r.intersection,writable:!0},intersects:{value:r.intersects,writable:!0},isEmpty:{value:r.isEmpty,writable:!0},offset:{value:r.offset,writable:!0},offsetPoint:{value:r.offsetPoint,writable:!0},setEmpty:{value:r.setEmpty,writable:!0},toString:{value:r._toString,writable:!0},union:{value:r.union,writable:!0}}),r}return n(e,t),e.prototype.getBottom=function(){return U_(this.context,this.alGet("y"))+U_(this.context,this.alGet("height"))},e.prototype.setBottom=function(t){this.alPut("height",U_(this.context,t)-U_(this.context,this.alGet("y")))},e.prototype.getBottomRight=function(){return new Cf(this.context,e.prototype.getRight.call(this),e.prototype.getBottom.call(this))},e.prototype.setBottomRight=function(t){e.prototype.setRight.call(this,t.alGet("x")),e.prototype.setBottom.call(this,t.alGet("y"))},e.prototype.getLeft=function(){return U_(this.context,this.alGet("x"))},e.prototype.setLeft=function(t){this.alPut("x",U_(this.context,t))},e.prototype.getSize=function(){return new Cf(this.context,this.alGet("width"),this.alGet("height"))},e.prototype.setSize=function(t){this.alPut("width",t.alGet("x")),this.alPut("height",t.alGet("y"))},e.prototype.getRight=function(){return U_(this.context,this.alGet("x"))+U_(this.context,this.alGet("width"))},e.prototype.setRight=function(t){this.alPut("width",U_(this.context,t)-U_(this.context,this.alGet("x")))},e.prototype.getTop=function(){return U_(this.context,this.alGet("y"))},e.prototype.setTop=function(t){this.alPut("y",U_(this.context,t))},e.prototype.getTopLeft=function(){return new Cf(this.context,e.prototype.getLeft.call(this),e.prototype.getTop.call(this))},e.prototype.setTopLeft=function(t){e.prototype.setLeft.call(this,t.alGet("x")),e.prototype.setTop.call(this,t.alGet("y"))},e.prototype.clone=function(){var t=new Sf(this.context);return this instanceof yf&&(t.alPut("x",this.alGet("x")),t.alPut("y",this.alGet("y")),t.alPut("width",this.alGet("width")),t.alPut("height",this.alGet("height"))),t},e.prototype.contains=function(t,e){return t=U_(this.context,t),e=U_(this.context,e),xf(this).contains(t,e)},e.prototype.containsPoint=function(t){var e=xf(this),n=vf(t);return e.containsPoint(n)},e.prototype.containsRectangle=function(t){var e=xf(this),n=xf(t);return e.containsRect(n)},e.prototype.equals=function(t){var e=xf(this),n=xf(t);return e.equals(n)},e.prototype.inflate=function(t,e){t=U_(this.context,t),e=U_(this.context,e);var n=xf(this);n.inflate(t,e),wf(n,this)},e.prototype.inflatePoint=function(t){var e=xf(this),n=vf(t);e.inflatePoint(n),wf(e,this)},e.prototype.intersection=function(t){var e=xf(this),n=xf(t);return Sf.fromAS3Rectangle(this.context,e.intersection(n))},e.prototype.intersects=function(t){var e=xf(this),n=xf(t);return e.intersects(n)},e.prototype.isEmpty=function(){return xf(this).isEmpty()},e.prototype.offset=function(t,e){t=U_(this.context,t),e=U_(this.context,e);var n=xf(this);n.offset(t,e),wf(n,this)},e.prototype.offsetPoint=function(t){var e=xf(this),n=vf(t);e.offsetPoint(n),wf(e,this)},e.prototype.setEmpty=function(){this.alPut("x",0),this.alPut("y",0),this.alPut("width",0),this.alPut("height",0)},e.prototype._toString=function(){return"(x="+this.alGet("x")+", y="+this.alGet("y")+", w="+this.alGet("width")+", h="+this.alGet("height")+")"},e.prototype.union=function(t){var e=xf(this),n=xf(t);return Sf.fromAS3Rectangle(this.context,e.union(n))},e}(yf);function Pf(t,e){return void 0===t?e:t}function Bf(t){var e=t.context;return t instanceof Of?new w(Y_(e,Pf(t._rawData[0],1)),Y_(e,Pf(t._rawData[1],1)),Y_(e,Pf(t._rawData[2],1)),Y_(e,Pf(t._rawData[3],1)),Y_(e,Pf(t._rawData[4],0)),Y_(e,Pf(t._rawData[5],0)),Y_(e,Pf(t._rawData[6],0)),Y_(e,Pf(t._rawData[7],0))):new w(1,1,1,1,0,0,0,0)}var Of=function(t){function e(e,n,r,i,o,a,s,u,l){void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),void 0===o&&(o=1),void 0===a&&(a=0),void 0===s&&(s=0),void 0===u&&(u=0),void 0===l&&(l=0);var c=t.call(this,e)||this;return c._rawData=[n,r,i,o,a,s,u,l],c.alPrototype=e.globals.ColorTransform.alGetPrototypeProperty(),nm(c,{rgb:{get:c.getRgb,set:c.setRgb},ra:{get:c.getRM,set:c.setRM},ga:{get:c.getGM,set:c.setGM},ba:{get:c.getBM,set:c.setBM},aa:{get:c.getAM,set:c.setAM},rb:{get:c.getRO,set:c.setRO},gb:{get:c.getGO,set:c.setGO},bb:{get:c.getBO,set:c.setBO},ab:{get:c.getAO,set:c.setAO},redMultiplier:{get:c.getRedMultiplier,set:c.setRedMultiplier},greenMultiplier:{get:c.getGreenMultiplier,set:c.setGreenMultiplier},blueMultiplier:{get:c.getBlueMultiplier,set:c.setBlueMultiplier},alphaMultiplier:{get:c.getAlphaMultiplier,set:c.setAlphaMultiplier},redOffset:{get:c.getRedOffset,set:c.setRedOffset},greenOffset:{get:c.getGreenOffset,set:c.setGreenOffset},blueOffset:{get:c.getBlueOffset,set:c.setBlueOffset},alphaOffset:{get:c.getAlphaOffset,set:c.setAlphaOffset},concat:{value:c.concat,writable:!0},toString:{value:c._toString,writable:!0}}),c}return n(e,t),e.prototype.getRedMultiplier=function(){return this._rawData[0]},e.prototype.setRedMultiplier=function(t){this._rawData[0]=t},e.prototype.getGreenMultiplier=function(){return this._rawData[1]},e.prototype.setGreenMultiplier=function(t){this._rawData[1]=t},e.prototype.getBlueMultiplier=function(){return this._rawData[2]},e.prototype.setBlueMultiplier=function(t){this._rawData[2]=t},e.prototype.getAlphaMultiplier=function(){return this._rawData[3]},e.prototype.setAlphaMultiplier=function(t){this._rawData[3]=t},e.prototype.getRedOffset=function(){return this._rawData[4]},e.prototype.setRedOffset=function(t){this._rawData[4]=t},e.prototype.getGreenOffset=function(){return this._rawData[5]},e.prototype.setGreenOffset=function(t){this._rawData[5]=t},e.prototype.getBlueOffset=function(){return this._rawData[6]},e.prototype.setBlueOffset=function(t){this._rawData[6]=t},e.prototype.getAlphaOffset=function(){return this._rawData[7]},e.prototype.setAlphaOffset=function(t){this._rawData[7]=t},e.prototype.getRM=function(){return 100*this._rawData[0]},e.prototype.setRM=function(t){this._rawData[0]=t/100},e.prototype.getGM=function(){return 100*this._rawData[1]},e.prototype.setGM=function(t){this._rawData[1]=t/100},e.prototype.getBM=function(){return 100*this._rawData[2]},e.prototype.setBM=function(t){this._rawData[2]=t/100},e.prototype.getAM=function(){return 100*this._rawData[3]},e.prototype.setAM=function(t){this._rawData[3]=t/100},e.prototype.getRO=function(){return this._rawData[4]},e.prototype.setRO=function(t){this._rawData[4]=t},e.prototype.getGO=function(){return this._rawData[5]},e.prototype.setGO=function(t){this._rawData[5]=t},e.prototype.getBO=function(){return this._rawData[6]},e.prototype.setBO=function(t){this._rawData[6]=t},e.prototype.getAO=function(){return this._rawData[7]},e.prototype.setAO=function(t){this._rawData[7]=t},e.prototype.getRgb=function(){return this._rawData[4]<<16|this._rawData[5]<<8|this._rawData[6]},e.prototype.setRgb=function(t){var e=x.float32ColorToARGB(t);this._rawData[4]=e[1],this._rawData[5]=e[2],this._rawData[6]=e[3],this._rawData[0]=0,this._rawData[1]=0,this._rawData[2]=0},e.prototype.concat=function(t){console.warn("AVM1ColorTransform concat is not implemented")},e.prototype._toString=function(){return"[object Object]"},e.fromAwayColorTransform=function(t,n){return new e(t,n.redMultiplier,n.greenMultiplier,n.blueMultiplier,n.alphaMultiplier,n.redOffset,n.greenOffset,n.blueOffset,n.alphaOffset)},e}(yf),Mf=function(t){function e(e){var n=t.call(this,e)||this;return nm(n,{prototype:{value:new Lf(e,n)}}),n}return n(e,t),e.prototype.alConstruct=function(t){var e=Object.create(Of.prototype);return t=t||[],Of.apply(e,[this.context].concat(t)),e},e}(Af),Lf=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(r,{constructor:{value:n,writable:!0}}),r}return n(e,t),e}(yf);function Nf(t){var e,n,r,i,o,a,s=t.context;return t instanceof yf&&(e=Y_(s,t.alGet("a")),n=Y_(s,t.alGet("b")),r=Y_(s,t.alGet("c")),i=Y_(s,t.alGet("d")),o=Y_(s,t.alGet("tx")),a=Y_(s,t.alGet("ty"))),new P(e,n,r,i,o,a)}function Rf(t,e){e.alPut("a",t.a),e.alPut("b",t.b),e.alPut("c",t.c),e.alPut("d",t.d),e.alPut("tx",t.tx),e.alPut("ty",t.ty)}var Ff=function(t){function e(e,n,r,i,o,a,s){void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=1),void 0===a&&(a=0),void 0===s&&(s=0);var u=t.call(this,e)||this;return u.alPrototype=e.globals.Matrix.alGetPrototypeProperty(),u.alPut("a",n),u.alPut("b",r),u.alPut("c",i),u.alPut("d",o),u.alPut("tx",a),u.alPut("ty",s),u}return n(e,t),e.fromAS3Matrix=function(t,n){return new e(t,n.a,n.b,n.c,n.d,n.tx,n.ty)},e}(yf),kf=function(t){function e(e){var n=t.call(this,e)||this;return nm(n,{prototype:{value:new Uf(e,n)}}),n}return n(e,t),e.prototype.alConstruct=function(t){return t&&t.length>0?new Ff(this.context,t[0],t[1],t[2],t[3],t[4],t[5]):new Ff(this.context)},e}(Af),Uf=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(r,{constructor:{value:n,writable:!0},clone:{value:r.clone,writable:!0},concat:{value:r.concat,writable:!0},createBox:{value:r.createBox,writable:!0},createGradientBox:{value:r.createGradientBox,writable:!0},deltaTransformPoint:{value:r.deltaTransformPoint,writable:!0},identity:{value:r.identity,writable:!0},invert:{value:r.invert,writable:!0},rotate:{value:r.rotate,writable:!0},scale:{value:r.scale,writable:!0},toString:{value:r._toString,writable:!0},transformPoint:{value:r.transformPoint,writable:!0},translate:{value:r.translate,writable:!0}}),r}return n(e,t),e.prototype.clone=function(){var t=new Ff(this.context);return this instanceof yf&&(t.alPut("a",this.alGet("a")),t.alPut("b",this.alGet("b")),t.alPut("c",this.alGet("c")),t.alPut("d",this.alGet("d")),t.alPut("tx",this.alGet("tx")),t.alPut("ty",this.alGet("ty"))),t},e.prototype.concat=function(t){var e=Nf(this),n=Nf(t);e.concat(n),Rf(e,this)},e.prototype.createBox=function(t,e,n,r,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),t=Y_(this.context,t),e=Y_(this.context,e),n=Y_(this.context,n),r=Y_(this.context,r),i=Y_(this.context,i);var o=Nf(this);o.createBox(t,e,n,r,i),Rf(o,this)},e.prototype.createGradientBox=function(t,e,n,r,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),t=Y_(this.context,t),e=Y_(this.context,e),n=Y_(this.context,n),r=Y_(this.context,r),i=Y_(this.context,i);var o=Nf(this);o.createGradientBox(t,e,n,r,i),Rf(o,this)},e.prototype.deltaTransformPoint=function(t){var e=vf(t),n=Nf(this);return Cf.fromAS3Point(this.context,n.deltaTransformPoint(e))},e.prototype.identity=function(){this.alPut("a",1),this.alPut("b",0),this.alPut("c",0),this.alPut("d",1),this.alPut("tx",0),this.alPut("ty",0)},e.prototype.invert=function(){var t=Nf(this);t.invert(),Rf(t,this)},e.prototype.rotate=function(t){t=Y_(this.context,t);var e=Nf(this);e.rotate(t),Rf(e,this)},e.prototype.scale=function(t,e){t=Y_(this.context,t),e=Y_(this.context,e);var n=Nf(this);n.scale(t,e),Rf(n,this)},e.prototype._toString=function(){return Nf(this).toString()},e.prototype.transformPoint=function(t){var e=vf(t),n=Nf(this);return Cf.fromAS3Point(this.context,n.transformPoint(e))},e.prototype.translate=function(t,e){t=Y_(this.context,t),e=Y_(this.context,e);var n=Nf(this);n.translate(t,e),Rf(n,this)},e}(yf),jf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.createAVM1Class=function(t){var n=new e(t);return hm(t,n,e.prototype,["align#","displayState#","fullScreenSourceRect#","height#","scaleMode#","showMenu#","width#"],!1),n},e.bindStage=function(t,n,r,i,o){n.avmStage=r,n.avm1Handler=i,e.avmStage=r},e.prototype.getAlign=function(){return this.avmStage.align},e.prototype.setAlign=function(t){this.avmStage.align=t},e.prototype.getDisplayState=function(){return this.avmStage.displayState},e.prototype.setDisplayState=function(t){this.avmStage.displayState=t},e.prototype.getFullScreenSourceRect=function(){return null},e.prototype.setFullScreenSourceRect=function(t){},e.prototype.getHeight=function(){return this.avmStage.stageHeight},e.prototype.getScaleMode=function(){return this.avmStage.scaleMode},e.prototype.setScaleMode=function(t){this.avmStage.scaleMode=t},e.prototype.getShowMenu=function(){return null},e.prototype.setShowMenu=function(t){},e.prototype.getWidth=function(){return this.avmStage.stageWidth},e}(yf);function Vf(t){return t instanceof Gf?t.as3BitmapData:null}var Qf,Gf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._linkedBillboards=[],e._isSymbolSource=!1,e}return n(e,t),e.createAVM1Class=function(t){return pm(t,!0,e,["loadBitmap"],["height#","rectangle#","transparent#","width#","applyFilter","clone","colorTransform","compare","copyChannel","copyPixels","dispose","draw","fillRect","floodFill","generateFilterRect","getColorBoundsRect","getPixel","getPixel32","hitTest","merge","noise","paletteMap","perlinNoise","pixelDissolve","scroll","setPixel","setPixel32","threshold"],null,e.prototype.avm1Constructor)},e.prototype.getBillboard=function(t,e){var n=ps.getMaterialForBitmap(this.adaptee,!0),r=new cu(n,t,e);return this._linkedBillboards.push(r),r},Object.defineProperty(e.prototype,"as3BitmapData",{get:function(){return this.adaptee},enumerable:!0,configurable:!0}),e.prototype.avm1Constructor=function(t,e,n,r){if(t=U_(this.context,t),e=U_(this.context,e),n=arguments.length<3||k_(this.context,n),r=arguments.length<4?4294967295:V_(this.context,r),0!=t&&0!=e){var i=Eh.getImage(t,e,n,r,!1,jf.avmStage.view.stage);console.log("Construct:",i.id),this.adaptee=i}},e.fromAS3BitmapData=function(t,n){var r=new e(t);return r.alPrototype=t.globals.BitmapData.alGetPrototypeProperty(),r.adaptee=n,r},e.loadBitmap=function(t,n){n=Q_(t,n);for(var r,i=ht.getBundle(),o=0,a=Object.keys(i._assetDictionary);o>>0,e=V_(this.context,e)>>>0,n=k_(this.context,n);var i=null===(r=this.as3BitmapData)||void 0===r?void 0:r.getColorBoundsRect(t,e,n);return i?new Sf(this.context,i.x,i.y,i.width,i.height):null}},e.prototype.getPixel=function(t,e){return this.adaptee?this.adaptee.getPixel(t,e):0},e.prototype.getPixel32=function(t,e){return this.adaptee?this.adaptee.getPixel32(t,e):0},e.prototype.hitTest=function(t,e,n,r,i){return console.warn("[avm1/AVM1BitmapData] - hitTest not implemented"),!1},e.prototype.merge=function(t,e,n,r,i,o,a){var s=t.as3BitmapData;if(this.adaptee&&s){var u=xf(e),l=vf(n);r=V_(this.context,r),i=V_(this.context,i),o=V_(this.context,o),a=V_(this.context,a),this.as3BitmapData.merge(s,u,l,r,i,o,a)}},e.prototype.noise=function(t,e,n,r,i){t=V_(this.context,t),e=arguments.length<2?0:V_(this.context,e),n=arguments.length<3?255:V_(this.context,n),r=arguments.length<4?7:V_(this.context,r),i=!(arguments.length<5)&&k_(this.context,i),console.warn("[avm1/AVM1BitmapData] - noise not implemented")},e.prototype.paletteMap=function(t,e,n,r,i,o,a){console.warn("[avm1/AVM1BitmapData] - paletteMap not implemented")},e.prototype.perlinNoise=function(t,e,n,r,i,o,a,s,u){t=Y_(this.context,t),e=Y_(this.context,e),n=Y_(this.context,n),r=Y_(this.context,r),i=k_(this.context,i),o=k_(this.context,o),a=void 0===a?7:Y_(this.context,a),s=k_(this.context,s),console.warn("[avm1/AVM1BitmapData] - perlinNoise not implemented")},e.prototype.pixelDissolve=function(t,e,n,r,i,o){var a=xf(e);return r=arguments.length<4?0:V_(this.context,r),i=arguments.length<5?a.width*a.height/30:V_(this.context,i),o=arguments.length<6?0:V_(this.context,o),console.warn("[avm1/AVM1BitmapData] - pixelDissolve not implemented"),0},e.prototype.scroll=function(t,e){if(t=0|Y_(this.context,t),e=0|Y_(this.context,e),(t||e)&&this.adaptee){var n=this.as3BitmapData;n.copyPixels(n,n.rect,new T(t,e),null,null,!1)}},e.prototype.setPixel=function(t,e,n){this.adaptee&&(t=Y_(this.context,t),e=Y_(this.context,e),n=V_(this.context,n),this.adaptee.setPixel(t,e,n))},e.prototype.setPixel32=function(t,e,n){this.adaptee&&(t=Y_(this.context,t),e=Y_(this.context,e),n=V_(this.context,n),this.adaptee.setPixel32(t,e,n))},e.prototype.threshold=function(t,e,n,r,i,o,a,s){var u=this.as3BitmapData,l=t.as3BitmapData;if(this.adaptee&&l){var c=xf(e),h=vf(n);return r=X_(this.context,r),i=V_(this.context,i)>>>0,o=arguments.length<6?0:V_(this.context,o),a=arguments.length<7?4294967295:V_(this.context,a),s=!(arguments.length<8)&&k_(this.context,s),o=0===o?65793:o,u.threshold(l,c,h,r,i,16711935,a,s),0}},e}(yf);!function(t){t[t._x=0]="_x",t[t._y=1]="_y",t[t._xscale=2]="_xscale",t[t._yscale=3]="_yscale",t[t._currentframe=4]="_currentframe",t[t._totalframes=5]="_totalframes",t[t._alpha=6]="_alpha",t[t._visible=7]="_visible",t[t._width=8]="_width",t[t._height=9]="_height",t[t._rotation=10]="_rotation",t[t._target=11]="_target",t[t._framesloaded=12]="_framesloaded",t[t._name=13]="_name",t[t._droptarget=14]="_droptarget",t[t._url=15]="_url",t[t._highquality=16]="_highquality",t[t._focusrect=17]="_focusrect",t[t._soundbuftime=18]="_soundbuftime",t[t._quality=19]="_quality",t[t._xmouse=20]="_xmouse",t[t._ymouse=21]="_ymouse"}(Qf||(Qf={}));var zf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.createAVM1Class=function(t){var n=["align#","blockIndent#","bold#","bullet#","color#","font#","getTextExtent","indent#","italic#","kerning#","leading#","leftMargin#","letterSpacing#","rightMargin#","size#","tabStops#","target#","adaptee#","underline#","url#"],r=pm(t,!0,e,[],n,null,e.prototype.avm1Constructor),i=r.alGetPrototypeProperty(),o=null;return n.forEach((function(t){"#"===t[t.length-1]&&(t=t.slice(0,-1)),(o=i.alGetOwnProperty(t)).flags&=-2,i.alSetOwnProperty(t,o)})),r},e.createFromNative=function(t,n){var r=t.globals.TextFormat,i=new e(t);return i.alPrototype=r.alGetPrototypeProperty(),i.adaptee=n,i},e.prototype.alPut=function(e,n){"font"==e&&this.setFont(n),t.prototype.alPut.call(this,e,n)},e.prototype.avm1Constructor=function(t,e,n,r,i,o,a,s,u,l,c,h,p){var d=this.context;t=null==t?null:Q_(d,t),e=null==e?null:U_(d,e),n=null==n?null:U_(d,n),r=null==r?null:k_(d,r),i=null==i?null:k_(d,i),o=null==o?null:k_(d,o),a=null==a?null:Q_(d,a),s=null==s?null:Q_(d,s),u=null==u?null:Q_(d,u),l=null==l?null:U_(d,l),c=null==c?null:U_(d,c),h=null==h?null:U_(d,h),p=null==p?null:U_(d,p);var f=new zc(t,e,n,r,i,o,a,s,u,l,c,h,p);this.adaptee=f},e.alInitStatic=function(t){var e=new bh;e.multiline=!0,this._measureTextField=e},e.prototype.getAdaptee=function(){return this.adaptee.id},e.prototype.setAdaptee=function(t){},e.prototype.getAlign=function(){return this.adaptee.align},e.prototype.setAlign=function(t){var e=Q_(this.context,t);""==e&&(e="center"),this.adaptee.align=e},e.prototype.getBlockIndent=function(){return this.adaptee.blockIndent},e.prototype.setBlockIndent=function(t){this.adaptee.blockIndent=U_(this.context,t)},e.prototype.getBold=function(){return this.adaptee.bold},e.prototype.setBold=function(t){this.adaptee.bold=k_(this.context,t)},e.prototype.getBullet=function(){return this.adaptee.bullet},e.prototype.setBullet=function(t){this.adaptee.bullet=k_(this.context,t)},e.prototype.getColor=function(){return this.adaptee.color},e.prototype.setColor=function(t){this.adaptee.color=U_(this.context,t)},e.prototype.getFont=function(){return this.adaptee.font_name},e.prototype.setFont=function(t){this.adaptee.font=Q_(this.context,t)},e.prototype.getIndent=function(){return this.adaptee.indent},e.prototype.setIndent=function(t){this.adaptee.indent=U_(this.context,t)},e.prototype.getItalic=function(){return this.adaptee.italic},e.prototype.setItalic=function(t){this.adaptee.italic=k_(this.context,t)},e.prototype.getKerning=function(){return this.adaptee.kerning},e.prototype.setKerning=function(t){this.adaptee.kerning=k_(this.context,t)},e.prototype.getLeading=function(){return this.adaptee.leading},e.prototype.setLeading=function(t){this.adaptee.leading=U_(this.context,t)},e.prototype.getLeftMargin=function(){return this.adaptee.leftMargin},e.prototype.setLeftMargin=function(t){this.adaptee.leftMargin=U_(this.context,t)},e.prototype.getLetterSpacing=function(){return this.adaptee.letterSpacing},e.prototype.setLetterSpacing=function(t){this.adaptee.letterSpacing=U_(this.context,t)},e.prototype.getRightMargin=function(){return this.adaptee.rightMargin},e.prototype.setRightMargin=function(t){this.adaptee.rightMargin=U_(this.context,t)},e.prototype.getSize=function(){return this.adaptee.size},e.prototype.setSize=function(t){this.adaptee.size=U_(this.context,t)},e.prototype.getTabStops=function(){return new C_(this.context,this.adaptee.tabStops)},e.prototype.setTabStops=function(t){var e=this;this.adaptee.tabStops=C_.mapToJSArray(t,(function(t){return U_(e.context,t)}))},e.prototype.getTarget=function(){return""},e.prototype.setTarget=function(t){},e.prototype.getTextExtent=function(t,n){t=X_(this.context,t),n=+n;var r=this.context.getStaticState(e)._measureTextField;!isNaN(n)&&n>0?(r.width=n+4,r.wordWrap=!0):r.wordWrap=!1,r.textFormat=this.adaptee,r.text=t;var i=z_(this.context),o=r.textWidth,a=r.textHeight;return i.alPut("width",o),i.alPut("height",a),i.alPut("textFieldWidth",o+4),i.alPut("textFieldHeight",a+4),i},e.prototype.getUnderline=function(){return this.adaptee.underline},e.prototype.setUnderline=function(t){this.adaptee.underline=k_(this.context,t)},e.prototype.getUrl=function(){return this.adaptee.url},e.prototype.setUrl=function(t){this.adaptee.url=Q_(this.context,t)},e}(yf),Hf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.createAVM1Class=function(t){return pm(t,!1,e,["BACKSPACE","CAPSLOCK","CONTROL","DELETEKEY","DOWN","END","ENTER","ESCAPE","HOME","INSERT","LEFT","PGDN","PGUP","RIGHT","SHIFT","SPACE","TAB","UP","isDown","getCode"],[])},e.alInitStatic=function(t){this._keyStates=[],this._lastKeyCode=0},e.bindStage=function(t,n,r,i){e.keyDownDelegate&&i.removeEventListener("keydown",e.keyDownDelegate),e.keyUpDelegate&&i.removeEventListener("keyup",e.keyUpDelegate),e.keyDownDelegate=function(r){var i=t.getStaticState(e);i._lastKeyCode=r.keyCode,i._keyStates[r.keyCode]=1,J_(n,"broadcastMessage",["onKeyDown"])},e.keyUpDelegate=function(r){var i=t.getStaticState(e);i._lastKeyCode=r.keyCode,delete i._keyStates[r.keyCode],J_(n,"broadcastMessage",["onKeyUp"])},i.addEventListener("keydown",e.keyDownDelegate),i.addEventListener("keyup",e.keyUpDelegate)},e.isDown=function(t,n){return!!t.getStaticState(e)._keyStates[n]},e.getCode=function(t){return t.getStaticState(e)._lastKeyCode},e.BACKSPACE=8,e.CAPSLOCK=20,e.CONTROL=17,e.DELETEKEY=46,e.DOWN=40,e.END=35,e.ENTER=13,e.ESCAPE=27,e.HOME=36,e.INSERT=45,e.LEFT=37,e.PGDN=34,e.PGUP=33,e.RIGHT=39,e.SHIFT=16,e.SPACE=32,e.TAB=9,e.UP=38,e.keyDownDelegate=null,e.keyUpDelegate=null,e}(yf),Xf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.createAVM1Class=function(t){return pm(t,!0,e,[],["matrix#","concatenatedMatrix#","colorTransform#","pixelBounds#"],null,e.prototype.avm1Constructor)},Object.defineProperty(e.prototype,"as3Transform",{get:function(){return this._targetAwayObject.transform},enumerable:!0,configurable:!0}),e.prototype.avm1Constructor=function(t){this._target=this.context.resolveTarget(t),this._targetAwayObject=this._target.adaptee},e.prototype.getMatrix=function(){var t=this._targetAwayObject.transform;return Ff.fromAS3Matrix(this.context,t.matrix)},e.prototype.setMatrix=function(t){this._targetAwayObject.transform.matrix=Nf(t)},e.prototype.getConcatenatedMatrix=function(){return console.log("[AVM1Transform] concatenatedMatrix not implemented"),null},e.prototype.getColorTransform=function(){var t=this._targetAwayObject.transform;return Of.fromAwayColorTransform(this.context,t.colorTransform)},e.prototype.setColorTransform=function(t){this._targetAwayObject.transform.colorTransform=Bf(t)},e.prototype.getPixelBounds=function(){var t=this._targetAwayObject.transform;return Sf.fromAS3Rectangle(this.context,t.pixelBounds)},e}(yf),Yf=function(t){function e(e){var n=t.call(this,e)||this;return n.alSetOwnPrototypeProperty(new qf(e,n)),n}return n(e,t),e.prototype.alConstruct=function(t){var e=new yf(this.context);return e.alPrototype=this.alGetPrototypeProperty(),e},e}(Af),qf=function(t){function e(e,n){var r=t.call(this,e)||this;return nm(r,{constructor:{value:n,writable:!0},clone:{value:r.clone,writable:!0}}),r}return n(e,t),e.prototype.clone=function(){var t=new yf(this.context);return t.alPrototype=this.alGetPrototypeProperty(),t},e}(yf);function Kf(t,e,n,r,i){var o=n.alGetPrototypeProperty(),a=Object.create(qf.prototype);yf.call(a,t),a.alPrototype=o;var s=Object.create(Yf.prototype);Af.call(s,t),s.alSetOwnPrototypeProperty(a),s.alConstruct=function(e){var n=new yf(t);if(n.alPrototype=a,e)for(var r=0;r0;)n--,this.removeEventListenerOnAdapter(this._onClipEventsListeners[n].event,this._onClipEventsListeners[n].callback);this._onClipEventsListeners=[],this._mouseListenerCount=0},e.prototype._removeEventListener=function(t){var e=this.context.normalizeName(t.propertyName),n=this._eventsListeners[e];n&&(this.removeEventListenerOnAdapter(t,n),delete this._eventsListeners[e])},e.prototype.onEventPropertyModified=function(t){t=this.context.normalizeName(t);var e=this._eventsMap[t];this._updateEvent(e)},e.prototype.getEnabled=function(){return this.enabled},e.prototype.setEnabled=function(t){t!=this.enabled&&(this.enabled=t,this.setEnabledListener(t))},e.prototype.setEnabledListener=function(t){if(!1!==t&&0!==t){for(var e in this._eventsListeners)this._eventHandlers[e].allowDisable&&this.addEventListenerOnAdapter(this._eventHandlers[e],this._eventsListeners[e]);for(var e in this._onClipEventsListeners)this._onClipEventsListeners[e].event.allowDisable&&this.addEventListenerOnAdapter(this._onClipEventsListeners[e].event,this._onClipEventsListeners[e].callback)}else{for(var e in this._eventsListeners)this._eventHandlers[e].allowDisable&&this.removeEventListenerOnAdapter(this._eventHandlers[e],this._eventsListeners[e]);for(var e in this._onClipEventsListeners)this._onClipEventsListeners[e].event.allowDisable&&this.removeEventListenerOnAdapter(this._onClipEventsListeners[e].event,this._onClipEventsListeners[e].callback)}},e.prototype.get_alpha=function(){return 100*this.adaptee.alpha},e.prototype.set_alpha=function(t){this._ctBlockedByScript=!0,t=U_(this.context,t),isNaN(t)||(this.adaptee.alpha=t/100)},e.prototype.getBlendMode=function(){return""},e.prototype.setBlendMode=function(t){},e.prototype.getCacheAsBitmap=function(){return this.adaptee.cacheAsBitmap},e.prototype.setCacheAsBitmap=function(t){t=k_(this.context,t),this.adaptee.cacheAsBitmap=t},e.prototype.getFilters=function(){return this._as2Filters},e.prototype.setFilters=function(t){var e=function(t,e){var n=[];if(!e)return n;for(var r=e.alGet("length"),i=0;i180;)t-=360;for(;t<-180;)t+=360;return t},e.prototype.set_rotation=function(t){t=U_(this.context,t),this._blockedByScript=!0,isNaN(t)||(this.adaptee.rotationZ=t)},e.prototype.getScale9Grid=function(){return Sf.fromAS3Rectangle(this.context,this.adaptee.scale9Grid)},e.prototype.setScale9Grid=function(t){this.adaptee.scale9Grid=qh(t)?null:xf(t)},e.prototype.getScrollRect=function(){return Sf.fromAS3Rectangle(this.context,this.adaptee.scrollRect)},e.prototype.setScrollRect=function(t){this.adaptee.scrollRect=qh(t)?null:xf(t)},e.prototype.get_soundbuftime=function(){return 0},e.prototype.set_soundbuftime=function(t){},e.prototype.getTabEnabled=function(){return!!this.adaptee&&this.adaptee.tabEnabled},e.prototype.setTabEnabled=function(t){this.adaptee&&(this.adaptee.tabEnabled=t)},e.prototype.getTabIndex=function(){return this.adaptee.tabIndex},e.prototype.setTabIndex=function(t){this.adaptee.tabIndex=t},e.prototype.get_target=function(){var t=this.adaptee;if(t===t.root)return"/";var e="";do{if(qh(t))return;e="/"+t.name+e,t=t.parent}while(t&&!t.isAVMScene);return e},e.prototype.getTransform=function(){return this.context.swfVersion<8?this.transformPreFP8:(this._avmTransform||(this._avmTransform=this.context.globals.Transform.alConstruct([this])),this._avmTransform)},e.prototype.setTransform=function(t){this.context.swfVersion<8?this.transformPreFP8=t:t instanceof Xf&&console.log("not implemented: AVM1SymbolBase.setTransform")},e.prototype.get_visible=function(){return this.adaptee.visible},e.prototype.set_visible=function(t){this._visibilityByScript=!0,t=k_(this.context,t),this.adaptee.visible=t},e.prototype.get_url=function(){return this.adaptee.assetNamespace},e.prototype.get_width=function(){var t=jf.avmStage.pickGroup.getBoundsPicker(this.node.partition).getBoxBounds(jf.avmStage.pool.getNode(this.adaptee.parent||jf.avmStage.root));return null==t?0:fm(t.width)},e.prototype.set_width=function(t){t=fm(U_(this.context,t)),this._blockedByScript=!0,isNaN(t)||(jf.avmStage.pickGroup.getBoundsPicker(this.node.partition).width=t)},e.prototype.get_x=function(){return dm(this.adaptee.x)},e.prototype.set_x=function(t){t=dm(U_(this.context,t)),this._blockedByScript=!0,isNaN(t)||(this.adaptee.x=t)},e.prototype.get_xmouse=function(){return dm(jf.avmStage.getLocalMouseX(this.node))},e.prototype.get_xscale=function(){return 100*this.adaptee.scaleX},e.prototype.set_xscale=function(t){t=U_(this.context,t),this._blockedByScript=!0,isNaN(t)||(this.adaptee.scaleX=t/100)},e.prototype.get_y=function(){return dm(this.adaptee.y)},e.prototype.set_y=function(t){t=dm(U_(this.context,t)),this._blockedByScript=!0,isNaN(t)||(this.adaptee.y=t)},e.prototype.get_ymouse=function(){return dm(jf.avmStage.getLocalMouseY(this.node))},e.prototype.get_yscale=function(){return 100*this.adaptee.scaleY},e.prototype.set_yscale=function(t){t=U_(this.context,t),this._blockedByScript=!0,isNaN(t)||(this.adaptee.scaleY=t/100)},e.prototype.getDepth=function(){return this.protoTypeChanged?null:_m(this.adaptee._avmDepthID)},e.prototype.toString=function(){for(var t=this.adaptee,e=[];t;)t.isAVMScene?(e.push("_level0"),t=null):(e.push(t.name),t=t.parent);for(var n=e.length,r="";n>0;)r+=e[--n],n>0&&(r+=".");return r},e}(yf),eg=function(){return function(t,e,n,r,i,o){this.propertyName=t,this.eventName=e,this.stageEvent=n,this.allowDisable=r,this.isMouse=i,this.isButton=o}}(),ng=function(){return function(){}}(),rg=[-1,37,39,36,35,45,46,-1,8,-1,-1,-1,-1,13,38,40,33,34,9,27],ig=Object.create(null),og=ig,ag=eg;og[262144]=!0,og[512]=!0,og[131072]=new ag("onKey",Xc.KEYDOWN,!0,!0,!1,!1),og[1]=new ag("onLoad","load",!1,!1,!1,!1),og[4]=new ag("onUnload","unload",!1,!1,!1,!1),og[256]=new ag("onData","data",!1,!1,!1,!1),og[2]=new ag("onEnterFrame","enterFrame",!1,!1,!1,!1),og[64]=new ag("onKeyDown",Xc.KEYDOWN,!0,!0,!1,!1),og[128]=new ag("onKeyUp",Xc.KEYUP,!0,!0,!1,!1),og[8]=new ag("onMouseMove",vu.MOUSE_MOVE,!0,!0,!0,!1),og[16]=new ag("onMouseDown",vu.MOUSE_DOWN,!0,!0,!0,!1),og[32]=new ag("onMouseUp",vu.MOUSE_UP,!0,!0,!0,!1),og[1024]=new ag("onPress",vu.MOUSE_DOWN,!1,!0,!0,!0),og[2048]=new ag("onRelease",vu.MOUSE_UP,!1,!0,!0,!0),og[4096]=new ag("onReleaseOutside",vu.MOUSE_UP_OUTSIDE,!1,!0,!0,!0),og[8192]=new ag("onRollOver",vu.MOUSE_OVER,!1,!0,!0,!0),og[16384]=new ag("onRollOut",vu.MOUSE_OUT,!1,!0,!0,!0),og[32768]=new ag("onDragOver",vu.DRAG_OVER,!1,!0,!0,!0),og[65536]=new ag("onDragOut",vu.DRAG_OUT,!1,!0,!0,!0);var sg=new ag("onSetFocus",Ks.FOCUS_IN,!1,!0,!1,!1),ug=new ag("onKillFocus",Ks.FOCUS_OUT,!1,!0,!1,!1),lg=new ag("onChanged",Yc.CHANGED,!1,!0,!1,!1),cg=[ig[1],ig[4],ig[256],ig[2],ig[64],ig[128],ig[8],ig[16],ig[32],ig[1024],ig[2048],ig[4096],ig[8192],ig[16384],ig[32768],ig[65536],ig[131072],sg,ug,lg],hg=[ig[1],ig[4],ig[256],ig[2],ig[64],ig[128],ig[1024],ig[2048],ig[4096],ig[8192],ig[16384],ig[32768],ig[65536],ig[131072],sg,ug,lg],pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._prevTextVarContent="",e._textVarHolder=null,e._textVarPropName="",e}return n(e,t),e.createAVM1Class=function(t){return pm(t,!0,e,[],["_alpha#","addListener","antiAliasType#","autoSize#","background#","backgroundColor#","border#","borderColor#","bottomScroll#","condenseWhite#","embedFonts#","filters#","getAwayJSID","getNewTextFormat","getTextFormat","gridFitType#","getDepth","_height#","_highquality#","hscroll#","html#","htmlText#","length#","maxChars#","maxhscroll#","maxscroll#","multiline#","_name#","_parent#","password#","_quality#","_rotation#","replaceSel","removeMovieClip","removeTextField","restrict#","scroll#","selectable#","setNewTextFormat","setTextFormat","_soundbuftime#","tabEnabled#","tabIndex#","_target#","toString","text#","textColor#","textHeight#","textWidth#","type#","_url#","variable#","_visible#","_width#","wordWrap#","_x#","_xmouse#","_xscale#","_y#","_ymouse#","_yscale#"])},e.prototype.dispatchKeyEvent=function(t,e,n,r){if(this.context.globals.Stage&&this.context.globals.Stage.avmStage&&this.context.globals.Stage.avmStage.mouseManager.useSoftkeyboard){var i=this.context.getStaticState(Hf);i._lastKeyCode=t,i._keyStates[t]=1,J_(a_.instance.Key,"broadcastMessage",["onKeyDown"]);var o=new Xc(Xc.KEYDOWN,"",t);o.isShift=e,o.isCTRL=n,o.isAlt=r,this.context.globals.Stage.avmStage.dispatchEvent(o),delete i._keyStates[t],J_(a_.instance.Key,"broadcastMessage",["onKeyUp"]),(o=new Xc(Xc.KEYUP,"",t)).isShift=e,o.isCTRL=n,o.isAlt=r,this.context.globals.Stage.avmStage.dispatchEvent(o)}},e.syncAllTextfields=function(){for(var t in e.allTextfields)e.allTextfields[t]?e.allTextfields[t].syncTextFieldValue():delete e.allTextfields[t]},e.syncQueedTextfields=function(){if(e.textFieldVars.length>0){for(var t=e.textFieldVars.length,n=0;n=-1&&this.adaptee.parent.adapter.removeChildAtDepth(this.adaptee._avmDepthID)},e.prototype.alPut=function(e,n){t.prototype.alPut.call(this,e,n)},e.prototype.initAdapter=function(){var t=this;this.adaptee._symbol&&this.setVariable(this.adaptee._symbol.variableName||""),this.adaptee.addEventListener(Yc.CHANGED,(function(){t.updateVarFromText(),t.syncTextFieldValue()}))},e.prototype.initAVM1SymbolInstance=function(e,n){t.prototype.initAVM1SymbolInstance.call(this,e,n),this.adaptee=n,this._initEventsHandlers(),this._variable="",this._exitFrameHandler=null,this.adaptee=n},e.prototype.clone=function(){return cm(this.adaptee.clone(),this._avm1Context)},e.prototype.getAntiAliasType=function(){return""},e.prototype.setAntiAliasType=function(t){},e.prototype.get_width=function(){return this.syncTextFieldValue(),fm(this.adaptee.width)},e.prototype.get_height=function(){return this.syncTextFieldValue(),fm(this.adaptee.height)},e.prototype.set_width=function(t){t=fm(U_(this.context,t)),this._blockedByScript=!0,isNaN(t)||(this.adaptee.width=t)},e.prototype.set_height=function(t){t=fm(U_(this.context,t)),this._blockedByScript=!0,isNaN(t)||(this.adaptee.height=t)},e.prototype.get_x=function(){return this.syncTextFieldValue(),dm(this.adaptee.x+this.adaptee.scaleX*this.adaptee.textOffsetX)},e.prototype.get_y=function(){return this.syncTextFieldValue(),dm(this.adaptee.y+this.adaptee.scaleY*this.adaptee.textOffsetY)},e.prototype.set_x=function(t){this.syncTextFieldValue(),this.adaptee.x=dm(t-this.adaptee.scaleX*this.adaptee.textOffsetX)},e.prototype.set_y=function(t){this.syncTextFieldValue(),this.adaptee.y=dm(t-this.adaptee.scaleY*this.adaptee.textOffsetY)},e.prototype.getAutoSize=function(){return this.adaptee.autoSize},e.prototype.setAutoSize=function(t){!0===t?t="left":!1===t&&(t="none"),t=X_(this.context,t),this.adaptee.autoSize=t},e.prototype.getBackground=function(){return this.adaptee.background},e.prototype.setBackground=function(t){t=k_(this.context,t),this.adaptee.background=t},e.prototype.getBackgroundColor=function(){return this.adaptee.backgroundColor},e.prototype.setBackgroundColor=function(t){t=V_(this.context,t),this.adaptee.backgroundColor=t},e.prototype.getBorder=function(){return this.adaptee.border},e.prototype.setBorder=function(t){t=k_(this.context,t),this.adaptee.border=t},e.prototype.getBorderColor=function(){return this.adaptee.borderColor},e.prototype.setBorderColor=function(t){t=V_(this.context,t),this.adaptee.borderColor=t},e.prototype.getBottomScroll=function(){return this.adaptee.bottomScrollV+1},e.prototype.getCondenseWhite=function(){return this.adaptee.condenseWhite},e.prototype.setCondenseWhite=function(t){t=k_(this.context,t),this.adaptee.condenseWhite=t},e.prototype.getEmbedFonts=function(){return this.adaptee.embedFonts},e.prototype.setEmbedFonts=function(t){t=k_(this.context,t),this.adaptee.embedFonts=t},e.prototype.getNewTextFormat=function(){return zf.createFromNative(this.context,this.adaptee.textFormat)},e.prototype.getTextFormat=function(t,e){void 0===t&&(t=-1),void 0===e&&(e=-1),t=j_(this.context,t),e=j_(this.context,e);var n=this.adaptee.getTextFormat(t,e);return zf.createFromNative(this.context,n)},e.prototype.getGridFitType=function(){return""},e.prototype.setGridFitType=function(t){},e.prototype.getHscroll=function(){return this.adaptee.scrollH+1},e.prototype.setHscroll=function(t){(t=Y_(this.context,t))<=0&&(t=1),this.adaptee.scrollH=t-1},e.prototype.getHtml=function(){return this.adaptee.html},e.prototype.setHtml=function(t){this.adaptee.html=!!t},e.prototype.getHtmlText=function(){return this.adaptee.html?this.adaptee.htmlText:this.adaptee.text},e.prototype.setHtmlText=function(t){t=void 0===t?"undefined":Q_(this.context,t),this.adaptee.html?this.adaptee.htmlText=t:this.adaptee.text=t,this.updateVarFromText(),this.syncTextFieldValue()},e.prototype.getLength=function(){return this.adaptee.length},e.prototype.getMaxChars=function(){return 0==this.adaptee.maxChars?null:this.adaptee.maxChars},e.prototype.setMaxChars=function(t){t=Y_(this.context,t),this.adaptee.maxChars=t},e.prototype.getRestrict=function(){return this.adaptee.restrict},e.prototype.setRestrict=function(t){t=X_(this.context,t),this.adaptee.restrict=t},e.prototype.getMaxhscroll=function(){return this.adaptee.maxScrollH+1},e.prototype.getMaxscroll=function(){return this.adaptee.maxScrollV+1},e.prototype.getMultiline=function(){return this.adaptee.multiline},e.prototype.setMultiline=function(t){t=k_(this.context,t),this.adaptee.multiline=t},e.prototype.getPassword=function(){return this.adaptee.displayAsPassword},e.prototype.setPassword=function(t){t=k_(this.context,t),this.adaptee.displayAsPassword=t},e.prototype.getScroll=function(){return this.adaptee.scrollV+1},e.prototype.setScroll=function(t){(t=Y_(this.context,t))<=0&&(t=1),this.adaptee.scrollV=t-1},e.prototype.getSelectable=function(){return this.adaptee.selectable},e.prototype.setSelectable=function(t){"false"==t&&(t=!1),(t=k_(this.context,t))||this.context.globals.Stage.avmStage.mouseManager.getFocus()!=this.adaptee||this.context.globals.Stage.avmStage.mouseManager.setFocus(null),this.adaptee.selectable=t},e.prototype.replaceSel=function(t){t=Q_(this.context,t),this.adaptee.replaceSelectedText(t)},e.prototype.setNewTextFormat=function(t){var e;t instanceof zf?(e=t.adaptee,this.adaptee.textFormat||(this.adaptee.textFormat=new zc),this.adaptee.newTextFormat=e):console.log("AVM1Textfield.setNewtextFormat - trying to set something other than a TextFormat",t)},e.prototype.setTextFormat=function(){this._variable&&this.syncTextFieldValue();var t,e,n=-1,r=-1;switch(arguments.length){case 0:return;case 1:t=arguments[0];break;case 2:n=U_(this.context,arguments[0]),t=arguments[1];break;default:n=U_(this.context,arguments[0]),r=U_(this.context,arguments[1]),t=arguments[2]}n>=0&&-1==r&&(r=n),t instanceof zf&&(e=t.adaptee,this.adaptee.setTextFormat(e,n,r))},e.prototype.getText=function(){return this._variable&&this.syncTextFieldValue(),this.adaptee.text},e.prototype.setText=function(t){t=void 0===t?"":Q_(this.context,t);var e=this.context.utils;if(this.adaptee.parent){var n=cm(this.adaptee.parent,this.context);e.setProperty(n,this._variable,t)}this.adaptee.text=t,this._variable&&(this.updateVarFromText(),this.syncTextFieldValue())},e.prototype.getTextColor=function(){return this.adaptee.textColor},e.prototype.setTextColor=function(t){t=V_(this.context,t),this.adaptee.textColor=t},e.prototype.getTextHeight=function(){return this._variable&&this.syncTextFieldValue(),this.adaptee.textHeight},e.prototype.setTextHeight=function(t){},e.prototype.getTextWidth=function(){return this._variable&&this.syncTextFieldValue(),this.adaptee.textWidth},e.prototype.setTextWidth=function(t){},e.prototype.getType=function(){return this.adaptee.type},e.prototype.setType=function(t){(t=X_(this.context,t))&&(t=t.toLowerCase()),this.adaptee.type=t},e.prototype.getVariable=function(){return this._variable},e.prototype.setVariable=function(t){if((t=X_(this.context,t))!==this._variable){var n=this.adaptee;e.allTextfields[n.id]=this,this._prevTextVarContent=this.adaptee.text,this._syncTextFieldValue(n,t),this._exitFrameHandler&&!t&&(n.removeEventListener("exitFrame",this._exitFrameHandler),this._exitFrameHandler=null),this._variable=t,!this._exitFrameHandler&&t&&(this._exitFrameHandler=this._onAS3ObjectExitFrame.bind(this),n.addEventListener("exitFrame",this._exitFrameHandler))}},e.prototype._onAS3ObjectExitFrame=function(){this._variable&&this._syncTextFieldValue(this.adaptee,this._variable)},e.prototype.syncTextFieldValue=function(){this._syncTextFieldValue(this.adaptee,this._variable)},e.prototype.updateVarFromText=function(){this._textVarHolder&&(this.context.utils.setProperty(this._textVarHolder,this._textVarPropName,this.adaptee.html?this.adaptee.htmlText:this.adaptee.text),this._prevTextVarContent=this.adaptee.text)},e.prototype._syncTextFieldValue=function(t,n){if(n&&""!=n){var r=this.context.utils;if(null==this._textVarHolder)if(n.indexOf(".")>=0||n.indexOf(":")>=0){var i=n.split(/[.:\/]/g);if(this._textVarPropName=i.pop(),"_root"==i[0]||"_level0"==i[0]||"_level"==i[0]||""===i[0]){var o=t.parent;for(this._textVarHolder=null;o;)o.isAVMScene?(this._textVarHolder=o.adapter,o=null):o=o.parent;if(null===this._textVarHolder)return;i.shift(),""===i[0]&&i.shift()}else if("_global"==i[0])i.shift(),this._textVarHolder=this.context.globals;else{if(!t.parent)return;this._textVarHolder=cm(t.parent,this.context)}for(var a=null;i.length>0;)if(a=i.shift(),this._textVarHolder=r.getProperty(this._textVarHolder,a),!this._textVarHolder)return}else if(this._textVarPropName=n,t.parent&&t.parent.parent){this._textVarHolder=cm(t.parent,this.context);for(var s=void 0,u=t.parent.parent,l=u.numChildren,c=0;c=0;t--){this.adaptee.getChildAt(t)._avmDepthID<0&&this.adaptee.removeChildAt(t)}},e.prototype.getTimelineChildAtSessionID=function(t){return this.adaptee.getTimelineChildAtSessionID(t)},e.prototype.getDepthIndexInternal=function(t){var e=this.getDepthToChild(t);return e?e.parent!==this.adaptee?-1:this.adaptee.getChildIndex(e):-1},e.prototype.getIndexFromDepthOrTop=function(t){for(var e=0;et)return e;return this.adaptee.numChildren},e.prototype.removeChildAtDepth=function(t){var e=this.getDepthIndexInternal(t);-1!==e&&this.removeChildAt(e)},e.prototype.removeChildAt=function(t){var e=this.adaptee.removeChildAt(t);e._adapter&&e.adapter.freeFromScript(),this.unregisterScriptObject(e),delete this.adaptee._sessionID_childs[e._sessionID],this.setDepthToChild(e._avmDepthID),e._sessionID=-1,e._avmDepthID=-16384},e.prototype.addChildAtDepth=function(t,e,n){if(void 0===n&&(n=!1),null==t)throw"Parameter child cannot be null.";var r=this.getDepthIndexInternal(e);if(-1!=r){if(n)return console.log("depth is occupied"),null;this.removeChildAt(r),this.adaptee.addChildAt(t,r)}else this.adaptee.addChildAt(t,this.getIndexFromDepthOrTop(e));return this.adaptee.isSlice9ScaledMC&&"[asset Sprite]"==t.assetType&&(t.isSlice9ScaledSprite=!0),this._nextHighestDepth=0&&(c[d._sessionID]=d)}t._update_indices.length=0,t._update_frames.length=0;var f,g,_=0;for(u=e;u<=n;u++){var m=t.frame_command_indices[u],y=t.frame_recipe[u];if(2&y)for(g=(f=t.command_index_stream[m])+t.command_length_stream[m++],s=f;s=f;s--)l[t.add_child_stream[3*s+1]-16383]||(l[t.add_child_stream[3*s+1]-16383]={sessionID:t.add_child_stream[3*s],symbolID:t.add_child_stream[3*s+2],addedOnTargetFrame:u==n,depth:t.add_child_stream[3*s+1]-16383});else for(s=f;s=0;T--)C.indexOf(this.adaptee.getChildAt(T))<0&&this.adaptee.removeChildAt(T);for(var P=0;P=0;n--)(t=this.adaptee.getChildAt(n)).isAsset(Cu)&&t.adapter!==t&&t.adapter.freeFromScript()},e.prototype.freeFromScript=function(){this._locked||(this.hasSwappedDepth=!1,t.prototype.freeFromScript.call(this),this._mouseButtonListenerCount=0)},e.prototype.initAdapter=function(){for(var t in this._dropTarget="",this._mouseButtonListenerCount=0,e.currentMCAssetNameSpace=this.adaptee.assetNamespace,this.adaptee.timeline.avm1InitActions)this.executeScript(this.adaptee.timeline.symbolDecoder.prepareFrameScriptsForAVM1(this.adaptee.timeline.avm1InitActions[t],0,"initActionsData"+t,this.adaptee.id));this.initEvents&&function(t,e,n){var r=cm(t,e);n.variableName&&r.alPut("variable",n.variableName);var i,o,a,s,u,l,c=n.events;if(!c)return;for(var h=null,p=0;pt._avmDepthID)&&(this._childrenByName[n]=cm(t,this.context),e||this.alPut(n,this._childrenByName[n]))}},e.prototype.unregisterScriptObject=function(t){if(!t.adapter._locked){var e=t.name;if(e){this.context.swfVersion<8&&(e=e.toLowerCase());var n=this.alGetOwnProperty(e);if(n&&n.value instanceof tg&&this.alDeleteOwnProperty(e),this._childrenByName[e]&&this._childrenByName[e].adaptee.id==t.id){for(var r=null,i=null,o=0;or._avmDepthID)&&(i=r);i?this._childrenByName[e]=cm(i,this.context):delete this._childrenByName[e]}}}},e.prototype.getLatestObjectForName=function(t){if(!this.alHasOwnProperty(t)){for(var e,n,r=0;re._avmDepthID)&&(n=e);n&&(this.context.swfVersion<8&&(t=t.toLowerCase()),this._childrenByName[t]=cm(n,this.context),this.unregisteredColors[t]&&(this.unregisteredColors[t].changeTarget(n.adapter),this.unregisteredColors[t]=null))}},Object.defineProperty(e.prototype,"graphics",{get:function(){return this.adaptee.graphics},enumerable:!0,configurable:!0}),e.prototype.initAVM1SymbolInstance=function(e,n){var r=this;this._childrenByName=Object.create(null),this._depthToChilds=Object.create(null),t.prototype.initAVM1SymbolInstance.call(this,e,n),this.dragListenerDelegate=function(t){return r.dragListener(t)},this.stopDragDelegate=function(t){return r.stopDrag(t)},this.dynamicallyCreated=!1,this.adaptee=n,this._initEventsHandlers()},e.prototype._lookupChildByName=function(t){return this._childrenByName[t]},e.prototype._lookupChildInAS3Object=function(t){return cm(this.adaptee.getChildByName(t),this.context)},Object.defineProperty(e.prototype,"__targetPath",{get:function(){var t=this.get_target(),e=this.adaptee.root,n="_level"+this.context.globals._getLevelForRoot(e);return"/"!=t?n+t.replace(/\//g,"."):n},enumerable:!0,configurable:!0}),e.prototype.getAwayJSID=function(){return this.adaptee.id},e.prototype.attachAudio=function(t){qh(t)||!1!==t&&console.warn("[AVM1MovieClip] attachAudio not implemented")},e.prototype.attachBitmap=function(t,e,n,r){if(void 0===n&&(n="auto"),void 0===r&&(r=!1),t){n=X_(this.context,n),r=k_(this.context,r),t.as3BitmapData.transparent=!0;var i=t.getBillboard(n,r);this.addChildAtDepth(i,e)}else console.error("[AVM1MovieClip:attachBitmap] Bitmap not resolved! Skip attach for prevent crash",this.adaptee.id)},e.prototype._constructMovieClipSymbol=function(t,e){t=Q_(this.context,t),e=Q_(this.context,e);var n=ht.getAsset(t,this.adaptee.assetNamespace);if(n){var r=n.adaptee.clone();return r.name=e,cm(r,this._avm1Context),r}},e.prototype.get$version=function(){return""},e.prototype.rgbaToArgb=function(t){return(255&t)<<24|(4278190080&t)>>>24<<16|(16711680&t)>>>16<<8|(65280&t)>>>8},e.prototype.attachMovie=function(t,e,n,r){if(this._constructMovieClipSymbol){e&&Z_(this.context,e)&&(e=e.value[0]);var i=this._constructMovieClipSymbol(t,e);if(i){var o;i.name||(i.name=""),n=U_(this.context,n),e&&(o=this._childrenByName[e.toLowerCase()]),i.reset();var a=this.addChildAtDepth(i,gm(n));r&&a._init(r),o&&o.avmColor&&o.avmColor.changeTarget(a),i.timeline&&i.timeline.isButton&&i.addButtonListeners(),a.dynamicallyCreated=!0,e&&this.registerScriptObject(i,!0);var s=a.executeConstructor;return a.executeConstructor=null,s&&s(),a}}},e.prototype.beginFill=function(t,e){t=V_(this.context,t),void 0===e&&(2==arguments.length?e=0:arguments.length<=1&&(e=100)),e=U_(this.context,e),this.graphics.beginFill(t,e/100)},e.prototype.beginBitmapFill=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=!0),void 0===r&&(r=!1);var i=Vf(t);if(i){var o=qh(e)?null:Nf(e);n=k_(this.context,n),r=k_(this.context,r),this.graphics.beginBitmapFill(i,o,n,r)}},e.prototype.beginGradientFill=function(t,e,n,r,i,o,a,s){void 0===o&&(o="pad"),void 0===a&&(a="rgb"),void 0===s&&(s=0);var u=this.context,l=C_.mapToJSArray(e,(function(t){return V_(u,t)})),c=C_.mapToJSArray(n,(function(t){return U_(u,t)/100})),h=C_.mapToJSArray(r,(function(t){return U_(u,t)}));qh(i)&&console.warn("[AVM1MovieClip] beginGradientFill not fully implemented"),o=Q_(u,o),a=Q_(u,a),s=U_(u,s),this.graphics.beginGradientFill(t,l,c,h,null,o,a,s)},e.prototype._callFrame=function(t){var e;"string"==typeof t?(t=t.toLowerCase(),e=this.adaptee.timeline.getScriptForLabel(this.adaptee,t,!0)):"number"==typeof t&&(e=this.adaptee.timeline.get_script_for_frame(this.adaptee,t-1,!0)),e&&this.executeScript(e)},e.prototype.clear=function(){this.graphics.clear()},e.prototype._updateChildName=function(t,e,n){e!==n&&(e&&this._removeChildName(t,e),n&&this._addChildName(t,n))},e.prototype._removeChildName=function(t,e){if(this.context.isPropertyCaseSensitive||(e=e.toLowerCase()),this._childrenByName&&this._childrenByName[e]&&this._childrenByName[e]===t){var n=this._lookupChildInAS3Object(e);n?this._childrenByName[e]=n:delete this._childrenByName[e]}},e.prototype._addChildName=function(t,e){this.context.isPropertyCaseSensitive||(e=e.toLowerCase());var n=this._childrenByName[e];(!n||n.getDepth()>t.getDepth())&&(this._childrenByName[e]=t)},e.prototype.createEmptyMovieClip=function(t,e){t=Q_(this.context,t);var n=new Cu;n.name=t,n.assetNamespace=this.adaptee.assetNamespace,cm(n,this._avm1Context);var r=this.addChildAtDepth(n,gm(e));return r.dynamicallyCreated=!0,this.registerScriptObject(n,!1),n.mouseEnabled=!1,r},e.prototype.createTextField=function(t,e,n,r,i,o){t=Q_(this.context,t);var a=new bh;a.name=t,a.textFormat=new zc,cm(a,this._avm1Context);var s=this.addChildAtDepth(a,gm(e));return this.registerScriptObject(a,!1),a.x=n,a.y=r,a.width=i,a.height=o,s.dynamicallyCreated=!0,s},e.prototype.get_currentframe=function(){return this.adaptee.currentFrameIndex+1},e.prototype.curveTo=function(t,e,n,r){t=U_(this.context,t),e=U_(this.context,e),n=U_(this.context,n),r=U_(this.context,r),this.graphics.curveTo(t,e,n,r)},e.prototype.setDropTarget=function(t){if(t){for(var e=[];t;)t.isAVMScene?t=null:(null!=t.name&&e.push(t.name),t=t.parent);for(var n=e.length,r="";n>0;)""!=e[--n]&&(r+="/"),r+=e[n];this._dropTarget=r}else this._dropTarget=""},e.prototype.get_droptarget=function(){return this._dropTarget},e.prototype.duplicateMovieClip=function(t,e,n){if((t=Q_(this.context,t))==this.adaptee.name)return this;var r,i=this.get_parent();i||(console.warn("[AVM1MovieClip] duplicateMovieClip could not get parent"),i=this.context.resolveTarget(null)),this.adaptee._symbol?console.warn("[AVM1MovieClip] duplicateMovieClip from symbol not implemented"):r=this.clone().adaptee,r.reset(),r.name=t,r.adapter.placeObjectTag=this.placeObjectTag,r.adapter.initEvents=this.initEvents;var o=i.addChildAtDepth(r,gm(e));o.dynamicallyCreated=!0,o._avm1Context=this._avm1Context,i.registerScriptObject(r,!1);var a=r.transform.matrix3D,s=this.adaptee.transform.matrix3D._rawData;return a._rawData[0]=s[0],a._rawData[1]=s[1],a._rawData[4]=s[4],a._rawData[5]=s[5],a._rawData[12]=s[12],a._rawData[13]=s[13],r.transform.invalidateComponents(),r.alpha=this.adaptee.alpha,r.blendMode=this.adaptee.blendMode,r.cacheAsBitmap=this.adaptee.cacheAsBitmap,n&&o._init(n),o},e.prototype.endFill=function(){this.graphics.endFill()},e.prototype.getForceSmoothing=function(){return console.warn("[AVM1MovieClip] getForceSmoothing"),!1},e.prototype.setForceSmoothing=function(t){t=k_(this.context,t),console.warn("[AVM1MovieClip] setForceSmoothing")},e.prototype.get_framesloaded=function(){return console.warn("[AVM1MovieClip] get_framesloaded"),0},e.prototype.getBounds=function(t){if(t)return fg(this._stage.pickGroup.getBoundsPicker(this.node.partition).getBoxBounds(t.node,!0,!0),this.context)},e.prototype.getBytesLoaded=function(){return this.adaptee.currentFrameIndex>=0?100:-1},e.prototype.getBytesTotal=function(){return 100},e.prototype.getInstanceAtDepth=function(t){var e=this.getDepthToChild(gm(t));return e?e.isAsset(cu)||e.isAsset(Cu)?this:cm(e,this.context):null},e.prototype.getNextHighestDepth=function(){return this.context.swfVersion<7?0:_m(this._nextHighestDepth)},e.prototype.getRect=function(t){if(t&&t.node)return fg(this._stage.pickGroup.getBoundsPicker(this.node.partition).getBoxBounds(t.node,!1,!0),this.context)},e.prototype.getSWFVersion=function(){return this.context.swfVersion},e.prototype.getTextSnapshot=function(){console.warn("[AVM1MovieClip] getTextSnapshot")},e.prototype.getURL=function(t,e,n){0!==(t=String(t)).toLowerCase().indexOf("fscommand:")?window.open(t,e):console.warn("[AVM1MovieClip] fsCommand not implemented ")},e.prototype.globalToLocal=function(t){if(t){var e=vf(t);this.node.globalToLocal(e,e),bf(e,t)}},e.prototype.gotoAndPlay=function(t){if(!this.protoTypeChanged&&null!=t){if(Array.isArray(t)){if(0==t.length)return;t=t[0]}if(t instanceof C_){if(!t.value||0==t.value.length)return;t=t.value[0]}if("string"==typeof t){var e=t.toLowerCase();if(null==this.adaptee.timeline._labels[e])return t=parseInt(t),void(isNaN(t)||(this.adaptee.currentFrameIndex=t-1,this.adaptee.play()))}"number"==typeof t&&t<=0||(this.adaptee.play(),this._gotoFrame(t))}},e.prototype.gotoAndStop=function(t){if(!this.protoTypeChanged&&null!=t){if(Array.isArray(t)){if(0==t.length)return;t=t[0]}if(t instanceof C_){if(!t.value||0==t.value.length)return;t=t.value[0]}"number"==typeof t&&t<=0||(this.adaptee.stop(),this._gotoFrame(t))}},e.prototype._gotoFrame=function(t){if("number"==typeof t&&t%1!=0&&(t=t.toString()),"string"==typeof t){var e=t.toLowerCase();if(null==this.adaptee.timeline._labels[e])return t=parseInt(t),void(isNaN(t)||(this.adaptee.currentFrameIndex=t-1));this.adaptee.jumpToLabel(e)}else this.adaptee.currentFrameIndex=t-1},e.prototype.getHitArea=function(){return this._hitArea},e.prototype.setHitArea=function(t){this._hitArea=t;var e=t?t.node:null;e&&!e.container.isAsset(Cu)&&(e=null)},e.prototype.hitTest=function(t,e,n){if(arguments.length<2){var r=t;return"string"==typeof r&&(r=this.context.resolveTarget(r)),!(null==r||!r.node)&&jf.avmStage.pickGroup.getBoundsPicker(this.node.partition).hitTestObject(jf.avmStage.pickGroup.getBoundsPicker(r.node.partition))}t=U_(this.context,t),e=U_(this.context,e);var i=this.get_root();return i?(t+=i.get_x(),e+=i.get_y(),n=k_(this.context,n),this._stage.pickGroup.getBoundsPicker(this.node.partition).hitTestPoint(t,e,n)):(this._hitReportCount<10&&(console.warn("[AVM1MovieClip:: hitTest] Root return undef! Return false to prevent crash!",this.adaptee.id),this._hitReportCount++,10===this._hitReportCount&&console.warn("[AVM1MovieClip:: hitTest] To many reports, supress other!")),!1)},e.prototype.lineGradientStyle=function(t,e,n,r,i,o,a,s){void 0===o&&(o="pad"),void 0===a&&(a="rgb"),void 0===s&&(s=0);var u=this.context,l=C_.mapToJSArray(e,(function(t){return V_(u,t)})),c=C_.mapToJSArray(n,(function(t){return U_(u,t)/100})),h=C_.mapToJSArray(r,(function(t){return U_(u,t)}));o=Q_(u,o),a=Q_(u,a),s=U_(u,s),this.graphics.lineGradientStyle(t,l,c,h,null,o,a,s)},e.prototype.lineStyle=function(t,n,r,i,o,a,s,u){void 0===t&&(t=NaN),void 0===n&&(n=0),void 0===r&&(r=100),void 0===i&&(i=!1),void 0===o&&(o="normal"),void 0===a&&(a="round"),void 0===s&&(s="round"),void 0===u&&(u=3),t=U_(this.context,t),n=V_(this.context,n),i=k_(this.context,i),o=Q_(this.context,o);var l=e.capStyleMapStringToInt[Q_(this.context,a)],c=e.jointStyleMapStringToInt[Q_(this.context,s)];u=U_(this.context,u),this.graphics.lineStyle(t,n,r/100,i,e.noScaleDictionary[o],l,c,u)},e.prototype.lineTo=function(t,e){t=dm(U_(this.context,t)),e=dm(U_(this.context,e)),this.graphics.lineTo(t,e)},e.prototype.loadMovie=function(t,e){new dg(this.context).loadMovieAt(t,e,this).then((function(t){}))},e.prototype.loadVariables=function(t,e){this.context.actions._loadVariables(this,t,e)},e.prototype.localToGlobal=function(t){if(t){var e=vf(t);this.node.localToGlobal(e,e),bf(e,t)}},e.prototype.get_lockroot=function(){return this._lockroot},e.prototype.set_lockroot=function(t){this._lockroot=k_(this.context,t)},e.prototype.moveTo=function(t,e){t=dm(U_(this.context,t)),e=dm(U_(this.context,e)),this.graphics.moveTo(t,e)},e.prototype.nextFrame=function(){this.adaptee.stop(),++this.adaptee.currentFrameIndex},e.prototype.nextScene=function(){console.warn("[AVM1MovieClip] nextScene not implemented")},e.prototype.play=function(){this.adaptee.play()},e.prototype.prevFrame=function(){this.adaptee.stop(),--this.adaptee.currentFrameIndex},e.prototype.prevScene=function(){console.warn("[AVM1MovieClip] prevScene not implemented")},e.prototype.setMask=function(t){null!=t?(t.scriptMaskee=this,(t=this.context.resolveTarget(t))&&(this.adaptee.scriptMask=t.adaptee)):this.adaptee.scriptMask=null},e.prototype.startDrag=function(t,n,r,i,o){var a=this._stage,s=a.pool;if(e.currentDraggedMC&&e.currentDraggedMC!=this&&e.currentDraggedMC.stopDrag(),e.currentDraggedMC=this,t=k_(this.context,t),this._dragBounds=null,n>i){var u=i;i=n,n=u}if(r>o){u=o;o=r,r=u}if(arguments.length>1&&(n=U_(this.context,n),r=U_(this.context,r),i=U_(this.context,i),o=U_(this.context,o),this._dragBounds=new q(n,r,i-n,o-r)),!this.isDragging){this.isDragging=!0,this.startDragPoint=s.getNode(this.adaptee.parent).globalToLocal(new T(a.view.stage.screenX,a.view.stage.screenY)),t&&(this.adaptee.x=this.startDragPoint.x,this.adaptee.y=this.startDragPoint.y),this._dragBounds&&this.checkBounds(),this.startDragMCPosition.x=this.adaptee.x,this.startDragMCPosition.y=this.adaptee.y;var l=this.node;a.view.stage.addEventListener(vu.MOUSE_MOVE,this.dragListenerDelegate),a.mousePicker.dragNode=l,a.mouseManager.startDragObject(this.adaptee.getAbstraction(l.partition).getAbstraction(a.mousePicker.pickGroup).pickingCollision)}},e.prototype.dragListener=function(t){if(this.adaptee.parent){var e=this._stage.view.stage,n=this._stage.pool.getNode(this.adaptee.parent).globalToLocal(new T(e.screenX,e.screenY));this.adaptee.x=this.startDragMCPosition.x+(n.x-this.startDragPoint.x),this.adaptee.y=this.startDragMCPosition.y+(n.y-this.startDragPoint.y),this._dragBounds&&this.checkBounds()}},e.prototype.checkBounds=function(){this.adaptee.xthis._dragBounds.right&&(this.adaptee.x=this._dragBounds.right),this.adaptee.ythis._dragBounds.bottom&&(this.adaptee.y=this._dragBounds.bottom)},e.prototype.stop=function(){return this.adaptee.stop()},e.prototype.stopDrag=function(t){e.currentDraggedMC&&e.currentDraggedMC!=this&&e.currentDraggedMC.stopDrag(),this.isDragging=!1,e.currentDraggedMC=null,this._stage.mousePicker.dragNode=null,this._stage.mouseManager.stopDragObject(),this._stage.removeEventListener(vu.MOUSE_MOVE,this.dragListenerDelegate)},e.prototype.swapChildrenToDepth=function(t,e,n,r){e&&this._depthToChilds[n]&&(e=this.getDepthToChild(n).adapter),delete this.adaptee._sessionID_childs[t.adaptee._sessionID],t.adaptee._avmDepthID=n,t.adaptee._sessionID=-1,this.adaptee.addChildAt(t.adaptee,this.getIndexFromDepthOrTop(n)),t.hasSwappedDepth=!0,this.setDepthToChild(n,t.adaptee),e?(delete this.adaptee._sessionID_childs[e.adaptee._sessionID],this.setDepthToChild(r,e.adaptee),e.adaptee._avmDepthID=r,e.adaptee._sessionID=-1,this.adaptee.addChildAt(e.adaptee,this.getIndexFromDepthOrTop(r)),e.hasSwappedDepth=!0):this.setDepthToChild(r),this.adaptee.name&&parent&&(this.getLatestObjectForName(t.adaptee.name),e&&this.getLatestObjectForName(e.adaptee.name))},e.prototype.swapDepths=function(t){if(!this.adaptee.isAVMScene&&this.get_parent()){var e=this.get_parent(),n=null;if(e)if(void 0!==t){if("number"==typeof t){if(t=gm(t),this.adaptee._avmDepthID==t)return;(n=e.getDepthToChild(t))&&(n=n.adapter)}else if(t.adaptee){if(t.get_parent()!=e)return;t=(n=t).adaptee._avmDepthID}e.swapChildrenToDepth(this,n,t,this.adaptee._avmDepthID)}else console.warn("[AVM1MovieClip] swapDepth called with undefined as target depth");else console.warn("[AVM1MovieClip] swapDepth called for object with no parent")}},e.prototype.getTabChildren=function(){return om(this).tabChildren},e.prototype.setTabChildren=function(t){om(this).tabChildren=k_(this.context,t)},e.prototype.get_totalframes=function(){return this.adaptee.numFrames},e.prototype.getTrackAsMenu=function(){return console.warn("[AVM1MovieClip] getTrackAsMenu not implemented"),om(this).trackAsMenu},e.prototype.setTrackAsMenu=function(t){console.warn("[AVM1MovieClip] setTrackAsMenu not implemented"),om(this).trackAsMenu=k_(this.context,t)},e.prototype.unloadMovie=function(){var t=this.adaptee;this.adaptee.constructedKeyFrameIndex=0,this.adaptee.stop(),t.removeChildren(0,t.numChildren),(this.dynamicallyCreated||this.hasSwappedDepth)&&t.parent&&t.parent.adapter&&t.parent.adapter.unregisterScriptObject(t)},e.prototype.getUseHandCursor=function(){return this.adaptee.useHandCursor},e.prototype.setUseHandCursor=function(t){this.adaptee&&(this.adaptee.useHandCursor=t)},e.prototype.setParameters=function(t){for(var e in t)this.alHasProperty(e)||this.alPut(e,t[e])},e.prototype._resolveLevelNProperty=function(t){if("_level0"===t||"_level"===t)return this.context.resolveRoot();if("_root"===t)return this.context.resolveRoot();if(0===t.indexOf("_level")){var e=t.substring(6),n=0|e;if(n>0&&e==n)return this.context.resolveLevel(n)}return null},e.prototype._getCachedPropertyResult=function(t){return this._cachedPropertyResult?this._cachedPropertyResult.value=t:this._cachedPropertyResult={flags:65,value:t},this._cachedPropertyResult},e.prototype.alGetOwnProperty=function(e){var n=t.prototype.alGetOwnProperty.call(this,e);if(n)return n;if("_"===e[0])if("l"===e[1]&&0===e.indexOf("_level")||"r"===e[1]&&0===e.indexOf("_root")){var r=this._resolveLevelNProperty(e);if(r)return this._getCachedPropertyResult(r)}else if(e.toLowerCase()in Qf)return t.prototype.alGetOwnProperty.call(this,e.toLowerCase());if(im(this)){var i=this._lookupChildByName(e);if(i)return this._getCachedPropertyResult(i)}},e.prototype.alGetOwnPropertiesKeys=function(){var e=t.prototype.alGetOwnPropertiesKeys.call(this);if(!im(this))return e;var n=this.adaptee;if(0===n.numChildren)return e;var r=Object.create(null),i=e.length,o=0;for(o=0;o=0&&n/g," />")},e.prototype.appendChild=function(t){this.as3XMLNode.appendChild(Qg(t))},e.prototype.getAttributes=function(){var t=this.as3XMLNode.attributes;if(!qh(t))return this._attributes||(this._attributes=new Xg(this.context,t)),this._attributes},e.prototype.setAttributes=function(t){var e=this;if(qh(t))this._attributes=void 0;else if(t instanceof Xg)this._attributes=t;else{var n=this.context,r=this.as3XMLNode.attributes;K_(t,(function(t){var i=X_(n,t),o=X_(n,e.alGet(t)),a=document.createAttribute(i);a.value=o,r.setNamedItem(a)}),this),console.warn("[XMLNode] Invalid attribute implementation"),this._attributes=new Xg(n,this.as3XMLNode.attributes)}},e.prototype.getChildNodes=function(){return this._childNodes||(this._childNodes=new Hg(this.context,this.as3XMLNode)),this._childNodes},e.prototype.cloneNode=function(t){t=k_(this.context,t);var e=this.as3XMLNode.axCallPublicProperty("cloneNode",[t]);return Gg(this.context,e)},e.prototype.getFirstChild=function(){return Gg(this.context,this.as3XMLNode.firstChild)},e.prototype.getNamespaceForPrefix=function(t){return this.as3XMLNode.axCallPublicProperty("getNamespaceForPrefix",[t])},e.prototype.getPrefixForNamespace=function(t){return this.as3XMLNode.axCallPublicProperty("getNamespaceForPrefix",[t])},e.prototype.hasChildNodes=function(){return this.as3XMLNode.hasChildNodes()},e.prototype.insertBefore=function(t,e){this.as3XMLNode.axCallPublicProperty("insertBefore",[Qg(t),Qg(e)])},e.prototype.getLastChild=function(){return Gg(this.context,this.as3XMLNode.lastChild)},e.prototype.getLocalName=function(){return this.as3XMLNode.localName},e.prototype.getNamespaceURI=function(){return this.as3XMLNode.namespaceURI},e.prototype.getNextSibling=function(){return Gg(this.context,this.as3XMLNode.nextSibling)},e.prototype.getNodeName=function(){return this.as3XMLNode.nodeName},e.prototype.setNodeName=function(t){t=X_(this.context,t),this.as3XMLNode.nodeName=t},e.prototype.getNodeType=function(){return this.as3XMLNode.nodeType},e.prototype.getNodeValue=function(){return this.as3XMLNode.nodeValue},e.prototype.setNodeValue=function(t){t=X_(this.context,t),this.as3XMLNode.nodeValue=t},e.prototype.getParentNode=function(){return Gg(this.context,this.as3XMLNode.parentNode)},e.prototype.getPrefix=function(){return this.as3XMLNode.prefix},e.prototype.getPreviousSibling=function(){return Gg(this.context,this.as3XMLNode.previousSibling)},e.prototype.removeNode=function(){this.as3XMLNode.removeNode()},e.addMap=function(t,e){t._as2Node=e},e}(yf),qg=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alSetOwnPrototypeProperty(new Kg(e,r,n)),r}return n(e,t),e.prototype.alConstruct=function(t){var e=t&&X_(this.context,t[0]),n=new yf(this.context);return n.alPrototype=this.alGetPrototypeProperty(),n.isAVM1DataObject=!0,e||(e=""),Kg.prototype.initializeDocument.call(n,e),n},e.prototype.alCall=function(t,e){return this.alConstruct(e)},e}(Af),Kg=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.alPrototype=r.alGetPrototypeProperty(),nm(i,{constructor:{value:n,writable:!0},addRequestHeader:{value:i.addRequestHeader},createElement:{value:i.createElement},createTextNode:{value:i.createTextNode},getBytesLoaded:{value:i.getBytesLoaded},getBytesTotal:{value:i.getBytesTotal},ignoreWhite:{value:!1,writable:!0},load:{value:i.load},parseXML:{value:i.parseXML},send:{value:i.send},sendAndLoad:{value:i.sendAndLoad},onData:{value:i.defaultOnData,writable:!0}}),i}return n(e,t),e.prototype.initializeDocument=function(t){t=X_(this.context,t)||null;var e=(new DOMParser).parseFromString(t,"application/xml");Yg.prototype.initializeFromAS3Node.call(this,e),this.as3XMLDocument=e},e.prototype.addRequestHeader=function(t,e){np.notImplemented("AVM1XMLPrototype.addRequestHeader")},e.prototype.createElement=function(t){t=X_(this.context,t);var e=this.as3XMLDocument.axCallPublicProperty("createElement",[t]);return Gg(this.context,e)},e.prototype.createTextNode=function(t){t=X_(this.context,t);var e=this.as3XMLDocument.axCallPublicProperty("createTextNode",[t]);return Gg(this.context,e)},e.prototype.getBytesLoaded=function(){if(this._as3Loader)return this._as3Loader.bytesLoaded},e.prototype.getBytesTotal=function(){if(this._as3Loader)return this._as3Loader.bytesTotal},e.prototype.load=function(t){return!!(t=X_(this.context,t))&&(Bg(this.context,t,null,null,null,this),!0)},e.prototype.defaultOnData=function(t){qh(t)?sm(this.context,this,"onLoad",[!1]):(e.prototype.parseXML.call(this,t),this.alPut("loaded",!0),sm(this.context,this,"onLoad",[!0]))},e.prototype.parseXML=function(t){t=X_(this.context,t);var e=(new DOMParser).parseFromString(""+t+"","application/xml"),n=e.getElementsByTagName("parsererror");if(n.length>0){var r=1===e.childElementCount,i=n[0].textContent;if(r)throw"[AVM1XML] Сritical parsing error:"+i;console.warn("[AVM1XML] Parsing error:",i),console.groupCollapsed("[XML Source]:"),console.log(t),console.groupEnd()}this.as3XMLDocument=e.childNodes[0],Yg.prototype.initializeFromAS3Node.call(this,this.as3XMLDocument)},e.prototype.send=function(t,e,n){return t=X_(this.context,t),e=qh(e)?void 0:X_(this.context,e),n=qh(n)?void 0:X_(this.context,n),np.notImplemented("AVM1XMLPrototype.send"),!1},e.prototype.sendAndLoad=function(t,e){if((t=X_(this.context,t))&&e.isAVM1DataObject){np.somewhatImplemented("AVM1XMLPrototype.send");var n=this.alGet("contentType");n=qh(n)?void 0:X_(this.context,n);var r=Q_(this.context,this);Bg(this.context,t,"POST",n,r,e)}},e}(yf),Wg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.createAVM1Class=function(t){return pm(t,!0,e,["available#","addCallback","call"],[])},e.getAvailable=function(t){return!0},e.addCallback=function(t,e,n,r){if(e=X_(t,e),!W_(r))return!1;try{return window.flashObject||(window.flashObject={}),window.flashObject[e]=function(){for(var t=[],r=0;r0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=e.call(this,i,o))}else n.push(o);return null==t?o:t.call(this,i,o)}}(t.exports=function(t,e,r,i){return JSON.stringify(t,n(e,i),r)}).getSerialize=n})),$g=function(){var t=4022871197;return function(e){if(e){e=e.toString();for(var n=0;n>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)}t=4022871197}},Zg=function(t){return function(){var e,n,r=48,i=1,o=r,a=new Array(r),s=0,u=new $g;for(e=0;e=r&&(o=0);var t=1768863*a[o]+2.3283064365386963e-10*i;return a[o]=t-(i=0|t)},c=function(t){return Math.floor(t*(l()+11102230246251565e-32*(2097152*l()|0)))};c.string=function(t){var e,n="";for(e=0;e0;)r+=e[--n],n>0&&(r+=".");return r}return""},e.prototype.setFocus=function(t){var e;if(""!==t)return"string"==typeof t?(e=this.context.resolveTarget(t))&&e.adaptee||(e=this.context.resolveTarget(t+"_internal_TF"))&&e.adaptee?void Zd.instance().mouseManager.setFocus(e.adaptee):void console.warn("AVM1Selection.setFocus - no object found for string "+t):((e=this.context.resolveTarget(t))&&e.adaptee?Zd.instance().mouseManager.setFocus(e.adaptee):console.warn("AVM1Selection.setFocus - no object found '"+t.toString()+"'"),!0)},e.prototype.setSelection=function(t,e){var n=Zd.instance().mouseManager.getFocus();n&&n.isAsset(bh)&&n.setSelection(t,e)},e}(yf),r_=wh.escape,i_=[],o_=function(){function t(){}return t.ALL="all",t.NONE="none",t.IMPORTANT="important",t}(),a_=function(t){function e(e){var n=t.call(this,e)||this;return n.SWF_BASE_URL="",n.registeredLevels={},n.NaN=Number.NaN,n.Infinity=Number.POSITIVE_INFINITY,n.newline="\n",n.undefined=void 0,n._initBuiltins(e),n._initializeFlashObject(e),n.buttonCheckFunc=new Af(e),n.buttonCheckFunc.alCall=function(t,e){return Tg.mouseButtonsState[e[0]]},n}return n(e,t),e.generateRandomSeed=function(){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",e=10+Math.round(10*Math.random()),n="",r=0;r0&&"!"==e[0];break;default:e=Q_(this.context,t)}(a_.tracelevel!=o_.IMPORTANT||n)&&console.log("%cAVM1 trace: %c "+e+" ","color: #054996","background: #eee; color: #054996")}},t.prototype.unloadMovie=function(t){var e=this.context.resolveTarget(t);e&&e.unloadMovie()},t.prototype.unloadMovieNum=function(t){0!==(t=V_(this.context,t))&&this.context.globals._removeRoot(t)},t}(),u_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype._initializePrototype=function(){nm(this,{constructor:{value:this.context.builtins.Object,writable:!0},valueOf:{value:this._valueOf,writable:!0},toString:{value:this._toString,writable:!0},addProperty:{value:this.addProperty},hasOwnProperty:{value:this.hasOwnProperty},isPropertyEnumerable:{value:this.isPropertyEnumerable},isPrototypeOf:{value:this.isPrototypeOf},unwatch:{value:this.unwatch},watch:{value:this.watch}})},e.prototype._valueOf=function(){return this},e.prototype._toString=function(){return W_(this)?"[type "+H_(this)+"]":"[object "+H_(this)+"]"},e.prototype.addProperty=function(t,e,n){if("string"!=typeof t||""===t)return!1;if(!W_(e))return!1;if(!W_(n)&&null!==n)return!1;var r=this.alGetOwnProperty(t);return!(r&&2&r.flags)&&(this.alSetOwnProperty(t,new mf(128,null,e,n||void 0)),!0)},e.prototype.hasOwnProperty=function(t){return this.alHasOwnProperty(t)},e.prototype.isPropertyEnumerable=function(t){return!(1&this.alGetProperty(t).flags)},e.prototype.isPrototypeOf=function(t){return $_(this.context,this,t)},e.prototype.unwatch=function(t){return t=X_(this.context,t),this.alRemotePropertyWatcher(t)},e.prototype.watch=function(t,e,n){return t=X_(this.context,t),!!W_(e)&&this.alAddPropertyWatcher(t,e,n)},e}(yf),l_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Function.alGetPrototypeProperty(),nm(n,{prototype:{value:e.builtins.Object.alGetPrototypeProperty()},registerClass:{value:n.registerClass}}),n}return n(e,t),e.prototype.registerClass=function(t,e){this.context.registerClass(t,e)},e.prototype.alConstruct=function(t){if(t){var e=t[0];if(e instanceof yf)return e;switch(typeof e){case"string":case"boolean":case"number":return G_(this.context,e)}}return z_(this.context)},e.prototype.alCall=function(t,e){return e&&null!==e[0]&&void 0!==e[0]?G_(this.context,e[0]):z_(this.context)},e}(Af),c_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype._initializePrototype=function(){var t=this.context;this.alPrototype=t.builtins.Object.alGetPrototypeProperty(),nm(this,{constructor:{value:t.builtins.Function,writable:!0},call:this.call,apply:this.apply})},e.prototype.call=function(t){for(var e=[],n=1;n>>0,new C_(this.context,n.split(t,e))):new C_(this.context,[n])},e.prototype.substr=function(t,e){var n=Q_(this.context,this),r=n.length;if(t=j_(this.context,t),e=void 0===e?r:j_(this.context,e),t<0&&(t=Math.max(0,r+t)),e<0){if(-e<=t)return"";e=Math.max(0,r+e)}return n.substr(t,e)},e.prototype.substring=function(t,e){var n=Q_(this.context,this);return(t=j_(this.context,t))>=n.length?"":(e=void 0===e?void 0:j_(this.context,e),n.substring(t,e))},e.prototype.toLowerCase=function(){return Q_(this.context,this).toLowerCase()},e.prototype.toUpperCase=function(){return Q_(this.context,this).toUpperCase()},e}(yf),v_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Function.alGetPrototypeProperty(),nm(n,{prototype:{value:new A_(e)},fromCharCode:{value:n.fromCharCode}}),n}return n(e,t),e.prototype.alConstruct=function(t){var e=t?Q_(this.context,t[0]):"";return new y_(this.context,e)},e.prototype.alCall=function(t,e){return e?Q_(this.context,e[0]):""},e.prototype.fromCharCode=function(){for(var t=this,e=[],n=0;n0&&(t=t[0]);for(;e instanceof C_;)(e=M_(e,C_).value)&&e.length>0&&(e=e[0]);return t-e}));else{for(var a=n.length;a>0;)void 0!==n[--a]&&null!==n[a]||(n[a]="00000000000AwayInternal");for(n.sort((function(t,e){for(;t instanceof C_;)(t=M_(t,C_).value)&&t.length>0&&(t=t[0]);for(;e instanceof C_;)(e=M_(e,C_).value)&&e.length>0&&(e=e[0]);return t0;)"00000000000AwayInternal"==n[--a]&&(n[a]=void 0)}o&&n.reverse()}return t},E_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(n,{constructor:{value:e.builtins.Array,writable:!0},join:{value:n.join,writable:!0},length:{get:n.getLength,set:n.setLength},concat:{value:n.concat,writable:!0},pop:{value:n.pop,writable:!0},push:{value:n.push,writable:!0},reverse:{value:n.reverse,writable:!0},shift:{value:n.shift,writable:!0},slice:{value:n.slice,writable:!0},splice:{value:n.splice,writable:!0},sort:{value:n.sort,writable:!0},sortOn:{value:n.sortOn,writable:!0},toString:{value:n._toString,writable:!0},unshift:{value:n.unshift,writable:!0}}),n}return n(e,t),e.prototype._toString=function(){var t,e=this.alGet("length"),n=0,r="";for(n=0;n>>0,M_(this,C_).value.length=t)},e.prototype.concat=function(){for(var t=[],e=0;e=t.length);)o=t[s++],a=Z_(this.context,o);return new C_(this.context,i)},e.prototype.join=function(t){if(t=void 0===t?",":X_(this.context,t),this instanceof C_){var e=M_(this,C_).value;if(0===e.length)return"";if(e.every((function(t){return!(t instanceof yf)})))return e.join(t)}var n=this.context,r=V_(n,this.alGet("length"))>>>0;if(0===r)return"";for(var i=[],o=0;o>>0;if(0!==t){var e=t-1,n=this.alGet(e);return this.alDeleteProperty(e),this.alPut("length",e),n}},e.prototype.push=function(){for(var t=[],e=0;e>>0,i=0;i=0;)this.alPut(e-1-n,t[n]),n--;return this.value},e.prototype.shift=function(){if(this instanceof C_)return M_(this,C_).value.shift();var t=V_(this.context,this.alGet("length"))>>>0;if(0!==t){for(var e=this.alGet(0),n=1;n>>0;t=t<0?Math.max(i+t,0):Math.min(i,t),e=void 0===e?i:e<0?Math.max(i+e,0):Math.min(i,e);for(var o=t,a=0;o>>0;if(t=t<0?Math.max(i+t,0):Math.min(i,t),e=e||"number"==typeof e?j_(this.context,e):i-t,this instanceof C_){var o=M_(this,C_).value;return new C_(this.context,Array.prototype.splice.apply(o,[t,e].concat(n)))}for(var a=[],s=0;s0)for(s=i-1;s>=t+u;s--)this.alHasProperty(s)?this.alPut(s+u,this.alGet(s)):this.alDeleteProperty(s+u);for(s=0;s0&&(t=t[0]);for(;e instanceof C_;)(e=M_(e,C_).value)&&e.length>0&&(e=e[0]);for(var o=G_(n,t),a=G_(n,e),s=0;sp?1:0}else{var d=Q_(n,u),f=Q_(n,l);i[s]&t_.CASEINSENSITIVE&&(d=d.toLowerCase(),f=f.toLowerCase()),c=df?1:0}if(0!==c)return i[s]&t_.DESCENDING?-c:c}return 0})),this},e.prototype.unshift=function(){for(var t=[],e=0;e>>0,i=t.length,o=r-1;o>=0;o--)this.alHasProperty(o)?this.alPut(o+i,this.alGet(o)):this.alDeleteProperty(o+i);for(o=0;o>>0!==e)throw new Error("Range error");return new C_(this.context,new Array(e))}return new C_(this.context,t)},e.prototype.alCall=function(t,e){return this.alConstruct.apply(this,e)},e}(Af),w_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(n,{E:Math.E,LN10:Math.LN10,LN2:Math.LN2,LOG10E:Math.LOG10E,LOG2E:Math.LOG2E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,abs:n.abs,acos:n.acos,asin:n.asin,atan:n.atan,atan2:n.atan2,ceil:n.ceil,cos:n.cos,exp:n.exp,floor:n.floor,log:n.log,max:n.max,min:n.min,pow:n.pow,random:n.random,round:n.round,sin:n.sin,sqrt:n.sqrt,tan:n.tan}),n}return n(e,t),e.prototype.abs=function(t){return Math.abs(U_(this.context,t))},e.prototype.acos=function(t){return Math.acos(U_(this.context,t))},e.prototype.asin=function(t){return Math.asin(U_(this.context,t))},e.prototype.atan=function(t){return Math.atan(U_(this.context,t))},e.prototype.atan2=function(t,e){return Math.atan2(U_(this.context,t),U_(this.context,e))},e.prototype.ceil=function(t){return Math.ceil(U_(this.context,t))},e.prototype.cos=function(t){return Math.cos(U_(this.context,t))},e.prototype.exp=function(t){return Math.exp(U_(this.context,t))},e.prototype.floor=function(t){return Math.floor(U_(this.context,t))},e.prototype.log=function(t){return Math.log(U_(this.context,t))},e.prototype.max=function(){for(var t=this,e=[],n=0;n=6?t.prototype.alDefaultValue.call(this,1):t.prototype.alDefaultValue.call(this,0)},e}(yf),D_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(n,{constructor:{value:e.builtins.Date,writable:!0},valueOf:{value:n._valueOf,writable:!0},toString:{value:n._toString,writable:!0},toLocaleString:{value:n._toLocaleString,writable:!0},toDateString:{value:n.toDateString,writable:!0},toTimeString:{value:n.toTimeString,writable:!0},toLocaleDateString:{value:n.toLocaleDateString,writable:!0},toLocaleTimeString:{value:n.toLocaleTimeString,writable:!0},getTime:{value:n.getTime,writable:!0},getFullYear:{value:n.getFullYear,writable:!0},getUTCFullYear:{value:n.getUTCFullYear,writable:!0},getMonth:{value:n.getMonth,writable:!0},getUTCMonth:{value:n.getUTCMonth,writable:!0},getDate:{value:n.getDate,writable:!0},getUTCDate:{value:n.getUTCDate,writable:!0},getDay:{value:n.getDay,writable:!0},getUTCDay:{value:n.getUTCDay,writable:!0},getHours:{value:n.getHours,writable:!0},getUTCHours:{value:n.getUTCHours,writable:!0},getMinutes:{value:n.getMinutes,writable:!0},getUTCMinutes:{value:n.getUTCMinutes,writable:!0},getSeconds:{value:n.getSeconds,writable:!0},getUTCSeconds:{value:n.getUTCSeconds,writable:!0},getMilliseconds:{value:n.getMilliseconds,writable:!0},getUTCMilliseconds:{value:n.getUTCMilliseconds,writable:!0},getTimezoneOffset:{value:n.getTimezoneOffset,writable:!0},setTime:{value:n.setTime,writable:!0},setMilliseconds:{value:n.setMilliseconds,writable:!0},setUTCMilliseconds:{value:n.setUTCMilliseconds,writable:!0},setSeconds:{value:n.setSeconds,writable:!0},setUTCSeconds:{value:n.setUTCSeconds,writable:!0},setMinutes:{value:n.setMinutes,writable:!0},setUTCMinutes:{value:n.setUTCMinutes,writable:!0},setHours:{value:n.setHours,writable:!0},setUTCHours:{value:n.setUTCHours,writable:!0},setDate:{value:n.setDate,writable:!0},setUTCDate:{value:n.setUTCDate,writable:!0},setMonth:{value:n.setMonth,writable:!0},setUTCMonth:{value:n.setUTCMonth,writable:!0},setFullYear:{value:n.setFullYear,writable:!0},setUTCFullYear:{value:n.setUTCFullYear,writable:!0},toUTCString:{value:n.toUTCString,writable:!0}}),n}return n(e,t),e.prototype._valueOf=function(){return M_(this,S_).value.valueOf()},e.prototype._toString=function(){return M_(this,S_).value.toString()},e.prototype._toLocaleString=function(){return M_(this,S_).value.toLocaleString()},e.prototype.toDateString=function(){return M_(this,S_).value.toDateString()},e.prototype.toTimeString=function(){return M_(this,S_).value.toTimeString()},e.prototype.toLocaleDateString=function(){return M_(this,S_).value.toLocaleDateString()},e.prototype.toLocaleTimeString=function(){return M_(this,S_).value.toLocaleTimeString()},e.prototype.getTime=function(){return M_(this,S_).value.getTime()},e.prototype.getFullYear=function(){return M_(this,S_).value.getFullYear()},e.prototype.getUTCFullYear=function(){return M_(this,S_).value.getUTCFullYear()},e.prototype.getMonth=function(){return M_(this,S_).value.getMonth()},e.prototype.getUTCMonth=function(){return M_(this,S_).value.getUTCMonth()},e.prototype.getDate=function(){return M_(this,S_).value.getDate()},e.prototype.getUTCDate=function(){return M_(this,S_).value.getUTCDate()},e.prototype.getDay=function(){return M_(this,S_).value.getDay()},e.prototype.getUTCDay=function(){return M_(this,S_).value.getUTCDay()},e.prototype.getHours=function(){return M_(this,S_).value.getHours()},e.prototype.getUTCHours=function(){return M_(this,S_).value.getUTCHours()},e.prototype.getMinutes=function(){return M_(this,S_).value.getMinutes()},e.prototype.getUTCMinutes=function(){return M_(this,S_).value.getUTCMinutes()},e.prototype.getSeconds=function(){return M_(this,S_).value.getSeconds()},e.prototype.getUTCSeconds=function(){return M_(this,S_).value.getUTCSeconds()},e.prototype.getMilliseconds=function(){return M_(this,S_).value.getMilliseconds()},e.prototype.getUTCMilliseconds=function(){return M_(this,S_).value.getUTCMilliseconds()},e.prototype.getTimezoneOffset=function(){return M_(this,S_).value.getTimezoneOffset()},e.prototype.setTime=function(t){return t=U_(this.context,t),M_(this,S_).value.setTime(t)},e.prototype.setMilliseconds=function(t){return t=U_(this.context,t),M_(this,S_).value.setMilliseconds(t)},e.prototype.setUTCMilliseconds=function(t){return t=U_(this.context,t),M_(this,S_).value.setUTCMilliseconds(t)},e.prototype.setSeconds=function(t,e){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setSeconds(t):(e=U_(this.context,e),M_(this,S_).value.setSeconds(t,e))},e.prototype.setUTCSeconds=function(t,e){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setUTCSeconds(t):(e=U_(this.context,e),M_(this,S_).value.setUTCSeconds(t,e))},e.prototype.setMinutes=function(t,e,n){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setMinutes(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setMinutes(t,e):(n=U_(this.context,n),M_(this,S_).value.setMinutes(t,e,n)))},e.prototype.setUTCMinutes=function(t,e,n){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setUTCMinutes(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setUTCMinutes(t,e):(n=U_(this.context,n),M_(this,S_).value.setUTCMinutes(t,e,n)))},e.prototype.setHours=function(t,e,n,r){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setHours(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setHours(t,e):(n=U_(this.context,n),arguments.length<=3?M_(this,S_).value.setHours(t,e,n):(r=U_(this.context,r),M_(this,S_).value.setHours(t,e,n,r))))},e.prototype.setUTCHours=function(t,e,n,r){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setUTCHours(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setUTCHours(t,e):(n=U_(this.context,n),arguments.length<=3?M_(this,S_).value.setUTCHours(t,e,n):(r=U_(this.context,r),M_(this,S_).value.setUTCHours(t,e,n,r))))},e.prototype.setDate=function(t){return t=U_(this.context,t),M_(this,S_).value.setDate(t)},e.prototype.setUTCDate=function(t){return t=U_(this.context,t),M_(this,S_).value.setUTCDate(t)},e.prototype.setMonth=function(t,e){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setMonth(t):(e=U_(this.context,e),M_(this,S_).value.setMonth(t,e))},e.prototype.setUTCMonth=function(t,e){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setUTCMonth(t):(e=U_(this.context,e),M_(this,S_).value.setUTCMonth(t,e))},e.prototype.setFullYear=function(t,e,n){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setFullYear(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setFullYear(t,e):(n=U_(this.context,n),M_(this,S_).value.setFullYear(t,e,n)))},e.prototype.setUTCFullYear=function(t,e,n){return t=U_(this.context,t),arguments.length<=1?M_(this,S_).value.setUTCFullYear(t):(e=U_(this.context,e),arguments.length<=2?M_(this,S_).value.setUTCFullYear(t,e):(n=U_(this.context,n),M_(this,S_).value.setUTCFullYear(t,e,n)))},e.prototype.toUTCString=function(){return M_(this,S_).value.toUTCString()},e}(yf),T_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Function.alGetPrototypeProperty(),nm(n,{prototype:{value:new D_(e)},UTC:{value:n._UTC,writable:!0}}),n}return n(e,t),e.prototype.alConstruct=function(t){var e,n=this.context;switch(t.length){case 0:e=new Date;break;case 1:e=new Date(F_(n,t[0]));break;default:for(var r=[],i=0;i2?U_(n,t[2]):1,t.length>3?U_(n,t[3]):0,t.length>4?U_(n,t[4]):0,t.length>5?U_(n,t[5]):0,t.length>6?U_(n,t[6]):0)}return new S_(n,e)},e.prototype.alCall=function(t,e){return J_(this.alConstruct.apply(this,e),"toString")},e.prototype._UTC=function(t,e,n,r,i,o){var a=this.context;return Date.UTC(U_(a,arguments[0]),U_(a,arguments[1]),arguments.length>2?U_(a,arguments[2]):1,arguments.length>3?U_(a,arguments[3]):0,arguments.length>4?U_(a,arguments[4]):0,arguments.length>5?U_(a,arguments[5]):0,arguments.length>6?U_(a,arguments[6]):0)},e}(Af),P_=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alPrototype=e.builtins.Error.alGetPrototypeProperty(),r.alSetOwnConstructorProperty(e.builtins.Error),void 0!==n&&r.alPut("message",n),r}return n(e,t),e}(yf),B_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Object.alGetPrototypeProperty(),nm(n,{constructor:{value:e.builtins.Error,writable:!0},name:{value:"Error",writable:!0},message:{value:"Error",writable:!0},toString:{value:n._toString,writable:!0}}),n}return n(e,t),e.prototype._toString=function(){return this.alGet("message")},e}(yf),O_=function(t){function e(e){var n=t.call(this,e)||this;return n.alPrototype=e.builtins.Function.alGetPrototypeProperty(),nm(n,{prototype:{value:new B_(e)}}),n}return n(e,t),e.prototype.alConstruct=function(t){var e=t&&void 0!==t[0]?X_(this.context,t[0]):void 0;return new P_(this.context,e)},e.prototype.alCall=function(t,e){var n=e&&void 0!==e[0]?X_(this.context,e[0]):void 0;return new P_(this.context,n)},e}(Af);function M_(t,e){if(t instanceof e)return t;throw new Error("Invalid type")}var L_=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i._fn=n,r&&(i._ctor=r),i}return n(e,t),e.prototype.alConstruct=function(t){if(!this._ctor)throw new Error("not a constructor");return this._ctor.apply(this,t)},e.prototype.alCall=function(t,e){if(!this._fn)throw new Error("not callable");return this._fn.apply(t,e)},e}(Af),N_=function(t){function e(e){var n=t.call(this,e)||this,r=new yf(e);return r.alPrototype=e.builtins.Object.alGetPrototypeProperty(),r.alSetOwnProperty("constructor",new mf(67)),n.alSetOwnPrototypeProperty(r),n}return n(e,t),e.prototype.alConstruct=function(t){var e=new yf(this.context),n=this.alGetPrototypeProperty();n instanceof yf||(n=this.context.builtins.Object.alGetPrototypeProperty()),e.alPrototype=n,e.alSetOwnConstructorProperty(this);var r=this.alCall(e,t);return r instanceof yf?r:e},e}(Af);function R_(t){}function F_(t,e,n){var r=typeof e;if("string"===r||"number"===r||"undefined"===r)return e;if(!(e instanceof yf))return e;var i=e;return void 0!==n?i.alDefaultValue(n):i.alDefaultValue()}function k_(t,e){var n=t.swfVersion>=7;switch(typeof e){case"undefined":return!1;case"object":return null!==e;case"boolean":return e;case"string":return n?!!e:!isNaN(+e)&&0!=+e;case"number":return!!e}}function U_(t,e){switch("object"==typeof e&&null!==e&&(e=F_(0,e,0)),typeof e){case"undefined":return t.swfVersion>=7?NaN:0;case"object":return null===e?t.swfVersion>=7?NaN:0:void 0!==e.nodeValue?parseFloat(e.nodeValue):t.swfVersion>=5?NaN:0;case"boolean":return e?1:0;case"number":return e;case"string":return""===e&&t.swfVersion<5?0:""===e?NaN:+e}}function j_(t,e){var n=U_(t,e);return isNaN(n)?0:0===n||n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY?n:n<0?Math.ceil(n):Math.floor(n)}function V_(t,e){return 0|U_(t,e)}function Q_(t,e){switch("object"==typeof e&&null!==e&&(e=F_(0,e,1)),typeof e){case"undefined":return t.swfVersion>=7?"undefined":"";case"object":if(null===e)return"null";if(e&&e instanceof Array){for(var n="",r=0;r=4294967296)}function em(t,e,n,r){void 0===r&&(r=null);var i=j_(t,e.alGet("length"));if(!(isNaN(i)||i>=4294967296))for(var o=0;on&&t-n>.04&&(n+=.05,n=Math.round(20*n)/20),n*e}function fm(t){return Math.round(20*t)/20}function gm(t){return t+1}function _m(t){return t-1}function mm(t,e){return e.context.executeActions(t,e)}var ym=function(t){function e(n){var r=t.call(this)||this;return r.imageStore={},r.avm1Context=n,e._instance=r,r}return n(e,t),Object.defineProperty(e,"instance",{get:function(){return e._instance||console.log("Error. A instance of AVM1SceneGraphFactory must be created manually \t\t\t\tbefore accessing the singleton AVM1SceneGraphFactory._instance"),e._instance},enumerable:!0,configurable:!0}),e.prototype.createSprite=function(t){return new ru},e.prototype.createDisplayObjectContainer=function(){return new nu},e.prototype.createMovieClip=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null);var n=new Cu(t||new lu);return cm(n,this.avm1Context),n._symbol=e,n},e.prototype.createTextField=function(){var t=new bh;return t.multiline=!0,t.wordWrap=!0,cm(t,this.avm1Context),t},e.prototype.createBillboard=function(t){return null},e.prototype.createImage2D=function(t,e,n,r,i){return void 0===n&&(n=!0),void 0===r&&(r=null),void 0===i&&(i=!0),new en(t,e,n,r,i)},e.prototype.createFrameScripts=function(t,e,n,r){n=n.replace(/[^\w]/g,"");for(var i=[],o=0;o=t.precedence.length?t.precedence.length===e.precedence.length?0:-1:n>=e.precedence.length?1:t.precedence[n]-e.precedence[n]},e}(Ch),Am=tp.register(new $h("AVM1")),vm=Am.register(new Zh("t1","traceAvm1","boolean",!1,"trace AVM1 execution")),bm=Am.register(new Zh("e1","errorsAvm1","boolean",!1,"fail on AVM1 warnings and errors")),Cm=Am.register(new Zh("w1","warningsAvm1","boolean",!0,"Emit messages for AVM1 warnings and errors")),Im=Am.register(new Zh("ha1","nohangAvm1","boolean",!1,"disable fail on AVM1 hang")),Em=Am.register(new Zh("ca1","compileAvm1","boolean",!0,"compiles AVM1 code")),xm=Am.register(new Zh("da1","debugAvm1","boolean",!1,"allows AVM1 code debugging"));Am.register(new Zh("cw1","wellknownAvm1","boolean",!0,"Replaces well-known actions patterns instead of compilation"));var wm,Sm=function(){return function(t,e,n,r){void 0===n&&(n=null),this.bytes=t,this.id=e,this.parent=n,this.encryptedData=r,this.debugPath=this.id,this.ir=null,this.compiled=null}}(),Dm=function(){function t(){this._cache=new WeakMap}return t.prototype.createActionsData=function(t,e,n){void 0===n&&(n=null);var r=t instanceof Uint8Array,i=r?t:t.actionsData,o=r?void 0:t.encryptedData,a=this._cache.get(i);return a||(a=new Sm(i,e,n,o),this._cache.set(i,a)),a},t}(),Tm=function(){function t(t){this.swfVersion=t,this.globals=null,this.actionsDataFactory=new Dm,t>6?(this.isPropertyCaseSensitive=!0,this.normalizeName=this.normalizeNameCaseSensitive):(this.isPropertyCaseSensitive=!1,this._nameCache=Object.create(null),this.normalizeName=this.normalizeNameCaseInsensitive),this.builtins={},function(t){var e=t.builtins,n=new u_(t),r=new yf(t);r.alSetOwnPrototypeProperty(n),e.Object=r;var i=new c_(t),o=new yf(t);o.alSetOwnPrototypeProperty(i),e.Function=o,n._initializePrototype(),i._initializePrototype(),e.Object=new l_(t),e.Function=new h_(t),e.Boolean=new f_(t),e.Number=new m_(t),e.String=new v_(t),e.Array=new x_(t),e.Date=new T_(t),e.Math=new w_(t),e.Error=new O_(t)}(this),this.eventObservers=Object.create(null),this.assets={},this.assetsSymbols=[],this.assetsClasses=[],this.awayAssets={},this.staticStates=new WeakMap}return t.prototype.resolveTarget=function(t){},t.prototype.resolveRoot=function(){},t.prototype.checkTimeout=function(){},t.prototype.executeActions=function(t,e){},t.prototype.executeFunction=function(t,e,n){},t.prototype.normalizeNameCaseSensitive=function(t){switch(typeof t){case"number":case"string":return t;default:return Q_(this,t)}},t.prototype.normalizeNameCaseInsensitive=function(t){switch(typeof t){case"number":return t.toString();case"string":break;default:t=Q_(this,t)}var e=this._nameCache[t];return e||(e=t.toLowerCase(),this._nameCache[t]=e,e)},t.prototype._getEventPropertyObservers=function(t,e){this.isPropertyCaseSensitive||(t=t.toLowerCase());var n=this.eventObservers[t];return n||(e?(n=[],this.eventObservers[t]=n,n):null)},t.prototype.registerEventPropertyObserver=function(t,e){this._getEventPropertyObservers(t,!0).push(e)},t.prototype.unregisterEventPropertyObserver=function(t,e){var n=this._getEventPropertyObservers(t,!1);if(n){var r=n.indexOf(e);r<0||n.splice(r,1)}},t.prototype.broadcastEventPropertyChange=function(t){var e=this._getEventPropertyObservers(t,!1);e&&e.forEach((function(e){return e.onEventPropertyModified(t)}))},t.prototype.addAsset=function(t,e,n){this.assets[t.toLowerCase()]=e,this.assetsSymbols[e]=n,this.awayAssets[t.toLowerCase()]=n},t.prototype.registerClass=function(t,e){if(null!==(t=X_(this,t))){var n=ht.getAsset(t,gg.currentMCAssetNameSpace);n&&n.adaptee?n.adaptee.avm1Symbol=e:console.warn("can not find symbol to register class "+t)}else this.utils.warn("Cannot register class for symbol: className is missing")},t.prototype.getSymbolClass=function(t){return this.assetsClasses[t]||null},t.prototype.getAsset=function(t){if(null!==(t=X_(this,t))){var e=this.assets[t.toLowerCase()];if(void 0!==e){var n=this.awayAssets[t.toLowerCase()];return n||console.log("error in getAsset. not implemented to grab assets from loaderInfo"),{symbolId:e,symbolProps:n}}}},t.prototype.reset=function(){this.eventObservers=Object.create(null),this.assets={},this.assetsSymbols=[],this.assetsClasses=[],this.awayAssets={},this.staticStates=new WeakMap,jf.bindStage(this,this.globals.Stage,null,null,null)},t.prototype.setStage=function(t,e,n){Hf.bindStage(this,this.globals.Key,t,n),Tg.bindStage(this,this.globals.Mouse,t,n),jf.bindStage(this,this.globals.Stage,t,e,n)},t.prototype.getStaticState=function(t){var e=this.staticStates.get(t);if(!e){e=Object.create(null);var n=t.alInitStatic;n&&n.call(e,this),this.staticStates.set(t,e)}return e},t.prototype.resolveLevel=function(t){var e=this.globals._getRootForLevel(t);if(e)return cm(e,this);this.utils.warn("Unable to resolve level "+t+" root")},t}(),Pm=function(){function t(){this.parentResults=null,this.registersLimit=0}return t.prototype.analyze=function(t){for(var e,n,r,i,o,a,s,u,l=[],c=[0],h=[!0],p=!1,d=null,f=[0];f.length>0;)if(e=f.shift(),!l[e])for(t.position=e;!t.eof&&!l[e]&&0!==(n=t.readNext()).actionCode;){switch(i={action:n,next:r=t.position,conditionalJumpTo:-1},o=0,a=!1,s=!1,n.actionCode){case 138:case 141:a=!0,u=138===n.actionCode?n.args[1]:n.args[0],t.skip(u),o=t.position,t.position=r;break;case 153:s=!0,a=!0,o=r+n.args[0];break;case 157:a=!0,o=r+n.args[0];break;case 42:case 62:case 0:s=!0,a=!0,o=t.length;break;case 136:if(p){d=null;break}p=!0,0===e&&(d=n.args[0])}if(a&&(s?i.next=o:i.conditionalJumpTo=o,h[o]||(c.push(o),f.push(o),h[o]=!0)),l[e]=i,s)break;e=r}var g,_,m=[];c.forEach((function(t){if(l[t]){var e;g=[],_=t;do{e=l[_],g.push(e),_=e.next}while(!h[_]&&l[_]);m.push({label:t,items:g,jump:_})}}));var y=null;return p?y=d:this.parentResults&&(y=this.parentResults.singleConstantPool),{actions:l,blocks:m,dataId:t.dataId,singleConstantPool:y,registersLimit:this.registersLimit}},t}(),Bm=function(){function t(t,e){this.array=t,this.position=0,this.end=t.length,this.readANSI=e<6;var n=new ArrayBuffer(4);if(new Int32Array(n)[0]=1,!new Uint8Array(n)[0])throw new Error("big-endian platform")}return t.prototype.readUI8=function(){return this.array[this.position++]},t.prototype.readUI16=function(){var t=this.position,e=this.array,n=e[t+1]<<8|e[t];return this.position=t+2,n},t.prototype.readSI16=function(){var t=this.position,e=this.array,n=e[t+1]<<8|e[t];return this.position=t+2,n<32768?n:n-65536},t.prototype.readInteger=function(){var t=this.position,e=this.array,n=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;return this.position=t+4,n},t.prototype.readFloat=function(){var t=this.position,e=this.array,n=new ArrayBuffer(4),r=new Uint8Array(n);return r[0]=e[t],r[1]=e[t+1],r[2]=e[t+2],r[3]=e[t+3],this.position=t+4,new Float32Array(n)[0]},t.prototype.readDouble=function(){var t=this.position,e=this.array,n=new ArrayBuffer(8),r=new Uint8Array(n);return r[4]=e[t],r[5]=e[t+1],r[6]=e[t+2],r[7]=e[t+3],r[0]=e[t+4],r[1]=e[t+5],r[2]=e[t+6],r[3]=e[t+7],this.position=t+8,new Float64Array(n)[0]},t.prototype.readBoolean=function(){return!!this.readUI8()},t.prototype.readANSIString=function(){for(var t,e="";t=this.readUI8();)e+=String.fromCharCode(t);return e},t.prototype.readUTF8String=function(){for(var t,e="";t=this.readUI8();)if(t<128)e+=String.fromCharCode(t);else if(128!=(192&t)){var n=this.position-1,r=192,i=5;do{var o=r>>1|128;if((t&o)===r)break;r=o,--i}while(i>=0);for(var a=t&(1<=i;--s)if(128==(192&(t=this.readUI8())))a=a<<6|63&t;else{var u=this.position-1;for(this.position=n;this.position=65536?String.fromCharCode(a-65536>>10&1023|55296,1023&a|56320):String.fromCharCode(a)}else e+=String.fromCharCode(t);return e},t.prototype.readString=function(){return this.readANSI?this.readANSIString():this.readUTF8String()},t.prototype.readBytes=function(t){var e=this.position,n=Math.max(this.end-e,0);n=this._initialLen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._initialLen},enumerable:!0,configurable:!0}),t.prototype.readNext=function(){var t=this._stream,e=t.position,n=t.readUI8(),r=n>=128?t.readUI16():0,i=t.position+r,o=null;switch(155!==n&&142!==n&&(this._lastPushedValue=null),0|n){case 129:var a=t.readUI16(),s=!1;6!==(u=t.readUI8())&&7!==u?t.position--:(i++,s=6===u),o=[a,s];break;case 131:o=[t.readString(),t.readString()];break;case 138:o=[a=t.readUI16(),p=t.readUI8()];break;case 139:o=[t.readString()];break;case 140:var u,l=t.readString();s=!1;6!==(u=t.readUI8())&&7!==u?t.position--:(i++,s=6===u),o=[l,s];break;case 150:var c,h;for(o=[];t.position0&&this.position=128?e.readUI16():0;e.position+=n,t--}},t}(),Rm={0:"EOA",4:"ActionNextFrame",5:"ActionPreviousFrame",6:"ActionPlay",7:"ActionStop",8:"ActionToggleQuality",9:"ActionStopSounds",10:"ActionAdd",11:"ActionSubtract",12:"ActionMultiply",13:"ActionDivide",14:"ActionEquals",15:"ActionLess",16:"ActionAnd",17:"ActionOr",18:"ActionNot",19:"ActionStringEquals",20:"ActionStringLength",21:"ActionStringExtract",23:"ActionPop",24:"ActionToInteger",28:"ActionGetVariable",29:"ActionSetVariable",32:"ActionSetTarget2",33:"ActionStringAdd",34:"ActionGetProperty",35:"ActionSetProperty",36:"ActionCloneSprite",37:"ActionRemoveSprite",38:"ActionTrace",39:"ActionStartDrag",40:"ActionEndDrag",41:"ActionStringLess",42:"ActionThrow",43:"ActionCastOp",44:"ActionImplementsOp",45:"ActionFSCommand2",48:"ActionRandomNumber",49:"ActionMBStringLength",50:"ActionCharToAscii",51:"ActionAsciiToChar",52:"ActionGetTime",53:"ActionMBStringExtract",54:"ActionMBCharToAscii",55:"ActionMBAsciiToChar",58:"ActionDelete",59:"ActionDelete2",60:"ActionDefineLocal",61:"ActionCallFunction",62:"ActionReturn",63:"ActionModulo",64:"ActionNewObject",65:"ActionDefineLocal2",66:"ActionInitArray",67:"ActionInitObject",68:"ActionTypeOf",69:"ActionTargetPath",70:"ActionEnumerate",71:"ActionAdd2",72:"ActionLess2",73:"ActionEquals2",74:"ActionToNumber",75:"ActionToString",76:"ActionPushDuplicate",77:"ActionStackSwap",78:"ActionGetMember",79:"ActionSetMember",80:"ActionIncrement",81:"ActionDecrement",82:"ActionCallMethod",83:"ActionNewMethod",84:"ActionInstanceOf",85:"ActionEnumerate2",96:"ActionBitAnd",97:"ActionBitOr",98:"ActionBitXor",99:"ActionBitLShift",100:"ActionBitRShift",101:"ActionBitURShift",102:"ActionStrictEquals",103:"ActionGreater",104:"ActionStringGreater",105:"ActionExtends",129:"ActionGotoFrame",131:"ActionGetURL",135:"ActionStoreRegister",136:"ActionConstantPool",137:"ActionStrictMode",138:"ActionWaitForFrame",139:"ActionSetTarget",140:"ActionGoToLabel",141:"ActionWaitForFrame2",142:"ActionDefineFunction2",143:"ActionTry",148:"ActionWith",150:"ActionPush",153:"ActionJump",154:"ActionGetURL2",155:"ActionDefineFunction",157:"ActionIf",158:"ActionCall",159:"ActionGotoFrame2"},Fm=/[^A-Za-z0-9_/]+/g,km=null;function Um(){return km||(km=function(){var t=function(t){return t};return{ActionGotoFrame:t(wy),ActionGetURL:t(Sy),ActionNextFrame:t(Dy),ActionPreviousFrame:t(Ty),ActionPlay:t(Py),ActionStop:t(By),ActionToggleQuality:t(Oy),ActionStopSounds:t(My),ActionWaitForFrame:t(Ly),ActionSetTarget:t(Ny),ActionGoToLabel:t(Ry),ActionPush:t(Fy),ActionPop:t(ky),ActionAdd:t(Uy),ActionSubtract:t(jy),ActionMultiply:t(Vy),ActionDivide:t(Qy),ActionEquals:t(Gy),ActionLess:t(zy),ActionAnd:t(Hy),ActionOr:t(Xy),ActionNot:t(Yy),ActionStringEquals:t(qy),ActionStringLength:t(Ky),ActionMBStringLength:t(Wy),ActionStringAdd:t(Jy),ActionStringExtract:t($y),ActionMBStringExtract:t(Zy),ActionStringLess:t(tA),ActionToInteger:t(eA),ActionCharToAscii:t(nA),ActionMBCharToAscii:t(rA),ActionAsciiToChar:t(iA),ActionMBAsciiToChar:t(oA),ActionJump:t(aA),ActionIf:t(sA),ActionCall:t(uA),ActionGetVariable:t(lA),ActionSetVariable:t(cA),ActionGetURL2:t(hA),ActionGotoFrame2:t(pA),ActionSetTarget2:t(dA),ActionGetProperty:t(fA),ActionSetProperty:t(gA),ActionCloneSprite:t(_A),ActionRemoveSprite:t(mA),ActionStartDrag:t(yA),ActionEndDrag:t(AA),ActionWaitForFrame2:t(vA),ActionTrace:t(bA),ActionGetTime:t(CA),ActionRandomNumber:t(IA),ActionCallFunction:t(EA),ActionCallMethod:t(xA),ActionConstantPool:t(SA),ActionDefineFunction:t(DA),ActionDefineLocal:t(TA),ActionDefineLocal2:t(PA),ActionDelete:t(BA),ActionDelete2:t(OA),ActionEnumerate:t(MA),ActionEquals2:t(LA),ActionGetMember:t(NA),ActionInitArray:t(RA),ActionInitObject:t(FA),ActionNewMethod:t(kA),ActionNewObject:t(UA),ActionSetMember:t(jA),ActionTargetPath:t(VA),ActionWith:t(QA),ActionToNumber:t(GA),ActionToString:t(zA),ActionTypeOf:t(HA),ActionAdd2:t(XA),ActionLess2:t(YA),ActionModulo:t(qA),ActionBitAnd:t(KA),ActionBitLShift:t(WA),ActionBitOr:t(JA),ActionBitRShift:t($A),ActionBitURShift:t(ZA),ActionBitXor:t(tv),ActionDecrement:t(ev),ActionIncrement:t(nv),ActionPushDuplicate:t(rv),ActionReturn:t(iv),ActionStackSwap:t(ov),ActionStoreRegister:t(av),ActionInstanceOf:t(sv),ActionEnumerate2:t(uv),ActionStrictEquals:t(lv),ActionGreater:t(cv),ActionStringGreater:t(hv),ActionDefineFunction2:t(pv),ActionExtends:t(dv),ActionCastOp:t(fv),ActionImplementsOp:t(gv),ActionTry:t(_v),ActionThrow:t(mv),ActionFSCommand2:t(yv),ActionStrictMode:t(Av)}}()),km}var jm=function(){return function(t){void 0===t&&(t=!1),this.inlinePop=t}}(),Vm=((wm={})[78]={AllowReturnValue:!0,AllowStackToArgs:!0,AllowCallapsDouble:!0,ArgsCount:2},wm[79]={AllowStackToArgs:!0,ArgsCount:3},wm[71]={AllowStackToArgs:!0,AllowReturnValue:!0,PlainArgs:!0,ArgsCount:2},wm[103]={AllowStackToArgs:!0,AllowReturnValue:!0,ArgsCount:2},wm),Qm=function(){function t(){}return t.prototype.convertArgs=function(t,e,n,r){for(var i,o,a,s,u,l,c=[],h=t.length,p=0;p=0?"":" /* "+a+" */"),c.push("constantPool["+i.constantIndex+"]"+a)):i instanceof Mm?(u=i.registerNumber)<0||u>=r.registersLimit?c.push("undefined"):c.push("registers["+u+"]"):i instanceof Sm?(n[l="code_"+e+"_"+p]=i,c.push("res."+l)):i instanceof jm&&i.inlinePop&&c.push("stack.pop()");return c.join(",")},t.prototype.convertAction=function(t,e,n,r,i,o,a){var s,u,l=o[r-1],c=t.flags,h="";if((null===(s=c)||void 0===s?void 0:s.optimised)&&(h=" /* "+t.action.actionName+" optimised */\n"),null===(u=c)||void 0===u?void 0:u.killed)return" /* "+t.action.actionName+" killed by optimiser */\n";if(!t.action.knownAction)return" // unknown actionCode "+t.action.actionCode+" at "+t.action.position+"\n";switch(t.action.actionCode){case 153:case 62:return"";case 136:return n.constantPool=t.action.args[0],a.forward["constPool"+e]="["+this.convertArgs(t.action.args[0],e,n,i)+"]"," constantPool = ectx.constantPool = constPool"+e+";\n";case 150:return h+" stack.push("+this.convertArgs(t.action.args,e,n,i)+");\n";case 135:var p=t.action.args[0];return p<0||p>=i.registersLimit?"":" registers["+p+"] = stack[stack.length - 1];\n";case 138:case 141:var d=this.convertArgs(t.action.args,e,n,i);return" if (calls."+t.action.actionName+"(ectx,["+d+"])) { position = "+t.conditionalJumpTo+"; checkTimeAfter -= "+(r+1)+"; break; }\n";case 157:return" if (!!stack.pop()) { position = "+t.conditionalJumpTo+"; checkTimeAfter -= "+(r+1)+"; break; }\n";default:if((d=t.action.args?this.convertArgs(t.action.args,e,n,i):"")&&!c.PlainArgs&&(d="["+d+"]"),142===t.action.actionCode){var f="defFunArgs"+e;a.forward[f]=d,d=f}if(h+=" calls."+t.action.actionName+"(ectx"+(d?", "+d:"")+");\n","ActionCallMethod"==t.action.actionName&&(l||(h="// strange oppcode at "+t.action.position+"\n"+h),l&&150==l.action.actionCode)){var g=this.convertArgs(l.action.args,e-1,n,i);'"gotoAndStop"'!=g&&'"gotoAndPlay"'!=g||(h+=" if(ectx.scopeList && ectx.scopeList.scope && ectx.scopeList.scope.adaptee && !ectx.scopeList.scope.adaptee.parent){ ectx.framescriptmanager.execute_avm1_constructors(); return;}\n")}return h}},t.prototype.inlineStackOpt=function(t,e,n){if(!n.length)return!1;var r=e[t],i=r.flags,o=r.action.actionCode,a=e[n[0]];n.length=0;var s=Vm[o];if(!s||!s.AllowStackToArgs)return!1;i.PlainArgs=s.PlainArgs;var u=a.action.args;if(u.length===s.ArgsCount)a.flags.killed=!0,r.action.args=u;else if(u.length>s.ArgsCount){var l=u.length-s.ArgsCount;r.action.args=u.slice(l),u.length=l,a.flags.optimised=!0}else{var c=s.ArgsCount-u.length;if(c>1)return!1;a.flags.killed=!0,r.action.args=u.slice();for(var h=0;h1)for(var c=i[0],h=i[i.length-1],p=r[c].action,d=c+1;d<=h;d++)p.args=p.args.concat(r[d].action.args),r[d].flags.killed=!0;o=!!o&&this.inlineStackOpt(a,r,i),i.length=0}switch(l){case 150:i.push(a),o=!0;break;case 78:var f=u.action.args;if(!(null===(e=f)||void 0===e?void 0:e.length))break;var g=f[0];if(!(g instanceof jm&&g.inlinePop))break;for(var _=a-1;_>=0&&r[_].flags.killed;_--);if(_>=0){var m=r[_],y=m.action.args;if(78===m.action.actionCode&&(null===(n=y)||void 0===n?void 0:n.length)){m.flags.killed=!0,u.flags.optimised=!0,f.shift();for(var A=y.length-1;A>=0;A--)f.unshift(y[A])}}}}},t.prototype.generate=function(t,e){var n=this;void 0===e&&(e=null);var r=t.blocks,i={},o={forward:{},back:{}},a=t.dataId.replace(Fm,"_"),s="return function "+a+"(ectx) {\nvar position = 0;\nvar checkTimeAfter = 0;\nvar constantPool = ectx.constantPool, registers = ectx.registers, stack = ectx.stack;\n",u="",l="";xm.value&&(l+="/* Running "+a+" */ if (Shumway.AVM1.Debugger.pause || Shumway.AVM1.Debugger.breakpoints."+a+") { debugger; }\n"),l+="while (!ectx.isEndOfActions) {\nif (checkTimeAfter <= 0) { checkTimeAfter = "+Hm+"; ectx.context.checkTimeout(); }\n\nswitch(position) {\n";var c=0;for(var h in r.forEach((function(e){l+=" case "+e.label+":\n",n.optimiser(e);var r=e.items.map((function(r,a){return n.convertAction(r,c++,i,a,t,e.items,o)}));l+=r.join(""),l+=" position = "+e.jump+";\n checkTimeAfter -= "+e.items.length+";\n break;\n"})),l+=" default: ectx.isEndOfActions = true; break;\n}\n}\nreturn stack.pop();};",u+="\n// hoisted vars\n",o.forward)u+="var "+h+" = "+o.forward[h]+";\n";l=(u+="\n")+s+l,l+="//# sourceURL=http://jit/"+(e&&!Fm.test(e)?e:a);try{return new Function("calls","res",l)(Um(),i)}catch(t){throw t}},t}();function Gm(t,e,n,r,i){if(bm.value)try{throw new Error(t)}catch(t){}Cm.value&&np.warning.apply(console,arguments)}var zm,Hm=1e3;!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.TARGET=1]="TARGET",t[t.REPLACE_TARGET=2]="REPLACE_TARGET"}(zm||(zm={}));var Xm=function(){return function(t,e){this.scope=t,this.previousScopeItem=e,this.flags=zm.DEFAULT}}(),Ym=function(t){function e(e,n){var r=t.call(this,e)||this;return r.alSetOwnProperty("this",new mf(71,n)),r.alSetOwnProperty("_global",new mf(71,e.globals)),r}return n(e,t),e}(yf),qm=function(){function t(t,e,n,r,i){this.previousFrame=t,this.currentThis=e,this.fn=n,this.args=r,this.ectx=i,this.inSequence=!!t&&(t.calleeThis===e&&t.calleeFn===n),this.resetCallee()}return t.prototype.setCallee=function(t,e,n,r){this.calleeThis=t,this.calleeSuper=e,this.calleeFn=n},t.prototype.resetCallee=function(){this.calleeThis=null,this.calleeSuper=null,this.calleeFn=null},t}(),Km=function(){function t(t){this._context=t}return t.prototype.hasProperty=function(t,e){return function(t,e,n){var r=G_(t,e);return n=t.normalizeName(n),r.alHasProperty(n)}(this._context,t,e)},t.prototype.getProperty=function(t,e){return ny(this._context,t,e)},t.prototype.setProperty=function(t,e,n){return ry(this._context,t,e,n)},t.prototype.warn=function(t){Gm.apply(null,arguments)},t}(),Wm=function(t){function e(e){var n=t.call(this,e)||this;return n.globals=a_.createGlobalsObject(n),n.actions=new s_(n),n.initialScope=new Xm(n.globals,null),n.utils=new Km(n),n.isActive=!1,n.executionProhibited=!1,n.actionTracer=vm.value?new Cv:null,n.abortExecutionAt=0,n.stackDepth=0,n.frame=null,n.isTryCatchListening=!1,n.errorsIgnored=0,n.deferScriptExecution=!0,n}return n(e,t),e.prototype._getExecutionContext=function(){return this.frame.ectx},e.prototype.resolveTarget=function(t){return Ey(this._getExecutionContext(),t,!0)},e.prototype.resolveRoot=function(){return xy(this._getExecutionContext())},e.prototype.checkTimeout=function(){Date.now(),this.abortExecutionAt},e.prototype.pushCallFrame=function(t,e,n,r){var i=new qm(this.frame,t,e,n,r);return this.frame=i,i},e.prototype.popCallFrame=function(){var t=this.frame.previousFrame;return this.frame=t,t},e.prototype.executeActions=function(t,e){if(!this.executionProhibited){var n,r=this.isActive;r||(this.isActive=!0,this.abortExecutionAt=Im.value?Number.MAX_VALUE:Date.now()+1e3,this.errorsIgnored=0);try{!function(t,e,n){t.actionTracer;var r,i=new Xm(new Ym(t,n),t.initialScope),o=new Xm(n,i);o.flags|=zm.TARGET;var a=py.create(t,o,[],4);t.pushCallFrame(n,null,null,a);try{bv(a,e)}catch(t){r=ay(t)}a.dispose(),r instanceof $m&&(t.executionProhibited=!0,console.error("Disabling AVM1 execution"));if(t.popCallFrame(),r)throw r}(this,t,e)}catch(t){n=t}this.isActive=r,n&&console.error("error in framescripts",n)}},e.prototype.executeFunction=function(t,e,n){if(!this.executionProhibited){var r,i,o=this.isActive;o||(this.isActive=!0,this.abortExecutionAt=Im.value?Number.MAX_VALUE:Date.now()+1e3,this.errorsIgnored=0);try{i=t.alCall(e,n)}catch(t){r=t}if(this.isActive=o,r)throw r;return i}},e}(Tm);Tm.create=function(t){return new Wm(t)};var Jm=function(){return function(t){this.error=t}}(),$m=function(t){function e(e,n){var r=t.call(this,e)||this;return r.error=n,r}return n(e,t),e}(Error);function Zm(t,e,n){var r=F_(0,e),i=F_(0,n);if("string"==typeof r&&"string"==typeof i)return Q_(t,r)i?r:i);return Math.abs(e-n)<=o}return e===n}return null==e&&null==n||("number"==typeof e&&"string"==typeof n?""!==n&&e===+n:"string"==typeof e&&"number"==typeof n?""!==e&&+e===n:"boolean"==typeof e&&(e=+e,"number"==typeof n||"string"==typeof n)?""!==n&&e===+n:"boolean"==typeof n&&(n=+n,"number"==typeof e||"string"==typeof e)?""!==e&&+e===n:"number"!=typeof e&&"string"!=typeof e||"object"!=typeof n||null===n?"object"==typeof e&&null!==e&&("number"==typeof n||"string"==typeof n)&&("object"!=typeof(e=F_(0,e))&&ty(t,e,n)):"object"!=typeof(n=F_(0,n))&&ty(t,e,n))}function ey(t,e){if(qh(t)||qh(e))return!1;var n=e.alGetPrototypeProperty();if(!n)return!1;for(var r=t;r;){if(r===n)return!0;r=r.alPrototype}return!1}function ny(t,e,n){var r=G_(t,e);if(r)return r.alGet(n)}function ry(t,e,n,r){var i=G_(t,e);if(i)if("__proto__"==n){if(r){for(var o=r.alGetKeys(),a=0;a=5,this.isSwfVersion7=t.swfVersion>=7,this.registers=[],this.stack=[],this.frame=null,this.recoveringFromError=!1,this.isEndOfActions=!1,this.reset(e,n,r)}return t.alInitStatic=function(){this.cache=[]},t.prototype.reset=function(t,e,n){this.scopeList=t,this.constantPool=e,this.registers.length=n},t.prototype.clean=function(){this.scopeList=null,this.constantPool=null,this.registers.length=0,this.stack.length=0,this.frame=null,this.recoveringFromError=!1,this.isEndOfActions=!1},t.prototype.pushScope=function(t){var e=Object.create(this);return e.stack=[],qh(t)||(e.scopeList=t),e},t.prototype.dispose=function(){this.clean();var e=this.context.getStaticState(t);e.cache.length0?(o=a.cache.pop()).reset(n,r,i):o=new t(e,n,r,i),o},t.MAX_CACHED_EXECUTIONCONTEXTS=20,t}(),dy=function(t){function e(e){var n=t.call(this,e)||this;return n.alPut("toString",new L_(e,n._toString)),n}return n(e,t),e.prototype._toString=function(){return this},e}(yf),fy=function(t){function e(e,n,r,i,o,a,s,u){var l=t.call(this,e)||this;l.functionName=i,l.actionsData=r,l.parametersNames=o,l.registersAllocation=s,l.suppressArguments=u,l.scopeList=n.scopeList,l.constantPool=n.constantPool;for(var c=null,h=s?s.length:0,p=0;p=256)throw new $m("long running script -- AVM1 recursion limit is reached");try{v=bv(c,E)}catch(t){b=t}if(i.stackDepth--,i.popCallFrame(),c.dispose(),b)throw b;return v}},e}(N_);function gy(t,e){return isNaN(t)||t<0?(Gm("Invalid amount of arguments: "+t),0):(t|=0)>e?(Gm("Truncating amount of arguments: from "+t+" to "+e),e):t}function _y(t){var e=+t.pop();e=gy(e,t.length);for(var n=[],r=0;r=0||t.indexOf(":")>=0||t.indexOf("/")>=0)}(e))return"string"==typeof(e=t.context.normalizeName(e))&&e.startsWith("_level")?((r=Ay).scope=c,r.propertyName=e,r.value=t.context.resolveLevel(+e[6]),r):by(t.scopeList,e,n);if("."==e[e.length-1])return null;if("/"===e[0]?((r=by(t.scopeList,"_root",33))&&(l=r.propertyName,c=r.scope,h=r.value),s++,o=!1):(r=null,o=!0),s>=a)return r;for(var d=s;s=a)break;var y=e[s++];"/"!==y||":"!==(i=e[s])&&"."!==i||(y=e[s++]),u="/"===y}}return(r=Ay).scope=c,r.propertyName=p.substring(d,s),r.value=32&n?h:void 0,r}function Iy(t,e){for(var n=t.scopeList;n.previousScopeItem;n=n.previousScopeItem){if(n.flags&zm.REPLACE_TARGET&&e)return n.replaceTargetBy;if(n.flags&zm.TARGET)return n.scope}}function Ey(t,e,n){var r;if(vy(e))r=e;else if(e=qh(e)?"":Q_(this,e)){var i=Q_(t.context,e),o=Cy(t,i,161|(n?0:64));o&&vy(o.value)?r=o.value:(Gm("Invalid AVM1 target object: "+i),r=void 0)}else r=Iy(t,!0);return r}function xy(t){return Iy(t,!0).get_root()}function wy(t,e){var n=e[0];e[1]?t.actions.gotoAndPlay(n+1):t.actions.gotoAndStop(n+1)}function Sy(t,e){var n=e[0],r=e[1];t.actions.getURL(n,r)}function Dy(t){t.actions.nextFrame()}function Ty(t){t.actions.prevFrame()}function Py(t){t.actions.play()}function By(t){t.actions.stop()}function Oy(t){t.actions.toggleHighQuality()}function My(t){t.actions.stopAllSounds()}function Ly(t,e){var n=e[0];return!t.actions.ifFrameLoaded(n)}function Ny(t,e){my(t,e[0])}function Ry(t,e){var n=e[0];e[1]?t.actions.gotoAndPlay(n):t.actions.gotoAndStop(n)}function Fy(t,e){var n=t.registers,r=t.constantPool,i=t.stack;e.forEach((function(t){if(t instanceof Lm)i.push(r[t.constantIndex]);else if(t instanceof Mm){var e=t.registerNumber;e<0||e>=n.length?i.push(void 0):i.push(n[e])}else i.push(t)}))}function ky(t){t.stack.pop()}function Uy(t){var e=t.stack,n=U_(t.context,e.pop()),r=U_(t.context,e.pop());t.isSwfVersion7||(void 0===n&&(n=0),void 0===r&&(r=0)),isFinite(n)&&isFinite(r)?null==r?e.push(NaN):e.push(n+r):n===-1/0&&r===-1/0?e.push(-1/0):isNaN(n)||isNaN(r)?e.push(NaN):n===r?e.push(1/0):isFinite(n)||isFinite(r)?isFinite(n)?isFinite(r)||e.push(r):e.push(n):e.push(NaN)}function jy(t){var e=t.stack,n=e.pop(),r=e.pop();n=U_(t.context,n),r=U_(t.context,r),t.isSwfVersion7||(null==n&&(n=0),null==r&&(r=0)),isFinite(n)&&isFinite(r)?e.push(r-n):isNaN(n)||isNaN(r)||n===r?e.push(NaN):isFinite(n)?isFinite(r)||e.push(r):n===-1/0?e.push(1/0):e.push(-1/0)}function Vy(t){var e=t.stack,n=e.pop();n="\n"===n?NaN:U_(t.context,n);var r=e.pop();r="\n"===r?NaN:U_(t.context,r),t.isSwfVersion7||(null!=n&&void 0!==n||(n=0),null!=r&&void 0!==r||(r=0)),isFinite(n)&&isFinite(r)?e.push(n*r):isNaN(n)||isNaN(r)?e.push(NaN):n===r?e.push(1/0):isFinite(n)||isFinite(r)?isFinite(n)?isFinite(r)||(0==n?e.push(NaN):r>=0?n>=0?e.push(1/0):e.push(-1/0):n>=0?e.push(-1/0):e.push(1/0)):0==r?e.push(NaN):n>=0?r>=0?e.push(1/0):e.push(-1/0):r>=0?e.push(-1/0):e.push(1/0):e.push(-1/0)}function Qy(t){var e=t.stack,n=e.pop(),r=e.pop(),i=typeof(n=Number.isNaN(+n)?n:+n),o=typeof(r=Number.isNaN(+r)?r:+r);t.isSwfVersion7||(null!==n&&"undefined"!==i||(n=0,i="number"),null!==r&&"undefined"!==o||(r=0,o="number")),"object"===i||"object"===o||"string"===i||"string"===o||"undefined"===i||"undefined"===o||isNaN(n)||isNaN(r)?e.push(NaN):(n="boolean"===i?+n:U_(t.context,n),r="boolean"===o?+r:U_(t.context,r),!isFinite(n)||!isFinite(r)||0==n&&0==r?0==n&&0==r||!isFinite(n)&&!isFinite(r)?e.push(NaN):0==n?e.push(r):0==r?e.push(0):isFinite(r)?isFinite(n)||(isNaN(n)?e.push(n):e.push(0)):r>=0?n>=0?e.push(1/0):e.push(-1/0):n>=0?e.push(-1/0):e.push(1/0):0==n?e.push(r>0?1/0:-1/0):e.push(r/n))}function Gy(t){var e=t.stack,n=t.isSwfVersion5,r=U_(t.context,e.pop()),i=U_(t.context,e.pop()),o=Math.abs(r),a=Math.abs(i),s=1e-6*(o>a?o:a),u=Math.abs(r-i)<=s;e.push(n?u:u?1:0)}function zy(t){var e=t.stack,n=t.isSwfVersion5,r=U_(t.context,e.pop()),i=U_(t.context,e.pop())=5?!!e:+e}(e,r))}function qy(t){var e=t.stack,n=t.isSwfVersion5,r=Q_(t.context,e.pop())==Q_(t.context,e.pop());e.push(n?r:r?1:0)}function Ky(t){var e=t.stack,n=Q_(t.context,e.pop());e.push(t.actions.length_(n))}function Wy(t){var e=t.stack,n=Q_(t.context,e.pop());e.push(t.actions.length_(n))}function Jy(t){var e=t.stack,n=Q_(t.context,e.pop()),r=Q_(t.context,e.pop());e.push(r+n)}function $y(t){var e=t.stack,n=e.pop(),r=e.pop(),i=Q_(t.context,e.pop());e.push(t.actions.substring(i,r,n))}function Zy(t){var e=t.stack,n=e.pop(),r=e.pop(),i=Q_(t.context,e.pop());e.push(t.actions.mbsubstring(i,r,n))}function tA(t){var e=t.stack,n=t.isSwfVersion5,r=Q_(t.context,e.pop()),i=Q_(t.context,e.pop())>1);for(var r=z_(t.context),i=0;i1?(n=F_(t.context,n),e=F_(t.context,e)):(n=F_(t.context,r.pop()),e=F_(t.context,r.pop()));var i=typeof e,o=typeof n,a="string"===i,s="string"===o;return a&&s?r[r.length]=e+n:a||s?r[r.length]=(a?e:Q_(t.context,e))+(s?n:Q_(t.context,n)):(t.isSwfVersion7||(null!==e&&"undefined"!==i||(e=0),null!==n&&"undefined"!==o||(n=0)),null==n||null==e?r.push(NaN):isFinite(e)&&isFinite(n)?r.push(e+n):e===-1/0&&n===-1/0?r.push(-1/0):isNaN(e)||isNaN(n)?r.push(NaN):e===n?r.push(1/0):isFinite(e)||isFinite(n)?isFinite(e)?isFinite(n)||r.push(n):r.push(e):r.push(NaN),r[r.length-1])}function YA(t){var e=t.stack,n=e.pop(),r=e.pop();e.push(Zm(t.context,r,n))}function qA(t){var e=t.stack,n=e.pop(),r=e.pop();t.isSwfVersion7||(void 0===n&&(n=0),void 0===r&&(r=0)),n=U_(t.context,n),r=U_(t.context,r),!isFinite(n)||!isFinite(r)||0==n&&0==r?isNaN(n)||isNaN(r)||!isFinite(n)&&!isFinite(r)||isFinite(n)?e.push(NaN):e.push(r):e.push(r%n)}function KA(t){var e=t.stack,n=V_(t.context,e.pop()),r=V_(t.context,e.pop());e.push(r&n)}function WA(t){var e=t.stack,n=V_(t.context,e.pop()),r=V_(t.context,e.pop());e.push(r<>n)}function ZA(t){var e=t.stack,n=V_(t.context,e.pop()),r=V_(t.context,e.pop());e.push(r>>>n)}function tv(t){var e=t.stack,n=V_(t.context,e.pop()),r=V_(t.context,e.pop());e.push(r^n)}function ev(t){var e=t.stack,n=U_(t.context,e.pop());n--,e.push(n)}function nv(t){var e=t.stack,n=U_(t.context,e.pop());n++,e.push(n)}function rv(t){var e=t.stack;e.push(e[e.length-1])}function iv(t){t.isEndOfActions=!0}function ov(t){var e=t.stack;e.push(e.pop(),e.pop())}function av(t,e){var n=t.stack,r=t.registers,i=e[0];i<0||i>=r.length||(r[i]=n[n.length-1])}function sv(t){var e=t.stack,n=e.pop(),r=e.pop();e.push(ey(r,n))}function uv(t){var e=t.stack,n=e.pop();e.push(null),qh(n)?Gm("AVM1 warning: cannot iterate over undefined object"):uy(n,(function(t){e.push(t)}),null)}function lv(t){var e=t.stack,n=e.pop(),r=e.pop();e.push(r===n)}function cv(t,e){var n=t.stack,r=e?e[1]:n.pop(),i=e?e[0]:n.pop();return n[n.length]=Zm(t.context,r,i)}function hv(t){var e=t.stack,n=t.isSwfVersion5,r=Q_(t.context,e.pop()),i=Q_(t.context,e.pop())>r;e.push(n?i:i?1:0)}function pv(t,e){var n=t.stack,r=t.scopeList.scope,i=e[0],o=e[1],a=yy(t,i,o,e[2],e[3],e[4],e[5]);o?(r.alPut(o,a),oy(t.context,o,r)):n.push(a)}function dv(t){var e=t.stack,n=t.context,r=G_(n,e.pop()),i=G_(n,e.pop()).alGetPrototypeProperty(),o=r.alGetPrototypeProperty();i.alPrototype=o;var a=new mf(65,r);i.alSetOwnProperty("__constructor__",a)}function fv(t){var e=t.stack,n=e.pop(),r=e.pop();e.push(ey(n,r)?n:null)}function gv(t){var e=t.stack,n=e.pop(),r=+e.pop();gy(r,e.length);for(var i=[],o=0;o=1e3)throw new $m("long running script -- AVM1 errors limit is reached");console.error("AVM1 error: "+e),t.recoveringFromError=!0}}return r}function bv(t,e){e.ir||e.compiled||function(t,e){var n,r=t.context,i=new Nm(e,r.swfVersion),o=new Pm;o.registersLimit=t.registers.length,o.parentResults=e.parent&&e.parent.ir;var a=o.analyze(i);e.ir=a,Em.value&&(n=(new Qm).generate(a,e.debugPath),e.compiled=n)}(t,e);var n=t.context,r=t.scopeList.scope.adaptee;r&&r._deferScriptExecution&&(n.deferScriptExecution=!0),r&&(gg.currentMCAssetNameSpace=r.assetNamespace);var i=e.compiled;if(i)return i(t);for(var o=0,a=n.abortExecutionAt,s=e.ir,u=0,l=s.actions[u];l&&!t.isEndOfActions;){if(o++%Hm==0&&Date.now()>=a)throw new $m("long running script -- AVM1 instruction hang timeout");u=vv(t,l.action)?l.conditionalJumpTo:l.next,l=s.actions[u]}return t.stack.pop()}var Cv=function(){function t(){this._indentation=0,this._indentStringCache=[]}return t.prototype._getIndentString=function(){return this._indentStringCache[this._indentation]||(this._indentStringCache[this._indentation]=new Array(this._indentation+1).join(".."))},t.prototype.print=function(t,e){for(var n=t.position,r=t.actionCode,i=t.actionName,o=[],a=0;a0;)r--,n=t.getChildAt(r),this.executeEnterFrame(n,e);t.isAsset(Cu)&&t.hasEventListener(this.enterEvent.type)&&e.push(t)},t.prototype.enterFrame=function(t){var e,n;this._avmStage.view.stage.clear(),bu.execute_queue(),this._avmStage.root.advanceFrame(),bu.execute_queue();var r=[];for(e=0;e0;)n--,e=t.getChildAt(n),this.collectMousEvents(e);t.isAsset(Cu)&&(this._collectedDispatcher[this._collectedDispatcher.length]=t)},t.prototype.onMouseEvent=function(t){if(this.avm1Listener[t.type]){this._collectedDispatcher.length=0;var e,n,r=0,i=this._avmStage.root.numChildren;for(r=0;r=0)return e<<2|i;var o=1+n.length+r.length,a=o<101?Qv:new Uint8Array(o),s=0;a[s++]=e;for(var u=0;u=15&&this.kind<=18},t.prototype.isAnyName=function(){return null===this.name},t.prototype.isAnyNamespace=function(){return!(this.isRuntimeNamespace()||this.namespaces.length>1)&&(0===this.namespaces.length||""===this.namespaces[0].uri)},t.prototype.isQName=function(){var t=this.kind;return 29===t||7===t||13===t||t>=15&&t<=18},Object.defineProperty(t.prototype,"namespace",{get:function(){return this.namespaces[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uri",{get:function(){return this.namespaces[0].uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this.namespaces[0].prefix},set:function(t){var e=this.namespaces[0];e.prefix!==t&&(this.namespaces[0]=Hv(e.type,e.uri,t))},enumerable:!0,configurable:!0}),t.prototype.equalsQName=function(t){return this.name===t.name&&this.namespaces[0].uri===t.namespaces[0].uri},t.prototype.matches=function(t){var e=t.isAnyName();if(e&&!t.isQName())return!0;if(!e&&this.name!==t.name)return!1;var n=this.namespaces[0].uri;if(""==n||"default"==n)return!0;for(var r=t.namespaces.length;r--;)if(""==t.namespaces[r].uri||t.namespaces[r].uri===n)return!0;return!1},t.prototype.isAttribute=function(){switch(this.kind){case 13:case 16:case 18:case 14:case 28:return!0}return!1},t.prototype.getMangledName=function(){return this._mangledName||this._mangleName()},t.prototype._mangleName=function(){var t="$Bg"+Xv(this.name);return this.isRuntime()||(this._mangledName=t),t},t.prototype.getPublicMangledName=function(){return Xh(this.name)?this.name:"$Bg"+Xv(this.name)},t.isPublicQualifiedName=function(t){return 0===t.indexOf("$Bg")},t.getPublicMangledName=function(t){return Xh(t)?t:"$Bg"+t},t.prototype.toFQNString=function(t){var e=this.namespaces[0].uri;return e.length&&(e+=t?"::":"."),e+this.name},t.prototype.toString=function(){var t,e=(t=this.kind,String(t)+" ");(e+=this.isAttribute()?"@":"",this.isRuntimeNamespace())?e+="["+(this.namespaces?this.namespaces.map((function(t){return String(t)})).join(", "):null)+"]::"+this._nameToString():this.isQName()?(e+=this.namespaces[0]+"::",e+=this._nameToString()):this.namespaces?(e+="{"+this.namespaces.map((function(t){return String(t)})).join(", ")+"}",e+="::"+this._nameToString()):(e+="{"+this.namespaces+"}",e+="::"+this._nameToString());return this.parameterType&&(e+="<"+this.parameterType+">"),e},t.prototype.toFlashlogString=function(){var t=this.uri;return t?t+"::"+this.name:this.name},t.stripPublicMangledName=function(t){if(0===t.indexOf("$Bg"))return t.substring(3)},t.FromSimpleName=function(e){var n,r="";"string"!=typeof e&&1===(null===(n=e._children)||void 0===n?void 0:n.length)?e=e._children[0]._value||"":r=e;var i=r.lastIndexOf("::");i>0?r=r.replace("::",":"):i=r.lastIndexOf("."),i<=0&&(i=r.lastIndexOf(" "));var o="",a=r;return i>0&&i".'},XMLOnlyWorksWithOneItemLists:{code:1086,message:"The %1 method only works on lists containing one item."},XMLAssignmentToIndexedXMLNotAllowed:{code:1087,message:"Assignment to indexed XML is not allowed."},XMLMarkupMustBeWellFormed:{code:1088,message:"The markup in the document following the root element must be well-formed."},XMLAssigmentOneItemLists:{code:1089,message:"Assignment to lists with more than one item is not supported."},XMLMalformedElement:{code:1090,message:"XML parser failure: element is malformed."},XMLUnterminatedCData:{code:1091,message:"XML parser failure: Unterminated CDATA section."},XMLUnterminatedXMLDecl:{code:1092,message:"XML parser failure: Unterminated XML declaration."},XMLUnterminatedDocTypeDecl:{code:1093,message:"XML parser failure: Unterminated DOCTYPE declaration."},XMLUnterminatedComment:{code:1094,message:"XML parser failure: Unterminated comment."},XMLUnterminatedElement:{code:1096,message:"XML parser failure: Unterminated element."},XMLNamespaceWithPrefixAndNoURI:{code:1098,message:"Illegal prefix %1 for no namespace."},RegExpFlagsArgumentError:{code:1100,message:"Cannot supply flags when constructing one RegExp from another."},InvalidBaseClassError:{code:1108,message:"The OP_newclass opcode was used with the incorrect base class."},XMLInvalidName:{code:1117,message:"Invalid XML name: %1."},XMLIllegalCyclicalLoop:{code:1118,message:"Illegal cyclical loop between nodes."},FilterError:{code:1123,message:"Filter operator not supported on type %1."},OutOfRangeError:{code:1125,message:"The index %1 is out of range %2."},VectorFixedError:{code:1126,message:"Cannot change the length of a fixed Vector."},TypeAppOfNonParamType:{code:1127,message:"Type application attempted on a non-parameterized type."},WrongTypeArgCountError:{code:1128,message:"Incorrect number of type parameters for %1. Expected %2, got %3."},JSONCyclicStructure:{code:1129,message:"Cyclic structure cannot be converted to JSON string."},JSONInvalidReplacer:{code:1131,message:"Replacer argument to JSON stringifier must be an array or a two parameter function."},JSONInvalidParseInput:{code:1132,message:"Invalid JSON parse input."},InvalidRangeError:{code:1506,message:"The specified range is invalid."},NullArgumentError:{code:1507,message:"Argument %1 cannot be null."},InvalidArgumentError:{code:1508,message:"The value specified for argument %1 is invalid."},ArrayFilterNonNullObjectError:{code:1510,message:"When the callback argument is a method of a class, the optional this argument must be null."},InvalidParamError:{code:2004,message:"One of the parameters is invalid."},ParamRangeError:{code:2006,message:"The supplied index is out of bounds."},NullPointerError:{code:2007,message:"Parameter %1 must be non-null."},InvalidEnumError:{code:2008,message:"Parameter %1 must be one of the accepted values."},CantInstantiateError:{code:2012,message:"%1 class cannot be instantiated."},InvalidBitmapData:{code:2015,message:"Invalid BitmapData."},EOFError:{code:2030,message:"End of file was encountered.",fqn:"flash.errors.EOFError"},CompressedDataError:{code:2058,message:"There was an error decompressing the data.",fqn:"flash.errors.IOError"},EmptyStringError:{code:2085,message:"Parameter %1 must be non-empty string."},ProxyGetPropertyError:{code:2088,message:"The Proxy class does not implement getProperty. It must be overridden by a subclass."},ProxySetPropertyError:{code:2089,message:"The Proxy class does not implement setProperty. It must be overridden by a subclass."},ProxyCallPropertyError:{code:2090,message:"The Proxy class does not implement callProperty. It must be overridden by a subclass."},ProxyHasPropertyError:{code:2091,message:"The Proxy class does not implement hasProperty. It must be overridden by a subclass."},ProxyDeletePropertyError:{code:2092,message:"The Proxy class does not implement deleteProperty. It must be overridden by a subclass."},ProxyGetDescendantsError:{code:2093,message:"The Proxy class does not implement getDescendants. It must be overridden by a subclass."},ProxyNextNameIndexError:{code:2105,message:"The Proxy class does not implement nextNameIndex. It must be overridden by a subclass."},ProxyNextNameError:{code:2106,message:"The Proxy class does not implement nextName. It must be overridden by a subclass."},ProxyNextValueError:{code:2107,message:"The Proxy class does not implement nextValue. It must be overridden by a subclass."},TooFewArgumentsError:{code:2001,message:"Too few arguments were specified; got %1, %2 expected."},ParamTypeError:{code:2005,message:"Parameter %1 is of the incorrect type. Should be type %2."},SocketConnectError:{code:2011,message:"Socket connection failed to %1:%2."},CantAddSelfError:{code:2024,message:"An object cannot be added as a child of itself."},NotAChildError:{code:2025,message:"The supplied DisplayObject must be a child of the caller."},UnhandledError:{code:2044,message:"Unhandled %1:."},AllowDomainArgumentError:{code:2052,message:"Only String arguments are permitted for allowDomain and allowInsecureDomain."},DelayRangeError:{code:2066,message:"The Timer delay specified is out of range."},ExternalInterfaceNotAvailableError:{code:2067,message:"The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime."},InvalidLoaderMethodError:{code:2069,message:"The Loader class does not implement this method."},InvalidStageMethodError:{code:2071,message:"The Stage class does not implement this property or method."},TimelineObjectNameSealedError:{code:2078,message:"The name property of a Timeline-placed object cannot be modified."},AlreadyConnectedError:{code:2082,message:"Connect failed because the object is already connected."},CloseNotConnectedError:{code:2083,message:"Close failed because the object is not connected."},ArgumentSizeError:{code:2084,message:"The AMF encoding of the arguments cannot exceed 40K."},AsyncError:{code:2095,message:"%1 was unable to invoke callback %2."},LoadingObjectNotSWFError:{code:2098,message:"The loading object is not a .swf file, you cannot request SWF properties from it."},LoadingObjectNotInitializedError:{code:2099,message:"The loading object is not sufficiently loaded to provide this information."},DecodeParamError:{code:2101,message:"The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs."},SceneNotFoundError:{code:2108,message:"Scene %1 was not found."},FrameLabelNotFoundError:{code:2109,message:"Frame label %1 not found in scene %2."},InvalidLoaderInfoMethodError:{code:2118,message:"The LoaderInfo class does not implement this method."},SecuritySwfNotAllowedError:{code:2121,message:"Security sandbox violation: %1: %2 cannot access %3. This may be worked around by calling Security.allowDomain."},UnknownFileTypeError:{code:2124,message:"Loaded file is an unknown type."},DefinitionNotFoundError:{code:2131,message:"Definition %1 cannot be found."},CantAddParentError:{code:2150,message:"An object cannot be added as a child to one of it's children (or children's children, etc.)."},Matrix3DRefCannontBeShared:{code:2189,message:"A Matrix3D can not be assigned to more than one DisplayObject."},ObjectWithStringsParamError:{code:2196,message:"Parameter %1 must be an Object with only String values."},AllowCodeImportError:{code:3226,message:"Cannot import a SWF file when LoaderContext.allowCodeImport is false."},PermissionDenied:{code:3315,message:"The current security context does not allow this operation."},InternalErrorIV:{code:3343,message:"Internal Error."}};for(var _b in gb){var mb=gb[_b];mb.typeName=_b,gb[mb.code]=mb}function yb(t){var e="Error #"+t,n=gb[t];return e+": "+(n&&n.message||"(unknown)")}function Ab(t){return gb[t]}function vb(t){for(var e=[],n=1;ne?1:0:i(t,e))*r}function Bb(t,e,n,r){var i,o=0;for(i=0;iu?1:0:String(s).localeCompare(String(u))}return 2&r[i-1]&&(o*=-1),o}var Ob,Mb=function(t){function e(){var e=t.call(this)||this;return e.value=Db(e.sec,arguments),e}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=e.prototype;uf(this,"$BgCASEINSENSITIVE",1),uf(this,"$BgDESCENDING",2),uf(this,"$BgUNIQUESORT",4),uf(this,"$BgRETURNINDEXEDARRAY",8),uf(this,"$BgNUMERIC",16),qv(t,"$Bgpush",n.generic_push),qv(t,"$Bgpop",n.generic_pop),qv(t,"$Bgshift",n.generic_shift),qv(t,"$Bgunshift",n.generic_unshift),qv(t,"$Bgreverse",n.generic_reverse),qv(t,"$Bgconcat",n.generic_concat),qv(t,"$Bgslice",n.generic_slice),qv(t,"$Bgsplice",n.generic_splice),qv(t,"$Bgjoin",n.generic_join),qv(t,"$BgtoString",n.generic_toString),qv(t,"$BgindexOf",n.generic_indexOf),qv(t,"$BglastIndexOf",n.generic_lastIndexOf),qv(t,"$Bgevery",n.generic_every),qv(t,"$Bgsome",n.generic_some),qv(t,"$BgforEach",n.generic_forEach),qv(t,"$Bgmap",n.generic_map),qv(t,"$Bgfilter",n.generic_filter),qv(t,"$Bgsort",n.generic_sort),qv(t,"$BgsortOn",n.generic_sortOn),qv(t,"$BghasOwnProperty",n.native_hasOwnProperty),qv(t,"$BgpropertyIsEnumerable",n.native_propertyIsEnumerable),qv(t,"$BgtoLocaleString",n.generic_toString)},e.prototype.native_hasOwnProperty=function(t){return this.axHasOwnProperty(sb(t))},e.prototype.native_propertyIsEnumerable=function(e){if("number"==typeof e||Xh(e=lb(e))){var n=Object.getOwnPropertyDescriptor(this.value,e);return!!n&&n.enumerable}t.prototype.native_propertyIsEnumerable.call(this,e)},e.axApply=function(t,e){return this.sec.createArrayUnsafe(Db(this.sec,e))},e.axConstruct=function(t){return this.sec.createArrayUnsafe(Db(this.sec,t))},e.prototype.push=function(){if(this.value.length+arguments.length>4294967295){for(var t=4294967295-this.value.length,e=0;e>>0,e=0;e>>0;if(t){var e=this.axGetNumericProperty(t-1);return cb.name=t-1,cb.namespaces=[Gv.PUBLIC],this.axDeleteProperty(cb),this.axSetPublicProperty("length",t-1),e}this.axSetPublicProperty("length",0)},e.prototype.shift=function(){return this.value.shift()},e.prototype.generic_shift=function(){return Sb(this).shift()},e.prototype.unshift=function(){return this.value.unshift.apply(this.value,arguments)},e.prototype.generic_unshift=function(){var t=Sb(this);return t.value.unshift.apply(t.value,arguments)},e.prototype.reverse=function(){return this.value.reverse(),this},e.prototype.generic_reverse=function(){return Sb(this).reverse()},e.prototype.concat=function(){for(var t=this.value.slice(),e=0;e1?e:2147483647)},e.prototype.generic_lastIndexOf=function(t,e){return Sb(this).lastIndexOf(t,arguments.length>1?e:2147483647)},e.prototype.every=function(t,e){if(!t||!t.value||"function"!=typeof t.value)return!0;e=wb(this.sec,e,t);for(var n=this.value,r=0;r>>0},enumerable:!0,configurable:!0}),e.prototype.axGetEnumerableKeys=function(){return Object.keys(this.value).concat(t.prototype.axGetEnumerableKeys.call(this))},e.prototype.axHasPropertyInternal=function(t){var e=t.name;return"number"==typeof e||Xh(e=lb(e))?e in this.value:!!this.traits.getTrait(t.namespaces,e)||"$Bg"+e in this},e.prototype.axHasOwnProperty=function(t){var e=t.name;return"number"==typeof e||Xh(e=lb(e))?this.value.hasOwnProperty(e):!!this.traits.getTrait(t.namespaces,e)||this.hasOwnProperty("$Bg"+e)},e.prototype.axGetProperty=function(e){var n,r=e.name;return"number"==typeof r||Xh(r=lb(r))?null!=(n=this.value[r])?n:this[r]:t.prototype.axGetProperty.call(this,e)},e.prototype.axSetProperty=function(e,n,r){var i=e.name;"number"==typeof i||Xh(i=lb(i))?this.value[i]=n:t.prototype.axSetProperty.call(this,e,n,r)},e.prototype.axDeleteProperty=function(t){var e=t.name;return"number"==typeof e||Xh(e=lb(e))?delete this.value[e]:!this.traits.getTrait(t.namespaces,e)&&delete this["$Bg"+e]},e.prototype.axGetPublicProperty=function(t){return"number"==typeof t||Xh(t=lb(t))?this.value[t]:this["$Bg"+t]},e.prototype.axSetPublicProperty=function(t,e){"number"==typeof t||Xh(t=lb(t))?this.value[t]=e:this["$Bg"+t]=e},e}(Ib),Lb=function(t){function e(e,n){var r=t.call(this)||this;return arguments.length<1&&(e=""),r.$Bgmessage=String(e),r._errorID=0|n,r}return n(e,t),e.throwError=function(t,e){for(var n=Ab(e),r=[n],i=2;i36)&&this.sec.throwError("RangeError",gb.InvalidRadixError,t),this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.toString"),this.value.toString(t)},e.prototype.valueOf=function(){return this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.valueOf"),this.value},e.prototype.toExponential=function(t){return((t|=0)<0||t>20)&&this.sec.throwError("RangeError",gb.InvalidPrecisionError),this.axClass!==this.sec.AXNumber?"NaN":this.value.toExponential(t)},e.prototype.toPrecision=function(t){return t?t|=0:t=1,(t<1||t>21)&&this.sec.throwError("RangeError",gb.InvalidPrecisionError),this.axClass!==this.sec.AXNumber?"NaN":this.value.toPrecision(t)},e.prototype.toFixed=function(t){return((t|=0)<0||t>20)&&this.sec.throwError("RangeError",gb.InvalidPrecisionError),this.axClass!==this.sec.AXNumber?"NaN":this.value.toFixed(t)},e._minValue=function(){return Number.MIN_VALUE},e.convertStringToDouble=function(t){var e=t.indexOf(String.fromCharCode(0));return e>=0?+t.substring(0,e):+t},e.classNatives=[Math],e}(Ib),tC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=e.prototype;qv(t,"$BgtoString",n.toString),qv(t,"$BgtoLocaleString",n.toString),qv(t,"$BgvalueOf",n.valueOf),uf(this,"$BgMAX_VALUE",2147483647),uf(this,"$BgMIN_VALUE",-2147483648)},e.prototype.toString=function(t){return 0===arguments.length?t=10:((t|=0)<2||t>36)&&this.sec.throwError("RangeError",gb.InvalidRadixError,t),this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.toString"),this.value.toString(t)},e.prototype.valueOf=function(){return this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.valueOf"),this.value},e.staticNatives=[Math],e.instanceNatives=[Zb.prototype],e}(Zb);function eC(t,e){var n=t.createArray(e);return n.axSetPublicProperty("index",e.index),n.axSetPublicProperty("input",e.input),n}var nC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=e.prototype;qv(t,"$BgindexOf",n.generic_indexOf),qv(t,"$BglastIndexOf",n.generic_lastIndexOf),qv(t,"$BgcharAt",n.generic_charAt),qv(t,"$BgcharCodeAt",n.generic_charCodeAt),qv(t,"$Bgconcat",n.generic_concat),qv(t,"$BglocaleCompare",n.generic_localeCompare),qv(t,"$Bgmatch",n.generic_match),qv(t,"$Bgreplace",n.generic_replace),qv(t,"$Bgsearch",n.generic_search),qv(t,"$Bgslice",n.generic_slice),qv(t,"$Bgsplit",n.generic_split),qv(t,"$Bgsubstring",n.generic_substring),qv(t,"$Bgsubstr",n.generic_substr),qv(t,"$BgtoLowerCase",n.generic_toLowerCase),qv(t,"$BgtoLocaleLowerCase",n.generic_toLowerCase),qv(t,"$BgtoUpperCase",n.generic_toUpperCase),qv(t,"$BgtoLocaleUpperCase",n.generic_toUpperCase),qv(t,"$BgtoString",n.toString),qv(t,"$BgtoString",n.public_toString),qv(t,"$BgvalueOf",n.public_valueOf),qv(this,"$BgfromCharCode",e.fromCharCode)},e.fromCharCode=function(){for(var t=[],e=0;e1&&this.sec.throwError("ArgumentError",gb.WrongArgumentCountError,"Function/()",0,2);var e=this.value;if((t=String(t))===e)return 0;for(var n=Math.min(e.length,t.length),r=0;rt.length?1:-1},e.prototype.__getRegExp=function(t){return this.sec.AXRegExp.axIsType(t)?t:this.sec.AXRegExp.axConstruct([Xv(t)])},e.prototype.match=function(t){var e=this.__getRegExp(t).internalStringMatch(this.value);if(!e)return null;try{return eC(this.sec,e)}catch(t){return null}},e.prototype.replace=function(t,e){this.sec.AXFunction.axIsType(e)&&(e=e.value);try{return this.sec.AXRegExp.axIsType(t)?this.__getRegExp(t).internalStringReplace(this.value,e):(t=Xv(t),this.value.replace(t,e))}catch(t){return this.value}},e.prototype.search=function(t){try{return this.sec.AXRegExp.axIsType(t)?this.__getRegExp(t).internalStringSearch(this.value):this.value.search(Xv(t))}catch(t){return-1}},e.prototype.slice=function(t,e){return t=arguments.length<1?0:0|t,e=arguments.length<2?4294967295:0|e,this.value.slice(t,e)},e.prototype.split=function(t,e){t=this.sec.AXRegExp.axIsType(t)?t.value:Xv(t),e=void 0===e?-1:0|e;try{return this.sec.createArray(this.value.split(t,e))}catch(t){return this.sec.createArrayUnsafe([this.value])}},e.prototype.substring=function(t,e){return this.value.substring(t,e)},e.prototype.substr=function(t,e){return-1==e&&(e=this.value.length-t-1),this.value.substr(t,e)},e.prototype.toLocaleLowerCase=function(){return this.value.toLowerCase()},e.prototype.toLowerCase=function(){return this.value.toLowerCase()},e.prototype.toLocaleUpperCase=function(){return this.value.toUpperCase()},e.prototype.toUpperCase=function(){return this.value.toUpperCase()},e.prototype.generic_indexOf=function(t,e){var n=null==this?"":this;return String.prototype.indexOf.call(n,t,e)},e.prototype.generic_lastIndexOf=function(t,e){var n=null==this?"":this;return String.prototype.lastIndexOf.call(n,t,e)},e.prototype.generic_charAt=function(t){var e=null==this?"":this;return String.prototype.charAt.call(e,t)},e.prototype.generic_charCodeAt=function(t){var e=null==this?"":this;return String.prototype.charCodeAt.call(e,t)},e.prototype.generic_concat=function(){var t=null==this?"":this;return String.prototype.concat.apply(t,arguments)},e.prototype.generic_localeCompare=function(t){var e=this.sec.AXString.axBox(String(this));return e.localeCompare.apply(e,arguments)},e.prototype.generic_match=function(t){return this.sec.AXString.axBox(String(this)).match(t)},e.prototype.generic_replace=function(t,e){return this.sec.AXString.axBox(String(this)).replace(t,e)},e.prototype.generic_search=function(t){return this.sec.AXString.axBox(String(this)).search(t)},e.prototype.generic_slice=function(t,e){var n=null==this?"":this;return String.prototype.slice.call(n,t,e)},e.prototype.generic_split=function(t,e){return e=arguments.length<2?4294967295:0|e,this.sec.AXString.axBox(String(this)).split(t,e)},e.prototype.generic_substring=function(t,e){var n=null==this?"":this;return String.prototype.substring.call(n,t,e)},e.prototype.generic_substr=function(t,e){var n=null==this?"":this;return String.prototype.substr.call(n,t,e)},e.prototype.generic_toLowerCase=function(){var t=null==this?"":this;String.prototype.toLowerCase.call(t)},e.prototype.generic_toUpperCase=function(){var t=null==this?"":this;return String.prototype.toUpperCase.call(t)},e.prototype.toString=function(){return this.value.toString()},e.prototype.public_toString=function(){return this===this.sec.AXString.dPrototype?"":(this.axClass!==this.sec.AXString&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"String.prototype.toString"),this.value.toString())},e.prototype.valueOf=function(){return this.value.valueOf()},e.prototype.public_valueOf=function(){return this===this.sec.AXString.dPrototype?"":(this.axClass!==this.sec.AXString&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"String.prototype.valueOf"),this.value.valueOf())},Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length},enumerable:!0,configurable:!0}),e.classNatives=[String],e}(Ib),rC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=e.prototype;qv(t,"$BgtoString",n.toString),qv(t,"$BgtoLocaleString",n.toString),qv(t,"$BgvalueOf",n.valueOf),uf(this,"$BgMAX_VALUE",4294967295),uf(this,"$BgMIN_VALUE",0)},e.prototype.toString=function(t){return 0===arguments.length?t=10:((t|=0)<2||t>36)&&this.sec.throwError("RangeError",gb.InvalidRadixError,t),this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.toString"),this.value.toString(t)},e.prototype.valueOf=function(){return this.axClass!==this.sec.AXNumber&&this.sec.throwError("TypeError",gb.InvokeOnIncompatibleObjectError,"Number.prototype.valueOf"),this.value},e.staticNatives=[Math],e.instanceNatives=[Zb.prototype],e}(Zb),iC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=e.prototype;qv(t,"$BgtoString",n.toString),qv(t,"$BgvalueOf",n.valueOf)},e.prototype.toString=function(){return this.value.toString()},e.prototype.valueOf=function(){return this.value.valueOf()},e}(Ib);function oC(t){return t&&"function"==typeof t.axApply}function aC(t){return+t}var sC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.axGetProperty=function(e){var n=e.name;return(0|(n="number"==typeof n?n:lb(n)))===n||Xh(n)?this.axGetNumericProperty("number"==typeof n?n:0|n):t.prototype.axGetProperty.call(this,e)},e.prototype.axSetProperty=function(e,n,r){var i=e.name;(0|(i="number"==typeof i?i:lb(i)))===i||Xh(i)?this.axSetNumericProperty("number"==typeof i?i:0|i,n):t.prototype.axSetProperty.call(this,e,n,r)},e.prototype.axGetPublicProperty=function(t){return(0|(t="number"==typeof t?t:lb(t)))===t||Xh(t)?this.axGetNumericProperty("number"==typeof t?t:0|t):this["$Bg"+t]},e.prototype.axSetPublicProperty=function(t,e){(0|(t="number"==typeof t?t:lb(t)))===t||Xh(t)?this.axSetNumericProperty("number"==typeof t?t:0|t,e):this["$Bg"+t]=e},e.prototype.axNextName=function(t){return t-1},e.prototype.checkVectorMethodArgs=function(t,e){if(qh(t))return!1;var n=this.sec;return oC(t)||n.throwError("TypeError",gb.CheckTypeFailedError,t,"Function"),t.axClass!==n.AXMethodClosure||qh(e)||n.throwError("TypeError",gb.ArrayFilterNonNullObjectError),!0},e}(Ib),uC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.axIsType=function(t){return this.dPrototype.isPrototypeOf(t)||this.sec.Int32Vector.axClass.dPrototype.isPrototypeOf(t)||this.sec.Uint32Vector.axClass.dPrototype.isPrototypeOf(t)||this.sec.Float64Vector.axClass.dPrototype.isPrototypeOf(t)||this.sec.ObjectVector.axClass.dPrototype.isPrototypeOf(t)},e}(Ib),lC=function(t){function e(e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=t.call(this)||this;return e>>>=0,n=!!n,r._fixed=!!n,r._buffer=new Array(e),r._fill(0,e,r.axClass.defaultValue),r}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=this.tPrototype;n.axGetProperty=t.axGetProperty,n.axGetNumericProperty=t.axGetNumericProperty,n.axSetProperty=t.axSetProperty,n.axSetNumericProperty=t.axSetNumericProperty,n.axHasPropertyInternal=t.axHasPropertyInternal,n.axNextName=t.axNextName,n.axNextNameIndex=t.axNextNameIndex,n.axNextValue=t.axNextValue,t.axGetProperty=Ib.prototype.axGetProperty,t.axGetNumericProperty=Ib.prototype.axGetNumericProperty,t.axSetProperty=Ib.prototype.axSetProperty,t.axSetNumericProperty=Ib.prototype.axSetNumericProperty,t.axHasPropertyInternal=Ib.prototype.axHasPropertyInternal,t.axNextName=Ib.prototype.axNextName,t.axNextNameIndex=Ib.prototype.axNextNameIndex,t.axNextValue=Ib.prototype.axNextValue;var r=e.prototype;uf(t,"$Bgjoin",r.join),uf(t,"$BgtoString",r.join),uf(t,"$BgtoLocaleString",r.toLocaleString),uf(t,"$Bgpop",r.pop),uf(t,"$Bgpush",r.push),uf(t,"$Bgreverse",r.reverse),uf(t,"$Bgconcat",r.concat),uf(t,"$Bgsplice",r.splice),uf(t,"$Bgslice",r.slice),uf(t,"$Bgshift",r.shift),uf(t,"$Bgunshift",r.unshift),uf(t,"$BgindexOf",r.indexOf),uf(t,"$BglastIndexOf",r.lastIndexOf),uf(t,"$BgforEach",r.forEach),uf(t,"$Bgmap",r.map),uf(t,"$Bgfilter",r.filter),uf(t,"$Bgsome",r.some),uf(t,"$Bgevery",r.every),uf(t,"$Bgsort",r.sort),uf(t,"checkVectorMethodArgs",r.checkVectorMethodArgs)},e.axApply=function(t,e){var n=e[0];if(this.axIsType(n))return n;var r=n.axGetPublicProperty("length");if(void 0!==r){for(var i=this.axConstruct([r,!1]),o=0;on?1:0:i(t,n),r&e.DESCENDING&&(o*=-1),o},e.prototype._fill=function(t,e,n){for(var r=0;r0&&(r+=e[n-1]),r},e.prototype.indexOf=function(t,e){return void 0===e&&(e=0),this._buffer.indexOf(t,e)},e.prototype.lastIndexOf=function(t,e){return void 0===e&&(e=2147483647),this._buffer.lastIndexOf(t,e)},e.prototype.push=function(t,e,n,r,i,o,a,s){this._checkFixed();for(var u=0;u>>=0)>this._buffer.length)for(var e=this._buffer.length;e=this._buffer.length||e!=t)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,this._buffer.length),this._buffer[e]},e.prototype.axSetNumericProperty=function(t,e){var n=this._buffer.length,r=0|t;(r<0||r>n||r!=t||r===n&&this._fixed)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,n),this._buffer[r]=this._coerce(e)},e.prototype.axHasPropertyInternal=function(t){if((0|t.name)===t.name)return t.name>=0&&t.name>>0;return n>=0&&n>>=0,i._fixed=!!r,i._buffer=new Int32Array(Math.max(e.INITIAL_CAPACITY,n+e.EXTRA_CAPACITY)),i._offset=0,i._length=n,i}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=this.tPrototype;n.axGetProperty=t.axGetProperty,n.axGetNumericProperty=t.axGetNumericProperty,n.axSetProperty=t.axSetProperty,n.axSetNumericProperty=t.axSetNumericProperty,n.axHasPropertyInternal=t.axHasPropertyInternal,n.axNextName=t.axNextName,n.axNextNameIndex=t.axNextNameIndex,n.axNextValue=t.axNextValue,t.axGetProperty=Ib.prototype.axGetProperty,t.axGetNumericProperty=Ib.prototype.axGetNumericProperty,t.axSetProperty=Ib.prototype.axSetProperty,t.axSetNumericProperty=Ib.prototype.axSetNumericProperty,t.axHasPropertyInternal=Ib.prototype.axHasPropertyInternal,t.axNextName=Ib.prototype.axNextName,t.axNextNameIndex=Ib.prototype.axNextNameIndex,t.axNextValue=Ib.prototype.axNextValue;var r=e.prototype;uf(t,"$Bgjoin",r.join),uf(t,"$BgtoString",r.join),uf(t,"$BgtoLocaleString",r.toLocaleString),uf(t,"$Bgpop",r.pop),uf(t,"$Bgpush",r.push),uf(t,"$Bgreverse",r.reverse),uf(t,"$Bgconcat",r.concat),uf(t,"$Bgsplice",r.splice),uf(t,"$Bgslice",r.slice),uf(t,"$Bgshift",r.shift),uf(t,"$Bgunshift",r.unshift),uf(t,"$BgindexOf",r.indexOf),uf(t,"$BglastIndexOf",r.lastIndexOf),uf(t,"$BgforEach",r.forEach),uf(t,"$Bgmap",r.map),uf(t,"$Bgfilter",r.filter),uf(t,"$Bgsome",r.some),uf(t,"$Bgevery",r.every),uf(t,"$Bgsort",r.sort),uf(t,"checkVectorMethodArgs",r.checkVectorMethodArgs)},e.axApply=function(t,e){var n=e[0];if(this.axIsType(n))return n;var r=n.axGetPublicProperty("length");if(void 0!==r){for(var i=this.axConstruct([r,!1]),o=0;o>2;return this._buffer.set(this._view(),n),void(this._offset=n)}var r=1+(3*this._buffer.length>>1);r0&&(i+=n[r+e-1]),i},e.prototype.indexOf=function(t,e){void 0===e&&(e=0);var n=this._length,r=0|e;if(r<0)(r+=n)<0&&(r=0);else if(r>=n)return-1;for(var i=this._buffer,o=(n=this._length,this._offset),a=o+n,s=r+=o;s=n&&(r=n);for(var i=this._buffer,o=this._offset,a=o,s=r+=o;s-- >a;)if(i[s]===t)return s-o;return-1},e.prototype.push=function(t,e,n,r,i,o,a,s){this._checkFixed(),this._ensureCapacity(this._length+arguments.length);for(var u=0;u0&&(n=r.subarray(a,a+s),l._buffer.set(n,l._offset)),this._ensureCapacity(i-s+u);var c=a+s,h=r.subarray(c,i);r.set(h,a+u),this._length+=u-s;for(var p=0;p>>=0)>this._length){this._ensureCapacity(t);for(var n=this._offset+this._length,r=this._offset+t;n=e||n!=t)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,e),this._buffer[this._offset+n]},e.prototype.axSetNumericProperty=function(t,e){var n=this._length,r=0|t;(r<0||r>n||r!=t||r===n&&this._fixed)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,n),r===this._length&&(this._ensureCapacity(this._length+1),this._length++),this._buffer[this._offset+r]=e},e.prototype.axHasPropertyInternal=function(t){if((0|t.name)===t.name)return t.name>=0&&t.name>>0;return n>=0&&n>>=0,i._fixed=!!r,i._buffer=new Uint32Array(Math.max(e.INITIAL_CAPACITY,n+e.EXTRA_CAPACITY)),i._offset=0,i._length=n,i}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=this.tPrototype;n.axGetProperty=t.axGetProperty,n.axGetNumericProperty=t.axGetNumericProperty,n.axSetProperty=t.axSetProperty,n.axSetNumericProperty=t.axSetNumericProperty,n.axHasPropertyInternal=t.axHasPropertyInternal,n.axNextName=t.axNextName,n.axNextNameIndex=t.axNextNameIndex,n.axNextValue=t.axNextValue,t.axGetProperty=Ib.prototype.axGetProperty,t.axGetNumericProperty=Ib.prototype.axGetNumericProperty,t.axSetProperty=Ib.prototype.axSetProperty,t.axSetNumericProperty=Ib.prototype.axSetNumericProperty,t.axHasPropertyInternal=Ib.prototype.axHasPropertyInternal,t.axNextName=Ib.prototype.axNextName,t.axNextNameIndex=Ib.prototype.axNextNameIndex,t.axNextValue=Ib.prototype.axNextValue;var r=e.prototype;uf(t,"$Bgjoin",r.join),uf(t,"$BgtoString",r.join),uf(t,"$BgtoLocaleString",r.toLocaleString),uf(t,"$Bgpop",r.pop),uf(t,"$Bgpush",r.push),uf(t,"$Bgreverse",r.reverse),uf(t,"$Bgconcat",r.concat),uf(t,"$Bgsplice",r.splice),uf(t,"$Bgslice",r.slice),uf(t,"$Bgshift",r.shift),uf(t,"$Bgunshift",r.unshift),uf(t,"$BgindexOf",r.indexOf),uf(t,"$BglastIndexOf",r.lastIndexOf),uf(t,"$BgforEach",r.forEach),uf(t,"$Bgmap",r.map),uf(t,"$Bgfilter",r.filter),uf(t,"$Bgsome",r.some),uf(t,"$Bgevery",r.every),uf(t,"$Bgsort",r.sort),uf(t,"checkVectorMethodArgs",r.checkVectorMethodArgs)},e.axApply=function(t,e){var n=e[0];if(this.axIsType(n))return n;var r=n.axGetPublicProperty("length");if(void 0!==r){for(var i=this.axConstruct([r,!1]),o=0;o>2;return this._buffer.set(this._view(),n),void(this._offset=n)}var r=1+(3*this._buffer.length>>1);r0&&(i+=n[r+e-1]),i},e.prototype.indexOf=function(t,e){void 0===e&&(e=0);var n=this._length,r=0|e;if(r<0)(r+=n)<0&&(r=0);else if(r>=n)return-1;for(var i=this._buffer,o=(n=this._length,this._offset),a=o+n,s=r+=o;s=n&&(r=n);for(var i=this._buffer,o=this._offset,a=o,s=r+=o;s-- >a;)if(i[s]===t)return s-o;return-1},e.prototype.push=function(t,e,n,r,i,o,a,s){this._checkFixed(),this._ensureCapacity(this._length+arguments.length);for(var u=0;u0&&(n=r.subarray(a,a+s),l._buffer.set(n,l._offset)),this._ensureCapacity(i-s+u);var c=a+s,h=r.subarray(c,i);r.set(h,a+u),this._length+=u-s;for(var p=0;p>>=0)>this._length){this._ensureCapacity(t);for(var n=this._offset+this._length,r=this._offset+t;n=e||n!=t)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,e),this._buffer[this._offset+n]},e.prototype.axSetNumericProperty=function(t,e){var n=this._length,r=0|t;(r<0||r>n||r!=t||r===n&&this._fixed)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,n),r===this._length&&(this._ensureCapacity(this._length+1),this._length++),this._buffer[this._offset+r]=e},e.prototype.axHasPropertyInternal=function(t){if((0|t.name)===t.name)return t.name>=0&&t.name>>0;return n>=0&&n>>=0,i._fixed=!!r,i._buffer=new Float64Array(Math.max(e.INITIAL_CAPACITY,n+e.EXTRA_CAPACITY)),i._offset=0,i._length=n,i}return n(e,t),e.classInitializer=function(){var t=this.dPrototype,n=this.tPrototype;n.axGetProperty=t.axGetProperty,n.axGetNumericProperty=t.axGetNumericProperty,n.axSetProperty=t.axSetProperty,n.axSetNumericProperty=t.axSetNumericProperty,n.axHasPropertyInternal=t.axHasPropertyInternal,n.axNextName=t.axNextName,n.axNextNameIndex=t.axNextNameIndex,n.axNextValue=t.axNextValue,t.axGetProperty=Ib.prototype.axGetProperty,t.axGetNumericProperty=Ib.prototype.axGetNumericProperty,t.axSetProperty=Ib.prototype.axSetProperty,t.axSetNumericProperty=Ib.prototype.axSetNumericProperty,t.axHasPropertyInternal=Ib.prototype.axHasPropertyInternal,t.axNextName=Ib.prototype.axNextName,t.axNextNameIndex=Ib.prototype.axNextNameIndex,t.axNextValue=Ib.prototype.axNextValue;var r=e.prototype;uf(t,"$Bgjoin",r.join),uf(t,"$BgtoString",r.join),uf(t,"$BgtoLocaleString",r.toLocaleString),uf(t,"$Bgpop",r.pop),uf(t,"$Bgpush",r.push),uf(t,"$Bgreverse",r.reverse),uf(t,"$Bgconcat",r.concat),uf(t,"$Bgsplice",r.splice),uf(t,"$Bgslice",r.slice),uf(t,"$Bgshift",r.shift),uf(t,"$Bgunshift",r.unshift),uf(t,"$BgindexOf",r.indexOf),uf(t,"$BglastIndexOf",r.lastIndexOf),uf(t,"$BgforEach",r.forEach),uf(t,"$Bgmap",r.map),uf(t,"$Bgfilter",r.filter),uf(t,"$Bgsome",r.some),uf(t,"$Bgevery",r.every),uf(t,"$Bgsort",r.sort),uf(t,"checkVectorMethodArgs",r.checkVectorMethodArgs)},e.axApply=function(t,e){var n=e[0];if(this.axIsType(n))return n;var r=n.axGetPublicProperty("length");if(void 0!==r){for(var i=this.axConstruct([r,!1]),o=0;o>2;return this._buffer.set(this._view(),n),void(this._offset=n)}var r=1+(3*this._buffer.length>>1);r0&&(i+=n[r+e-1]),i},e.prototype.indexOf=function(t,e){void 0===e&&(e=0);var n=this._length,r=0|e;if(r<0)(r+=n)<0&&(r=0);else if(r>=n)return-1;for(var i=this._buffer,o=(n=this._length,this._offset),a=o+n,s=r+=o;s=n&&(r=n);for(var i=this._buffer,o=this._offset,a=o,s=r+=o;s-- >a;)if(i[s]===t)return s-o;return-1},e.prototype.push=function(t,e,n,r,i,o,a,s){this._checkFixed(),this._ensureCapacity(this._length+arguments.length);for(var u=0;u0&&(n=r.subarray(a,a+s),l._buffer.set(n,l._offset)),this._ensureCapacity(i-s+u);var c=a+s,h=r.subarray(c,i);r.set(h,a+u),this._length+=u-s;for(var p=0;p>>=0)>this._length){this._ensureCapacity(t);for(var n=this._offset+this._length,r=this._offset+t;n=e||n!=t)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,e),this._buffer[this._offset+n]},e.prototype.axSetNumericProperty=function(t,e){var n=this._length,r=0|t;(r<0||r>n||r!=t||r===n&&this._fixed)&&this.sec.throwError("RangeError",gb.OutOfRangeError,t,n),r===this._length&&(this._ensureCapacity(this._length+1),this._length++),this._buffer[this._offset+r]=e},e.prototype.axHasPropertyInternal=function(t){if((0|t.name)===t.name)return t.name>=0&&t.name>>0;return n>=0&&n0?HI:zI)(t)},YI=Math.min,qI=function(t){return t>0?YI(XI(t),9007199254740991):0},KI=Math.max,WI=Math.min,JI=function(t,e){var n=XI(t);return n<0?KI(n+e,0):WI(n,e)},$I=function(t){return function(e,n,r){var i,o=DC(e),a=qI(o.length),s=JI(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},ZI={includes:$I(!0),indexOf:$I(!1)},tE=ZI.indexOf,eE=function(t,e){var n,r=DC(t),i=0,o=[];for(n in r)!OC(AI,n)&&OC(r,n)&&o.push(n);for(;e.length>i;)OC(r,n=e[i++])&&(~tE(o,n)||o.push(n));return o},nE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rE=Object.keys||function(t){return eE(t,nE)},iE=yC?Object.defineProperties:function(t,e){KC(t);for(var n,r=rE(e),i=r.length,o=0;i>o;)JC.f(t,n=r[o++],e[n]);return t},oE=function(t){return"function"==typeof t?t:void 0},aE=function(t,e){return arguments.length<2?oE(XC[t])||oE(_C[t]):XC[t]&&XC[t][e]||_C[t]&&_C[t][e]},sE=aE("document","documentElement"),uE=yI("IE_PROTO"),lE=function(){},cE=function(t){return"