@cornerstonejs/dicom-image-loader 2.1.2 → 2.1.4
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/dist/dynamic-import/4de9823ef4bef156227c.js +1 -0
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/esm/imageLoader/index.d.ts +1 -1
- package/dist/esm/imageLoader/index.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{imageLoader/init.d.ts → init.d.ts} +1 -1
- package/dist/esm/{imageLoader/init.js → init.js} +4 -3
- package/package.json +3 -3
- package/dist/dynamic-import/031089e563a18ada8441.wasm +0 -0
- package/dist/dynamic-import/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/dynamic-import/5004fdc02f329ce53b69.wasm +0 -0
- package/dist/dynamic-import/54.min.js +0 -2
- package/dist/dynamic-import/54.min.js.map +0 -1
- package/dist/dynamic-import/548.min.js +0 -2
- package/dist/dynamic-import/548.min.js.map +0 -1
- package/dist/dynamic-import/918.min.js +0 -2
- package/dist/dynamic-import/918.min.js.map +0 -1
- package/dist/dynamic-import/958.min.js +0 -3
- package/dist/dynamic-import/958.min.js.LICENSE.txt +0 -5
- package/dist/dynamic-import/958.min.js.map +0 -1
- package/dist/dynamic-import/c22b37c3488e1d6c3aa4.wasm +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 958.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk=this.webpackChunk||[]).push([[958],{37:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="object"==typeof window,p="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(h){var v=r(716),y=r(401);d=p?y.dirname(d)+"/":"//",a=(t,e)=>(t=q(t)?new URL(t):y.normalize(t),v.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=q(t)?new URL(t):y.normalize(t),v.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof X))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},p&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});i.print||console.log.bind(console);var m,g=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(m=i.wasmBinary);var w;i.noExitRuntime;"object"!=typeof WebAssembly&&V("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e){return t?function(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(C,t,e):""}function j(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=$=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=C=new Uint8Array(t),i.HEAPU16=P=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=k=new Float64Array(t)}i.INITIAL_MEMORY;var O,x=[],D=[],U=[],I=0,H=null,M=null;function V(t){i.onAbort&&i.onAbort(t),g(t="Aborted("+t+")"),S=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var z,L,N="data:application/octet-stream;base64,";function B(t){return t.startsWith(N)}function q(t){return t.startsWith("file://")}function G(t){try{if(t==z&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){V(t)}}function X(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Y(t){for(;t.length>0;)t.shift()(i)}function J(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(De(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}B(z="charlswasm_decode.wasm")||(L=z,z=i.locateFile?i.locateFile(L,d):d+L);var Z={};function Q(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function K(t){return this.fromWireType(_[t>>2])}var tt={},et={},rt={},nt=48,ot=57;function it(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=nt&&e<=ot?"_"+t:t}function at(t,e){return t=it(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function st(t,e){var r=at(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ut=void 0;function ct(t){throw new ut(t)}function lt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ct("Mismatched type converter count");for(var o=0;o<t.length;++o)yt(t[o],n[o])}t.forEach((function(t){rt[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{et.hasOwnProperty(t)?o[e]=et[t]:(i.push(t),tt.hasOwnProperty(t)||(tt[t]=[]),tt[t].push((()=>{o[e]=et[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var pt=void 0;function ht(t){for(var e="",r=t;C[r];)e+=pt[C[r++]];return e}var dt=void 0;function vt(t){throw new dt(t)}function yt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||vt('type "'+n+'" must have a positive integer typeid pointer'),et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;vt("Cannot register type '"+n+"' twice")}if(et[t]=e,delete rt[t],tt.hasOwnProperty(t)){var o=tt[t];delete tt[t],o.forEach((t=>t()))}}function mt(t){if(!(this instanceof Ht))return!1;if(!(t instanceof Ht))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function gt(t){vt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var wt=!1;function bt(t){}function Tt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Ct(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ct(t,e,r.baseClass);return null===n?null:r.downcast(n)}var $t={};function Pt(){return Object.keys(Wt).length}function _t(){var t=[];for(var e in Wt)Wt.hasOwnProperty(e)&&t.push(Wt[e]);return t}var At=[];function Et(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var kt=void 0;function St(t){kt=t,At.length&&kt&&kt(Et)}var Wt={};function Rt(t,e){return e=function(t,e){for(void 0===e&&vt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Wt[e]}function jt(t,e){return e.ptrType&&e.ptr||ct("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ct("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ot(Object.create(t,{$$:{value:e}}))}function Ft(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Rt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=$t[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Ct(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ot(t){return"undefined"==typeof FinalizationRegistry?(Ot=t=>t,t):(wt=new FinalizationRegistry((t=>{Tt(t.$$)})),Ot=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};wt.register(t,r,t)}return t},bt=t=>wt.unregister(t),Ot(t))}function xt(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ot(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Dt(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),bt(this),Tt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ut(){return!this.$$.ptr}function It(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),At.push(this),1===At.length&&kt&&kt(Et),this.$$.deleteScheduled=!0,this}function Ht(){}function Mt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||vt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Vt(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&vt("Cannot register public name '"+t+"' twice"),Mt(i,t,t),i.hasOwnProperty(r)&&vt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}function zt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Lt(t,e,r){for(;e!==r;)e.upcast||vt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Nt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Lt(e.$$.ptr,r,this.registeredClass)}function Bt(t,e){var r;if(null===e)return this.isReference&&vt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Lt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&vt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,pe.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:vt("Unsupporting sharing policy")}return r}function qt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Lt(e.$$.ptr,r,this.registeredClass)}function Gt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Xt(t){this.rawDestructor&&this.rawDestructor(t)}function Yt(t){null!==t&&t.delete()}function Jt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Bt:n?(this.toWireType=Nt,this.destructorFunction=null):(this.toWireType=qt,this.destructorFunction=null)}function Zt(t,e,r){i.hasOwnProperty(t)||ct("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}var Qt=[];function Kt(t){var e=Qt[t];return e||(t>=Qt.length&&(Qt.length=t+1),Qt[t]=e=O.get(t)),e}function te(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Kt(e).apply(null,r)}function ee(t,e){var r,n,o,i=(t=ht(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),te(r,n,o)}):Kt(e);return"function"!=typeof i&&vt("unknown function pointer with signature "+t+": "+e),i}var re=void 0;function ne(t){var e=Re(t),r=ht(e);return je(e),r}function oe(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||et[e]||(rt[e]?rt[e].forEach(t):(r.push(e),n[e]=!0))})),new re(t+": "+r.map(ne).join([", "]))}function ie(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ae(t,e,r,n,o){var i=e.length;i<2&&vt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+it(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[vt,n,o,Q,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=at(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var se=[],ue=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ce(t){t>4&&0==--ue[t].refcount&&(ue[t]=void 0,se.push(t))}function le(){for(var t=0,e=5;e<ue.length;++e)void 0!==ue[e]&&++t;return t}function fe(){for(var t=5;t<ue.length;++t)if(void 0!==ue[t])return ue[t];return null}var pe={toValue:t=>(t||vt("Cannot use deleted val. handle = "+t),ue[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=se.length?se.pop():ue.length;return ue[e]={refcount:1,value:t},e}}};function he(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function de(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ve(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ye="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function me(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&ye)return ye.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ge(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function we(t){return 2*t.length}function be(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function Ce(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var $e={};function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function _e(t,e){var r=et[t];return void 0===r&&vt(e+" has unknown type "+ne(t)),r}var Ae={};function Ee(t){try{return w.grow(t-b.byteLength+65535>>>16),F(w.buffer),1}catch(t){}}ut=i.InternalError=st(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pt=t}(),dt=i.BindingError=st(Error,"BindingError"),Ht.prototype.isAliasOf=mt,Ht.prototype.clone=xt,Ht.prototype.delete=Dt,Ht.prototype.isDeleted=Ut,Ht.prototype.deleteLater=It,i.getInheritedInstanceCount=Pt,i.getLiveInheritedInstances=_t,i.flushPendingDeletes=Et,i.setDelayFunction=St,Jt.prototype.getPointee=Gt,Jt.prototype.destructor=Xt,Jt.prototype.argPackAdvance=8,Jt.prototype.readValueFromPointer=K,Jt.prototype.deleteObject=Yt,Jt.prototype.fromWireType=Ft,re=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=le,i.get_first_emval=fe;var ke,Se={h:function(t,e,r){throw new J(t).init(e,r),t},q:function(t){var e=Z[t];delete Z[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;lt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),Q(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:K,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=ht(l),i=ee(o,i),s&&(s=ee(a,s)),c&&(c=ee(u,c)),p=ee(f,p);var h=it(l);Vt(h,(function(){oe("Cannot construct "+l+" due to unbound types",[n])})),lt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Ht.prototype;var a=at(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new dt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new dt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new dt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new zt(l,a,u,p,r,i,s,c),d=new Jt(l,f,!0,!1,!1),v=new Jt(l+"*",f,!1,!1,!1),y=new Jt(l+" const*",f,!1,!0,!1);return $t[t]={pointerType:v,constPointerType:y},Zt(h,a),[d,v,y]}))},o:function(t,e,r,n,o,i){var a;e>0||V(a);var s=ie(e,r);o=ee(n,o),lt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new dt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{oe("Cannot construct "+t.name+" due to unbound types",s)},lt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ae(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ie(r,n);e=ht(e),i=ee(o,i),lt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){oe("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Mt(c,e,n),c[e].overloadTable[r-2]=o),lt([],u,(function(o){var s=ae(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},v:function(t,e){yt(t,{name:e=ht(e),fromWireType:function(t){var e=pe.toValue(t);return ce(t),e},toWireType:function(t,e){return pe.toHandle(e)},argPackAdvance:8,readValueFromPointer:K,destructorFunction:null})},k:function(t,e,r){var n=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:de(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=ie(e,r);t=ht(t),o=ee(n,o),Vt(t,(function(){oe("Cannot call "+t+" due to unbound types",a)}),e-1),lt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Zt(t,ae(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=ht(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");yt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ve(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}yt(t,{name:r=ht(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=ht(e));yt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=R(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return je(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||vt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=We(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)j(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(je(a),vt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(je,i),i},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){je(t)}})},g:function(t,e,r){var n,o,i,a,s;r=ht(r),2===e?(n=me,o=ge,a=we,i=()=>P,s=1):4===e&&(n=be,o=Te,a=Ce,i=()=>A,s=2),yt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return je(t),r},toWireType:function(t,n){"string"!=typeof n&&vt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=We(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(je,u),u},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){je(t)}})},u:function(t,e,r,n,o,i){Z[t]={name:ht(e),rawConstructor:ee(r,n),rawDestructor:ee(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){Z[t].fields.push({fieldName:ht(e),getterReturnType:r,getter:ee(n,o),getterContext:i,setterArgumentType:a,setter:ee(s,u),setterContext:c})},x:function(t,e){yt(t,{isVoid:!0,name:e=ht(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ce,m:function(t){return 0===t?pe.toHandle(Pe()):(t=void 0===(r=$e[e=t])?ht(e):r,pe.toHandle(Pe()[t]));var e,r},l:function(t){t>4&&(ue[t].refcount+=1)},y:function(t,e,r,n){t=pe.toValue(t);var o=Ae[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(_e,i,pe.toHandle,(()=>A))}(e),Ae[e]=o),o(t,r,n)},n:function(t,e){var r=(t=_e(t,"_emval_take_value")).readValueFromPointer(e);return pe.toHandle(r)},f:function(){V("")},t:function(t,e,r){C.copyWithin(t,e,e+r)},s:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Ee(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},We=(function(){var t={a:Se};function e(t,e){var r,n=t.exports;i.asm=n,F((w=i.asm.z).buffer),O=i.asm.C,r=i.asm.A,D.unshift(r),function(){if(I--,i.monitorRunDependencies&&i.monitorRunDependencies(I),0==I&&(null!==H&&(clearInterval(H),H=null),M)){var t=M;M=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(f||p)){if("function"==typeof fetch&&!q(z))return fetch(z,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+z+"'";return t.arrayBuffer()})).catch((function(){return G(z)}));if(s)return new Promise((function(t,e){s(z,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(z)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){g("failed to asynchronously prepare wasm: "+t),V(t)}))}if(I++,i.monitorRunDependencies&&i.monitorRunDependencies(I),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||B(z)||q(z)||h||"function"!=typeof fetch?n(r):fetch(z,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.A).apply(null,arguments)},i._malloc=function(){return(We=i._malloc=i.asm.B).apply(null,arguments)}),Re=i.___getTypeName=function(){return(Re=i.___getTypeName=i.asm.D).apply(null,arguments)},je=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(je=i._free=i.asm.F).apply(null,arguments)}),Fe=i.stackSave=function(){return(Fe=i.stackSave=i.asm.G).apply(null,arguments)},Oe=i.stackRestore=function(){return(Oe=i.stackRestore=i.asm.H).apply(null,arguments)},xe=i.stackAlloc=function(){return(xe=i.stackAlloc=i.asm.I).apply(null,arguments)},De=i.___cxa_is_pointer_type=function(){return(De=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Ue(t){function r(){ke||(ke=!0,i.calledRun=!0,S||(Y(D),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),U.unshift(t);var t;Y(U)}()))}t=t||l,I>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),x.unshift(t);var t;Y(x)}(),I>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);j(t,e=xe(r),r)}return e},array:t=>{var e=xe(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Fe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Oe(c),function(t){return"string"===e?R(t):"boolean"===e?Boolean(t):t}(t)}(p)},M=function t(){ke||Ue(),ke||(M=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ue(),t.ready});t.exports=o},851:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p=(t,e)=>{throw e},h="object"==typeof window,d="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(v){var m=r(491),g=r(33);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=Q(t)?new URL(t):g.normalize(t),m.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Q(t)?new URL(t):g.normalize(t),m.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof tt))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(L())throw process.exitCode=t,e;var r;(r=e)instanceof tt||T("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(h||d)&&(d?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),n&&(y=n),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var w,b=i.print||console.log.bind(console),T=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&(p=i.quit),i.wasmBinary&&(w=i.wasmBinary);var C,$=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var P,_,A,E,k,S,W,R,j,F=!1,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&O)return O.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(t,e){return t?x(A,t,e):""}function U(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,A,e,r)}function I(t){P=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=E=new Int16Array(t),i.HEAP32=S=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=k=new Uint16Array(t),i.HEAPU32=W=new Uint32Array(t),i.HEAPF32=R=new Float32Array(t),i.HEAPF64=j=new Float64Array(t)}i.INITIAL_MEMORY;var H,M=[],V=[],z=[];function L(){return $}var N=0,B=null,q=null;function G(t){i.onAbort&&i.onAbort(t),T(t="Aborted("+t+")"),F=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var X,Y,J="data:application/octet-stream;base64,";function Z(t){return t.startsWith(J)}function Q(t){return t.startsWith("file://")}function K(t){try{if(t==X&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){G(t)}}function tt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function et(t){for(;t.length>0;)t.shift()(i)}function rt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){W[this.ptr+4>>2]=t},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(t){W[this.ptr+8>>2]=t},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(t){S[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return 0!=_[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=_[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=S[this.ptr>>2];S[this.ptr>>2]=t+1},this.release_ref=function(){var t=S[this.ptr>>2];return S[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){W[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return W[this.ptr+16>>2]},this.get_exception_ptr=function(){if(qe(this.get_type()))return W[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}Z(X="libjpegturbowasm_decode.wasm")||(Y=X,X=i.locateFile?i.locateFile(Y,y):y+Y);var nt={};function ot(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function it(t){return this.fromWireType(S[t>>2])}var at={},st={},ut={},ct=48,lt=57;function ft(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ct&&e<=lt?"_"+t:t}function pt(t,e){return t=ft(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ht(t,e){var r=pt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var dt=void 0;function vt(t){throw new dt(t)}function yt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&vt("Mismatched type converter count");for(var o=0;o<t.length;++o)Ct(t[o],n[o])}t.forEach((function(t){ut[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{st.hasOwnProperty(t)?o[e]=st[t]:(i.push(t),at.hasOwnProperty(t)||(at[t]=[]),at[t].push((()=>{o[e]=st[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function mt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var gt=void 0;function wt(t){for(var e="",r=t;A[r];)e+=gt[A[r++]];return e}var bt=void 0;function Tt(t){throw new bt(t)}function Ct(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||Tt('type "'+n+'" must have a positive integer typeid pointer'),st.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;Tt("Cannot register type '"+n+"' twice")}if(st[t]=e,delete ut[t],at.hasOwnProperty(t)){var o=at[t];delete at[t],o.forEach((t=>t()))}}function $t(t){if(!(this instanceof Bt))return!1;if(!(t instanceof Bt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Pt(t){Tt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function At(t){}function Et(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function kt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=kt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var St={};function Wt(){return Object.keys(Dt).length}function Rt(){var t=[];for(var e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t}var jt=[];function Ft(){for(;jt.length;){var t=jt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ot=void 0;function xt(t){Ot=t,jt.length&&Ot&&Ot(Ft)}var Dt={};function Ut(t,e){return e=function(t,e){for(void 0===e&&Tt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Dt[e]}function It(t,e){return e.ptrType&&e.ptr||vt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&vt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Mt(Object.create(t,{$$:{value:e}}))}function Ht(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ut(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=St[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=kt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Mt(t){return"undefined"==typeof FinalizationRegistry?(Mt=t=>t,t):(_t=new FinalizationRegistry((t=>{Et(t.$$)})),Mt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};_t.register(t,r,t)}return t},At=t=>_t.unregister(t),Mt(t))}function Vt(){if(this.$$.ptr||Pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Mt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function zt(){this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),At(this),Et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Lt(){return!this.$$.ptr}function Nt(){return this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),jt.push(this),1===jt.length&&Ot&&Ot(Ft),this.$$.deleteScheduled=!0,this}function Bt(){}function qt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||Tt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Xt(t,e,r){for(;e!==r;)e.upcast||Tt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Yt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Jt(t,e){var r;if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Xt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Tt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ye.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:Tt("Unsupporting sharing policy")}return r}function Zt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Kt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Jt:n?(this.toWireType=Yt,this.destructorFunction=null):(this.toWireType=Zt,this.destructorFunction=null)}var re=[];function ne(t){var e=re[t];return e||(t>=re.length&&(re.length=t+1),re[t]=e=H.get(t)),e}function oe(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):ne(e).apply(null,r)}function ie(t,e){var r,n,o,i=(t=wt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),oe(r,n,o)}):ne(e);return"function"!=typeof i&&Tt("unknown function pointer with signature "+t+": "+e),i}var ae=void 0;function se(t){var e=Ve(t),r=wt(e);return Me(e),r}function ue(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||st[e]||(ut[e]?ut[e].forEach(t):(r.push(e),n[e]=!0))})),new ae(t+": "+r.map(se).join([", "]))}function ce(t,e){for(var r=[],n=0;n<t;n++)r.push(W[e+4*n>>2]);return r}function le(t,e,r,n,o){var i=e.length;i<2&&Tt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ft(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[Tt,n,o,ot,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=pt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var fe=[],pe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function he(t){t>4&&0==--pe[t].refcount&&(pe[t]=void 0,fe.push(t))}function de(){for(var t=0,e=5;e<pe.length;++e)void 0!==pe[e]&&++t;return t}function ve(){for(var t=5;t<pe.length;++t)if(void 0!==pe[t])return pe[t];return null}var ye={toValue:t=>(t||Tt("Cannot use deleted val. handle = "+t),pe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=fe.length?fe.pop():pe.length;return pe[e]={refcount:1,value:t},e}}};function me(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ge(t,e){switch(e){case 2:return function(t){return this.fromWireType(R[t>>2])};case 3:return function(t){return this.fromWireType(j[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function we(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return A[t]};case 1:return r?function(t){return E[t>>1]}:function(t){return k[t>>1]};case 2:return r?function(t){return S[t>>2]}:function(t){return W[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var be="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Te(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&k[n];)++n;if((r=n<<1)-t>32&&be)return be.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=E[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Ce(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);E[e>>1]=a,e+=2}return E[e>>1]=0,e-n}function $e(t){return 2*t.length}function Pe(t,e){for(var r=0,n="";!(r>=e/4);){var o=S[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function _e(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),S[e>>2]=a,(e+=4)+4>o)break}return S[e>>2]=0,e-n}function Ae(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Ee={};function ke(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Se(t,e){var r=st[t];return void 0===r&&Tt(e+" has unknown type "+se(t)),r}var We={};function Re(t){try{return C.grow(t-P.byteLength+65535>>>16),I(C.buffer),1}catch(t){}}var je={};function Fe(){if(!Fe.strings){var t={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",_:f||"./this.program"};for(var e in je)void 0===je[e]?delete t[e]:t[e]=je[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Fe.strings=r}return Fe.strings}var Oe=function(t,e){var r;r=t,L()||(i.onExit&&i.onExit(r),F=!0),p(r,new tt(r))},xe=[null,[],[]];function De(t,e){var r=xe[t];0===e||10===e?((1===t?b:T)(x(r,0)),r.length=0):r.push(e)}dt=i.InternalError=ht(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);gt=t}(),bt=i.BindingError=ht(Error,"BindingError"),Bt.prototype.isAliasOf=$t,Bt.prototype.clone=Vt,Bt.prototype.delete=zt,Bt.prototype.isDeleted=Lt,Bt.prototype.deleteLater=Nt,i.getInheritedInstanceCount=Wt,i.getLiveInheritedInstances=Rt,i.flushPendingDeletes=Ft,i.setDelayFunction=xt,ee.prototype.getPointee=Qt,ee.prototype.destructor=Kt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=it,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Ht,ae=i.UnboundTypeError=ht(Error,"UnboundTypeError"),i.count_emval_handles=de,i.get_first_emval=ve;var Ue,Ie={g:function(t,e,r){throw new rt(t).init(e,r),t},A:function(t){var e=nt[t];delete nt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;yt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),ot(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:it,destructorFunction:n}]}))},w:function(t,e,r,n,o){},F:function(t,e,r,n,o){var i=mt(r);Ct(t,{name:e=wt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_;else if(2===r)n=E;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=S}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=wt(f),a=ie(o,a),u&&(u=ie(s,u)),l&&(l=ie(c,l)),h=ie(p,h);var d=ft(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&Tt("Cannot register public name '"+t+"' twice"),qt(i,t,t),i.hasOwnProperty(r)&&Tt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){ue("Cannot construct "+f+" due to unbound types",[n])})),yt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Bt.prototype;var s=pt(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new bt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new bt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new bt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Gt(f,s,c,h,r,a,u,l),v=new ee(f,p,!0,!1,!1),y=new ee(f+"*",p,!1,!1,!1),m=new ee(f+" const*",p,!1,!0,!1);return St[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||vt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},t:function(t,e,r,n,o,i){var a;e>0||G(a);var s=ce(e,r);o=ie(n,o),yt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new bt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ue("Cannot construct "+t.name+" due to unbound types",s)},yt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=le(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ce(r,n);e=wt(e),i=ie(o,i),yt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ue("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(qt(c,e,n),c[e].overloadTable[r-2]=o),yt([],u,(function(o){var s=le(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},E:function(t,e){Ct(t,{name:e=wt(e),fromWireType:function(t){var e=ye.toValue(t);return he(t),e},toWireType:function(t,e){return ye.toHandle(e)},argPackAdvance:8,readValueFromPointer:it,destructorFunction:null})},m:function(t,e,r){var n=mt(r);Ct(t,{name:e=wt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ge(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=wt(e),-1===o&&(o=4294967295);var i=mt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Ct(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:we(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=W,r=e[t>>=2],o=e[t+1];return new n(P,o,r)}Ct(t,{name:r=wt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=wt(e));Ct(t,{name:e,fromWireType:function(t){var e,n=W[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==A[s]){var u=D(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(A[o+a]);e=c.join("")}return Me(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Tt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=He(4+n+1),a=i+4;if(W[i>>2]=n,r&&o)U(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Me(a),Tt("String has UTF-16 code units that do not fit in 8 bits")),A[a+s]=u}else for(s=0;s<n;++s)A[a+s]=e[s];return null!==t&&t.push(Me,i),i},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Me(t)}})},h:function(t,e,r){var n,o,i,a,s;r=wt(r),2===e?(n=Te,o=Ce,a=$e,i=()=>k,s=1):4===e&&(n=Pe,o=_e,a=Ae,i=()=>W,s=2),Ct(t,{name:r,fromWireType:function(t){for(var r,o=W[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Me(t),r},toWireType:function(t,n){"string"!=typeof n&&Tt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=He(4+i+e);return W[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Me,u),u},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Me(t)}})},J:function(t,e,r,n,o,i){nt[t]={name:wt(e),rawConstructor:ie(r,n),rawDestructor:ie(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){nt[t].fields.push({fieldName:wt(e),getterReturnType:r,getter:ie(n,o),getterContext:i,setterArgumentType:a,setter:ie(s,u),setterContext:c})},G:function(t,e){Ct(t,{isVoid:!0,name:e=wt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:he,r:function(t){return 0===t?ye.toHandle(ke()):(t=void 0===(r=Ee[e=t])?wt(e):r,ye.toHandle(ke()[t]));var e,r},p:function(t){t>4&&(pe[t].refcount+=1)},q:function(t,e,r,n){t=ye.toValue(t);var o=We[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Se,i,ye.toHandle,(()=>W))}(e),We[e]=o),o(t,r,n)},s:function(t,e){var r=(t=Se(t,"_emval_take_value")).readValueFromPointer(e);return ye.toHandle(r)},j:function(){G("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r,n=A.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Re(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},z:function(t,e){var r=0;return Fe().forEach((function(n,o){var i=e+r;W[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)_[0|e++]=t.charCodeAt(n);r||(_[0|e]=0)}(n,i),r+=n.length+1})),0},B:function(t,e){var r=Fe();W[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),W[e>>2]=n,0},I:Oe,C:function(t){return 52},v:function(t,e,r,n,o){return 70},k:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=W[e>>2],s=W[e+4>>2];e+=8;for(var u=0;u<s;u++)De(t,A[a+u]);o+=s}return W[n>>2]=o,0},o:function(t,e){var r=Le();try{return ne(t)(e)}catch(t){if(Ne(r),t!==t+0)throw t;ze(1,0)}},n:function(t,e,r){var n=Le();try{return ne(t)(e,r)}catch(t){if(Ne(n),t!==t+0)throw t;ze(1,0)}},H:function(t,e,r,n){var o=Le();try{return ne(t)(e,r,n)}catch(t){if(Ne(o),t!==t+0)throw t;ze(1,0)}},f:function(t,e){var r=Le();try{ne(t)(e)}catch(t){if(Ne(r),t!==t+0)throw t;ze(1,0)}},e:function(t,e,r,n){var o=Le();try{ne(t)(e,r,n)}catch(t){if(Ne(o),t!==t+0)throw t;ze(1,0)}}},He=(function(){var t={a:Ie};function e(t,e){var r,n=t.exports;i.asm=n,I((C=i.asm.K).buffer),H=i.asm.M,r=i.asm.L,V.unshift(r),function(){if(N--,i.monitorRunDependencies&&i.monitorRunDependencies(N),0==N&&(null!==B&&(clearInterval(B),B=null),q)){var t=q;q=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(h||d)){if("function"==typeof fetch&&!Q(X))return fetch(X,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+X+"'";return t.arrayBuffer()})).catch((function(){return K(X)}));if(s)return new Promise((function(t,e){s(X,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return K(X)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),G(t)}))}if(N++,i.monitorRunDependencies&&i.monitorRunDependencies(N),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){T("Module.instantiateWasm callback failed with error: "+t),o(t)}(w||"function"!=typeof WebAssembly.instantiateStreaming||Z(X)||Q(X)||v||"function"!=typeof fetch?n(r):fetch(X,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return T("wasm streaming compile failed: "+t),T("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.L).apply(null,arguments)},i._malloc=function(){return(He=i._malloc=i.asm.N).apply(null,arguments)}),Me=i._free=function(){return(Me=i._free=i.asm.O).apply(null,arguments)},Ve=i.___getTypeName=function(){return(Ve=i.___getTypeName=i.asm.P).apply(null,arguments)},ze=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(ze=i._setThrew=i.asm.R).apply(null,arguments)}),Le=i.stackSave=function(){return(Le=i.stackSave=i.asm.S).apply(null,arguments)},Ne=i.stackRestore=function(){return(Ne=i.stackRestore=i.asm.T).apply(null,arguments)},Be=i.stackAlloc=function(){return(Be=i.stackAlloc=i.asm.U).apply(null,arguments)},qe=i.___cxa_is_pointer_type=function(){return(qe=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Ge(t){function r(){Ue||(Ue=!0,i.calledRun=!0,F||(et(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),z.unshift(t);var t;et(z)}()))}t=t||l,N>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),M.unshift(t);var t;et(M)}(),N>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.W).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);U(t,e=Be(r),r)}return e},array:t=>{var e=Be(t.length);return function(t,e){_.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Le()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ne(c),function(t){return"string"===e?D(t):"boolean"===e?Boolean(t):t}(t)}(p)},q=function t(){Ue||Ge(),Ue||(q=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ge(),t.ready});t.exports=o},272:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p="object"==typeof window,h="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(d){var y=r(261),m=r(926);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=Y(t)?new URL(t):m.normalize(t),y.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Y(t)?new URL(t):m.normalize(t),y.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Z))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},h&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var g,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary);var T;i.noExitRuntime;"object"!=typeof WebAssembly&&N("no native wasm support detected");var C,$,P,_,A,E,k,S,W,R=!1,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&j)return j.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function O(t,e){return t?F(P,t,e):""}function x(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function D(t){C=t,i.HEAP8=$=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=E=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=k=new Uint32Array(t),i.HEAPF32=S=new Float32Array(t),i.HEAPF64=W=new Float64Array(t)}i.INITIAL_MEMORY;var U,I=[],H=[],M=[],V=0,z=null,L=null;function N(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),R=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var B,q,G="data:application/octet-stream;base64,";function X(t){return t.startsWith(G)}function Y(t){return t.startsWith("file://")}function J(t){try{if(t==B&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){N(t)}}function Z(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Q(t){for(;t.length>0;)t.shift()(i)}function K(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){k[this.ptr+4>>2]=t},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(t){k[this.ptr+8>>2]=t},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(t){E[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,$[this.ptr+12|0]=t},this.get_caught=function(){return 0!=$[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,$[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=$[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=E[this.ptr>>2];E[this.ptr>>2]=t+1},this.release_ref=function(){var t=E[this.ptr>>2];return E[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){k[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ve(this.get_type()))return k[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}X(B="openjpegwasm_decode.wasm")||(q=B,B=i.locateFile?i.locateFile(q,v):v+q);var tt={};function et(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function rt(t){return this.fromWireType(E[t>>2])}var nt={},ot={},it={},at=48,st=57;function ut(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=at&&e<=st?"_"+t:t}function ct(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function lt(t,e){var r=ct(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ft=void 0;function pt(t){throw new ft(t)}function ht(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var o=0;o<t.length;++o)wt(t[o],n[o])}t.forEach((function(t){it[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{ot.hasOwnProperty(t)?o[e]=ot[t]:(i.push(t),nt.hasOwnProperty(t)||(nt[t]=[]),nt[t].push((()=>{o[e]=ot[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function dt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var vt=void 0;function yt(t){for(var e="",r=t;P[r];)e+=vt[P[r++]];return e}var mt=void 0;function gt(t){throw new mt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||gt('type "'+n+'" must have a positive integer typeid pointer'),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;gt("Cannot register type '"+n+"' twice")}if(ot[t]=e,delete it[t],nt.hasOwnProperty(t)){var o=nt[t];delete nt[t],o.forEach((t=>t()))}}function bt(t){if(!(this instanceof zt))return!1;if(!(t instanceof zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Tt(t){gt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Ct=!1;function $t(t){}function Pt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function _t(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=_t(t,e,r.baseClass);return null===n?null:r.downcast(n)}var At={};function Et(){return Object.keys(Ft).length}function kt(){var t=[];for(var e in Ft)Ft.hasOwnProperty(e)&&t.push(Ft[e]);return t}var St=[];function Wt(){for(;St.length;){var t=St.pop();t.$$.deleteScheduled=!1,t.delete()}}var Rt=void 0;function jt(t){Rt=t,St.length&&Rt&&Rt(Wt)}var Ft={};function Ot(t,e){return e=function(t,e){for(void 0===e&>("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ft[e]}function xt(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ut(Object.create(t,{$$:{value:e}}))}function Dt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ot(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=At[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=_t(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ut(t){return"undefined"==typeof FinalizationRegistry?(Ut=t=>t,t):(Ct=new FinalizationRegistry((t=>{Pt(t.$$)})),Ut=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Ct.register(t,r,t)}return t},$t=t=>Ct.unregister(t),Ut(t))}function It(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ut(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ht(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),$t(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Mt(){return!this.$$.ptr}function Vt(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),St.push(this),1===St.length&&Rt&&Rt(Wt),this.$$.deleteScheduled=!0,this}function zt(){}function Lt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||gt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Nt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Bt(t,e,r){for(;e!==r;)e.upcast||gt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function qt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Gt(t,e){var r;if(null===e)return this.isReference&>("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&>("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Bt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:gt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,he.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:gt("Unsupporting sharing policy")}return r}function Xt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&>("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Yt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Zt(t){null!==t&&t.delete()}function Qt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Gt:n?(this.toWireType=qt,this.destructorFunction=null):(this.toWireType=Xt,this.destructorFunction=null)}var Kt=[];function te(t){var e=Kt[t];return e||(t>=Kt.length&&(Kt.length=t+1),Kt[t]=e=U.get(t)),e}function ee(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):te(e).apply(null,r)}function re(t,e){var r,n,o,i=(t=yt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ee(r,n,o)}):te(e);return"function"!=typeof i&>("unknown function pointer with signature "+t+": "+e),i}var ne=void 0;function oe(t){var e=Ue(t),r=yt(e);return De(e),r}function ie(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||ot[e]||(it[e]?it[e].forEach(t):(r.push(e),n[e]=!0))})),new ne(t+": "+r.map(oe).join([", "]))}function ae(t,e){for(var r=[],n=0;n<t;n++)r.push(k[e+4*n>>2]);return r}function se(t,e,r,n,o){var i=e.length;i<2&>("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ut(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[gt,n,o,et,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ct(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var ue=[],ce=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function le(t){t>4&&0==--ce[t].refcount&&(ce[t]=void 0,ue.push(t))}function fe(){for(var t=0,e=5;e<ce.length;++e)void 0!==ce[e]&&++t;return t}function pe(){for(var t=5;t<ce.length;++t)if(void 0!==ce[t])return ce[t];return null}var he={toValue:t=>(t||gt("Cannot use deleted val. handle = "+t),ce[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=ue.length?ue.pop():ce.length;return ce[e]={refcount:1,value:t},e}}};function de(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ve(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(W[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ye(t,e,r){switch(e){case 0:return r?function(t){return $[t]}:function(t){return P[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return E[t>>2]}:function(t){return k[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var me="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ge(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&me)return me.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=_[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function we(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);_[e>>1]=a,e+=2}return _[e>>1]=0,e-n}function be(t){return 2*t.length}function Te(t,e){for(var r=0,n="";!(r>=e/4);){var o=E[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Ce(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),E[e>>2]=a,(e+=4)+4>o)break}return E[e>>2]=0,e-n}function $e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Pe={};function _e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(t,e){var r=ot[t];return void 0===r&>(e+" has unknown type "+oe(t)),r}var Ee={};function ke(t){try{return T.grow(t-C.byteLength+65535>>>16),D(T.buffer),1}catch(t){}}var Se={};function We(){if(!We.strings){var t={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",_:f||"./this.program"};for(var e in Se)void 0===Se[e]?delete t[e]:t[e]=Se[e];var r=[];for(var e in t)r.push(e+"="+t[e]);We.strings=r}return We.strings}var Re=[null,[],[]];function je(t,e){var r=Re[t];0===e||10===e?((1===t?w:b)(F(r,0)),r.length=0):r.push(e)}ft=i.InternalError=lt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);vt=t}(),mt=i.BindingError=lt(Error,"BindingError"),zt.prototype.isAliasOf=bt,zt.prototype.clone=It,zt.prototype.delete=Ht,zt.prototype.isDeleted=Mt,zt.prototype.deleteLater=Vt,i.getInheritedInstanceCount=Et,i.getLiveInheritedInstances=kt,i.flushPendingDeletes=Wt,i.setDelayFunction=jt,Qt.prototype.getPointee=Yt,Qt.prototype.destructor=Jt,Qt.prototype.argPackAdvance=8,Qt.prototype.readValueFromPointer=rt,Qt.prototype.deleteObject=Zt,Qt.prototype.fromWireType=Dt,ne=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=fe,i.get_first_emval=pe;var Fe,Oe={D:function(t,e,r){throw new K(t).init(e,r),t},e:function(t){var e=tt[t];delete tt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;ht([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),et(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:n}]}))},t:function(t,e,r,n,o){},B:function(t,e,r,n,o){var i=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=$;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=E}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=yt(f),a=re(o,a),u&&(u=re(s,u)),l&&(l=re(c,l)),h=re(p,h);var d=ut(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&>("Cannot register public name '"+t+"' twice"),Lt(i,t,t),i.hasOwnProperty(r)&>("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){ie("Cannot construct "+f+" due to unbound types",[n])})),ht([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:zt.prototype;var s=ct(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new mt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new mt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new mt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Nt(f,s,c,h,r,a,u,l),v=new Qt(f,p,!0,!1,!1),y=new Qt(f+"*",p,!1,!1,!1),m=new Qt(f+" const*",p,!1,!0,!1);return At[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},q:function(t,e,r,n,o,i){var a;e>0||N(a);var s=ae(e,r);o=re(n,o),ht([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new mt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ie("Cannot construct "+t.name+" due to unbound types",s)},ht([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=se(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=ae(r,n);e=yt(e),i=re(o,i),ht([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ie("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Lt(c,e,n),c[e].overloadTable[r-2]=o),ht([],u,(function(o){var s=se(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},A:function(t,e){wt(t,{name:e=yt(e),fromWireType:function(t){var e=he.toValue(t);return le(t),e},toWireType:function(t,e){return he.toHandle(e)},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:null})},l:function(t,e,r){var n=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ve(e,n),destructorFunction:null})},d:function(t,e,r,n,o){e=yt(e),-1===o&&(o=4294967295);var i=dt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");wt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ye(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=k,r=e[t>>=2],o=e[t+1];return new n(C,o,r)}wt(t,{name:r=yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=yt(e));wt(t,{name:e,fromWireType:function(t){var e,n=k[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=O(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return De(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||gt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=xe(4+n+1),a=i+4;if(k[i>>2]=n,r&&o)x(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(De(a),gt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(De,i),i},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){De(t)}})},f:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=ge,o=we,a=be,i=()=>A,s=1):4===e&&(n=Te,o=Ce,a=$e,i=()=>k,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=k[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return De(t),r},toWireType:function(t,n){"string"!=typeof n&>("Cannot pass non-string to C++ string type "+r);var i=a(n),u=xe(4+i+e);return k[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(De,u),u},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){De(t)}})},g:function(t,e,r,n,o,i){tt[t]={name:yt(e),rawConstructor:re(r,n),rawDestructor:re(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){tt[t].fields.push({fieldName:yt(e),getterReturnType:r,getter:re(n,o),getterContext:i,setterArgumentType:a,setter:re(s,u),setterContext:c})},C:function(t,e){wt(t,{isVoid:!0,name:e=yt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:le,o:function(t){return 0===t?he.toHandle(_e()):(t=void 0===(r=Pe[e=t])?yt(e):r,he.toHandle(_e()[t]));var e,r},m:function(t){t>4&&(ce[t].refcount+=1)},n:function(t,e,r,n){t=he.toValue(t);var o=Ee[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Ae,i,he.toHandle,(()=>k))}(e),Ee[e]=o),o(t,r,n)},p:function(t,e){var r=(t=Ae(t,"_emval_take_value")).readValueFromPointer(e);return he.toHandle(r)},i:function(){N("")},v:function(){return 2147483648},z:function(t,e,r){P.copyWithin(t,e,e+r)},u:function(t){var e,r,n=P.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ke(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},w:function(t,e){var r=0;return We().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)$[0|e++]=t.charCodeAt(n);r||($[0|e]=0)}(n,i),r+=n.length+1})),0},x:function(t,e){var r=We();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0},y:function(t){return 52},s:function(t,e,r,n,o){return 70},j:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;for(var u=0;u<s;u++)je(t,P[a+u]);o+=s}return k[n>>2]=o,0}},xe=(function(){var t={a:Oe};function e(t,e){var r,n=t.exports;i.asm=n,D((T=i.asm.E).buffer),U=i.asm.G,r=i.asm.F,H.unshift(r),function(){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==z&&(clearInterval(z),z=null),L)){var t=L;L=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(p||h)){if("function"==typeof fetch&&!Y(B))return fetch(B,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+B+"'";return t.arrayBuffer()})).catch((function(){return J(B)}));if(s)return new Promise((function(t,e){s(B,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return J(B)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),N(t)}))}if(V++,i.monitorRunDependencies&&i.monitorRunDependencies(V),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){b("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||X(B)||Y(B)||d||"function"!=typeof fetch?n(r):fetch(B,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.F).apply(null,arguments)},i._malloc=function(){return(xe=i._malloc=i.asm.H).apply(null,arguments)}),De=i._free=function(){return(De=i._free=i.asm.I).apply(null,arguments)},Ue=i.___getTypeName=function(){return(Ue=i.___getTypeName=i.asm.J).apply(null,arguments)},Ie=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(Ie=i.stackSave=i.asm.L).apply(null,arguments)}),He=i.stackRestore=function(){return(He=i.stackRestore=i.asm.M).apply(null,arguments)},Me=i.stackAlloc=function(){return(Me=i.stackAlloc=i.asm.N).apply(null,arguments)},Ve=i.___cxa_is_pointer_type=function(){return(Ve=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function ze(t){function r(){Fe||(Fe=!0,i.calledRun=!0,R||(Q(H),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),M.unshift(t);var t;Q(M)}()))}t=t||l,V>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),I.unshift(t);var t;Q(I)}(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_iji=function(){return(i.dynCall_iji=i.asm.P).apply(null,arguments)},i.dynCall_jji=function(){return(i.dynCall_jji=i.asm.Q).apply(null,arguments)},i.dynCall_iiji=function(){return(i.dynCall_iiji=i.asm.R).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.S).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);x(t,e=Me(r),r)}return e},array:t=>{var e=Me(t.length);return function(t,e){$.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Ie()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&He(c),function(t){return"string"===e?O(t):"boolean"===e?Boolean(t):t}(t)}(p)},L=function t(){Fe||ze(),Fe||(L=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ze(),t.ready});t.exports=o},430:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){e=t,o=r}));var i,a,s,u=Object.assign({},t),c=[],l="object"==typeof window,f="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(p){var d=r(280),v=r(103);h=f?v.dirname(h)+"/":"//",i=(t,e)=>(t=G(t)?new URL(t):v.normalize(t),d.readFileSync(t,e?void 0:"utf8")),s=t=>{var e=i(t,!0);return e.buffer||(e=new Uint8Array(e)),e},a=(t,e,r)=>{t=G(t)?new URL(t):v.normalize(t),d.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Y))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},f&&(s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,m=t.print||console.log.bind(console),g=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&(c=t.arguments),t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(y=t.wasmBinary);var w;t.noExitRuntime;"object"!=typeof WebAssembly&&z("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function j(t,e){return t?R(C,t,e):""}function F(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function O(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=$=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=C=new Uint8Array(e),t.HEAPU16=P=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=E=new Float32Array(e),t.HEAPF64=k=new Float64Array(e)}t.INITIAL_MEMORY;var x,D=[],U=[],I=[],H=0,M=null,V=null;function z(e){t.onAbort&&t.onAbort(e),g(e="Aborted("+e+")"),S=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var L,N,B="data:application/octet-stream;base64,";function q(t){return t.startsWith(B)}function G(t){return t.startsWith("file://")}function X(t){try{if(t==L&&y)return new Uint8Array(y);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function Y(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function J(e){for(;e.length>0;)e.shift()(t)}q(L="openjphjs.wasm")||(N=L,L=t.locateFile?t.locateFile(N,h):h+N);var Z=[],Q=0,K=[];function tt(t){var e=K[t];return e||(t>=K.length&&(K.length=t+1),K[t]=e=x.get(t)),e}function et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Me(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(_[t>>2])}var it={},at={},st={},ut=48,ct=57;function lt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ut&&e<=ct?"_"+t:t}function ft(t,e){return t=lt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function pt(t,e){var r=ft(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ht=void 0;function dt(t){throw new ht(t)}function vt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&dt("Mismatched type converter count");for(var o=0;o<t.length;++o)Tt(t[o],n[o])}t.forEach((function(t){st[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{at.hasOwnProperty(t)?o[e]=at[t]:(i.push(t),it.hasOwnProperty(t)||(it[t]=[]),it[t].push((()=>{o[e]=at[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function yt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var mt=void 0;function gt(t){for(var e="",r=t;C[r];)e+=mt[C[r++]];return e}var wt=void 0;function bt(t){throw new wt(t)}function Tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||bt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;bt("Cannot register type '"+n+"' twice")}if(at[t]=e,delete st[t],it.hasOwnProperty(t)){var o=it[t];delete it[t],o.forEach((t=>t()))}}function Ct(t){if(!(this instanceof Nt))return!1;if(!(t instanceof Nt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function $t(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Pt=!1;function _t(t){}function At(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Et(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Et(t,e,r.baseClass);return null===n?null:r.downcast(n)}var kt={};function St(){return Object.keys(xt).length}function Wt(){var t=[];for(var e in xt)xt.hasOwnProperty(e)&&t.push(xt[e]);return t}var Rt=[];function jt(){for(;Rt.length;){var t=Rt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ft=void 0;function Ot(t){Ft=t,Rt.length&&Ft&&Ft(jt)}var xt={};function Dt(t,e){return e=function(t,e){for(void 0===e&&bt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),xt[e]}function Ut(t,e){return e.ptrType&&e.ptr||dt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&dt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ht(Object.create(t,{$$:{value:e}}))}function It(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Dt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Ut(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ut(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=kt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Et(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ht(t){return"undefined"==typeof FinalizationRegistry?(Ht=t=>t,t):(Pt=new FinalizationRegistry((t=>{At(t.$$)})),Ht=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Pt.register(t,r,t)}return t},_t=t=>Pt.unregister(t),Ht(t))}function Mt(){if(this.$$.ptr||$t(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ht(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Vt(){this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),_t(this),At(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function zt(){return!this.$$.ptr}function Lt(){return this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Rt.push(this),1===Rt.length&&Ft&&Ft(jt),this.$$.deleteScheduled=!0,this}function Nt(){}function Bt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||bt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function qt(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&bt("Cannot register public name '"+e+"' twice"),Bt(t,e,e),t.hasOwnProperty(n)&&bt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Xt(t,e,r){for(;e!==r;)e.upcast||bt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Yt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Jt(t,e){var r;if(null===e)return this.isReference&&bt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Xt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ve.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function Zt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Kt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Jt:n?(this.toWireType=Yt,this.destructorFunction=null):(this.toWireType=Zt,this.destructorFunction=null)}function re(e,r,n){t.hasOwnProperty(e)||dt("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}function ne(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):tt(r).apply(null,n)}function oe(t,e){var r,n,o,i=(t=gt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ne(r,n,o)}):tt(e);return"function"!=typeof i&&bt("unknown function pointer with signature "+t+": "+e),i}var ie=void 0;function ae(t){var e=Oe(t),r=gt(e);return Fe(e),r}function se(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||at[e]||(st[e]?st[e].forEach(t):(r.push(e),n[e]=!0))})),new ie(t+": "+r.map(ae).join([", "]))}function ue(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ce(t,e,r,n,o){var i=e.length;i<2&&bt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+lt(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[bt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ft(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var le=[],fe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function pe(t){t>4&&0==--fe[t].refcount&&(fe[t]=void 0,le.push(t))}function he(){for(var t=0,e=5;e<fe.length;++e)void 0!==fe[e]&&++t;return t}function de(){for(var t=5;t<fe.length;++t)if(void 0!==fe[t])return fe[t];return null}var ve={toValue:t=>(t||bt("Cannot use deleted val. handle = "+t),fe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=le.length?le.pop():fe.length;return fe[e]={refcount:1,value:t},e}}};function ye(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function me(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ge(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var we="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function be(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&we)return we.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function Ce(t){return 2*t.length}function $e(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Pe(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function _e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function Ae(t){try{return w.grow(t-b.byteLength+65535>>>16),O(w.buffer),1}catch(t){}}var Ee=[null,[],[]];function ke(t,e){var r=Ee[t];0===e||10===e?((1===t?m:g)(R(r,0)),r.length=0):r.push(e)}ht=t.InternalError=pt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);mt=t}(),wt=t.BindingError=pt(Error,"BindingError"),Nt.prototype.isAliasOf=Ct,Nt.prototype.clone=Mt,Nt.prototype.delete=Vt,Nt.prototype.isDeleted=zt,Nt.prototype.deleteLater=Lt,t.getInheritedInstanceCount=St,t.getLiveInheritedInstances=Wt,t.flushPendingDeletes=jt,t.setDelayFunction=Ot,ee.prototype.getPointee=Qt,ee.prototype.destructor=Kt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=ot,ee.prototype.deleteObject=te,ee.prototype.fromWireType=It,ie=t.UnboundTypeError=pt(Error,"UnboundTypeError"),t.count_emval_handles=he,t.get_first_emval=de;var Se,We={L:function(t){var e=new et(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),Z.push(e),function(t){t.add_ref()}(e),e.get_exception_ptr()},v:function(){_setThrew(0),function(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&tt(e)(t.excPtr),je(t.excPtr)}}(Z.pop()),Q=0},c:function(){var t=Q;if(!t)return xe(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return xe(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return xe(o),t}return xe(r),t},k:function(){var t=Q;if(!t)return xe(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return xe(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return xe(o),t}return xe(r),t},i:function(t,e,r){throw new et(t).init(e,r),Q=t,t},f:function(t){throw Q||(Q=t),t},A:function(t){var e=rt[t];delete rt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;vt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),nt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:n}]}))},D:function(t,e,r,n,o){},I:function(t,e,r,n,o){var i=yt(r);Tt(t,{name:e=gt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},y:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=gt(l),i=oe(o,i),s&&(s=oe(a,s)),c&&(c=oe(u,c)),p=oe(f,p);var h=lt(l);qt(h,(function(){se("Cannot construct "+l+" due to unbound types",[n])})),vt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Nt.prototype;var a=ft(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new wt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new wt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new wt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Gt(l,a,u,p,r,i,s,c),d=new ee(l,f,!0,!1,!1),v=new ee(l+"*",f,!1,!1,!1),y=new ee(l+" const*",f,!1,!0,!1);return kt[t]={pointerType:v,constPointerType:y},re(h,a),[d,v,y]}))},x:function(t,e,r,n,o,i){var a;e>0||z(a);var s=ue(e,r);o=oe(n,o),vt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new wt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{se("Cannot construct "+t.name+" due to unbound types",s)},vt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ce(r,n,null,o,i),[]})),[]}))},a:function(t,e,r,n,o,i,a,s){var u=ue(r,n);e=gt(e),i=oe(o,i),vt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){se("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Bt(c,e,n),c[e].overloadTable[r-2]=o),vt([],u,(function(o){var s=ce(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},H:function(t,e){Tt(t,{name:e=gt(e),fromWireType:function(t){var e=ve.toValue(t);return pe(t),e},toWireType:function(t,e){return ve.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},u:function(t,e,r){var n=yt(r);Tt(t,{name:e=gt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:me(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=ue(e,r);t=gt(t),o=oe(n,o),qt(t,(function(){se("Cannot call "+t+" due to unbound types",a)}),e-1),vt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return re(t,ce(t,n,null,o,i),e-1),[]}))},h:function(t,e,r,n,o){e=gt(e),-1===o&&(o=4294967295);var i=yt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Tt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ge(e,i,0!==n),destructorFunction:null})},d:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}Tt(t,{name:r=gt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=gt(e));Tt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=j(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return Fe(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||bt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=Re(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)F(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Fe(a),bt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(Fe,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},q:function(t,e,r){var n,o,i,a,s;r=gt(r),2===e?(n=be,o=Te,a=Ce,i=()=>P,s=1):4===e&&(n=$e,o=Pe,a=_e,i=()=>A,s=2),Tt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Fe(t),r},toWireType:function(t,n){"string"!=typeof n&&bt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Re(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Fe,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},p:function(t,e,r,n,o,i){rt[t]={name:gt(e),rawConstructor:oe(r,n),rawDestructor:oe(o,i),fields:[]}},B:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:gt(e),getterReturnType:r,getter:oe(n,o),getterContext:i,setterArgumentType:a,setter:oe(s,u),setterContext:c})},J:function(t,e){Tt(t,{isVoid:!0,name:e=gt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},N:pe,O:function(t){t>4&&(fe[t].refcount+=1)},n:function(t,e){var r,n,o;n="_emval_take_value",void 0===(o=at[r=t])&&bt(n+" has unknown type "+ae(r));var i=(t=o).readValueFromPointer(e);return ve.toHandle(i)},r:function(){z("")},G:function(t,e,r){C.copyWithin(t,e,e+r)},E:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Ae(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},F:function(t){return 52},C:function(t,e,r,n,o){return 70},s:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)ke(t,C[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=De();try{return tt(t)(e)}catch(t){if(Ue(r),t!==t+0)throw t;_setThrew(1,0)}},z:function(t,e,r){var n=De();try{return tt(t)(e,r)}catch(t){if(Ue(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=De();try{return tt(t)(e,r,n)}catch(t){if(Ue(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=De();try{tt(t)(e)}catch(t){if(Ue(r),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r){var n=De();try{tt(t)(e,r)}catch(t){if(Ue(n),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n){var o=De();try{tt(t)(e,r,n)}catch(t){if(Ue(o),t!==t+0)throw t;_setThrew(1,0)}},j:function(t,e,r,n,o){var i=De();try{tt(t)(e,r,n,o)}catch(t){if(Ue(i),t!==t+0)throw t;_setThrew(1,0)}},K:function(t,e,r,n,o,i,a){var s=De();try{tt(t)(e,r,n,o,i,a)}catch(t){if(Ue(s),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=De();try{tt(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Ue(f),t!==t+0)throw t;_setThrew(1,0)}},M:function(t){return t}},Re=(function(){var e={a:We};function r(e,r){var n,o=e.exports;t.asm=o,O((w=t.asm.P).buffer),x=t.asm.T,n=t.asm.Q,U.unshift(n),function(){if(H--,t.monitorRunDependencies&&t.monitorRunDependencies(H),0==H&&(null!==M&&(clearInterval(M),M=null),V)){var e=V;V=null,e()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!y&&(l||f)){if("function"==typeof fetch&&!G(L))return fetch(L,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+L+"'";return t.arrayBuffer()})).catch((function(){return X(L)}));if(a)return new Promise((function(t,e){a(L,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return X(L)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){g("failed to asynchronously prepare wasm: "+t),z(t)}))}if(H++,t.monitorRunDependencies&&t.monitorRunDependencies(H),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(y||"function"!=typeof WebAssembly.instantiateStreaming||q(L)||G(L)||p||"function"!=typeof fetch?i(n):fetch(L,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.Q).apply(null,arguments)},t._malloc=function(){return(Re=t._malloc=t.asm.R).apply(null,arguments)}),je=t.___cxa_free_exception=function(){return(je=t.___cxa_free_exception=t.asm.S).apply(null,arguments)},Fe=t._free=function(){return(Fe=t._free=t.asm.U).apply(null,arguments)},Oe=t.___getTypeName=function(){return(Oe=t.___getTypeName=t.asm.V).apply(null,arguments)},xe=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.W).apply(null,arguments)},t.setTempRet0=function(){return(xe=t.setTempRet0=t.asm.X).apply(null,arguments)}),De=t.stackSave=function(){return(De=t.stackSave=t.asm.Y).apply(null,arguments)},Ue=t.stackRestore=function(){return(Ue=t.stackRestore=t.asm.Z).apply(null,arguments)},Ie=t.stackAlloc=function(){return(Ie=t.stackAlloc=t.asm._).apply(null,arguments)},He=t.___cxa_can_catch=function(){return(He=t.___cxa_can_catch=t.asm.$).apply(null,arguments)},Me=t.___cxa_is_pointer_type=function(){return(Me=t.___cxa_is_pointer_type=t.asm.aa).apply(null,arguments)};function Ve(r){function n(){Se||(Se=!0,t.calledRun=!0,S||(J(U),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),I.unshift(e);var e;J(I)}()))}r=r||c,H>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),D.unshift(e);var e;J(D)}(),H>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),n()}),1)):n()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.ba).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.ca).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.da).apply(null,arguments)},t.ccall=function(e,r,n,o,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);F(t,e=Ie(r),r)}return e},array:t=>{var e=Ie(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(e){return t["_"+e]}(e),u=[],c=0;if(o)for(var l=0;l<o.length;l++){var f=a[n[l]];f?(0===c&&(c=De()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ue(c),function(t){return"string"===r?j(t):"boolean"===r?Boolean(t):t}(t)}(p)},V=function t(){Se||Ve(),Se||(V=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Ve(),t.ready});t.exports=o},69:(t,e,r)=>{"use strict";t.exports=r.p+"5004fdc02f329ce53b69.wasm"},427:(t,e,r)=>{"use strict";t.exports=r.p+"c22b37c3488e1d6c3aa4.wasm"},699:(t,e,r)=>{"use strict";t.exports=r.p+"031089e563a18ada8441.wasm"},813:(t,e,r)=>{"use strict";t.exports=r.p+"20fc4c659b85ccd2a9c0.wasm"},635:(t,e,r)=>{"use strict";r.d(e,{Jj:()=>l});const n=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),u=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>u(t)&&t[n],serialize(t){const{port1:e,port2:r}=new MessageChannel;return l(t,e),[r,[r]]},deserialize(t){return t.start(),y(t,[],e);var e}}],["throw",{canHandle:t=>u(t)&&s in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function l(t,e=globalThis,r=["*"]){e.addEventListener("message",(function o(i){if(!i||!i.data)return;if(!function(t,e){for(const r of t){if(e===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}return!1}(r,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:u,type:c,path:p}=Object.assign({path:[]},i.data),h=(i.data.argumentList||[]).map(b);let d;try{const e=p.slice(0,-1).reduce(((t,e)=>t[e]),t),r=p.reduce(((t,e)=>t[e]),t);switch(c){case"GET":d=r;break;case"SET":e[p.slice(-1)[0]]=b(i.data.value),d=!0;break;case"APPLY":d=r.apply(e,h);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[n]:!0})}(new r(...h));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;l(t,r),d=function(t,e){return g.set(t,e),t}(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(t){d={value:t,[s]:0}}Promise.resolve(d).catch((t=>({value:t,[s]:0}))).then((r=>{const[n,i]=w(r);e.postMessage(Object.assign(Object.assign({},n),{id:u}),i),"RELEASE"===c&&(e.removeEventListener("message",o),f(e),a in t&&"function"==typeof t[a]&&t[a]())})).catch((t=>{const[r,n]=w({value:new TypeError("Unserializable return value"),[s]:0});e.postMessage(Object.assign(Object.assign({},r),{id:u}),n)}))})),e.start&&e.start()}function f(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function p(t){if(t)throw new Error("Proxy has been released and is not useable")}function h(t){return T(t,{type:"RELEASE"}).then((()=>{f(t)}))}const d=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(d.get(t)||0)-1;d.set(t,e),0===e&&h(t)}));function y(t,e=[],r=function(){}){let n=!1;const a=new Proxy(r,{get(r,o){if(p(n),o===i)return()=>{!function(t){v&&v.unregister(t)}(a),h(t),n=!0};if("then"===o){if(0===e.length)return{then:()=>a};const r=T(t,{type:"GET",path:e.map((t=>t.toString()))}).then(b);return r.then.bind(r)}return y(t,[...e,o])},set(r,o,i){p(n);const[a,s]=w(i);return T(t,{type:"SET",path:[...e,o].map((t=>t.toString())),value:a},s).then(b)},apply(r,i,a){p(n);const s=e[e.length-1];if(s===o)return T(t,{type:"ENDPOINT"}).then(b);if("bind"===s)return y(t,e.slice(0,-1));const[u,c]=m(a);return T(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:u},c).then(b)},construct(r,o){p(n);const[i,a]=m(o);return T(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:i},a).then(b)}});return function(t,e){const r=(d.get(e)||0)+1;d.set(e,r),v&&v.register(t,e,t)}(a,t),a}function m(t){const e=t.map(w);return[e.map((t=>t[0])),(r=e.map((t=>t[1])),Array.prototype.concat.apply([],r))];var r}const g=new WeakMap;function w(t){for(const[e,r]of c)if(r.canHandle(t)){const[n,o]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},o]}return[{type:"RAW",value:t},g.get(t)||[]]}function b(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function T(t,e,r){return new Promise((n=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.addEventListener("message",(function e(r){r.data&&r.data.id&&r.data.id===o&&(t.removeEventListener("message",e),n(r.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:o},e),r)}))}}}]);
|
|
3
|
-
//# sourceMappingURL=958.min.js.map
|