cbim-render-sdk
Version:
1 lines • 32.7 kB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),function(e,r,o){n.d(t,"error",(function(){return c})),n.d(t,"assert",(function(){return l})),n.d(t,"Decoder",(function(){return d}));var i,a,s=n(0),u=n.n(s);function c(e){console.error(e),console.trace()}function l(e,t){e||c(t)}!function(){(i=this)||("undefined"!=typeof window?i=window:"undefined"!=typeof self&&(i=self))}();var f=function(t,n,s){var c=void 0!==c?c:{},l=Object.assign({},c),f="object"==("undefined"==typeof window?"undefined":u()(window)),d="function"==typeof importScripts,p="object"==(void 0===e?"undefined":u()(e))&&"object"==u()(e.versions)&&"string"==typeof e.versions.node,m=!f&&!p&&!d;if(c.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var y,h,g,b="";function v(e){return c.locateFile?c.locateFile(e,b):e}if(p){if(void 0===e||!e.release||"node"!==e.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var w=e.versions.node,_=w.split(".").slice(0,3);if((_=1e4*_[0]+100*_[1]+1*_[2].split("-")[0])<101900)throw new Error("This emscripten-generated code requires node v10.19.19.0 (detected v"+w+")");var T=null("fs"),E=null("path");b=d?E.dirname(b)+"/":r+"/",y=function(e,t){return e=re(e)?new URL(e):E.normalize(e),T.readFileSync(e,t?void 0:"utf8")},g=function(e){var t=y(e,!0);return t.buffer||(t=new Uint8Array(t)),R(t.buffer),t},h=function(e,t,n){e=re(e)?new URL(e):E.normalize(e),T.readFile(e,(function(e,r){e?n(e):t(r.buffer)}))},e.argv.length>1&&e.argv[1].replace(/\\/g,"/"),e.argv.slice(2),o.exports=c,e.on("uncaughtException",(function(e){if(!("unwind"===e||e instanceof he||e.context instanceof he))throw e}));var S=e.versions.node.split(".")[0];S<15&&e.on("unhandledRejection",(function(e){throw e})),function(t,n){throw e.exitCode=t,n},c.inspect=function(){return"[Emscripten Module object]"}}else if(m){if(void 0===e||u()(e),"object"==("undefined"==typeof window?"undefined":u()(window))||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(y=function(e){return read(e)}),g=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),R("object"==u()(t)),t)},h=function(e,t,n){setTimeout((function(){return t(g(e))}),0)},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=function(e){}),"undefined"!=typeof scriptArgs?scriptArgs:void 0!==arguments&&arguments,"function"==typeof quit&&function(e,t){throw setTimeout((function(){if(!(t instanceof he)){var n=t;t&&"object"==u()(t)&&t.stack&&(n=[t,t.stack]),M("exiting due to exception: "+n)}quit(e)})),t},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!d)throw new Error("environment detection error");if(d?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=("undefined"==typeof window?"undefined":u()(window))&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");y=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(g=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),h=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)},function(e){return document.title=e}}var A=c.print||console.log.bind(console),M=c.printErr||console.warn.bind(console);Object.assign(c,l),l=null,Oe(),c.arguments&&c.arguments,le("arguments","arguments_"),c.thisProgram&&c.thisProgram,le("thisProgram","thisProgram"),c.quit&&c.quit,le("quit","quit_"),R(void 0===c.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),R(void 0===c.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),R(void 0===c.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),R(void 0===c.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),R(void 0===c.read,"Module.read option was removed (modify read_ in JS)"),R(void 0===c.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),R(void 0===c.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),R(void 0===c.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),R(void 0===c.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),le("read","read_"),le("readAsync","readAsync"),le("readBinary","readBinary"),le("setWindowTitle","setWindowTitle");var L;R(!m,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),c.wasmBinary&&(L=c.wasmBinary),le("wasmBinary","wasmBinary");var F;c.noExitRuntime;le("noExitRuntime","noExitRuntime"),"object"!=("undefined"==typeof WebAssembly?"undefined":u()(WebAssembly))&&Q("no native wasm support detected");var I,O,P=!1;function R(e,t){e||Q("Assertion failed"+(t?": "+t:""))}function C(){var e=F.buffer;c.HEAP8=new Int8Array(e),c.HEAP16=new Int16Array(e),c.HEAP32=new Int32Array(e),c.HEAPU8=I=new Uint8Array(e),c.HEAPU16=new Uint16Array(e),c.HEAPU32=O=new Uint32Array(e),c.HEAPF32=new Float32Array(e),c.HEAPF64=new Float64Array(e)}function U(){var e=Ce();R(0==(3&e)),0==e&&(e+=4),O[e>>2]=34821223,O[e+4>>2]=2310721022,O[0]=1668509029}function D(){if(!P){var e=Ce();0==e&&(e+=4);var t=O[e>>2],n=O[e+4>>2];34821223==t&&2310721022==n||Q("Stack overflow! Stack cookie has been overwritten at "+be(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+be(n)+" "+be(t)),1668509029!==O[0]&&Q("Runtime error: The application has corrupted its heap memory area (address zero)!")}}R(!c.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),R("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),R(!c.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),R(!c.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var x=[],k=[],N=[],B=!1;function G(){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)H(c.preRun.shift());ge(x)}function j(){R(!B),B=!0,D(),ge(k)}function W(){if(D(),c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;)Y(c.postRun.shift());ge(N)}function H(e){x.unshift(e)}function z(e){k.unshift(e)}function Y(e){N.unshift(e)}R(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var V=0,J=null,q=null,K={};function Z(e){V++,c.monitorRunDependencies&&c.monitorRunDependencies(V),e?(R(!K[e]),K[e]=1,null===J&&"undefined"!=typeof setInterval&&(J=setInterval((function(){if(P)return clearInterval(J),void(J=null);var e=!1;for(var t in K)e||(e=!0,M("still waiting on run dependencies:")),M("dependency: "+t);e&&M("(end of list)")}),1e4))):M("warning: run dependency added without ID")}function X(e){if(V--,c.monitorRunDependencies&&c.monitorRunDependencies(V),e?(R(K[e]),delete K[e]):M("warning: run dependency removed without ID"),0==V&&(null!==J&&(clearInterval(J),J=null),q)){var t=q;q=null,t()}}function Q(e){throw c.onAbort&&c.onAbort(e),M(e="Aborted("+e+")"),P=!0,1,new WebAssembly.RuntimeError(e)}var $={error:function(){Q("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){$.error()},createDataFile:function(){$.error()},createPreloadedFile:function(){$.error()},createLazyFile:function(){$.error()},open:function(){$.error()},mkdev:function(){$.error()},registerDevice:function(){$.error()},analyzePath:function(){$.error()},ErrnoError:function(){$.error()}};c.FS_createDataFile=$.createDataFile,c.FS_createPreloadedFile=$.createPreloadedFile;var ee,te="data:application/octet-stream;base64,";function ne(e){return e.startsWith(te)}function re(e){return e.startsWith("file://")}function oe(e,t){return function(){var n=e,r=t;return t||(r=c.asm),R(B,"native function `"+n+"` called before runtime initialization"),r[e]||R(r[e],"exported native function `"+n+"` not found"),r[e].apply(null,arguments)}}function ie(e){try{if(e==ee&&L)return new Uint8Array(L);if(g)return g(e);throw"both async and sync fetching of the wasm failed"}catch(e){Q(e)}}function ae(e){if(!L&&(f||d)){if("function"==typeof fetch&&!re(e))return fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return ie(e)}));if(h)return new Promise((function(t,n){h(e,(function(e){t(new Uint8Array(e))}),n)}))}return Promise.resolve().then((function(){return ie(e)}))}function se(e,t,n){return ae(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(n,(function(e){M("failed to asynchronously prepare wasm: "+e),re(ee)&&M("warning: Loading from a file URI ("+ee+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),Q(e)}))}function ue(e,t,n,r){return e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||re(t)||p||"function"!=typeof fetch?se(t,n,r):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,n).then(r,(function(e){return M("wasm streaming compile failed: "+e),M("falling back to ArrayBuffer instantiation"),se(t,n,r)}))}))}function ce(){var e={env:Pe,wasi_snapshot_preview1:Pe};function t(e,t){var n=e.exports;return c.asm=n,R(F=c.asm.memory,"memory not found in wasm exports"),C(),R(c.asm.__indirect_function_table,"table not found in wasm exports"),z(c.asm.__wasm_call_ctors),X("wasm-instantiate"),n}Z("wasm-instantiate");var n=c;if(c.instantiateWasm)try{return c.instantiateWasm(e,t)}catch(e){return M("Module.instantiateWasm callback failed with error: "+e),!1}return ue(L,ee,e,(function(e){R(c===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,t(e.instance)})),{}}function le(e,t){Object.getOwnPropertyDescriptor(c,e)||Object.defineProperty(c,e,{configurable:!0,get:function(){Q("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function fe(e){Object.getOwnPropertyDescriptor(c,e)&&Q("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function de(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function pe(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){ve("`"+e+"` is not longer defined by emscripten. "+t)}})}function me(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+n+")",de(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ve(t)}}),ye(e)}function ye(e){Object.getOwnPropertyDescriptor(c,e)||Object.defineProperty(c,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";de(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Q(t)}})}function he(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ge(e){for(;e.length>0;)e.shift()(c)}function be(e){return R("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")}function ve(e){ve.shown||(ve.shown={}),ve.shown[e]||(ve.shown[e]=1,p&&(e="warning: "+e),M(e))}function we(){t()}function _e(e,t,r){n(e,t,r)}function Te(e,t,n){I.copyWithin(e,t,t+n)}function Ee(e){var t=F.buffer;try{return console.warn("wasm mem grow",e/1024/1024,t.byteLength/1024/1024),F.grow(e-t.byteLength+65535>>>16),C(),a.initBuffer(),1}catch(n){M("emscripten_realloc_buffer: Attempted to grow heap from "+t.byteLength+" bytes to "+e+" bytes, but got error: "+n)}}function Se(e){var t=I.length;R((e>>>=0)>t);if(e>2147483648)return M("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n,r,o=1;o<=4;o*=2){var i=t*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(2147483648,(n=Math.max(e,i))+((r=65536)-n%r)%r);if(Ee(a))return!0}return M("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1}ne(ee=s)||(ee=v(ee)),pe("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),c._broadwayOnHeadersDecoded=we,c._broadwayOnPictureDecoded=_e;var Ae=[null,[],[]],Me="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Le(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&Me)return Me.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|u:(240!=(248&a)&&ve("Invalid UTF-8 leading byte "+be(a)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|u<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function Fe(e,t){var n=Ae[e];R(n),0===t||10===t?((1===e?A:M)(Le(n,0)),n.length=0):n.push(t)}function Ie(e,t,n,r){for(var o=0,i=0;i<n;i++){var a=O[t>>2],s=O[t+4>>2];t+=8;for(var u=0;u<s;u++)Fe(e,I[a+u]);o+=s}return O[r>>2]=o,0}function Oe(){fe("fetchSettings")}var Pe={broadwayOnHeadersDecoded:we,broadwayOnPictureDecoded:_e,emscripten_memcpy_big:Te,emscripten_resize_heap:Se,fd_write:Ie},Re=(ce(),oe("__wasm_call_ctors"),c._broadwayCreateStream=oe("broadwayCreateStream"),c._broadwayPlayStream=oe("broadwayPlayStream"),c._broadwayInit=oe("broadwayInit"),c._broadwayExit=oe("broadwayExit"),c._broadwayGetMajorVersion=oe("broadwayGetMajorVersion"),c._broadwayGetMinorVersion=oe("broadwayGetMinorVersion"),oe("__errno_location"),c._fflush=oe("fflush"),function(){return(Re=c.asm.emscripten_stack_init).apply(null,arguments)}),Ce=function(){return(Ce=c.asm.emscripten_stack_get_end).apply(null,arguments)},Ue=(oe("stackSave"),oe("stackRestore"),oe("stackAlloc"),c.dynCall_jiji=oe("dynCall_jiji"),["zeroMemory","exitJS","isLeapYear","ydayFromDate","arraySum","addDays","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","initRandomFill","randomFill","traverseStack","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","intArrayToString","AsciiToString","stringToAscii","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","makePromiseCallback","ExceptionInfo","exception_addRef","exception_decRef","setMainLoop","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"]);Ue.forEach(me);var De,xe,ke=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","getHeapMax","emscripten_realloc_buffer","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","UTF16Decoder","SYSCALLS","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","ExitStatus","flush_NO_FILESYSTEM","dlopenMissingError","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","GLFW","allocateUTF8","allocateUTF8OnStack"];function Ne(){Re(),U()}function Be(){function e(){De||(De=!0,c.calledRun=!0,P||(j(),c.onRuntimeInitialized&&c.onRuntimeInitialized(),R(!c._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),W()))}V>0||(Ne(),G(),V>0||(c.setStatus?(c.setStatus("Running..."),setTimeout((function(){setTimeout((function(){c.setStatus("")}),1),e()}),1)):e(),D()))}if(ke.forEach(ye),q=function e(){De||Be(),De||(q=e)},c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();Be(),void 0!==i&&i.Module&&(xe=i.Module),void 0!==c&&(xe=c),xe._broadwayOnHeadersDecoded=t,xe._broadwayOnPictureDecoded=n;var Ge,je=!1,We=function(){je=!0,Ge&&Ge(xe)};return xe.onRuntimeInitialized=function(){We(xe)},function(e){je?e(xe):Ge=e}},d=function(){var e=function(){return(new Date).getTime()};"undefined"!=typeof performance&&performance.now&&(e=function(){return performance.now()});var t=function(t){var n;this.options=t||{},a=this,this.now=e;var o,i,s=function(t,i,a){var s,u=this.pictureBuffers[t];u||(u=this.pictureBuffers[t]=o(t,i*a*3/2));var c=!1;if(this.infoAr.length&&(c=!0,s=this.infoAr),this.infoAr=[],this.options.rgb){(n=r(i,a)).inp.set(u),n.doit();var l=new Uint8Array(n.outSize);return l.set(n.out),c&&(s[0].finishDecoding=e()),void this.onPictureDecoded(l,i,a,s)}c&&(s[0].finishDecoding=e()),this.onPictureDecoded(u,i,a,s)}.bind(this);this.options.sliceMode&&(s=function(t,n,r,a){var s=this.pictureBuffers[t];s||(s=this.pictureBuffers[t]=o(t,n*r*3/2));var u,c=this.pictureBuffers[a];c||(c=this.pictureBuffers[a]=i(a,18));this.infoAr.length&&(!0,u=this.infoAr),this.infoAr=[],u[0].finishDecoding=e();for(var l=[],f=0;f<20;++f)l.push(c[f]);u[0].sliceInfoAr=l,this.onPictureDecoded(s,n,r,u)}.bind(this));var u=f.apply({},[function(){},s,t.wasmUrl]),c=this;this.onPictureDecoded=function(e,t,n,r){},this.onDecoderReady=function(){};var l=[];this.decode=function(e,t,n){l.push([e,t,n])},u((function(t){t._broadwayInit(),o=function(e,n){return t.HEAPU8.subarray(e,e+n)},i=function(e,n){var r=t.HEAPU8;return new Uint32Array(r.buffer,e,n)},c.initBuffer=function(){c.streamBuffer=o(t._broadwayCreateStream(8294400),8294400),c.pictureBuffers={},c.infoAr=[]},c.initBuffer();var n=0;if(c.options.sliceMode?(n=c.options.sliceNum,c.decode=function(r,o,i){c.infoAr.push(o),o.startDecoding=e();var a,s=o.nals;if(!s){s=[],o.nals=s;var u=r.length,l=!1,f=0,d=0;for(a=0;a<u;++a)if(1===r[a]&&0===r[a-1]&&0===r[a-2]){var p=a-2;0===r[a-3]&&(p=a-3),l&&s.push({offset:f,end:p,type:31&r[d]}),f=p,d=p+3,0===r[a-3]&&(d=p+4),l=!0}l&&s.push({offset:f,end:a,type:31&r[d]})}var m,y=0,h=0;for(a=0;a<s.length;++a)1===s[a].type||5===s[a].type?(y===n&&(m=r.subarray(s[a].offset,s[a].end),c.streamBuffer[h]=0,h+=1,c.streamBuffer.set(m,h),h+=m.length),y+=1):(m=r.subarray(s[a].offset,s[a].end),c.streamBuffer[h]=0,h+=1,c.streamBuffer.set(m,h),h+=m.length,t._broadwayPlayStream(h),h=0);i(),t._broadwayPlayStream(h)}):c.decode=function(n,r){r&&(c.infoAr.push(r),r.startDecoding=e()),c.streamBuffer.set(n),t._broadwayPlayStream(n.length)},l.length){var r=0;for(r=0;r<l.length;++r)c.decode(l[r][0],l[r][1],l[r][2]);l=[]}c.onDecoderReady(c)}))};t.prototype={setOptions:function(e){for(var t in e)this.options[t]=e[t]}};var n={},r=function(e,t){var r=e+"x"+t;if(n[r])return n[r];for(var o=e*t,a=(0|o)>>2,s=o+a+a,u=e*t*4,c=s+u+4*Math.pow(2,24),l=Math.pow(2,24),f=l;f<c;)f+=l;var d=new ArrayBuffer(f),p=function(e,t,n){"use asm";var r=e.Math.imul,o=e.Math.min,i=e.Math.max,a=e.Math.pow,s=new e.Uint8Array(n),u=new e.Uint32Array(n),c=new e.Uint8Array(n),l=new e.Uint8Array(n),f=new e.Uint32Array(n),d=0,p=0,m=0,y=0,h=0,g=0,b=0,v=0,w=0,_=0;function T(e,t){e=e|0;t=t|0;var n=0;var o=0;d=e;w=r(e,4)|0;p=t;m=r(d|0,p|0)|0;y=(m|0)>>2;g=r(r(d,p)|0,4)|0;h=m+y|0+y|0;v=0;b=v+g|0;_=b+h|0;o=~~+a(+2,+24);o=r(o,4)|0;for(n=0|0;(n|0)<(o|0)|0;n=n+4|0){f[(_+n|0)>>2]=0}}function E(){var e=0;var t=0;var n=0;var r=0;var o=0;var i=0;var a=0;var s=0;var u=0;var l=0;var h=0;var g=0;var T=0;var E=0;T=v|0;e=b|0;t=e+m|0|0;n=t+y|0;for(u=0;(u|0)<(p|0);u=u+2|0){h=t;g=n;for(l=0;(l|0)<(d|0);l=l+2|0){r=c[e>>0]|0;o=c[(e+d|0)>>0]|0;i=c[t>>0]|0;a=c[n>>0]|0;E=((r<<16|0)+(i<<8|0)|0)+a|0;s=f[(_+E|0)>>2]|0;if(s){}else{s=S(r,i,a)|0;f[(_+E|0)>>2]=s|0}f[T>>2]=s;E=((o<<16|0)+(i<<8|0)|0)+a|0;s=f[(_+E|0)>>2]|0;if(s){}else{s=S(o,i,a)|0;f[(_+E|0)>>2]=s|0}f[(T+w|0)>>2]=s;T=T+4|0;e=e+1|0;r=c[e>>0]|0;o=c[(e+d|0)>>0]|0;E=((r<<16|0)+(i<<8|0)|0)+a|0;s=f[(_+E|0)>>2]|0;if(s){}else{s=S(r,i,a)|0;f[(_+E|0)>>2]=s|0}f[T>>2]=s;E=((o<<16|0)+(i<<8|0)|0)+a|0;s=f[(_+E|0)>>2]|0;if(s){}else{s=S(o,i,a)|0;f[(_+E|0)>>2]=s|0}f[(T+w|0)>>2]=s;T=T+4|0;e=e+1|0;t=t+1|0;n=n+1|0}T=T+w|0;e=e+d|0}}function S(e,t,n){e=e|0;t=t|0;n=n|0;var a=0;var s=0;var u=0;var c=0;var l=0;var f=0;var d=0;var p=0;var m=0;l=r(1192,e-16|0)|0;f=r(1634,n-128|0)|0;d=r(832,n-128|0)|0;p=r(400,t-128|0)|0;m=r(2066,t-128|0)|0;a=(l+f|0)>>10|0;s=((l-d|0)-p|0)>>10|0;u=(l+m|0)>>10|0;if((a&255|0)!=(a|0)|0){a=o(255,i(0,a|0)|0)|0}if((s&255|0)!=(s|0)|0){s=o(255,i(0,s|0)|0)|0}if((u&255|0)!=(u|0)|0){u=o(255,i(0,u|0)|0)|0}c=255;c=c<<8|0;c=c+u|0;c=c<<8|0;c=c+s|0;c=c<<8|0;c=c+a|0;return c|0}return{init:T,doit:E}}(i,{},d);return p.init(e,t),n[r]=p,p.heap=d,p.out=new Uint8Array(d,0,u),p.inp=new Uint8Array(d,u,s),p.outSize=u,p};if("undefined"!=typeof self){var o,s,u,c,l,d,p=!1,m=!1,y=!1,h=0,g=0,b=0,v=0,w=[],_=[],T=function(e){if(_.length){for(var t=_.shift();t&&t.byteLength!==e;)t=_.shift();if(t)return t}return new ArrayBuffer(e)},E=function(e,t,n,r,o){var i=function(n,o){var i=0;for(i=0;i<16;++i){var a=n+r*i,s=o+r*i;t.set(e.subarray(a,s),a)}},a=function(n,o){var i=0;for(i=0;i<8;++i){var a=n+r/2*i,s=o+r/2*i;t.set(e.subarray(a,s),a)}},s=function(n,r){t.set(e.subarray(n,r),n)},u=n[0],c=n[1];c>0&&(i(u,c),a(n[2],n[3]),a(n[4],n[5])),u=n[6],(c=n[7])>0&&(i(u,c),a(n[8],n[9]),a(n[10],n[11])),u=n[12],(c=n[15])>0&&(s(u,c),s(n[13],n[16]),s(n[14],n[17]))},S=function(e){b=(g=e)-1};self.addEventListener("message",(function(n){if(p){var r,i;if(null!==(r=n.data)&&void 0!==r&&r.type&&"setOptions"===(null===(i=n.data)||void 0===i?void 0:i.type))return void o.setOptions(n.data.options);if(m&&n.data.reuse&&_.push(n.data.reuse),n.data.buf)return void(y&&0!==v?w.push(n.data):o.decode(new Uint8Array(n.data.buf,n.data.offset||0,n.data.length),n.data.info,(function(){y&&h!==b&&postMessage(n.data,[n.data.buf])})));if(n.data.slice){var a=e();if(E(new Uint8Array(n.data.slice),u,n.data.infos[0].sliceInfoAr,n.data.width,n.data.height),n.data.theOne&&(E(u,new Uint8Array(n.data.slice),s,n.data.width,n.data.height),d>n.data.infos[0].timeDecoding&&(n.data.infos[0].timeDecoding=d),n.data.infos[0].timeCopy+=e()-a),postMessage(n.data,[n.data.slice]),0===(v-=1)&&w.length){var f=w.shift();o.decode(new Uint8Array(f.buf,f.offset||0,f.length),f.info,(function(){y&&h!==b&&postMessage(f,[f.buf])}))}return}if(n.data.setSliceCnt)return void S(n.data.sliceCnt)}else n.data&&"Broadway.js - Worker init"===n.data.type&&(p=!0,o=new t(n.data.options),n.data.options.sliceMode?(m=!0,y=!0,h=n.data.options.sliceNum,S(n.data.options.sliceCnt),o.onPictureDecoded=function(e,t,n,r){var o=new Uint8Array(T(e.length));E(e,o,r[0].sliceInfoAr,t),c=r[0].startDecoding,l=r[0].finishDecoding,d=l-c,r[0].timeDecoding=d,r[0].timeCopy=0,postMessage({slice:o.buffer,sliceNum:h,width:t,height:n,infos:r},[o.buffer]),v=g-1,u=e,s=r[0].sliceInfoAr}):n.data.options.reuseMemory?(m=!0,o.onPictureDecoded=function(e,t,n,r){var o=new Uint8Array(T(e.length));o.set(e,0,e.length),postMessage({buf:o.buffer,length:e.length,width:t,height:n,infos:r},[o.buffer])}):o.onPictureDecoded=function(e,t,n,r){e&&(e=new Uint8Array(e));var o=new Uint8Array(e.length);o.set(e,0,e.length),postMessage({buf:o.buffer,length:e.length,width:t,height:n,infos:r},[o.buffer])},postMessage({consoleLog:"broadway worker initialized"}))}),!1)}return t.nowValue=e,t}()}.call(this,n(2),"/",n(3)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||l||s(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}}]);