ezuikit-flv 2.0.3-alpha.1 → 2.0.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/decoder.js +15 -8
- package/index.js +15 -8
- package/package.json +1 -1
package/decoder.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
/*
|
|
2
2
|
*
|
|
3
|
-
* decoder.js v2.0.3-alpha.
|
|
3
|
+
* decoder.js v2.0.3-alpha.2
|
|
4
4
|
* Copyright (c) 2025-11-14 Ezviz-OpenBiz
|
|
5
5
|
*
|
|
6
6
|
* https://github.com/Ezviz-OpenBiz/EZUIKit-flv
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t,n){return t=s(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(null,arguments)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t,n,r){var o=i(s(e.prototype),t,n);return"function"==typeof o?function(e){return o.apply(n,e)}:o}function u(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(a())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&l(o,n.prototype),o}(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)},d(e)}var h,p;var f,v=function(){if(p)return h;p=1;var e=!0;if((s=void 0!==s?s:{}).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 r,i,s={print:function(e){},printErr:function(e){postMessage({cmd:"wasmError",message:e})}},a=Object.assign({},s),l="./this.program",c="";if("undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof 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?)");r=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},i=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)};var u,f,v,m=s.print||console.log.bind(console),g=s.printErr||console.error.bind(console);Object.assign(s,a),a=null,u="fetchSettings",Object.getOwnPropertyDescriptor(s,u)&&Q(`\`Module.${u}\` was supplied but \`${u}\` not included in INCOMING_MODULE_JS_API`),s.arguments&&s.arguments,X("arguments","arguments_"),s.thisProgram&&(l=s.thisProgram),X("thisProgram","thisProgram"),s.quit&&s.quit,X("quit","quit_"),L(void 0===s.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),L(void 0===s.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),L(void 0===s.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),L(void 0===s.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),L(void 0===s.read,"Module.read option was removed (modify read_ in JS)"),L(void 0===s.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),L(void 0===s.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),L(void 0===s.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),L(void 0===s.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),X("asm","wasmExports"),X("read","read_"),X("readAsync","readAsync"),X("readBinary","readBinary"),X("setWindowTitle","setWindowTitle"),L(!0,"worker environment detected but not enabled at build time. Add `worker` to `-sENVIRONMENT` to enable."),L(!0,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),L(!0,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),s.wasmBinary&&(f=s.wasmBinary),X("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&g("no native wasm support detected");var y,C,_,b,w,E,k,$,T=!1;function L(e,t){e||Q("Assertion failed"+(t?": "+t:""))}function F(){var e=v.buffer;s.HEAP8=y=new Int8Array(e),s.HEAP16=_=new Int16Array(e),s.HEAPU8=C=new Uint8Array(e),s.HEAPU16=b=new Uint16Array(e),s.HEAP32=w=new Int32Array(e),s.HEAPU32=E=new Uint32Array(e),s.HEAPF32=k=new Float32Array(e),s.HEAPF64=$=new Float64Array(e)}function S(){if(!T){var e=vn();0==e&&(e+=4);var t=E[e>>2],n=E[e+4>>2];34821223==t&&2310721022==n||Q(`Stack overflow! Stack cookie has been overwritten at ${re(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${re(n)} ${re(t)}`),1668509029!=E[0]&&Q("Runtime error: The application has corrupted its heap memory area (address zero)!")}}L(!s.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),L("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),L(!s.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),L(!s.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 P=[],M=[],O=[],I=!1;L(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(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 D=0,x=null,R=null,N={};function U(e){for(var t=e;;){if(!N[e])return e;e=t+Math.random()}}function B(e){var t,n;D++,null===(t=(n=s).monitorRunDependencies)||void 0===t||t.call(n,D),e?(L(!N[e]),N[e]=1,null===x&&"undefined"!=typeof setInterval&&(x=setInterval((()=>{if(T)return clearInterval(x),void(x=null);var e=!1;for(var t in N)e||(e=!0,g("still waiting on run dependencies:")),g(`dependency: ${t}`);e&&g("(end of list)")}),1e4))):g("warning: run dependency added without ID")}function j(e){var t,n;if(D--,null===(t=(n=s).monitorRunDependencies)||void 0===t||t.call(n,D),e?(L(N[e]),delete N[e]):g("warning: run dependency removed without ID"),0==D&&(null!==x&&(clearInterval(x),x=null),R)){var r=R;R=null,r()}}function Q(e){var t,n;throw null===(t=(n=s).onAbort)||void 0===t||t.call(n,e),g(e="Aborted("+e+")"),T=!0,new WebAssembly.RuntimeError(e)}var z,H,W,K=e=>e.startsWith("data:application/octet-stream;base64,"),V=e=>e.startsWith("file://");function G(e,t){return function(){L(I,`native function \`${e}\` called before runtime initialization`);var n=ln[e];return L(n,`exported native function \`${e}\` not found`),L(arguments.length<=t,`native function \`${e}\` called with ${arguments.length} args but expects ${t}`),n(...arguments)}}function Y(){var e,t="decoder.wasm";return K(t)?t:(e=t,s.locateFile?s.locateFile(e,c):c+e)}function q(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function Z(t,n,r){return function(t){return!f&&e&&"function"==typeof fetch?fetch(t,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw`failed to load wasm binary file at '${t}'`;return e.arrayBuffer()})).catch((()=>q(t))):Promise.resolve().then((()=>q(t)))}(t).then((e=>WebAssembly.instantiate(e,n))).then(r,(e=>{g(`failed to asynchronously prepare wasm: ${e}`),V(z)&&g(`warning: Loading from a file URI (${z}) 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 X(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Object.getOwnPropertyDescriptor(s,e)||Object.defineProperty(s,e,{configurable:!0,get(){Q(`\`Module.${e}\` has been replaced by \`${t}\``+(n?" (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 J(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 ee(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){oe(`\`${e}\` is not longer defined by emscripten. ${t}`)}})}function te(e){Object.getOwnPropertyDescriptor(s,e)||Object.defineProperty(s,e,{configurable:!0,get(){var t=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;J(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Q(t)}})}ee("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ee("asm","Please use wasmExports instead");var ne=e=>{for(;e.length>0;)e.shift()(s)};s.noExitRuntime;var re=e=>(L("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),oe=e=>{oe.shown||={},oe.shown[e]||(oe.shown[e]=1,g(e))},ie="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,se=(e,t,n)=>{for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&ie)return ie.decode(e.subarray(t,o));for(var i="";t<o;){var s=e[t++];if(128&s){var A=63&e[t++];if(192!=(224&s)){var a=63&e[t++];if(224==(240&s)?s=(15&s)<<12|A<<6|a:(240!=(248&s)&&oe("Invalid UTF-8 leading byte "+re(s)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),s=(7&s)<<18|A<<12|a<<6|63&e[t++]),s<65536)i+=String.fromCharCode(s);else{var l=s-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&s)<<6|A)}else i+=String.fromCharCode(s)}return i},Ae=(e,t)=>(L("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?se(C,e,t):"");function ae(){L(null!=Le.varargs);var e=w[+Le.varargs>>2];return Le.varargs+=4,e}var le=ae,ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),n="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ce.normalize(t.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=e=>(ue=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);Q("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),de={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:Te.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=ce.isAbs(r)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var r=n(e.split("/")),o=n(t.split("/")),i=Math.min(r.length,o.length),s=i,A=0;A<i;A++)if(r[A]!==o[A]){s=A;break}var a=[];for(A=s;A<r.length;A++)a.push("..");return(a=a.concat(o.slice(s))).join("/")}},he=[],pe=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},fe=(e,t,n,r)=>{if(L("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var o=n,i=n+r-1,s=0;s<e.length;++s){var A=e.charCodeAt(s);if(A>=55296&&A<=57343)A=65536+((1023&A)<<10)|1023&e.charCodeAt(++s);if(A<=127){if(n>=i)break;t[n++]=A}else if(A<=2047){if(n+1>=i)break;t[n++]=192|A>>6,t[n++]=128|63&A}else if(A<=65535){if(n+2>=i)break;t[n++]=224|A>>12,t[n++]=128|A>>6&63,t[n++]=128|63&A}else{if(n+3>=i)break;A>1114111&&oe("Invalid Unicode code point "+re(A)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++]=240|A>>18,t[n++]=128|A>>12&63,t[n++]=128|A>>6&63,t[n++]=128|63&A}}return t[n]=0,n-o};function ve(e,t,n){var r=pe(e)+1,o=new Array(r),i=fe(e,o,0,o.length);return o.length=i,o}var me,ge,ye,Ce={ttys:[],init(){},shutdown(){},register(e,t){Ce.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,Ce.stream_ops)},stream_ops:{open(e){var t=Ce.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,o){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var i=0,s=0;s<r;s++){var A;try{A=e.tty.ops.get_char(e.tty)}catch(e){throw new Te.ErrnoError(29)}if(void 0===A&&0===i)throw new Te.ErrnoError(6);if(null==A)break;i++,t[n+s]=A}return i&&(e.node.timestamp=Date.now()),i},write(e,t,n,r,o){if(!e.tty||!e.tty.ops.put_char)throw new Te.ErrnoError(60);try{for(var i=0;i<r;i++)e.tty.ops.put_char(e.tty,t[n+i])}catch(e){throw new Te.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:e=>(()=>{if(!he.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;he=ve(e)}return he.shift()})(),put_char(e,t){null===t||10===t?(m(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(m(se(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(g(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(g(se(e.output,0)),e.output=[])}}},_e=e=>{Q("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,n,r){if(Te.isBlkdev(n)||Te.isFIFO(n))throw new Te.ErrnoError(63);be.ops_table||={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:Te.chrdev_stream_ops}};var o=Te.createNode(e,t,n,r);return Te.isDir(o.mode)?(o.node_ops=be.ops_table.dir.node,o.stream_ops=be.ops_table.dir.stream,o.contents={}):Te.isFile(o.mode)?(o.node_ops=be.ops_table.file.node,o.stream_ops=be.ops_table.file.stream,o.usedBytes=0,o.contents=null):Te.isLink(o.mode)?(o.node_ops=be.ops_table.link.node,o.stream_ops=be.ops_table.link.stream):Te.isChrdev(o.mode)&&(o.node_ops=be.ops_table.chrdev.node,o.stream_ops=be.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,n,r)=>be.createNode(e,t,n,r),rename(e,t,n){if(Te.isDir(e.mode)){var r;try{r=Te.lookupNode(t,n)}catch(e){}if(r)for(var o in r.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=Te.lookupNode(e,t);for(var r in n.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=be.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-o,r);if(L(s>=0),s>8&&i.subarray)t.set(i.subarray(o,o+s),n);else for(var A=0;A<s;A++)t[n+A]=i[o+A];return s},write(e,t,n,r,o,i){if(L(!(t instanceof ArrayBuffer)),t.buffer===y.buffer&&(i=!1),!r)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return L(0===o,"canOwn must imply no weird position inside the file"),s.contents=t.subarray(n,n+r),s.usedBytes=r,r;if(0===s.usedBytes&&0===o)return s.contents=t.slice(n,n+r),s.usedBytes=r,r;if(o+r<=s.usedBytes)return s.contents.set(t.subarray(n,n+r),o),r}if(be.expandFileStorage(s,o+r),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(n,n+r),o);else for(var A=0;A<r;A++)s.contents[o+A]=t[n+A];return s.usedBytes=Math.max(s.usedBytes,o+r),r},llseek(e,t,n){var r=t;if(1===n?r+=e.position:2===n&&Te.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new Te.ErrnoError(28);return r},allocate(e,t,n){be.expandFileStorage(e.node,t+n),e.node.usedBytes=Math.max(e.node.usedBytes,t+n)},mmap(e,t,n,r,o){if(!Te.isFile(e.node.mode))throw new Te.ErrnoError(43);var i,s,A=e.node.contents;if(2&o||A.buffer!==y.buffer){if((n>0||n+t<A.length)&&(A=A.subarray?A.subarray(n,n+t):Array.prototype.slice.call(A,n,n+t)),s=!0,!(i=_e()))throw new Te.ErrnoError(48);y.set(A,i)}else s=!1,i=A.byteOffset;return{ptr:i,allocated:s}},msync:(e,t,n,r,o)=>(be.stream_ops.write(e,t,0,r,n,!1),0)}},we=s.preloadPlugins||[],Ee=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},ke={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},$e={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:function(e){function r(e){var o;for(var i in n(this,r),(o=t(this,r,[ke[e]])).name="ErrnoError",o.errno=e,$e)if($e[i]===e){o.code=i;break}return o}return A(r,e),o(r)}(d(Error)),genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:function(){return o((function e(){n(this,e),this.shared={}}),[{key:"object",get:function(){return this.node},set:function(e){this.node=e}},{key:"isRead",get:function(){return 1!=(2097155&this.flags)}},{key:"isWrite",get:function(){return!!(2097155&this.flags)}},{key:"isAppend",get:function(){return 1024&this.flags}},{key:"flags",get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},{key:"position",get:function(){return this.shared.position},set:function(e){this.shared.position=e}}])}(),FSNode:function(){return o((function e(t,r,o,i){n(this,e),t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Te.nextInode++,this.name=r,this.mode=o,this.node_ops={},this.stream_ops={},this.rdev=i,this.readMode=365,this.writeMode=146}),[{key:"read",get:function(){return(this.mode&this.readMode)===this.readMode},set:function(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}},{key:"write",get:function(){return(this.mode&this.writeMode)===this.writeMode},set:function(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}},{key:"isFolder",get:function(){return Te.isDir(this.mode)}},{key:"isDevice",get:function(){return Te.isChrdev(this.mode)}}])}(),lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),r=Te.root,o="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&t.parent)break;if(r=Te.lookupNode(r,n[i]),o=ce.join2(o,n[i]),Te.isMountpoint(r)&&(!s||s&&t.follow_mount)&&(r=r.mounted.root),!s||t.follow)for(var A=0;Te.isLink(r.mode);){var a=Te.readlink(o);if(o=de.resolve(ce.dirname(o),a),r=Te.lookupPath(o,{recurse_count:t.recurse_count+1}).node,A++>40)throw new Te.ErrnoError(32)}}return{path:o,node:r}},getPath(e){for(var t;;){if(Te.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?`${n}/${t}`:n+t:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var n=Te.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=Te.mayLookup(e);if(n)throw new Te.ErrnoError(n);for(var r=Te.hashName(e.id,t),o=Te.nameTable[r];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Te.lookup(e,t)},createNode(e,t,n,r){L("object"==typeof e);var o=new Te.FSNode(e,t,n,r);return Te.hashAddNode(o),o},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!Te.isDir(e.mode))return 54;var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Te.lookupNode(e,t);return 20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,n){var r;try{r=Te.lookupNode(e,t)}catch(e){return e.errno}var o=Te.nodePermissions(e,"wx");if(o)return o;if(n){if(!Te.isDir(r.mode))return 54;if(Te.isRoot(r)||Te.getPath(r)===Te.cwd())return 10}else if(Te.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},dupStream(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;var o=Te.createStream(e,r);return null===(t=o.stream_ops)||void 0===t||null===(n=t.dup)||void 0===n||n.call(t,o),o},chrdev_stream_ops:{open(e){var t,n,r=Te.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,null===(t=(n=e.stream_ops).open)||void 0===t||t.call(n,e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&g(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=Te.getMounts(Te.root.mount),r=0;function o(e){return L(Te.syncFSRequests>0),Te.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++r>=n.length&&o(null)}n.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,n){if("string"==typeof e)throw e;var r,o="/"===n,i=!n;if(o&&Te.root)throw new Te.ErrnoError(10);if(!o&&!i){var s=Te.lookupPath(n,{follow_mount:!1});if(n=s.path,r=s.node,Te.isMountpoint(r))throw new Te.ErrnoError(10);if(!Te.isDir(r.mode))throw new Te.ErrnoError(54)}var A={type:e,opts:t,mountpoint:n,mounts:[]},a=e.mount(A);return a.mount=A,A.root=a,o?Te.root=a:r&&(r.mounted=A,r.mount&&r.mount.mounts.push(A)),a},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var n=t.node,r=n.mounted,o=Te.getMounts(r);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var n=t.name_next;o.includes(t.mount)&&Te.destroyNode(t),t=n}})),n.mounted=null;var i=n.mount.mounts.indexOf(r);L(-1!==i),n.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=Te.lookupPath(e,{parent:!0}).node,o=ce.basename(e);if(!o||"."===o||".."===o)throw new Te.ErrnoError(28);var i=Te.mayCreate(r,o);if(i)throw new Te.ErrnoError(i);if(!r.node_ops.mknod)throw new Te.ErrnoError(63);return r.node_ops.mknod(r,o,t,n)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",o=0;o<n.length;++o)if(n[o]){r+="/"+n[o];try{Te.mkdir(r,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,n)=>(void 0===n&&(n=t,t=438),t|=8192,Te.mknod(e,t,n)),symlink(e,t){if(!de.resolve(e))throw new Te.ErrnoError(44);var n=Te.lookupPath(t,{parent:!0}).node;if(!n)throw new Te.ErrnoError(44);var r=ce.basename(t),o=Te.mayCreate(n,r);if(o)throw new Te.ErrnoError(o);if(!n.node_ops.symlink)throw new Te.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,o=ce.dirname(e),i=ce.dirname(t),s=ce.basename(e),A=ce.basename(t);if(n=Te.lookupPath(e,{parent:!0}).node,r=Te.lookupPath(t,{parent:!0}).node,!n||!r)throw new Te.ErrnoError(44);if(n.mount!==r.mount)throw new Te.ErrnoError(75);var a,l=Te.lookupNode(n,s),c=de.relative(e,i);if("."!==c.charAt(0))throw new Te.ErrnoError(28);if("."!==(c=de.relative(t,o)).charAt(0))throw new Te.ErrnoError(55);try{a=Te.lookupNode(r,A)}catch(e){}if(l!==a){var u=Te.isDir(l.mode),d=Te.mayDelete(n,s,u);if(d)throw new Te.ErrnoError(d);if(d=a?Te.mayDelete(r,A,u):Te.mayCreate(r,A))throw new Te.ErrnoError(d);if(!n.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(l)||a&&Te.isMountpoint(a))throw new Te.ErrnoError(10);if(r!==n&&(d=Te.nodePermissions(n,"w")))throw new Te.ErrnoError(d);Te.hashRemoveNode(l);try{n.node_ops.rename(l,r,A)}catch(e){throw e}finally{Te.hashAddNode(l)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,n=ce.basename(e),r=Te.lookupNode(t,n),o=Te.mayDelete(t,n,!0);if(o)throw new Te.ErrnoError(o);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(r))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,n),Te.destroyNode(r)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var n=ce.basename(e),r=Te.lookupNode(t,n),o=Te.mayDelete(t,n,!1);if(o)throw new Te.ErrnoError(o);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(r))throw new Te.ErrnoError(10);t.node_ops.unlink(t,n),Te.destroyNode(r)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return de.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=Te.lookupPath(e,{follow:!t}).node;if(!n)throw new Te.ErrnoError(44);if(!n.node_ops.getattr)throw new Te.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>Te.stat(e,!0),chmod(e,t,n){var r;"string"==typeof e?r=Te.lookupPath(e,{follow:!n}).node:r=e;if(!r.node_ops.setattr)throw new Te.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var n=Te.getStreamChecked(e);Te.chmod(n.node,t)},chown(e,t,n,r){var o;"string"==typeof e?o=Te.lookupPath(e,{follow:!r}).node:o=e;if(!o.node_ops.setattr)throw new Te.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,n){Te.chown(e,t,n,!0)},fchown(e,t,n){var r=Te.getStreamChecked(e);Te.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var n;"string"==typeof e?n=Te.lookupPath(e,{follow:!0}).node:n=e;if(!n.node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(n.mode))throw new Te.ErrnoError(31);if(!Te.isFile(n.mode))throw new Te.ErrnoError(28);var r=Te.nodePermissions(n,"w");if(r)throw new Te.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=Te.getStreamChecked(e);if(!(2097155&n.flags))throw new Te.ErrnoError(28);Te.truncate(n.node,t)},utime(e,t,n){var r=Te.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,t,n){if(""===e)throw new Te.ErrnoError(44);var r;if(n=void 0===n?438:n,n=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&n|32768:0,"object"==typeof e)r=e;else{e=ce.normalize(e);try{r=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(r){if(128&t)throw new Te.ErrnoError(20)}else r=Te.mknod(e,n,0),o=!0;if(!r)throw new Te.ErrnoError(44);if(Te.isChrdev(r.mode)&&(t&=-513),65536&t&&!Te.isDir(r.mode))throw new Te.ErrnoError(54);if(!o){var i=Te.mayOpen(r,t);if(i)throw new Te.ErrnoError(i)}512&t&&!o&&Te.truncate(r,0),t&=-131713;var A=Te.createStream({node:r,path:Te.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return A.stream_ops.open&&A.stream_ops.open(A),!s.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),A},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,o){if(L(n>=0),r<0||o<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Te.ErrnoError(70)}else o=e.position;var s=e.stream_ops.read(e,t,n,r,o);return i||(e.position+=s),s},write(e,t,n,r,o,i){if(L(n>=0),r<0||o<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var s=void 0!==o;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else o=e.position;var A=e.stream_ops.write(e,t,n,r,o,i);return s||(e.position+=A),A},allocate(e,t,n){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||n<=0)throw new Te.ErrnoError(28);if(!(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,o){if(2&r&&!(2&o)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,n,r,o)},msync:(e,t,n,r,o)=>(L(n>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,o):0),ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var n,r=Te.open(e,t.flags),o=Te.stat(e).size,i=new Uint8Array(o);return Te.read(r,i,0,o,0),"utf8"===t.encoding?n=se(i,0):"binary"===t.encoding&&(n=i),Te.close(r),n},writeFile(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.flags=n.flags||577;var r=Te.open(e,n.flags,n.mode);if("string"==typeof t){var o=new Uint8Array(pe(t)+1),i=fe(t,o,0,o.length);Te.write(r,o,0,i,void 0,n.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(r,t,0,t.byteLength,void 0,n.canOwn)}Te.close(r)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var n=Te.nodePermissions(t.node,"x");if(n)throw new Te.ErrnoError(n);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,n,r,o)=>r}),Te.mkdev("/dev/null",Te.makedev(1,3)),Ce.register(Te.makedev(5,0),Ce.default_tty_ops),Ce.register(Te.makedev(6,0),Ce.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Te.createDevice("/dev","random",n),Te.createDevice("/dev","urandom",n),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=+t,r=Te.getStreamChecked(n),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){s.stdin?Te.createDevice("/dev","stdin",s.stdin):Te.symlink("/dev/tty","/dev/stdin"),s.stdout?Te.createDevice("/dev","stdout",null,s.stdout):Te.symlink("/dev/tty","/dev/stdout"),s.stderr?Te.createDevice("/dev","stderr",null,s.stderr):Te.symlink("/dev/tty1","/dev/stderr");var e=Te.open("/dev/stdin",0),t=Te.open("/dev/stdout",1),n=Te.open("/dev/stderr",1);L(0===e.fd,`invalid handle for stdin (${e.fd})`),L(1===t.fd,`invalid handle for stdout (${t.fd})`),L(2===n.fd,`invalid handle for stderr (${n.fd})`)},staticInit(){[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack="<generic error, no stack>"})),Te.nameTable=new Array(4096),Te.mount(be,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:be}},init(e,t,n){L(!Te.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Te.init.initialized=!0,s.stdin=e||s.stdin,s.stdout=t||s.stdout,s.stderr=n||s.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1,hn(0);for(var e=0;e<Te.streams.length;e++){var t=Te.streams[e];t&&Te.close(t)}},findObject(e,t){var n=Te.analyzePath(e,t);return n.exists?n.object:null},analyzePath(e,t){try{e=(r=Te.lookupPath(e,{follow:!t})).path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=Te.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=r.path,n.parentObject=r.node,n.name=ce.basename(e),r=Te.lookupPath(e,{follow:!t}),n.exists=!0,n.path=r.path,n.object=r.node,n.name=r.node.name,n.isRoot="/"===r.path}catch(e){n.error=e.errno}return n},createPath(e,t,n,r){e="string"==typeof e?e:Te.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var s=ce.join2(e,i);try{Te.mkdir(s)}catch(e){}e=s}}return s},createFile(e,t,n,r,o){var i=ce.join2("string"==typeof e?e:Te.getPath(e),t),s=Ee(r,o);return Te.create(i,s)},createDataFile(e,t,n,r,o,i){var s=t;e&&(e="string"==typeof e?e:Te.getPath(e),s=t?ce.join2(e,t):e);var A=Ee(r,o),a=Te.create(s,A);if(n){if("string"==typeof n){for(var l=new Array(n.length),c=0,u=n.length;c<u;++c)l[c]=n.charCodeAt(c);n=l}Te.chmod(a,146|A);var d=Te.open(a,577);Te.write(d,n,0,n.length,0,i),Te.close(d),Te.chmod(a,A)}},createDevice(e,t,n,r){var o=ce.join2("string"==typeof e?e:Te.getPath(e),t),i=Ee(!!n,!!r);Te.createDevice.major||(Te.createDevice.major=64);var s=Te.makedev(Te.createDevice.major++,0);return Te.registerDevice(s,{open(e){e.seekable=!1},close(e){var t;null!=r&&null!==(t=r.buffer)&&void 0!==t&&t.length&&r(10)},read(e,t,r,o,i){for(var s=0,A=0;A<o;A++){var a;try{a=n()}catch(e){throw new Te.ErrnoError(29)}if(void 0===a&&0===s)throw new Te.ErrnoError(6);if(null==a)break;s++,t[r+A]=a}return s&&(e.node.timestamp=Date.now()),s},write(e,t,n,o,i){for(var s=0;s<o;s++)try{r(t[n+s])}catch(e){throw new Te.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),s}}),Te.mkdev(o,i,s)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!r)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ve(r(e.url)),e.usedBytes=e.contents.length}catch(e){throw new Te.ErrnoError(29)}},createLazyFile(e,t,n,r,o){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:n},s=Te.createFile(e,t,i,r,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var A={};function a(e,t,n,r,o){var i=e.node.contents;if(o>=i.length)return 0;var s=Math.min(i.length-o,r);if(L(s>=0),i.slice)for(var A=0;A<s;A++)t[n+A]=i[o+A];else for(A=0;A<s;A++)t[n+A]=i.get(o+A);return s}return Object.keys(s.stream_ops).forEach((e=>{var t=s.stream_ops[e];A[e]=function(){return Te.forceLoadFile(s),t(...arguments)}})),A.read=(e,t,n,r,o)=>(Te.forceLoadFile(s),a(e,t,n,r,o)),A.mmap=(e,t,n,r,o)=>{Te.forceLoadFile(s);var i=_e();if(!i)throw new Te.ErrnoError(48);return a(e,y,i,t,n),{ptr:i,allocated:!0}},s.stream_ops=A,s},absolutePath(){Q("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){Q("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){Q("FS.createLink has been removed; use FS.symlink instead")},joinPath(){Q("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){Q("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){Q("FS.standardizePath has been removed; use PATH.normalize instead")}},Le={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(ce.isAbs(t))return t;var r;-100===e?r=Te.cwd():r=Le.getStreamFromFD(e).path;if(0==t.length){if(!n)throw new Te.ErrnoError(44);return r}return ce.join2(r,t)},doStat(e,t,n){var r=e(t);w[n>>2]=r.dev,w[n+4>>2]=r.mode,E[n+8>>2]=r.nlink,w[n+12>>2]=r.uid,w[n+16>>2]=r.gid,w[n+20>>2]=r.rdev,W=[r.size>>>0,(H=r.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+24>>2]=W[0],w[n+28>>2]=W[1],w[n+32>>2]=4096,w[n+36>>2]=r.blocks;var o=r.atime.getTime(),i=r.mtime.getTime(),s=r.ctime.getTime();return W=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+40>>2]=W[0],w[n+44>>2]=W[1],E[n+48>>2]=o%1e3*1e3,W=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+56>>2]=W[0],w[n+60>>2]=W[1],E[n+64>>2]=i%1e3*1e3,W=[Math.floor(s/1e3)>>>0,(H=Math.floor(s/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+72>>2]=W[0],w[n+76>>2]=W[1],E[n+80>>2]=s%1e3*1e3,W=[r.ino>>>0,(H=r.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+88>>2]=W[0],w[n+92>>2]=W[1],0},doMsync(e,t,n,r,o){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&r)return 0;var i=C.slice(e,e+n);Te.msync(t,i,o,n,r)},getStreamFromFD:e=>Te.getStreamChecked(e),varargs:void 0,getStr:e=>Ae(e)},Fe=e=>{for(var t="",n=e;C[n];)t+=me[C[n++]];return t},Se={},Pe={},Me={},Oe=e=>{throw new ge(e)},Ie=e=>{throw new ye(e)},De=(e,t,n)=>{function r(t){var r=n(t);r.length!==e.length&&Ie("Mismatched type converter count");for(var o=0;o<e.length;++o)xe(e[o],r[o])}e.forEach((function(e){Me[e]=t}));var o=new Array(t.length),i=[],s=0;t.forEach(((e,t)=>{Pe.hasOwnProperty(e)?o[t]=Pe[e]:(i.push(e),Se.hasOwnProperty(e)||(Se[e]=[]),Se[e].push((()=>{o[t]=Pe[e],++s===i.length&&r(o)})))})),0===i.length&&r(o)};function xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var r=t.name;if(e||Oe(`type "${r}" must have a positive integer typeid pointer`),Pe.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Oe(`Cannot register type '${r}' twice`)}if(Pe[e]=t,delete Me[e],Se.hasOwnProperty(e)){var o=Se[e];delete Se[e],o.forEach((e=>e()))}}(e,t,n)}var Re,Ne=e=>{Oe(e.$$.ptrType.registeredClass.name+" instance already deleted")},Ue=!1,Be=e=>{},je=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Qe=(e,t,n)=>{if(t===n)return e;if(void 0===n.baseClass)return null;var r=Qe(e,t,n.baseClass);return null===r?null:n.downcast(r)},ze={},He=()=>Object.keys(Ye).length,We=()=>{var e=[];for(var t in Ye)Ye.hasOwnProperty(t)&&e.push(Ye[t]);return e},Ke=[],Ve=()=>{for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}},Ge=e=>{Re=e,Ke.length&&Re&&Re(Ve)},Ye={},qe=(e,t)=>(t=((e,t)=>{for(void 0===t&&Oe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Ye[t]),Ze=(e,t)=>(t.ptrType&&t.ptr||Ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Je(Object.create(e,{$$:{value:t,writable:!0}})));function Xe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=qe(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?Ze(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ze(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,s=this.registeredClass.getActualType(t),A=ze[s];if(!A)return o.call(this);i=this.isConst?A.constPointerType:A.pointerType;var a=Qe(t,this.registeredClass,i.registeredClass);return null===a?o.call(this):this.isSmartPointer?Ze(i.registeredClass.instancePrototype,{ptrType:i,ptr:a,smartPtrType:this,smartPtr:e}):Ze(i.registeredClass.instancePrototype,{ptrType:i,ptr:a})}var Je=e=>"undefined"==typeof FinalizationRegistry?(Je=e=>e,e):(Ue=new FinalizationRegistry((e=>{je(e.$$)})),Je=e=>{var t=e.$$;if(!!t.smartPtr){var n={$$:t},r=t.ptrType.registeredClass;n.leakWarning=new Error(`Embind found a leaked C++ instance ${r.name} <${re(t.ptr)}>.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(n.leakWarning,Xe),Ue.register(e,n,e)}return e},Be=e=>Ue.unregister(e),Je(e));function et(){}var tt=(e,t)=>Object.defineProperty(t,"name",{value:e}),nt=(e,t,n)=>{if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e[t].overloadTable.hasOwnProperty(o.length)||Oe(`Function '${n}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}};function rt(e,t,n,r,o,i,s,A){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=s,this.downcast=A,this.pureVirtualFunctions=[]}var ot=(e,t,n)=>{for(;t!==n;)t.upcast||Oe(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function it(e,t){if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),0;t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ot(t.$$.ptr,n,this.registeredClass)}function st(e,t){var n;if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t&&t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Oe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=ot(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Oe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Oe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,Tt.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,n)}break;default:Oe("Unsupporting sharing policy")}return n}function At(e,t){if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),0;t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Oe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ot(t.$$.ptr,n,this.registeredClass)}function at(e){return this.fromWireType(E[e>>2])}function lt(e,t,n,r,o,i,s,A,a,l,c){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=s,this.rawGetPointee=A,this.rawConstructor=a,this.rawShare=l,this.rawDestructor=c,o||void 0!==t.baseClass?this.toWireType=st:r?(this.toWireType=it,this.destructorFunction=null):(this.toWireType=At,this.destructorFunction=null)}var ct,ut,dt=e=>ct.get(e),ht=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.includes("j")?((e,t,n)=>(L("dynCall_"+(e=e.replace(/p/g,"i"))in s,`bad function pointer type - dynCall function not found for sig '${e}'`),null!=n&&n.length?L(n.length===e.substring(1).replace(/j/g,"--").length):L(1==e.length),(0,s["dynCall_"+e])(t,...n)))(e,t,n):(L(dt(t),`missing table entry in dynCall: ${t}`),dt(t)(...n))},pt=(e,t)=>{var n,r,o=(e=Fe(e)).includes("j")?(r=t,L((n=e).includes("j")||n.includes("p"),"getDynCaller should only be called with i64 sigs"),function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return ht(n,r,t)}):dt(t);return"function"!=typeof o&&Oe(`unknown function pointer with signature ${e}: ${t}`),o},ft=e=>{var t=dn(e),n=Fe(t);return cn(t),n},vt=(e,t)=>{var n=[],r={};throw t.forEach((function e(t){r[t]||Pe[t]||(Me[t]?Me[t].forEach(e):(n.push(t),r[t]=!0))})),new ut(`${e}: `+n.map(ft).join([", "]))},mt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(E[t+4*r>>2]);return n},gt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function yt(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}function Ct(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var n=tt(e.name||"unknownFunctionName",(function(){}));n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return o instanceof Object?o:r}function _t(e,t,n,r,o,i){var s=t.length;s<2&&Oe("argTypes array size mismatch! Must at least get return value and 'this' types!"),L(!i,"Async bindings are only supported with JSPI.");for(var A=null!==t[1]&&null!==n,a=yt(t),l="void"!==t[0].name,c=[e,Oe,r,o,gt,t[0],t[1]],u=0;u<s-2;++u)c.push(t[u+2]);if(!a)for(u=A?1:2;u<t.length;++u)null!==t[u].destructorFunction&&c.push(t[u].destructorFunction);let[d,h]=function(e,t,n,r){for(var o=yt(e),i=e.length,s="",A="",a=0;a<i-2;++a)s+=(0!==a?", ":"")+"arg"+a,A+=(0!==a?", ":"")+"arg"+a+"Wired";var l=`\n return function (${s}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;o&&(l+="var destructors = [];\n");var c=o?"destructors":"null",u=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(t&&(l+="var thisWired = classParam['toWireType']("+c+", this);\n"),a=0;a<i-2;++a)l+="var arg"+a+"Wired = argType"+a+"['toWireType']("+c+", arg"+a+");\n",u.push("argType"+a);if(t&&(A="thisWired"+(A.length>0?", ":"")+A),l+=(n||r?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",o)l+="runDestructors(destructors);\n";else for(a=t?1:2;a<e.length;++a){var d=1===a?"thisWired":"arg"+(a-2)+"Wired";null!==e[a].destructorFunction&&(l+=`${d}_dtor(${d});\n`,u.push(`${d}_dtor`))}return n&&(l+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),l+="}\n",[u,l=`if (arguments.length !== ${u.length}){ throw new Error(humanName + "Expected ${u.length} closure arguments " + arguments.length + " given."); }\n${l}`]}(t,A,l,i);d.push(h);var p=Ct(Function,d)(...c);return tt(e,p)}var bt=(e,t,n)=>(e instanceof Object||Oe(`${n} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||Oe(`${n} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Oe(`cannot call emscripten binding method ${n} on deleted object`),ot(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)),wt=[],Et=[],kt=e=>{e>9&&0==--Et[e+1]&&(L(void 0!==Et[e],"Decref for unallocated handle."),Et[e]=void 0,wt.push(e))},$t=()=>Et.length/2-5-wt.length,Tt={toValue:e=>(e||Oe("Cannot use deleted val. handle = "+e),L(2===e||void 0!==Et[e]&&e%2==0,`invalid handle: ${e}`),Et[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=wt.pop()||Et.length;return Et[t]=e,Et[t+1]=1,t}}}},Lt={name:"emscripten::val",fromWireType:e=>{var t=Tt.toValue(e);return kt(e),t},toWireType:(e,t)=>Tt.toHandle(t),argPackAdvance:8,readValueFromPointer:at,destructorFunction:null},Ft=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},St=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(k[e>>2])};case 8:return function(e){return this.fromWireType($[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Pt=(e,t,n)=>{switch(t){case 1:return n?e=>y[e]:e=>C[e];case 2:return n?e=>_[e>>1]:e=>b[e>>1];case 4:return n?e=>w[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Mt=(e,t,n)=>(L("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,C,t,n)),Ot="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,It=(e,t)=>{L(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,o=r+t/2;!(r>=o)&&b[r];)++r;if((n=r<<1)-e>32&&Ot)return Ot.decode(C.subarray(e,n));for(var i="",s=0;!(s>=t/2);++s){var A=_[e+2*s>>1];if(0==A)break;i+=String.fromCharCode(A)}return i},Dt=(e,t,n)=>{if(L(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),L("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??=2147483647,n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var s=e.charCodeAt(i);_[t>>1]=s,t+=2}return _[t>>1]=0,t-r},xt=e=>2*e.length,Rt=(e,t)=>{L(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var n=0,r="";!(n>=t/4);){var o=w[e+4*n>>2];if(0==o)break;if(++n,o>=65536){var i=o-65536;r+=String.fromCharCode(55296|i>>10,56320|1023&i)}else r+=String.fromCharCode(o)}return r},Nt=(e,t,n)=>{if(L(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),L("number"==typeof n,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??=2147483647,n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(w[t>>2]=s,(t+=4)+4>o)break}return w[t>>2]=0,t-r},Ut=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&++n,t+=4}return t},Bt=(e,t)=>{var n=Pe[e];return void 0===n&&Oe(`${t} has unknown type ${ft(e)}`),n},jt=(e,t,n)=>{var r=[],o=e.toWireType(r,n);return r.length&&(E[t>>2]=Tt.toHandle(r)),o},Qt={},zt=[],Ht=(e,t)=>(L(e==e>>>0||e==(0|e)),L(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN),Wt=[0,31,60,91,121,152,182,213,244,274,305,335],Kt=[0,31,59,90,120,151,181,212,243,273,304,334],Vt=e=>{var t;return((t=e.getFullYear())%4==0&&(t%100!=0||t%400==0)?Wt:Kt)[e.getMonth()]+e.getDate()-1},Gt=(e,t)=>(L(t===(0|t)),(e>>>0)+4294967296*t),Yt=(e,t)=>{if(e<=0)return e;var n=t<=32?Math.abs(1<<t-1):Math.pow(2,t-1);return e>=n&&(t<=32||e>n)&&(e=-2*n+e),e},qt=(e,t)=>e>=0?e:t<=32?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e,Zt=e=>{for(var t=e;C[t];)++t;return t-e},Xt=(e,t)=>{L(!(3&t));var n=e,r=t;function o(e){var t;return r=function(e,t){return"double"===t||"i64"===t?7&e&&(L(4==(7&e)),e+=4):L(!(3&e)),e}(r,e),"double"===e?(t=$[r>>3],r+=8):"i64"==e?(t=[w[r>>2],w[r+4>>2]],r+=8):(L(!(3&r)),e="i32",t=w[r>>2],r+=4),t}for(var i,s,A,a,l,c,u=[];;){var d=n;if(0===(i=y[n]))break;if(s=y[n+1],37==i){var h=!1,p=!1,f=!1,v=!1,m=!1;e:for(;;){switch(s){case 43:h=!0;break;case 45:p=!0;break;case 35:f=!0;break;case 48:if(v)break e;v=!0;break;case 32:m=!0;break;default:break e}n++,s=y[n+1]}var g=0;if(42==s)g=o("i32"),n++,s=y[n+1];else for(;s>=48&&s<=57;)g=10*g+(s-48),n++,s=y[n+1];var _,b=!1,E=-1;if(46==s){if(E=0,b=!0,n++,42==(s=y[n+1]))E=o("i32"),n++;else for(;;){var k=y[n+1];if(k<48||k>57)break;E=10*E+(k-48),n++}s=y[n+1]}switch(E<0&&(E=6,b=!1),String.fromCharCode(s)){case"h":104==y[n+2]?(n++,_=1):_=2;break;case"l":108==y[n+2]?(n++,_=8):_=4;break;case"L":case"q":case"j":_=8;break;case"z":case"t":case"I":_=4;break;default:_=null}switch(_&&n++,s=y[n+1],String.fromCharCode(s)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var T=100==s||105==s;if(A=o("i"+8*(_=_||4)),8==_&&(A=117==s?(l=A[0],c=A[1],(l>>>0)+4294967296*(c>>>0)):Gt(A[0],A[1])),_<=4){var F=Math.pow(256,_)-1;A=(T?Yt:qt)(A&F,8*_)}var S=Math.abs(A),P="";if(100==s||105==s)I=Yt(A,8*_).toString(10);else if(117==s)I=qt(A,8*_).toString(10),A=Math.abs(A);else if(111==s)I=(f?"0":"")+S.toString(8);else if(120==s||88==s){if(P=f&&0!=A?"0x":"",A<0){A=-A,I=(S-1).toString(16);for(var M=[],O=0;O<I.length;O++)M.push((15-parseInt(I[O],16)).toString(16));for(I=M.join("");I.length<2*_;)I="f"+I}else I=S.toString(16);88==s&&(P=P.toUpperCase(),I=I.toUpperCase())}else 112==s&&(0===S?I="(nil)":(P="0x",I=S.toString(16)));if(b)for(;I.length<E;)I="0"+I;for(A>=0&&(h?P="+"+P:m&&(P=" "+P)),"-"==I.charAt(0)&&(P="-"+P,I=I.substr(1));P.length+I.length<g;)p?I+=" ":v?I="0"+I:P=" "+P;(I=P+I).split("").forEach((function(e){u.push(e.charCodeAt(0))}));break;case"f":case"F":case"e":case"E":case"g":case"G":var I;if(A=o("double"),isNaN(A))I="nan",v=!1;else if(isFinite(A)){var D=!1,x=Math.min(E,20);if(103==s||71==s){D=!0,E=E||1;var R=parseInt(A.toExponential(x).split("e")[1],10);E>R&&R>=-4?(s=(103==s?"f":"F").charCodeAt(0),E-=R+1):(s=(103==s?"e":"E").charCodeAt(0),E--),x=Math.min(E,20)}101==s||69==s?(I=A.toExponential(x),/[eE][-+]\d$/.test(I)&&(I=I.slice(0,-1)+"0"+I.slice(-1))):102!=s&&70!=s||(I=A.toFixed(x),0===A&&((a=A)<0||0===a&&1/a==-1/0)&&(I="-"+I));var N=I.split("e");if(D&&!f)for(;N[0].length>1&&N[0].includes(".")&&("0"==N[0].slice(-1)||"."==N[0].slice(-1));)N[0]=N[0].slice(0,-1);else for(f&&-1==I.indexOf(".")&&(N[0]+=".");E>x++;)N[0]+="0";I=N[0]+(N.length>1?"e"+N[1]:""),69==s&&(I=I.toUpperCase()),A>=0&&(h?I="+"+I:m&&(I=" "+I))}else I=(A<0?"-":"")+"inf",v=!1;for(;I.length<g;)p?I+=" ":I=!v||"-"!=I[0]&&"+"!=I[0]?(v?"0":" ")+I:I[0]+"0"+I.slice(1);s<97&&(I=I.toUpperCase()),I.split("").forEach((function(e){u.push(e.charCodeAt(0))}));break;case"s":var U=o("i8*"),B=U?Zt(U):6;if(b&&(B=Math.min(B,E)),!p)for(;B<g--;)u.push(32);if(U)for(O=0;O<B;O++)u.push(C[U++]);else u=u.concat(ve("(null)".substr(0,B)));if(p)for(;B<g--;)u.push(32);break;case"c":for(p&&u.push(o("i8"));--g>0;)u.push(32);p||u.push(o("i8"));break;case"n":var j=o("i32*");w[j>>2]=u.length;break;case"%":u.push(i);break;default:for(O=d;O<n+2;O++)u.push(y[O])}n+=2}else u.push(i),n+=1}return u};function Jt(e){var t=(new Error).stack.toString(),n=t.lastIndexOf("_emscripten_log"),r=t.lastIndexOf("_emscripten_get_callstack"),o=t.indexOf("\n",Math.max(n,r))+1;t=t.slice(o),8&e&&"undefined"==typeof emscripten_source_map&&(oe('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var i=t.split("\n");t="";var s=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),A=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),a=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var l in i){var c=i[l],u="",d="",h=0,p=0,f=a.exec(c);if(f&&5==f.length)u=f[1],d=f[2],h=f[3],p=f[4];else{if((f=s.exec(c))||(f=A.exec(c)),!(f&&f.length>=4)){t+=c+"\n";continue}u=f[1],d=f[2],h=f[3],p=0|f[4]}var v=!1;if(8&e){var m,g=emscripten_source_map.originalPositionFor({line:h,column:p});(v=null===(m=g)||void 0===m?void 0:m.source)&&(64&e&&(g.source=g.source.substring(g.source.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=` at ${u} (${g.source}:${g.line}:${g.column})\n`)}(16&e||!v)&&(64&e&&(d=d.substring(d.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=(v?` = ${u}`:` at ${u}`)+` (${d}:${h}:${p})\n`)}return t=t.replace(/\s+$/,"")}var en,tn,nn,rn=e=>{var t=v.buffer,n=(e-t.byteLength+65535)/65536;try{return v.grow(n),F(),1}catch(n){g(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},on={},sn=()=>{if(!sn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in on)void 0===on[t]?delete e[t]:e[t]=on[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);sn.strings=n}return sn.strings};Te.createPreloadedFile=(e,t,n,r,o,s,A,a,l,c)=>{var u=t?de.resolve(ce.join2(e,t)):e,d=U(`cp ${u}`);function h(n){function i(n){null==c||c(),a||((e,t,n,r,o,i)=>{Te.createDataFile(e,t,n,r,o,i)})(e,t,n,r,o,l),null==s||s(),j(d)}((e,t,n,r)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return we.forEach((i=>{o||i.canHandle(t)&&(i.handle(e,t,n,r),o=!0)})),o})(n,u,i,(()=>{null==A||A(),j(d)}))||i(n)}B(d),"string"==typeof n?((e,t,n,r)=>{var o=U(`al ${e}`);i(e,(n=>{L(n,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(n)),o&&j(o)}),(t=>{if(!n)throw`Loading data file "${e}" failed.`;n()})),o&&B(o)})(n,h,A):h(n)},Te.staticInit(),(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);me=e})(),ge=s.BindingError=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[e])).name="BindingError",o}return A(r,e),o(r)}(d(Error)),ye=s.InternalError=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[e])).name="InternalError",o}return A(r,e),o(r)}(d(Error)),Object.assign(et.prototype,{isAliasOf(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o},clone(){if(this.$$.ptr||Ne(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Je(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Ne(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Oe("Object already scheduled for deletion"),Be(this),je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ne(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Oe("Object already scheduled for deletion"),Ke.push(this),1===Ke.length&&Re&&Re(Ve),this.$$.deleteScheduled=!0,this}}),s.getInheritedInstanceCount=He,s.getLiveInheritedInstances=We,s.flushPendingDeletes=Ve,s.setDelayFunction=Ge,Object.assign(lt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;null===(t=this.rawDestructor)||void 0===t||t.call(this,e)},argPackAdvance:8,readValueFromPointer:at,fromWireType:Xe}),ut=s.UnboundTypeError=(en=Error,(nn=tt(tn="UnboundTypeError",(function(e){this.name=tn,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(en.prototype),nn.prototype.constructor=nn,nn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nn),Et.push(0,1,void 0,1,null,1,!0,1,!1,1),L(10===Et.length),s.count_emval_handles=$t;var An,an={__assert_fail:(e,t,n,r)=>{Q(`Assertion failed: ${Ae(e)}, at: `+[t?Ae(t):"unknown filename",n,r?Ae(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){Le.varargs=n;try{var r=Le.getStreamFromFD(e);switch(t){case 0:if((o=ae())<0)return-28;for(;Te.streams[o];)o++;return Te.dupStream(r,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var o=ae();return r.flags|=o,0;case 12:o=le();return _[o+0>>1]=2,0}return-28}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){Le.varargs=r;try{t=Le.getStr(t),t=Le.calculateAt(e,t);var o=r?ae():0;return Te.open(t,n,o).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{Q("native code called abort()")},_embind_register_bigint:(e,t,n,r,o)=>{},_embind_register_bool:(e,t,n,r)=>{xe(e,{name:t=Fe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(C[e])},destructorFunction:null})},_embind_register_class:(e,t,n,r,o,i,A,a,l,c,u,d,h)=>{u=Fe(u),i=pt(o,i),a&&=pt(A,a),c&&=pt(l,c),h=pt(d,h);var p=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);((e,t,n)=>{s.hasOwnProperty(e)?(Oe(`Cannot register public name '${e}' twice`),nt(s,e,e),s.hasOwnProperty(n)&&Oe(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),s[e].overloadTable[n]=t):s[e]=t})(p,(function(){vt(`Cannot construct ${u} due to unbound types`,[r])})),De([e,t,n],r?[r]:[],(t=>{var n,o;t=t[0],o=r?(n=t.registeredClass).instancePrototype:et.prototype;var A=tt(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new ge("Use 'new' to construct "+u);if(void 0===d.constructor_body)throw new ge(u+" has no accessible constructor");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=d.constructor_body[t.length];if(void 0===r)throw new ge(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,t)})),l=Object.create(o,{constructor:{value:A}});A.prototype=l;var d=new rt(u,A,l,h,n,i,a,c);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var f=new lt(u,d,!0,!1,!1),v=new lt(u+"*",d,!1,!1,!1),m=new lt(u+" const*",d,!1,!0,!1);return ze[e]={pointerType:v,constPointerType:m},((e,t,n)=>{s.hasOwnProperty(e)||Ie("Replacing nonexistent public symbol"),void 0!==s[e].overloadTable&&void 0!==n||(s[e]=t,s[e].argCount=n)})(p,A),[f,v,m]}))},_embind_register_class_constructor:(e,t,n,r,o,i)=>{L(t>0);var s=mt(t,n);o=pt(r,o),De([],[e],(e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ge(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{vt(`Cannot construct ${e.name} due to unbound types`,s)},De([],s,(r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=_t(n,r,null,o,i),[]))),[]}))},_embind_register_class_function:(e,t,n,r,o,i,s,A,a)=>{var l=mt(n,r);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?(L(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,t)):e})(t=Fe(t)),i=pt(o,i),De([],[e],(e=>{var r=`${(e=e[0]).name}.${t}`;function o(){vt(`Cannot call ${r} due to unbound types`,l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),A&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,u=c[t];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(nt(c,t,r),c[t].overloadTable[n-2]=o),De([],l,(o=>{var A=_t(r,o,e,i,s,a);return void 0===c[t].overloadTable?(A.argCount=n-2,c[t]=A):c[t].overloadTable[n-2]=A,[]})),[]}))},_embind_register_class_property:(e,t,n,r,o,i,s,A,a,l)=>{t=Fe(t),o=pt(r,o),De([],[e],(e=>{var r=`${(e=e[0]).name}.${t}`,c={get(){vt(`Cannot access ${r} due to unbound types`,[n,s])},enumerable:!0,configurable:!0};return c.set=a?()=>vt(`Cannot access ${r} due to unbound types`,[n,s]):e=>Oe(r+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,c),De([],a?[n,s]:[n],(n=>{var s=n[0],c={get(){var t=bt(this,e,r+" getter");return s.fromWireType(o(i,t))},enumerable:!0};if(a){a=pt(A,a);var u=n[1];c.set=function(t){var n=bt(this,e,r+" setter"),o=[];a(l,n,u.toWireType(o,t)),gt(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,c),[]})),[]}))},_embind_register_emval:e=>xe(e,Lt),_embind_register_float:(e,t,n)=>{xe(e,{name:t=Fe(t),fromWireType:e=>e,toWireType:(e,t)=>{if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError(`Cannot convert ${Ft(t)} to ${this.name}`);return t},argPackAdvance:8,readValueFromPointer:St(t,n),destructorFunction:null})},_embind_register_integer:(e,t,n,r,o)=>{t=Fe(t),-1===o&&(o=4294967295);var i=e=>e;if(0===r){var s=32-8*n;i=e=>e<<s>>>s}var A=t.includes("unsigned"),a=(e,n)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${Ft(e)}" to ${n}`);if(e<r||e>o)throw new TypeError(`Passing a number "${Ft(e)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${r}, ${o}]!`)};xe(e,{name:t,fromWireType:i,toWireType:A?function(e,t){return a(t,this.name),t>>>0}:function(e,t){return a(t,this.name),t},argPackAdvance:8,readValueFromPointer:Pt(t,n,0!==r),destructorFunction:null})},_embind_register_memory_view:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=E[e>>2],n=E[e+4>>2];return new r(y.buffer,n,t)}xe(e,{name:n=Fe(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=Fe(t));xe(e,{name:t,fromWireType(e){var t,r=E[e>>2],o=e+4;if(n)for(var i=o,s=0;s<=r;++s){var A=o+s;if(s==r||0==C[A]){var a=Ae(i,A-i);void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),i=A+1}}else{var l=new Array(r);for(s=0;s<r;++s)l[s]=String.fromCharCode(C[o+s]);t=l.join("")}return cn(e),t},toWireType(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Oe("Cannot pass non-string to std::string"),r=n&&o?pe(t):t.length;var i=un(4+r+1),s=i+4;if(E[i>>2]=r,n&&o)Mt(t,s,r+1);else if(o)for(var A=0;A<r;++A){var a=t.charCodeAt(A);a>255&&(cn(s),Oe("String has UTF-16 code units that do not fit in 8 bits")),C[s+A]=a}else for(A=0;A<r;++A)C[s+A]=t[A];return null!==e&&e.push(cn,i),i},argPackAdvance:8,readValueFromPointer:at,destructorFunction(e){cn(e)}})},_embind_register_std_wstring:(e,t,n)=>{var r,o,i,s;n=Fe(n),2===t?(r=It,o=Dt,s=xt,i=e=>b[e>>1]):4===t&&(r=Rt,o=Nt,s=Ut,i=e=>E[e>>2]),xe(e,{name:n,fromWireType:e=>{for(var n,o=E[e>>2],s=e+4,A=0;A<=o;++A){var a=e+4+A*t;if(A==o||0==i(a)){var l=r(s,a-s);void 0===n?n=l:(n+=String.fromCharCode(0),n+=l),s=a+t}}return cn(e),n},toWireType:(e,r)=>{"string"!=typeof r&&Oe(`Cannot pass non-string to C++ string type ${n}`);var i=s(r),A=un(4+i+t);return E[A>>2]=i/t,o(r,A+4,i+t),null!==e&&e.push(cn,A),A},argPackAdvance:8,readValueFromPointer:at,destructorFunction(e){cn(e)}})},_embind_register_void:(e,t)=>{xe(e,{isVoid:!0,name:t=Fe(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},_emval_as:(e,t,n)=>(e=Tt.toValue(e),t=Bt(t,"emval::as"),jt(t,n,e)),_emval_call_method:(e,t,n,r,o)=>{var i,s;return(e=zt[e])(t=Tt.toValue(t),t[n=void 0===(s=Qt[i=n])?Fe(i):s],r,o)},_emval_decref:kt,_emval_get_method_caller:(e,t,n)=>{var r=((e,t)=>{for(var n=new Array(e),r=0;r<e;++r)n[r]=Bt(E[t+4*r>>2],"parameter "+r);return n})(e,t),o=r.shift();e--;var i="return function (obj, func, destructorsRef, args) {\n",s=0,A=[];0===n&&A.push("obj");for(var a=["retType"],l=[o],c=0;c<e;++c)A.push("arg"+c),a.push("argType"+c),l.push(r[c]),i+=` var arg${c} = argType${c}.readValueFromPointer(args${s?"+"+s:""});\n`,s+=r[c].argPackAdvance;i+=` var rv = ${1===n?"new func":"func.call"}(${A.join(", ")});\n`,o.isVoid||(a.push("emval_returnValue"),l.push(jt),i+=" return emval_returnValue(retType, destructorsRef, rv);\n"),i+="};\n",a.push(i);var u,d,h=Ct(Function,a)(...l),p=`methodCaller<(${r.map((e=>e.name)).join(", ")}) => ${o.name}>`;return u=tt(p,h),d=zt.length,zt.push(u),d},_emval_run_destructors:e=>{var t=Tt.toValue(e);gt(t),kt(e)},_emval_take_value:(e,t)=>{var n=(e=Bt(e,"_emval_take_value")).readValueFromPointer(t);return Tt.toHandle(n)},_gmtime_js:function(e,t,n){var r=Ht(e,t),o=new Date(1e3*r);w[n>>2]=o.getUTCSeconds(),w[n+4>>2]=o.getUTCMinutes(),w[n+8>>2]=o.getUTCHours(),w[n+12>>2]=o.getUTCDate(),w[n+16>>2]=o.getUTCMonth(),w[n+20>>2]=o.getUTCFullYear()-1900,w[n+24>>2]=o.getUTCDay();var i=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-i)/864e5|0;w[n+28>>2]=s},_localtime_js:function(e,t,n){var r=Ht(e,t),o=new Date(1e3*r);w[n>>2]=o.getSeconds(),w[n+4>>2]=o.getMinutes(),w[n+8>>2]=o.getHours(),w[n+12>>2]=o.getDate(),w[n+16>>2]=o.getMonth(),w[n+20>>2]=o.getFullYear()-1900,w[n+24>>2]=o.getDay();var i=0|Vt(o);w[n+28>>2]=i,w[n+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),A=new Date(o.getFullYear(),6,1).getTimezoneOffset(),a=s.getTimezoneOffset(),l=0|(A!=a&&o.getTimezoneOffset()==Math.min(a,A));w[n+32>>2]=l},_mktime_js:function(e){var t,n=(()=>{var t=new Date(w[e+20>>2]+1900,w[e+16>>2],w[e+12>>2],w[e+8>>2],w[e+4>>2],w[e>>2],0),n=w[e+32>>2],r=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),A=Math.min(s,i);if(n<0)w[e+32>>2]=Number(i!=s&&A==r);else if(n>0!=(A==r)){var a=Math.max(s,i),l=n>0?A:a;t.setTime(t.getTime()+6e4*(l-r))}w[e+24>>2]=t.getDay();var c=0|Vt(t);w[e+28>>2]=c,w[e>>2]=t.getSeconds(),w[e+4>>2]=t.getMinutes(),w[e+8>>2]=t.getHours(),w[e+12>>2]=t.getDate(),w[e+16>>2]=t.getMonth(),w[e+20>>2]=t.getYear();var u=t.getTime();return isNaN(u)?-1:u/1e3})();return H=n,t=+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0,pn(t),n>>>0},_tzset_js:(e,t,n,r)=>{var o=(new Date).getFullYear(),i=new Date(o,0,1),s=new Date(o,6,1),A=i.getTimezoneOffset(),a=s.getTimezoneOffset(),l=Math.max(A,a);E[e>>2]=60*l,w[t>>2]=Number(A!=a);var c=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],u=c(i),d=c(s);L(u),L(d),L(pe(u)<=16,`timezone name truncated to fit in TZNAME_MAX (${u})`),L(pe(d)<=16,`timezone name truncated to fit in TZNAME_MAX (${d})`),a<A?(Mt(u,n,17),Mt(d,r,17)):(Mt(u,r,17),Mt(d,n,17))},emscripten_date_now:()=>Date.now(),emscripten_log:(e,t,n)=>{var r=Xt(t,n);((e,t)=>{24&e&&(t=t.replace(/\s+$/,""),t+=(t.length>0?"\n":"")+Jt(e)),1&e||(6&e?g(t):m(t))})(e,se(r,0))},emscripten_resize_heap:e=>{var t=C.length;L((e>>>=0)>t);var n=2147483648;if(e>n)return g(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var r,o,i=1;i<=4;i*=2){var s=t*(1+.2/i);s=Math.min(s,e+100663296);var A=Math.min(n,(r=Math.max(e,s))+((o=65536)-r%o)%o);if(rn(A))return!0}return g(`Failed to grow the heap from ${t} bytes to ${A} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var n=0;return sn().forEach(((r,o)=>{var i=t+n;E[e+4*o>>2]=i,((e,t)=>{for(var n=0;n<e.length;++n)L(e.charCodeAt(n)===(255&e.charCodeAt(n))),y[t++]=e.charCodeAt(n);y[t]=0})(r,i),n+=r.length+1})),0},environ_sizes_get:(e,t)=>{var n=sn();E[e>>2]=n.length;var r=0;return n.forEach((e=>r+=e.length+1)),E[t>>2]=r,0},fd_close:function(e){try{var t=Le.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var n=Le.getStreamFromFD(e),r=n.tty?2:Te.isDir(n.mode)?3:Te.isLink(n.mode)?7:4;return y[t]=r,_[t+2>>1]=0,W=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[t+8>>2]=W[0],w[t+12>>2]=W[1],W=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[t+16>>2]=W[0],w[t+20>>2]=W[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){try{var o=((e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var s=E[t>>2],A=E[t+4>>2];t+=8;var a=Te.read(e,y,s,A,r);if(a<0)return-1;if(o+=a,a<A)break}return o})(Le.getStreamFromFD(e),t,n);return E[r>>2]=o,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,o){var i=Ht(t,n);try{if(isNaN(i))return 61;var s=Le.getStreamFromFD(e);return Te.llseek(s,i,r),W=[s.position>>>0,(H=s.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[o>>2]=W[0],w[o+4>>2]=W[1],s.getdents&&0===i&&0===r&&(s.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){try{var o=((e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var s=E[t>>2],A=E[t+4>>2];t+=8;var a=Te.write(e,y,s,A,r);if(a<0)return-1;o+=a}return o})(Le.getStreamFromFD(e),t,n);return E[r>>2]=o,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}},ln=function(){var e={env:an,wasi_snapshot_preview1:an};function t(e,t){var n;return ln=e.exports,L(v=ln.memory,"memory not found in wasm exports"),F(),L(ct=ln.__indirect_function_table,"table not found in wasm exports"),n=ln.__wasm_call_ctors,M.unshift(n),j("wasm-instantiate"),ln}B("wasm-instantiate");var n,r,o,i=s;if(s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){return g(`Module.instantiateWasm callback failed with error: ${e}`),!1}return z||(z=Y()),n=z,r=e,o=function(e){L(s===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)},f||"function"!=typeof WebAssembly.instantiateStreaming||K(n)||"function"!=typeof fetch?Z(n,r,o):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(o,(function(e){return g(`wasm streaming compile failed: ${e}`),g("falling back to ArrayBuffer instantiation"),Z(n,r,o)})))),{}}(),cn=G("free",1),un=G("malloc",1),dn=G("__getTypeName",1),hn=G("fflush",1),pn=G("_emscripten_tempret_set",1),fn=()=>(fn=ln.emscripten_stack_init)(),vn=()=>(vn=ln.emscripten_stack_get_end)();function mn(){var e;fn(),L(!(3&(e=vn()))),0==e&&(e+=4),E[e>>2]=34821223,E[e+4>>2]=2310721022,E[0]=1668509029}function gn(){function e(){An||(An=!0,s.calledRun=!0,T||(L(!I),I=!0,S(),s.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ne(M),s.onRuntimeInitialized&&s.onRuntimeInitialized(),L(!s._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(S(),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)e=s.postRun.shift(),O.unshift(e);var e;ne(O)}()))}D>0||(mn(),function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)e=s.preRun.shift(),P.unshift(e);var e;ne(P)}(),D>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e(),S()))}if(s.dynCall_ijiii=G("dynCall_ijiii",6),s.dynCall_viiijj=G("dynCall_viiijj",8),s.dynCall_jij=G("dynCall_jij",4),s.dynCall_jii=G("dynCall_jii",3),s.dynCall_jiji=G("dynCall_jiji",5),s._ff_h264_cabac_tables=119404,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","stackAlloc","getTempRet0","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","setWasmTableEntry","handleException","keepRuntimeAlive","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","intArrayToString","AsciiToString","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","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","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","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","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace","getFunctionArgsName","createJsInvokerSignature","registerInheritedInstance","unregisterInheritedInstance","enumReadValueFromPointer","emval_get_global"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){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}')`,J(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),oe(t)}}),te(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","wasmMemory","wasmExports","writeStackCookie","checkStackCookie","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","stackSave","stackRestore","setTempRet0","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","emscriptenLog","readEmAsmArgsArray","jstoi_s","getExecutableName","dynCallLegacy","getDynCaller","dynCall","getWasmTableEntry","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","freeTableIndexes","functionsInTableMap","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","jsStackTrace","getCallstack","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","getFunctionName","heap32VectorToArray","requireRegisteredType","usesDestructorStack","createJsInvoker","UnboundTypeError","PureVirtualError","GenericWireTypeSize","EmValType","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","integerReadValueFromPointer","floatReadValueFromPointer","readPointer","runDestructors","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_freelist","emval_handles","emval_symbols","init_emval","count_emval_handles","getStringOrSymbol","Emval","emval_returnValue","emval_lookupTypes","emval_methodCallers","emval_addMethodCaller","reflectConstruct"].forEach(te),R=function e(){An||gn(),An||(R=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return gn(),h=s}(),m=e(v),g={exports:{}};var y=(f||(f=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var A=new o(r,i||e,s),a=n?n+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],A]:e._events[a].push(A):(e._events[a]=A,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function A(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),A.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},A.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,s=new Array(i);o<i;o++)s[o]=r[o].fn;return s},A.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},A.prototype.emit=function(e,t,r,o,i,s){var A=n?n+e:e;if(!this._events[A])return!1;var a,l,c=this._events[A],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,s),!0}for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];c.fn.apply(c.context,a)}else{var d,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,r);break;case 4:c[l].fn.call(c[l].context,t,r,o);break;default:if(!a)for(d=1,a=new Array(u-1);d<u;d++)a[d-1]=arguments[d];c[l].fn.apply(c[l].context,a)}}return!0},A.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},A.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},A.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var A=this._events[i];if(A.fn)A.fn!==t||o&&!A.once||r&&A.context!==r||s(this,i);else{for(var a=0,l=[],c=A.length;a<c;a++)(A[a].fn!==t||o&&!A[a].once||r&&A[a].context!==r)&&l.push(A[a]);l.length?this._events[i]=1===l.length?l[0]:l:s(this,i)}return this},A.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=n,A.EventEmitter=A,e.exports=A}(g)),g.exports),C=e(y);
|
|
9
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t,n){return t=o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(s())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&A(o,n.prototype),o}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),A(n,e)},l(e)}var c,u;var d,h=function(){if(u)return c;u=1;var e=!0;if((A=void 0!==A?A:{}).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 o,s,A={print:function(e){},printErr:function(e){postMessage({cmd:"wasmError",message:e})}},a=Object.assign({},A),d="./this.program",h="";if("undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),h=h.startsWith("blob:")?"":h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof 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?)");o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)};var p,f,m,g=A.print||console.log.bind(console),v=A.printErr||console.error.bind(console);Object.assign(A,a),a=null,p="fetchSettings",Object.getOwnPropertyDescriptor(A,p)&&Q(`\`Module.${p}\` was supplied but \`${p}\` not included in INCOMING_MODULE_JS_API`),A.arguments&&A.arguments,X("arguments","arguments_"),A.thisProgram&&(d=A.thisProgram),X("thisProgram","thisProgram"),A.quit&&A.quit,X("quit","quit_"),L(void 0===A.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),L(void 0===A.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),L(void 0===A.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),L(void 0===A.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),L(void 0===A.read,"Module.read option was removed (modify read_ in JS)"),L(void 0===A.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),L(void 0===A.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),L(void 0===A.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),L(void 0===A.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),X("asm","wasmExports"),X("read","read_"),X("readAsync","readAsync"),X("readBinary","readBinary"),X("setWindowTitle","setWindowTitle"),L(!0,"worker environment detected but not enabled at build time. Add `worker` to `-sENVIRONMENT` to enable."),L(!0,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),L(!0,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),A.wasmBinary&&(f=A.wasmBinary),X("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&v("no native wasm support detected");var y,C,_,b,w,E,$,k,T=!1;function L(e,t){e||Q("Assertion failed"+(t?": "+t:""))}function F(){var e=m.buffer;A.HEAP8=y=new Int8Array(e),A.HEAP16=_=new Int16Array(e),A.HEAPU8=C=new Uint8Array(e),A.HEAPU16=b=new Uint16Array(e),A.HEAP32=w=new Int32Array(e),A.HEAPU32=E=new Uint32Array(e),A.HEAPF32=$=new Float32Array(e),A.HEAPF64=k=new Float64Array(e)}function S(){if(!T){var e=mn();0==e&&(e+=4);var t=E[e>>2],n=E[e+4>>2];34821223==t&&2310721022==n||Q(`Stack overflow! Stack cookie has been overwritten at ${re(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${re(n)} ${re(t)}`),1668509029!=E[0]&&Q("Runtime error: The application has corrupted its heap memory area (address zero)!")}}L(!A.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),L("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),L(!A.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),L(!A.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 P=[],M=[],O=[],I=!1;L(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),L(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 D=0,x=null,R=null,N={};function U(e){for(var t=e;;){if(!N[e])return e;e=t+Math.random()}}function B(e){var t,n;D++,null===(t=(n=A).monitorRunDependencies)||void 0===t||t.call(n,D),e?(L(!N[e]),N[e]=1,null===x&&"undefined"!=typeof setInterval&&(x=setInterval((()=>{if(T)return clearInterval(x),void(x=null);var e=!1;for(var t in N)e||(e=!0,v("still waiting on run dependencies:")),v(`dependency: ${t}`);e&&v("(end of list)")}),1e4))):v("warning: run dependency added without ID")}function j(e){var t,n;if(D--,null===(t=(n=A).monitorRunDependencies)||void 0===t||t.call(n,D),e?(L(N[e]),delete N[e]):v("warning: run dependency removed without ID"),0==D&&(null!==x&&(clearInterval(x),x=null),R)){var r=R;R=null,r()}}function Q(e){var t,n;throw null===(t=(n=A).onAbort)||void 0===t||t.call(n,e),v(e="Aborted("+e+")"),T=!0,new WebAssembly.RuntimeError(e)}var z,H,W,K=e=>e.startsWith("data:application/octet-stream;base64,"),V=e=>e.startsWith("file://");function G(e,t){return function(){L(I,`native function \`${e}\` called before runtime initialization`);var n=ln[e];return L(n,`exported native function \`${e}\` not found`),L(arguments.length<=t,`native function \`${e}\` called with ${arguments.length} args but expects ${t}`),n(...arguments)}}function Y(){var e,t="decoder.wasm";return K(t)?t:(e=t,A.locateFile?A.locateFile(e,h):h+e)}function q(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function Z(t,n,r){return function(t){return!f&&e&&"function"==typeof fetch?fetch(t,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw`failed to load wasm binary file at '${t}'`;return e.arrayBuffer()})).catch((()=>q(t))):Promise.resolve().then((()=>q(t)))}(t).then((e=>WebAssembly.instantiate(e,n))).then(r,(e=>{v(`failed to asynchronously prepare wasm: ${e}`),V(z)&&v(`warning: Loading from a file URI (${z}) 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 X(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Object.getOwnPropertyDescriptor(A,e)||Object.defineProperty(A,e,{configurable:!0,get(){Q(`\`Module.${e}\` has been replaced by \`${t}\``+(n?" (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 J(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 ee(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){oe(`\`${e}\` is not longer defined by emscripten. ${t}`)}})}function te(e){Object.getOwnPropertyDescriptor(A,e)||Object.defineProperty(A,e,{configurable:!0,get(){var t=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;J(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Q(t)}})}ee("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ee("asm","Please use wasmExports instead");var ne=e=>{for(;e.length>0;)e.shift()(A)};A.noExitRuntime;var re=e=>(L("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),oe=e=>{oe.shown||={},oe.shown[e]||(oe.shown[e]=1,v(e))},ie="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,se=(e,t,n)=>{for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&ie)return ie.decode(e.subarray(t,o));for(var i="";t<o;){var s=e[t++];if(128&s){var A=63&e[t++];if(192!=(224&s)){var a=63&e[t++];if(224==(240&s)?s=(15&s)<<12|A<<6|a:(240!=(248&s)&&oe("Invalid UTF-8 leading byte "+re(s)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),s=(7&s)<<18|A<<12|a<<6|63&e[t++]),s<65536)i+=String.fromCharCode(s);else{var l=s-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&s)<<6|A)}else i+=String.fromCharCode(s)}return i},Ae=(e,t)=>(L("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?se(C,e,t):"");function ae(){L(null!=Le.varargs);var e=w[+Le.varargs>>2];return Le.varargs+=4,e}var le=ae,ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),n="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ce.normalize(t.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=e=>(ue=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);Q("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),de={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:Te.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=ce.isAbs(r)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var r=n(e.split("/")),o=n(t.split("/")),i=Math.min(r.length,o.length),s=i,A=0;A<i;A++)if(r[A]!==o[A]){s=A;break}var a=[];for(A=s;A<r.length;A++)a.push("..");return(a=a.concat(o.slice(s))).join("/")}},he=[],pe=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},fe=(e,t,n,r)=>{if(L("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var o=n,i=n+r-1,s=0;s<e.length;++s){var A=e.charCodeAt(s);if(A>=55296&&A<=57343)A=65536+((1023&A)<<10)|1023&e.charCodeAt(++s);if(A<=127){if(n>=i)break;t[n++]=A}else if(A<=2047){if(n+1>=i)break;t[n++]=192|A>>6,t[n++]=128|63&A}else if(A<=65535){if(n+2>=i)break;t[n++]=224|A>>12,t[n++]=128|A>>6&63,t[n++]=128|63&A}else{if(n+3>=i)break;A>1114111&&oe("Invalid Unicode code point "+re(A)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++]=240|A>>18,t[n++]=128|A>>12&63,t[n++]=128|A>>6&63,t[n++]=128|63&A}}return t[n]=0,n-o};function me(e,t,n){var r=pe(e)+1,o=new Array(r),i=fe(e,o,0,o.length);return o.length=i,o}var ge,ve,ye,Ce={ttys:[],init(){},shutdown(){},register(e,t){Ce.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,Ce.stream_ops)},stream_ops:{open(e){var t=Ce.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,o){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var i=0,s=0;s<r;s++){var A;try{A=e.tty.ops.get_char(e.tty)}catch(e){throw new Te.ErrnoError(29)}if(void 0===A&&0===i)throw new Te.ErrnoError(6);if(null==A)break;i++,t[n+s]=A}return i&&(e.node.timestamp=Date.now()),i},write(e,t,n,r,o){if(!e.tty||!e.tty.ops.put_char)throw new Te.ErrnoError(60);try{for(var i=0;i<r;i++)e.tty.ops.put_char(e.tty,t[n+i])}catch(e){throw new Te.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:e=>(()=>{if(!he.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;he=me(e)}return he.shift()})(),put_char(e,t){null===t||10===t?(g(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(g(se(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(v(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(v(se(e.output,0)),e.output=[])}}},_e=e=>{Q("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,n,r){if(Te.isBlkdev(n)||Te.isFIFO(n))throw new Te.ErrnoError(63);be.ops_table||={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:Te.chrdev_stream_ops}};var o=Te.createNode(e,t,n,r);return Te.isDir(o.mode)?(o.node_ops=be.ops_table.dir.node,o.stream_ops=be.ops_table.dir.stream,o.contents={}):Te.isFile(o.mode)?(o.node_ops=be.ops_table.file.node,o.stream_ops=be.ops_table.file.stream,o.usedBytes=0,o.contents=null):Te.isLink(o.mode)?(o.node_ops=be.ops_table.link.node,o.stream_ops=be.ops_table.link.stream):Te.isChrdev(o.mode)&&(o.node_ops=be.ops_table.chrdev.node,o.stream_ops=be.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,n,r)=>be.createNode(e,t,n,r),rename(e,t,n){if(Te.isDir(e.mode)){var r;try{r=Te.lookupNode(t,n)}catch(e){}if(r)for(var o in r.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=Te.lookupNode(e,t);for(var r in n.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=be.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-o,r);if(L(s>=0),s>8&&i.subarray)t.set(i.subarray(o,o+s),n);else for(var A=0;A<s;A++)t[n+A]=i[o+A];return s},write(e,t,n,r,o,i){if(L(!(t instanceof ArrayBuffer)),t.buffer===y.buffer&&(i=!1),!r)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return L(0===o,"canOwn must imply no weird position inside the file"),s.contents=t.subarray(n,n+r),s.usedBytes=r,r;if(0===s.usedBytes&&0===o)return s.contents=t.slice(n,n+r),s.usedBytes=r,r;if(o+r<=s.usedBytes)return s.contents.set(t.subarray(n,n+r),o),r}if(be.expandFileStorage(s,o+r),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(n,n+r),o);else for(var A=0;A<r;A++)s.contents[o+A]=t[n+A];return s.usedBytes=Math.max(s.usedBytes,o+r),r},llseek(e,t,n){var r=t;if(1===n?r+=e.position:2===n&&Te.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new Te.ErrnoError(28);return r},allocate(e,t,n){be.expandFileStorage(e.node,t+n),e.node.usedBytes=Math.max(e.node.usedBytes,t+n)},mmap(e,t,n,r,o){if(!Te.isFile(e.node.mode))throw new Te.ErrnoError(43);var i,s,A=e.node.contents;if(2&o||A.buffer!==y.buffer){if((n>0||n+t<A.length)&&(A=A.subarray?A.subarray(n,n+t):Array.prototype.slice.call(A,n,n+t)),s=!0,!(i=_e()))throw new Te.ErrnoError(48);y.set(A,i)}else s=!1,i=A.byteOffset;return{ptr:i,allocated:s}},msync:(e,t,n,r,o)=>(be.stream_ops.write(e,t,0,r,n,!1),0)}},we=A.preloadPlugins||[],Ee=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},$e={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ke={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:function(e){function o(e){var r;for(var i in n(this,o),(r=t(this,o,[$e[e]])).name="ErrnoError",r.errno=e,ke)if(ke[i]===e){r.code=i;break}return r}return i(o,e),r(o)}(l(Error)),genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:function(){return r((function e(){n(this,e),this.shared={}}),[{key:"object",get:function(){return this.node},set:function(e){this.node=e}},{key:"isRead",get:function(){return 1!=(2097155&this.flags)}},{key:"isWrite",get:function(){return!!(2097155&this.flags)}},{key:"isAppend",get:function(){return 1024&this.flags}},{key:"flags",get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},{key:"position",get:function(){return this.shared.position},set:function(e){this.shared.position=e}}])}(),FSNode:function(){return r((function e(t,r,o,i){n(this,e),t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Te.nextInode++,this.name=r,this.mode=o,this.node_ops={},this.stream_ops={},this.rdev=i,this.readMode=365,this.writeMode=146}),[{key:"read",get:function(){return(this.mode&this.readMode)===this.readMode},set:function(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}},{key:"write",get:function(){return(this.mode&this.writeMode)===this.writeMode},set:function(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}},{key:"isFolder",get:function(){return Te.isDir(this.mode)}},{key:"isDevice",get:function(){return Te.isChrdev(this.mode)}}])}(),lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),r=Te.root,o="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&t.parent)break;if(r=Te.lookupNode(r,n[i]),o=ce.join2(o,n[i]),Te.isMountpoint(r)&&(!s||s&&t.follow_mount)&&(r=r.mounted.root),!s||t.follow)for(var A=0;Te.isLink(r.mode);){var a=Te.readlink(o);if(o=de.resolve(ce.dirname(o),a),r=Te.lookupPath(o,{recurse_count:t.recurse_count+1}).node,A++>40)throw new Te.ErrnoError(32)}}return{path:o,node:r}},getPath(e){for(var t;;){if(Te.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?`${n}/${t}`:n+t:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var n=Te.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=Te.mayLookup(e);if(n)throw new Te.ErrnoError(n);for(var r=Te.hashName(e.id,t),o=Te.nameTable[r];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Te.lookup(e,t)},createNode(e,t,n,r){L("object"==typeof e);var o=new Te.FSNode(e,t,n,r);return Te.hashAddNode(o),o},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!Te.isDir(e.mode))return 54;var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Te.lookupNode(e,t);return 20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,n){var r;try{r=Te.lookupNode(e,t)}catch(e){return e.errno}var o=Te.nodePermissions(e,"wx");if(o)return o;if(n){if(!Te.isDir(r.mode))return 54;if(Te.isRoot(r)||Te.getPath(r)===Te.cwd())return 10}else if(Te.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},dupStream(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;var o=Te.createStream(e,r);return null===(t=o.stream_ops)||void 0===t||null===(n=t.dup)||void 0===n||n.call(t,o),o},chrdev_stream_ops:{open(e){var t,n,r=Te.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,null===(t=(n=e.stream_ops).open)||void 0===t||t.call(n,e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&v(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=Te.getMounts(Te.root.mount),r=0;function o(e){return L(Te.syncFSRequests>0),Te.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++r>=n.length&&o(null)}n.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,n){if("string"==typeof e)throw e;var r,o="/"===n,i=!n;if(o&&Te.root)throw new Te.ErrnoError(10);if(!o&&!i){var s=Te.lookupPath(n,{follow_mount:!1});if(n=s.path,r=s.node,Te.isMountpoint(r))throw new Te.ErrnoError(10);if(!Te.isDir(r.mode))throw new Te.ErrnoError(54)}var A={type:e,opts:t,mountpoint:n,mounts:[]},a=e.mount(A);return a.mount=A,A.root=a,o?Te.root=a:r&&(r.mounted=A,r.mount&&r.mount.mounts.push(A)),a},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var n=t.node,r=n.mounted,o=Te.getMounts(r);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var n=t.name_next;o.includes(t.mount)&&Te.destroyNode(t),t=n}})),n.mounted=null;var i=n.mount.mounts.indexOf(r);L(-1!==i),n.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=Te.lookupPath(e,{parent:!0}).node,o=ce.basename(e);if(!o||"."===o||".."===o)throw new Te.ErrnoError(28);var i=Te.mayCreate(r,o);if(i)throw new Te.ErrnoError(i);if(!r.node_ops.mknod)throw new Te.ErrnoError(63);return r.node_ops.mknod(r,o,t,n)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",o=0;o<n.length;++o)if(n[o]){r+="/"+n[o];try{Te.mkdir(r,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,n)=>(void 0===n&&(n=t,t=438),t|=8192,Te.mknod(e,t,n)),symlink(e,t){if(!de.resolve(e))throw new Te.ErrnoError(44);var n=Te.lookupPath(t,{parent:!0}).node;if(!n)throw new Te.ErrnoError(44);var r=ce.basename(t),o=Te.mayCreate(n,r);if(o)throw new Te.ErrnoError(o);if(!n.node_ops.symlink)throw new Te.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,o=ce.dirname(e),i=ce.dirname(t),s=ce.basename(e),A=ce.basename(t);if(n=Te.lookupPath(e,{parent:!0}).node,r=Te.lookupPath(t,{parent:!0}).node,!n||!r)throw new Te.ErrnoError(44);if(n.mount!==r.mount)throw new Te.ErrnoError(75);var a,l=Te.lookupNode(n,s),c=de.relative(e,i);if("."!==c.charAt(0))throw new Te.ErrnoError(28);if("."!==(c=de.relative(t,o)).charAt(0))throw new Te.ErrnoError(55);try{a=Te.lookupNode(r,A)}catch(e){}if(l!==a){var u=Te.isDir(l.mode),d=Te.mayDelete(n,s,u);if(d)throw new Te.ErrnoError(d);if(d=a?Te.mayDelete(r,A,u):Te.mayCreate(r,A))throw new Te.ErrnoError(d);if(!n.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(l)||a&&Te.isMountpoint(a))throw new Te.ErrnoError(10);if(r!==n&&(d=Te.nodePermissions(n,"w")))throw new Te.ErrnoError(d);Te.hashRemoveNode(l);try{n.node_ops.rename(l,r,A)}catch(e){throw e}finally{Te.hashAddNode(l)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,n=ce.basename(e),r=Te.lookupNode(t,n),o=Te.mayDelete(t,n,!0);if(o)throw new Te.ErrnoError(o);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(r))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,n),Te.destroyNode(r)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var n=ce.basename(e),r=Te.lookupNode(t,n),o=Te.mayDelete(t,n,!1);if(o)throw new Te.ErrnoError(o);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(r))throw new Te.ErrnoError(10);t.node_ops.unlink(t,n),Te.destroyNode(r)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return de.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=Te.lookupPath(e,{follow:!t}).node;if(!n)throw new Te.ErrnoError(44);if(!n.node_ops.getattr)throw new Te.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>Te.stat(e,!0),chmod(e,t,n){var r;"string"==typeof e?r=Te.lookupPath(e,{follow:!n}).node:r=e;if(!r.node_ops.setattr)throw new Te.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var n=Te.getStreamChecked(e);Te.chmod(n.node,t)},chown(e,t,n,r){var o;"string"==typeof e?o=Te.lookupPath(e,{follow:!r}).node:o=e;if(!o.node_ops.setattr)throw new Te.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,n){Te.chown(e,t,n,!0)},fchown(e,t,n){var r=Te.getStreamChecked(e);Te.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var n;"string"==typeof e?n=Te.lookupPath(e,{follow:!0}).node:n=e;if(!n.node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(n.mode))throw new Te.ErrnoError(31);if(!Te.isFile(n.mode))throw new Te.ErrnoError(28);var r=Te.nodePermissions(n,"w");if(r)throw new Te.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=Te.getStreamChecked(e);if(!(2097155&n.flags))throw new Te.ErrnoError(28);Te.truncate(n.node,t)},utime(e,t,n){var r=Te.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,t,n){if(""===e)throw new Te.ErrnoError(44);var r;if(n=void 0===n?438:n,n=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&n|32768:0,"object"==typeof e)r=e;else{e=ce.normalize(e);try{r=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(r){if(128&t)throw new Te.ErrnoError(20)}else r=Te.mknod(e,n,0),o=!0;if(!r)throw new Te.ErrnoError(44);if(Te.isChrdev(r.mode)&&(t&=-513),65536&t&&!Te.isDir(r.mode))throw new Te.ErrnoError(54);if(!o){var i=Te.mayOpen(r,t);if(i)throw new Te.ErrnoError(i)}512&t&&!o&&Te.truncate(r,0),t&=-131713;var s=Te.createStream({node:r,path:Te.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!A.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),s},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,o){if(L(n>=0),r<0||o<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Te.ErrnoError(70)}else o=e.position;var s=e.stream_ops.read(e,t,n,r,o);return i||(e.position+=s),s},write(e,t,n,r,o,i){if(L(n>=0),r<0||o<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var s=void 0!==o;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else o=e.position;var A=e.stream_ops.write(e,t,n,r,o,i);return s||(e.position+=A),A},allocate(e,t,n){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||n<=0)throw new Te.ErrnoError(28);if(!(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,o){if(2&r&&!(2&o)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,n,r,o)},msync:(e,t,n,r,o)=>(L(n>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,o):0),ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var n,r=Te.open(e,t.flags),o=Te.stat(e).size,i=new Uint8Array(o);return Te.read(r,i,0,o,0),"utf8"===t.encoding?n=se(i,0):"binary"===t.encoding&&(n=i),Te.close(r),n},writeFile(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.flags=n.flags||577;var r=Te.open(e,n.flags,n.mode);if("string"==typeof t){var o=new Uint8Array(pe(t)+1),i=fe(t,o,0,o.length);Te.write(r,o,0,i,void 0,n.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(r,t,0,t.byteLength,void 0,n.canOwn)}Te.close(r)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var n=Te.nodePermissions(t.node,"x");if(n)throw new Te.ErrnoError(n);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,n,r,o)=>r}),Te.mkdev("/dev/null",Te.makedev(1,3)),Ce.register(Te.makedev(5,0),Ce.default_tty_ops),Ce.register(Te.makedev(6,0),Ce.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Te.createDevice("/dev","random",n),Te.createDevice("/dev","urandom",n),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=+t,r=Te.getStreamChecked(n),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){A.stdin?Te.createDevice("/dev","stdin",A.stdin):Te.symlink("/dev/tty","/dev/stdin"),A.stdout?Te.createDevice("/dev","stdout",null,A.stdout):Te.symlink("/dev/tty","/dev/stdout"),A.stderr?Te.createDevice("/dev","stderr",null,A.stderr):Te.symlink("/dev/tty1","/dev/stderr");var e=Te.open("/dev/stdin",0),t=Te.open("/dev/stdout",1),n=Te.open("/dev/stderr",1);L(0===e.fd,`invalid handle for stdin (${e.fd})`),L(1===t.fd,`invalid handle for stdout (${t.fd})`),L(2===n.fd,`invalid handle for stderr (${n.fd})`)},staticInit(){[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack="<generic error, no stack>"})),Te.nameTable=new Array(4096),Te.mount(be,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:be}},init(e,t,n){L(!Te.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Te.init.initialized=!0,A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=n||A.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1,hn(0);for(var e=0;e<Te.streams.length;e++){var t=Te.streams[e];t&&Te.close(t)}},findObject(e,t){var n=Te.analyzePath(e,t);return n.exists?n.object:null},analyzePath(e,t){try{e=(r=Te.lookupPath(e,{follow:!t})).path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=Te.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=r.path,n.parentObject=r.node,n.name=ce.basename(e),r=Te.lookupPath(e,{follow:!t}),n.exists=!0,n.path=r.path,n.object=r.node,n.name=r.node.name,n.isRoot="/"===r.path}catch(e){n.error=e.errno}return n},createPath(e,t,n,r){e="string"==typeof e?e:Te.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var s=ce.join2(e,i);try{Te.mkdir(s)}catch(e){}e=s}}return s},createFile(e,t,n,r,o){var i=ce.join2("string"==typeof e?e:Te.getPath(e),t),s=Ee(r,o);return Te.create(i,s)},createDataFile(e,t,n,r,o,i){var s=t;e&&(e="string"==typeof e?e:Te.getPath(e),s=t?ce.join2(e,t):e);var A=Ee(r,o),a=Te.create(s,A);if(n){if("string"==typeof n){for(var l=new Array(n.length),c=0,u=n.length;c<u;++c)l[c]=n.charCodeAt(c);n=l}Te.chmod(a,146|A);var d=Te.open(a,577);Te.write(d,n,0,n.length,0,i),Te.close(d),Te.chmod(a,A)}},createDevice(e,t,n,r){var o=ce.join2("string"==typeof e?e:Te.getPath(e),t),i=Ee(!!n,!!r);Te.createDevice.major||(Te.createDevice.major=64);var s=Te.makedev(Te.createDevice.major++,0);return Te.registerDevice(s,{open(e){e.seekable=!1},close(e){var t;null!=r&&null!==(t=r.buffer)&&void 0!==t&&t.length&&r(10)},read(e,t,r,o,i){for(var s=0,A=0;A<o;A++){var a;try{a=n()}catch(e){throw new Te.ErrnoError(29)}if(void 0===a&&0===s)throw new Te.ErrnoError(6);if(null==a)break;s++,t[r+A]=a}return s&&(e.node.timestamp=Date.now()),s},write(e,t,n,o,i){for(var s=0;s<o;s++)try{r(t[n+s])}catch(e){throw new Te.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),s}}),Te.mkdev(o,i,s)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=me(o(e.url)),e.usedBytes=e.contents.length}catch(e){throw new Te.ErrnoError(29)}},createLazyFile(e,t,n,r,o){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:n},s=Te.createFile(e,t,i,r,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var A={};function a(e,t,n,r,o){var i=e.node.contents;if(o>=i.length)return 0;var s=Math.min(i.length-o,r);if(L(s>=0),i.slice)for(var A=0;A<s;A++)t[n+A]=i[o+A];else for(A=0;A<s;A++)t[n+A]=i.get(o+A);return s}return Object.keys(s.stream_ops).forEach((e=>{var t=s.stream_ops[e];A[e]=function(){return Te.forceLoadFile(s),t(...arguments)}})),A.read=(e,t,n,r,o)=>(Te.forceLoadFile(s),a(e,t,n,r,o)),A.mmap=(e,t,n,r,o)=>{Te.forceLoadFile(s);var i=_e();if(!i)throw new Te.ErrnoError(48);return a(e,y,i,t,n),{ptr:i,allocated:!0}},s.stream_ops=A,s},absolutePath(){Q("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){Q("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){Q("FS.createLink has been removed; use FS.symlink instead")},joinPath(){Q("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){Q("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){Q("FS.standardizePath has been removed; use PATH.normalize instead")}},Le={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(ce.isAbs(t))return t;var r;-100===e?r=Te.cwd():r=Le.getStreamFromFD(e).path;if(0==t.length){if(!n)throw new Te.ErrnoError(44);return r}return ce.join2(r,t)},doStat(e,t,n){var r=e(t);w[n>>2]=r.dev,w[n+4>>2]=r.mode,E[n+8>>2]=r.nlink,w[n+12>>2]=r.uid,w[n+16>>2]=r.gid,w[n+20>>2]=r.rdev,W=[r.size>>>0,(H=r.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+24>>2]=W[0],w[n+28>>2]=W[1],w[n+32>>2]=4096,w[n+36>>2]=r.blocks;var o=r.atime.getTime(),i=r.mtime.getTime(),s=r.ctime.getTime();return W=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+40>>2]=W[0],w[n+44>>2]=W[1],E[n+48>>2]=o%1e3*1e3,W=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+56>>2]=W[0],w[n+60>>2]=W[1],E[n+64>>2]=i%1e3*1e3,W=[Math.floor(s/1e3)>>>0,(H=Math.floor(s/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+72>>2]=W[0],w[n+76>>2]=W[1],E[n+80>>2]=s%1e3*1e3,W=[r.ino>>>0,(H=r.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[n+88>>2]=W[0],w[n+92>>2]=W[1],0},doMsync(e,t,n,r,o){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&r)return 0;var i=C.slice(e,e+n);Te.msync(t,i,o,n,r)},getStreamFromFD:e=>Te.getStreamChecked(e),varargs:void 0,getStr:e=>Ae(e)},Fe=e=>{for(var t="",n=e;C[n];)t+=ge[C[n++]];return t},Se={},Pe={},Me={},Oe=e=>{throw new ve(e)},Ie=e=>{throw new ye(e)},De=(e,t,n)=>{function r(t){var r=n(t);r.length!==e.length&&Ie("Mismatched type converter count");for(var o=0;o<e.length;++o)xe(e[o],r[o])}e.forEach((function(e){Me[e]=t}));var o=new Array(t.length),i=[],s=0;t.forEach(((e,t)=>{Pe.hasOwnProperty(e)?o[t]=Pe[e]:(i.push(e),Se.hasOwnProperty(e)||(Se[e]=[]),Se[e].push((()=>{o[t]=Pe[e],++s===i.length&&r(o)})))})),0===i.length&&r(o)};function xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var r=t.name;if(e||Oe(`type "${r}" must have a positive integer typeid pointer`),Pe.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Oe(`Cannot register type '${r}' twice`)}if(Pe[e]=t,delete Me[e],Se.hasOwnProperty(e)){var o=Se[e];delete Se[e],o.forEach((e=>e()))}}(e,t,n)}var Re,Ne=e=>{Oe(e.$$.ptrType.registeredClass.name+" instance already deleted")},Ue=!1,Be=e=>{},je=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Qe=(e,t,n)=>{if(t===n)return e;if(void 0===n.baseClass)return null;var r=Qe(e,t,n.baseClass);return null===r?null:n.downcast(r)},ze={},He=()=>Object.keys(Ye).length,We=()=>{var e=[];for(var t in Ye)Ye.hasOwnProperty(t)&&e.push(Ye[t]);return e},Ke=[],Ve=()=>{for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}},Ge=e=>{Re=e,Ke.length&&Re&&Re(Ve)},Ye={},qe=(e,t)=>(t=((e,t)=>{for(void 0===t&&Oe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Ye[t]),Ze=(e,t)=>(t.ptrType&&t.ptr||Ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Je(Object.create(e,{$$:{value:t,writable:!0}})));function Xe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=qe(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?Ze(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ze(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,s=this.registeredClass.getActualType(t),A=ze[s];if(!A)return o.call(this);i=this.isConst?A.constPointerType:A.pointerType;var a=Qe(t,this.registeredClass,i.registeredClass);return null===a?o.call(this):this.isSmartPointer?Ze(i.registeredClass.instancePrototype,{ptrType:i,ptr:a,smartPtrType:this,smartPtr:e}):Ze(i.registeredClass.instancePrototype,{ptrType:i,ptr:a})}var Je=e=>"undefined"==typeof FinalizationRegistry?(Je=e=>e,e):(Ue=new FinalizationRegistry((e=>{je(e.$$)})),Je=e=>{var t=e.$$;if(!!t.smartPtr){var n={$$:t},r=t.ptrType.registeredClass;n.leakWarning=new Error(`Embind found a leaked C++ instance ${r.name} <${re(t.ptr)}>.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(n.leakWarning,Xe),Ue.register(e,n,e)}return e},Be=e=>Ue.unregister(e),Je(e));function et(){}var tt=(e,t)=>Object.defineProperty(t,"name",{value:e}),nt=(e,t,n)=>{if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e[t].overloadTable.hasOwnProperty(o.length)||Oe(`Function '${n}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}};function rt(e,t,n,r,o,i,s,A){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=s,this.downcast=A,this.pureVirtualFunctions=[]}var ot=(e,t,n)=>{for(;t!==n;)t.upcast||Oe(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function it(e,t){if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),0;t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ot(t.$$.ptr,n,this.registeredClass)}function st(e,t){var n;if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t&&t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Oe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=ot(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Oe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Oe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,Tt.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,n)}break;default:Oe("Unsupporting sharing policy")}return n}function At(e,t){if(null===t)return this.isReference&&Oe(`null is not a valid ${this.name}`),0;t.$$||Oe(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||Oe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Oe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ot(t.$$.ptr,n,this.registeredClass)}function at(e){return this.fromWireType(E[e>>2])}function lt(e,t,n,r,o,i,s,A,a,l,c){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=s,this.rawGetPointee=A,this.rawConstructor=a,this.rawShare=l,this.rawDestructor=c,o||void 0!==t.baseClass?this.toWireType=st:r?(this.toWireType=it,this.destructorFunction=null):(this.toWireType=At,this.destructorFunction=null)}var ct,ut,dt=e=>ct.get(e),ht=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.includes("j")?((e,t,n)=>(L("dynCall_"+(e=e.replace(/p/g,"i"))in A,`bad function pointer type - dynCall function not found for sig '${e}'`),null!=n&&n.length?L(n.length===e.substring(1).replace(/j/g,"--").length):L(1==e.length),(0,A["dynCall_"+e])(t,...n)))(e,t,n):(L(dt(t),`missing table entry in dynCall: ${t}`),dt(t)(...n))},pt=(e,t)=>{var n,r,o=(e=Fe(e)).includes("j")?(r=t,L((n=e).includes("j")||n.includes("p"),"getDynCaller should only be called with i64 sigs"),function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return ht(n,r,t)}):dt(t);return"function"!=typeof o&&Oe(`unknown function pointer with signature ${e}: ${t}`),o},ft=e=>{var t=dn(e),n=Fe(t);return cn(t),n},mt=(e,t)=>{var n=[],r={};throw t.forEach((function e(t){r[t]||Pe[t]||(Me[t]?Me[t].forEach(e):(n.push(t),r[t]=!0))})),new ut(`${e}: `+n.map(ft).join([", "]))},gt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(E[t+4*r>>2]);return n},vt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function yt(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}function Ct(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var n=tt(e.name||"unknownFunctionName",(function(){}));n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return o instanceof Object?o:r}function _t(e,t,n,r,o,i){var s=t.length;s<2&&Oe("argTypes array size mismatch! Must at least get return value and 'this' types!"),L(!i,"Async bindings are only supported with JSPI.");for(var A=null!==t[1]&&null!==n,a=yt(t),l="void"!==t[0].name,c=[e,Oe,r,o,vt,t[0],t[1]],u=0;u<s-2;++u)c.push(t[u+2]);if(!a)for(u=A?1:2;u<t.length;++u)null!==t[u].destructorFunction&&c.push(t[u].destructorFunction);let[d,h]=function(e,t,n,r){for(var o=yt(e),i=e.length,s="",A="",a=0;a<i-2;++a)s+=(0!==a?", ":"")+"arg"+a,A+=(0!==a?", ":"")+"arg"+a+"Wired";var l=`\n return function (${s}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;o&&(l+="var destructors = [];\n");var c=o?"destructors":"null",u=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(t&&(l+="var thisWired = classParam['toWireType']("+c+", this);\n"),a=0;a<i-2;++a)l+="var arg"+a+"Wired = argType"+a+"['toWireType']("+c+", arg"+a+");\n",u.push("argType"+a);if(t&&(A="thisWired"+(A.length>0?", ":"")+A),l+=(n||r?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",o)l+="runDestructors(destructors);\n";else for(a=t?1:2;a<e.length;++a){var d=1===a?"thisWired":"arg"+(a-2)+"Wired";null!==e[a].destructorFunction&&(l+=`${d}_dtor(${d});\n`,u.push(`${d}_dtor`))}return n&&(l+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),l+="}\n",[u,l=`if (arguments.length !== ${u.length}){ throw new Error(humanName + "Expected ${u.length} closure arguments " + arguments.length + " given."); }\n${l}`]}(t,A,l,i);d.push(h);var p=Ct(Function,d)(...c);return tt(e,p)}var bt=(e,t,n)=>(e instanceof Object||Oe(`${n} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||Oe(`${n} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Oe(`cannot call emscripten binding method ${n} on deleted object`),ot(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)),wt=[],Et=[],$t=e=>{e>9&&0==--Et[e+1]&&(L(void 0!==Et[e],"Decref for unallocated handle."),Et[e]=void 0,wt.push(e))},kt=()=>Et.length/2-5-wt.length,Tt={toValue:e=>(e||Oe("Cannot use deleted val. handle = "+e),L(2===e||void 0!==Et[e]&&e%2==0,`invalid handle: ${e}`),Et[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=wt.pop()||Et.length;return Et[t]=e,Et[t+1]=1,t}}}},Lt={name:"emscripten::val",fromWireType:e=>{var t=Tt.toValue(e);return $t(e),t},toWireType:(e,t)=>Tt.toHandle(t),argPackAdvance:8,readValueFromPointer:at,destructorFunction:null},Ft=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},St=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType($[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Pt=(e,t,n)=>{switch(t){case 1:return n?e=>y[e]:e=>C[e];case 2:return n?e=>_[e>>1]:e=>b[e>>1];case 4:return n?e=>w[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Mt=(e,t,n)=>(L("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,C,t,n)),Ot="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,It=(e,t)=>{L(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,o=r+t/2;!(r>=o)&&b[r];)++r;if((n=r<<1)-e>32&&Ot)return Ot.decode(C.subarray(e,n));for(var i="",s=0;!(s>=t/2);++s){var A=_[e+2*s>>1];if(0==A)break;i+=String.fromCharCode(A)}return i},Dt=(e,t,n)=>{if(L(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),L("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??=2147483647,n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var s=e.charCodeAt(i);_[t>>1]=s,t+=2}return _[t>>1]=0,t-r},xt=e=>2*e.length,Rt=(e,t)=>{L(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var n=0,r="";!(n>=t/4);){var o=w[e+4*n>>2];if(0==o)break;if(++n,o>=65536){var i=o-65536;r+=String.fromCharCode(55296|i>>10,56320|1023&i)}else r+=String.fromCharCode(o)}return r},Nt=(e,t,n)=>{if(L(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),L("number"==typeof n,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??=2147483647,n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(w[t>>2]=s,(t+=4)+4>o)break}return w[t>>2]=0,t-r},Ut=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&++n,t+=4}return t},Bt=(e,t)=>{var n=Pe[e];return void 0===n&&Oe(`${t} has unknown type ${ft(e)}`),n},jt=(e,t,n)=>{var r=[],o=e.toWireType(r,n);return r.length&&(E[t>>2]=Tt.toHandle(r)),o},Qt={},zt=[],Ht=(e,t)=>(L(e==e>>>0||e==(0|e)),L(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN),Wt=[0,31,60,91,121,152,182,213,244,274,305,335],Kt=[0,31,59,90,120,151,181,212,243,273,304,334],Vt=e=>{var t;return((t=e.getFullYear())%4==0&&(t%100!=0||t%400==0)?Wt:Kt)[e.getMonth()]+e.getDate()-1},Gt=(e,t)=>(L(t===(0|t)),(e>>>0)+4294967296*t),Yt=(e,t)=>{if(e<=0)return e;var n=t<=32?Math.abs(1<<t-1):Math.pow(2,t-1);return e>=n&&(t<=32||e>n)&&(e=-2*n+e),e},qt=(e,t)=>e>=0?e:t<=32?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e,Zt=e=>{for(var t=e;C[t];)++t;return t-e},Xt=(e,t)=>{L(!(3&t));var n=e,r=t;function o(e){var t;return r=function(e,t){return"double"===t||"i64"===t?7&e&&(L(4==(7&e)),e+=4):L(!(3&e)),e}(r,e),"double"===e?(t=k[r>>3],r+=8):"i64"==e?(t=[w[r>>2],w[r+4>>2]],r+=8):(L(!(3&r)),e="i32",t=w[r>>2],r+=4),t}for(var i,s,A,a,l,c,u=[];;){var d=n;if(0===(i=y[n]))break;if(s=y[n+1],37==i){var h=!1,p=!1,f=!1,m=!1,g=!1;e:for(;;){switch(s){case 43:h=!0;break;case 45:p=!0;break;case 35:f=!0;break;case 48:if(m)break e;m=!0;break;case 32:g=!0;break;default:break e}n++,s=y[n+1]}var v=0;if(42==s)v=o("i32"),n++,s=y[n+1];else for(;s>=48&&s<=57;)v=10*v+(s-48),n++,s=y[n+1];var _,b=!1,E=-1;if(46==s){if(E=0,b=!0,n++,42==(s=y[n+1]))E=o("i32"),n++;else for(;;){var $=y[n+1];if($<48||$>57)break;E=10*E+($-48),n++}s=y[n+1]}switch(E<0&&(E=6,b=!1),String.fromCharCode(s)){case"h":104==y[n+2]?(n++,_=1):_=2;break;case"l":108==y[n+2]?(n++,_=8):_=4;break;case"L":case"q":case"j":_=8;break;case"z":case"t":case"I":_=4;break;default:_=null}switch(_&&n++,s=y[n+1],String.fromCharCode(s)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var T=100==s||105==s;if(A=o("i"+8*(_=_||4)),8==_&&(A=117==s?(l=A[0],c=A[1],(l>>>0)+4294967296*(c>>>0)):Gt(A[0],A[1])),_<=4){var F=Math.pow(256,_)-1;A=(T?Yt:qt)(A&F,8*_)}var S=Math.abs(A),P="";if(100==s||105==s)I=Yt(A,8*_).toString(10);else if(117==s)I=qt(A,8*_).toString(10),A=Math.abs(A);else if(111==s)I=(f?"0":"")+S.toString(8);else if(120==s||88==s){if(P=f&&0!=A?"0x":"",A<0){A=-A,I=(S-1).toString(16);for(var M=[],O=0;O<I.length;O++)M.push((15-parseInt(I[O],16)).toString(16));for(I=M.join("");I.length<2*_;)I="f"+I}else I=S.toString(16);88==s&&(P=P.toUpperCase(),I=I.toUpperCase())}else 112==s&&(0===S?I="(nil)":(P="0x",I=S.toString(16)));if(b)for(;I.length<E;)I="0"+I;for(A>=0&&(h?P="+"+P:g&&(P=" "+P)),"-"==I.charAt(0)&&(P="-"+P,I=I.substr(1));P.length+I.length<v;)p?I+=" ":m?I="0"+I:P=" "+P;(I=P+I).split("").forEach((function(e){u.push(e.charCodeAt(0))}));break;case"f":case"F":case"e":case"E":case"g":case"G":var I;if(A=o("double"),isNaN(A))I="nan",m=!1;else if(isFinite(A)){var D=!1,x=Math.min(E,20);if(103==s||71==s){D=!0,E=E||1;var R=parseInt(A.toExponential(x).split("e")[1],10);E>R&&R>=-4?(s=(103==s?"f":"F").charCodeAt(0),E-=R+1):(s=(103==s?"e":"E").charCodeAt(0),E--),x=Math.min(E,20)}101==s||69==s?(I=A.toExponential(x),/[eE][-+]\d$/.test(I)&&(I=I.slice(0,-1)+"0"+I.slice(-1))):102!=s&&70!=s||(I=A.toFixed(x),0===A&&((a=A)<0||0===a&&1/a==-1/0)&&(I="-"+I));var N=I.split("e");if(D&&!f)for(;N[0].length>1&&N[0].includes(".")&&("0"==N[0].slice(-1)||"."==N[0].slice(-1));)N[0]=N[0].slice(0,-1);else for(f&&-1==I.indexOf(".")&&(N[0]+=".");E>x++;)N[0]+="0";I=N[0]+(N.length>1?"e"+N[1]:""),69==s&&(I=I.toUpperCase()),A>=0&&(h?I="+"+I:g&&(I=" "+I))}else I=(A<0?"-":"")+"inf",m=!1;for(;I.length<v;)p?I+=" ":I=!m||"-"!=I[0]&&"+"!=I[0]?(m?"0":" ")+I:I[0]+"0"+I.slice(1);s<97&&(I=I.toUpperCase()),I.split("").forEach((function(e){u.push(e.charCodeAt(0))}));break;case"s":var U=o("i8*"),B=U?Zt(U):6;if(b&&(B=Math.min(B,E)),!p)for(;B<v--;)u.push(32);if(U)for(O=0;O<B;O++)u.push(C[U++]);else u=u.concat(me("(null)".substr(0,B)));if(p)for(;B<v--;)u.push(32);break;case"c":for(p&&u.push(o("i8"));--v>0;)u.push(32);p||u.push(o("i8"));break;case"n":var j=o("i32*");w[j>>2]=u.length;break;case"%":u.push(i);break;default:for(O=d;O<n+2;O++)u.push(y[O])}n+=2}else u.push(i),n+=1}return u};function Jt(e){var t=(new Error).stack.toString(),n=t.lastIndexOf("_emscripten_log"),r=t.lastIndexOf("_emscripten_get_callstack"),o=t.indexOf("\n",Math.max(n,r))+1;t=t.slice(o),8&e&&"undefined"==typeof emscripten_source_map&&(oe('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var i=t.split("\n");t="";var s=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),A=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),a=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var l in i){var c=i[l],u="",d="",h=0,p=0,f=a.exec(c);if(f&&5==f.length)u=f[1],d=f[2],h=f[3],p=f[4];else{if((f=s.exec(c))||(f=A.exec(c)),!(f&&f.length>=4)){t+=c+"\n";continue}u=f[1],d=f[2],h=f[3],p=0|f[4]}var m=!1;if(8&e){var g,v=emscripten_source_map.originalPositionFor({line:h,column:p});(m=null===(g=v)||void 0===g?void 0:g.source)&&(64&e&&(v.source=v.source.substring(v.source.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=` at ${u} (${v.source}:${v.line}:${v.column})\n`)}(16&e||!m)&&(64&e&&(d=d.substring(d.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=(m?` = ${u}`:` at ${u}`)+` (${d}:${h}:${p})\n`)}return t=t.replace(/\s+$/,"")}var en,tn,nn,rn=e=>{var t=m.buffer,n=(e-t.byteLength+65535)/65536;try{return m.grow(n),F(),1}catch(n){v(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},on={},sn=()=>{if(!sn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:d||"./this.program"};for(var t in on)void 0===on[t]?delete e[t]:e[t]=on[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);sn.strings=n}return sn.strings};Te.createPreloadedFile=(e,t,n,r,o,i,A,a,l,c)=>{var u=t?de.resolve(ce.join2(e,t)):e,d=U(`cp ${u}`);function h(n){function s(n){null==c||c(),a||((e,t,n,r,o,i)=>{Te.createDataFile(e,t,n,r,o,i)})(e,t,n,r,o,l),null==i||i(),j(d)}((e,t,n,r)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return we.forEach((i=>{o||i.canHandle(t)&&(i.handle(e,t,n,r),o=!0)})),o})(n,u,s,(()=>{null==A||A(),j(d)}))||s(n)}B(d),"string"==typeof n?((e,t,n,r)=>{var o=U(`al ${e}`);s(e,(n=>{L(n,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(n)),o&&j(o)}),(t=>{if(!n)throw`Loading data file "${e}" failed.`;n()})),o&&B(o)})(n,h,A):h(n)},Te.staticInit(),(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ge=e})(),ve=A.BindingError=function(e){function o(e){var r;return n(this,o),(r=t(this,o,[e])).name="BindingError",r}return i(o,e),r(o)}(l(Error)),ye=A.InternalError=function(e){function o(e){var r;return n(this,o),(r=t(this,o,[e])).name="InternalError",r}return i(o,e),r(o)}(l(Error)),Object.assign(et.prototype,{isAliasOf(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o},clone(){if(this.$$.ptr||Ne(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Je(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Ne(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Oe("Object already scheduled for deletion"),Be(this),je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ne(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Oe("Object already scheduled for deletion"),Ke.push(this),1===Ke.length&&Re&&Re(Ve),this.$$.deleteScheduled=!0,this}}),A.getInheritedInstanceCount=He,A.getLiveInheritedInstances=We,A.flushPendingDeletes=Ve,A.setDelayFunction=Ge,Object.assign(lt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;null===(t=this.rawDestructor)||void 0===t||t.call(this,e)},argPackAdvance:8,readValueFromPointer:at,fromWireType:Xe}),ut=A.UnboundTypeError=(en=Error,(nn=tt(tn="UnboundTypeError",(function(e){this.name=tn,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(en.prototype),nn.prototype.constructor=nn,nn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nn),Et.push(0,1,void 0,1,null,1,!0,1,!1,1),L(10===Et.length),A.count_emval_handles=kt;var An,an={__assert_fail:(e,t,n,r)=>{Q(`Assertion failed: ${Ae(e)}, at: `+[t?Ae(t):"unknown filename",n,r?Ae(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){Le.varargs=n;try{var r=Le.getStreamFromFD(e);switch(t){case 0:if((o=ae())<0)return-28;for(;Te.streams[o];)o++;return Te.dupStream(r,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var o=ae();return r.flags|=o,0;case 12:o=le();return _[o+0>>1]=2,0}return-28}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){Le.varargs=r;try{t=Le.getStr(t),t=Le.calculateAt(e,t);var o=r?ae():0;return Te.open(t,n,o).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{Q("native code called abort()")},_embind_register_bigint:(e,t,n,r,o)=>{},_embind_register_bool:(e,t,n,r)=>{xe(e,{name:t=Fe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(C[e])},destructorFunction:null})},_embind_register_class:(e,t,n,r,o,i,s,a,l,c,u,d,h)=>{u=Fe(u),i=pt(o,i),a&&=pt(s,a),c&&=pt(l,c),h=pt(d,h);var p=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);((e,t,n)=>{A.hasOwnProperty(e)?(Oe(`Cannot register public name '${e}' twice`),nt(A,e,e),A.hasOwnProperty(n)&&Oe(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),A[e].overloadTable[n]=t):A[e]=t})(p,(function(){mt(`Cannot construct ${u} due to unbound types`,[r])})),De([e,t,n],r?[r]:[],(t=>{var n,o;t=t[0],o=r?(n=t.registeredClass).instancePrototype:et.prototype;var s=tt(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new ve("Use 'new' to construct "+u);if(void 0===d.constructor_body)throw new ve(u+" has no accessible constructor");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=d.constructor_body[t.length];if(void 0===r)throw new ve(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,t)})),l=Object.create(o,{constructor:{value:s}});s.prototype=l;var d=new rt(u,s,l,h,n,i,a,c);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var f=new lt(u,d,!0,!1,!1),m=new lt(u+"*",d,!1,!1,!1),g=new lt(u+" const*",d,!1,!0,!1);return ze[e]={pointerType:m,constPointerType:g},((e,t,n)=>{A.hasOwnProperty(e)||Ie("Replacing nonexistent public symbol"),void 0!==A[e].overloadTable&&void 0!==n||(A[e]=t,A[e].argCount=n)})(p,s),[f,m,g]}))},_embind_register_class_constructor:(e,t,n,r,o,i)=>{L(t>0);var s=gt(t,n);o=pt(r,o),De([],[e],(e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ve(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{mt(`Cannot construct ${e.name} due to unbound types`,s)},De([],s,(r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=_t(n,r,null,o,i),[]))),[]}))},_embind_register_class_function:(e,t,n,r,o,i,s,A,a)=>{var l=gt(n,r);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?(L(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,t)):e})(t=Fe(t)),i=pt(o,i),De([],[e],(e=>{var r=`${(e=e[0]).name}.${t}`;function o(){mt(`Cannot call ${r} due to unbound types`,l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),A&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,u=c[t];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(nt(c,t,r),c[t].overloadTable[n-2]=o),De([],l,(o=>{var A=_t(r,o,e,i,s,a);return void 0===c[t].overloadTable?(A.argCount=n-2,c[t]=A):c[t].overloadTable[n-2]=A,[]})),[]}))},_embind_register_class_property:(e,t,n,r,o,i,s,A,a,l)=>{t=Fe(t),o=pt(r,o),De([],[e],(e=>{var r=`${(e=e[0]).name}.${t}`,c={get(){mt(`Cannot access ${r} due to unbound types`,[n,s])},enumerable:!0,configurable:!0};return c.set=a?()=>mt(`Cannot access ${r} due to unbound types`,[n,s]):e=>Oe(r+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,c),De([],a?[n,s]:[n],(n=>{var s=n[0],c={get(){var t=bt(this,e,r+" getter");return s.fromWireType(o(i,t))},enumerable:!0};if(a){a=pt(A,a);var u=n[1];c.set=function(t){var n=bt(this,e,r+" setter"),o=[];a(l,n,u.toWireType(o,t)),vt(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,c),[]})),[]}))},_embind_register_emval:e=>xe(e,Lt),_embind_register_float:(e,t,n)=>{xe(e,{name:t=Fe(t),fromWireType:e=>e,toWireType:(e,t)=>{if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError(`Cannot convert ${Ft(t)} to ${this.name}`);return t},argPackAdvance:8,readValueFromPointer:St(t,n),destructorFunction:null})},_embind_register_integer:(e,t,n,r,o)=>{t=Fe(t),-1===o&&(o=4294967295);var i=e=>e;if(0===r){var s=32-8*n;i=e=>e<<s>>>s}var A=t.includes("unsigned"),a=(e,n)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${Ft(e)}" to ${n}`);if(e<r||e>o)throw new TypeError(`Passing a number "${Ft(e)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${r}, ${o}]!`)};xe(e,{name:t,fromWireType:i,toWireType:A?function(e,t){return a(t,this.name),t>>>0}:function(e,t){return a(t,this.name),t},argPackAdvance:8,readValueFromPointer:Pt(t,n,0!==r),destructorFunction:null})},_embind_register_memory_view:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=E[e>>2],n=E[e+4>>2];return new r(y.buffer,n,t)}xe(e,{name:n=Fe(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=Fe(t));xe(e,{name:t,fromWireType(e){var t,r=E[e>>2],o=e+4;if(n)for(var i=o,s=0;s<=r;++s){var A=o+s;if(s==r||0==C[A]){var a=Ae(i,A-i);void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),i=A+1}}else{var l=new Array(r);for(s=0;s<r;++s)l[s]=String.fromCharCode(C[o+s]);t=l.join("")}return cn(e),t},toWireType(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Oe("Cannot pass non-string to std::string"),r=n&&o?pe(t):t.length;var i=un(4+r+1),s=i+4;if(E[i>>2]=r,n&&o)Mt(t,s,r+1);else if(o)for(var A=0;A<r;++A){var a=t.charCodeAt(A);a>255&&(cn(s),Oe("String has UTF-16 code units that do not fit in 8 bits")),C[s+A]=a}else for(A=0;A<r;++A)C[s+A]=t[A];return null!==e&&e.push(cn,i),i},argPackAdvance:8,readValueFromPointer:at,destructorFunction(e){cn(e)}})},_embind_register_std_wstring:(e,t,n)=>{var r,o,i,s;n=Fe(n),2===t?(r=It,o=Dt,s=xt,i=e=>b[e>>1]):4===t&&(r=Rt,o=Nt,s=Ut,i=e=>E[e>>2]),xe(e,{name:n,fromWireType:e=>{for(var n,o=E[e>>2],s=e+4,A=0;A<=o;++A){var a=e+4+A*t;if(A==o||0==i(a)){var l=r(s,a-s);void 0===n?n=l:(n+=String.fromCharCode(0),n+=l),s=a+t}}return cn(e),n},toWireType:(e,r)=>{"string"!=typeof r&&Oe(`Cannot pass non-string to C++ string type ${n}`);var i=s(r),A=un(4+i+t);return E[A>>2]=i/t,o(r,A+4,i+t),null!==e&&e.push(cn,A),A},argPackAdvance:8,readValueFromPointer:at,destructorFunction(e){cn(e)}})},_embind_register_void:(e,t)=>{xe(e,{isVoid:!0,name:t=Fe(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},_emval_as:(e,t,n)=>(e=Tt.toValue(e),t=Bt(t,"emval::as"),jt(t,n,e)),_emval_call_method:(e,t,n,r,o)=>{var i,s;return(e=zt[e])(t=Tt.toValue(t),t[n=void 0===(s=Qt[i=n])?Fe(i):s],r,o)},_emval_decref:$t,_emval_get_method_caller:(e,t,n)=>{var r=((e,t)=>{for(var n=new Array(e),r=0;r<e;++r)n[r]=Bt(E[t+4*r>>2],"parameter "+r);return n})(e,t),o=r.shift();e--;var i="return function (obj, func, destructorsRef, args) {\n",s=0,A=[];0===n&&A.push("obj");for(var a=["retType"],l=[o],c=0;c<e;++c)A.push("arg"+c),a.push("argType"+c),l.push(r[c]),i+=` var arg${c} = argType${c}.readValueFromPointer(args${s?"+"+s:""});\n`,s+=r[c].argPackAdvance;i+=` var rv = ${1===n?"new func":"func.call"}(${A.join(", ")});\n`,o.isVoid||(a.push("emval_returnValue"),l.push(jt),i+=" return emval_returnValue(retType, destructorsRef, rv);\n"),i+="};\n",a.push(i);var u,d,h=Ct(Function,a)(...l),p=`methodCaller<(${r.map((e=>e.name)).join(", ")}) => ${o.name}>`;return u=tt(p,h),d=zt.length,zt.push(u),d},_emval_run_destructors:e=>{var t=Tt.toValue(e);vt(t),$t(e)},_emval_take_value:(e,t)=>{var n=(e=Bt(e,"_emval_take_value")).readValueFromPointer(t);return Tt.toHandle(n)},_gmtime_js:function(e,t,n){var r=Ht(e,t),o=new Date(1e3*r);w[n>>2]=o.getUTCSeconds(),w[n+4>>2]=o.getUTCMinutes(),w[n+8>>2]=o.getUTCHours(),w[n+12>>2]=o.getUTCDate(),w[n+16>>2]=o.getUTCMonth(),w[n+20>>2]=o.getUTCFullYear()-1900,w[n+24>>2]=o.getUTCDay();var i=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-i)/864e5|0;w[n+28>>2]=s},_localtime_js:function(e,t,n){var r=Ht(e,t),o=new Date(1e3*r);w[n>>2]=o.getSeconds(),w[n+4>>2]=o.getMinutes(),w[n+8>>2]=o.getHours(),w[n+12>>2]=o.getDate(),w[n+16>>2]=o.getMonth(),w[n+20>>2]=o.getFullYear()-1900,w[n+24>>2]=o.getDay();var i=0|Vt(o);w[n+28>>2]=i,w[n+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),A=new Date(o.getFullYear(),6,1).getTimezoneOffset(),a=s.getTimezoneOffset(),l=0|(A!=a&&o.getTimezoneOffset()==Math.min(a,A));w[n+32>>2]=l},_mktime_js:function(e){var t,n=(()=>{var t=new Date(w[e+20>>2]+1900,w[e+16>>2],w[e+12>>2],w[e+8>>2],w[e+4>>2],w[e>>2],0),n=w[e+32>>2],r=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),A=Math.min(s,i);if(n<0)w[e+32>>2]=Number(i!=s&&A==r);else if(n>0!=(A==r)){var a=Math.max(s,i),l=n>0?A:a;t.setTime(t.getTime()+6e4*(l-r))}w[e+24>>2]=t.getDay();var c=0|Vt(t);w[e+28>>2]=c,w[e>>2]=t.getSeconds(),w[e+4>>2]=t.getMinutes(),w[e+8>>2]=t.getHours(),w[e+12>>2]=t.getDate(),w[e+16>>2]=t.getMonth(),w[e+20>>2]=t.getYear();var u=t.getTime();return isNaN(u)?-1:u/1e3})();return H=n,t=+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0,pn(t),n>>>0},_tzset_js:(e,t,n,r)=>{var o=(new Date).getFullYear(),i=new Date(o,0,1),s=new Date(o,6,1),A=i.getTimezoneOffset(),a=s.getTimezoneOffset(),l=Math.max(A,a);E[e>>2]=60*l,w[t>>2]=Number(A!=a);var c=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],u=c(i),d=c(s);L(u),L(d),L(pe(u)<=16,`timezone name truncated to fit in TZNAME_MAX (${u})`),L(pe(d)<=16,`timezone name truncated to fit in TZNAME_MAX (${d})`),a<A?(Mt(u,n,17),Mt(d,r,17)):(Mt(u,r,17),Mt(d,n,17))},emscripten_date_now:()=>Date.now(),emscripten_log:(e,t,n)=>{var r=Xt(t,n);((e,t)=>{24&e&&(t=t.replace(/\s+$/,""),t+=(t.length>0?"\n":"")+Jt(e)),1&e||(6&e?v(t):g(t))})(e,se(r,0))},emscripten_resize_heap:e=>{var t=C.length;L((e>>>=0)>t);var n=2147483648;if(e>n)return v(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var r,o,i=1;i<=4;i*=2){var s=t*(1+.2/i);s=Math.min(s,e+100663296);var A=Math.min(n,(r=Math.max(e,s))+((o=65536)-r%o)%o);if(rn(A))return!0}return v(`Failed to grow the heap from ${t} bytes to ${A} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var n=0;return sn().forEach(((r,o)=>{var i=t+n;E[e+4*o>>2]=i,((e,t)=>{for(var n=0;n<e.length;++n)L(e.charCodeAt(n)===(255&e.charCodeAt(n))),y[t++]=e.charCodeAt(n);y[t]=0})(r,i),n+=r.length+1})),0},environ_sizes_get:(e,t)=>{var n=sn();E[e>>2]=n.length;var r=0;return n.forEach((e=>r+=e.length+1)),E[t>>2]=r,0},fd_close:function(e){try{var t=Le.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var n=Le.getStreamFromFD(e),r=n.tty?2:Te.isDir(n.mode)?3:Te.isLink(n.mode)?7:4;return y[t]=r,_[t+2>>1]=0,W=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[t+8>>2]=W[0],w[t+12>>2]=W[1],W=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[t+16>>2]=W[0],w[t+20>>2]=W[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){try{var o=((e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var s=E[t>>2],A=E[t+4>>2];t+=8;var a=Te.read(e,y,s,A,r);if(a<0)return-1;if(o+=a,a<A)break}return o})(Le.getStreamFromFD(e),t,n);return E[r>>2]=o,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,o){var i=Ht(t,n);try{if(isNaN(i))return 61;var s=Le.getStreamFromFD(e);return Te.llseek(s,i,r),W=[s.position>>>0,(H=s.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],w[o>>2]=W[0],w[o+4>>2]=W[1],s.getdents&&0===i&&0===r&&(s.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){try{var o=((e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var s=E[t>>2],A=E[t+4>>2];t+=8;var a=Te.write(e,y,s,A,r);if(a<0)return-1;o+=a}return o})(Le.getStreamFromFD(e),t,n);return E[r>>2]=o,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}},ln=function(){var e={env:an,wasi_snapshot_preview1:an};function t(e,t){var n;return ln=e.exports,L(m=ln.memory,"memory not found in wasm exports"),F(),L(ct=ln.__indirect_function_table,"table not found in wasm exports"),n=ln.__wasm_call_ctors,M.unshift(n),j("wasm-instantiate"),ln}B("wasm-instantiate");var n,r,o,i=A;if(A.instantiateWasm)try{return A.instantiateWasm(e,t)}catch(e){return v(`Module.instantiateWasm callback failed with error: ${e}`),!1}return z||(z=Y()),n=z,r=e,o=function(e){L(A===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)},f||"function"!=typeof WebAssembly.instantiateStreaming||K(n)||"function"!=typeof fetch?Z(n,r,o):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(o,(function(e){return v(`wasm streaming compile failed: ${e}`),v("falling back to ArrayBuffer instantiation"),Z(n,r,o)})))),{}}(),cn=G("free",1),un=G("malloc",1),dn=G("__getTypeName",1),hn=G("fflush",1),pn=G("_emscripten_tempret_set",1),fn=()=>(fn=ln.emscripten_stack_init)(),mn=()=>(mn=ln.emscripten_stack_get_end)();function gn(){var e;fn(),L(!(3&(e=mn()))),0==e&&(e+=4),E[e>>2]=34821223,E[e+4>>2]=2310721022,E[0]=1668509029}function vn(){function e(){An||(An=!0,A.calledRun=!0,T||(L(!I),I=!0,S(),A.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ne(M),A.onRuntimeInitialized&&A.onRuntimeInitialized(),L(!A._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(S(),A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)e=A.postRun.shift(),O.unshift(e);var e;ne(O)}()))}D>0||(gn(),function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)e=A.preRun.shift(),P.unshift(e);var e;ne(P)}(),D>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e(),S()))}if(A.dynCall_ijiii=G("dynCall_ijiii",6),A.dynCall_viiijj=G("dynCall_viiijj",8),A.dynCall_jij=G("dynCall_jij",4),A.dynCall_jii=G("dynCall_jii",3),A.dynCall_jiji=G("dynCall_jiji",5),A._ff_h264_cabac_tables=119404,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","stackAlloc","getTempRet0","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","setWasmTableEntry","handleException","keepRuntimeAlive","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","intArrayToString","AsciiToString","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","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","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","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","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace","getFunctionArgsName","createJsInvokerSignature","registerInheritedInstance","unregisterInheritedInstance","enumReadValueFromPointer","emval_get_global"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){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}')`,J(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),oe(t)}}),te(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","wasmMemory","wasmExports","writeStackCookie","checkStackCookie","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","stackSave","stackRestore","setTempRet0","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","emscriptenLog","readEmAsmArgsArray","jstoi_s","getExecutableName","dynCallLegacy","getDynCaller","dynCall","getWasmTableEntry","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","freeTableIndexes","functionsInTableMap","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","jsStackTrace","getCallstack","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","getFunctionName","heap32VectorToArray","requireRegisteredType","usesDestructorStack","createJsInvoker","UnboundTypeError","PureVirtualError","GenericWireTypeSize","EmValType","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","integerReadValueFromPointer","floatReadValueFromPointer","readPointer","runDestructors","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_freelist","emval_handles","emval_symbols","init_emval","count_emval_handles","getStringOrSymbol","Emval","emval_returnValue","emval_lookupTypes","emval_methodCallers","emval_addMethodCaller","reflectConstruct"].forEach(te),R=function e(){An||vn(),An||(R=e)},A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return vn(),c=A}(),p=e(h),f={exports:{}};var m=(d||(d=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var A=new o(r,i||e,s),a=n?n+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],A]:e._events[a].push(A):(e._events[a]=A,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function A(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),A.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},A.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,s=new Array(i);o<i;o++)s[o]=r[o].fn;return s},A.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},A.prototype.emit=function(e,t,r,o,i,s){var A=n?n+e:e;if(!this._events[A])return!1;var a,l,c=this._events[A],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,s),!0}for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];c.fn.apply(c.context,a)}else{var d,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,r);break;case 4:c[l].fn.call(c[l].context,t,r,o);break;default:if(!a)for(d=1,a=new Array(u-1);d<u;d++)a[d-1]=arguments[d];c[l].fn.apply(c[l].context,a)}}return!0},A.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},A.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},A.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var A=this._events[i];if(A.fn)A.fn!==t||o&&!A.once||r&&A.context!==r||s(this,i);else{for(var a=0,l=[],c=A.length;a<c;a++)(A[a].fn!==t||o&&!A[a].once||r&&A[a].context!==r)&&l.push(A[a]);l.length?this._events[i]=1===l.length?l[0]:l:s(this,i)}return this},A.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=n,A.EventEmitter=A,e.exports=A}(f)),f.exports),g=e(m);const v=class e{static getInstance(){return e.instance||(e.instance=new e),e.instance}add(e){this.pickers.push(e)}remove(e){const t=this.pickers.indexOf(e);t>-1?this.pickers.splice(t,1):console.warn("Picker not found in the provider.")}closeOther(e){for(const t of this.pickers)t!==e&&(t.open=!1)}constructor(){this.pickers=[]}}.getInstance(),y=["top","tl","tr","bottom","bl","br"],C="epicker",_={getPopupContainer:()=>document.body,wrapClassName:"",open:!1,placement:"br",offset:[0,0],zIndex:1e3,content:"",trigger:"click",mouseLeaveDelay:.1,isMobile:!1};class b{get $popupContainer(){if("function"==typeof this._options.getPopupContainer&&!this._options.isMobile){const e=this._options.getPopupContainer();if(e){if(!["INPUT","CANVAS","VIDEO","IMG"].includes(null==e?void 0:e.tagName))return e!==document.body&&(e.style.cssText+="position: relative;"),e;console.warn("popup container node does not support child elements, default body!")}else console.warn("popup container does not exist, default body!")}return document.body}get open(){return this._open}set open(e){this._disabled||(this._animationTimerClear(),e?(this.$content.style.display="inline-flex",this._options.isMobile&&document.body.classList.add(`${C}-body-noscroll`),this._animationTimer=setTimeout((()=>{this._animationTimerClear(),this.$content.style.opacity="1"}),20)):(this.$content.style.opacity="0",this._options.isMobile&&document.body.classList.remove(`${C}-body-noscroll`),this._animationTimer=setTimeout((()=>{this._animationTimerClear(),this.$content.style.display="none"}),350)),requestAnimationFrame((()=>{this._setPlacement()})),this._open!==!!e&&(this._onOpenChange(e),this._open=!!e))}get disabled(){return this._disabled}set disabled(e){e?this.$container.classList.add(`${C}-disabled`):this.$container.classList.remove(`${C}-disabled`),this._disabled=e}setPlacement(e){this._disabled||(y.includes(e)?this._options.placement=e:console.warn(`${e} is not a valid placement`),this._setPlacement())}destroy(){this._removeHtml(),v.remove(this)}innerHTML(e){var t;this.$body&&(this.$body.innerHTML=e||""),null==(t=this.$popupContainer)||t.appendChild(this.$content)}_onOpenChange(e){null==this._options.onOpenChange||this._options.onOpenChange.call(this._options,!!e)}_animationTimerClear(){this._animationTimer&&(clearTimeout(this._animationTimer),this._animationTimer=null)}_removeHtml(){var e,t;(this.$content.removeEventListener("click",this._onContentClick),this.$container.removeEventListener("click",this._onContentClick),"click"===this._options.trigger&&this.$container.removeEventListener("click",this._onShow),"hover"===this._options.trigger&&(this.$container.removeEventListener("mouseover",this._onShow),this.$container.removeEventListener("mousemove",this._onShow),this.$container.removeEventListener("mouseleave",this._onHide),this.$content.removeEventListener("mouseover",this._onContentShow),this.$content.removeEventListener("mousemove",this._onContentShow),this.$content.removeEventListener("mouseleave",this._onHide)),this._options.isMobile||(window.removeEventListener("blur",this._onHide),document.removeEventListener("visibilitychange",this._onHide),window.removeEventListener("resize",this._onHide),document.removeEventListener("click",this._onDocumentClick)),this._$mask)&&(this._$mask.removeEventListener("click",this._onHide),null==(t=this.$content)||t.removeChild(this._$mask));null==(e=this.$popupContainer)||e.removeChild(this.$content),this.$content.innerHTML=""}_setPlacement(){if(!this._open||this._options.isMobile)return;const e=this.$container.getBoundingClientRect(),t=this.$content.getBoundingClientRect(),n=this.$popupContainer.getBoundingClientRect(),r=e.left-n.left,o=-(e.right-n.right),i=e.y-n.y;let s,A=r+(e.width-t.width)/2;const a=i-t.height,l=i+e.height;if(/^t/.test(this._options.placement)){var c,u,d;switch(this._options.placement){case"top":s=void 0;break;case"tl":s=void 0,A=r;break;case"tr":A=void 0,s=o}this.$content.style.cssText+=`\n ${void 0!==s?`right: ${s+((null==(c=this._options.offset)?void 0:c[0])||0)}px;`:""}\n ${void 0!==A?`left: ${A+((null==(u=this._options.offset)?void 0:u[0])||0)}px;`:""}\n top: ${a+((null==(d=this._options.offset)?void 0:d[1])||0)}px;\n z-index:${this._options.zIndex};\n `}else if(/^b/.test(this._options.placement)){var h,p,f;switch(this._options.placement){case"bottom":s=void 0;break;case"bl":s=void 0,A=r;break;case"br":A=void 0,s=o}this.$content.style.cssText+=`\n ${void 0!==s?`right: ${s+((null==(h=this._options.offset)?void 0:h[0])||0)}px;`:""}\n ${void 0!==A?`left: ${A+((null==(p=this._options.offset)?void 0:p[0])||0)}px;`:""}\n top: ${l+((null==(f=this._options.offset)?void 0:f[1])||0)}px;\n z-index:${this._options.zIndex};\n `}}_initContentStyle(){if(this.$content.classList.add(`${C}`,`${C}-${this._options.placement}`),this._options.isMobile&&(this.$content.classList.add(`${C}-mobile`),this._$mask=document.createElement("div"),this._$mask.classList.add(`${C}-mask`),this.$content.appendChild(this._$mask)),this.$body=document.createElement("div"),this.$body.classList.add(`${C}-body`),this.$content.appendChild(this.$body),this._options.wrapClassName)try{this.$content.classList.add(this._options.wrapClassName)}catch(e){}}_eventListener(){this.$content.addEventListener("click",this._onContentClick),this.$container.addEventListener("click",this._onContentClick),"click"===this._options.trigger&&this.$container.addEventListener("click",this._onShow),"hover"===this._options.trigger&&(this.$container.addEventListener("mouseover",this._onShow),this.$container.addEventListener("mousemove",this._onShow),this.$container.addEventListener("mouseleave",this._onHide),this.$content.addEventListener("mouseover",this._onContentShow),this.$content.addEventListener("mousemove",this._onContentShow),this.$content.addEventListener("mouseleave",this._onHide)),this._$mask&&this._$mask.addEventListener("click",this._onHide),this._options.isMobile||(window.addEventListener("blur",this._onHide),document.addEventListener("visibilitychange",this._onHide),window.addEventListener("resize",this._onHide),document.addEventListener("click",this._onDocumentClick))}_onContentClick(e){e.stopPropagation(),v.closeOther(this)}_onShow(e){var t,n;null==e||null==(t=e.stopPropagation)||t.call(e),null==e||null==(n=e.preventDefault)||n.call(e),this._disabled||(this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!0)}_onContentShow(e){null==e.stopPropagation||e.stopPropagation.call(e),null==e.preventDefault||e.preventDefault.call(e),this.open&&!this._disabled&&this._onShow(null)}_onHide(){this._open&&!this._disabled&&(this._hideTimer=setTimeout((()=>{this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!1}),this._options.mouseLeaveDelay>0?1e3*this._options.mouseLeaveDelay:100))}_onDocumentClick(e){if(!this.$content.contains(e.target)&&this.$content!==e.target&&!this.$container.contains(e.target)&&this.$container!==e.target){if(this._disabled)return;this._onHide()}}constructor(e){if(this._open=!1,this._animationTimer=null,this._hideTimer=null,this._disabled=!1,this._options=Object.assign({},_,e||{}),this._options.isMobile&&(this._options.trigger="click"),v.add(this),"function"==typeof this._options.container?this.$container=this._options.container():this.$container=this._options.container,!this.$container)throw new Error("container is required!");this.$content=document.createElement("div"),this._initContentStyle(),this.innerHTML(this._options.content),this._onContentClick=this._onContentClick.bind(this),this._onShow=this._onShow.bind(this),this._onContentShow=this._onContentShow.bind(this),this._onHide=this._onHide.bind(this),this._onDocumentClick=this._onDocumentClick.bind(this),this._eventListener(),this.open=!!this._options.open}}b.VERSION="0.1.0-beta.11";
|
|
10
10
|
/*
|
|
11
|
-
*
|
|
12
|
-
* Copyright (c) 2025-
|
|
11
|
+
* delegate.js v3.2.0
|
|
12
|
+
* Copyright (c) 2025-07-25
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
const w=9;if("undefined"!=typeof Element&&!Element.prototype.matches){const e=Element.prototype;e.matches=(null==e?void 0:e.matchesSelector)||(null==e?void 0:e.mozMatchesSelector)||(null==e?void 0:e.msMatchesSelector)||(null==e?void 0:e.oMatchesSelector)||(null==e?void 0:e.webkitMatchesSelector)}function E(e,t,n,r,o){const i=k.apply(this,arguments);return e.addEventListener(n,i,o),{destroy:function(){e.removeEventListener(n,i,o)}}}function $(e,t,n,r,o){return"function"==typeof e.addEventListener?E.apply(null,arguments):"function"==typeof n?E.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return E(e,t,n,r,o)})))}function k(e,t,n,r){return function(n){n.delegateTarget=function(e,t){for(;e&&e.nodeType!==w;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}(n.target,t),n.delegateTarget&&r.call(e,n)}}var T,L={exports:{}};var F,S,P,M=(T||(T=1,F=L,function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},t=F.exports,n=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r<o;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)i[n[0][r]]=t[r];return i}return!1}(),r={change:n.fullscreenchange,error:n.fullscreenerror},o={request:function(t,r){return new Promise(function(o,i){var s=function(){this.off("change",s),o()}.bind(this);this.on("change",s);var A=(t=t||e.documentElement)[n.requestFullscreen](r);A instanceof Promise&&A.then(s).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,r){if(this.isFullscreen){var o=function(){this.off("change",o),t()}.bind(this);this.on("change",o);var i=e[n.exitFullscreen]();i instanceof Promise&&i.then(o).catch(r)}else t()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(t,n){var o=r[t];o&&e.addEventListener(o,n,!1)},off:function(t,n){var o=r[t];o&&e.removeEventListener(o,n,!1)},raw:n};n?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[n.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[n.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[n.fullscreenEnabled])}}}),t?F.exports=o:window.screenfull=o):t?F.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()),L.exports),O=e(M);var I=function(){if(P)return S;P=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?A((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(e){return!1}}function s(e,t,r){var s={};return r.isMergeableObject(e)&&o(e).forEach((function(t){s[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?s[o]=function(e,t){if(!t.customMerge)return A;var n=t.customMerge(e);return"function"==typeof n?n:A}(o,r)(e[o],t[o],r):s[o]=n(t[o],r))})),s}function A(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var A=Array.isArray(o);return A===Array.isArray(t)?A?i.arrayMerge(t,o,i):s(t,o,i):n(o,i)}return A.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return A(e,n,t)}),{})},S=A}(),D=e(I);
|
|
16
16
|
/*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* @ezuikit/utils-i18n v1.1.0-alpha.3
|
|
18
|
+
* i18n utils
|
|
19
|
+
* Copyright (c) 2025-08-01 Ezviz-OpenBiz
|
|
20
|
+
* Released under the MIT License.
|
|
21
|
+
*/
|
|
22
|
+
class x{t(e,t){const n=this._translations[this._locale];let r;if(!n)return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}" locale]`;if("string"==typeof e&&e.includes(".")&&!(e in n)){const[o,i]=this._findChainValue(n,e);if(i)r=o;else{if(void 0===(null==t?void 0:t.defaultvalue))return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}.${e}" translation]`;r=t.defaultvalue}}else if(e in n)r=n[e];else{if(void 0===(null==t?void 0:t.defaultvalue))return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}.${e}" translation]`;r=t.defaultvalue}return"string"==typeof r&&t&&/\{\{\s*(\w+)\s*\}\}/.test(r)?r.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,n)=>String(t[n])||"")):r}get locale(){return this._locale}get translations(){return this._translations}appendTranslations(e){this._translations=D(this._translations,e,{clone:!1}),this._locale||(this._locale=Object.keys(this._translations)[0]),this._onChange()}switchLocale(e){e in this._translations&&(this._locale=e,this._onChange())}getCurrentLocale(){return this._locale}getCurrentTranslation(){return this._translations[this._locale]}getVersion(){return"1.1.0-alpha.3"}_onChange(){return null==this.options.onChange?void 0:this.options.onChange.call(this.options,this)}_findChainValue(e,t){const n=t.split(".");let r=e;for(let e=0;e<n.length;e++){if(!(n[e]in r))return[void 0,!1];if(r=r[n[e]],e+1===n.length)return[r[n[e]],!0]}return[void 0,!1]}constructor(e,t){this._translations={},this._locale=null==t?void 0:t.defaultLocale,e&&(this._translations=e,(null==t?void 0:t.defaultLocale)||(this._locale=Object.keys(e)[0])),this.options=t||{}}}x.VERSION="1.1.0-alpha.3";
|
|
23
|
+
/*
|
|
24
|
+
* @ezviz/player-theme v0.0.1-alpha.18
|
|
25
|
+
* Copyright (c) 2025-08-11 Ezviz-OpenBiz
|
|
19
26
|
* Released under the MIT License.
|
|
20
27
|
*/
|
|
21
|
-
const T=9;if("undefined"!=typeof Element&&!Element.prototype.matches){const e=Element.prototype;e.matches=(null==e?void 0:e.matchesSelector)||(null==e?void 0:e.mozMatchesSelector)||(null==e?void 0:e.msMatchesSelector)||(null==e?void 0:e.oMatchesSelector)||(null==e?void 0:e.webkitMatchesSelector)}function L(e,t,n,r,o){const i=S.apply(this,arguments);return e.addEventListener(n,i,o),{destroy:function(){e.removeEventListener(n,i,o)}}}function F(e,t,n,r,o){return"function"==typeof e.addEventListener?L.apply(null,arguments):"function"==typeof n?L.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return L(e,t,n,r,o)})))}function S(e,t,n,r){return function(n){n.delegateTarget=function(e,t){for(;e&&e.nodeType!==T;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}(n.target,t),n.delegateTarget&&r.call(e,n)}}var P,M={exports:{}};var O,I,D,x=(P||(P=1,O=M,function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},t=O.exports,n=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r<o;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)i[n[0][r]]=t[r];return i}return!1}(),r={change:n.fullscreenchange,error:n.fullscreenerror},o={request:function(t,r){return new Promise(function(o,i){var s=function(){this.off("change",s),o()}.bind(this);this.on("change",s);var A=(t=t||e.documentElement)[n.requestFullscreen](r);A instanceof Promise&&A.then(s).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,r){if(this.isFullscreen){var o=function(){this.off("change",o),t()}.bind(this);this.on("change",o);var i=e[n.exitFullscreen]();i instanceof Promise&&i.then(o).catch(r)}else t()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(t,n){var o=r[t];o&&e.addEventListener(o,n,!1)},off:function(t,n){var o=r[t];o&&e.removeEventListener(o,n,!1)},raw:n};n?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[n.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[n.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[n.fullscreenEnabled])}}}),t?O.exports=o:window.screenfull=o):t?O.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()),M.exports),R=e(x);var N=function(){if(D)return I;D=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?A((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(e){return!1}}function s(e,t,r){var s={};return r.isMergeableObject(e)&&o(e).forEach((function(t){s[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?s[o]=function(e,t){if(!t.customMerge)return A;var n=t.customMerge(e);return"function"==typeof n?n:A}(o,r)(e[o],t[o],r):s[o]=n(t[o],r))})),s}function A(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var A=Array.isArray(o);return A===Array.isArray(t)?A?i.arrayMerge(t,o,i):s(t,o,i):n(o,i)}return A.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return A(e,n,t)}),{})},I=A}(),U=e(N);let B=function(){return o((function e(t,r){n(this,e),this._translations={},this._locale=null==r?void 0:r.defaultLocale,t&&(this._translations=t,(null==r?void 0:r.defaultLocale)||(this._locale=Object.keys(t)[0])),this.options=r||{}}),[{key:"t",value:function(e,t){const n=this._translations[this._locale];let r;if(!n)return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}" locale]`;if("string"==typeof e&&e.includes(".")&&!(e in n)){const[o,i]=this._findChainValue(n,e);if(i)r=o;else{if(void 0===(null==t?void 0:t.defaultvalue))return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}.${e}" translation]`;r=t.defaultvalue}}else if(e in n)r=n[e];else{if(void 0===(null==t?void 0:t.defaultvalue))return"function"==typeof this.options.customizeMissing?this.options.customizeMissing(e,t):`[missing "${this._locale}.${e}" translation]`;r=t.defaultvalue}return"string"==typeof r&&t&&/\{\{\s*(\w+)\s*\}\}/.test(r)?r.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,n)=>String(t[n])||"")):r}},{key:"locale",get:function(){return this._locale}},{key:"translations",get:function(){return this._translations}},{key:"appendTranslations",value:function(e){this._translations=U(this._translations,e,{clone:!1}),this._locale||(this._locale=Object.keys(this._translations)[0]),this._onChange()}},{key:"switchLocale",value:function(e){e in this._translations&&(this._locale=e,this._onChange())}},{key:"getCurrentLocale",value:function(){return this._locale}},{key:"getCurrentTranslation",value:function(){return this._translations[this._locale]}},{key:"getVersion",value:function(){return"1.1.0-alpha.3"}},{key:"_onChange",value:function(){return null==this.options.onChange?void 0:this.options.onChange.call(this.options,this)}},{key:"_findChainValue",value:function(e,t){const n=t.split(".");let r=e;for(let e=0;e<n.length;e++){if(!(n[e]in r))return[void 0,!1];if(r=r[n[e]],e+1===n.length)return[r[n[e]],!0]}return[void 0,!1]}}])}();B.VERSION="1.1.0-alpha.3";const j="ezplayer",Q="PAUSE_TIMING_HEADER_FOOTER",z=["rec","cloudRec","cloudRecord"],H={loading:"loading",play:"play",capturePicture:"capturePicture",volumechange:"volumechange",audioInfo:"audioInfo",videoInfo:"videoInfo",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",fullscreenChange:"fullscreenChange",resize:"resize",orientationChange:"orientationChange",audioCodecUnsupported:"audioCodecUnsupported",changeTheme:"changeTheme",changeRecType:"changeRecType",changeDefinition:"changeDefinition",changeSpeed:"changeDefinition",control:{play:"Control.play",capturePicture:"Control.capturePicture",volumechange:"Control.volumechange",volumePanelOpenChange:"Control.volumePanelOpenChange",controlsBarOpenChange:"Control.controlsBarOpenChange",headerMoreShow:"Control.headerMoreShow",footerMoreShow:"Control.footerMoreShow",beforeMountControls:"Control.beforeMountControls",mountedControls:"Control.mountedControls",beforeUnmountControls:"Control.beforeUnmountControls",unmountedControls:"Control.unmountedControls",changeRecType:"Control.changeRecType",changeDefinition:"Control.changeDefinition",definitionPanelOpenChange:"Control.definitionPanelOpenChange",changeSpeed:"Control.changeDefinition",speedPanelOpenChange:"Control.speedPanelOpenChange"},theme:{beforeDestroy:"Theme.beforeDestroy",destroyed:"Theme.destroyed"},message:"message"};let W=function(e){function r(e){var o;return n(this,r),(o=t(this,r)).__options={},o._disabled=!1,o._active=!1,o.__options=Object.assign({},e||{}),o.$container=document.createElement(e.tagName||"span"),o.$container.classList.add(`${j}-control`),"text"===(null==e?void 0:e.controlType)?o.$container.classList.add(`${j}-control-text`):"block"===(null==e?void 0:e.controlType)?o.$container.classList.add(`${j}-control-block`):o.$container.classList.add(`${j}-control-btn`),(null==e?void 0:e.classNameSuffix)&&o.$container.classList.add(`${j}-control-${null==e?void 0:e.classNameSuffix}`),(null==e?void 0:e.className)&&o.$container.classList.add(e.className),e.getPopupContainer?o.$popupContainer=null==e.getPopupContainer?void 0:e.getPopupContainer.call(e):o.$popupContainer=document.body,o.$popupContainer.appendChild(o.$container),o._onClick(),o}return A(r,e),o(r,[{key:"active",get:function(){return this._disabled},set:function(e){this._active=e,this._updateActiveState(e)}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e,this._updateDisabledState(e)}},{key:"_updateDisabledState",value:function(e){var t,n;e?null==(t=this.$container)||t.classList.add(`${j}-disabled`):null==(n=this.$container)||n.classList.remove(`${j}-disabled`)}},{key:"_updateActiveState",value:function(e){var t,n;e?null==(t=this.$container)||t.classList.add(`${j}-active`):null==(n=this.$container)||n.classList.remove(`${j}-active`)}},{key:"reset",value:function(){}},{key:"_onClick",value:function(){this.$container.addEventListener("click",(e=>{var t;(null==(t=this.$container)?void 0:t.classList.contains(`${j}-disabled`))||null==this._onControlClick||this._onControlClick.call(this,e)}))}},{key:"hide",value:function(){this.$container&&(this.$container.style.display="none",this.$container.classList.add(`${j}-hide`))}},{key:"destroy",value:function(){var e;this.removeAllListeners(),null==(e=this.$popupContainer)||e.removeChild(this.$container)}},{key:"_onControlClick",value:function(e){null==this.__options.onClick||this.__options.onClick.call(this.__options,e)}}])}(C);function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(this,arguments)}const V={};let G=function(e){function r(){var e;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),(e=t(this,r,[Object.assign({},V,K({},o,{tagName:"div",controlType:"block"}))]))._options=Object.assign({},o),e.$container.classList.add(`${j}-loading`,`${j}-hide`),e._html(),e}return A(r,e),o(r,[{key:"_html",value:function(){var e;"function"==typeof this._options.render?this.$container.innerHTML=this._options.render():this.$container.innerHTML=`\n <span class="${j}-loading-dot ${j}-loading-dot-load">\n <i class="${j}-loading-dot-item"></i>\n <i class="${j}-loading-dot-item"></i>\n <i class="${j}-loading-dot-item"></i>\n <i class="${j}-loading-dot-item"></i>\n </span>\n <div class="${j}-loading-text">${(null==(e=this._options.locale)?void 0:e.loading)||"loading..."}</div>\n `}},{key:"show",value:function(e){e&&(this.$container.innerHTML=e),this.$container.style.display="flex",this.$container.classList.remove(`${j}-hide`),this.$popupContainer.classList.add(`${j}-has-loading`)}},{key:"hide",value:function(){c(r,"hide",this)([]),this.$popupContainer.classList.remove(`${j}-has-loading`)}}])}(W);function Y(){return Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}const q={poster:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAkJCQkJCQoLCwoODw0PDhQSERESFB4WFxYXFh4uHSEdHSEdLikxKCUoMSlJOTMzOUlUR0NHVGZbW2aBeoGoqOIBCQkJCQkJCgsLCg4PDQ8OFBIRERIUHhYXFhcWHi4dIR0dIR0uKTEoJSgxKUk5MzM5SVRHQ0dUZltbZoF6gaio4v/CABEIA/0HHgMBIgACEQEDEQH/xAAZAAEBAQEBAQAAAAAAAAAAAAAAAQIEAwf/2gAIAQEAAAAA+WgAgAQAACTxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHUAEACAAAE8YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdQBAAgAAAPPzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOoCABAAAAGfEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ggAIAAAATxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqIACAAAACPLIAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqgAIAAAAEMeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpACAAAABAz5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkAgAAAAQCeUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6QIAAAAEAHjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkIAAAAEAEeeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkQAAAAQAQYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0oAAAAIAIDGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAAIAIBnzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAACACAGfMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAAgAgBE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAIAIAQTzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAACACACBPMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAgAgAgE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAIAIAIAZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAEAEAEAImAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgABABACAEGcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdAAIAIAQAgMwCAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ABABACACBbAJEkAAAAAAAAAAAAAAAAAAAAAAAAAAAAdACACACAEDWjAEDMgAAAAAAAAAAAAAAAAAAAAAAAAAAAOgEAEAEAIGtoYBAJJAAAAAAAAAAAAAAAAAAAAAAAAAAAB0CACACAEBvREyEAgzAAAAAAAAAAAAAAAAAAAAAAAAAAADoQAQAQAgLuoJkICBc5AAAAAAAAAAAAAAAAAAAAAAAAAAAdEAEAIAQC+iAzBAIKkyAAAAAAAAAAAAAAAAAAAAAAAAAAB7gEAIAQA9ADAQEFQzAAAAAAAAAAAAAAAAAAAAAAAAAAAe4EAIAIAboCZEAgqDMAAAAAAAAAAAAAAAAAAAAAAAAAAD3CAEAEAJrYCSEAgqBMgAAAAAAAAAAAAAAAAAAAAAAAAAB7kAEAIARfQAmRAQLASQAAAAAAAAAAAAAAAAAAAAAAAAAAe8AEAIAQb0AjJAIKgIkAAAAAAAAAAAAAAAAAAAAAAAAAAPYAgBACCvQBEiAQVAQkAAAAAAAAAAAAAAAAAAAAAAAAAAPYCAEAIKa0AjJAQKgQMgAAAAAAAAAAAAAAAAAAAAAAAAAHsEAIAQKNaBCRAIKgIEgAAAAAAAAAAAAAAAAAAAAAAAAAD2IAIAQUR6UQMkBBUBASAAAAAAAAAAAAAAAAAAAAAAAAAAPaACAEFEL6CBIgEFQICIAAAAAAAAAAAAAAAAAAAAAAAAAA9QCAEFEDWyCIgEFQECEAAAAAAAAAAAAAAAAAAAAAAAAAAeoEAIKIBraCIQECwEBCAAAAAAAAAAAAAAAAAAAAAAAAAAPUIAQUIA1tBEQCCoCBBAAAAAAAAAAAAAAAAAAAAAAAAAAHqQAgoQBGthEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAD1gBBQgBDWyEIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAB6AEFEAIF9IEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAB6AQUQAgD0CEBAsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAAegQUQAgCPSkIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAAehBRACAINbQgEFQECAgAAAAAAAAAAAAAAAAAAAAAAAAAA9IKEAQAgXYQECwEBAgAAAAAAAAAAAAAAAAAAAAAAAAAAbKEAQAgDWiAQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAABuhAEAIAi+iAQVAQICAAAAAAAAAAAAAAAAAAAAAAAAAAA9BACAIAgb1AIKgQECAAAAAAAAAAAAAAAAAAAAAAAAAAAeiAEAQBALsCCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAADYBAEAIAXYQLAQECAAAAAAAAAAAAAAAAAAAAAAAAAAANgQBACAA1oQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAAANhAEAIAAXaCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAAA2QAgCAAAugsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAW6qkSSwAgCAAAFtVAQIEAAAAAAAAAAAAAAAAAAAAAAAADWta1SgDlAQBAAAALdQEBBAAAAAAAAAAAAAAAAAAAAAAAAF1vdUFAHKCAIAAAAFqkBCAAAAAAAAAAAAAAAAAAAAAAAANem6CgoByiAEAAAAAKAQAAAAAAAAAAAAAAAAAAAAAAABdetFCgoByoAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABd+ihQUFAcgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfpSgoUFAcgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANemgUKCgoHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu/QBQUFBQcYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF9dAChQUFBxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA160AKCgoKHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/SgAUKCgocYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9NqABQUFBRxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALvZQAFBQoKOMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC72FAAUKCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemqFAAUFCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3soUABQoKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANegoUABQUKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX0oUKAAoUFBeMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu6oUUABQUKByAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG9FChQAFCgoOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABrYUKKAAoKChyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXahRQoAChQUOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAADdKKFCgAUFBRyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuxQooUABQoKOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtBRQoUACgoKcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXSihRQoACgoU5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2UKKFCgAUFBXIAAAAAAAAAAAAAAAAAAAAAAAAAAAAALtFFCihQAFBQrkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtIoUUKFAAUKC8gAAAAAAAAAAAAAAAAAAAAAAAAAAAABdKiihRQoACgoXkAAAAAAAAAAAAAAAAAAAAAAAAAAAAALpSUKKFCgAKFBygAAAAAAAAAAAAAAAAAAAAAAAAAAAAGqVFFCihQAFBQ5QAAAAAAAAAAAAAAAAAAAAAAAAAAAADYpFFFChQAFChygAAAAAAAAAAAAAAAAAAAAAAAAAAAALaKihRQooACgo5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAFtCoooUUKAAoUcoAAAAAAAAAAAAAAAAAAAAAAAAAAAADRRUUKKFCgAUFOUAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0oVFFCihQAFCnKAAAAAAAAAAAAAAAAAAAAAAAAAAAABaKKihRQoUACgrlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtCioooUUKAAoLygAAAAAAAAAAAAAAAAAAAAAAAAAAAAVRRUUKKFCgAUF5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAKUUVFFCihQAFBzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUooqKFFChQAFDmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFCgAKHMAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgAKOYAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUUKKFAAUcwAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiikUUUKFAAU5gAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAApzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFIooUUKAArmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUABeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAABRQoqKKFFCgAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUUVFFCihQAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiiooUUKFABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUKKKiihRQoAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRRQooUAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAooopFFFChQBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUUiihRQoBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUKKFCgOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKFFChQOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFCioooUUKBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUVFCihQoOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChRRUUUKKFBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFChzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFJQooUKOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUBQBQKH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/9oACAECEAAAAOoCAASAAAAAAAAAAAAAAANgQAAyAAAAAAAAAAAAAAA2EAACQAAAAAAAAAAAAAADZAAAJAAAAAAAAAAAAAAANwAAAZAAAAAAAAAAAAAAA0AAAJAAAAAAAAAAAAAAANAAAIQAAAAAAAAAAAAAADQAAIEAAAAAAAAAAAAAAA0AAIBAAAAAAAAAAAAAAANAAIAQAAAAAAAAAAAAAADQAIAEAAAAAAAAAAAAAAA0AIAAIAAAAAAAAAAAAAANAIABSBAAAAAAAAAAAAAANAQAFEsBAAAAAAAAAAAAAA0EABNBAIAAAAAAAAAAAAADRAARoJYEAAAAAAAAAAAAAAoAELqBAQAAAAAAAAAAAAACgAgtCAgAAAAAAAAAAAAACgCLDQICAAAAAAAAAAAAAAKAiwNBAQAAAAAAAAAAAAAAoIsA0ECAAAAAAAAAAAAAACiLADQgIAAAAAAAAAAAAAAKiwANEBAAAAAAAAAAAAAAAAAC1AgAAAAAAAAAAAAAAAAAtgIAAAAAAAAAAAAAAAAAFBAAAAAAAAAAAAAAAAAAKEAAAAAAAAAAAAAAAAAAUgAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAtKMAAAAAAAAAAAAAAAAAaoFOYAAAAAAAAAAAAAAAAtoBTmAAAAAAAAAAAAAAAAaFAK5gAAAAAAAAAAAAAAAWgoBeYAAAAAAAAAAAAAAALQKAXmAAAAAAAAAAAAAAAFoBQDAAAAAAAAAAAAAAAAtAFAMAAAAAAAAAAAAAAAFUAKAwAAAAAAAAAAAAAAAUoAoDAAAAAAAAAAAAAAACigBQMAAAAAAAAAAAAAAAUFAFAwAAAAAAAAAAAAAABQUAKDAAAAAAAAAAAAAAACgoAoMAAAAAAAAAAAAAAAKCgBQwAAAAAAAAAAAAAAAUFAFDAAAAAAAAAAAAAAABQUAKMAAAAAAAAAAAAAAACgoAUwAAAAAAAAAAAAAAAFBQBTAAAAAAAAAAAAAAAAUFACsAAAAAAAAAAAAAAAAoKAKwAAAAAAAAAAAAAAACgoAXAAAAAAAAAAAAAAAAWUFAFwAAAAAAAAAAAAAAABQUAMgAAAAAAAAAAAAAAAsoKAMgAAAAAAAAAAAAAAAKCgDIAAAAAAAAAAAAAAABQUAyAAAAAAAAAAAAAAAAUFAMgAAAAAAAAAAAAAAACgoDIAAAAAAAAAAAAAAAAoKAyAAAAAAAAAAAAAAAAFBQMgAAAAAAAAAAAAAAAAoKDIAAAAAAAAAAAAAAAAKCgyAAAAAAAAAAAAAAAABQUMgAAAAAAAAAAAAAAAAUFDIAAAAAAAAAAAAAAAAAoD//EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAgBAxAAAADAAoigoAAAAAAAAAAAAAADIBSKAoAAAAAAAAAAAAAADIFIoAoAAAAAAAAAAAAAADIUigAUAAAAAAAAAAAAAADJSKAAUAAAAAAAAAAAAAADNIoAAoAAAAAAAAAAAAAACIUAAoAAAAAAAAAAAAAAAyUAApKAAAAAAAAAAAAAAAzQABUUAAAAAAAAAAAAAAAgABUUAAAAAAAAAAAAAAAIABUUAAAAAAAAAAAAAAACABUUAAAAAAAAAAAAAAAAgBUUBAoAAAAAAAAAAAAAAgFJQEBQAAAAAAAAAAAAAAgUlAJKFAAAAAAAAAAAAAACCooBIooAAAAAAAAAAAAAAIqKAGVCgAAAAAAAAAAAAAAIoAIBQAAAAAAAAAAAAAAIoACAoAAAAAAAAAAAAAAAAAM0KAAAAAAAAAAAAAAAAACBQAAAAAAAAAAAAAAAAAIKAAAAAAAAAAAAAAAAAAgoAAAAAAAAAAAAAAAAACFAAAAAAAAAAAAAAAAAAEUAAAAAAAAAAAAAAAAAASgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAloAAAAAAAAAAAAAAAAEQA0AAAAAAAAAAAAAAAAEgANAAAAAAAAAAAAAAAAElgANAAAAAAAAAAAAAAAAIlQANAAAAAAAAAAAAAAAAgSwANAAAAAAAAAAAAAAABASoANAAAAAAAAAAAAAAACAJYANAAAAAAAAAAAAAAABAIsANAAAAAAAAAAAAAAAEsASoA0AAAAAAAAAAAAAAAJYAlgDQAAAAAAAAAAAAAAAIAlQDQAAAAAAAAAAAAAAASwBLANAAAAAAAAAAAAAAAAQBKgNAAAAAAAAAAAAAAAAlgCWA0AAAAAAAAAAAAAAAAQCVA0AAAAAAAAAAAAAAABLAEsDQAAAAAAAAAAAAAAAAgEqDQAAAAAAAAAAAAAAACWAJYNAAAAAAAAAAAAAAAAEsAlQ0AAAAAAAAAAAAAAAASwBLDQAAAAAAAAAAAAAAAAlgEWNAAAAAAAAAAAAAAAACWAJU0AAAAAAAAAAAAAAAAEsASzQAAAAAAAAAAAAAAAAEASqAAAAAAAAAAAAAAAACWAJaAAAAAAAAAAAAAAAAAgCWgAAAAAAAAAAAAAAAASwBNAAAAAAAAAAAAAAAAACATQAAAAAAAAAAAAAAAACWAKAAAAAAAAAAAAAAAAAEAoAAAAAAAAAAAAAAAABLAKAAAAAAAAAAAAAAAAAJYCgAAAAAAAAAAAAAAAACWAoAAAAAAAAAAAAAAAAASwKAAAAAAAAAAAAAAAAAAg//EACgQAAEEAQIFBAMBAAAAAAAAAAEAAhFwMTBREhNAQYADECBQIWBh0P/aAAgBAQABPwD5QPeAoC/HURoOEi5SINyPFyOEi5Tcjs3I+5HYPmScm5HZuR1yOuR2Lkdi5Di5Di5Di5Di5Di5DchuR3vBUFQbdgrhRAnQgKFBtYNUAe51ItINJQAHRxZ4b8j0JFlgSgI+Z6IiyQJQEaB6MiyAI60ixgI0TbTRpHpjYY+iNhNGkbkPUmwG3IMaR8vRnSNtNzcjc3I3NyNzcjc3IM+ZIxcjbkFyi5AYuVpuWZuQGLlBuUG5QVNYQdlwO2XLcuU5co7rlHdcr+rlHdco7rlO3C5blwO2XC7Y/UzVQBPZD0yh6Q3QY3ZQB2+4BqUMcUPTHcoNA7ffypp8NJQYO6AA/RZUqVKlTSwYSg0C4Qw90ABcIYSgALhAJQaBcQZvcQEoNi4g2UBFxNbvcYbvcbWxcbRFxgXG0XGBcYE3IBFxgXGB5jgXGLkFxi5B5jjzHFyDzHFyD/AKp0pUqVKlSpUqVKlSpUqVK//EAB0RAAMAAgIDAAAAAAAAAAAAAAABEWBwEpCAoLD/2gAIAQIBAT8A30/QDhCeJ8zFLca7Hl0RQhCIiIjijjk8Jl8JuCfXf//EABoRAAICAwAAAAAAAAAAAAAAAAARAaAQYLD/2gAIAQMBAT8AtfzYjYxjyx7Q+5f/AP/Z"};let Z=function(e){function r(){var e;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),(e=t(this,r,[Object.assign({},q,Y({},o,{tagName:"div",controlType:"block"}))]))._options=Object.assign({},q,o),e.$container.classList.add(`${j}-poster`,`${j}-hide`),e._imgLoadErrorEvent=e._imgLoadErrorEvent.bind(e),e._options.poster&&e.setPoster(e._options.poster),e}return A(r,e),o(r,[{key:"_imgLoadErrorEvent",value:function(e){var t;null==this._options.onLoadImgError||this._options.onLoadImgError.call(this._options,(null==(t=e.target)?void 0:t.getAttribute("src"))||"")}},{key:"setPoster",value:function(e){var t;""!==(e=null!=e?e:this._options.poster)?(this.$container.innerHTML=`<img class="${j}-poster-img" src="${e}" />`,null==(t=this.$container.querySelector(`.${j}-poster-img`))||t.addEventListener("error",this._imgLoadErrorEvent)):this.$container.innerHTML=""}},{key:"show",value:function(){this.$container&&(this.$container.style.display="flex",this.$container.classList.remove(`${j}-hide`))}},{key:"hide",value:function(){var e,t;c(r,"hide",this)([]),null==(t=this.$container)||null==(e=t.querySelector(`.${j}-poster-img`))||e.removeEventListener("error",this._imgLoadErrorEvent)}},{key:"destroy",value:function(){this.hide(),this.$popupContainer.removeChild(this.$container)}}])}(W);const X={play:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="play">\n <rect x="6.5" y="5.5" rx="1.25" width="2.5" height="13"/>\n <rect x="15" y="5.5" rx="1.25" width="2.5" height="13"/>\n </svg>',pause:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="pause"> <path d="M17.5 13.66L9.1 19.26C7.78 20.14 6 19.19 6 17.59L6 6.4C6 4.8 7.78 3.85 9.1 4.73L17.5 10.33C18.69 11.12 18.69 12.87 17.5 13.66Z" /></svg>',volume:e=>`<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" fill="none" focusable="false" aria-hidden="true" data-icon="volume">\n \t<path class="${e}-icon-volume-muted" d="M20.57 9.69L16.07 14.19" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path class="${e}-icon-volume-muted" d="M20.57 14.19L16.07 9.69" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \x3c!-- 音低 --\x3e\n <path class="${e}-icon-volume-low" d="M15.53 15.97C16.69 15.25 17.49 13.75 17.49 12C17.49 10.25 16.69 8.75 15.53 8.02" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t\x3c!-- 音高 --\x3e\n <path class="${e}-icon-volume-high" d="M18.5 19.06C20.31 17.5 21.49 14.93 21.49 12C21.49 9.07 20.31 6.48 18.49 4.93" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M5.87 8.62L9.85 5.25C10.5 4.7 11.49 5.16 11.49 6.01L11.49 17.98C11.49 18.83 10.5 19.29 9.85 18.74L5.87 15.37" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M5.87 15.37L3.49 15.37C2.94 15.37 2.49 14.92 2.49 14.37L2.49 9.62C2.49 9.07 2.94 8.62 3.49 8.62L5.87 8.62" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>`,mobileFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="mobile-fullscreen">\n <path d="M4 2.9082L11 2.9082C12.5188 2.9082 13.75 4.1394 13.75 5.6582L13.75 17.6582C13.75 19.177 12.5188 20.4082 11 20.4082L4 20.4082C2.4812 20.4082 1.25 19.177 1.25 17.6582L1.25 5.6582C1.25 4.1394 2.4812 2.9082 4 2.9082ZM4 4.4082L11 4.4082C11.6903 4.4082 12.25 4.9679 12.25 5.6582L12.25 17.6582C12.25 18.3485 11.6903 18.9082 11 18.9082L4 18.9082C3.30969 18.9082 2.75 18.3485 2.75 17.6582L2.75 5.6582C2.75 4.9679 3.30969 4.4082 4 4.4082ZM22.1511 18.3113C22.1511 19.3595 21.2467 20.1652 20.1509 20.2362L19.993 20.2413L15.2939 20.2413C14.8798 20.2413 14.5439 19.9055 14.5439 19.4913C14.5439 19.1116 14.8262 18.7979 15.1921 18.7482L15.2939 18.7413L19.993 18.7413C20.344 18.7413 20.5962 18.5592 20.6432 18.3732L20.6511 18.3113L20.6511 12.4895C20.6511 12.3048 20.4338 12.1042 20.1062 12.066L19.993 12.0594L15.2939 12.0594C14.8798 12.0594 14.5439 11.7238 14.5439 11.3094C14.5439 10.9298 14.8262 10.616 15.1921 10.5663L15.2939 10.5594L19.993 10.5594C21.1055 10.5594 22.0605 11.3175 22.145 12.3416L22.1511 12.4895L22.1511 18.3113ZM10.3225 16.1035C10.3225 15.6893 9.98669 15.3535 9.57251 15.3535L5.84644 15.3535L5.74463 15.3604C5.37854 15.41 5.09644 15.7239 5.09644 16.1035C5.09644 16.5177 5.43225 16.8535 5.84644 16.8535L9.57251 16.8535L9.67432 16.8467C10.0404 16.797 10.3225 16.4832 10.3225 16.1035Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',fullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="webFullscreen">\n \t<path d="M18.4009 2.40125L5.59972 2.40125C4.74849 2.39276 3.9297 2.72729 3.32788 3.32935C2.72607 3.9314 2.39188 4.75031 2.40062 5.6015L2.40062 18.4015C2.3922 19.2527 2.7267 20.0715 3.32874 20.6733C3.93079 21.2751 4.74969 21.6093 5.60091 21.6006L18.4009 21.6006C19.2519 21.609 20.0705 21.2747 20.6723 20.6729C21.2741 20.0711 21.6084 19.2525 21.6 18.4015L21.6 5.60034C21.6084 4.74933 21.2741 3.93073 20.6723 3.32892C20.0705 2.72711 19.2519 2.39282 18.4009 2.40125ZM18.401 20.3213C19.4246 20.3213 20.321 19.4249 20.321 18.4014L20.321 5.60022C20.321 4.5766 19.4246 3.68024 18.401 3.68024L5.59987 3.68024C4.57631 3.68024 3.67993 4.5766 3.67993 5.60022L3.67993 18.4014C3.67993 19.4249 4.57631 20.3213 5.59987 20.3213L18.401 20.3213ZM14.5599 5.27087L18.3997 5.27087L18.3997 5.27209C18.7849 5.27087 19.0405 5.52527 19.0405 5.91168L19.0405 9.75153C19.0405 10.1331 18.7849 10.3887 18.401 10.3911C18.0158 10.3887 17.7602 10.1331 17.7602 9.75153L17.7602 7.44763L14.0487 11.1591C13.9313 11.2808 13.7695 11.3494 13.6005 11.3494C13.4315 11.3494 13.2697 11.2808 13.1523 11.1591C13.0292 11.0428 12.9594 10.8809 12.9594 10.7115C12.9594 10.5421 13.0292 10.3802 13.1523 10.2639L16.8638 6.55005L14.5599 6.55005C14.1735 6.54883 13.9179 6.29443 13.9203 5.91046C13.9179 5.52411 14.1735 5.26971 14.5599 5.27087ZM10.594 12.6625L6.88254 16.3751L6.88254 14.0712C6.88254 13.686 6.62695 13.4304 6.24297 13.4304C5.85898 13.4304 5.60338 13.686 5.60219 14.0712L5.60219 17.9111C5.60219 18.2939 5.85898 18.5483 6.24297 18.5507L10.0828 18.5507C10.4668 18.5483 10.7224 18.2939 10.7224 17.9099C10.7224 17.5247 10.4668 17.2691 10.0816 17.2703L7.77771 17.2703L11.4904 13.5588C11.6133 13.4421 11.6829 13.2801 11.6829 13.1107C11.6829 12.9412 11.6133 12.7791 11.4904 12.6625C11.3737 12.5396 11.2117 12.47 11.0422 12.47C10.8727 12.47 10.7107 12.5396 10.594 12.6625Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',exitFullscreen:'\n <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="exitWebFullscreen">\n \t<path d="M18.4009 2.40125L5.59978 2.40125C4.74855 2.39276 3.92976 2.72729 3.32794 3.32935C2.72614 3.9314 2.39194 4.75031 2.40068 5.6015L2.40068 18.4015C2.39226 19.2527 2.72676 20.0715 3.3288 20.6733C3.93085 21.2751 4.74976 21.6093 5.60097 21.6006L18.4009 21.6006C19.252 21.609 20.0706 21.2747 20.6723 20.6729C21.2741 20.0711 21.6085 19.2525 21.6 18.4015L21.6 5.60034C21.6085 4.74933 21.2741 3.93073 20.6723 3.32892C20.0706 2.72711 19.252 2.39282 18.4009 2.40125ZM18.4012 20.3212C19.4247 20.3212 20.3211 19.4248 20.3211 18.4012L20.3211 5.6001C20.3211 4.57648 19.4247 3.68011 18.4012 3.68011L5.59999 3.68011C4.57643 3.68011 3.68005 4.57648 3.68005 5.6001L3.68005 18.4012C3.68005 19.4248 4.57643 20.3212 5.59999 20.3212L18.4012 20.3212ZM17.4401 11.3494L13.6002 11.3494L13.6002 11.3483C13.215 11.3494 12.9594 11.095 12.9594 10.7087L12.9594 6.86877C12.9594 6.48718 13.215 6.23163 13.599 6.22925C13.9842 6.23163 14.2398 6.48718 14.2398 6.86877L14.2398 9.17273L17.9512 5.46124C18.0686 5.3396 18.2304 5.27087 18.3994 5.27087C18.5685 5.27087 18.7303 5.3396 18.8476 5.46124C18.9708 5.57751 19.0406 5.73944 19.0406 5.90881C19.0406 6.07825 18.9708 6.24011 18.8476 6.35645L15.1362 10.0703L17.4401 10.0703C17.8265 10.0715 18.082 10.3259 18.0797 10.7099C18.082 11.0963 17.8265 11.3506 17.4401 11.3494ZM6.69115 18.358L10.4026 14.6454L10.4026 16.9493C10.4026 17.3345 10.6582 17.5901 11.0422 17.5901C11.4262 17.5901 11.6818 17.3345 11.683 16.9493L11.683 13.1094C11.683 12.7266 11.4262 12.4722 11.0422 12.4698L7.20233 12.4698C6.81834 12.4722 6.56276 12.7266 6.56276 13.1106C6.56276 13.4958 6.81834 13.7514 7.20354 13.7502L9.50746 13.7502L5.79478 17.4617C5.67188 17.5784 5.60228 17.7404 5.60228 17.9099C5.60228 18.0793 5.67188 18.2413 5.79478 18.358C5.91145 18.481 6.07349 18.5505 6.24297 18.5505C6.41243 18.5505 6.57446 18.481 6.69115 18.358Z" clip-rule="evenodd" fill-rule="evenodd"/>\n</svg>',globalFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="fullscreen">\n <path d="M8 4L6 4C4.89 4 4 4.89 4 6L4 8" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M4 16L4 18C4 19.1 4.89 20 6 20L8 20" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M16 20L18 20C19.1 20 20 19.1 20 18L20 16" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M20 8L20 6C20 4.89 19.1 4 18 4L16 4" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',exitGlobalFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="exitFullscreen">\n <path d="M4 8L6 8C7.1 8 8 7.1 8 6L8 4" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M8 20L8 18C8 16.89 7.1 16 6 16L4 16" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M20 16L18 16C16.89 16 16 16.89 16 18L16 20" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M16 4L16 6C16 7.1 16.89 8 18 8L20 8" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',close:'<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close"><path d="M6.34 6.34L17.65 17.65" stroke-width="1.5" stroke-linecap="round"/><path d="M6.34 17.65L17.65 6.34" stroke-width="1.5" stroke-linecap="round"/></svg>',ptz:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="ptz">\n <circle cx="12" cy="12" r="2.771739" stroke-width="1.5"/>\n <path d="M9.06 5.14L10.76 3.8C11.48 3.23 12.51 3.23 13.23 3.8L14.93 5.14" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4.87 14.93L3.54 13.23C2.97 12.51 2.97 11.48 3.54 10.76L4.87 9.06" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M18.91 14.93L20.24 13.23C20.81 12.51 20.81 11.48 20.24 10.76L18.91 9.06" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M9.06 18.69L10.76 20.02C11.48 20.59 12.51 20.59 13.23 20.02L14.93 18.69" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',download:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="download">\n <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m20,14.83l0,3.67c0,0.55 -0.45,1 -1,1l-14,0c-0.56,0 -1,-0.45 -1,-1l0,-3.67"/>\n <path fill="currentColor" d="m11.125,9.66357l-2.59094,0c-0.44544,0 -0.66846,0.53853 -0.35352,0.85353l3.45956,3.4595c0.1952,0.1953 0.5119,0.1953 0.7071,0l3.4596,-3.4595c0.3149,-0.315 0.0919,-0.85353 -0.3536,-0.85353l-2.5782,0l0,-5.95654c0,-0.48315 -0.3917,-0.875 -0.875,-0.875c-0.4833,0 -0.875,0.39185 -0.875,0.875l0,5.95654z"/>\n </svg>',sdk:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="sdk">\n <path d="M6.20253 2.50012L11.6496 2.50012C12.2335 2.50012 12.7939 2.72827 13.2069 3.13391L15.3547 5.24329C15.7677 5.64893 16 6.19934 16 6.77271L16 15.1062C16 16.3011 15.0142 17.2694 13.7975 17.2694L6.20253 17.2694C4.98578 17.2694 4 16.3011 4 15.1062L4 4.66333C4 3.46826 4.98578 2.50012 6.20253 2.50012ZM8.07051 6.09814C8.02467 5.76025 7.73502 5.49976 7.38452 5.49976C7.00217 5.49976 6.69221 5.80969 6.69221 6.19202L6.69221 8.49976L6.69853 8.59375C6.74437 8.93164 7.03403 9.19202 7.38452 9.19202C7.76688 9.19202 8.07683 8.88208 8.07683 8.49976L8.07683 6.19202L8.07051 6.09814ZM9.69238 5.49976C10.0429 5.49976 10.3325 5.76025 10.3784 6.09814L10.3847 6.19202L10.3847 8.49976C10.3847 8.88208 10.0747 9.19202 9.69238 9.19202C9.34189 9.19202 9.05223 8.93164 9.00639 8.59375L9.00008 8.49976L9.00008 6.19202C9.00008 5.80969 9.31003 5.49976 9.69238 5.49976ZM12.686 6.09814C12.6402 5.76025 12.3505 5.49976 12 5.49976C11.6176 5.49976 11.3077 5.80969 11.3077 6.19202L11.3077 8.49976L11.314 8.59375C11.3598 8.93164 11.6495 9.19202 12 9.19202C12.3824 9.19202 12.6923 8.88208 12.6923 8.49976L12.6923 6.19202L12.686 6.09814Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',cloudRec:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud">\n <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L9.32983 16L9.32983 13.3784L7.66479 13.3784C7.21924 13.3784 6.99634 12.8398 7.31128 12.5249L9.63892 10.197C9.83423 10.002 10.1509 10.002 10.3462 10.197L12.6738 12.5249C12.9888 12.8398 12.7659 13.3784 12.3203 13.3784L10.6553 13.3784L10.6553 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',cloudRecord:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud-record">\n <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439ZM10.8674 13.9116L6.89038 13.9116C6.26294 13.9116 5.75391 13.3889 5.75391 12.7449L5.75391 9.24487C5.75391 8.60034 6.26294 8.07812 6.89038 8.07812L10.8674 8.07812C11.4954 8.07812 12.0039 8.60034 12.0039 9.24487L12.0039 10.2937C12.2932 10.0627 12.9229 9.63184 13.4836 9.271C13.8145 9.05811 14.2461 9.24219 14.2461 9.63599L14.2461 12.3655C14.2461 12.759 13.8142 12.9434 13.4836 12.7307C12.9321 12.3755 12.303 11.9438 12.0039 11.707L12.0039 12.7449C12.0039 13.3889 11.4954 13.9116 10.8674 13.9116Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',playBack:'<svg width="1em" height="1em" viewBox="0 0 26.8701 26.8701" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-back">\n <path d="M8.48 4.24C8.48 4.24 7.39 8.16 7.77 7.77C11.29 4.26 16.99 4.26 20.5 7.77C24.02 11.29 24.02 16.99 20.5 20.5C16.99 24.02 11.29 24.02 7.77 20.5C6.03 18.76 5.16 16.49 5.14 14.21" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',playForward:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-forward">\n <path d="M19.58 7.28C18.01 4.71 15.18 2.99 11.95 2.99C7 2.99 3 7 3 11.95C3 16.89 7 20.9 11.95 20.9C16.51 20.9 20.27 17.48 20.82 13.07" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.56 4.22L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.5 7.29L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',filter:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="filter">\n <path d="M12.57 9.92L16.31 5.76C16.55 5.49 16.69 5.15 16.69 4.79C16.69 3.98 16.03 3.33 15.23 3.33L4.79 3.33C4.43 3.33 4.09 3.46 3.82 3.7L3.72 3.79C3.21 4.33 3.19 5.18 3.7 5.75L7.38 9.91L7.38 15.66C7.38 16.11 7.7 16.51 8.14 16.63L11.32 17.43C11.95 17.59 12.57 17.11 12.57 16.46L12.57 9.92ZM4.88 4.83L8.88 9.35L8.88 15.27L11.07 15.82L11.07 9.34L15.13 4.83L4.88 4.83Z" fill-rule="evenodd"/>\n </svg>',arrow:'<svg width="1em" height="1em" viewBox="0 0 30 30" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="arrow">\n <path d="M23 19L15 12L7 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',more:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="more">\n <path d="M4 6.8L20.8 6.8" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4 12.39L12.4 12.39" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4 18L8.19 18" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',moreDot:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="more-dot">\n <path d="M8.75 3.75C8.75 3.05964 9.30964 2.5 10 2.5C10.6904 2.5 11.25 3.05964 11.25 3.75C11.25 4.44036 10.6904 5 10 5C9.30964 5 8.75 4.44036 8.75 3.75ZM8.75 10C8.75 9.30964 9.30964 8.75 10 8.75C10.6904 8.75 11.25 9.30964 11.25 10C11.25 10.6904 10.6904 11.25 10 11.25C9.30964 11.25 8.75 10.6904 8.75 10ZM10 15C9.30964 15 8.75 15.5596 8.75 16.25C8.75 16.9404 9.30964 17.5 10 17.5C10.6904 17.5 11.25 16.9404 11.25 16.25C11.25 15.5596 10.6904 15 10 15Z" fill-rule="evenodd" />\n </svg>',minusCircle:'<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="minus-circle">\n \t\t<path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />\n\t\t <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />\n </svg>',plusCircle:'<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="plus-circle">\n <path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />\n <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />\n <path stroke="currentColor" d="M0 0L5 0" stroke-linecap="round" stroke-width="1.25" transform="matrix(0,1,-1,0,9.96729,7.55884)" />\n </svg>',record:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="record">\n <path d="M4.53 19C3.03 19 1.8 17.74 1.8 16.2L1.8 7.8C1.8 6.25 3.03 5 4.53 5L14.08 5C15.58 5 16.8 6.25 16.8 7.8L16.8 16.2C16.8 17.74 15.58 19 14.08 19L4.53 19Z" stroke-width="1.5" stroke-linejoin="round"/>\n <path d="M17.25 13.64C17.94 14.2 18.97 15.03 20.36 16.15C21.09 16.74 22.19 16.21 22.19 15.27L22.19 8.72C22.19 7.78 21.09 7.25 20.36 7.84C18.99 8.94 17.96 9.77 17.28 10.32" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',talk:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="talk">\n \t<path stroke="none" d="M12.22 18.95C12.65 18.95 13.01 19.21 13.07 19.54L13.08 19.64L13.08 21.78C13.08 22.16 12.69 22.47 12.22 22.47C11.78 22.47 11.42 22.21 11.37 21.87L11.36 21.78L11.36 19.64C11.36 19.26 11.74 18.95 12.22 18.95Z" fill-rule="evenodd"/>\n <path d="M19.53 11.37L19.53 11.58C19.53 15.74 16.15 19.11 11.99 19.11C7.83 19.11 4.46 15.74 4.46 11.58L4.46 11.43" fill="none" stroke-width="1.5" stroke-linecap="round"/>\n <path stroke="none" d="M12.05 1.52C9.3 1.52 7.07 3.58 7.07 6.12L7.07 12.07C7.07 14.61 9.3 16.67 12.05 16.67C14.79 16.67 17.02 14.61 17.02 12.07L17.02 6.12C17.02 3.58 14.79 1.52 12.05 1.52ZM8.57 12.07L8.57 6.12C8.57 5.94 8.59 5.75 8.63 5.57C8.67 5.36 8.74 5.16 8.83 4.96C8.86 4.89 8.9 4.82 8.93 4.75C9.09 4.46 9.3 4.21 9.55 3.97C9.64 3.89 9.73 3.81 9.83 3.74C10.08 3.55 10.35 3.4 10.66 3.28C10.79 3.23 10.93 3.19 11.06 3.15C11.38 3.07 11.71 3.02 12.05 3.02C12.38 3.02 12.71 3.07 13.03 3.15C13.17 3.19 13.3 3.23 13.43 3.28C13.74 3.4 14.02 3.55 14.27 3.74C14.36 3.81 14.45 3.89 14.54 3.97C14.79 4.21 15 4.46 15.16 4.75C15.2 4.82 15.23 4.89 15.26 4.96C15.35 5.16 15.42 5.36 15.46 5.57C15.5 5.75 15.52 5.94 15.52 6.12L15.52 12.07C15.52 12.26 15.5 12.44 15.46 12.63C15.42 12.83 15.35 13.04 15.26 13.24C15.23 13.31 15.2 13.38 15.16 13.45C15 13.73 14.79 13.99 14.54 14.22C14.45 14.3 14.36 14.38 14.27 14.45C14.02 14.64 13.74 14.79 13.43 14.91C13.3 14.96 13.17 15.01 13.03 15.05C12.71 15.13 12.38 15.17 12.05 15.17C11.71 15.17 11.38 15.13 11.06 15.05C10.93 15.01 10.79 14.96 10.66 14.91C10.35 14.79 10.08 14.64 9.83 14.45C9.73 14.38 9.64 14.3 9.55 14.22C9.3 13.99 9.09 13.73 8.93 13.45C8.9 13.38 8.86 13.31 8.83 13.24C8.74 13.04 8.67 12.83 8.63 12.63C8.59 12.44 8.57 12.26 8.57 12.07Z" fill-rule="evenodd"/>\n </svg>',talkGrowth:e=>`<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">\n \t\t<g fill="currentColor" stroke="currentColor">\n <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />\n <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />\n <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />\n </g>\n <g class="${e}-icon-talk-growth-dot">\n <path class="${e}-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n </g>\n </svg>`,capturePicture:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="capture-picture">\n \t<path d="M6.94 7.51C7.34 7.51 7.7 7.28 7.86 6.91L8.43 5.6C8.59 5.23 8.95 5 9.35 5L14.69 5C15.04 5 15.37 5.18 15.55 5.49L16.45 7.02C16.63 7.33 16.96 7.51 17.31 7.51L18.5 7.51C19.6 7.51 20.5 8.41 20.5 9.51L20.5 17C20.5 18.1 19.6 19 18.5 19L5.5 19C4.39 19 3.5 18.1 3.5 17L3.5 9.51C3.5 8.41 4.39 7.51 5.5 7.51L6.94 7.51Z" stroke-width="1.5"/>\n\t <circle cx="12" cy="12.525146" r="3.068097" stroke-width="1.5"/>\n </svg>',zoom:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="zoom">\n <ellipse cx="10.914795" cy="11.25" rx="8.004043" ry="8.25" stroke-width="1.5"/>\n <path d="M14.31 11.04L8.05 11.14" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M11.13 14.22L11.23 7.95" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.45 17.83L19.36 20.83" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',privacyMasking:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="privacy-masking">\n <path d="M12 19C11.15 19 10.31 18.82 9.49 18.5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M20.88 12.46C18.98 15.96 15.49 19 11.99 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.07 8.92C19.76 9.72 20.38 10.61 20.88 11.53C21.03 11.82 21.03 12.17 20.88 12.46" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5 19L19 5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M9.77 14.22C8.54 12.99 8.54 11 9.77 9.77C11 8.54 12.99 8.54 14.22 9.77" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M17.04 6.95C15.49 5.75 13.74 5 12 5C8.5 5 5.01 8.03 3.11 11.53C2.96 11.82 2.96 12.17 3.11 12.46C4.06 14.21 5.41 15.84 6.95 17.04" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',info:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info">\n <path d="M12 1.5C6.20154 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20154 22.5 12 22.5C17.7985 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7985 1.5 12 1.5ZM10.875 7.875C10.875 8.49609 11.3789 9 12 9C12.6211 9 13.125 8.49609 13.125 7.875C13.125 7.25391 12.6211 6.75 12 6.75C11.3789 6.75 10.875 7.25391 10.875 7.875ZM12.75 17.0625C12.75 17.1656 12.6656 17.25 12.5625 17.25L11.4375 17.25C11.3344 17.25 11.25 17.1656 11.25 17.0625L11.25 10.6875C11.25 10.5844 11.3344 10.5 11.4375 10.5L12.5625 10.5C12.6656 10.5 12.75 10.5844 12.75 10.6875L12.75 17.0625Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',error:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="error">\n <path d="M1.5 12C1.5 6.20156 6.20157 1.5 12 1.5C17.7984 1.5 22.5 6.20156 22.5 12C22.5 17.7984 17.7984 22.5 12 22.5C6.20157 22.5 1.5 17.7984 1.5 12ZM14.3297 15.982L15.8766 15.9891C15.9797 15.9891 16.0641 15.9047 16.0641 15.8016C16.0641 15.757 16.0477 15.7148 16.0195 15.6797L12.9727 12.0469L16.0172 8.4164C16.0453 8.38125 16.0617 8.33906 16.0617 8.29453C16.0617 8.18906 15.9774 8.10703 15.8742 8.10703L14.3273 8.11406L12 10.8891L9.67267 8.11172L8.12344 8.10469C8.02032 8.10469 7.93594 8.18906 7.93594 8.29219C7.93594 8.33672 7.95233 8.37891 7.98047 8.41406L11.0297 12.0445L7.98047 15.6773C7.95233 15.7125 7.93594 15.7547 7.93594 15.7992C7.93594 15.9047 8.02032 15.9867 8.12344 15.9867L9.67267 15.9797L12 13.2047L14.3297 15.982Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>'};function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";return n&&Object.keys(n).forEach((e=>{r+=`${e}="${n[e]}"`})),`<span class="${j}-icon ${j}-icon-${t}" ${r}>${e}</span>`}const ee=function(){return J(X.play,"play",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},te=function(){return J(X.pause,"pause",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return J(X.volume(j),"volume",e)},re=function(){return J(X.mobileFullscreen,"mobile-fullscreen",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},oe=function(){return J(X.exitFullscreen,"exit-fullscreen",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ie=function(){return J(X.fullscreen,"fullscreen",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},se=function(){return J(X.exitGlobalFullscreen,"exit-global-fullscreen",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},Ae=function(){return J(X.globalFullscreen,"global-fullscreen",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ae=function(){return J(X.capturePicture,"capture-picture",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},le=function(){return J(X.ptz,"ptz",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ce=function(){return J(X.record,"record",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ue=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return J(X.talkGrowth(j),"talk-growth",e)},de=function(){return J(X.minusCircle,"minus-circle",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},he=function(){return J(X.plusCircle,"plus-circle",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},pe=function(){return J(X.sdk,"sdk",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},fe=function(){return J(X.cloudRec,"cloud-rec",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ve=function(){return J(X.cloudRecord,"cloud-record",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},me=function(){return J(X.error,"error",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},ge=function(){return J(X.info,"info",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})};function ye(){return ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(this,arguments)}const Ce={};let _e=function(e){function r(){var e;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),(e=t(this,r,[Object.assign({},Ce,ye({},o,{tagName:"div",controlType:"block"}))]))._options=Object.assign({},Ce,o),e.$container.classList.add(`${j}-message`,`${j}-hide`),e}return A(r,e),o(r,[{key:"info",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._show(`${ge()}<div class="${j}-message-msg">${e}</div>`,t,"info")}},{key:"warn",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._show(`${ge()}<div class="${j}-message-msg">${e}</div>`,t,"warn")}},{key:"error",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._show(`${me()}<div class="${j}-message-msg">${e}</div>`,t,"error")}},{key:"toast",value:function(e){}},{key:"_show",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info";this._timer&&(clearTimeout(this._timer),this._timer=null),this.$popupContainer.classList.add(`${j}-has-message`,`${j}-has-message-${n}`),"function"==typeof this._options.render?this.$container.innerHTML=this._options.render(e,t,n):this.$container.innerHTML=`<div class="${j}-message-content ${j}-message-${n}">${e||""}</div>`,this.$container.style.display="flex",this.$container.classList.remove(`${j}-hide`),t>0&&(this._timer=setTimeout((()=>{this.hide(),this._timer&&clearTimeout(this._timer),this._timer=null}),1e3*t))}},{key:"destroy",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.hide(),c(r,"destroy",this)([])}},{key:"hide",value:function(){c(r,"hide",this)([]),this.$container.innerHTML="",Array.from(this.$popupContainer.classList).forEach((e=>{new RegExp(`^${j}-has-message`,"ig").test(e)&&this.$popupContainer.classList.remove(e)}))}}])}(W);function be(){return be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(this,arguments)}let we=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[be({},e,{tagName:"span",controlType:"button",classNameSuffix:"play"})]))._playing=!1,o._options=e,o._playing=!!e.playing,o.on(H.play,(e=>{o._playing!==e&&(o._playing=e,o._render())})),o._render(),o}return A(r,e),o(r,[{key:"playing",get:function(){return this._playing}},{key:"_onControlClick",value:function(e){this._playing=!this._playing,this.emit(H.control.play,this._playing),null==this._options.onClick||this._options.onClick.call(this._options,e,this._playing),this._render()}},{key:"_render",value:function(){var e,t;this._playing?this.$container.innerHTML=ee({title:null==(e=this._options.locale)?void 0:e.play}):this.$container.innerHTML=te({title:null==(t=this._options.locale)?void 0:t.pause})}}])}(W);function Ee(e,t){let n=null,r=0;return function(){for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];const A=Date.now(),a=t-(A-r);a<=0?(r=A,e.apply(this,i)):n||(n=setTimeout((()=>{r=Date.now(),n=null,e.apply(this,i)}),a))}}var ke,$e,Te;let Le=function(){function e(){n(this,e)}return o(e,null,[{key:"orientationEventListener",value:function(t){let n=null,r=()=>{var t,n;if(null==(t=screen)?void 0:t.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type||screen.mozOrientation||screen.msOrientation};if(void 0!==(null==(n=window)?void 0:n.orientation)){const e=window.orientation;return{angle:e>=0?e:360+e,type:90===Math.abs(e)?"landscape":"portrait"}}return e.isMobile?{angle:window.innerWidth>window.innerHeight?90:0,type:window.innerWidth>window.innerHeight?"landscape":"portrait"}:{angle:0,type:"unknow"}},o=r(),i=()=>{const e=null==r?void 0:r();e.angle===o.angle&&e.type===o.type||(null==t||t(e),o=e)},s=()=>{n&&clearTimeout(n),i&&(n=setTimeout(i,200))};return screen.orientation?screen.orientation.addEventListener("change",i):"onorientationchange"in window?window.addEventListener("orientationchange",i):e.isMobile&&window.addEventListener("resize",s),[o,()=>{screen.orientation&&i?screen.orientation.removeEventListener("change",i):"onorientationchange"in window&&i?window.removeEventListener("orientationchange",i):e.isMobile&&window.removeEventListener("resize",s),i=null,s=null,r=null,n&&(clearTimeout(n),n=null)}]}},{key:"resizeObserver",value:function(e,t){let n=(n,r)=>{for(const o of n)o.target===e&&t&&t(n,r)},r=new ResizeObserver(Ee(n,50));return r.observe(e),{unobserve(){try{null==r||r.unobserve(e)}catch(e){}n=null},disconnect(){null==r||r.disconnect(),r=null,n=null}}}}])}();Le.isMobile=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null==(ke=navigator)?void 0:ke.userAgent)||/Macintosh/i.test(null==($e=navigator)?void 0:$e.userAgent)&&(null==(Te=navigator)?void 0:Te.maxTouchPoints)>1;const Fe={step:.01,range:[0,1],draggable:!0,disabled:!1,showPercent:!1,showPlus:!1,showMinus:!1,onChange:()=>{},renderText:(e,t)=>(100*t).toFixed(0)};let Se=function(){return o((function e(t){var r,o;if(n(this,e),this._percent=0,this._value=0,this._disabled=!1,this._delegateSliderMouseDown=null,this._delegateSliderHandleMouseDown=null,this._delegateProgressMouseDown=null,this._delegatePlusClick=null,this._delegateMinusClick=null,this.options=Object.assign({},Fe,t),2!==(null==(r=this.options.range)?void 0:r.length))throw new Error("Progress range must be an array with two elements.");if(this.options.range[0]>=this.options.range[1])throw new Error("Progress range first element must be less than the second element.");this.$container=t.container,this._render(),this._eventListeners();const i=null!=(o=this.options.defaultValue)?o:this.options.range[0];this._value=+i.toFixed(2),this._percent=+((i-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2),this._updateUI(),this.disabled=this.options.disabled}),[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e}},{key:"value",get:function(){return this._value},set:function(e){this._updateValuePercent("value",e)}},{key:"percent",get:function(){return this._percent},set:function(e){this._updateValuePercent("percent",e)}},{key:"destroy",value:function(){var e,t,n,r,o,i,s,A,a,l;null==(t=this._delegateSliderMouseDown)||null==(e=t.destroy)||e.call(t),this._delegateSliderMouseDown=null,null==(r=this._delegateSliderHandleMouseDown)||null==(n=r.destroy)||n.call(r),this._delegateSliderHandleMouseDown=null,null==(i=this._delegateProgressMouseDown)||null==(o=i.destroy)||o.call(i),this._delegateProgressMouseDown=null,null==(A=this._delegatePlusClick)||null==(s=A.destroy)||s.call(A),this._delegatePlusClick=null,null==(l=this._delegateMinusClick)||null==(a=l.destroy)||a.call(l),this._delegateMinusClick=null,this.$content&&this.$container.removeChild(this.$content),this.$content=null}},{key:"_updateValuePercent",value:function(e,t){if("percent"===e){if(t<0||t>1)return;this._percent!==t&&(this._percent=+t.toFixed(2),this._convertPercentToValue(this._percent),null==this.options.onChange||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}else if("value"===e){if(t<this.options.range[0]||t>this.options.range[1])return;this._value!==t&&(this._value=+t.toFixed(2),this._convertValueToPercent(this._value),null==this.options.onChange||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}}},{key:"_convertPercentToValue",value:function(e){this._value=+(this.options.range[0]+(this.options.range[1]-this.options.range[0])*e).toFixed(2)}},{key:"_convertValueToPercent",value:function(e){this._percent=+((e-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2)}},{key:"_render",value:function(){var e;this.$content=document.createElement("div"),this.$content.className=`${j}-progress ${null!=(e=this.options.className)?e:""}`,this.$content.innerHTML=`${this.options.showPercent?`<div class="${j}-progress-text">${null==this.options.renderText?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)}</div>`:""}\n ${this.options.showPlus?`<div class="${j}-progress-plus">\n ${he()}\n </div>`:""}\n <div class="${j}-progress-slider">\n <div class="${j}-progress-slider-fill"></div>\n <div class="${j}-progress-slider-handle" style="top: 100%"></div>\n </div>\n ${this.options.showMinus?`<div class="${j}-progress-minus">\n ${de()}\n </div>`:""}`,this.$container.appendChild(this.$content)}},{key:"_updateUI",value:function(){const e=this.$content;if(null==e||e.setAttribute("data-value",this._value+""),e.querySelector(`.${j}-progress-slider-fill`)){const t=+(100*this._percent).toFixed(0);this.options.showPercent&&(e.querySelector(`.${j}-progress-text`).innerHTML=null==this.options.renderText?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)),e.querySelector(`.${j}-progress-slider-fill`).style.height=t+"%",e.querySelector(`.${j}-progress-slider-handle`).style.top=100-t+"%"}}},{key:"_eventListeners",value:function(){this._delegateSliderMouseDown=F(this.$content,`.${j}-progress-slider`,"mousedown",(e=>{var t,n;if(e.stopPropagation(),e.delegateTarget.classList.contains(`${j}-disabled`)||this._disabled)return;const r=this.$content.querySelector(`.${j}-progress-slider`).getBoundingClientRect();let o=e.clientY-r.top;o=Math.max(0,Math.min(o,r.height));const i=+((r.height-o)/r.height).toFixed(2);this._convertPercentToValue(i),null==(n=this.options)||null==(t=n.onProgressClick)||t.call(n,this._value,i,this.options.range),this.percent=i})),this._delegateSliderHandleMouseDown=F(this.$content,`.${j}-progress-slider-handle`,"mousedown",(e=>{if(e.stopPropagation(),!this.options.draggable)return;if(e.delegateTarget.classList.contains(`${j}-disabled`)||this._disabled)return;const t=e.clientY,n=this.$content.querySelector(`.${j}-progress-slider-fill`).offsetHeight,r=this.$content.querySelector(`.${j}-progress-slider`).offsetHeight;let o=Ee((e=>{if(e.stopPropagation(),!this.options.draggable||this._disabled)return;const o=t-e.clientY;let i=n+o;i=Math.max(0,Math.min(i,r)),this.percent=+(i/r).toFixed(2)}),20);const i=this.$content;function s(){i.removeEventListener("mousemove",o),o=null,i.removeEventListener("mouseup",s),i.removeEventListener("mouseup",s)}i.addEventListener("mousemove",o),i.addEventListener("mouseup",s),i.addEventListener("mouseleave",s)})),this.options.showPlus&&(this._delegatePlusClick=F(this.$content,`.${j}-progress-plus`,"click",(e=>{if(e.delegateTarget.classList.contains(`${j}-disabled`)||this._disabled)return;const t=this._value+this.options.step;t<=this.options.range[1]?this.value=t:this.value=this.options.range[1],null==this.options.onPlusClick||this.options.onPlusClick.call(this.options,this.value,this.percent,this.options.range)}))),this.options.showMinus&&(this._delegateMinusClick=F(this.$content,`.${j}-progress-minus`,"click",(e=>{if(e.delegateTarget.classList.contains(`${j}-disabled`)||this._disabled)return;const t=this._value-this.options.step;t>=this.options.range[0]?this.value=t:this.value=this.options.range[0],null==this.options.onMinusClick||this.options.onMinusClick.call(this.options,this.value,this.percent,this.options.range)}))),this._delegateProgressMouseDown=F(this.$container,`.${j}-progress`,"mousedown",(e=>{e.stopPropagation()}))}}])}();function Pe(){return Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pe.apply(this,arguments)}const Me={volume:.8,muted:!1,open:!1,trigger:"hover",onOpenChange:()=>{},onChange:()=>{}};let Oe=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[Pe({},e,{tagName:"span",classNameSuffix:"volume",controlType:"button"})]))._muted=!1,o._volume=0,o._lastVolume=0,o._progress=null,o._options=Object.assign({},Me,e),o._render(),o._volume=o._options.volume>=1?1:o._options.volume<=0?0:+o._options.volume.toFixed(2),o._lastVolume=o._volume,o._muted=!!o._options.muted||!1,Le.isMobile||(o.picker=new $({container:o.$container,getPopupContainer:()=>o.$container,trigger:o._options.trigger,open:o._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{null==o._options.onOpenChange||o._options.onOpenChange.call(o._options,e,o._muted?o._lastVolume:o.volume,o._muted),o.emit(H.control.volumePanelOpenChange,e,o._lastVolume,o._muted)}}),o._progress=new Se({container:o.picker.$body,defaultValue:o._options.muted?0:o._options.volume,range:[0,1],step:.1,showPercent:!0,className:`${j}-volume-progress`,onProgressClick:()=>{o.muted=!1},onChange:e=>{e!==o._volume&&(o.volume=e)}})),o._updateUI(),o._addEventListener(),o.on(H.audioCodecUnsupported,(()=>{o.disabled=!0})),o.on(H.volumechange,((e,t)=>{o._muted!==t&&(o.muted=t),o._lastVolume!==e&&(o.volume=e)})),o}return A(r,e),o(r,[{key:"muted",get:function(){return this._muted},set:function(e){this._muted!==e&&(e?(this._volume=0,this._progress&&(this._progress.value=0)):(this._volume=this._lastVolume,this._progress&&(this._progress.value=this._lastVolume)),this._muted=e,null==this._options.onChange||this._options.onChange.call(this._options,this.volume,e),this.emit(H.control.volumechange,this.volume,e)),this._updateUI()}},{key:"volume",get:function(){return this._lastVolume},set:function(e){if(e>=0&&e<=1){const t=+e.toFixed(2);this._lastVolume!==t&&(this._volume=t,this._lastVolume=this._volume,this._progress&&(this._progress.value=t),null==this._options.onChange||this._options.onChange.call(this._options,t,this._muted),this.emit(H.control.volumechange,t,this._muted)),this._updateUI()}}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e,this.picker&&(this.picker.disabled=e),this._updateDisabledState(e)}},{key:"destroy",value:function(){var e,t,n;null==(t=this._progress)||null==(e=t.destroy)||e.call(t),this._progress=null,null==(n=this.picker)||n.destroy(),this.picker=null,c(r,"destroy",this)([])}},{key:"_toggleMute",value:function(){if(!this.disabled)return 0===this._lastVolume?(this.volume=this._options.volume||.5,void(this.muted=!1)):void(this.muted?this.muted=!1:this.muted=!0)}},{key:"_updateUI",value:function(){var e,t,n,r;(this._$content.classList.remove(j+"-icon-volume-muted"),this._$content.classList.remove(j+"-icon-volume-zero"),this._$content.classList.remove(j+"-icon-volume-low"),this._$content.classList.remove(j+"-icon-volume-high"),this._muted)?(this._volume=0,this._$content.classList.add(j+"-icon-volume-muted"),this._$content.setAttribute("title",(null==(t=this._options)||null==(e=t.locale)?void 0:e.muted)||"muted")):(this._$content.classList.remove(j+"-icon-volume-muted"),0===this._volume?this._$content.classList.add(j+"-icon-volume-zero"):this._volume<=.5?this._$content.classList.add(j+"-icon-volume-low"):this._$content.classList.add(j+"-icon-volume-high"),this._$content.setAttribute("title",(null==(r=this._options)||null==(n=r.locale)?void 0:n.volume)||"volume"))}},{key:"_$content",get:function(){return this.$container.querySelector(`.${j}-icon-volume`)}},{key:"_render",value:function(){var e;this.$container.innerHTML=ne({title:null==(e=this._options.locale)?void 0:e.volume})}},{key:"_onControlClick",value:function(){}},{key:"_addEventListener",value:function(){F(this.$container,`.${j}-control-volume`,"mousedown",(()=>{this.$container.classList.contains(`${j}-disabled`)||this._toggleMute()}))}}])}(W);function Ie(e,t,n,r,o,i,s){try{var A=e[i](s),a=A.value}catch(e){return void n(e)}A.done?t(a):Promise.resolve(a).then(r,o)}function De(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Ie(i,r,o,s,A,"next",e)}function A(e){Ie(i,r,o,s,A,"throw",e)}s(void 0)}))}}const xe={prefix:"ezplayer"};const Re=function(){function e(){n(this,e),this.fullscreens=[]}return o(e,[{key:"add",value:function(e,t){if(e){const n=this.fullscreens.findIndex((t=>t.element===e));n>=0?(this.fullscreens[n].onChange||(this.fullscreens[n].onChange=[]),this.fullscreens[n].onChange.push(t)):this.fullscreens.push({element:e,onChange:[t]})}}},{key:"getChanges",value:function(e){const t=this.fullscreens.find((t=>t.element===e));return t&&(null==t?void 0:t.onChange)||[]}},{key:"remove",value:function(e,t){const n=this.fullscreens.findIndex((t=>t.element===e));if(n>=0){var r;const e=null==(r=this.fullscreens[n].onChange)?void 0:r.find((e=>e===t));if(e){var o;const t=null==(o=this.fullscreens[n].onChange)?void 0:o.filter((t=>t!==e));this.fullscreens[n].onChange=t}(!this.fullscreens[n].onChange||this.fullscreens[n].onChange&&0===this.fullscreens[n].onChange.length)&&this.fullscreens.splice(n,1)}}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}().getInstance();let Ne=function(){return o((function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this._isCurrentFullscreen=!1,this._isFullscreen=!1,this._currentFullscreenElementList=[],this.$container=t,this._options=Object.assign({},xe,r),this._options.onChange&&Le.isMobile&&Re.add(this.$container,this._options.onChange),this._isFullscreen=!!this._options.isFullscreen,this._fullscreenchange2=this._fullscreenchange2.bind(this),R.isEnabled&&R.on("change",this._fullscreenchange2)}),[{key:"fullscreen",value:function(){return De((function*(){if(!Le.isMobile)return yield R.request(this.$container);this._fullscreenchange(this.$container,!0)})).call(this)}},{key:"exitFullscreen",value:function(){return De((function*(){if(Le.isMobile)this._fullscreenchange(this.$container,!1);else if(this._isFullscreen)return yield R.exit()})).call(this)}},{key:"toggle",value:function(){return De((function*(){if(!Le.isMobile)return yield R.toggle(this.$container);this._fullscreenchange(this.$container,!this._isCurrentFullscreen)})).call(this)}},{key:"destroy",value:function(){R.isEnabled&&R.off("change",this._fullscreenchange2),Le.isMobile&&this._options.onChange&&Re.remove(this.$container,this._options.onChange),this._fullscreenchange2=null}},{key:"_fullscreenchange2",value:function(){this._fullscreenchange()}},{key:"_fullscreenchange",value:function(e,t){if(this._isFullscreen=R.isFullscreen,e)this._isCurrentFullscreen=!!t,this._currentFullscreenElementList=[];else if(this._isFullscreen){const e=R.element,t=this._currentFullscreenElementList.indexOf(e);e&&-1===t?this._currentFullscreenElementList.unshift(e):e&&t>=1&&this._currentFullscreenElementList.shift();const n=this._currentFullscreenElementList.indexOf(this.$container);this._isCurrentFullscreen=n>=0}else this._isCurrentFullscreen=!1,this._currentFullscreenElementList=[];var n,r,o;this._isCurrentFullscreen?null==(n=this.$container)||n.classList.add(`${this._options.prefix}-fullscreen`):(null==(r=this.$container)||r.classList.remove(`${this._options.prefix}-fullscreen`),null==(o=this.$container)||o.classList.remove(`${this._options.prefix}-global-fullscreen`));Le.isMobile?Re.getChanges(this.$container).forEach((e=>{e({isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:Le.isMobile})})):null==this._options.onChange||this._options.onChange.call(this._options,{isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:Le.isMobile}),Le.isMobile&&(this._isCurrentFullscreen?document.body.classList.add(`${this._options.prefix}-body-mobile-noscroll`):document.body.classList.remove(`${this._options.prefix}-body-mobile-noscroll`))}}])}();function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ue.apply(this,arguments)}let Be=function(e){function r(e){var o,i;if(n(this,r),(o=t(this,r,[Ue({tagName:"span",classNameSuffix:"fullscreen",controlType:"button"},e)])).isCurrentFullscreen=!1,o.options=e,o.isCurrentFullscreen=!!e.isCurrentFullscreen,o._$rootContainer=null==(i=o.options)?void 0:i.rootContainer,!o._$rootContainer)throw new Error("Fullscreen option fullscreenContainer is required!");return o._fullscreenChange=o._fullscreenChange.bind(o),o._fullscreenUtil=new Ne(o._$rootContainer,{onChange:o._fullscreenChange,isFullscreen:o.isCurrentFullscreen}),o._render(),o._event(),o}return A(r,e),o(r,[{key:"destroy",value:function(){var e;this.$container.innerHTML="",null==(e=this._fullscreenUtil)||e.destroy(),this._fullscreenUtil=null,c(r,"destroy",this)([])}},{key:"_render",value:function(){var e,t,n;Le.isMobile?this.$container.innerHTML=re({title:null==(e=this.options.locale)?void 0:e.fullscreen}):this.$container.innerHTML=oe({title:null==(t=this.options.locale)?void 0:t.exitFullscreen})+ie({title:null==(n=this.options.locale)?void 0:n.fullscreen})}},{key:"_fullscreenChange",value:function(e){this.isCurrentFullscreen=e.isCurrentFullscreen,this._render()}},{key:"_onControlClick",value:function(){var e,t;this.isCurrentFullscreen?null==(e=this._fullscreenUtil)||e.exitFullscreen():null==(t=this._fullscreenUtil)||t.fullscreen()}},{key:"_event",value:function(){}}])}(W);function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}let Qe=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[je({},e,{tagName:"div",controlType:"block",classNameSuffix:"rec"})]))._options=e,o.recType=e.recType||"sdk",o._render(),o._onClickIcon(),o._activeIcon(e.recType),o}return A(r,e),o(r,[{key:"_render",value:function(){var e,t,n;this.$container.innerHTML=pe({title:null==(e=this._options.locale)?void 0:e.sdkRec,"data-type":"sdk"})+fe({title:null==(t=this._options.locale)?void 0:t.cloudRec,"data-type":"cloudRec"})+ve({title:null==(n=this._options.locale)?void 0:n.cloudRecord,"data-type":"cloudRecord"})}},{key:"_activeIcon",value:function(e){switch(this.$container.querySelectorAll(`.${j}-icon`).forEach((e=>{e.classList.remove(`${j}-active`)})),e){case"sdk":var t;null==(t=this.$container.querySelector(`.${j}-icon-sdk`))||t.classList.add(`${j}-active`);break;case"cloudRec":var n;null==(n=this.$container.querySelector(`.${j}-icon-cloud-rec`))||n.classList.add(`${j}-active`);break;case"cloudRecord":var r;null==(r=this.$container.querySelector(`.${j}-icon-cloud-record`))||r.classList.add(`${j}-active`)}}},{key:"_onClickIcon",value:function(){this._delegation=F(this.$container,`.${j}-icon`,"click",(e=>{const t=e.delegateTarget;if(!t.classList.contains(`${j}-disabled`)){const e=t.getAttribute("data-type");this.recType!==e&&(this.recType=e,this._activeIcon(e),this.emit(H.control.changeRecType,e),null==this._options.onChange||this._options.onChange.call(this._options,e))}}))}},{key:"destroy",value:function(){var e;null==(e=this._delegation)||e.destroy(),this._delegation=null,c(r,"destroy",this)([])}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);var ze={play:"播放",pause:"暂停",fullscreen:"全屏",exitFullscreen:"退出全屏",globalFullscreen:"全局全屏",exitGlobalFullscreen:"退出全局全屏",volume:"音量",muted:"静音",loading:"加载中,请稍等...",sdkRec:"SDK存储",cloudRec:"云存储",cloudRecord:"云录像",definition:"清晰度",capturePicture:"截图",fetchError:"取流失败,请检查网络"},He={play:"play",pause:"pause",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",globalFullscreen:"globalFullscreen",exitGlobalFullscreen:"exitGlobalFullscreen",volume:"volume",muted:"muted",loading:"Loading...",sdkRec:"SDK",cloudRec:"cloud",cloudRecord:"cloudRecord",definition:"definition",capturePicture:"capturePicture",fetchError:"Stream retrieval failed, please check the network"};function We(){return We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},We.apply(this,arguments)}const Ke={sound:"volume",webExpend:"fullscreen",expend:"globalFullscreen",pantile:"ptz",recordvideo:"record",hd:"definition"};function Ve(e){return[e.filter((e=>"left"===e.part)),e.filter((e=>"right"===e.part))]}var Ge={autoFocus:3,footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"volume",part:"left",defaultActive:1,isrender:1},{iconId:"fullscreen",part:"right",defaultActive:0,isrender:1},{iconId:"globalFullscreen",part:"right",defaultActive:0,isrender:1}]}};const Ye={pcLive:{autoFocus:3,header:{btnList:[{iconId:"deviceID",part:"left",isrender:1},{iconId:"deviceName",part:"left",isrender:1},{iconId:"rec",part:"right",isrender:1},{iconId:"cloudRec",part:"right",isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"capturePicture",part:"left",isrender:1},{iconId:"sound",part:"left",isrender:1},{iconId:"pantile",part:"left",isrender:1},{iconId:"recordvideo",part:"left",isrender:1},{iconId:"talk",part:"left",isrender:1},{iconId:"zoom",part:"left",isrender:1},{iconId:"hd",part:"right",isrender:1},{iconId:"webExpend",part:"right",isrender:1},{iconId:"expend",part:"right",isrender:1}]}},pcRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileLive:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},security:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},voice:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}};let qe=function(){return o((function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._options=t,this.$container=document.createElement("div"),this._defaultClass=`${j}-${this._options.cType}`,this._options.cType&&this.$container.classList.add(this._defaultClass),(null==t?void 0:t.className)&&this.$container.classList.add(t.className),(null==t?void 0:t.color)&&(this.$container.style.cssText+=`--${j}-default-color: ${t.color};`),(null==t?void 0:t.activeColor)&&(this.$container.style.cssText+=`--${j}-active-color: ${t.activeColor};`),(null==t?void 0:t.backgroundColor)&&(this.$container.style.cssText+=`;background-image: url();background-color: ${t.backgroundColor};`),t.getPopupContainer?this.$popupContainer=null==t.getPopupContainer?void 0:t.getPopupContainer.call(t):this.$popupContainer=document.body,this.$left=document.createElement("div"),this.$left.classList.add(`${this._defaultClass}-left`),this.$right=document.createElement("div"),this.$right.classList.add(`${this._defaultClass}-right`),this.$container.appendChild(this.$left),this.$container.appendChild(this.$right),this.$popupContainer.appendChild(this.$container)}),[{key:"destroy",value:function(){var e;null==(e=this.$popupContainer)||e.removeChild(this.$container)}}])}();function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}let Xe=function(e){function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),t(this,r,[Ze({},e,{cType:"header"})])}return A(r,e),o(r)}(qe),Je=function(){return o((function e(t){if(n(this,e),this.$container=document.createElement("div"),this.$container.classList.add(`${j}-content`),"function"==typeof t.getPopupContainer){const e=null==t.getPopupContainer?void 0:t.getPopupContainer.call(t);null==e||e.appendChild(this.$container)}}),[{key:"destroy",value:function(){this.$container.remove()}}])}();function et(){return et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},et.apply(this,arguments)}let tt=function(e){function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),t(this,r,[et({},e,{cType:"footer"})])}return A(r,e),o(r)}(qe);function nt(){return nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt.apply(this,arguments)}let rt=function(e){function r(e){return n(this,r),t(this,r,[nt({},e,{controlType:"button",classNameSuffix:"global-fullscreen"})])}return A(r,e),o(r,[{key:"_render",value:function(){var e,t;this.$container.innerHTML=se({title:null==(e=this.options.locale)?void 0:e.exitGlobalFullscreen})+Ae({title:null==(t=this.options.locale)?void 0:t.globalFullscreen})}},{key:"_onControlClick",value:function(){var e,t;this.isCurrentFullscreen&&this._$rootContainer.classList.contains(`${j}-global-fullscreen`)?(this._$rootContainer.classList.remove(`${j}-global-fullscreen`),null==(e=this._fullscreenUtil)||e.exitFullscreen()):(this._$rootContainer.classList.add(`${j}-global-fullscreen`),null==(t=this._fullscreenUtil)||t.fullscreen())}}])}(Be);function ot(){return ot=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}let it=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[ot({},e,{tagName:"span",classNameSuffix:"capture-picture"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){var e;this.$container.innerHTML=ae({title:null==(e=this._options.locale)?void 0:e.capturePicture})}},{key:"_onControlClick",value:function(e){this.emit(H.control.capturePicture,this._options.type||"download",this._options.quality||.9),c(r,"_onControlClick",this)([e])}}])}(W);function st(){return st=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},st.apply(this,arguments)}let At=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[st({},e,{tagName:"span",controlType:"button",classNameSuffix:"ptz"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=le()}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);function at(){return at=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at.apply(this,arguments)}let lt=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[at({},e,{tagName:"span",controlType:"button",classNameSuffix:"record"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=ce()}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(this,arguments)}let ut=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[ct({},e,{tagName:"span",controlType:"button",classNameSuffix:"talk"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=ue()}},{key:"onClick",value:function(){}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);function dt(){return dt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}const ht={open:!1,max:8};let pt=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[dt({},e,{tagName:"span",controlType:"button",classNameSuffix:"zoom"})]))._options=Object.assign({},ht,e||{}),o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){}},{key:"destroy",value:function(){var e;this._options.rootContainer&&this._$zoomPanel&&(null==(e=this._options.rootContainer)||e.removeChild(this._$zoomPanel),this._$zoomPanel=null);c(r,"destroy",this)([])}},{key:"_onControlClick",value:function(e){}}])}(W);function ft(){return ft=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ft.apply(this,arguments)}let vt=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[ft({tagName:"span",type:"button",controlType:"button"},e)]))._options=e,o.list=e.list||[],void 0===e.value&&null===e.value||(o.value=e.value),o._picker=new $({container:o.$container,getPopupContainer:()=>o.$container,trigger:Le.isMobile?"click":"hover",isMobile:Le.isMobile,wrapClassName:`${j}-${e.classNameSuffix}-picker`,open:o._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{const t=o.list.find((e=>e.value===o.value));null==o._options.onOpenChange||o._options.onOpenChange.call(o._options,e,o.value,t)}}),o.list&&o.updateSelectOptions(o.list),o._onSelectChange(),o._activeOption(),o}return A(r,e),o(r,[{key:"updateSelectOptions",value:function(e){var t;(null==e?void 0:e.length)>0&&(null==(t=this._picker)||t.innerHTML(`<ul class="${j}-select-list">\n ${e.map((e=>`\n <li class="${j}-select-option ${+e.value===this.value?`${j}-active`:""}" data-value="${e.value}">\n <span>${e.label}</span>\n </li>\n `)).join("")}\n </ul>`),this._activeOption())}},{key:"_render",value:function(e){if(e)if(this.$container.querySelector(`.${j}-select-btn`))this.$container.querySelector(`.${j}-select-btn`).innerHTML=`<span>${null==e?void 0:e.label}</span>`;else{const t=document.createElement("span");t.classList.add(`${j}-btn`,`${j}-select-btn`),t.innerHTML=`<span>${null==e?void 0:e.label}</span>`,this.$container.appendChild(t)}}},{key:"_activeOption",value:function(){if(this._picker){var e,t;const n=null==(e=this._picker.$body)?void 0:e.querySelector(`.${j}-active`);null==n||n.classList.remove(j+"-active");const r=null==(t=this._picker.$body)?void 0:t.querySelector(`.${j}-select-option[data-value="${this.value}"]`);null==r||r.classList.add(j+"-active");const o=this.list.find((e=>e.value===this.value));this._render(o)}}},{key:"_onSelectChange",value:function(){this._picker&&(this._delegation=F(this._picker.$body,`.${j}-select-option`,"click",(e=>{const t=e.delegateTarget;if(!t.classList.contains(`${j}-disabled`)){const e=t.getAttribute("data-value");if(this.value!==+e){this.value=+e,this._activeOption();const t=this.list.find((e=>e.value===this.value));null==this._options.onChange||this._options.onChange.call(this._options,this.value,t),this._picker.open=!1}}})))}},{key:"destroy",value:function(){var e,t;null==(e=this._delegation)||e.destroy(),null==(t=this._picker)||t.destroy(),c(r,"destroy",this)([])}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);function mt(){return mt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}let gt=function(e){function r(e){var o;return n(this,r),o=t(this,r,[mt({},e,{value:e.definition||1,controlType:"button",list:[{label:"4k",value:4},{label:"极清极清极清极清极清极清极清",value:2},{label:"1080p",value:1},{label:"标清标清标清标清标清标清标清标清",value:.5}],classNameSuffix:"definition",onChange:(t,n)=>{var r;null==e||null==(r=e.onChange)||r.call(e,t,n),o.emit(H.control.changeDefinition,t,n)},onOpenChange:(t,n,r)=>{var i;null==e||null==(i=e.onOpenChange)||i.call(e,t,n,r),o.emit(H.control.definitionPanelOpenChange,t,n,r)}})])}return A(r,e),o(r)}(vt);function yt(){return yt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yt.apply(this,arguments)}let Ct=function(e){function r(e){var o;return n(this,r),o=t(this,r,[yt({},e,{value:e.speed||1,list:[{label:"4x4x",value:4},{label:"2x",value:2},{label:"1x1x",value:1},{label:"0.5x",value:.5}],classNameSuffix:"speed",controlType:"button",onChange:(t,n)=>{var r;null==e||null==(r=e.onChange)||r.call(e,t,n),o.emit(H.control.changeSpeed,t,n)},onOpenChange:(t,n,r)=>{var i;null==e||null==(i=e.onOpenChange)||i.call(e,t,n,r),o.emit(H.control.speedPanelOpenChange,t,n,r)}})])}return A(r,e),o(r)}(vt);function _t(){return _t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_t.apply(this,arguments)}let bt=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[_t({},e,{tagName:"span",controlType:"button",classNameSuffix:"date"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML="date"}},{key:"_onControlClick",value:function(e){c(r,"_onControlClick",this)([e])}}])}(W);function wt(){return wt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wt.apply(this,arguments)}let Et=function(e){function r(e){var o;return n(this,r),(o=t(this,r,[wt({},e,{tagName:"div",controlType:"block",classNameSuffix:"time-line"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=`<span class="${j}-full-block ${j}-block-time-line">Line</span>`}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W);function kt(){return kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kt.apply(this,arguments)}function $t(){return $t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$t.apply(this,arguments)}function Tt(){return Tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}function Lt(){return Lt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(this,arguments)}const Ft={play:we,volume:Oe,deviceID:function(e){function r(e){var o;return n(this,r),(o=t(this,r,[kt({},e,{tagName:"span",controlType:"text",classNameSuffix:"device-id"})]))._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=`<span class="${j}-text ${j}-text-device-id">DeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceID</span>`}}])}(W),deviceName:function(e){function r(e){var o;return n(this,r),(o=t(this,r,[$t({},e,{tagName:"span",controlType:"text",classNameSuffix:"device-name"})]))._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=`<span class="${j}-text ${j}-text-device-name">DeviceNameDeviceNameDeviceNameDeviceNameDeviceNameDeviceName</span>`}}])}(W),capturePicture:it,ptz:At,record:lt,talk:ut,zoom:pt,definition:gt,fullscreen:Be,globalFullscreen:rt,rec:Qe,speed:Ct,date:bt,timeLine:Et,playBack:function(e){function r(e){var o;return n(this,r),(o=t(this,r,[Tt({},e,{tagName:"span",controlType:"button",classNameSuffix:"play-back"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=`<span class="${j}-icon ${j}-icon-play-back">\n ${X.playBack}\n <span class="${j}-play-forward-back">${this._options.time||10}</span>\n </span>`}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W),playForward:function(e){function r(e){var o;return n(this,r),(o=t(this,r,[Lt({},e,{tagName:"span",controlType:"button",classNameSuffix:"play-forward"})]))._options=e,o._render(),o}return A(r,e),o(r,[{key:"_render",value:function(){this.$container.innerHTML=`<span class="${j}-icon ${j}-icon-play-forward">\n ${X.playForward}\n <span class="${j}-play-forward-time">${this._options.time||10}</span>\n </span>`}},{key:"_onControlClick",value:function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}}])}(W)};function St(e,t,n,r,o,i,s){try{var A=e[i](s),a=A.value}catch(e){return void n(e)}A.done?t(a):Promise.resolve(a).then(r,o)}function Pt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){St(i,r,o,s,A,"next",e)}function A(e){St(i,r,o,s,A,"throw",e)}s(void 0)}))}}function Mt(){return Mt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mt.apply(this,arguments)}const Ot={language:"zh",mobileExtendConfig:{controls:["ptz","talk","record","rec"]}},It=["width","height","playing","volume","muted","loading","recType","isCurrentFullscreen","orientationAngle","zoom","recording"];let Dt=function(e){function r(e){var o,i,s,A,a,l,c;(n(this,r),(o=t(this,r)).options=Ot,o.controls={},o._$header=null,o._$footer=null,o._interactiveResult=null,o._fullscreen=null,o._cleanupOrientation=null,o._cleanUpResizeObserver=null,o._width=0,o._height=0,o._isCurrentFullscreen=!1,o._orientationAngle=0,o._playing=!1,o._loading=!1,o._volume=0,o._muted=!1,o._zoom=1,o._recording=!1,o._changeThemeFlag=!1,o._onPauseTimingFunc=null,o._recType="sdk",null==e.onInitializing||e.onInitializing.call(e,o),o._initOptions(e),o._initClassName(),o.contentControl=new Je({getPopupContainer:()=>o.$container}),null!==o.options.loadingOptions)&&(o._loadingControl=new G(Mt({locale:(null==(A=o.i18n)?void 0:A.getCurrentTranslation())||{}},o.options.loadingOptions||{},{getPopupContainer:()=>o.$container})));null!==o.options.messageOptions&&(o.messageControl=new _e(Mt({locale:(null==(a=o.i18n)?void 0:a.getCurrentTranslation())||{}},o.options.messageOptions||{},{getPopupContainer:()=>o.$container})));if(null!==o.options.posterOptions&&(o.posterControl=new Z(Mt({},o.options.posterOptions||{},{getPopupContainer:()=>o.contentControl.$container}))),o._volume=(null==(i=o.options.volumeOptions)?void 0:i.volume)||0,o._muted=(null==(s=o.options.volumeOptions)?void 0:s.muted)||!1,o._mobileInnerWidthHeight=o._mobileInnerWidthHeight.bind(o),["flv","hls","mp4"].includes(e.type))o._renderTheme([null].includes(null==(l=o.options)?void 0:l.themeData)?null:Ge);else if("ezopen"===e.type){var u;o._renderTheme([null].includes(null==(u=o.options)?void 0:u.themeData)?null:Ye.pcLive)}return o._addEventListener(),null==(c=o)||c.on(H.audioCodecUnsupported,(()=>{var e;(null==(e=c.controls)?void 0:e.volumeControl)&&c.controls.volumeControl.emit(H.audioCodecUnsupported)})),null==c||c.on(H.message,((e,t,n)=>{var r;if(["fetchError","error"].includes(t))null==(r=c.messageControl)||r.error(e,n);else if("warn"===t){var o;null==(o=c.messageControl)||o.warn(e,n)}else if("info"===t){var i;null==(i=c.messageControl)||i.info(e,n)}})),null==c||c.on(H.audioInfo,(e=>{var t;(null==c||null==(t=c.controls)?void 0:t.volumeControl)&&(e.audioFormatName||e.encType)&&(c.controls.volumeControl.disabled=!1)})),null==c||c.on(H.play,(e=>{var t,n;e&&(null==(n=c.messageControl)||n.hide()),(null==c||null==(t=c.controls)?void 0:t.globalFullscreenControl)&&(c.controls.globalFullscreenControl.disabled=!e)})),o}return A(r,e),o(r,[{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"playing",get:function(){return this._playing},set:function(e){var t,n;this._playing!==e&&(this._playing=e,e||(this.loading=!1),this.emit(H.play,e),(null==(t=this.controls)?void 0:t.playControl)&&this.controls.playControl.playing!==e&&(null==(n=this.controls)||n.playControl.emit(H.play,e)))}},{key:"loading",get:function(){return this._loading},set:function(e){var t,n;(this._loading=e,e)?null==(t=this._loadingControl)||t.show():null==(n=this._loadingControl)||n.hide();this._loading!==e&&this.emit(H.loading,e)}},{key:"volume",get:function(){return this._volume},set:function(e){var t,n,r;e>=0&&e<=1&&(this._volume!==e&&(this._volume=e,this.emit(H.volumechange,e,this._muted),(null==(t=this.controls)?void 0:t.volumeControl)&&(null==(r=this.controls)||null==(n=r.volumeControl)?void 0:n.volume)!==e&&this.controls.volumeControl.emit(H.volumechange,e,this._muted)))}},{key:"muted",get:function(){return this._muted},set:function(e){var t,n,r;this._muted!==e&&(this._muted=e,this.emit(H.volumechange,this._volume,this._muted),(null==(t=this.controls)?void 0:t.volumeControl)&&(null==(r=this.controls)||null==(n=r.volumeControl)?void 0:n.muted)!==e&&this.controls.volumeControl.emit(H.volumechange,this._volume,e))}},{key:"zoom",get:function(){return this._zoom},set:function(e){this._zoom=e}},{key:"recording",get:function(){return this._recording}},{key:"isCurrentFullscreen",get:function(){return this._isCurrentFullscreen}},{key:"recType",get:function(){return this._recType}},{key:"orientationAngle",get:function(){return this._orientationAngle}},{key:"resize",value:function(e,t){let n="";n+="number"==typeof e?`width: ${e}px;`:`width: ${e};`,n+="number"==typeof t?`height: ${t}px;`:`height: ${t};`,this.$container&&(this.$container.style.cssText+=n)}},{key:"fullscreen",value:function(){return Pt((function*(){var e;return yield null==(e=this._fullscreen)?void 0:e.fullscreen()})).call(this)}},{key:"exitFullscreen",value:function(){return Pt((function*(){var e;return yield null==(e=this._fullscreen)?void 0:e.exitFullscreen()})).call(this)}},{key:"changeTheme",value:function(e){this._changeThemeFlag=!0,null==this.emit||this.emit.call(this,H.changeTheme,e),this._renderTheme(e)}},{key:"setPoster",value:function(e){var t;null==(t=this.posterControl)||t.setPoster(e)}},{key:"destroy",value:function(){var e,t,n,r,o;this.$container&&(this.emit(H.theme.beforeDestroy),this._removeEventListener(),this._unmountedControls(),null==(e=this._loadingControl)||e.destroy(),this._loadingControl=null,null==(t=this.messageControl)||t.destroy(),this.messageControl=null,null==(n=this.posterControl)||n.destroy(),this.posterControl=null,null==(r=this.contentControl)||r.destroy(),this.contentControl=null,Array.from((null==(o=this.$container)?void 0:o.classList)||[]).forEach((e=>{new RegExp(`^${j}-`,"ig").test(e)&&this.$container.classList.remove(e)})),this.emit(H.theme.destroyed),this._onPauseTimingFunc&&(this._onPauseTimingFunc=null),this.removeAllListeners(),this.i18n=null)}},{key:"_initOptions",value:function(e){if(this.options=Object.assign({},Ot,e),"function"==typeof this.options.container?this.$container=this.options.container():this.$container=this.options.container,!this.$container)throw new Error("container option is required!");const t=["zh","en"].includes(this.options.language)?this.options.language:"zh";this.i18n=new B({zh:ze,en:He},{defaultLocale:t})}},{key:"_initClassName",value:function(){var e,t;this.$container.classList.add(j,Le.isMobile?j+"-mobile":j+"-pc"),["ezopen","flv","hls","mp4"].includes(this.options.type)&&this.$container.classList.add(`${j}-${this.options.type}`),"string"==typeof this.options.className&&this.$container.classList.add(this.options.className),this.resize(null==(e=this.options)?void 0:e.width,null==(t=this.options)?void 0:t.height)}},{key:"_unmountedControls",value:function(){if(!this.controls)return;const e=Object.keys(this.controls).length>0||this._$header||this._$footer;if(this._interactiveResult&&(null==this._interactiveResult.cleanup||this._interactiveResult.cleanup.call(this._interactiveResult),this._interactiveResult=null),e&&this.emit(H.control.beforeUnmountControls),Object.keys(this.controls).length>0){for(const e in this.controls){var t,n;null==(t=(n=this.controls[e]).destroy)||t.call(n)}this.controls=null}this._$header&&(this._$header.destroy(),this._$header=null),this._$footer&&(this._$footer.destroy(),this._$footer=null),e&&this.emit(H.control.unmountedControls)}},{key:"_renderTheme",value:function(e){return Pt((function*(){var t,n,r;if(this._unmountedControls(),"[object Object]"!==Object.prototype.toString.call(e))return;this.controls={},this.emit(H.control.beforeMountControls);const o=function(e){var t,n;const r={};var o;r.autoFocus=null!=(o=null==e?void 0:e.autoFocus)?o:3,r.poster=(null==e?void 0:e.poster)||"";const i=[],s=[],A=((null==e||null==(t=e.header)?void 0:t.btnList)||[]).filter((e=>1===e.isrender&&["deviceID","deviceName"].includes(e.iconId)?(i.push(e),!1):1===e.isrender&&z.includes(e.iconId)?(s.push(s[0]?We({},e,{part:s[0].part}):e),!1):1===e.isrender)).map((e=>(Ke[e.iconId]&&(e.iconId=Ke[e.iconId]),e))),a=((null==e||null==(n=e.footer)?void 0:n.btnList)||[]).filter((e=>1===e.isrender&&["deviceID","deviceName"].includes(e.iconId)?(i.push(e),!1):1===e.isrender&&z.includes(e.iconId)?(s.push(s[0]?We({},e,{part:s[0].part}):e),!1):1===e.isrender)).map((e=>(Ke[e.iconId]&&(e.iconId=Ke[e.iconId]),e)));var l,c,u,d,h,p;return A.length>0||i.length>0||s.length>0?(r.header={},r.header.color=null==e||null==(l=e.header)?void 0:l.color,r.header.backgroundColor=null==e||null==(c=e.header)?void 0:c.backgroundColor,r.header.activeColor=null==e||null==(u=e.header)?void 0:u.activeColor,r.header.btnList=[...i||[],...s||[],...A||[]]):r.header=void 0,a.length>0?(r.footer={},r.footer.color=null==e||null==(d=e.footer)?void 0:d.color,r.footer.backgroundColor=null==e||null==(h=e.footer)?void 0:h.backgroundColor,r.footer.activeColor=null==e||null==(p=e.footer)?void 0:p.activeColor,r.footer.btnList=a):r.footer=void 0,r}(e);if(o.poster&&this.setPoster(o.poster),null==(t=this.posterControl)||t.show(),o.header){this._$header=new Xe({getPopupContainer:()=>this.$container,color:o.header.color,activeColor:o.header.activeColor,backgroundColor:o.header.backgroundColor});const[e,t]=Ve(o.header.btnList||[]);this._renderControls(this._$header.$left,e),this._renderControls(this._$header.$right,t)}if(o.footer){this._$footer=new tt({getPopupContainer:()=>this.$container,color:o.footer.color,activeColor:o.footer.activeColor,backgroundColor:o.footer.backgroundColor});const[e,t]=Ve(o.footer.btnList||[]);this._renderControls(this._$footer.$left,e),this._renderControls(this._$footer.$right,t)}var i,s,A,a,l,c,u;(this._$header||this._$footer)&&0!==(null==o?void 0:o.autoFocus)&&(this._interactiveResult=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=arguments.length>2?arguments[2]:void 0,r=null,o=!1;const i=e.querySelector(`.${j}-header`),s=e.querySelector(`.${j}-footer`);let A=()=>{r&&(clearTimeout(r),r=null)},a=()=>{null==A||A(),null==i||i.classList.remove(`${j}-hide-transition`),null==s||s.classList.remove(`${j}-hide-transition`),o||n(!0),o=!0},l=()=>{null==A||A(),e.classList.contains(`${j}-player-pause`)||(null==i||i.classList.add(`${j}-hide-transition`),null==s||s.classList.add(`${j}-hide-transition`),o&&n(!1),o=!1)},c=()=>{null==a||a(),r=setTimeout((()=>{null==A||A(),null==l||l()}),t)},u=e=>{var t;null==e||null==(t=e.stopPropagation)||t.call(e),null==A||A()},d=()=>{o?null==l||l():null==c||c()},h=e=>{var t;null==e||null==(t=e.stopPropagation)||t.call(e),null==c||c()};if(c(),Le.isMobile&&d){const t=window.PointerEvent?"pointerdown":"touchstart";e.addEventListener(t,d),s&&s.addEventListener(t,h),i&&i.addEventListener(t,h)}else{const t=window.PointerEvent?"pointerdown":"click";var p,f,v,m;e.addEventListener(t,c),e.addEventListener("mousemove",c),e.addEventListener("mouseleave",l),s&&(null==s||null==(p=s.addEventListener)||p.call(s,t,u),null==s||null==(f=s.addEventListener)||f.call(s,"mousemove",u)),i&&(null==i||null==(v=i.addEventListener)||v.call(i,t,u),null==i||null==(m=i.addEventListener)||m.call(i,"mousemove",u))}return{cleanup:()=>{if(e){if(Le.isMobile&&d){const t=window.PointerEvent?"pointerdown":"touchstart";e.removeEventListener(t,d),s&&c&&s.removeEventListener(t,h),i&&c&&i.removeEventListener(t,h)}if(c){const a=window.PointerEvent?"pointerdown":"click";var t,n,r,o;e.removeEventListener(a,c),e.removeEventListener("mousemove",c),e.removeEventListener("mouseleave",l),s&&A&&(null==s||null==(t=s.removeEventListener)||t.call(s,a,u),null==s||null==(n=s.removeEventListener)||n.call(s,"mousemove",u)),i&&A&&(null==i||null==(r=i.removeEventListener)||r.call(i,a,u),null==i||null==(o=i.removeEventListener)||o.call(i,"mousemove",u))}l&&e.removeEventListener("mouseleave",l),d=null,c=null,l=null,a=null,h=null,u=null,null==A||A(),A=null}},clearTimeout:A,setTimeoutShow:c,hide:l}}(this.$container,1e3*((null==e?void 0:e.autoFocus)||3),(e=>{this.emit(H.control.controlsBarOpenChange,e)})),this._onPauseTimingFunc&&(this.removeListener(Q,this._onPauseTimingFunc),this._onPauseTimingFunc=null),this._onPauseTimingFunc=e=>{var t,n,r,o;e?null==(n=this._interactiveResult)||null==(t=n.clearTimeout)||t.call(n):null==(o=this._interactiveResult)||null==(r=o.setTimeoutShow)||r.call(o)},this.on(Q,this._onPauseTimingFunc)),(null==(s=(i=this).controls)?void 0:s.volumeControl)&&(i.controls.volumeControl.on(H.control.volumechange,((e,t)=>{i.muted!==t&&(i.muted=t),i.volume!==e&&(i.volume=e),i.emit(H.control.volumechange,e,t)})),i.controls.volumeControl.on(H.control.volumePanelOpenChange,((e,t,n)=>{i.emit(H.control.volumePanelOpenChange,e,t,n)}))),(null==(A=i.controls)?void 0:A.playControl)&&i.controls.playControl.on(H.control.play,(e=>{i.playing!==e&&(i.playing=e,i.emit(H.control.play,e))})),(null==(a=i.controls)?void 0:a.recControl)&&i.controls.recControl.on(H.control.changeRecType,(e=>{i.recType!==e&&(i.emit(H.control.changeRecType,e),i.emit(H.changeRecType,e))})),(null==(l=i.controls)?void 0:l.definitionControl)&&i.controls.definitionControl.on(H.control.definitionPanelOpenChange,((e,t,n)=>{Le.isMobile&&i.emit(Q,e,t)})),(null==(c=i.controls)?void 0:c.speedControl)&&i.controls.speedControl.on(H.control.speedPanelOpenChange,((e,t,n)=>{Le.isMobile&&i.emit(Q,e,t)})),(null==(u=i.controls)?void 0:u.capturePictureControl)&&i.controls.capturePictureControl.on(H.control.capturePicture,((e,t)=>{i.emit(H.control.capturePicture,e)})),this.emit(H.control.mountedControls),(null==(n=this.controls)?void 0:n.volumeControl)&&!this._changeThemeFlag&&(this.controls.volumeControl.disabled=!0),(null==(r=this.controls)?void 0:r.globalFullscreenControl)&&!this.playing&&(this.controls.globalFullscreenControl.disabled=!0)})).call(this)}},{key:"_renderControls",value:function(e,t){return Pt((function*(){if(e){const A=this._changeThemeFlag,a=It.reduce(((e,t)=>(e[t]=this[t],e)),{});for(const l of t){var n,r,o,i,s;if(z.includes(l.iconId))(null==(n=this.controls)?void 0:n.recControl)||(this.controls.recControl=new Ft.rec(Mt({rootContainer:this.$container,getPopupContainer:()=>e,recType:this._recType,locale:(null==(r=this.i18n)?void 0:r.getCurrentTranslation())||{}},(null==(o=this.options)?void 0:o.recOptions)||{},A?a:{})));else if(Ft[l.iconId])this.controls[`${l.iconId}Control`]=new Ft[l.iconId](Mt({rootContainer:this.$container,getPopupContainer:()=>e,locale:(null==(i=this.i18n)?void 0:i.getCurrentTranslation())||{}},(null==(s=this.options)?void 0:s[`${l.iconId}Options`])||{},A?a:{}))}}})).call(this)}},{key:"_mobileInnerWidthHeight",value:function(){if(Le.isMobile){var e,t,n,r;const o=Math.floor(window.innerHeight),i=Math.floor(window.innerWidth);null==(t=this.$container)||null==(e=t.style)||e.setProperty(`--${j}-mobile-inner-height`,`${o}px`),null==(r=this.$container)||null==(n=r.style)||n.setProperty(`--${j}-mobile-inner-width`,`${i}px`)}}},{key:"_addEventListener",value:function(){this._fullscreen=new Ne(this.$container,{prefix:j,onChange:e=>{e.isCurrentFullscreen?this.emit(H.fullscreen):this._isCurrentFullscreen&&this.emit(H.exitFullscreen),this._isCurrentFullscreen=e.isCurrentFullscreen,this.emit(H.fullscreenChange,e)}});const e=e=>{if(this.$container){var t;switch(null==(t=this.$container.classList)||t.remove(`${j}-angle-0`,`${j}-angle-90`,`${j}-angle-180`,`${j}-angle-270`),e.angle){case 0:this.$container.classList.add(`${j}-angle-0`);break;case 90:this.$container.classList.add(`${j}-angle-90`);break;case 180:this.$container.classList.add(`${j}-angle-180`);break;case 270:this.$container.classList.add(`${j}-angle-270`)}this.orientationAngle!==e.angle&&this.emit(H.orientationChange,e.angle),this._orientationAngle=e.angle,this._mobileInnerWidthHeight()}},[t,n]=Le.orientationEventListener(e);this._cleanupOrientation=n,e(t),this._mobileInnerWidthHeight(),window.addEventListener("resize",Ee(this._mobileInnerWidthHeight,20)),this._cleanUpResizeObserver=Le.resizeObserver(this.$container,Ee((()=>{const e=Math.floor(this.$container.clientWidth),t=Math.floor(this.$container.clientHeight);if(this.width!==e||this.height!==t){if(this.emit(r.EVENTS.resize,{width:e,height:t}),this._width=e,this._height=t,this._$header){var n,o,i,s;e-30<=((null==(o=this._$header)||null==(n=o.$left)?void 0:n.clientWidth)||0)+((null==(s=this._$header)||null==(i=s.$right)?void 0:i.clientWidth)||0)?this.emit(r.EVENTS.control.headerMoreShow,!0):this.emit(r.EVENTS.control.headerMoreShow,!1)}if(this._$footer){var A,a;e-16<=((null==(A=this._$footer.$left)?void 0:A.clientWidth)||0)+((null==(a=this._$footer.$right)?void 0:a.clientWidth)||0)?this.emit(r.EVENTS.control.footerMoreShow,!0):this.emit(r.EVENTS.control.footerMoreShow,!1)}}}),20))}},{key:"_removeEventListener",value:function(){var e,t,n,r;this._isCurrentFullscreen&&(null==(r=this._fullscreen)||r.exitFullscreen());null==(e=this._fullscreen)||e.destroy(),this._fullscreen=null,null==this._cleanupOrientation||this._cleanupOrientation.call(this),this._cleanupOrientation=null,null==(n=this._cleanUpResizeObserver)||null==(t=n.unobserve)||t.call(n),this._cleanUpResizeObserver=null,window.removeEventListener("resize",this._mobileInnerWidthHeight)}},{key:"_reset",value:function(){this._zoom=1}}])}(C);Dt.TEMPLATES=Ye,Dt.EVENTS=H,Dt.LOCALES={zh:ze,en:He},Dt.THEME_VERSION="0.0.1-alpha.18";var xt={videoBuffer:.2,videoBufferDelay:1e3,debug:!1,openWebglAlignment:!1},Rt="initVideo",Nt="render",Ut="playAudio",Bt="initAudio",jt="audioCode",Qt="videoCode",zt=1,Ht=2,Wt="init",Kt="decode",Vt="audioDecode",Gt="videoDecode",Yt="close",qt="updateConfig",Zt=U({fullscreenChange:"fullscreenChange",orientationChange:"orientationChange",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",loaded:"loaded",videoInfo:"videoInfo",timeUpdate:"timeUpdate",timeUpdateOSD:"timeUpdateOSD",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",heartTimeout:"heartTimeout",heartRetryTimes:"heartRetryTimes",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",loadingRetryTimes:"loadingRetryTimes",stats:"stats",performance:"performance",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",audioCodecUnsupported:"audioCodecUnsupported",unrecoverableEarlyEof:"unrecoverableEarlyEof",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",localVideoRecords:"localVideoRecords",getDefinitionListResult:"getDefinitionListResult",definitionChange:"definitionChange",definitionListChange:"definitionListChange",playbackRateListChange:"playbackRateListChange",playbackRateChange:"playbackRateChange",decoderLoaded:"decoderLoaded",end:"end"},Dt.EVENTS,{clone:!1});Zt.load,Zt.timeUpdate,Zt.videoInfo,Zt.audioInfo,Zt.error,Zt.kBps,Zt.log,Zt.start,Zt.delayTimeout,Zt.play,Zt.pause,Zt.mute,Zt.stats,Zt.volumechange,Zt.performance,Zt.playToRenderTimes,Zt.mseSourceBufferFull,Zt.mseSourceBufferError;var Xt="key",Jt="delta";(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})(),Date.now||(Date.now=function(){return(new Date).getTime()}),m.postRun=function(){let e=[],t=[],n={};"VideoEncoder"in self&&(n={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){n.isEmitInfo||(r.opt.debug,postMessage({cmd:Rt,w:e.codedWidth,h:e.codedHeight}),n.isEmitInfo=!0,n.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),n.offscreenCanvasCtx=n.offscreenCanvas.getContext("2d")),n.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);const t=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:Nt,buffer:t,delay:r.delay,ts:0},[t]),setTimeout((function(){e.close?e.close():e.destroy()}),100)},error:function(e){}}),decode:function(e,t){const o=e[0]>>4==1;if(n.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:o?Xt:Jt});n.decoder.decode(r)}else if(o&&0===e[1]){const t=15&e[0];r.setVideoCodec(t);const o=function(e){const t=e.subarray(1,4);let n="avc1.";for(let e=0;e<3;e++){let r=t[e].toString(16);r.length<2&&(r="0"+r),n+=r}return{codec:n,description:e}}(e.slice(5));n.decoder.configure(o),n.hasInit=!0}},reset(){n.hasInit=!1,n.isEmitInfo=!1,n.offscreenCanvas=null,n.offscreenCanvasCtx=null}});const r={opt:{debug:xt.debug,useOffscreen:xt.useOffscreen,useWCS:xt.useWCS,videoBuffer:xt.videoBuffer,openWebglAlignment:xt.openWebglAlignment,videoBufferDelay:xt.videoBufferDelay},useOffscreen:function(){return r.opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},initAudioPlanar:function(e,n){postMessage({cmd:Bt,sampleRate:n,channels:e});const r=[];let o=0;this.playAudioPlanar=function(n,i,s){let A=i;const a=[];let l=0;for(let e=0;e<2;e++){const t=m.HEAPU32[(n>>2)+e]>>2;a[e]=m.HEAPF32.subarray(t,t+A)}if(o){if(!(A>=(i=1024-o)))return o+=A,t[0]=Float32Array.of(...t[0],...a[0]),void(2===e&&(t[1]=Float32Array.of(...t[1],...a[1])));r[0]=Float32Array.of(...t[0],...a[0].subarray(0,i)),2===e&&(r[1]=Float32Array.of(...t[1],...a[1].subarray(0,i))),postMessage({cmd:Ut,buffer:r,ts:s},r.map((e=>e.buffer))),l=i,A-=i}for(o=A;o>=1024;o-=1024)r[0]=a[0].slice(l,l+=1024),2===e&&(r[1]=a[1].slice(l-1024,l)),postMessage({cmd:Ut,buffer:r,ts:s},r.map((e=>e.buffer)));o&&(t[0]=a[0].slice(l),2===e&&(t[1]=a[1].slice(l)))}},setVideoCodec:function(e){postMessage({cmd:Qt,code:e})},setAudioCodec:function(e){postMessage({cmd:jt,code:e})},setVideoSize:function(e,t){postMessage({cmd:Rt,w:e,h:t});const n=e*t,o=n>>2;r.useOffscreen()?(this.offscreenCanvas=new OffscreenCanvas(e,t),this.offscreenCanvasGL=this.offscreenCanvas.getContext("webgl"),this.webglObj=((e,t)=>{var n=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),r=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);var o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS);var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS);var s=e.createProgram();e.attachShader(s,o),e.attachShader(s,i),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS),e.useProgram(s);var A=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,A),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var a=e.getAttribLocation(s,"vertexPos");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);var l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(s,"texturePos");function u(t,n){var r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(s,t),n),r}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var d=u("ySampler",0),h=u("uSampler",1),p=u("vSampler",2);return{render:function(t,n,r,o,i){e.viewport(0,0,t,n),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t,n,0,e.LUMINANCE,e.UNSIGNED_BYTE,r),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,p),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,i),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(s),e.deleteBuffer(A),e.deleteBuffer(l),e.deleteTexture(d),e.deleteTexture(h),e.deleteTexture(p)}catch(e){}}}})(this.offscreenCanvasGL,r.opt.openWebglAlignment),this.draw=function(r,i,s,A){const a=m.HEAPU8.subarray(i,i+n),l=m.HEAPU8.subarray(s,s+o),c=m.HEAPU8.subarray(A,A+o);this.webglObj.render(e,t,a,l,c);const u=this.offscreenCanvas.transferToImageBitmap();postMessage({cmd:Nt,buffer:u,delay:this.delay,ts:r},[u])}):this.draw=function(e,t,r,i,s,A){const a=[Uint8Array.from(m.HEAPU8.subarray(t,t+n)),Uint8Array.from(m.HEAPU8.subarray(r,r+o)),Uint8Array.from(m.HEAPU8.subarray(i,i+o))];postMessage({cmd:Nt,output:a,delay:this.delay,ts:e,w:s,h:A},a.map((e=>e.buffer)))}},getDelay:function(e){if(!e)return-1;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,n=e-this.firstTimestamp;this.delay=t>=n?t-n:n-t}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay},resetDelay:function(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1},init:function(){r.opt.debug;const t=e=>{r.opt.useWCS&&r.useOffscreen()&&e.type===Ht&&n.decode?n.decode(e.payload,e.ts):e.decoder.decode(e.payload,e.ts)};this.stopId=setInterval((()=>{if(e.length)if(this.dropping){let n=e.shift();for(n&&n.type===zt&&0===n.payload[1]&&t(n);!n.isIFrame&&e.length;)n=e.shift(),n.type===zt&&0===n.payload[1]&&t(n);n.isIFrame&&(this.dropping=!1,t(n))}else{let n=e[0];if(-1===this.getDelay(n.ts))e.shift(),t(n);else if(this.delay>r.opt.videoBuffer+r.opt.videoBufferDelay)this.resetDelay(),this.dropping=!0;else for(;e.length&&(n=e[0],this.getDelay(n.ts)>r.opt.videoBuffer);)e.shift(),t(n)}}),10)},close:function(){var s,A,a,l;r.opt.debug,clearInterval(this.stopId),this.stopId=null,null==o||null===(s=o.clear)||void 0===s||s.call(o),null==i||null===(A=i.clear)||void 0===A||A.call(i),null===(a=n)||void 0===a||null===(l=a.reset)||void 0===l||l.call(a),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1,this.webglObj&&(this.webglObj.destroy(),this.offscreenCanvas=null,this.offscreenCanvasGL=null,this.offscreenCanvasCtx=null),e=[],t=[],delete this.playAudioPlanar,delete this.draw},pushBuffer:function(t,n){n.type===zt?e.push({ts:n.ts,payload:t,decoder:o,type:zt}):n.type===Ht&&e.push({ts:n.ts,payload:t,decoder:i,type:Ht,isIFrame:n.isIFrame})}},o=new m.AudioDecoder(r),i=new m.VideoDecoder(r);self.onmessage=function(e){const t=e.data;switch(t.cmd){case Wt:try{r.opt=Object.assign(r.opt,JSON.parse(t.opt))}catch(e){}o.sample_rate=t.sampleRate,r.init();break;case Kt:r.pushBuffer(t.buffer,t.options);break;case Vt:o.decode(t.buffer,t.ts);break;case Gt:i.decode(t.buffer,t.ts);break;case Yt:r.close();break;case qt:r.opt[t.key]=t.value}}},m.onRuntimeInitialized=function(){setTimeout((()=>{postMessage({cmd:Wt})}),10)}}));
|
|
28
|
+
const R="ezplayer",N="PAUSE_TIMING_HEADER_FOOTER",U=["rec","cloudRec","cloudRecord"],B={loading:"loading",play:"play",capturePicture:"capturePicture",volumechange:"volumechange",audioInfo:"audioInfo",videoInfo:"videoInfo",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",fullscreenChange:"fullscreenChange",resize:"resize",orientationChange:"orientationChange",audioCodecUnsupported:"audioCodecUnsupported",changeTheme:"changeTheme",changeRecType:"changeRecType",changeDefinition:"changeDefinition",changeSpeed:"changeDefinition",control:{play:"Control.play",capturePicture:"Control.capturePicture",volumechange:"Control.volumechange",volumePanelOpenChange:"Control.volumePanelOpenChange",controlsBarOpenChange:"Control.controlsBarOpenChange",headerMoreShow:"Control.headerMoreShow",footerMoreShow:"Control.footerMoreShow",beforeMountControls:"Control.beforeMountControls",mountedControls:"Control.mountedControls",beforeUnmountControls:"Control.beforeUnmountControls",unmountedControls:"Control.unmountedControls",changeRecType:"Control.changeRecType",changeDefinition:"Control.changeDefinition",definitionPanelOpenChange:"Control.definitionPanelOpenChange",changeSpeed:"Control.changeDefinition",speedPanelOpenChange:"Control.speedPanelOpenChange"},theme:{beforeDestroy:"Theme.beforeDestroy",destroyed:"Theme.destroyed"},message:"message"};class j extends g{get active(){return this._disabled}set active(e){this._active=e,this._updateActiveState(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateDisabledState(e)}_updateDisabledState(e){var t,n;e?null==(t=this.$container)||t.classList.add(`${R}-disabled`):null==(n=this.$container)||n.classList.remove(`${R}-disabled`)}_updateActiveState(e){var t,n;e?null==(t=this.$container)||t.classList.add(`${R}-active`):null==(n=this.$container)||n.classList.remove(`${R}-active`)}reset(){}_onClick(){this.$container.addEventListener("click",(e=>{var t;(null==(t=this.$container)?void 0:t.classList.contains(`${R}-disabled`))||null==this._onControlClick||this._onControlClick.call(this,e)}))}hide(){this.$container&&(this.$container.style.display="none",this.$container.classList.add(`${R}-hide`))}destroy(){var e;this.removeAllListeners(),null==(e=this.$popupContainer)||e.removeChild(this.$container)}_onControlClick(e){null==this.__options.onClick||this.__options.onClick.call(this.__options,e)}constructor(e){super(),this.__options={},this._disabled=!1,this._active=!1,this.__options=Object.assign({},e||{}),this.$container=document.createElement(e.tagName||"span"),this.$container.classList.add(`${R}-control`),"text"===(null==e?void 0:e.controlType)?this.$container.classList.add(`${R}-control-text`):"block"===(null==e?void 0:e.controlType)?this.$container.classList.add(`${R}-control-block`):this.$container.classList.add(`${R}-control-btn`),(null==e?void 0:e.classNameSuffix)&&this.$container.classList.add(`${R}-control-${null==e?void 0:e.classNameSuffix}`),(null==e?void 0:e.className)&&this.$container.classList.add(e.className),e.getPopupContainer?this.$popupContainer=null==e.getPopupContainer?void 0:e.getPopupContainer.call(e):this.$popupContainer=document.body,this.$popupContainer.appendChild(this.$container),this._onClick()}}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}const z={};class H extends j{_html(){var e;"function"==typeof this._options.render?this.$container.innerHTML=this._options.render():this.$container.innerHTML=`\n <span class="${R}-loading-dot ${R}-loading-dot-load">\n <i class="${R}-loading-dot-item"></i>\n <i class="${R}-loading-dot-item"></i>\n <i class="${R}-loading-dot-item"></i>\n <i class="${R}-loading-dot-item"></i>\n </span>\n <div class="${R}-loading-text">${(null==(e=this._options.locale)?void 0:e.loading)||"loading..."}</div>\n `}show(e){e&&(this.$container.innerHTML=e),this.$container.style.display="flex",this.$container.classList.remove(`${R}-hide`),this.$popupContainer.classList.add(`${R}-has-loading`)}hide(){super.hide(),this.$popupContainer.classList.remove(`${R}-has-loading`)}constructor(e={}){super(Object.assign({},z,Q({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},e),this.$container.classList.add(`${R}-loading`,`${R}-hide`),this._html()}}function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(this,arguments)}const K={poster:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAkJCQkJCQoLCwoODw0PDhQSERESFB4WFxYXFh4uHSEdHSEdLikxKCUoMSlJOTMzOUlUR0NHVGZbW2aBeoGoqOIBCQkJCQkJCgsLCg4PDQ8OFBIRERIUHhYXFhcWHi4dIR0dIR0uKTEoJSgxKUk5MzM5SVRHQ0dUZltbZoF6gaio4v/CABEIA/0HHgMBIgACEQEDEQH/xAAZAAEBAQEBAQAAAAAAAAAAAAAAAQIEAwf/2gAIAQEAAAAA+WgAgAQAACTxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHUAEACAAAE8YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdQBAAgAAAPPzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOoCABAAAAGfEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ggAIAAAATxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqIACAAAACPLIAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqgAIAAAAEMeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpACAAAABAz5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkAgAAAAQCeUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6QIAAAAEAHjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkIAAAAEAEeeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkQAAAAQAQYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0oAAAAIAIDGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAAIAIBnzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAACACAGfMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAAgAgBE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAIAIAQTzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAACACACBPMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAgAgAgE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAIAIAIAZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAEAEAEAImAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgABABACAEGcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdAAIAIAQAgMwCAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ABABACACBbAJEkAAAAAAAAAAAAAAAAAAAAAAAAAAAAdACACACAEDWjAEDMgAAAAAAAAAAAAAAAAAAAAAAAAAAAOgEAEAEAIGtoYBAJJAAAAAAAAAAAAAAAAAAAAAAAAAAAB0CACACAEBvREyEAgzAAAAAAAAAAAAAAAAAAAAAAAAAAADoQAQAQAgLuoJkICBc5AAAAAAAAAAAAAAAAAAAAAAAAAAAdEAEAIAQC+iAzBAIKkyAAAAAAAAAAAAAAAAAAAAAAAAAAB7gEAIAQA9ADAQEFQzAAAAAAAAAAAAAAAAAAAAAAAAAAAe4EAIAIAboCZEAgqDMAAAAAAAAAAAAAAAAAAAAAAAAAAD3CAEAEAJrYCSEAgqBMgAAAAAAAAAAAAAAAAAAAAAAAAAB7kAEAIARfQAmRAQLASQAAAAAAAAAAAAAAAAAAAAAAAAAAe8AEAIAQb0AjJAIKgIkAAAAAAAAAAAAAAAAAAAAAAAAAAPYAgBACCvQBEiAQVAQkAAAAAAAAAAAAAAAAAAAAAAAAAAPYCAEAIKa0AjJAQKgQMgAAAAAAAAAAAAAAAAAAAAAAAAAHsEAIAQKNaBCRAIKgIEgAAAAAAAAAAAAAAAAAAAAAAAAAD2IAIAQUR6UQMkBBUBASAAAAAAAAAAAAAAAAAAAAAAAAAAPaACAEFEL6CBIgEFQICIAAAAAAAAAAAAAAAAAAAAAAAAAA9QCAEFEDWyCIgEFQECEAAAAAAAAAAAAAAAAAAAAAAAAAAeoEAIKIBraCIQECwEBCAAAAAAAAAAAAAAAAAAAAAAAAAAPUIAQUIA1tBEQCCoCBBAAAAAAAAAAAAAAAAAAAAAAAAAAHqQAgoQBGthEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAD1gBBQgBDWyEIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAB6AEFEAIF9IEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAB6AQUQAgD0CEBAsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAAegQUQAgCPSkIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAAehBRACAINbQgEFQECAgAAAAAAAAAAAAAAAAAAAAAAAAAA9IKEAQAgXYQECwEBAgAAAAAAAAAAAAAAAAAAAAAAAAAAbKEAQAgDWiAQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAABuhAEAIAi+iAQVAQICAAAAAAAAAAAAAAAAAAAAAAAAAAA9BACAIAgb1AIKgQECAAAAAAAAAAAAAAAAAAAAAAAAAAAeiAEAQBALsCCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAADYBAEAIAXYQLAQECAAAAAAAAAAAAAAAAAAAAAAAAAAANgQBACAA1oQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAAANhAEAIAAXaCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAAA2QAgCAAAugsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAW6qkSSwAgCAAAFtVAQIEAAAAAAAAAAAAAAAAAAAAAAAADWta1SgDlAQBAAAALdQEBBAAAAAAAAAAAAAAAAAAAAAAAAF1vdUFAHKCAIAAAAFqkBCAAAAAAAAAAAAAAAAAAAAAAAANem6CgoByiAEAAAAAKAQAAAAAAAAAAAAAAAAAAAAAAABdetFCgoByoAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABd+ihQUFAcgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfpSgoUFAcgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANemgUKCgoHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu/QBQUFBQcYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF9dAChQUFBxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA160AKCgoKHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/SgAUKCgocYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9NqABQUFBRxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALvZQAFBQoKOMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC72FAAUKCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemqFAAUFCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3soUABQoKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANegoUABQUKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX0oUKAAoUFBeMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu6oUUABQUKByAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG9FChQAFCgoOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABrYUKKAAoKChyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXahRQoAChQUOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAADdKKFCgAUFBRyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuxQooUABQoKOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtBRQoUACgoKcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXSihRQoACgoU5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2UKKFCgAUFBXIAAAAAAAAAAAAAAAAAAAAAAAAAAAAALtFFCihQAFBQrkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtIoUUKFAAUKC8gAAAAAAAAAAAAAAAAAAAAAAAAAAAABdKiihRQoACgoXkAAAAAAAAAAAAAAAAAAAAAAAAAAAAALpSUKKFCgAKFBygAAAAAAAAAAAAAAAAAAAAAAAAAAAAGqVFFCihQAFBQ5QAAAAAAAAAAAAAAAAAAAAAAAAAAAADYpFFFChQAFChygAAAAAAAAAAAAAAAAAAAAAAAAAAAALaKihRQooACgo5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAFtCoooUUKAAoUcoAAAAAAAAAAAAAAAAAAAAAAAAAAAADRRUUKKFCgAUFOUAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0oVFFCihQAFCnKAAAAAAAAAAAAAAAAAAAAAAAAAAAABaKKihRQoUACgrlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtCioooUUKAAoLygAAAAAAAAAAAAAAAAAAAAAAAAAAAAVRRUUKKFCgAUF5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAKUUVFFCihQAFBzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUooqKFFChQAFDmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFCgAKHMAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgAKOYAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUUKKFAAUcwAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiikUUUKFAAU5gAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAApzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFIooUUKAArmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUABeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAABRQoqKKFFCgAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUUVFFCihQAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiiooUUKFABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUKKKiihRQoAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRRQooUAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAooopFFFChQBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUUiihRQoBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUKKFCgOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKFFChQOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFCioooUUKBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUVFCihQoOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChRRUUUKKFBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFChzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFJQooUKOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUBQBQKH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/9oACAECEAAAAOoCAASAAAAAAAAAAAAAAANgQAAyAAAAAAAAAAAAAAA2EAACQAAAAAAAAAAAAAADZAAAJAAAAAAAAAAAAAAANwAAAZAAAAAAAAAAAAAAA0AAAJAAAAAAAAAAAAAAANAAAIQAAAAAAAAAAAAAADQAAIEAAAAAAAAAAAAAAA0AAIBAAAAAAAAAAAAAAANAAIAQAAAAAAAAAAAAAADQAIAEAAAAAAAAAAAAAAA0AIAAIAAAAAAAAAAAAAANAIABSBAAAAAAAAAAAAAANAQAFEsBAAAAAAAAAAAAAA0EABNBAIAAAAAAAAAAAAADRAARoJYEAAAAAAAAAAAAAAoAELqBAQAAAAAAAAAAAAACgAgtCAgAAAAAAAAAAAAACgCLDQICAAAAAAAAAAAAAAKAiwNBAQAAAAAAAAAAAAAAoIsA0ECAAAAAAAAAAAAAACiLADQgIAAAAAAAAAAAAAAKiwANEBAAAAAAAAAAAAAAAAAC1AgAAAAAAAAAAAAAAAAAtgIAAAAAAAAAAAAAAAAAFBAAAAAAAAAAAAAAAAAAKEAAAAAAAAAAAAAAAAAAUgAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAtKMAAAAAAAAAAAAAAAAAaoFOYAAAAAAAAAAAAAAAAtoBTmAAAAAAAAAAAAAAAAaFAK5gAAAAAAAAAAAAAAAWgoBeYAAAAAAAAAAAAAAALQKAXmAAAAAAAAAAAAAAAFoBQDAAAAAAAAAAAAAAAAtAFAMAAAAAAAAAAAAAAAFUAKAwAAAAAAAAAAAAAAAUoAoDAAAAAAAAAAAAAAACigBQMAAAAAAAAAAAAAAAUFAFAwAAAAAAAAAAAAAABQUAKDAAAAAAAAAAAAAAACgoAoMAAAAAAAAAAAAAAAKCgBQwAAAAAAAAAAAAAAAUFAFDAAAAAAAAAAAAAAABQUAKMAAAAAAAAAAAAAAACgoAUwAAAAAAAAAAAAAAAFBQBTAAAAAAAAAAAAAAAAUFACsAAAAAAAAAAAAAAAAoKAKwAAAAAAAAAAAAAAACgoAXAAAAAAAAAAAAAAAAWUFAFwAAAAAAAAAAAAAAABQUAMgAAAAAAAAAAAAAAAsoKAMgAAAAAAAAAAAAAAAKCgDIAAAAAAAAAAAAAAABQUAyAAAAAAAAAAAAAAAAUFAMgAAAAAAAAAAAAAAACgoDIAAAAAAAAAAAAAAAAoKAyAAAAAAAAAAAAAAAAFBQMgAAAAAAAAAAAAAAAAoKDIAAAAAAAAAAAAAAAAKCgyAAAAAAAAAAAAAAAABQUMgAAAAAAAAAAAAAAAAUFDIAAAAAAAAAAAAAAAAAoD//EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAgBAxAAAADAAoigoAAAAAAAAAAAAAADIBSKAoAAAAAAAAAAAAAADIFIoAoAAAAAAAAAAAAAADIUigAUAAAAAAAAAAAAAADJSKAAUAAAAAAAAAAAAAADNIoAAoAAAAAAAAAAAAAACIUAAoAAAAAAAAAAAAAAAyUAApKAAAAAAAAAAAAAAAzQABUUAAAAAAAAAAAAAAAgABUUAAAAAAAAAAAAAAAIABUUAAAAAAAAAAAAAAACABUUAAAAAAAAAAAAAAAAgBUUBAoAAAAAAAAAAAAAAgFJQEBQAAAAAAAAAAAAAAgUlAJKFAAAAAAAAAAAAAACCooBIooAAAAAAAAAAAAAAIqKAGVCgAAAAAAAAAAAAAAIoAIBQAAAAAAAAAAAAAAIoACAoAAAAAAAAAAAAAAAAAM0KAAAAAAAAAAAAAAAAACBQAAAAAAAAAAAAAAAAAIKAAAAAAAAAAAAAAAAAAgoAAAAAAAAAAAAAAAAACFAAAAAAAAAAAAAAAAAAEUAAAAAAAAAAAAAAAAAASgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAloAAAAAAAAAAAAAAAAEQA0AAAAAAAAAAAAAAAAEgANAAAAAAAAAAAAAAAAElgANAAAAAAAAAAAAAAAAIlQANAAAAAAAAAAAAAAAAgSwANAAAAAAAAAAAAAAABASoANAAAAAAAAAAAAAAACAJYANAAAAAAAAAAAAAAABAIsANAAAAAAAAAAAAAAAEsASoA0AAAAAAAAAAAAAAAJYAlgDQAAAAAAAAAAAAAAAIAlQDQAAAAAAAAAAAAAAASwBLANAAAAAAAAAAAAAAAAQBKgNAAAAAAAAAAAAAAAAlgCWA0AAAAAAAAAAAAAAAAQCVA0AAAAAAAAAAAAAAABLAEsDQAAAAAAAAAAAAAAAAgEqDQAAAAAAAAAAAAAAACWAJYNAAAAAAAAAAAAAAAAEsAlQ0AAAAAAAAAAAAAAAASwBLDQAAAAAAAAAAAAAAAAlgEWNAAAAAAAAAAAAAAAACWAJU0AAAAAAAAAAAAAAAAEsASzQAAAAAAAAAAAAAAAAEASqAAAAAAAAAAAAAAAACWAJaAAAAAAAAAAAAAAAAAgCWgAAAAAAAAAAAAAAAASwBNAAAAAAAAAAAAAAAAACATQAAAAAAAAAAAAAAAACWAKAAAAAAAAAAAAAAAAAEAoAAAAAAAAAAAAAAAABLAKAAAAAAAAAAAAAAAAAJYCgAAAAAAAAAAAAAAAACWAoAAAAAAAAAAAAAAAAASwKAAAAAAAAAAAAAAAAAAg//EACgQAAEEAQIFBAMBAAAAAAAAAAEAAhFwMTBREhNAQYADECBQIWBh0P/aAAgBAQABPwD5QPeAoC/HURoOEi5SINyPFyOEi5Tcjs3I+5HYPmScm5HZuR1yOuR2Lkdi5Di5Di5Di5Di5Di5DchuR3vBUFQbdgrhRAnQgKFBtYNUAe51ItINJQAHRxZ4b8j0JFlgSgI+Z6IiyQJQEaB6MiyAI60ixgI0TbTRpHpjYY+iNhNGkbkPUmwG3IMaR8vRnSNtNzcjc3I3NyNzcjc3IM+ZIxcjbkFyi5AYuVpuWZuQGLlBuUG5QVNYQdlwO2XLcuU5co7rlHdcr+rlHdco7rlO3C5blwO2XC7Y/UzVQBPZD0yh6Q3QY3ZQB2+4BqUMcUPTHcoNA7ffypp8NJQYO6AA/RZUqVKlTSwYSg0C4Qw90ABcIYSgALhAJQaBcQZvcQEoNi4g2UBFxNbvcYbvcbWxcbRFxgXG0XGBcYE3IBFxgXGB5jgXGLkFxi5B5jjzHFyDzHFyD/AKp0pUqVKlSpUqVKlSpUqVK//EAB0RAAMAAgIDAAAAAAAAAAAAAAABEWBwEpCAoLD/2gAIAQIBAT8A30/QDhCeJ8zFLca7Hl0RQhCIiIjijjk8Jl8JuCfXf//EABoRAAICAwAAAAAAAAAAAAAAAAARAaAQYLD/2gAIAQMBAT8AtfzYjYxjyx7Q+5f/AP/Z"};class V extends j{_imgLoadErrorEvent(e){var t;null==this._options.onLoadImgError||this._options.onLoadImgError.call(this._options,(null==(t=e.target)?void 0:t.getAttribute("src"))||"")}setPoster(e){var t;""!==(e=null!=e?e:this._options.poster)?(this.$container.innerHTML=`<img class="${R}-poster-img" src="${e}" />`,null==(t=this.$container.querySelector(`.${R}-poster-img`))||t.addEventListener("error",this._imgLoadErrorEvent)):this.$container.innerHTML=""}show(){this.$container&&(this.$container.style.display="flex",this.$container.classList.remove(`${R}-hide`))}hide(){var e,t;super.hide(),null==(t=this.$container)||null==(e=t.querySelector(`.${R}-poster-img`))||e.removeEventListener("error",this._imgLoadErrorEvent)}destroy(){this.hide(),this.$popupContainer.removeChild(this.$container)}constructor(e={}){super(Object.assign({},K,W({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},K,e),this.$container.classList.add(`${R}-poster`,`${R}-hide`),this._imgLoadErrorEvent=this._imgLoadErrorEvent.bind(this),this._options.poster&&this.setPoster(this._options.poster)}}const G={play:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="play">\n <rect x="6.5" y="5.5" rx="1.25" width="2.5" height="13"/>\n <rect x="15" y="5.5" rx="1.25" width="2.5" height="13"/>\n </svg>',pause:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="pause"> <path d="M17.5 13.66L9.1 19.26C7.78 20.14 6 19.19 6 17.59L6 6.4C6 4.8 7.78 3.85 9.1 4.73L17.5 10.33C18.69 11.12 18.69 12.87 17.5 13.66Z" /></svg>',volume:e=>`<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" fill="none" focusable="false" aria-hidden="true" data-icon="volume">\n \t<path class="${e}-icon-volume-muted" d="M20.57 9.69L16.07 14.19" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path class="${e}-icon-volume-muted" d="M20.57 14.19L16.07 9.69" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \x3c!-- 音低 --\x3e\n <path class="${e}-icon-volume-low" d="M15.53 15.97C16.69 15.25 17.49 13.75 17.49 12C17.49 10.25 16.69 8.75 15.53 8.02" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t\x3c!-- 音高 --\x3e\n <path class="${e}-icon-volume-high" d="M18.5 19.06C20.31 17.5 21.49 14.93 21.49 12C21.49 9.07 20.31 6.48 18.49 4.93" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M5.87 8.62L9.85 5.25C10.5 4.7 11.49 5.16 11.49 6.01L11.49 17.98C11.49 18.83 10.5 19.29 9.85 18.74L5.87 15.37" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M5.87 15.37L3.49 15.37C2.94 15.37 2.49 14.92 2.49 14.37L2.49 9.62C2.49 9.07 2.94 8.62 3.49 8.62L5.87 8.62" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>`,mobileFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="mobile-fullscreen">\n <path d="M4 2.9082L11 2.9082C12.5188 2.9082 13.75 4.1394 13.75 5.6582L13.75 17.6582C13.75 19.177 12.5188 20.4082 11 20.4082L4 20.4082C2.4812 20.4082 1.25 19.177 1.25 17.6582L1.25 5.6582C1.25 4.1394 2.4812 2.9082 4 2.9082ZM4 4.4082L11 4.4082C11.6903 4.4082 12.25 4.9679 12.25 5.6582L12.25 17.6582C12.25 18.3485 11.6903 18.9082 11 18.9082L4 18.9082C3.30969 18.9082 2.75 18.3485 2.75 17.6582L2.75 5.6582C2.75 4.9679 3.30969 4.4082 4 4.4082ZM22.1511 18.3113C22.1511 19.3595 21.2467 20.1652 20.1509 20.2362L19.993 20.2413L15.2939 20.2413C14.8798 20.2413 14.5439 19.9055 14.5439 19.4913C14.5439 19.1116 14.8262 18.7979 15.1921 18.7482L15.2939 18.7413L19.993 18.7413C20.344 18.7413 20.5962 18.5592 20.6432 18.3732L20.6511 18.3113L20.6511 12.4895C20.6511 12.3048 20.4338 12.1042 20.1062 12.066L19.993 12.0594L15.2939 12.0594C14.8798 12.0594 14.5439 11.7238 14.5439 11.3094C14.5439 10.9298 14.8262 10.616 15.1921 10.5663L15.2939 10.5594L19.993 10.5594C21.1055 10.5594 22.0605 11.3175 22.145 12.3416L22.1511 12.4895L22.1511 18.3113ZM10.3225 16.1035C10.3225 15.6893 9.98669 15.3535 9.57251 15.3535L5.84644 15.3535L5.74463 15.3604C5.37854 15.41 5.09644 15.7239 5.09644 16.1035C5.09644 16.5177 5.43225 16.8535 5.84644 16.8535L9.57251 16.8535L9.67432 16.8467C10.0404 16.797 10.3225 16.4832 10.3225 16.1035Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',fullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="webFullscreen">\n \t<path d="M18.4009 2.40125L5.59972 2.40125C4.74849 2.39276 3.9297 2.72729 3.32788 3.32935C2.72607 3.9314 2.39188 4.75031 2.40062 5.6015L2.40062 18.4015C2.3922 19.2527 2.7267 20.0715 3.32874 20.6733C3.93079 21.2751 4.74969 21.6093 5.60091 21.6006L18.4009 21.6006C19.2519 21.609 20.0705 21.2747 20.6723 20.6729C21.2741 20.0711 21.6084 19.2525 21.6 18.4015L21.6 5.60034C21.6084 4.74933 21.2741 3.93073 20.6723 3.32892C20.0705 2.72711 19.2519 2.39282 18.4009 2.40125ZM18.401 20.3213C19.4246 20.3213 20.321 19.4249 20.321 18.4014L20.321 5.60022C20.321 4.5766 19.4246 3.68024 18.401 3.68024L5.59987 3.68024C4.57631 3.68024 3.67993 4.5766 3.67993 5.60022L3.67993 18.4014C3.67993 19.4249 4.57631 20.3213 5.59987 20.3213L18.401 20.3213ZM14.5599 5.27087L18.3997 5.27087L18.3997 5.27209C18.7849 5.27087 19.0405 5.52527 19.0405 5.91168L19.0405 9.75153C19.0405 10.1331 18.7849 10.3887 18.401 10.3911C18.0158 10.3887 17.7602 10.1331 17.7602 9.75153L17.7602 7.44763L14.0487 11.1591C13.9313 11.2808 13.7695 11.3494 13.6005 11.3494C13.4315 11.3494 13.2697 11.2808 13.1523 11.1591C13.0292 11.0428 12.9594 10.8809 12.9594 10.7115C12.9594 10.5421 13.0292 10.3802 13.1523 10.2639L16.8638 6.55005L14.5599 6.55005C14.1735 6.54883 13.9179 6.29443 13.9203 5.91046C13.9179 5.52411 14.1735 5.26971 14.5599 5.27087ZM10.594 12.6625L6.88254 16.3751L6.88254 14.0712C6.88254 13.686 6.62695 13.4304 6.24297 13.4304C5.85898 13.4304 5.60338 13.686 5.60219 14.0712L5.60219 17.9111C5.60219 18.2939 5.85898 18.5483 6.24297 18.5507L10.0828 18.5507C10.4668 18.5483 10.7224 18.2939 10.7224 17.9099C10.7224 17.5247 10.4668 17.2691 10.0816 17.2703L7.77771 17.2703L11.4904 13.5588C11.6133 13.4421 11.6829 13.2801 11.6829 13.1107C11.6829 12.9412 11.6133 12.7791 11.4904 12.6625C11.3737 12.5396 11.2117 12.47 11.0422 12.47C10.8727 12.47 10.7107 12.5396 10.594 12.6625Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',exitFullscreen:'\n <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="exitWebFullscreen">\n \t<path d="M18.4009 2.40125L5.59978 2.40125C4.74855 2.39276 3.92976 2.72729 3.32794 3.32935C2.72614 3.9314 2.39194 4.75031 2.40068 5.6015L2.40068 18.4015C2.39226 19.2527 2.72676 20.0715 3.3288 20.6733C3.93085 21.2751 4.74976 21.6093 5.60097 21.6006L18.4009 21.6006C19.252 21.609 20.0706 21.2747 20.6723 20.6729C21.2741 20.0711 21.6085 19.2525 21.6 18.4015L21.6 5.60034C21.6085 4.74933 21.2741 3.93073 20.6723 3.32892C20.0706 2.72711 19.252 2.39282 18.4009 2.40125ZM18.4012 20.3212C19.4247 20.3212 20.3211 19.4248 20.3211 18.4012L20.3211 5.6001C20.3211 4.57648 19.4247 3.68011 18.4012 3.68011L5.59999 3.68011C4.57643 3.68011 3.68005 4.57648 3.68005 5.6001L3.68005 18.4012C3.68005 19.4248 4.57643 20.3212 5.59999 20.3212L18.4012 20.3212ZM17.4401 11.3494L13.6002 11.3494L13.6002 11.3483C13.215 11.3494 12.9594 11.095 12.9594 10.7087L12.9594 6.86877C12.9594 6.48718 13.215 6.23163 13.599 6.22925C13.9842 6.23163 14.2398 6.48718 14.2398 6.86877L14.2398 9.17273L17.9512 5.46124C18.0686 5.3396 18.2304 5.27087 18.3994 5.27087C18.5685 5.27087 18.7303 5.3396 18.8476 5.46124C18.9708 5.57751 19.0406 5.73944 19.0406 5.90881C19.0406 6.07825 18.9708 6.24011 18.8476 6.35645L15.1362 10.0703L17.4401 10.0703C17.8265 10.0715 18.082 10.3259 18.0797 10.7099C18.082 11.0963 17.8265 11.3506 17.4401 11.3494ZM6.69115 18.358L10.4026 14.6454L10.4026 16.9493C10.4026 17.3345 10.6582 17.5901 11.0422 17.5901C11.4262 17.5901 11.6818 17.3345 11.683 16.9493L11.683 13.1094C11.683 12.7266 11.4262 12.4722 11.0422 12.4698L7.20233 12.4698C6.81834 12.4722 6.56276 12.7266 6.56276 13.1106C6.56276 13.4958 6.81834 13.7514 7.20354 13.7502L9.50746 13.7502L5.79478 17.4617C5.67188 17.5784 5.60228 17.7404 5.60228 17.9099C5.60228 18.0793 5.67188 18.2413 5.79478 18.358C5.91145 18.481 6.07349 18.5505 6.24297 18.5505C6.41243 18.5505 6.57446 18.481 6.69115 18.358Z" clip-rule="evenodd" fill-rule="evenodd"/>\n</svg>',globalFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="fullscreen">\n <path d="M8 4L6 4C4.89 4 4 4.89 4 6L4 8" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M4 16L4 18C4 19.1 4.89 20 6 20L8 20" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M16 20L18 20C19.1 20 20 19.1 20 18L20 16" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M20 8L20 6C20 4.89 19.1 4 18 4L16 4" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',exitGlobalFullscreen:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="exitFullscreen">\n <path d="M4 8L6 8C7.1 8 8 7.1 8 6L8 4" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M8 20L8 18C8 16.89 7.1 16 6 16L4 16" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M20 16L18 16C16.89 16 16 16.89 16 18L16 20" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n \t<path d="M16 4L16 6C16 7.1 16.89 8 18 8L20 8" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',close:'<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close"><path d="M6.34 6.34L17.65 17.65" stroke-width="1.5" stroke-linecap="round"/><path d="M6.34 17.65L17.65 6.34" stroke-width="1.5" stroke-linecap="round"/></svg>',ptz:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="ptz">\n <circle cx="12" cy="12" r="2.771739" stroke-width="1.5"/>\n <path d="M9.06 5.14L10.76 3.8C11.48 3.23 12.51 3.23 13.23 3.8L14.93 5.14" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4.87 14.93L3.54 13.23C2.97 12.51 2.97 11.48 3.54 10.76L4.87 9.06" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M18.91 14.93L20.24 13.23C20.81 12.51 20.81 11.48 20.24 10.76L18.91 9.06" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M9.06 18.69L10.76 20.02C11.48 20.59 12.51 20.59 13.23 20.02L14.93 18.69" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',download:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="download">\n <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m20,14.83l0,3.67c0,0.55 -0.45,1 -1,1l-14,0c-0.56,0 -1,-0.45 -1,-1l0,-3.67"/>\n <path fill="currentColor" d="m11.125,9.66357l-2.59094,0c-0.44544,0 -0.66846,0.53853 -0.35352,0.85353l3.45956,3.4595c0.1952,0.1953 0.5119,0.1953 0.7071,0l3.4596,-3.4595c0.3149,-0.315 0.0919,-0.85353 -0.3536,-0.85353l-2.5782,0l0,-5.95654c0,-0.48315 -0.3917,-0.875 -0.875,-0.875c-0.4833,0 -0.875,0.39185 -0.875,0.875l0,5.95654z"/>\n </svg>',sdk:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="sdk">\n <path d="M6.20253 2.50012L11.6496 2.50012C12.2335 2.50012 12.7939 2.72827 13.2069 3.13391L15.3547 5.24329C15.7677 5.64893 16 6.19934 16 6.77271L16 15.1062C16 16.3011 15.0142 17.2694 13.7975 17.2694L6.20253 17.2694C4.98578 17.2694 4 16.3011 4 15.1062L4 4.66333C4 3.46826 4.98578 2.50012 6.20253 2.50012ZM8.07051 6.09814C8.02467 5.76025 7.73502 5.49976 7.38452 5.49976C7.00217 5.49976 6.69221 5.80969 6.69221 6.19202L6.69221 8.49976L6.69853 8.59375C6.74437 8.93164 7.03403 9.19202 7.38452 9.19202C7.76688 9.19202 8.07683 8.88208 8.07683 8.49976L8.07683 6.19202L8.07051 6.09814ZM9.69238 5.49976C10.0429 5.49976 10.3325 5.76025 10.3784 6.09814L10.3847 6.19202L10.3847 8.49976C10.3847 8.88208 10.0747 9.19202 9.69238 9.19202C9.34189 9.19202 9.05223 8.93164 9.00639 8.59375L9.00008 8.49976L9.00008 6.19202C9.00008 5.80969 9.31003 5.49976 9.69238 5.49976ZM12.686 6.09814C12.6402 5.76025 12.3505 5.49976 12 5.49976C11.6176 5.49976 11.3077 5.80969 11.3077 6.19202L11.3077 8.49976L11.314 8.59375C11.3598 8.93164 11.6495 9.19202 12 9.19202C12.3824 9.19202 12.6923 8.88208 12.6923 8.49976L12.6923 6.19202L12.686 6.09814Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',cloudRec:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud">\n <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L9.32983 16L9.32983 13.3784L7.66479 13.3784C7.21924 13.3784 6.99634 12.8398 7.31128 12.5249L9.63892 10.197C9.83423 10.002 10.1509 10.002 10.3462 10.197L12.6738 12.5249C12.9888 12.8398 12.7659 13.3784 12.3203 13.3784L10.6553 13.3784L10.6553 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',cloudRecord:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud-record">\n <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439ZM10.8674 13.9116L6.89038 13.9116C6.26294 13.9116 5.75391 13.3889 5.75391 12.7449L5.75391 9.24487C5.75391 8.60034 6.26294 8.07812 6.89038 8.07812L10.8674 8.07812C11.4954 8.07812 12.0039 8.60034 12.0039 9.24487L12.0039 10.2937C12.2932 10.0627 12.9229 9.63184 13.4836 9.271C13.8145 9.05811 14.2461 9.24219 14.2461 9.63599L14.2461 12.3655C14.2461 12.759 13.8142 12.9434 13.4836 12.7307C12.9321 12.3755 12.303 11.9438 12.0039 11.707L12.0039 12.7449C12.0039 13.3889 11.4954 13.9116 10.8674 13.9116Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',playBack:'<svg width="1em" height="1em" viewBox="0 0 26.8701 26.8701" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-back">\n <path d="M8.48 4.24C8.48 4.24 7.39 8.16 7.77 7.77C11.29 4.26 16.99 4.26 20.5 7.77C24.02 11.29 24.02 16.99 20.5 20.5C16.99 24.02 11.29 24.02 7.77 20.5C6.03 18.76 5.16 16.49 5.14 14.21" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',playForward:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-forward">\n <path d="M19.58 7.28C18.01 4.71 15.18 2.99 11.95 2.99C7 2.99 3 7 3 11.95C3 16.89 7 20.9 11.95 20.9C16.51 20.9 20.27 17.48 20.82 13.07" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.56 4.22L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.5 7.29L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',filter:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="filter">\n <path d="M12.57 9.92L16.31 5.76C16.55 5.49 16.69 5.15 16.69 4.79C16.69 3.98 16.03 3.33 15.23 3.33L4.79 3.33C4.43 3.33 4.09 3.46 3.82 3.7L3.72 3.79C3.21 4.33 3.19 5.18 3.7 5.75L7.38 9.91L7.38 15.66C7.38 16.11 7.7 16.51 8.14 16.63L11.32 17.43C11.95 17.59 12.57 17.11 12.57 16.46L12.57 9.92ZM4.88 4.83L8.88 9.35L8.88 15.27L11.07 15.82L11.07 9.34L15.13 4.83L4.88 4.83Z" fill-rule="evenodd"/>\n </svg>',arrow:'<svg width="1em" height="1em" viewBox="0 0 30 30" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="arrow">\n <path d="M23 19L15 12L7 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',more:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="more">\n <path d="M4 6.8L20.8 6.8" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4 12.39L12.4 12.39" stroke-width="1.5" stroke-linecap="round"/>\n <path d="M4 18L8.19 18" stroke-width="1.5" stroke-linecap="round"/>\n </svg>',moreDot:'<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="more-dot">\n <path d="M8.75 3.75C8.75 3.05964 9.30964 2.5 10 2.5C10.6904 2.5 11.25 3.05964 11.25 3.75C11.25 4.44036 10.6904 5 10 5C9.30964 5 8.75 4.44036 8.75 3.75ZM8.75 10C8.75 9.30964 9.30964 8.75 10 8.75C10.6904 8.75 11.25 9.30964 11.25 10C11.25 10.6904 10.6904 11.25 10 11.25C9.30964 11.25 8.75 10.6904 8.75 10ZM10 15C9.30964 15 8.75 15.5596 8.75 16.25C8.75 16.9404 9.30964 17.5 10 17.5C10.6904 17.5 11.25 16.9404 11.25 16.25C11.25 15.5596 10.6904 15 10 15Z" fill-rule="evenodd" />\n </svg>',minusCircle:'<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="minus-circle">\n \t\t<path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />\n\t\t <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />\n </svg>',plusCircle:'<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="plus-circle">\n <path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />\n <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />\n <path stroke="currentColor" d="M0 0L5 0" stroke-linecap="round" stroke-width="1.25" transform="matrix(0,1,-1,0,9.96729,7.55884)" />\n </svg>',record:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="record">\n <path d="M4.53 19C3.03 19 1.8 17.74 1.8 16.2L1.8 7.8C1.8 6.25 3.03 5 4.53 5L14.08 5C15.58 5 16.8 6.25 16.8 7.8L16.8 16.2C16.8 17.74 15.58 19 14.08 19L4.53 19Z" stroke-width="1.5" stroke-linejoin="round"/>\n <path d="M17.25 13.64C17.94 14.2 18.97 15.03 20.36 16.15C21.09 16.74 22.19 16.21 22.19 15.27L22.19 8.72C22.19 7.78 21.09 7.25 20.36 7.84C18.99 8.94 17.96 9.77 17.28 10.32" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',talk:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="talk">\n \t<path stroke="none" d="M12.22 18.95C12.65 18.95 13.01 19.21 13.07 19.54L13.08 19.64L13.08 21.78C13.08 22.16 12.69 22.47 12.22 22.47C11.78 22.47 11.42 22.21 11.37 21.87L11.36 21.78L11.36 19.64C11.36 19.26 11.74 18.95 12.22 18.95Z" fill-rule="evenodd"/>\n <path d="M19.53 11.37L19.53 11.58C19.53 15.74 16.15 19.11 11.99 19.11C7.83 19.11 4.46 15.74 4.46 11.58L4.46 11.43" fill="none" stroke-width="1.5" stroke-linecap="round"/>\n <path stroke="none" d="M12.05 1.52C9.3 1.52 7.07 3.58 7.07 6.12L7.07 12.07C7.07 14.61 9.3 16.67 12.05 16.67C14.79 16.67 17.02 14.61 17.02 12.07L17.02 6.12C17.02 3.58 14.79 1.52 12.05 1.52ZM8.57 12.07L8.57 6.12C8.57 5.94 8.59 5.75 8.63 5.57C8.67 5.36 8.74 5.16 8.83 4.96C8.86 4.89 8.9 4.82 8.93 4.75C9.09 4.46 9.3 4.21 9.55 3.97C9.64 3.89 9.73 3.81 9.83 3.74C10.08 3.55 10.35 3.4 10.66 3.28C10.79 3.23 10.93 3.19 11.06 3.15C11.38 3.07 11.71 3.02 12.05 3.02C12.38 3.02 12.71 3.07 13.03 3.15C13.17 3.19 13.3 3.23 13.43 3.28C13.74 3.4 14.02 3.55 14.27 3.74C14.36 3.81 14.45 3.89 14.54 3.97C14.79 4.21 15 4.46 15.16 4.75C15.2 4.82 15.23 4.89 15.26 4.96C15.35 5.16 15.42 5.36 15.46 5.57C15.5 5.75 15.52 5.94 15.52 6.12L15.52 12.07C15.52 12.26 15.5 12.44 15.46 12.63C15.42 12.83 15.35 13.04 15.26 13.24C15.23 13.31 15.2 13.38 15.16 13.45C15 13.73 14.79 13.99 14.54 14.22C14.45 14.3 14.36 14.38 14.27 14.45C14.02 14.64 13.74 14.79 13.43 14.91C13.3 14.96 13.17 15.01 13.03 15.05C12.71 15.13 12.38 15.17 12.05 15.17C11.71 15.17 11.38 15.13 11.06 15.05C10.93 15.01 10.79 14.96 10.66 14.91C10.35 14.79 10.08 14.64 9.83 14.45C9.73 14.38 9.64 14.3 9.55 14.22C9.3 13.99 9.09 13.73 8.93 13.45C8.9 13.38 8.86 13.31 8.83 13.24C8.74 13.04 8.67 12.83 8.63 12.63C8.59 12.44 8.57 12.26 8.57 12.07Z" fill-rule="evenodd"/>\n </svg>',talkGrowth:e=>`<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">\n \t\t<g fill="currentColor" stroke="currentColor">\n <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />\n <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />\n <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />\n </g>\n <g class="${e}-icon-talk-growth-dot">\n <path class="${e}-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="${e}-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n </g>\n </svg>`,capturePicture:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="capture-picture">\n \t<path d="M6.94 7.51C7.34 7.51 7.7 7.28 7.86 6.91L8.43 5.6C8.59 5.23 8.95 5 9.35 5L14.69 5C15.04 5 15.37 5.18 15.55 5.49L16.45 7.02C16.63 7.33 16.96 7.51 17.31 7.51L18.5 7.51C19.6 7.51 20.5 8.41 20.5 9.51L20.5 17C20.5 18.1 19.6 19 18.5 19L5.5 19C4.39 19 3.5 18.1 3.5 17L3.5 9.51C3.5 8.41 4.39 7.51 5.5 7.51L6.94 7.51Z" stroke-width="1.5"/>\n\t <circle cx="12" cy="12.525146" r="3.068097" stroke-width="1.5"/>\n </svg>',zoom:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="zoom">\n <ellipse cx="10.914795" cy="11.25" rx="8.004043" ry="8.25" stroke-width="1.5"/>\n <path d="M14.31 11.04L8.05 11.14" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M11.13 14.22L11.23 7.95" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.45 17.83L19.36 20.83" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',privacyMasking:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="privacy-masking">\n <path d="M12 19C11.15 19 10.31 18.82 9.49 18.5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M20.88 12.46C18.98 15.96 15.49 19 11.99 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.07 8.92C19.76 9.72 20.38 10.61 20.88 11.53C21.03 11.82 21.03 12.17 20.88 12.46" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5 19L19 5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M9.77 14.22C8.54 12.99 8.54 11 9.77 9.77C11 8.54 12.99 8.54 14.22 9.77" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M17.04 6.95C15.49 5.75 13.74 5 12 5C8.5 5 5.01 8.03 3.11 11.53C2.96 11.82 2.96 12.17 3.11 12.46C4.06 14.21 5.41 15.84 6.95 17.04" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',info:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info">\n <path d="M12 1.5C6.20154 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20154 22.5 12 22.5C17.7985 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7985 1.5 12 1.5ZM10.875 7.875C10.875 8.49609 11.3789 9 12 9C12.6211 9 13.125 8.49609 13.125 7.875C13.125 7.25391 12.6211 6.75 12 6.75C11.3789 6.75 10.875 7.25391 10.875 7.875ZM12.75 17.0625C12.75 17.1656 12.6656 17.25 12.5625 17.25L11.4375 17.25C11.3344 17.25 11.25 17.1656 11.25 17.0625L11.25 10.6875C11.25 10.5844 11.3344 10.5 11.4375 10.5L12.5625 10.5C12.6656 10.5 12.75 10.5844 12.75 10.6875L12.75 17.0625Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',error:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="error">\n <path d="M1.5 12C1.5 6.20156 6.20157 1.5 12 1.5C17.7984 1.5 22.5 6.20156 22.5 12C22.5 17.7984 17.7984 22.5 12 22.5C6.20157 22.5 1.5 17.7984 1.5 12ZM14.3297 15.982L15.8766 15.9891C15.9797 15.9891 16.0641 15.9047 16.0641 15.8016C16.0641 15.757 16.0477 15.7148 16.0195 15.6797L12.9727 12.0469L16.0172 8.4164C16.0453 8.38125 16.0617 8.33906 16.0617 8.29453C16.0617 8.18906 15.9774 8.10703 15.8742 8.10703L14.3273 8.11406L12 10.8891L9.67267 8.11172L8.12344 8.10469C8.02032 8.10469 7.93594 8.18906 7.93594 8.29219C7.93594 8.33672 7.95233 8.37891 7.98047 8.41406L11.0297 12.0445L7.98047 15.6773C7.95233 15.7125 7.93594 15.7547 7.93594 15.7992C7.93594 15.9047 8.02032 15.9867 8.12344 15.9867L9.67267 15.9797L12 13.2047L14.3297 15.982Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>'};function Y(e,t,n={}){let r="";return n&&Object.keys(n).forEach((e=>{r+=`${e}="${n[e]}"`})),`<span class="${R}-icon ${R}-icon-${t}" ${r}>${e}</span>`}const q=(e={})=>Y(G.play,"play",e),Z=(e={})=>Y(G.pause,"pause",e),X=(e={})=>Y(G.volume(R),"volume",e),J=(e={})=>Y(G.mobileFullscreen,"mobile-fullscreen",e),ee=(e={})=>Y(G.exitFullscreen,"exit-fullscreen",e),te=(e={})=>Y(G.fullscreen,"fullscreen",e),ne=(e={})=>Y(G.exitGlobalFullscreen,"exit-global-fullscreen",e),re=(e={})=>Y(G.globalFullscreen,"global-fullscreen",e),oe=(e={})=>Y(G.capturePicture,"capture-picture",e),ie=(e={})=>Y(G.ptz,"ptz",e),se=(e={})=>Y(G.record,"record",e),Ae=(e={})=>Y(G.talkGrowth(R),"talk-growth",e),ae=(e={})=>Y(G.minusCircle,"minus-circle",e),le=(e={})=>Y(G.plusCircle,"plus-circle",e),ce=(e={})=>Y(G.sdk,"sdk",e),ue=(e={})=>Y(G.cloudRec,"cloud-rec",e),de=(e={})=>Y(G.cloudRecord,"cloud-record",e),he=(e={})=>Y(G.error,"error",e),pe=(e={})=>Y(G.info,"info",e);function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}const me={};class ge extends j{info(e,t=0){this._show(`${pe()}<div class="${R}-message-msg">${e}</div>`,t,"info")}warn(e,t=0){this._show(`${pe()}<div class="${R}-message-msg">${e}</div>`,t,"warn")}error(e,t=0){this._show(`${he()}<div class="${R}-message-msg">${e}</div>`,t,"error")}toast(e,t=0){}_show(e,t=0,n="info"){this._timer&&(clearTimeout(this._timer),this._timer=null),this.$popupContainer.classList.add(`${R}-has-message`,`${R}-has-message-${n}`),"function"==typeof this._options.render?this.$container.innerHTML=this._options.render(e,t,n):this.$container.innerHTML=`<div class="${R}-message-content ${R}-message-${n}">${e||""}</div>`,this.$container.style.display="flex",this.$container.classList.remove(`${R}-hide`),t>0&&(this._timer=setTimeout((()=>{this.hide(),this._timer&&clearTimeout(this._timer),this._timer=null}),1e3*t))}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.hide(),super.destroy()}hide(){super.hide(),this.$container.innerHTML="",Array.from(this.$popupContainer.classList).forEach((e=>{new RegExp(`^${R}-has-message`,"ig").test(e)&&this.$popupContainer.classList.remove(e)}))}constructor(e={}){super(Object.assign({},me,fe({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},me,e),this.$container.classList.add(`${R}-message`,`${R}-hide`)}}function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(this,arguments)}function ye(e,t){let n=null,r=0;return function(...o){const i=Date.now(),s=t-(i-r);s<=0?(r=i,e.apply(this,o)):n||(n=setTimeout((()=>{r=Date.now(),n=null,e.apply(this,o)}),s))}}var Ce,_e,be;class we{static orientationEventListener(e){let t=null,n=()=>{var e,t;if(null==(e=screen)?void 0:e.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type||screen.mozOrientation||screen.msOrientation};if(void 0!==(null==(t=window)?void 0:t.orientation)){const e=window.orientation;return{angle:e>=0?e:360+e,type:90===Math.abs(e)?"landscape":"portrait"}}return we.isMobile?{angle:window.innerWidth>window.innerHeight?90:0,type:window.innerWidth>window.innerHeight?"landscape":"portrait"}:{angle:0,type:"unknow"}},r=n(),o=()=>{const t=null==n?void 0:n();t.angle===r.angle&&t.type===r.type||(null==e||e(t),r=t)},i=()=>{t&&clearTimeout(t),o&&(t=setTimeout(o,200))};return screen.orientation?screen.orientation.addEventListener("change",o):"onorientationchange"in window?window.addEventListener("orientationchange",o):we.isMobile&&window.addEventListener("resize",i),[r,()=>{screen.orientation&&o?screen.orientation.removeEventListener("change",o):"onorientationchange"in window&&o?window.removeEventListener("orientationchange",o):we.isMobile&&window.removeEventListener("resize",i),o=null,i=null,n=null,t&&(clearTimeout(t),t=null)}]}static resizeObserver(e,t){let n=(n,r)=>{for(const o of n)o.target===e&&t&&t(n,r)},r=new ResizeObserver(ye(n,50));return r.observe(e),{unobserve(){try{null==r||r.unobserve(e)}catch(e){}n=null},disconnect(){null==r||r.disconnect(),r=null,n=null}}}}we.isMobile=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null==(Ce=navigator)?void 0:Ce.userAgent)||/Macintosh/i.test(null==(_e=navigator)?void 0:_e.userAgent)&&(null==(be=navigator)?void 0:be.maxTouchPoints)>1;const Ee={step:.01,range:[0,1],draggable:!0,disabled:!1,showPercent:!1,showPlus:!1,showMinus:!1,onChange:()=>{},renderText:(e,t)=>(100*t).toFixed(0)};class $e{get disabled(){return this._disabled}set disabled(e){this._disabled=e}get value(){return this._value}set value(e){this._updateValuePercent("value",e)}get percent(){return this._percent}set percent(e){this._updateValuePercent("percent",e)}destroy(){var e,t,n,r,o,i,s,A,a,l;null==(t=this._delegateSliderMouseDown)||null==(e=t.destroy)||e.call(t),this._delegateSliderMouseDown=null,null==(r=this._delegateSliderHandleMouseDown)||null==(n=r.destroy)||n.call(r),this._delegateSliderHandleMouseDown=null,null==(i=this._delegateProgressMouseDown)||null==(o=i.destroy)||o.call(i),this._delegateProgressMouseDown=null,null==(A=this._delegatePlusClick)||null==(s=A.destroy)||s.call(A),this._delegatePlusClick=null,null==(l=this._delegateMinusClick)||null==(a=l.destroy)||a.call(l),this._delegateMinusClick=null,this.$content&&this.$container.removeChild(this.$content),this.$content=null}_updateValuePercent(e,t){if("percent"===e){if(t<0||t>1)return;this._percent!==t&&(this._percent=+t.toFixed(2),this._convertPercentToValue(this._percent),null==this.options.onChange||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}else if("value"===e){if(t<this.options.range[0]||t>this.options.range[1])return;this._value!==t&&(this._value=+t.toFixed(2),this._convertValueToPercent(this._value),null==this.options.onChange||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}}_convertPercentToValue(e){this._value=+(this.options.range[0]+(this.options.range[1]-this.options.range[0])*e).toFixed(2)}_convertValueToPercent(e){this._percent=+((e-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2)}_render(){var e;this.$content=document.createElement("div"),this.$content.className=`${R}-progress ${null!=(e=this.options.className)?e:""}`,this.$content.innerHTML=`${this.options.showPercent?`<div class="${R}-progress-text">${null==this.options.renderText?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)}</div>`:""}\n ${this.options.showPlus?`<div class="${R}-progress-plus">\n ${le()}\n </div>`:""}\n <div class="${R}-progress-slider">\n <div class="${R}-progress-slider-fill"></div>\n <div class="${R}-progress-slider-handle" style="top: 100%"></div>\n </div>\n ${this.options.showMinus?`<div class="${R}-progress-minus">\n ${ae()}\n </div>`:""}`,this.$container.appendChild(this.$content)}_updateUI(){const e=this.$content;if(null==e||e.setAttribute("data-value",this._value+""),e.querySelector(`.${R}-progress-slider-fill`)){const t=+(100*this._percent).toFixed(0);this.options.showPercent&&(e.querySelector(`.${R}-progress-text`).innerHTML=null==this.options.renderText?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)),e.querySelector(`.${R}-progress-slider-fill`).style.height=t+"%",e.querySelector(`.${R}-progress-slider-handle`).style.top=100-t+"%"}}_eventListeners(){this._delegateSliderMouseDown=$(this.$content,`.${R}-progress-slider`,"mousedown",(e=>{var t,n;if(e.stopPropagation(),e.delegateTarget.classList.contains(`${R}-disabled`)||this._disabled)return;const r=this.$content.querySelector(`.${R}-progress-slider`).getBoundingClientRect();let o=e.clientY-r.top;o=Math.max(0,Math.min(o,r.height));const i=+((r.height-o)/r.height).toFixed(2);this._convertPercentToValue(i),null==(n=this.options)||null==(t=n.onProgressClick)||t.call(n,this._value,i,this.options.range),this.percent=i})),this._delegateSliderHandleMouseDown=$(this.$content,`.${R}-progress-slider-handle`,"mousedown",(e=>{if(e.stopPropagation(),!this.options.draggable)return;if(e.delegateTarget.classList.contains(`${R}-disabled`)||this._disabled)return;const t=e.clientY,n=this.$content.querySelector(`.${R}-progress-slider-fill`).offsetHeight,r=this.$content.querySelector(`.${R}-progress-slider`).offsetHeight;let o=ye((e=>{if(e.stopPropagation(),!this.options.draggable||this._disabled)return;const o=t-e.clientY;let i=n+o;i=Math.max(0,Math.min(i,r)),this.percent=+(i/r).toFixed(2)}),20);const i=this.$content;function s(){i.removeEventListener("mousemove",o),o=null,i.removeEventListener("mouseup",s),i.removeEventListener("mouseup",s)}i.addEventListener("mousemove",o),i.addEventListener("mouseup",s),i.addEventListener("mouseleave",s)})),this.options.showPlus&&(this._delegatePlusClick=$(this.$content,`.${R}-progress-plus`,"click",(e=>{if(e.delegateTarget.classList.contains(`${R}-disabled`)||this._disabled)return;const t=this._value+this.options.step;t<=this.options.range[1]?this.value=t:this.value=this.options.range[1],null==this.options.onPlusClick||this.options.onPlusClick.call(this.options,this.value,this.percent,this.options.range)}))),this.options.showMinus&&(this._delegateMinusClick=$(this.$content,`.${R}-progress-minus`,"click",(e=>{if(e.delegateTarget.classList.contains(`${R}-disabled`)||this._disabled)return;const t=this._value-this.options.step;t>=this.options.range[0]?this.value=t:this.value=this.options.range[0],null==this.options.onMinusClick||this.options.onMinusClick.call(this.options,this.value,this.percent,this.options.range)}))),this._delegateProgressMouseDown=$(this.$container,`.${R}-progress`,"mousedown",(e=>{e.stopPropagation()}))}constructor(e){var t,n;if(this._percent=0,this._value=0,this._disabled=!1,this._delegateSliderMouseDown=null,this._delegateSliderHandleMouseDown=null,this._delegateProgressMouseDown=null,this._delegatePlusClick=null,this._delegateMinusClick=null,this.options=Object.assign({},Ee,e),2!==(null==(t=this.options.range)?void 0:t.length))throw new Error("Progress range must be an array with two elements.");if(this.options.range[0]>=this.options.range[1])throw new Error("Progress range first element must be less than the second element.");this.$container=e.container,this._render(),this._eventListeners();const r=null!=(n=this.options.defaultValue)?n:this.options.range[0];this._value=+r.toFixed(2),this._percent=+((r-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2),this._updateUI(),this.disabled=this.options.disabled}}function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}const Te={volume:.8,muted:!1,open:!1,trigger:"hover",onOpenChange:()=>{},onChange:()=>{}};function Le(e,t,n,r,o,i,s){try{var A=e[i](s),a=A.value}catch(e){return void n(e)}A.done?t(a):Promise.resolve(a).then(r,o)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Le(i,r,o,s,A,"next",e)}function A(e){Le(i,r,o,s,A,"throw",e)}s(void 0)}))}}const Se={prefix:"ezplayer"};class Pe{static getInstance(){return Pe.instance||(Pe.instance=new Pe),Pe.instance}add(e,t){if(e){const n=this.fullscreens.findIndex((t=>t.element===e));n>=0?(this.fullscreens[n].onChange||(this.fullscreens[n].onChange=[]),this.fullscreens[n].onChange.push(t)):this.fullscreens.push({element:e,onChange:[t]})}}getChanges(e){const t=this.fullscreens.find((t=>t.element===e));return t&&(null==t?void 0:t.onChange)||[]}remove(e,t){const n=this.fullscreens.findIndex((t=>t.element===e));if(n>=0){var r;const e=null==(r=this.fullscreens[n].onChange)?void 0:r.find((e=>e===t));if(e){var o;const t=null==(o=this.fullscreens[n].onChange)?void 0:o.filter((t=>t!==e));this.fullscreens[n].onChange=t}(!this.fullscreens[n].onChange||this.fullscreens[n].onChange&&0===this.fullscreens[n].onChange.length)&&this.fullscreens.splice(n,1)}}constructor(){this.fullscreens=[]}}const Me=Pe.getInstance();let Oe=class{fullscreen(){return Fe((function*(){if(!we.isMobile)return yield O.request(this.$container);this._fullscreenchange(this.$container,!0)})).call(this)}exitFullscreen(){return Fe((function*(){if(we.isMobile)this._fullscreenchange(this.$container,!1);else if(this._isFullscreen)return yield O.exit()})).call(this)}toggle(){return Fe((function*(){if(!we.isMobile)return yield O.toggle(this.$container);this._fullscreenchange(this.$container,!this._isCurrentFullscreen)})).call(this)}destroy(){O.isEnabled&&O.off("change",this._fullscreenchange2),we.isMobile&&this._options.onChange&&Me.remove(this.$container,this._options.onChange),this._fullscreenchange2=null}_fullscreenchange2(){this._fullscreenchange()}_fullscreenchange(e,t){if(this._isFullscreen=O.isFullscreen,e)this._isCurrentFullscreen=!!t,this._currentFullscreenElementList=[];else if(this._isFullscreen){const e=O.element,t=this._currentFullscreenElementList.indexOf(e);e&&-1===t?this._currentFullscreenElementList.unshift(e):e&&t>=1&&this._currentFullscreenElementList.shift();const n=this._currentFullscreenElementList.indexOf(this.$container);this._isCurrentFullscreen=n>=0}else this._isCurrentFullscreen=!1,this._currentFullscreenElementList=[];var n,r,o;this._isCurrentFullscreen?null==(n=this.$container)||n.classList.add(`${this._options.prefix}-fullscreen`):(null==(r=this.$container)||r.classList.remove(`${this._options.prefix}-fullscreen`),null==(o=this.$container)||o.classList.remove(`${this._options.prefix}-global-fullscreen`));we.isMobile?Me.getChanges(this.$container).forEach((e=>{e({isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:we.isMobile})})):null==this._options.onChange||this._options.onChange.call(this._options,{isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:we.isMobile}),we.isMobile&&(this._isCurrentFullscreen?document.body.classList.add(`${this._options.prefix}-body-mobile-noscroll`):document.body.classList.remove(`${this._options.prefix}-body-mobile-noscroll`))}constructor(e,t={}){this._isCurrentFullscreen=!1,this._isFullscreen=!1,this._currentFullscreenElementList=[],this.$container=e,this._options=Object.assign({},Se,t),this._options.onChange&&we.isMobile&&Me.add(this.$container,this._options.onChange),this._isFullscreen=!!this._options.isFullscreen,this._fullscreenchange2=this._fullscreenchange2.bind(this),O.isEnabled&&O.on("change",this._fullscreenchange2)}};function Ie(){return Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ie.apply(this,arguments)}class De extends j{destroy(){var e;this.$container.innerHTML="",null==(e=this._fullscreenUtil)||e.destroy(),this._fullscreenUtil=null,super.destroy()}_render(){var e,t,n;we.isMobile?this.$container.innerHTML=J({title:null==(e=this.options.locale)?void 0:e.fullscreen}):this.$container.innerHTML=ee({title:null==(t=this.options.locale)?void 0:t.exitFullscreen})+te({title:null==(n=this.options.locale)?void 0:n.fullscreen})}_fullscreenChange(e){this.isCurrentFullscreen=e.isCurrentFullscreen,this._render()}_onControlClick(){var e,t;this.isCurrentFullscreen?null==(e=this._fullscreenUtil)||e.exitFullscreen():null==(t=this._fullscreenUtil)||t.fullscreen()}_event(){}constructor(e){var t;if(super(Ie({tagName:"span",classNameSuffix:"fullscreen",controlType:"button"},e)),this.isCurrentFullscreen=!1,this.options=e,this.isCurrentFullscreen=!!e.isCurrentFullscreen,this._$rootContainer=null==(t=this.options)?void 0:t.rootContainer,!this._$rootContainer)throw new Error("Fullscreen option fullscreenContainer is required!");this._fullscreenChange=this._fullscreenChange.bind(this),this._fullscreenUtil=new Oe(this._$rootContainer,{onChange:this._fullscreenChange,isFullscreen:this.isCurrentFullscreen}),this._render(),this._event()}}function xe(){return xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(this,arguments)}var Re={play:"播放",pause:"暂停",fullscreen:"全屏",exitFullscreen:"退出全屏",globalFullscreen:"全局全屏",exitGlobalFullscreen:"退出全局全屏",volume:"音量",muted:"静音",loading:"加载中,请稍等...",sdkRec:"SDK存储",cloudRec:"云存储",cloudRecord:"云录像",definition:"清晰度",capturePicture:"截图",fetchError:"取流失败,请检查网络"},Ne={play:"play",pause:"pause",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",globalFullscreen:"globalFullscreen",exitGlobalFullscreen:"exitGlobalFullscreen",volume:"volume",muted:"muted",loading:"Loading...",sdkRec:"SDK",cloudRec:"cloud",cloudRecord:"cloudRecord",definition:"definition",capturePicture:"capturePicture",fetchError:"Stream retrieval failed, please check the network"};function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ue.apply(this,arguments)}const Be={sound:"volume",webExpend:"fullscreen",expend:"globalFullscreen",pantile:"ptz",recordvideo:"record",hd:"definition"};function je(e){return[e.filter((e=>"left"===e.part)),e.filter((e=>"right"===e.part))]}var Qe={autoFocus:3,footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"volume",part:"left",defaultActive:1,isrender:1},{iconId:"fullscreen",part:"right",defaultActive:0,isrender:1},{iconId:"globalFullscreen",part:"right",defaultActive:0,isrender:1}]}};const ze={pcLive:{autoFocus:3,header:{btnList:[{iconId:"deviceID",part:"left",isrender:1},{iconId:"deviceName",part:"left",isrender:1},{iconId:"rec",part:"right",isrender:1},{iconId:"cloudRec",part:"right",isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"capturePicture",part:"left",isrender:1},{iconId:"sound",part:"left",isrender:1},{iconId:"pantile",part:"left",isrender:1},{iconId:"recordvideo",part:"left",isrender:1},{iconId:"talk",part:"left",isrender:1},{iconId:"zoom",part:"left",isrender:1},{iconId:"hd",part:"right",isrender:1},{iconId:"webExpend",part:"right",isrender:1},{iconId:"expend",part:"right",isrender:1}]}},pcRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileLive:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},security:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},voice:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}};class He{destroy(){var e;null==(e=this.$popupContainer)||e.removeChild(this.$container)}constructor(e={}){this._options=e,this.$container=document.createElement("div"),this._defaultClass=`${R}-${this._options.cType}`,this._options.cType&&this.$container.classList.add(this._defaultClass),(null==e?void 0:e.className)&&this.$container.classList.add(e.className),(null==e?void 0:e.color)&&(this.$container.style.cssText+=`--${R}-default-color: ${e.color};`),(null==e?void 0:e.activeColor)&&(this.$container.style.cssText+=`--${R}-active-color: ${e.activeColor};`),(null==e?void 0:e.backgroundColor)&&(this.$container.style.cssText+=`;background-image: url();background-color: ${e.backgroundColor};`),e.getPopupContainer?this.$popupContainer=null==e.getPopupContainer?void 0:e.getPopupContainer.call(e):this.$popupContainer=document.body,this.$left=document.createElement("div"),this.$left.classList.add(`${this._defaultClass}-left`),this.$right=document.createElement("div"),this.$right.classList.add(`${this._defaultClass}-right`),this.$container.appendChild(this.$left),this.$container.appendChild(this.$right),this.$popupContainer.appendChild(this.$container)}}function We(){return We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},We.apply(this,arguments)}class Ke extends He{constructor(e={}){super(We({},e,{cType:"header"}))}}class Ve{destroy(){this.$container.remove()}constructor(e){if(this.$container=document.createElement("div"),this.$container.classList.add(`${R}-content`),"function"==typeof e.getPopupContainer){const t=null==e.getPopupContainer?void 0:e.getPopupContainer.call(e);null==t||t.appendChild(this.$container)}}}function Ge(){return Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ge.apply(this,arguments)}class Ye extends He{constructor(e={}){super(Ge({},e,{cType:"footer"}))}}function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Je.apply(this,arguments)}function et(){return et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},et.apply(this,arguments)}function tt(){return tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}const nt={open:!1,max:8};function rt(){return rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}class ot extends j{updateSelectOptions(e){var t;(null==e?void 0:e.length)>0&&(null==(t=this._picker)||t.innerHTML(`<ul class="${R}-select-list">\n ${e.map((e=>`\n <li class="${R}-select-option ${+e.value===this.value?`${R}-active`:""}" data-value="${e.value}">\n <span>${e.label}</span>\n </li>\n `)).join("")}\n </ul>`),this._activeOption())}_render(e){if(e)if(this.$container.querySelector(`.${R}-select-btn`))this.$container.querySelector(`.${R}-select-btn`).innerHTML=`<span>${null==e?void 0:e.label}</span>`;else{const t=document.createElement("span");t.classList.add(`${R}-btn`,`${R}-select-btn`),t.innerHTML=`<span>${null==e?void 0:e.label}</span>`,this.$container.appendChild(t)}}_activeOption(){if(this._picker){var e,t;const n=null==(e=this._picker.$body)?void 0:e.querySelector(`.${R}-active`);null==n||n.classList.remove(R+"-active");const r=null==(t=this._picker.$body)?void 0:t.querySelector(`.${R}-select-option[data-value="${this.value}"]`);null==r||r.classList.add(R+"-active");const o=this.list.find((e=>e.value===this.value));this._render(o)}}_onSelectChange(){this._picker&&(this._delegation=$(this._picker.$body,`.${R}-select-option`,"click",(e=>{const t=e.delegateTarget;if(!t.classList.contains(`${R}-disabled`)){const e=t.getAttribute("data-value");if(this.value!==+e){this.value=+e,this._activeOption();const t=this.list.find((e=>e.value===this.value));null==this._options.onChange||this._options.onChange.call(this._options,this.value,t),this._picker.open=!1}}})))}destroy(){var e,t;null==(e=this._delegation)||e.destroy(),null==(t=this._picker)||t.destroy(),super.destroy()}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(rt({tagName:"span",type:"button",controlType:"button"},e)),this._options=e,this.list=e.list||[],void 0===e.value&&null===e.value||(this.value=e.value),this._picker=new b({container:this.$container,getPopupContainer:()=>this.$container,trigger:we.isMobile?"click":"hover",isMobile:we.isMobile,wrapClassName:`${R}-${e.classNameSuffix}-picker`,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{const t=this.list.find((e=>e.value===this.value));null==this._options.onOpenChange||this._options.onOpenChange.call(this._options,e,this.value,t)}}),this.list&&this.updateSelectOptions(this.list),this._onSelectChange(),this._activeOption()}}function it(){return it=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},it.apply(this,arguments)}function st(){return st=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},st.apply(this,arguments)}function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}function at(){return at=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at.apply(this,arguments)}function lt(){return lt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(this,arguments)}function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(this,arguments)}function ut(){return ut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}function dt(){return dt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}const ht={play:class extends j{get playing(){return this._playing}_onControlClick(e){this._playing=!this._playing,this.emit(B.control.play,this._playing),null==this._options.onClick||this._options.onClick.call(this._options,e,this._playing),this._render()}_render(){var e,t;this._playing?this.$container.innerHTML=q({title:null==(e=this._options.locale)?void 0:e.play}):this.$container.innerHTML=Z({title:null==(t=this._options.locale)?void 0:t.pause})}constructor(e){super(ve({},e,{tagName:"span",controlType:"button",classNameSuffix:"play"})),this._playing=!1,this._options=e,this._playing=!!e.playing,this.on(B.play,(e=>{this._playing!==e&&(this._playing=e,this._render())})),this._render()}},volume:class extends j{get muted(){return this._muted}set muted(e){this._muted!==e&&(e?(this._volume=0,this._progress&&(this._progress.value=0)):(this._volume=this._lastVolume,this._progress&&(this._progress.value=this._lastVolume)),this._muted=e,null==this._options.onChange||this._options.onChange.call(this._options,this.volume,e),this.emit(B.control.volumechange,this.volume,e)),this._updateUI()}get volume(){return this._lastVolume}set volume(e){if(e>=0&&e<=1){const t=+e.toFixed(2);this._lastVolume!==t&&(this._volume=t,this._lastVolume=this._volume,this._progress&&(this._progress.value=t),null==this._options.onChange||this._options.onChange.call(this._options,t,this._muted),this.emit(B.control.volumechange,t,this._muted)),this._updateUI()}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.picker&&(this.picker.disabled=e),this._updateDisabledState(e)}destroy(){var e,t,n;null==(t=this._progress)||null==(e=t.destroy)||e.call(t),this._progress=null,null==(n=this.picker)||n.destroy(),this.picker=null,super.destroy()}_toggleMute(){if(!this.disabled)return 0===this._lastVolume?(this.volume=this._options.volume||.5,void(this.muted=!1)):void(this.muted?this.muted=!1:this.muted=!0)}_updateUI(){var e,t,n,r;(this._$content.classList.remove(R+"-icon-volume-muted"),this._$content.classList.remove(R+"-icon-volume-zero"),this._$content.classList.remove(R+"-icon-volume-low"),this._$content.classList.remove(R+"-icon-volume-high"),this._muted)?(this._volume=0,this._$content.classList.add(R+"-icon-volume-muted"),this._$content.setAttribute("title",(null==(t=this._options)||null==(e=t.locale)?void 0:e.muted)||"muted")):(this._$content.classList.remove(R+"-icon-volume-muted"),0===this._volume?this._$content.classList.add(R+"-icon-volume-zero"):this._volume<=.5?this._$content.classList.add(R+"-icon-volume-low"):this._$content.classList.add(R+"-icon-volume-high"),this._$content.setAttribute("title",(null==(r=this._options)||null==(n=r.locale)?void 0:n.volume)||"volume"))}get _$content(){return this.$container.querySelector(`.${R}-icon-volume`)}_render(){var e;this.$container.innerHTML=X({title:null==(e=this._options.locale)?void 0:e.volume})}_onControlClick(){}_addEventListener(){$(this.$container,`.${R}-control-volume`,"mousedown",(()=>{this.$container.classList.contains(`${R}-disabled`)||this._toggleMute()}))}constructor(e){super(ke({},e,{tagName:"span",classNameSuffix:"volume",controlType:"button"})),this._muted=!1,this._volume=0,this._lastVolume=0,this._progress=null,this._options=Object.assign({},Te,e),this._render(),this._volume=this._options.volume>=1?1:this._options.volume<=0?0:+this._options.volume.toFixed(2),this._lastVolume=this._volume,this._muted=!!this._options.muted||!1,we.isMobile||(this.picker=new b({container:this.$container,getPopupContainer:()=>this.$container,trigger:this._options.trigger,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{null==this._options.onOpenChange||this._options.onOpenChange.call(this._options,e,this._muted?this._lastVolume:this.volume,this._muted),this.emit(B.control.volumePanelOpenChange,e,this._lastVolume,this._muted)}}),this._progress=new $e({container:this.picker.$body,defaultValue:this._options.muted?0:this._options.volume,range:[0,1],step:.1,showPercent:!0,className:`${R}-volume-progress`,onProgressClick:()=>{this.muted=!1},onChange:e=>{e!==this._volume&&(this.volume=e)}})),this._updateUI(),this._addEventListener(),this.on(B.audioCodecUnsupported,(()=>{this.disabled=!0})),this.on(B.volumechange,((e,t)=>{this._muted!==t&&(this.muted=t),this._lastVolume!==e&&(this.volume=e)}))}},deviceID:class extends j{_render(){this.$container.innerHTML=`<span class="${R}-text ${R}-text-device-id">DeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceID</span>`}constructor(e){super(lt({},e,{tagName:"span",controlType:"text",classNameSuffix:"device-id"})),this._render()}},deviceName:class extends j{_render(){this.$container.innerHTML=`<span class="${R}-text ${R}-text-device-name">DeviceNameDeviceNameDeviceNameDeviceNameDeviceNameDeviceName</span>`}constructor(e){super(ct({},e,{tagName:"span",controlType:"text",classNameSuffix:"device-name"})),this._render()}},capturePicture:class extends j{_render(){var e;this.$container.innerHTML=oe({title:null==(e=this._options.locale)?void 0:e.capturePicture})}_onControlClick(e){this.emit(B.control.capturePicture,this._options.type||"download",this._options.quality||.9),super._onControlClick(e)}constructor(e){super(Ze({},e,{tagName:"span",classNameSuffix:"capture-picture"})),this._options=e,this._render()}},ptz:class extends j{_render(){this.$container.innerHTML=ie()}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(Xe({},e,{tagName:"span",controlType:"button",classNameSuffix:"ptz"})),this._options=e,this._render()}},record:class extends j{_render(){this.$container.innerHTML=se()}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(Je({},e,{tagName:"span",controlType:"button",classNameSuffix:"record"})),this._options=e,this._render()}},talk:class extends j{_render(){this.$container.innerHTML=Ae()}onClick(){}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(et({},e,{tagName:"span",controlType:"button",classNameSuffix:"talk"})),this._options=e,this._render()}},zoom:class extends j{_render(){}destroy(){var e;this._options.rootContainer&&this._$zoomPanel&&(null==(e=this._options.rootContainer)||e.removeChild(this._$zoomPanel),this._$zoomPanel=null);super.destroy()}_onControlClick(e){}constructor(e){super(tt({},e,{tagName:"span",controlType:"button",classNameSuffix:"zoom"})),this._options=Object.assign({},nt,e||{}),this._render()}},definition:class extends ot{constructor(e){super(it({},e,{value:e.definition||1,controlType:"button",list:[{label:"4k",value:4},{label:"极清极清极清极清极清极清极清",value:2},{label:"1080p",value:1},{label:"标清标清标清标清标清标清标清标清",value:.5}],classNameSuffix:"definition",onChange:(t,n)=>{var r;null==e||null==(r=e.onChange)||r.call(e,t,n),this.emit(B.control.changeDefinition,t,n)},onOpenChange:(t,n,r)=>{var o;null==e||null==(o=e.onOpenChange)||o.call(e,t,n,r),this.emit(B.control.definitionPanelOpenChange,t,n,r)}}))}},fullscreen:De,globalFullscreen:class extends De{_render(){var e,t;this.$container.innerHTML=ne({title:null==(e=this.options.locale)?void 0:e.exitGlobalFullscreen})+re({title:null==(t=this.options.locale)?void 0:t.globalFullscreen})}_onControlClick(){var e,t;this.isCurrentFullscreen&&this._$rootContainer.classList.contains(`${R}-global-fullscreen`)?(this._$rootContainer.classList.remove(`${R}-global-fullscreen`),null==(e=this._fullscreenUtil)||e.exitFullscreen()):(this._$rootContainer.classList.add(`${R}-global-fullscreen`),null==(t=this._fullscreenUtil)||t.fullscreen())}constructor(e){super(qe({},e,{controlType:"button",classNameSuffix:"global-fullscreen"}))}},rec:class extends j{_render(){var e,t,n;this.$container.innerHTML=ce({title:null==(e=this._options.locale)?void 0:e.sdkRec,"data-type":"sdk"})+ue({title:null==(t=this._options.locale)?void 0:t.cloudRec,"data-type":"cloudRec"})+de({title:null==(n=this._options.locale)?void 0:n.cloudRecord,"data-type":"cloudRecord"})}_activeIcon(e){switch(this.$container.querySelectorAll(`.${R}-icon`).forEach((e=>{e.classList.remove(`${R}-active`)})),e){case"sdk":var t;null==(t=this.$container.querySelector(`.${R}-icon-sdk`))||t.classList.add(`${R}-active`);break;case"cloudRec":var n;null==(n=this.$container.querySelector(`.${R}-icon-cloud-rec`))||n.classList.add(`${R}-active`);break;case"cloudRecord":var r;null==(r=this.$container.querySelector(`.${R}-icon-cloud-record`))||r.classList.add(`${R}-active`)}}_onClickIcon(){this._delegation=$(this.$container,`.${R}-icon`,"click",(e=>{const t=e.delegateTarget;if(!t.classList.contains(`${R}-disabled`)){const e=t.getAttribute("data-type");this.recType!==e&&(this.recType=e,this._activeIcon(e),this.emit(B.control.changeRecType,e),null==this._options.onChange||this._options.onChange.call(this._options,e))}}))}destroy(){var e;null==(e=this._delegation)||e.destroy(),this._delegation=null,super.destroy()}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(xe({},e,{tagName:"div",controlType:"block",classNameSuffix:"rec"})),this._options=e,this.recType=e.recType||"sdk",this._render(),this._onClickIcon(),this._activeIcon(e.recType)}},speed:class extends ot{constructor(e){super(st({},e,{value:e.speed||1,list:[{label:"4x4x",value:4},{label:"2x",value:2},{label:"1x1x",value:1},{label:"0.5x",value:.5}],classNameSuffix:"speed",controlType:"button",onChange:(t,n)=>{var r;null==e||null==(r=e.onChange)||r.call(e,t,n),this.emit(B.control.changeSpeed,t,n)},onOpenChange:(t,n,r)=>{var o;null==e||null==(o=e.onOpenChange)||o.call(e,t,n,r),this.emit(B.control.speedPanelOpenChange,t,n,r)}}))}},date:class extends j{_render(){this.$container.innerHTML="date"}_onControlClick(e){super._onControlClick(e)}constructor(e){super(At({},e,{tagName:"span",controlType:"button",classNameSuffix:"date"})),this._options=e,this._render()}},timeLine:class extends j{_render(){this.$container.innerHTML=`<span class="${R}-full-block ${R}-block-time-line">Line</span>`}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(at({},e,{tagName:"div",controlType:"block",classNameSuffix:"time-line"})),this._options=e,this._render()}},playBack:class extends j{_render(){this.$container.innerHTML=`<span class="${R}-icon ${R}-icon-play-back">\n ${G.playBack}\n <span class="${R}-play-forward-back">${this._options.time||10}</span>\n </span>`}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(ut({},e,{tagName:"span",controlType:"button",classNameSuffix:"play-back"})),this._options=e,this._render()}},playForward:class extends j{_render(){this.$container.innerHTML=`<span class="${R}-icon ${R}-icon-play-forward">\n ${G.playForward}\n <span class="${R}-play-forward-time">${this._options.time||10}</span>\n </span>`}_onControlClick(e){null==this._options.onClick||this._options.onClick.call(this._options,e)}constructor(e){super(dt({},e,{tagName:"span",controlType:"button",classNameSuffix:"play-forward"})),this._options=e,this._render()}}};function pt(e,t,n,r,o,i,s){try{var A=e[i](s),a=A.value}catch(e){return void n(e)}A.done?t(a):Promise.resolve(a).then(r,o)}function ft(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){pt(i,r,o,s,A,"next",e)}function A(e){pt(i,r,o,s,A,"throw",e)}s(void 0)}))}}function mt(){return mt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}const gt={language:"zh",mobileExtendConfig:{controls:["ptz","talk","record","rec"]}},vt=["width","height","playing","volume","muted","loading","recType","isCurrentFullscreen","orientationAngle","zoom","recording"];class yt extends g{get width(){return this._width}get height(){return this._height}get playing(){return this._playing}set playing(e){var t,n;this._playing!==e&&(this._playing=e,e||(this.loading=!1),this.emit(B.play,e),(null==(t=this.controls)?void 0:t.playControl)&&this.controls.playControl.playing!==e&&(null==(n=this.controls)||n.playControl.emit(B.play,e)))}get loading(){return this._loading}set loading(e){var t,n;(this._loading=e,e)?null==(t=this._loadingControl)||t.show():null==(n=this._loadingControl)||n.hide();this._loading!==e&&this.emit(B.loading,e)}get volume(){return this._volume}set volume(e){var t,n,r;e>=0&&e<=1&&(this._volume!==e&&(this._volume=e,this.emit(B.volumechange,e,this._muted),(null==(t=this.controls)?void 0:t.volumeControl)&&(null==(r=this.controls)||null==(n=r.volumeControl)?void 0:n.volume)!==e&&this.controls.volumeControl.emit(B.volumechange,e,this._muted)))}get muted(){return this._muted}set muted(e){var t,n,r;this._muted!==e&&(this._muted=e,this.emit(B.volumechange,this._volume,this._muted),(null==(t=this.controls)?void 0:t.volumeControl)&&(null==(r=this.controls)||null==(n=r.volumeControl)?void 0:n.muted)!==e&&this.controls.volumeControl.emit(B.volumechange,this._volume,e))}get zoom(){return this._zoom}set zoom(e){this._zoom=e}get recording(){return this._recording}get isCurrentFullscreen(){return this._isCurrentFullscreen}get recType(){return this._recType}get orientationAngle(){return this._orientationAngle}resize(e,t){let n="";n+="number"==typeof e?`width: ${e}px;`:`width: ${e};`,n+="number"==typeof t?`height: ${t}px;`:`height: ${t};`,this.$container&&(this.$container.style.cssText+=n)}fullscreen(){return ft((function*(){var e;return yield null==(e=this._fullscreen)?void 0:e.fullscreen()})).call(this)}exitFullscreen(){return ft((function*(){var e;return yield null==(e=this._fullscreen)?void 0:e.exitFullscreen()})).call(this)}changeTheme(e){this._changeThemeFlag=!0,null==this.emit||this.emit.call(this,B.changeTheme,e),this._renderTheme(e)}setPoster(e){var t;null==(t=this.posterControl)||t.setPoster(e)}destroy(){var e,t,n,r,o;this.$container&&(this.emit(B.theme.beforeDestroy),this._removeEventListener(),this._unmountedControls(),null==(e=this._loadingControl)||e.destroy(),this._loadingControl=null,null==(t=this.messageControl)||t.destroy(),this.messageControl=null,null==(n=this.posterControl)||n.destroy(),this.posterControl=null,null==(r=this.contentControl)||r.destroy(),this.contentControl=null,Array.from((null==(o=this.$container)?void 0:o.classList)||[]).forEach((e=>{new RegExp(`^${R}-`,"ig").test(e)&&this.$container.classList.remove(e)})),this.emit(B.theme.destroyed),this._onPauseTimingFunc&&(this._onPauseTimingFunc=null),this.removeAllListeners(),this.i18n=null)}_initOptions(e){if(this.options=Object.assign({},gt,e),"function"==typeof this.options.container?this.$container=this.options.container():this.$container=this.options.container,!this.$container)throw new Error("container option is required!");const t=["zh","en"].includes(this.options.language)?this.options.language:"zh";this.i18n=new x({zh:Re,en:Ne},{defaultLocale:t})}_initClassName(){var e,t;this.$container.classList.add(R,we.isMobile?R+"-mobile":R+"-pc"),["ezopen","flv","hls","mp4"].includes(this.options.type)&&this.$container.classList.add(`${R}-${this.options.type}`),"string"==typeof this.options.className&&this.$container.classList.add(this.options.className),this.resize(null==(e=this.options)?void 0:e.width,null==(t=this.options)?void 0:t.height)}_unmountedControls(){if(!this.controls)return;const e=Object.keys(this.controls).length>0||this._$header||this._$footer;if(this._interactiveResult&&(null==this._interactiveResult.cleanup||this._interactiveResult.cleanup.call(this._interactiveResult),this._interactiveResult=null),e&&this.emit(B.control.beforeUnmountControls),Object.keys(this.controls).length>0){for(const e in this.controls){var t,n;null==(t=(n=this.controls[e]).destroy)||t.call(n)}this.controls=null}this._$header&&(this._$header.destroy(),this._$header=null),this._$footer&&(this._$footer.destroy(),this._$footer=null),e&&this.emit(B.control.unmountedControls)}_renderTheme(e){return ft((function*(){var t,n,r;if(this._unmountedControls(),"[object Object]"!==Object.prototype.toString.call(e))return;this.controls={},this.emit(B.control.beforeMountControls);const o=function(e){var t,n;const r={};var o;r.autoFocus=null!=(o=null==e?void 0:e.autoFocus)?o:3,r.poster=(null==e?void 0:e.poster)||"";const i=[],s=[],A=((null==e||null==(t=e.header)?void 0:t.btnList)||[]).filter((e=>1===e.isrender&&["deviceID","deviceName"].includes(e.iconId)?(i.push(e),!1):1===e.isrender&&U.includes(e.iconId)?(s.push(s[0]?Ue({},e,{part:s[0].part}):e),!1):1===e.isrender)).map((e=>(Be[e.iconId]&&(e.iconId=Be[e.iconId]),e))),a=((null==e||null==(n=e.footer)?void 0:n.btnList)||[]).filter((e=>1===e.isrender&&["deviceID","deviceName"].includes(e.iconId)?(i.push(e),!1):1===e.isrender&&U.includes(e.iconId)?(s.push(s[0]?Ue({},e,{part:s[0].part}):e),!1):1===e.isrender)).map((e=>(Be[e.iconId]&&(e.iconId=Be[e.iconId]),e)));var l,c,u,d,h,p;return A.length>0||i.length>0||s.length>0?(r.header={},r.header.color=null==e||null==(l=e.header)?void 0:l.color,r.header.backgroundColor=null==e||null==(c=e.header)?void 0:c.backgroundColor,r.header.activeColor=null==e||null==(u=e.header)?void 0:u.activeColor,r.header.btnList=[...i||[],...s||[],...A||[]]):r.header=void 0,a.length>0?(r.footer={},r.footer.color=null==e||null==(d=e.footer)?void 0:d.color,r.footer.backgroundColor=null==e||null==(h=e.footer)?void 0:h.backgroundColor,r.footer.activeColor=null==e||null==(p=e.footer)?void 0:p.activeColor,r.footer.btnList=a):r.footer=void 0,r}(e);if(o.poster&&this.setPoster(o.poster),null==(t=this.posterControl)||t.show(),o.header){this._$header=new Ke({getPopupContainer:()=>this.$container,color:o.header.color,activeColor:o.header.activeColor,backgroundColor:o.header.backgroundColor});const[e,t]=je(o.header.btnList||[]);this._renderControls(this._$header.$left,e),this._renderControls(this._$header.$right,t)}if(o.footer){this._$footer=new Ye({getPopupContainer:()=>this.$container,color:o.footer.color,activeColor:o.footer.activeColor,backgroundColor:o.footer.backgroundColor});const[e,t]=je(o.footer.btnList||[]);this._renderControls(this._$footer.$left,e),this._renderControls(this._$footer.$right,t)}var i,s,A,a,l,c,u;(this._$header||this._$footer)&&0!==(null==o?void 0:o.autoFocus)&&(this._interactiveResult=function(e,t=3e3,n){let r=null,o=!1;const i=e.querySelector(`.${R}-header`),s=e.querySelector(`.${R}-footer`);let A=()=>{r&&(clearTimeout(r),r=null)},a=()=>{null==A||A(),null==i||i.classList.remove(`${R}-hide-transition`),null==s||s.classList.remove(`${R}-hide-transition`),o||n(!0),o=!0},l=()=>{null==A||A(),e.classList.contains(`${R}-player-pause`)||(null==i||i.classList.add(`${R}-hide-transition`),null==s||s.classList.add(`${R}-hide-transition`),o&&n(!1),o=!1)},c=()=>{null==a||a(),r=setTimeout((()=>{null==A||A(),null==l||l()}),t)},u=e=>{var t;null==e||null==(t=e.stopPropagation)||t.call(e),null==A||A()},d=()=>{o?null==l||l():null==c||c()},h=e=>{var t;null==e||null==(t=e.stopPropagation)||t.call(e),null==c||c()};if(c(),we.isMobile&&d){const t=window.PointerEvent?"pointerdown":"touchstart";e.addEventListener(t,d),s&&s.addEventListener(t,h),i&&i.addEventListener(t,h)}else{const t=window.PointerEvent?"pointerdown":"click";var p,f,m,g;e.addEventListener(t,c),e.addEventListener("mousemove",c),e.addEventListener("mouseleave",l),s&&(null==s||null==(p=s.addEventListener)||p.call(s,t,u),null==s||null==(f=s.addEventListener)||f.call(s,"mousemove",u)),i&&(null==i||null==(m=i.addEventListener)||m.call(i,t,u),null==i||null==(g=i.addEventListener)||g.call(i,"mousemove",u))}return{cleanup:()=>{if(e){if(we.isMobile&&d){const t=window.PointerEvent?"pointerdown":"touchstart";e.removeEventListener(t,d),s&&c&&s.removeEventListener(t,h),i&&c&&i.removeEventListener(t,h)}if(c){const a=window.PointerEvent?"pointerdown":"click";var t,n,r,o;e.removeEventListener(a,c),e.removeEventListener("mousemove",c),e.removeEventListener("mouseleave",l),s&&A&&(null==s||null==(t=s.removeEventListener)||t.call(s,a,u),null==s||null==(n=s.removeEventListener)||n.call(s,"mousemove",u)),i&&A&&(null==i||null==(r=i.removeEventListener)||r.call(i,a,u),null==i||null==(o=i.removeEventListener)||o.call(i,"mousemove",u))}l&&e.removeEventListener("mouseleave",l),d=null,c=null,l=null,a=null,h=null,u=null,null==A||A(),A=null}},clearTimeout:A,setTimeoutShow:c,hide:l}}(this.$container,1e3*((null==e?void 0:e.autoFocus)||3),(e=>{this.emit(B.control.controlsBarOpenChange,e)})),this._onPauseTimingFunc&&(this.removeListener(N,this._onPauseTimingFunc),this._onPauseTimingFunc=null),this._onPauseTimingFunc=e=>{var t,n,r,o;e?null==(n=this._interactiveResult)||null==(t=n.clearTimeout)||t.call(n):null==(o=this._interactiveResult)||null==(r=o.setTimeoutShow)||r.call(o)},this.on(N,this._onPauseTimingFunc)),(null==(s=(i=this).controls)?void 0:s.volumeControl)&&(i.controls.volumeControl.on(B.control.volumechange,((e,t)=>{i.muted!==t&&(i.muted=t),i.volume!==e&&(i.volume=e),i.emit(B.control.volumechange,e,t)})),i.controls.volumeControl.on(B.control.volumePanelOpenChange,((e,t,n)=>{i.emit(B.control.volumePanelOpenChange,e,t,n)}))),(null==(A=i.controls)?void 0:A.playControl)&&i.controls.playControl.on(B.control.play,(e=>{i.playing!==e&&(i.playing=e,i.emit(B.control.play,e))})),(null==(a=i.controls)?void 0:a.recControl)&&i.controls.recControl.on(B.control.changeRecType,(e=>{i.recType!==e&&(i.emit(B.control.changeRecType,e),i.emit(B.changeRecType,e))})),(null==(l=i.controls)?void 0:l.definitionControl)&&i.controls.definitionControl.on(B.control.definitionPanelOpenChange,((e,t,n)=>{we.isMobile&&i.emit(N,e,t)})),(null==(c=i.controls)?void 0:c.speedControl)&&i.controls.speedControl.on(B.control.speedPanelOpenChange,((e,t,n)=>{we.isMobile&&i.emit(N,e,t)})),(null==(u=i.controls)?void 0:u.capturePictureControl)&&i.controls.capturePictureControl.on(B.control.capturePicture,((e,t)=>{i.emit(B.control.capturePicture,e)})),this.emit(B.control.mountedControls),(null==(n=this.controls)?void 0:n.volumeControl)&&!this._changeThemeFlag&&(this.controls.volumeControl.disabled=!0),(null==(r=this.controls)?void 0:r.globalFullscreenControl)&&!this.playing&&(this.controls.globalFullscreenControl.disabled=!0)})).call(this)}_renderControls(e,t){return ft((function*(){if(e){const A=this._changeThemeFlag,a=vt.reduce(((e,t)=>(e[t]=this[t],e)),{});for(const l of t){var n,r,o,i,s;if(U.includes(l.iconId))(null==(n=this.controls)?void 0:n.recControl)||(this.controls.recControl=new ht.rec(mt({rootContainer:this.$container,getPopupContainer:()=>e,recType:this._recType,locale:(null==(r=this.i18n)?void 0:r.getCurrentTranslation())||{}},(null==(o=this.options)?void 0:o.recOptions)||{},A?a:{})));else if(ht[l.iconId])this.controls[`${l.iconId}Control`]=new ht[l.iconId](mt({rootContainer:this.$container,getPopupContainer:()=>e,locale:(null==(i=this.i18n)?void 0:i.getCurrentTranslation())||{}},(null==(s=this.options)?void 0:s[`${l.iconId}Options`])||{},A?a:{}))}}})).call(this)}_mobileInnerWidthHeight(){if(we.isMobile){var e,t,n,r;const o=Math.floor(window.innerHeight),i=Math.floor(window.innerWidth);null==(t=this.$container)||null==(e=t.style)||e.setProperty(`--${R}-mobile-inner-height`,`${o}px`),null==(r=this.$container)||null==(n=r.style)||n.setProperty(`--${R}-mobile-inner-width`,`${i}px`)}}_addEventListener(){this._fullscreen=new Oe(this.$container,{prefix:R,onChange:e=>{e.isCurrentFullscreen?this.emit(B.fullscreen):this._isCurrentFullscreen&&this.emit(B.exitFullscreen),this._isCurrentFullscreen=e.isCurrentFullscreen,this.emit(B.fullscreenChange,e)}});const e=e=>{if(this.$container){var t;switch(null==(t=this.$container.classList)||t.remove(`${R}-angle-0`,`${R}-angle-90`,`${R}-angle-180`,`${R}-angle-270`),e.angle){case 0:this.$container.classList.add(`${R}-angle-0`);break;case 90:this.$container.classList.add(`${R}-angle-90`);break;case 180:this.$container.classList.add(`${R}-angle-180`);break;case 270:this.$container.classList.add(`${R}-angle-270`)}this.orientationAngle!==e.angle&&this.emit(B.orientationChange,e.angle),this._orientationAngle=e.angle,this._mobileInnerWidthHeight()}},[t,n]=we.orientationEventListener(e);this._cleanupOrientation=n,e(t),this._mobileInnerWidthHeight(),window.addEventListener("resize",ye(this._mobileInnerWidthHeight,20)),this._cleanUpResizeObserver=we.resizeObserver(this.$container,ye((()=>{const e=Math.floor(this.$container.clientWidth),t=Math.floor(this.$container.clientHeight);if(this.width!==e||this.height!==t){if(this.emit(yt.EVENTS.resize,{width:e,height:t}),this._width=e,this._height=t,this._$header){var n,r,o,i;e-30<=((null==(r=this._$header)||null==(n=r.$left)?void 0:n.clientWidth)||0)+((null==(i=this._$header)||null==(o=i.$right)?void 0:o.clientWidth)||0)?this.emit(yt.EVENTS.control.headerMoreShow,!0):this.emit(yt.EVENTS.control.headerMoreShow,!1)}if(this._$footer){var s,A;e-16<=((null==(s=this._$footer.$left)?void 0:s.clientWidth)||0)+((null==(A=this._$footer.$right)?void 0:A.clientWidth)||0)?this.emit(yt.EVENTS.control.footerMoreShow,!0):this.emit(yt.EVENTS.control.footerMoreShow,!1)}}}),20))}_removeEventListener(){var e,t,n,r;this._isCurrentFullscreen&&(null==(r=this._fullscreen)||r.exitFullscreen());null==(e=this._fullscreen)||e.destroy(),this._fullscreen=null,null==this._cleanupOrientation||this._cleanupOrientation.call(this),this._cleanupOrientation=null,null==(n=this._cleanUpResizeObserver)||null==(t=n.unobserve)||t.call(n),this._cleanUpResizeObserver=null,window.removeEventListener("resize",this._mobileInnerWidthHeight)}_reset(){this._zoom=1}constructor(e){var t,n,r,o,i,s;(super(),this.options=gt,this.controls={},this._$header=null,this._$footer=null,this._interactiveResult=null,this._fullscreen=null,this._cleanupOrientation=null,this._cleanUpResizeObserver=null,this._width=0,this._height=0,this._isCurrentFullscreen=!1,this._orientationAngle=0,this._playing=!1,this._loading=!1,this._volume=0,this._muted=!1,this._zoom=1,this._recording=!1,this._changeThemeFlag=!1,this._onPauseTimingFunc=null,this._recType="sdk",null==e.onInitializing||e.onInitializing.call(e,this),this._initOptions(e),this._initClassName(),this.contentControl=new Ve({getPopupContainer:()=>this.$container}),null!==this.options.loadingOptions)&&(this._loadingControl=new H(mt({locale:(null==(r=this.i18n)?void 0:r.getCurrentTranslation())||{}},this.options.loadingOptions||{},{getPopupContainer:()=>this.$container})));null!==this.options.messageOptions&&(this.messageControl=new ge(mt({locale:(null==(o=this.i18n)?void 0:o.getCurrentTranslation())||{}},this.options.messageOptions||{},{getPopupContainer:()=>this.$container})));if(null!==this.options.posterOptions&&(this.posterControl=new V(mt({},this.options.posterOptions||{},{getPopupContainer:()=>this.contentControl.$container}))),this._volume=(null==(t=this.options.volumeOptions)?void 0:t.volume)||0,this._muted=(null==(n=this.options.volumeOptions)?void 0:n.muted)||!1,this._mobileInnerWidthHeight=this._mobileInnerWidthHeight.bind(this),["flv","hls","mp4"].includes(e.type))this._renderTheme([null].includes(null==(i=this.options)?void 0:i.themeData)?null:Qe);else if("ezopen"===e.type){var A;this._renderTheme([null].includes(null==(A=this.options)?void 0:A.themeData)?null:ze.pcLive)}this._addEventListener(),null==(s=this)||s.on(B.audioCodecUnsupported,(()=>{var e;(null==(e=s.controls)?void 0:e.volumeControl)&&s.controls.volumeControl.emit(B.audioCodecUnsupported)})),null==s||s.on(B.message,((e,t,n)=>{var r;if(["fetchError","error"].includes(t))null==(r=s.messageControl)||r.error(e,n);else if("warn"===t){var o;null==(o=s.messageControl)||o.warn(e,n)}else if("info"===t){var i;null==(i=s.messageControl)||i.info(e,n)}})),null==s||s.on(B.audioInfo,(e=>{var t;(null==s||null==(t=s.controls)?void 0:t.volumeControl)&&(e.audioFormatName||e.encType)&&(s.controls.volumeControl.disabled=!1)})),null==s||s.on(B.play,(e=>{var t,n;e&&(null==(n=s.messageControl)||n.hide()),(null==s||null==(t=s.controls)?void 0:t.globalFullscreenControl)&&(s.controls.globalFullscreenControl.disabled=!e)}))}}yt.TEMPLATES=ze,yt.EVENTS=B,yt.LOCALES={zh:Re,en:Ne},yt.THEME_VERSION="0.0.1-alpha.18";var Ct={videoBuffer:.2,videoBufferDelay:1e3,debug:!1,openWebglAlignment:!1},_t="initVideo",bt="render",wt="playAudio",Et="initAudio",$t="audioCode",kt="videoCode",Tt=1,Lt=2,Ft="init",St="decode",Pt="audioDecode",Mt="videoDecode",Ot="close",It="updateConfig",Dt=D({fullscreenChange:"fullscreenChange",orientationChange:"orientationChange",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",loaded:"loaded",videoInfo:"videoInfo",timeUpdate:"timeUpdate",timeUpdateOSD:"timeUpdateOSD",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",heartTimeout:"heartTimeout",heartRetryTimes:"heartRetryTimes",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",loadingRetryTimes:"loadingRetryTimes",stats:"stats",performance:"performance",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",audioCodecUnsupported:"audioCodecUnsupported",unrecoverableEarlyEof:"unrecoverableEarlyEof",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",localVideoRecords:"localVideoRecords",getDefinitionListResult:"getDefinitionListResult",definitionChange:"definitionChange",definitionListChange:"definitionListChange",playbackRateListChange:"playbackRateListChange",playbackRateChange:"playbackRateChange",decoderLoaded:"decoderLoaded",end:"end"},yt.EVENTS,{clone:!1});Dt.load,Dt.timeUpdate,Dt.videoInfo,Dt.audioInfo,Dt.error,Dt.kBps,Dt.log,Dt.start,Dt.delayTimeout,Dt.play,Dt.pause,Dt.mute,Dt.stats,Dt.volumechange,Dt.performance,Dt.playToRenderTimes,Dt.mseSourceBufferFull,Dt.mseSourceBufferError;var xt="key",Rt="delta";(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})(),Date.now||(Date.now=function(){return(new Date).getTime()}),p.postRun=function(){let e=[],t=[],n={};"VideoEncoder"in self&&(n={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){n.isEmitInfo||(r.opt.debug,postMessage({cmd:_t,w:e.codedWidth,h:e.codedHeight}),n.isEmitInfo=!0,n.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),n.offscreenCanvasCtx=n.offscreenCanvas.getContext("2d")),n.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);const t=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:bt,buffer:t,delay:r.delay,ts:0},[t]),setTimeout((function(){e.close?e.close():e.destroy()}),100)},error:function(e){}}),decode:function(e,t){const o=e[0]>>4==1;if(n.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:o?xt:Rt});n.decoder.decode(r)}else if(o&&0===e[1]){const t=15&e[0];r.setVideoCodec(t);const o=function(e){const t=e.subarray(1,4);let n="avc1.";for(let e=0;e<3;e++){let r=t[e].toString(16);r.length<2&&(r="0"+r),n+=r}return{codec:n,description:e}}(e.slice(5));n.decoder.configure(o),n.hasInit=!0}},reset(){n.hasInit=!1,n.isEmitInfo=!1,n.offscreenCanvas=null,n.offscreenCanvasCtx=null}});const r={opt:{debug:Ct.debug,useOffscreen:Ct.useOffscreen,useWCS:Ct.useWCS,videoBuffer:Ct.videoBuffer,openWebglAlignment:Ct.openWebglAlignment,videoBufferDelay:Ct.videoBufferDelay},useOffscreen:function(){return r.opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},initAudioPlanar:function(e,n){postMessage({cmd:Et,sampleRate:n,channels:e});const r=[];let o=0;this.playAudioPlanar=function(n,i,s){let A=i;const a=[];let l=0;for(let e=0;e<2;e++){const t=p.HEAPU32[(n>>2)+e]>>2;a[e]=p.HEAPF32.subarray(t,t+A)}if(o){if(!(A>=(i=1024-o)))return o+=A,t[0]=Float32Array.of(...t[0],...a[0]),void(2===e&&(t[1]=Float32Array.of(...t[1],...a[1])));r[0]=Float32Array.of(...t[0],...a[0].subarray(0,i)),2===e&&(r[1]=Float32Array.of(...t[1],...a[1].subarray(0,i))),postMessage({cmd:wt,buffer:r,ts:s},r.map((e=>e.buffer))),l=i,A-=i}for(o=A;o>=1024;o-=1024)r[0]=a[0].slice(l,l+=1024),2===e&&(r[1]=a[1].slice(l-1024,l)),postMessage({cmd:wt,buffer:r,ts:s},r.map((e=>e.buffer)));o&&(t[0]=a[0].slice(l),2===e&&(t[1]=a[1].slice(l)))}},setVideoCodec:function(e){postMessage({cmd:kt,code:e})},setAudioCodec:function(e){postMessage({cmd:$t,code:e})},setVideoSize:function(e,t){postMessage({cmd:_t,w:e,h:t});const n=e*t,o=n>>2;r.useOffscreen()?(this.offscreenCanvas=new OffscreenCanvas(e,t),this.offscreenCanvasGL=this.offscreenCanvas.getContext("webgl"),this.webglObj=((e,t)=>{var n=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),r=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);var o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS);var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS);var s=e.createProgram();e.attachShader(s,o),e.attachShader(s,i),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS),e.useProgram(s);var A=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,A),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var a=e.getAttribLocation(s,"vertexPos");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);var l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(s,"texturePos");function u(t,n){var r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(s,t),n),r}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var d=u("ySampler",0),h=u("uSampler",1),p=u("vSampler",2);return{render:function(t,n,r,o,i){e.viewport(0,0,t,n),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t,n,0,e.LUMINANCE,e.UNSIGNED_BYTE,r),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,p),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,i),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(s),e.deleteBuffer(A),e.deleteBuffer(l),e.deleteTexture(d),e.deleteTexture(h),e.deleteTexture(p)}catch(e){}}}})(this.offscreenCanvasGL,r.opt.openWebglAlignment),this.draw=function(r,i,s,A){const a=p.HEAPU8.subarray(i,i+n),l=p.HEAPU8.subarray(s,s+o),c=p.HEAPU8.subarray(A,A+o);this.webglObj.render(e,t,a,l,c);const u=this.offscreenCanvas.transferToImageBitmap();postMessage({cmd:bt,buffer:u,delay:this.delay,ts:r},[u])}):this.draw=function(e,t,r,i,s,A){const a=[Uint8Array.from(p.HEAPU8.subarray(t,t+n)),Uint8Array.from(p.HEAPU8.subarray(r,r+o)),Uint8Array.from(p.HEAPU8.subarray(i,i+o))];postMessage({cmd:bt,output:a,delay:this.delay,ts:e,w:s,h:A},a.map((e=>e.buffer)))}},getDelay:function(e){if(!e)return-1;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,n=e-this.firstTimestamp;this.delay=t>=n?t-n:n-t}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay},resetDelay:function(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1},init:function(){r.opt.debug;const t=e=>{r.opt.useWCS&&r.useOffscreen()&&e.type===Lt&&n.decode?n.decode(e.payload,e.ts):e.decoder.decode(e.payload,e.ts)};this.stopId=setInterval((()=>{if(e.length)if(this.dropping){let n=e.shift();for(n&&n.type===Tt&&0===n.payload[1]&&t(n);!n.isIFrame&&e.length;)n=e.shift(),n.type===Tt&&0===n.payload[1]&&t(n);n.isIFrame&&(this.dropping=!1,t(n))}else{let n=e[0];if(-1===this.getDelay(n.ts))e.shift(),t(n);else if(this.delay>r.opt.videoBuffer+r.opt.videoBufferDelay)this.resetDelay(),this.dropping=!0;else for(;e.length&&(n=e[0],this.getDelay(n.ts)>r.opt.videoBuffer);)e.shift(),t(n)}}),10)},close:function(){var s,A,a,l;r.opt.debug,clearInterval(this.stopId),this.stopId=null,null==o||null===(s=o.clear)||void 0===s||s.call(o),null==i||null===(A=i.clear)||void 0===A||A.call(i),null===(a=n)||void 0===a||null===(l=a.reset)||void 0===l||l.call(a),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1,this.webglObj&&(this.webglObj.destroy(),this.offscreenCanvas=null,this.offscreenCanvasGL=null,this.offscreenCanvasCtx=null),e=[],t=[],delete this.playAudioPlanar,delete this.draw},pushBuffer:function(t,n){n.type===Tt?e.push({ts:n.ts,payload:t,decoder:o,type:Tt}):n.type===Lt&&e.push({ts:n.ts,payload:t,decoder:i,type:Lt,isIFrame:n.isIFrame})}},o=new p.AudioDecoder(r),i=new p.VideoDecoder(r);self.onmessage=function(e){const t=e.data;switch(t.cmd){case Ft:try{r.opt=Object.assign(r.opt,JSON.parse(t.opt))}catch(e){}o.sample_rate=t.sampleRate,r.init();break;case St:r.pushBuffer(t.buffer,t.options);break;case Pt:o.decode(t.buffer,t.ts);break;case Mt:i.decode(t.buffer,t.ts);break;case Ot:r.close();break;case It:r.opt[t.key]=t.value}}},p.onRuntimeInitialized=function(){setTimeout((()=>{postMessage({cmd:Ft})}),10)}}));
|