hzwl-easy-player
Version:
基于Vue 3的视频播放器组件,支持单屏和多屏播放模式
1 lines • 469 kB
JavaScript
!function(e){"function"==typeof define&&define.amd?define(["crypto-js"],e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-simd.wasm"==e&&"undefined"!=typeof EASYPLAYER_PRO_SIMD_WASM_URL&&""!=EASYPLAYER_PRO_SIMD_WASM_URL?EASYPLAYER_PRO_SIMD_WASM_URL:e};var s,a,o,d=Object.assign({},n),l="object"==typeof window,u="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";if(c){const{createRequire:e}=await import("module");var h=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href),p=h("fs"),m=h("path");f=u?m.dirname(f)+"/":h("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href)),s=(e,t)=>(e=N(e)?new URL(e):m.normalize(e),p.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=N(e)?new URL(e):m.normalize(e),p.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(l||u)&&(u?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var _,g,y=n.print||console.log.bind(console),v=n.printErr||console.error.bind(console);Object.assign(n,d),d=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(_=n.wasmBinary),"object"!=typeof WebAssembly&&F("no native wasm support detected");var b,w,S,E,A,U,T,x,B=!1,C=[],k=[],D=[],P=0,I=null;function F(e){n.onAbort&&n.onAbort(e),v(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var L,R,M=e=>e.startsWith("data:application/octet-stream;base64,"),N=e=>e.startsWith("file://");function z(e){if(e==L&&_)return new Uint8Array(_);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function O(e,t,r){return function(e){if(!_&&(l||u)){if("function"==typeof fetch&&!N(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>z(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>z(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{v(`failed to asynchronously prepare wasm: ${e}`),F(e)}))}n.locateFile?M(L="decoder-pro-simd.wasm")||(R=L,L=n.locateFile?n.locateFile(R,f):f+R):L=new URL("decoder-pro-simd.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).href;var $=e=>{for(;e.length>0;)e.shift()(n)};function G(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){U[this.ptr+4>>2]=e},this.get_type=function(){return U[this.ptr+4>>2]},this.set_destructor=function(e){U[this.ptr+8>>2]=e},this.get_destructor=function(){return U[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,b[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,b[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){U[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return U[this.ptr+16>>2]},this.get_exception_ptr=function(){if(bt(this.get_type()))return U[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}n.noExitRuntime;var H,V,W,j=e=>{for(var t="",r=e;w[r];)t+=H[w[r++]];return t},q={},Y={},K={},X=e=>{throw new V(e)},Z=e=>{throw new W(e)},J=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Z("Mismatched type converter count");for(var n=0;n<e.length;++n)Q(e[n],i[n])}e.forEach((function(e){K[e]=t}));var n=new Array(t.length),s=[],a=0;t.forEach(((e,t)=>{Y.hasOwnProperty(e)?n[t]=Y[e]:(s.push(e),q.hasOwnProperty(e)||(q[e]=[]),q[e].push((()=>{n[t]=Y[e],++a===s.length&&i(n)})))})),0===s.length&&i(n)};function Q(e,t){let r=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 r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||X(`type "${i}" must have a positive integer typeid pointer`),Y.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;X(`Cannot register type '${i}' twice`)}if(Y[e]=t,delete K[e],q.hasOwnProperty(e)){var n=q[e];delete q[e],n.forEach((e=>e()))}}(e,t,r)}var ee,te=e=>{X(e.$$.ptrType.registeredClass.name+" instance already deleted")},re=!1,ie=e=>{},ne=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},se=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=se(e,t,r.baseClass);return null===i?null:r.downcast(i)},ae={},oe=()=>Object.keys(fe).length,de=()=>{var e=[];for(var t in fe)fe.hasOwnProperty(t)&&e.push(fe[t]);return e},le=[],ue=()=>{for(;le.length;){var e=le.pop();e.$$.deleteScheduled=!1,e.delete()}},ce=e=>{ee=e,le.length&&ee&&ee(ue)},fe={},he=(e,t)=>(t=((e,t)=>{for(void 0===t&&X("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),fe[t]),pe=(e,t)=>(t.ptrType&&t.ptr||Z("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Z("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_e(Object.create(e,{$$:{value:t}})));function me(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=he(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pe(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pe(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=ae[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var d=se(t,this.registeredClass,s.registeredClass);return null===d?n.call(this):this.isSmartPointer?pe(s.registeredClass.instancePrototype,{ptrType:s,ptr:d,smartPtrType:this,smartPtr:e}):pe(s.registeredClass.instancePrototype,{ptrType:s,ptr:d})}var _e=e=>"undefined"==typeof FinalizationRegistry?(_e=e=>e,e):(re=new FinalizationRegistry((e=>{ne(e.$$)})),_e=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};re.register(e,r,e)}return e},ie=e=>re.unregister(e),_e(e));function ge(){}var ye=(e,t)=>Object.defineProperty(t,"name",{value:e}),ve=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||X(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}};function be(e,t,r,i,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var we=(e,t,r)=>{for(;t!==r;)t.upcast||X(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Se(e,t){if(null===t)return this.isReference&&X(`null is not a valid ${this.name}`),0;t.$$||X(`Cannot pass "${je(t)}" as a ${this.name}`),t.$$.ptr||X(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return we(t.$$.ptr,r,this.registeredClass)}function Ee(e,t){var r;if(null===t)return this.isReference&&X(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||X(`Cannot pass "${je(t)}" as a ${this.name}`),t.$$.ptr||X(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&X(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=we(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&X("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:X(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,He.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:X("Unsupporting sharing policy")}return r}function Ae(e,t){if(null===t)return this.isReference&&X(`null is not a valid ${this.name}`),0;t.$$||X(`Cannot pass "${je(t)}" as a ${this.name}`),t.$$.ptr||X(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&X(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return we(t.$$.ptr,r,this.registeredClass)}function Ue(e){return this.fromWireType(U[e>>2])}function Te(e,t,r,i,n,s,a,o,d,l,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=d,this.rawShare=l,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Ee:i?(this.toWireType=Se,this.destructorFunction=null):(this.toWireType=Ae,this.destructorFunction=null)}var xe,Be,Ce=[],ke=e=>{var t=Ce[e];return t||(e>=Ce.length&&(Ce.length=e+1),Ce[e]=t=xe.get(e)),t},De=(e,t,r)=>e.includes("j")?((e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)})(e,t,r):ke(t).apply(null,r),Pe=(e,t)=>{var r,i,n,s=(e=j(e)).includes("j")?(r=e,i=t,n=[],function(){return n.length=0,Object.assign(n,arguments),De(r,i,n)}):ke(t);return"function"!=typeof s&&X(`unknown function pointer with signature ${e}: ${t}`),s},Ie=e=>{var t=vt(e),r=j(t);return gt(t),r},Fe=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Y[t]||(K[t]?K[t].forEach(e):(r.push(t),i[t]=!0))})),new Be(`${e}: `+r.map(Ie).join([", "]))},Le=(e,t)=>{for(var r=[],i=0;i<e;i++)r.push(U[t+4*i>>2]);return r},Re=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Me(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=ye(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Ne(e,t,r,i,n,s){var a=t.length;a<2&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,d=!1,l=1;l<t.length;++l)if(null!==t[l]&&void 0===t[l].destructorFunction){d=!0;break}var u="void"!==t[0].name,c="",f="";for(l=0;l<a-2;++l)c+=(0!==l?", ":"")+"arg"+l,f+=(0!==l?", ":"")+"arg"+l+"Wired";var h=`\n return function (${c}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;d&&(h+="var destructors = [];\n");var p=d?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],_=[X,i,n,Re,t[0],t[1]];for(o&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),l=0;l<a-2;++l)h+="var arg"+l+"Wired = argType"+l+".toWireType("+p+", arg"+l+"); // "+t[l+2].name+"\n",m.push("argType"+l),_.push(t[l+2]);if(o&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(u||s?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",d)h+="runDestructors(destructors);\n";else for(l=o?1:2;l<t.length;++l){var g=1===l?"thisWired":"arg"+(l-2)+"Wired";null!==t[l].destructorFunction&&(h+=g+"_dtor("+g+"); // "+t[l].name+"\n",m.push(g+"_dtor"),_.push(t[l].destructorFunction))}u&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h);var y=Me(Function,m).apply(null,_);return ye(e,y)}function ze(){this.allocated=[void 0],this.freelist=[]}var Oe=new ze,$e=e=>{e>=Oe.reserved&&0==--Oe.get(e).refcount&&Oe.free(e)},Ge=()=>{for(var e=0,t=Oe.reserved;t<Oe.allocated.length;++t)void 0!==Oe.allocated[t]&&++e;return e},He={toValue:e=>(e||X("Cannot use deleted val. handle = "+e),Oe.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Oe.allocate({refcount:1,value:e})}}};function Ve(e){return this.fromWireType(A[e>>2])}var We,je=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},qe=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ye=(e,t,r)=>{switch(t){case 1:return r?e=>b[e>>0]:e=>w[e>>0];case 2:return r?e=>S[e>>1]:e=>E[e>>1];case 4:return r?e=>A[e>>2]:e=>U[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Xe=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&Ke)return Ke.decode(e.subarray(t,n));for(var s="";t<n;){var a=e[t++];if(128&a){var o=63&e[t++];if(192!=(224&a)){var d=63&e[t++];if((a=224==(240&a)?(15&a)<<12|o<<6|d:(7&a)<<18|o<<12|d<<6|63&e[t++])<65536)s+=String.fromCharCode(a);else{var l=a-65536;s+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s},Ze=(e,t)=>e?Xe(w,e,t):"",Je="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Qe=(e,t)=>{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&E[i];)++i;if((r=i<<1)-e>32&&Je)return Je.decode(w.subarray(e,r));for(var s="",a=0;!(a>=t/2);++a){var o=S[e+2*a>>1];if(0==o)break;s+=String.fromCharCode(o)}return s},et=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s<n;++s){var a=e.charCodeAt(s);S[t>>1]=a,t+=2}return S[t>>1]=0,t-i},tt=e=>2*e.length,rt=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=A[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},it=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,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)),A[t>>2]=a,(t+=4)+4>n)break}return A[t>>2]=0,t-i},nt=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&++r,t+=4}return t},st={},at=e=>{var t=st[e];return void 0===t?j(e):t},ot=[],dt=(e,t)=>{var r=Y[e];return void 0===r&&X(t+" has unknown type "+Ie(e)),r},lt=(e,t,r)=>{var i=[],n=e.toWireType(i,r);return i.length&&(U[t>>2]=He.toHandle(i)),n};We=()=>performance.now();var ut,ct,ft,ht=[null,[],[]];(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);H=e})(),V=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},W=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(ge.prototype,{isAliasOf(e){if(!(this instanceof ge))return!1;if(!(e instanceof ge))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||te(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=_e(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||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&X("Object already scheduled for deletion"),ie(this),ne(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&X("Object already scheduled for deletion"),le.push(this),1===le.length&&ee&&ee(ue),this.$$.deleteScheduled=!0,this}}),n.getInheritedInstanceCount=oe,n.getLiveInheritedInstances=de,n.flushPendingDeletes=ue,n.setDelayFunction=ce,Object.assign(Te.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:8,readValueFromPointer:Ue,deleteObject(e){null!==e&&e.delete()},fromWireType:me}),Be=n.UnboundTypeError=(ut=Error,(ft=ye(ct="UnboundTypeError",(function(e){this.name=ct,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(ut.prototype),ft.prototype.constructor=ft,ft.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},ft),Object.assign(ze.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Oe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Oe.reserved=Oe.allocated.length,n.count_emval_handles=Ge;var pt,mt={o:(e,t,r)=>{throw new G(e).init(t,r),e},r:(e,t,r,i,n)=>{},x:(e,t,r,i)=>{Q(e,{name:t=j(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(w[e])},destructorFunction:null})},q:(e,t,r,i,s,a,o,d,l,u,c,f,h)=>{c=j(c),a=Pe(s,a),d&&(d=Pe(o,d)),u&&(u=Pe(l,u)),h=Pe(f,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})(c);((e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&X(`Cannot register public name '${e}' twice`),ve(n,e,e),n.hasOwnProperty(r)&&X(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))})(p,(function(){Fe(`Cannot construct ${c} due to unbound types`,[i])})),J([e,t,r],i?[i]:[],(function(t){var r,s;t=t[0],s=i?(r=t.registeredClass).instancePrototype:ge.prototype;var o=ye(c,(function(){if(Object.getPrototypeOf(this)!==l)throw new V("Use 'new' to construct "+c);if(void 0===f.constructor_body)throw new V(c+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new V(`Tried to invoke ctor of ${c} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(f.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(s,{constructor:{value:o}});o.prototype=l;var f=new be(c,o,l,h,r,a,d,u);f.baseClass&&(void 0===f.baseClass.__derivedClasses&&(f.baseClass.__derivedClasses=[]),f.baseClass.__derivedClasses.push(f));var m=new Te(c,f,!0,!1,!1),_=new Te(c+"*",f,!1,!1,!1),g=new Te(c+" const*",f,!1,!0,!1);return ae[e]={pointerType:_,constPointerType:g},((e,t,r)=>{n.hasOwnProperty(e)||Z("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)})(p,o),[m,_,g]}))},p:(e,t,r,i,n,s)=>{var a=Le(t,r);n=Pe(i,n),J([],[e],(function(e){var r=`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 V(`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]=()=>{Fe(`Cannot construct ${e.name} due to unbound types`,a)},J([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Ne(r,i,null,n,s),[]))),[]}))},h:(e,t,r,i,n,s,a,o,d)=>{var l=Le(r,i);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e})(t=j(t)),s=Pe(n,s),J([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Fe(`Cannot call ${i} due to unbound types`,l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,c=u[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(ve(u,t,i),u[t].overloadTable[r-2]=n),J([],l,(function(n){var o=Ne(i,n,e,s,a,d);return void 0===u[t].overloadTable?(o.argCount=r-2,u[t]=o):u[t].overloadTable[r-2]=o,[]})),[]}))},w:(e,t)=>{Q(e,{name:t=j(t),fromWireType:e=>{var t=He.toValue(e);return $e(e),t},toWireType:(e,t)=>He.toHandle(t),argPackAdvance:8,readValueFromPointer:Ve,destructorFunction:null})},k:(e,t,r)=>{Q(e,{name:t=j(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:qe(t,r),destructorFunction:null})},b:(e,t,r,i,n)=>{t=j(t);var s=e=>e;if(0===i){var a=32-8*r;s=e=>e<<a>>>a}var o=t.includes("unsigned");Q(e,{name:t,fromWireType:s,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Ye(t,r,0!==i),destructorFunction:null})},a:(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=U[e>>2],r=U[e+4>>2];return new i(b.buffer,r,t)}Q(e,{name:r=j(r),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},l:(e,t)=>{var r="std::string"===(t=j(t));Q(e,{name:t,fromWireType(e){var t,i=U[e>>2],n=e+4;if(r)for(var s=n,a=0;a<=i;++a){var o=n+a;if(a==i||0==w[o]){var d=Ze(s,o-s);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),s=o+1}}else{var l=new Array(i);for(a=0;a<i;++a)l[a]=String.fromCharCode(w[n+a]);t=l.join("")}return gt(e),t},toWireType(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||X("Cannot pass non-string to std::string"),i=r&&n?(e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t})(t):t.length;var s=yt(4+i+1),a=s+4;if(U[s>>2]=i,r&&n)((e,t,r,i)=>{if(!(i>0))return 0;for(var n=r+i-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)),a<=127){if(r>=n)break;t[r++]=a}else if(a<=2047){if(r+1>=n)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=n)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=n)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}t[r]=0})(t,w,a,i+1);else if(n)for(var o=0;o<i;++o){var d=t.charCodeAt(o);d>255&&(gt(a),X("String has UTF-16 code units that do not fit in 8 bits")),w[a+o]=d}else for(o=0;o<i;++o)w[a+o]=t[o];return null!==e&&e.push(gt,s),s},argPackAdvance:8,readValueFromPointer:Ue,destructorFunction(e){gt(e)}})},i:(e,t,r)=>{var i,n,s,a,o;r=j(r),2===t?(i=Qe,n=et,a=tt,s=()=>E,o=1):4===t&&(i=rt,n=it,a=nt,s=()=>U,o=2),Q(e,{name:r,fromWireType:e=>{for(var r,n=U[e>>2],a=s(),d=e+4,l=0;l<=n;++l){var u=e+4+l*t;if(l==n||0==a[u>>o]){var c=i(d,u-d);void 0===r?r=c:(r+=String.fromCharCode(0),r+=c),d=u+t}}return gt(e),r},toWireType:(e,i)=>{"string"!=typeof i&&X(`Cannot pass non-string to C++ string type ${r}`);var s=a(i),d=yt(4+s+t);return U[d>>2]=s>>o,n(i,d+4,s+t),null!==e&&e.push(gt,d),d},argPackAdvance:8,readValueFromPointer:Ve,destructorFunction(e){gt(e)}})},y:(e,t)=>{Q(e,{isVoid:!0,name:t=j(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},g:(e,t,r,i,n)=>(e=ot[e])(t=He.toValue(t),t[r=at(r)],i,n),c:$e,f:(e,t,r)=>{var i=((e,t)=>{for(var r=new Array(e),i=0;i<e;++i)r[i]=dt(U[t+4*i>>2],"parameter "+i);return r})(e,t),n=i.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",a=0,o=[];0===r&&o.push("obj");for(var d=["retType"],l=[n],u=0;u<e;++u)o.push("arg"+u),d.push("argType"+u),l.push(i[u]),s+=` var arg${u} = argType${u}.readValueFromPointer(args${a?"+"+a:""});\n`,a+=i[u].argPackAdvance;for(s+=` var rv = ${1===r?"new func":"func.call"}(${o.join(", ")});\n`,u=0;u<e;++u)i[u].deleteObject&&(s+=` argType${u}.deleteObject(arg${u});\n`);n.isVoid||(d.push("emval_returnValue"),l.push(lt),s+=" return emval_returnValue(retType, destructorsRef, rv);\n"),s+="};\n",d.push(s);var c,f,h=Me(Function,d).apply(null,l),p=`methodCaller<(${i.map((e=>e.name)).join(", ")}) => ${n.name}>`;return c=ye(p,h),f=ot.length,ot.push(c),f},z:e=>{e>4&&(Oe.get(e).refcount+=1)},m:e=>He.toHandle(at(e)),B:()=>He.toHandle({}),v:e=>He.toHandle(Ze(e)),e:e=>{var t=He.toValue(e);Re(t),$e(e)},n:(e,t,r)=>{e=He.toValue(e),t=He.toValue(t),r=He.toValue(r),e[t]=r},A:(e,t)=>{var r=(e=dt(e,"_emval_take_value")).readValueFromPointer(t);return He.toHandle(r)},j:()=>{F("")},d:We,u:(e,t,r)=>w.copyWithin(e,t,t+r),s:e=>{w.length,F("OOM")},t:(e,t,r,i)=>{for(var n,s,a,o=0,d=0;d<r;d++){var l=U[t>>2],u=U[t+4>>2];t+=8;for(var c=0;c<u;c++)n=e,s=w[l+c],a=void 0,a=ht[n],0===s||10===s?((1===n?y:v)(Xe(a,0)),a.length=0):a.push(s);o+=u}return U[i>>2]=o,0}},_t=function(){var e,t,r,s,a={a:mt};function o(e,t){var r,i;return _t=e.exports,g=_t.C,r=g.buffer,n.HEAP8=b=new Int8Array(r),n.HEAP16=S=new Int16Array(r),n.HEAPU8=w=new Uint8Array(r),n.HEAPU16=E=new Uint16Array(r),n.HEAP32=A=new Int32Array(r),n.HEAPU32=U=new Uint32Array(r),n.HEAPF32=T=new Float32Array(r),n.HEAPF64=x=new Float64Array(r),xe=_t.G,i=_t.D,k.unshift(i),function(e){if(P--,n.monitorRunDependencies&&n.monitorRunDependencies(P),0==P&&I){var t=I;I=null,t()}}(),_t}if(P++,n.monitorRunDependencies&&n.monitorRunDependencies(P),n.instantiateWasm)try{return n.instantiateWasm(a,o)}catch(e){v(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return(e=_,t=L,r=a,s=function(e){o(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||M(t)||N(t)||c||"function"!=typeof fetch?O(t,r,s):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(s,(function(e){return v(`wasm streaming compile failed: ${e}`),v("falling back to ArrayBuffer instantiation"),O(t,r,s)}))))).catch(i),{}}(),gt=e=>(gt=_t.E)(e),yt=e=>(yt=_t.F)(e),vt=e=>(vt=_t.H)(e),bt=e=>(bt=_t.I)(e);function wt(){function e(){pt||(pt=!0,n.calledRun=!0,B||($(k),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),D.unshift(e);var e;$(D)}()))}P>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),C.unshift(e);var e;$(C)}(),P>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=_t.J)(e,t,r,i,s),n.___start_em_js=143452,n.___stop_em_js=143509,I=function e(){pt||wt(),pt||(I=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return wt(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href;return function(t){var r,i;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(e,t){r=e,i=t})),(t=void 0!==t?t:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof EASYPLAYER_PRO_AUDIO_WASM_URL&&""!=EASYPLAYER_PRO_AUDIO_WASM_URL?EASYPLAYER_PRO_AUDIO_WASM_URL:e};var n,s,a,o,d,l,u=Object.assign({},t),c="./this.program",f="object"==typeof window,h="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,m="";p?(m=h?require("path").dirname(m)+"/":__dirname+"/",l=()=>{d||(o=require("fs"),d=require("path"))},n=function(e,t){return l(),e=d.normalize(e),o.readFileSync(e,t?void 0:"utf8")},a=e=>{var t=n(e,!0);return t.buffer||(t=new Uint8Array(t)),t},s=(e,t,r)=>{l(),e=d.normalize(e),o.readFile(e,(function(e,i){e?r(e):t(i.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof ee))throw e})),process.on("unhandledRejection",(function(e){throw e})),t.inspect=function(){return"[Emscripten Module object]"}):(f||h)&&(h?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),s=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var _=t.print||console.log.bind(console),g=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&t.arguments,t.thisProgram&&(c=t.thisProgram),t.quit&&t.quit;var y,v,b=4;t.wasmBinary&&(y=t.wasmBinary),t.noExitRuntime,"object"!=typeof WebAssembly&&W("no native wasm support detected");var w=!1;function S(e,t){e||W(t)}var E,A,U,T,x,B,C,k,D,P,I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(e,t,r){for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&I)return I.decode(e.subarray(t,n));for(var s="";t<n;){var a=e[t++];if(128&a){var o=63&e[t++];if(192!=(224&a)){var d=63&e[t++];if((a=224==(240&a)?(15&a)<<12|o<<6|d:(7&a)<<18|o<<12|d<<6|63&e[t++])<65536)s+=String.fromCharCode(a);else{var l=a-65536;s+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s}function L(e,t){return e?F(U,e,t):""}function R(e,t,r,i){if(!(i>0))return 0;for(var n=r,s=r+i-1,a=0;a<e.length;++a){var o=e.charCodeAt(a);if(o>=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a);if(o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=s)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-n}function M(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t}t.INITIAL_MEMORY;var N=[],z=[],O=[];var $=0,G=null;function H(e){$++,t.monitorRunDependencies&&t.monitorRunDependencies($)}function V(e){if($--,t.monitorRunDependencies&&t.monitorRunDependencies($),0==$&&G){var r=G;G=null,r()}}function W(e){t.onAbort&&t.onAbort(e),g(e="Aborted("+e+")"),w=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw i(r),r}var j,q,Y,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){try{if(e==j&&y)return new Uint8Array(y);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}catch(e){W(e)}}function ee(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function te(e){for(;e.length>0;)e.shift()(t)}function re(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(e){B[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,A[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=A[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,A[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=A[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=B[this.ptr>>2];B[this.ptr>>2]=e+1},this.release_ref=function(){var e=B[this.ptr>>2];return B[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Xt(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}t.locateFile?Z(j="decoder-pro-audio.wasm")||(q=j,j=t.locateFile?t.locateFile(q,m):m+q):j=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).toString();var ie={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ie.isAbs(e),r="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ie.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return ie.normalize(e.join("/"))},join2:(e,t)=>ie.normalize(e+"/"+t)};var ne={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:le.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=ie.isAbs(i)}return(t?"/":"")+(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ne.resolve(e).substr(1),t=ne.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),a=s,o=0;o<s;o++)if(i[o]!==n[o]){a=o;break}var d=[];for(o=a;o<i.length;o++)d.push("..");return(d=d.concat(n.slice(a))).join("/")}};function se(e,t,r){var i=r>0?r:M(e)+1,n=new Array(i),s=R(e,n,0,n.length);return t&&(n.length=s),n}var ae={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){ae.ttys[e]={input:[],output:[],ops:t},le.registerDevice(e,ae.stream_ops)},stream_ops:{open:function(e){var t=ae.ttys[e.node.rdev];if(!t)throw new le.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new le.ErrnoError(60);for(var s=0,a=0;a<i;a++){var o;try{o=e.tty.ops.get_char(e.tty)}catch(e){throw new le.ErrnoError(29)}if(void 0===o&&0===s)throw new le.ErrnoError(6);if(null==o)break;s++,t[r+a]=o}return s&&(e.node.timestamp=Date.now()),s},write:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new le.ErrnoError(60);try{for(var s=0;s<i;s++)e.tty.ops.put_char(e.tty,t[r+s])}catch(e){throw new le.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),s}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(p){var r=Buffer.alloc(256),i=0;try{i=o.readSync(process.stdin.fd,r,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;i=0}t=i>0?r.slice(0,i).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=se(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(_(F(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(_(F(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(g(F(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(g(F(e.output,0)),e.output=[])}}};function oe(e){e=function(e,t){return Math.ceil(e/t)*t}(e,65536);var t=Kt(65536,e);return t?(function(e,t){U.fill(0,e,e+t)}(t,e),t):0}var de={ops_table:null,mount:function(e){return de.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(le.isBlkdev(r)||le.isFIFO(r))throw new le.ErrnoError(63);de.ops_table||(de.ops_table={dir:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,lookup:de.node_ops.lookup,mknod:de.node_ops.mknod,rename:de.node_ops.rename,unlink:de.node_ops.unlink,rmdir:de.node_ops.rmdir,readdir:de.node_ops.readdir,symlink:de.node_ops.symlink},stream:{llseek:de.stream_ops.llseek}},file:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:{llseek:de.stream_ops.llseek,read:de.stream_ops.read,write:de.stream_ops.write,allocate:de.stream_ops.allocate,mmap:de.stream_ops.mmap,msync:de.stream_ops.msync}},link:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,readlink:de.node_ops.readlink},stream:{}},chrdev:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:le.chrdev_stream_ops}});var n=le.createNode(e,t,r,i);return le.isDir(n.mode)?(n.node_ops=de.ops_table.dir.node,n.stream_ops=de.ops_table.dir.stream,n.contents={}):le.isFile(n.mode)?(n.node_ops=de.ops_table.file.node,n.stream_ops=de.ops_table.file.stream,n.usedBytes=0,n.contents=null):le.isLink(n.mode)?(n.node_ops=de.ops_table.link.node,n.stream_ops=de.ops_table.link.stream):le.isChrdev(n.mode)&&(n.node_ops=de.ops_table.chrdev.node,n.stream_ops=de.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=le.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,le.isDir(e.mode)?t.size=4096:le.isFile(e.mode)?t.size=e.usedBytes:le.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:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&de.resizeFileStorage(e,t.size)},lookup:function(e,t){throw le.genericErrors[44]},mknod:function(e,t,r,i){return de.createNode(e,t,r,i)},rename:function(e,t,r){if(le.isDir(e.mode)){var i;try{i=le.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new le.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=le.lookupNode(e,t);for(var i in r.contents)throw new le.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var i=de.createNode(e,t,41471,0);return i.link=r,i},readlink:function(e){if(!le.isLink(e.mode))throw new le.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&s.subarray)t.set(s.subarray(n,n+a),r);else for(var o=0;o<a;o++)t[r+o]=s[n+o];return a},write:function(e,t,r,i,n,s){if(!i)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(s)return a.contents=t.subarray(r,r+i),a.usedBytes=i,i;if(0===a.usedBytes&&0===n)return a.contents=t.slice(r,r+i),a.usedBytes=i,i;if(n+i<=a.usedBytes)return a.contents.set(t.subarray(r,r+i),n),i}if(de.expandFileStorage(a,n+i),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+i),n);else for(var o=0;o<i;o++)a.contents[n+o]=t[r+o];return a.usedBytes=Math.max(a.usedBytes,n+i),i},llseek:function(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&le.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new le.ErrnoError(28);return i},allocate:function(e,t,r){de.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,i,n){if(!le.isFile(e.node.mode))throw new le.ErrnoError(43);var s,a,o=e.node.contents;if(2&n||o.buffer!==E){if((r>0||r+t<o.length)&&(o=o.subarray?o.subarray(r,r+t):Array.prototype.slice.call(o,r,r+t)),a=!0,!(s=oe(t)))throw new le.ErrnoError(48);A.set(o,s)}else a=!1,s=o.byteOffset;return{ptr:s,allocated:a}},msync:function(e,t,r,i,n){if(!le.isFile(e.node.mode))throw new le.ErrnoError(43);return 2&n||de.stream_ops.write(e,t,0,i,r,!1),0}}};var le={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ne.resolve(le.cwd(),e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new le.ErrnoError(32);for(var r=ie.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=le.root,n="/",s=0;s<r.length;s++){var a=s===r.length-1;if(a&&t.parent)break;if(i=le.lookupNode(i,r[s]),n=ie.join2(n,r[s]),le.isMountpoint(i)&&(!a||a&&t.follow_mount)&&(i=i.mounted.root),!a||t.follow)for(var o=0;le.isLink(i.mode);){var d=le.readlink(n);if(n=ne.resolve(ie.dirname(n),d),i=le.lookupPath(n,{recurse_count:t.recurse_count+1}).node,o++>40)throw new le.ErrnoError(32)}}return{path:n,node:i}},getPath:e=>{for(var t;;){if(le.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%le.nameTable.length},hashAddNode:e=>{var t=le.hashName(e.parent.id,e.name);e.name_next=le.nameTable[t],le.nameTable[t]=e},hashRemoveNode:e=>{var t=le.hashName(e.parent.id,e.name);if(le.nameTable[t]===e)le.nameTable[t]=e.name_next;else for(var r=le.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=le.mayLookup(e);if(r)throw new le.ErrnoError(r,e);for(var i=le.hashName(e.id,t),n=le.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return le.lookup(e,t)},createNode:(e,t,r,i)=>{var n=new le.FSNode(e,t,r,i);return le.hashAddNode(n),n},destroyNode:e=>{le.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==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=le.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>le.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=le.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{le.lookupNode(e,t);return 20}catch(e){}return le.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var i;try{i=le.lookupNode(e,t)}catch(e){return e.errno}var n=le.nodePermissions(e,"wx");if(n)return n;if(r){if(!le.isDir(i.mode))return 54;if(le.isRoot(i)||le.getPath(i)===le.cwd())return 10}else if(le.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?le.isLink(e.mode)?32:le.isDir(e.mode)&&("r"!==le.flagsToPermissionString(t)||512&t)?31:le.nodePermissions(e,le.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!le.streams[r])return r;throw new le.ErrnoError(33)},getStream:e=>le.streams[e],createStream:(e,t,r)=>{le.FSStream||(le.FSStream=function(){this.shared={}},le.FSStream.prototype={},Object.defineProperties(le.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new le.FSStream,e);var i=le.nextfd(t,r);return e.fd=i,le.streams[i]=e,e},closeStream:e=>{le.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=le.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new le.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{le.devices[e]={stream_ops:t}},getDevice:e=>le.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),le.syncFSRequests++,le.syncFSRequests>1&&g("warning: "+le.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=le.getMounts(le.root.mount),i=0;function n(e){return le.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount:(e,t,r)=>{var i,n="/"===r,s=!r;if(n&&le.root)throw new le.ErrnoError(10);if(!n&&!s){var a=le.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,le.isMountpoint(i))throw new le.ErrnoError(10);if(!le.isDir(i.mode))throw new le.ErrnoError(54)}var o={type:e,opts:t,mountpoint:r,mounts:[]},d=e.mount(o);return d.mount=o,o.root=d,n?le.root=d:i&&(i.mounted=o,i.mount&&i.mount.mounts.push(o)),d},unmount:e=>{var t=le.lookupPath(e,{follow_mount:!1});if(!le.isMountpoint(t.node))throw new le.ErrnoError(28);var r=t.node,i=r.mounted,n=le.getMounts(i);Object.keys(le.nameTable).forEach((e=>{for(var t=le.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&le.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var i=le.lookupPath(e,{parent:!0}).node,n=ie.basename(e);if(!n||"."===n||".."===n)throw new le.ErrnoError(28);var s=le.mayCreate(i,n);if(s)throw new le.ErrnoError(s);if(!i.node_ops.mknod)throw new le.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,le.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,le.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{le.mkdir(i,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,le.mknod(e,t,r)),symlink:(e,t)=>{if(!ne.resolve(e))throw new le.ErrnoError(44);var r=le.lookupPath(t,{parent:!0}).node;if(!r)throw new le.ErrnoError(44);var i=ie.basename(t),n=le.mayCreate(r,i);if(n)throw new le.ErrnoError(n);if(!r.node_ops.symlink)throw new le.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename:(e,t)=>{var r,i,n=ie.dirname(e),s=ie.dirname(t),a=ie.basename(e),o=ie.basename(t);if(r=le.lookupPath(e,{parent:!0}).node,i=le.lookupPath(t,{parent:!0}).node,!r||!i)throw new le.ErrnoError(44);if(r.mount!==i.mount)throw new le.ErrnoError(75)