dicomweb-pacs
Version:
A self contained easy to use PACS with DICOMWEB and DIMSE service support
3 lines • 147 kB
JavaScript
/*! For license information please see 3353.bundle.8e3d8ce70a6b548a5e16.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[3353],{93720:(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,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var v=r(84595),y=r(53615);h=p?y.dirname(h)+"/":"//",a=(t,e)=>(t=G(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=G(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 J))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?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):"",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 g,m=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&&(g=i.wasmBinary);var w;i.noExitRuntime;"object"!=typeof WebAssembly&&M("no native wasm support detected");var b,T,P,C,$,_,A,S,E,x=!1,k="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&&k)return k.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}(P,t,e):""}function O(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 F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=C=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=$=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=S=new Float32Array(t),i.HEAPF64=E=new Float64Array(t)}i.INITIAL_MEMORY;var W,D=[],j=[],I=[],U=0,L=null,H=null;function M(t){i.onAbort&&i.onAbort(t),m(t="Aborted("+t+")"),x=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var B,V,z="data:application/octet-stream;base64,";function N(t){return t.startsWith(z)}function G(t){return t.startsWith("file://")}function q(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){M(t)}}function J(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(t){for(;t.length>0;)t.shift()(i)}function Y(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(je(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}N(B="charlswasm_decode.wasm")||(V=B,B=i.locateFile?i.locateFile(V,h):h+V);var K={};function Z(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Q(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 dt(t){for(var e="",r=t;P[r];)e+=pt[P[r++]];return e}var ht=void 0;function vt(t){throw new ht(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 gt(t){if(!(this instanceof Lt))return!1;if(!(t instanceof Lt))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 mt(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 Pt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Pt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Ct={};function $t(){return Object.keys(kt).length}function _t(){var t=[];for(var e in kt)kt.hasOwnProperty(e)&&t.push(kt[e]);return t}var At=[];function St(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var Et=void 0;function xt(t){Et=t,At.length&&Et&&Et(St)}var kt={};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),kt[e]}function Ot(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},Wt(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?Ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=Ct[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Pt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Wt(t){return"undefined"==typeof FinalizationRegistry?(Wt=t=>t,t):(wt=new FinalizationRegistry((t=>{Tt(t.$$)})),Wt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};wt.register(t,r,t)}return t},bt=t=>wt.unregister(t),Wt(t))}function Dt(){if(this.$$.ptr||mt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Wt(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 jt(){this.$$.ptr||mt(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 It(){return!this.$$.ptr}function Ut(){return this.$$.ptr||mt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),At.push(this),1===At.length&&Et&&Et(St),this.$$.deleteScheduled=!0,this}function Lt(){}function Ht(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 Mt(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"),Ht(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 Bt(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 Vt(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 zt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+de(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 Vt(e.$$.ptr,r,this.registeredClass)}function Nt(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 "'+de(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=Vt(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 Gt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+de(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 Vt(e.$$.ptr,r,this.registeredClass)}function qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Xt(t){null!==t&&t.delete()}function Yt(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=Nt:n?(this.toWireType=zt,this.destructorFunction=null):(this.toWireType=Gt,this.destructorFunction=null)}function Kt(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 Zt=[];function Qt(t){var e=Zt[t];return e||(t>=Zt.length&&(Zt.length=t+1),Zt[t]=e=W.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):Qt(e).apply(null,r)}function ee(t,e){var r,n,o,i=(t=dt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),te(r,n,o)}):Qt(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=dt(e);return Oe(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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[vt,n,o,Z,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.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",h.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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,h).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 de(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function he(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(E[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 P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[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 ge(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&ye)return ye.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function me(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);C[e>>1]=a,e+=2}return C[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 Pe(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 Ce={};function $e(){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 Se(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}(),ht=i.BindingError=st(Error,"BindingError"),Lt.prototype.isAliasOf=gt,Lt.prototype.clone=Dt,Lt.prototype.delete=jt,Lt.prototype.isDeleted=It,Lt.prototype.deleteLater=Ut,i.getInheritedInstanceCount=$t,i.getLiveInheritedInstances=_t,i.flushPendingDeletes=St,i.setDelayFunction=xt,Yt.prototype.getPointee=qt,Yt.prototype.destructor=Jt,Yt.prototype.argPackAdvance=8,Yt.prototype.readValueFromPointer=Q,Yt.prototype.deleteObject=Xt,Yt.prototype.fromWireType=Ft,re=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=le,i.get_first_emval=fe;var Ee,xe={h:function(t,e,r){throw new Y(t).init(e,r),t},q:function(t){var e=K[t];delete K[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)),Z(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:Q,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ft(r);yt(t,{name:e=dt(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=C;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=dt(l),i=ee(o,i),s&&(s=ee(a,s)),c&&(c=ee(u,c)),p=ee(f,p);var d=it(l);Mt(d,(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:Lt.prototype;var a=at(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new ht("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new ht(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new ht("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 Bt(l,a,u,p,r,i,s,c),h=new Yt(l,f,!0,!1,!1),v=new Yt(l+"*",f,!1,!1,!1),y=new Yt(l+" const*",f,!1,!0,!1);return Ct[t]={pointerType:v,constPointerType:y},Kt(d,a),[h,v,y]}))},o:function(t,e,r,n,o,i){var a;e>0||M(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 ht("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=dt(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):(Ht(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=dt(e),fromWireType:function(t){var e=pe.toValue(t);return ce(t),e},toWireType:function(t,e){return pe.toHandle(e)},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:null})},k:function(t,e,r){var n=ft(r);yt(t,{name:e=dt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:he(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=ie(e,r);t=dt(t),o=ee(n,o),Mt(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 Kt(t,ae(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=dt(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=dt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=dt(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==P[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(P[o+a]);e=c.join("")}return Oe(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=ke(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)O(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Oe(a),vt("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(Oe,i),i},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Oe(t)}})},g:function(t,e,r){var n,o,i,a,s;r=dt(r),2===e?(n=ge,o=me,a=we,i=()=>$,s=1):4===e&&(n=be,o=Te,a=Pe,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 Oe(t),r},toWireType:function(t,n){"string"!=typeof n&&vt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=ke(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Oe,u),u},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Oe(t)}})},u:function(t,e,r,n,o,i){K[t]={name:dt(e),rawConstructor:ee(r,n),rawDestructor:ee(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){K[t].fields.push({fieldName:dt(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=dt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ce,m:function(t){return 0===t?pe.toHandle($e()):(t=void 0===(r=Ce[e=t])?dt(e):r,pe.toHandle($e()[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(){M("")},t:function(t,e,r){P.copyWithin(t,e,e+r)},s: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),Se(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},ke=(function(){var t={a:xe};function e(t,e){var r,n=t.exports;i.asm=n,F((w=i.asm.z).buffer),W=i.asm.C,r=i.asm.A,j.unshift(r),function(t){if(U--,i.monitorRunDependencies&&i.monitorRunDependencies(U),0==U&&(null!==L&&(clearInterval(L),L=null),H)){var e=H;H=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(f||p)){if("function"==typeof fetch&&!G(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 q(B)}));if(s)return new Promise((function(t,e){s(B,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return q(B)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){m("failed to asynchronously prepare wasm: "+t),M(t)}))}if(U++,i.monitorRunDependencies&&i.monitorRunDependencies(U),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){m("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||N(B)||G(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 m("wasm streaming compile failed: "+t),m("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(ke=i._malloc=i.asm.B).apply(null,arguments)}),Re=i.___getTypeName=function(){return(Re=i.___getTypeName=i.asm.D).apply(null,arguments)},Oe=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(Oe=i._free=i.asm.F).apply(null,arguments)}),Fe=i.stackSave=function(){return(Fe=i.stackSave=i.asm.G).apply(null,arguments)},We=i.stackRestore=function(){return(We=i.stackRestore=i.asm.H).apply(null,arguments)},De=i.stackAlloc=function(){return(De=i.stackAlloc=i.asm.I).apply(null,arguments)},je=i.___cxa_is_pointer_type=function(){return(je=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Ie(t){function r(){Ee||(Ee=!0,i.calledRun=!0,x||(X(j),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(),I.unshift(t);var t;X(I)}()))}t=t||l,U>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),D.unshift(t);var t;X(D)}(),U>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);O(t,e=De(r),r)}return e},array:t=>{var e=De(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&&We(c),function(t){return"string"===e?R(t):"boolean"===e?Boolean(t):t}(t)}(p)},H=function t(){Ee||Ie(),Ee||(H=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ie(),t.ready});t.exports=o},36317:(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},d="object"==typeof window,h="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(v){var g=r(1404),m=r(40604);y=h?m.dirname(y)+"/":"//",a=(t,e)=>(t=Z(t)?new URL(t):m.normalize(t),g.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=Z(t)?new URL(t):m.normalize(t),g.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(V())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(d||h)&&(h?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},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 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 P,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&q("no native wasm support detected");var $,_,A,S,E,x,k,R,O,F=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(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?D(A,t,e):""}function I(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 U(t){$=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=S=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=E=new Uint16Array(t),i.HEAPU32=k=new Uint32Array(t),i.HEAPF32=R=new Float32Array(t),i.HEAPF64=O=new Float64Array(t)}i.INITIAL_MEMORY;var L,H=[],M=[],B=[];function V(){return C}var z=0,N=null,G=null;function q(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 J,X,Y="data:application/octet-stream;base64,";function K(t){return t.startsWith(Y)}function Z(t){return t.startsWith("file://")}function Q(t){try{if(t==J&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){q(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){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){x[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=x[this.ptr>>2];x[this.ptr>>2]=t+1},this.release_ref=function(){var t=x[this.ptr>>2];return x[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(Ge(this.get_type()))return k[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}K(J="libjpegturbowasm_decode.wasm")||(X=J,J=i.locateFile?i.locateFile(X,y):y+X);var nt={};function ot(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function it(t){return this.fromWireType(x[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 dt(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 ht=void 0;function vt(t){throw new ht(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)Pt(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 gt(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 wt(t){for(var e="",r=t;A[r];)e+=mt[A[r++]];return e}var bt=void 0;function Tt(t){throw new bt(t)}function Pt(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 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){Tt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function At(t){}function St(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 xt={};function kt(){return Object.keys(jt).length}function Rt(){var t=[];for(var e in jt)jt.hasOwnProperty(e)&&t.push(jt[e]);return t}var Ot=[];function Ft(){for(;Ot.length;){var t=Ot.pop();t.$$.deleteScheduled=!1,t.delete()}}var Wt=void 0;function Dt(t){Wt=t,Ot.length&&Wt&&Wt(Ft)}var jt={};function It(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),jt[e]}function Ut(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},Ht(Object.create(t,{$$:{value:e}}))}function Lt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=It(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=xt[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):(_t=new FinalizationRegistry((t=>{St(t.$$)})),Ht=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};_t.register(t,r,t)}return t},At=t=>_t.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 Bt(){this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),At(this),St(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Vt(){return!this.$$.ptr}function zt(){return this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),Ot.push(this),1===Ot.length&&Wt&&Wt(Ft),this.$$.deleteScheduled=!0,this}function Nt(){}function Gt(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 qt(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 Jt(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 Xt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+ge(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 Jt(e.$$.ptr,r,this.registeredClass)}function Yt(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 "'+ge(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=Jt(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 Kt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+ge(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 Jt(e.$$.ptr,r,this.registeredClass)}function Zt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Qt(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=Yt:n?(this.toWireType=Xt,this.destructorFunction=null):(this.toWireType=Kt,this.destructorFunction=null)}var re=[];function ne(t){var e=re[t];return e||(t>=re.length&&(re.length=t+1),re[t]=e=L.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=Me(t),r=wt(e);return He(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(k[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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[Tt,n,o,ot,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.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",h.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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,h).apply(null,v)}var fe=[],pe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function de(t){t>4&&0==--pe[t].refcount&&(pe[t]=void 0,fe.push(t))}function he(){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 ge(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(R[t>>2])};case 3:return function(t){return this.fromWireType(O[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 S[t>>1]}:function(t){return E[t>>1]};case 2:return r?function(t){return x[t>>2]}:function(t){return k[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)&&E[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=S[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Pe(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);S[e>>1]=a,e+=2}return S[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=x[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)),x[e>>2]=a,(e+=4)+4>o)break}return x[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 Se={};function Ee(){return"object"==typeof globalThis?globalThis:Function("return this")()}function xe(t,e){var r=st[t];return void 0===r&&Tt(e+" has unknown type "+se(t)),r}var ke={};function Re(t){try{return P.grow(t-$.byteLength+65535>>>16),U(P.buffer),1}catch(t){}}var Oe={};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 Oe)void 0===Oe[e]?delete t[e]:t[e]=Oe[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Fe.strings=r}return Fe.strings}var We=function(t,e){var r;r=t,V()||(i.onExit&&i.onExit(r),F=!0),p(r,new tt(r))},De=[null,[],[]];function je(t,e){var r=De[t];0===e||10===e?((1===t?b:T)(D(r,0)),r.length=0):r.push(e)}ht=i.InternalError=dt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);mt=t}(),bt=i.BindingError=dt(Error,"BindingError"),Nt.prototype.isAliasOf=Ct,Nt.prototype.clone=Mt,Nt.prototype.delete=Bt,Nt.prototype.isDeleted=Vt,Nt.prototype.deleteLater=zt,i.getInheritedInstanceCount=kt,i.getLiveInheritedInstances=Rt,i.flushPendingDeletes=Ft,i.setDelayFunction=Dt,ee.prototype.getPointee=Zt,ee.prototype.destructor=Qt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=it,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Lt,ae=i.UnboundTypeError=dt(Error,"UnboundTypeError"),i.count_emval_handles=he,i.get_first_emval=ve;var Ie,Ue={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=gt(r);Pt(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=S;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=x}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=wt(f),a=ie(o,a),u&&(u=ie(s,u)),l&&(l=ie(c,l)),d=ie(p,d);var h=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"),Gt(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))}(h,(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:Nt.prototype;var s=pt(h,(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 qt(f,s,c,d,r,a,u,l),v=new ee(f,p,!0,!1,!1),y=new ee(f+"*",p,!1,!1,!1),g=new ee(f+" const*",p,!1,!0,!1);return xt[t]={pointerType:y,constPointerType:g},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)}(h,s),[v,y,g]}))},t:function(t,e,r,n,o,i){var a;e>0||q(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):(Gt(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){Pt(t,{name:e=wt(e),fromWireType:function(t){var e=ye.toValue(t);return de(t),e},toWireType:function(t,e){return ye.toHandle(e)},argPackAdvance:8,readValueFromPointer:it,destructorFunction:null})},m:function(t,e,r){var n=gt(r);Pt(t,{name:e=wt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:me(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=wt(e),-1===o&&(o=4294967295);var i=gt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Pt(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=k,r=e[t>>=2],o=e[t+1];return new n($,o,r)}Pt(t,{name:r=wt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=wt(e));Pt(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==A[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(A[o+a]);e=c.join("")}return He(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=Le(4+n+1),a=i+4;if(k[i>>2]=n,r&&o)I(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(He(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(He,i),i},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){He(t)}})},h:function(t,e,r){var n,o,i,a,s;r=wt(r),2===e?(n=Te,o=Pe,a=Ce,i=()=>E,s=1):4===e&&(n=$e,o=_e,a=Ae,i=()=>k,s=2),Pt(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 He(t),r},toWireType:function(t,n){"string"!=typeof n&&Tt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Le(4+i+e);return k[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(He,u),u},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){He(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){Pt(t,{isVoid:!0,name:e=wt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:de,r:function(t){return 0===t?ye.toHandle(Ee()):(t=void 0===(r=Se[e=t])?wt(e):r,ye.toHandle(Ee()[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=ke[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)(xe,i,ye.toHandle,(()=>k))}(e),ke[e]=o),o(t,r,n)},s:function(t,e){var r=(t=xe(t,"_emval_take_value")).readValueFromPointer(e);return ye.toHandle(r)},j:function(){q("")},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;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},B:function(t,e){var r=Fe();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0},I:We,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=k[e>>2],s=k[e+4>>2];e+=8;for(var u=0;u<s;u++)je(t,A[a+u]);o+=s}return k[n>>2]=o,0},o:function(t,e){var r=Ve();try{return ne(t)(e)}catch(t){if(ze(r),t!==t+0)throw t;Be(1,0)}},n:function(t,e,r){var n=Ve();try{return ne(t)(e,r)}catch(t){if(ze(n),t!==t+0)throw t;Be(1,0)}},H:function(t,e,r,n){var o=Ve();try{return ne(t)(e,r,n)}catch(t){if(ze(o),t!==t+0)throw t;Be(1,0)}},f:function(t,e){var r=Ve();try{ne(t)(e)}catch(t){if(ze(r),t!==t+0)throw t;Be(1,0)}},e:function(t,e,r,n){var o=Ve();try{ne(t)(e,r,n)}catch(t){if(ze(o),t!==t+0)throw t;Be(1,0)}}},Le=(function(){var t={a:Ue};function e(t,e){var r,n=t.exports;i.asm=n,U((P=i.asm.K).buffer),L=i.asm.M,r=i.asm.L,M.unshift(r),function(t){if(z--,i.monitorRunDependencies&&i.monitorRunDependencies(z),0==z&&(null!==N&&(clearInterval(N),N=null),G)){var e=G;G=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(d||h)){if("function"==typeof fetch&&!Z(J))return fetch(J,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+J+"'";return t.arrayBuffer()})).catch((function(){return Q(J)}));if(s)return new Promise((function(t,e){s(J,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Q(J)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),q(t)}))}if(z++,i.monitorRunDependencies&&i.monitorRunDependencies(z),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||K(J)||Z(J)||v||"function"!=typeof fetch?n(r):fetch(J,{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(Le=i._malloc=i.asm.N).apply(null,arguments)}),He=i._free=function(){return(He=i._free=i.asm.O).apply(null,arguments)},Me=i.___getTypeName=function(){return(Me=i.___getTypeName=i.asm.P).apply(null,arguments)},Be=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(Be=i._setThrew=i.asm.R).apply(null,arguments)}),Ve=i.stackSave=function(){return(Ve=i.stackSave=i.asm.S).apply(null,arguments)},ze=i.stackRestore=function(){return(ze=i.stackRestore=i.asm.T).apply(null,arguments)},Ne=i.stackAlloc=function(){return(Ne=i.stackAlloc=i.asm.U).apply(null,arguments)},Ge=i.___cxa_is_pointer_type=function(){return(Ge=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function qe(t){function r(){Ie||(Ie=!0,i.calledRun=!0,F||(et(M),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(),B.unshift(t);var t;et(B)}()))}t=t||l,z>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),H.unshift(t);var t;et(H)}(),z>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);I(t,e=Ne(r),r)}return e},array:t=>{var e=Ne(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=Ve()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&ze(c),function(t){return"string"===e?j(t):"boolean"===e?Boolean(t):t}(t)}(p)},G=function t(){Ie||qe(),Ie||(G=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return qe(),t.ready});t.exports=o},53488:(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,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(h){var y=r(2394),g=r(24258);v=d?g.dirname(v)+"/":"//",a=(t,e)=>(t=X(t)?new URL(t):g.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=X(t)?new URL(t):g.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 K))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||d)&&(d?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},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 m,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&&(m=i.wasmBinary);var T;i.noExitRuntime;"object"!=typeof WebAssembly&&z("no native wasm support detected");var P,C,$,_,A,S,E,x,k,R=!1,O="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&&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 W(t,e){return t?F($,t,e):""}function D(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,$,e,r)}function j(t){P=t,i.HEAP8=C=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=S=new Int32Array(t),i.HEAPU8=$=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=E=new Uint32Array(t),i.HEAPF32=x=new Float32Array(t),i.HEAPF64=k=new Float64Array(t)}i.INITIAL_MEMORY;var I,U=[],L=[],H=[],M=0,B=null,V=null;function z(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 N,G,q="data:application/octet-stream;base64,";function J(t){return t.startsWith(q)}function X(t){return t.startsWith("file://")}function Y(t){try{if(t==N&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function K(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Z(t){for(;t.length>0;)t.shift()(i)}function Q(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){E[this.ptr+4>>2]=t},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(t){E[this.ptr+8>>2]=t},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_refcount=function(t){S[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,C[this.ptr+12|0]=t},this.get_caught=function(){return 0!=C[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,C[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=C[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){E[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Me(this.get_type()))return E[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}J(N="openjpegwasm_decode.wasm")||(G=N,N=i.locateFile?i.locateFile(G,v):v+G);var tt={};function et(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function rt(t){return this.fromWireType(S[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 dt(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 ht(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;$[r];)e+=vt[$[r++]];return e}var gt=void 0;function mt(t){throw new gt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||mt('type "'+n+'" must have a positive integer typeid pointer'),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;mt("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 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 Tt(t){mt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Pt=!1;function Ct(t){}function $t(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 St(){return Object.keys(Ft).length}function Et(){var t=[];for(var e in Ft)Ft.hasOwnProperty(e)&&t.push(Ft[e]);return t}var xt=[];function kt(){for(;xt.length;){var t=xt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Rt=void 0;function Ot(t){Rt=t,xt.length&&Rt&&Rt(kt)}var Ft={};function Wt(t,e){return e=function(t,e){for(void 0===e&&mt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ft[e]}function Dt(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},It(Object.create(t,{$$:{value:e}}))}function jt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Wt(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?Dt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Dt(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?Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function It(t){return"undefined"==typeof FinalizationRegistry?(It=t=>t,t):(Pt=new FinalizationRegistry((t=>{$t(t.$$)})),It=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Pt.register(t,r,t)}return t},Ct=t=>Pt.unregister(t),It(t))}function Ut(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=It(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 Lt(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),Ct(this),$t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ht(){return!this.$$.ptr}function Mt(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),xt.push(this),1===xt.length&&Rt&&Rt(kt),this.$$.deleteScheduled=!0,this}function Bt(){}function Vt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||mt("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 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 Nt(t,e,r){for(;e!==r;)e.upcast||mt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Gt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Nt(e.$$.ptr,r,this.registeredClass)}function qt(t,e){var r;if(null===e)return this.isReference&&mt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&mt("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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&mt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:mt("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,de.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:mt("Unsupporting sharing policy")}return r}function Jt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Nt(e.$$.ptr,r,this.registeredClass)}function Xt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Yt(t){this.rawDestructor&&this.rawDestructor(t)}function Kt(t){null!==t&&t.delete()}function Zt(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=qt:n?(this.toWireType=Gt,this.destructorFunction=null):(this.toWireType=Jt,this.destructorFunction=null)}var Qt=[];function te(t){var e=Qt[t];return e||(t>=Qt.length&&(Qt.length=t+1),Qt[t]=e=I.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&&mt("unknown function pointer with signature "+t+": "+e),i}var ne=void 0;function oe(t){var e=Ie(t),r=yt(e);return je(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(E[e+4*n>>2]);return r}function se(t,e,r,n,o){var i=e.length;i<2&&mt("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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[mt,n,o,et,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.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",h.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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,h).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 de={toValue:t=>(t||mt("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 he(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(x[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ye(t,e,r){switch(e){case 0:return r?function(t){return C[t]}:function(t){return $[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return S[t>>2]}:function(t){return E[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ge="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)&&A[n];)++n;if((r=n<<1)-t>32&&ge)return ge.decode($.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=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 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)),S[e>>2]=a,(e+=4)+4>o)break}return S[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 _e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(t,e){var r=ot[t];return void 0===r&&mt(e+" has unknown type "+oe(t)),r}var Se={};function Ee(t){try{return T.grow(t-P.byteLength+65535>>>16),j(T.buffer),1}catch(t){}}var xe={};function ke(){if(!ke.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 xe)void 0===xe[e]?delete t[e]:t[e]=xe[e];var r=[];for(var e in t)r.push(e+"="+t[e]);ke.strings=r}return ke.strings}var Re=[null,[],[]];function Oe(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}(),gt=i.BindingError=lt(Error,"BindingError"),Bt.prototype.isAliasOf=bt,Bt.prototype.clone=Ut,Bt.prototype.delete=Lt,Bt.prototype.isDeleted=Ht,Bt.prototype.deleteLater=Mt,i.getInheritedInstanceCount=St,i.getLiveInheritedInstances=Et,i.flushPendingDeletes=kt,i.setDelayFunction=Ot,Zt.prototype.getPointee=Xt,Zt.prototype.destructor=Yt,Zt.prototype.argPackAdvance=8,Zt.prototype.readValueFromPointer=rt,Zt.prototype.deleteObject=Kt,Zt.prototype.fromWireType=jt,ne=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=fe,i.get_first_emval=pe;var Fe,We={D:function(t,e,r){throw new Q(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;dt([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=ht(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=C;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=S}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=yt(f),a=re(o,a),u&&(u=re(s,u)),l&&(l=re(c,l)),d=re(p,d);var h=ut(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&mt("Cannot register public name '"+t+"' twice"),Vt(i,t,t),i.hasOwnProperty(r)&&mt("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))}(h,(function(){ie("Cannot construct "+f+" due to unbound types",[n])})),dt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Bt.prototype;var s=ct(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new gt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new gt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new gt("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 zt(f,s,c,d,r,a,u,l),v=new Zt(f,p,!0,!1,!1),y=new Zt(f+"*",p,!1,!1,!1),g=new Zt(f+" const*",p,!1,!0,!1);return At[t]={pointerType:y,constPointerType:g},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)}(h,s),[v,y,g]}))},q:function(t,e,r,n,o,i){var a;e>0||z(a);var s=ae(e,r);o=re(n,o),dt([],[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 gt("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)},dt([],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),dt([],[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):(Vt(c,e,n),c[e].overloadTable[r-2]=o),dt([],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=de.toValue(t);return le(t),e},toWireType:function(t,e){return de.toHandle(e)},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:null})},l:function(t,e,r){var n=ht(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=ht(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=E,r=e[t>>=2],o=e[t+1];return new n(P,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=E[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==$[s]){var u=W(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($[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||mt("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=De(4+n+1),a=i+4;if(E[i>>2]=n,r&&o)D(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(je(a),mt("String has UTF-16 code units that do not fit in 8 bits")),$[a+s]=u}else for(s=0;s<n;++s)$[a+s]=e[s];return null!==t&&t.push(je,i),i},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){je(t)}})},f:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=me,o=we,a=be,i=()=>A,s=1):4===e&&(n=Te,o=Pe,a=Ce,i=()=>E,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=E[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&&mt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=De(4+i+e);return E[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(je,u),u},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){je(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?de.toHandle(_e()):(t=void 0===(r=$e[e=t])?yt(e):r,de.toHandle(_e()[t]));var e,r},m:function(t){t>4&&(ce[t].refcount+=1)},n:function(t,e,r,n){t=de.toValue(t);var o=Se[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,de.toHandle,(()=>E))}(e),Se[e]=o),o(t,r,n)},p:function(t,e){var r=(t=Ae(t,"_emval_take_value")).readValueFromPointer(e);return de.toHandle(r)},i:function(){z("")},v:function(){return 2147483648},z:function(t,e,r){$.copyWithin(t,e,e+r)},u:function(t){var e,r,n=$.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},w:function(t,e){var r=0;return ke().forEach((function(n,o){var i=e+r;E[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)C[0|e++]=t.charCodeAt(n);r||(C[0|e]=0)}(n,i),r+=n.length+1})),0},x:function(t,e){var r=ke();E[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),E[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=E[e>>2],s=E[e+4>>2];e+=8;for(var u=0;u<s;u++)Oe(t,$[a+u]);o+=s}return E[n>>2]=o,0}},De=(function(){var t={a:We};function e(t,e){var r,n=t.exports;i.asm=n,j((T=i.asm.E).buffer),I=i.asm.G,r=i.asm.F,L.unshift(r),function(t){if(M--,i.monitorRunDependencies&&i.monitorRunDependencies(M),0==M&&(null!==B&&(clearInterval(B),B=null),V)){var e=V;V=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(p||d)){if("function"==typeof fetch&&!X(N))return fetch(N,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+N+"'";return t.arrayBuffer()})).catch((function(){return Y(N)}));if(s)return new Promise((function(t,e){s(N,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Y(N)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),z(t)}))}if(M++,i.monitorRunDependencies&&i.monitorRunDependencies(M),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){b("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||J(N)||X(N)||h||"function"!=typeof fetch?n(r):fetch(N,{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(De=i._malloc=i.asm.H).apply(null,arguments)}),je=i._free=function(){return(je=i._free=i.asm.I).apply(null,arguments)},Ie=i.___getTypeName=function(){return(Ie=i.___getTypeName=i.asm.J).apply(null,arguments)},Ue=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(Ue=i.stackSave=i.asm.L).apply(null,arguments)}),Le=i.stackRestore=function(){return(Le=i.stackRestore=i.asm.M).apply(null,arguments)},He=i.stackAlloc=function(){return(He=i.stackAlloc=i.asm.N).apply(null,arguments)},Me=i.___cxa_is_pointer_type=function(){return(Me=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function Be(t){function r(){Fe||(Fe=!0,i.calledRun=!0,R||(Z(L),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(),H.unshift(t);var t;Z(H)}()))}t=t||l,M>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),U.unshift(t);var t;Z(U)}(),M>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);D(t,e=He(r),r)}return e},array:t=>{var e=He(t.length);return function(t,e){C.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=Ue()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Le(c),function(t){return"string"===e?W(t):"boolean"===e?Boolean(t):t}(t)}(p)},V=function t(){Fe||Be(),Fe||(V=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Be(),t.ready});t.exports=o},68112:(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,d="";if(p){var h=r(99570),v=r(45962);d=f?v.dirname(d)+"/":"//",i=(t,e)=>(t=q(t)?new URL(t):v.normalize(t),h.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=q(t)?new URL(t):v.normalize(t),h.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 X))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?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):"",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,g=t.print||console.log.bind(console),m=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&&B("no native wasm support detected");var b,T,P,C,$,_,A,S,E,x=!1,k="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&&k)return k.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?R(P,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,P,e,r)}function W(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=C=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=P=new Uint8Array(e),t.HEAPU16=$=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=S=new Float32Array(e),t.HEAPF64=E=new Float64Array(e)}t.INITIAL_MEMORY;var D,j=[],I=[],U=[],L=0,H=null,M=null;function B(e){t.onAbort&&t.onAbort(e),m(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var V,z,N="data:application/octet-stream;base64,";function G(t){return t.startsWith(N)}function q(t){return t.startsWith("file://")}function J(t){try{if(t==V&&y)return new Uint8Array(y);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){B(t)}}function X(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Y(e){for(;e.length>0;)e.shift()(t)}G(V="openjphjs.wasm")||(z=V,V=t.locateFile?t.locateFile(z,d):d+z);var K=[],Z=0,Q=[];function tt(t){var e=Q[t];return e||(t>=Q.length&&(Q.length=t+1),Q[t]=e=D.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(He(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 dt=void 0;function ht(t){throw new dt(t)}function vt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ht("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 gt=void 0;function mt(t){for(var e="",r=t;P[r];)e+=gt[P[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 Pt(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 Ct(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var $t=!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 St(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=St(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Et={};function xt(){return Object.keys(Dt).length}function kt(){var t=[];for(var e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t}var Rt=[];function Ot(){for(;Rt.length;){var t=Rt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ft=void 0;function Wt(t){Ft=t,Rt.length&&Ft&&Ft(Ot)}var Dt={};function jt(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),Dt[e]}function It(t,e){return e.ptrType&&e.ptr||ht("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ht("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Lt(Object.create(t,{$$:{value:e}}))}function Ut(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=jt(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=Et[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=St(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 Lt(t){return"undefined"==typeof FinalizationRegistry?(Lt=t=>t,t):($t=new FinalizationRegistry((t=>{At(t.$$)})),Lt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};$t.register(t,r,t)}return t},_t=t=>$t.unregister(t),Lt(t))}function Ht(){if(this.$$.ptr||Ct(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Lt(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 Mt(){this.$$.ptr||Ct(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 Bt(){return!this.$$.ptr}function Vt(){return this.$$.ptr||Ct(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Rt.push(this),1===Rt.length&&Ft&&Ft(Ot),this.$$.deleteScheduled=!0,this}function zt(){}function Nt(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 Gt(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"),Nt(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 qt(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 Jt(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 Xt(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 Jt(e.$$.ptr,r,this.registeredClass)}function Yt(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=Jt(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 Kt(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 Jt(e.$$.ptr,r,this.registeredClass)}function Zt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Qt(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=Yt:n?(this.toWireType=Xt,this.destructorFunction=null):(this.toWireType=Kt,this.destructorFunction=null)}function re(e,r,n){t.hasOwnProperty(e)||ht("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=mt(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=We(t),r=mt(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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[bt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.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",h.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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,h).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 de(){for(var t=0,e=5;e<fe.length;++e)void 0!==fe[e]&&++t;return t}function he(){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 ge(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function me(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[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)&&$[n];)++n;if((r=n<<1)-t>32&&we)return we.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[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);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function Pe(t){return 2*t.length}function Ce(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 $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)),_[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),W(w.buffer),1}catch(t){}}var Se=[null,[],[]];function Ee(t,e){var r=Se[t];0===e||10===e?((1===t?g:m)(R(r,0)),r.length=0):r.push(e)}dt=t.InternalError=pt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);gt=t}(),wt=t.BindingError=pt(Error,"BindingError"),zt.prototype.isAliasOf=Pt,zt.prototype.clone=Ht,zt.prototype.delete=Mt,zt.prototype.isDeleted=Bt,zt.prototype.deleteLater=Vt,t.getInheritedInstanceCount=xt,t.getLiveInheritedInstances=kt,t.flushPendingDeletes=Ot,t.setDelayFunction=Wt,ee.prototype.getPointee=Zt,ee.prototype.destructor=Qt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=ot,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Ut,ie=t.UnboundTypeError=pt(Error,"UnboundTypeError"),t.count_emval_handles=de,t.get_first_emval=he;var xe,ke={L:function(t){var e=new et(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),K.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),Oe(t.excPtr)}}(K.pop()),Z=0},c:function(){var t=Z;if(!t)return De(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return De(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(Le(o,r,i))return De(o),t}return De(r),t},k:function(){var t=Z;if(!t)return De(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return De(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(Le(o,r,i))return De(o),t}return De(r),t},i:function(t,e,r){throw new et(t).init(e,r),Z=t,t},f:function(t){throw Z||(Z=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=mt(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=C;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=mt(l),i=oe(o,i),s&&(s=oe(a,s)),c&&(c=oe(u,c)),p=oe(f,p);var d=lt(l);Gt(d,(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:zt.prototype;var a=ft(d,(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 qt(l,a,u,p,r,i,s,c),h=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 Et[t]={pointerType:v,constPointerType:y},re(d,a),[h,v,y]}))},x:function(t,e,r,n,o,i){var a;e>0||B(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=mt(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):(Nt(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=mt(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=mt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ge(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=ue(e,r);t=mt(t),o=oe(n,o),Gt(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=mt(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:me(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=mt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=mt(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==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 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")),P[a+s]=u}else for(s=0;s<n;++s)P[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=mt(r),2===e?(n=be,o=Te,a=Pe,i=()=>$,s=1):4===e&&(n=Ce,o=$e,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:mt(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:mt(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=mt(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(){B("")},G:function(t,e,r){P.copyWithin(t,e,e+r)},E: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),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++)Ee(t,P[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=je();try{return tt(t)(e)}catch(t){if(Ie(r),t!==t+0)throw t;_setThrew(1,0)}},z:function(t,e,r){var n=je();try{return tt(t)(e,r)}catch(t){if(Ie(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=je();try{return tt(t)(e,r,n)}catch(t){if(Ie(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=je();try{tt(t)(e)}catch(t){if(Ie(r),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r){var n=je();try{tt(t)(e,r)}catch(t){if(Ie(n),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n){var o=je();try{tt(t)(e,r,n)}catch(t){if(Ie(o),t!==t+0)throw t;_setThrew(1,0)}},j:function(t,e,r,n,o){var i=je();try{tt(t)(e,r,n,o)}catch(t){if(Ie(i),t!==t+0)throw t;_setThrew(1,0)}},K:function(t,e,r,n,o,i,a){var s=je();try{tt(t)(e,r,n,o,i,a)}catch(t){if(Ie(s),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=je();try{tt(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Ie(f),t!==t+0)throw t;_setThrew(1,0)}},M:function(t){return t}},Re=(function(){var e={a:ke};function r(e,r){var n,o=e.exports;t.asm=o,W((w=t.asm.P).buffer),D=t.asm.T,n=t.asm.Q,I.unshift(n),function(e){if(L--,t.monitorRunDependencies&&t.monitorRunDependencies(L),0==L&&(null!==H&&(clearInterval(H),H=null),M)){var r=M;M=null,r()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!y&&(l||f)){if("function"==typeof fetch&&!q(V))return fetch(V,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+V+"'";return t.arrayBuffer()})).catch((function(){return J(V)}));if(a)return new Promise((function(t,e){a(V,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return J(V)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){m("failed to asynchronously prepare wasm: "+t),B(t)}))}if(L++,t.monitorRunDependencies&&t.monitorRunDependencies(L),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){m("Module.instantiateWasm callback failed with error: "+t),o(t)}(y||"function"!=typeof WebAssembly.instantiateStreaming||G(V)||q(V)||p||"function"!=typeof fetch?i(n):fetch(V,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return m("wasm streaming compile failed: "+t),m("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)}),Oe=t.___cxa_free_exception=function(){return(Oe=t.___cxa_free_exception=t.asm.S).apply(null,arguments)},Fe=t._free=function(){return(Fe=t._free=t.asm.U).apply(null,arguments)},We=t.___getTypeName=function(){return(We=t.___getTypeName=t.asm.V).apply(null,arguments)},De=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.W).apply(null,arguments)},t.setTempRet0=function(){return(De=t.setTempRet0=t.asm.X).apply(null,arguments)}),je=t.stackSave=function(){return(je=t.stackSave=t.asm.Y).apply(null,arguments)},Ie=t.stackRestore=function(){return(Ie=t.stackRestore=t.asm.Z).apply(null,arguments)},Ue=t.stackAlloc=function(){return(Ue=t.stackAlloc=t.asm._).apply(null,arguments)},Le=t.___cxa_can_catch=function(){return(Le=t.___cxa_can_catch=t.asm.$).apply(null,arguments)},He=t.___cxa_is_pointer_type=function(){return(He=t.___cxa_is_pointer_type=t.asm.aa).apply(null,arguments)};function Me(r){function n(){xe||(xe=!0,t.calledRun=!0,x||(Y(I),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(),U.unshift(e);var e;Y(U)}()))}r=r||c,L>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),j.unshift(e);var e;Y(j)}(),L>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=Ue(r),r)}return e},array:t=>{var e=Ue(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=je()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ie(c),function(t){return"string"===r?O(t):"boolean"===r?Boolean(t):t}(t)}(p)},M=function t(){xe||Me(),xe||(M=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Me(),t.ready});t.exports=o},83353:(t,e,r)=>{"use strict";var n=r(99178);const o=async function(t,e){let r=e.buffer,n=e.byteOffset;const o=e.length;return 16===t.bitsAllocated?(n%2&&(r=r.slice(n),n=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(r,n,o/2):t.pixelData=new Int16Array(r,n,o/2)):8===t.bitsAllocated||1===t.bitsAllocated?t.pixelData=e:32===t.bitsAllocated&&(n%2&&(r=r.slice(n),n=0),t.pixelData=new Float32Array(r,n,o/4)),t};const i=async function(t,e){if(16===t.bitsAllocated){let n=e.buffer,o=e.byteOffset;const i=e.length;o%2&&(n=n.slice(o),o=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(n,o,i/2):t.pixelData=new Int16Array(n,o,i/2);for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=(255&(r=t.pixelData[e]))<<8|r>>8&255}else 8===t.bitsAllocated&&(t.pixelData=e);var r;return t};const a=async function(t,e){if(8===t.bitsAllocated)return t.planarConfiguration?function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let t=0;t<c;++t){u=t*n;let e=i.getInt32(4*(t+1),!0),o=i.getInt32(4*(t+2),!0);0===o&&(o=r.length);const l=n*c;for(;e<o;){const t=a[e++];if(t>=0&&t<=127)for(let r=0;r<t+1&&u<l;++r)s[u]=a[e++],u++;else if(t<=-1&&t>=-127){const r=a[e++];for(let e=0;e<1-t&&u<l;++e)s[u]=r,u++}}}return t.pixelData=new Uint8Array(o),t}(t,e):function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let e=0;e<c;++e){u=e;let o=i.getInt32(4*(e+1),!0),l=i.getInt32(4*(e+2),!0);0===l&&(l=r.length);const f=n*c;for(;o<l;){const e=a[o++];if(e>=0&&e<=127)for(let r=0;r<e+1&&u<f;++r)s[u]=a[o++],u+=t.samplesPerPixel;else if(e<=-1&&e>=-127){const r=a[o++];for(let n=0;n<1-e&&u<f;++n)s[u]=r,u+=t.samplesPerPixel}}}return t.pixelData=new Uint8Array(o),t}(t,e);if(16===t.bitsAllocated)return function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel*2),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o),u=i.getInt32(0,!0);for(let t=0;t<u;++t){let e=0;const o=0===t?1:0;let u=i.getInt32(4*(t+1),!0),c=i.getInt32(4*(t+2),!0);for(0===c&&(c=r.length);u<c;){const t=a[u++];if(t>=0&&t<=127)for(let r=0;r<t+1&&e<n;++r)s[2*e+o]=a[u++],e++;else if(t<=-1&&t>=-127){const r=a[u++];for(let i=0;i<1-t&&e<n;++i)s[2*e+o]=r,e++}}}0===t.pixelRepresentation?t.pixelData=new Uint16Array(o):t.pixelData=new Int16Array(o);return t}(t,e);throw new Error("unsupported pixel format for RLE")};var s=r(36317),u=r.n(s);const c=new URL(r(99441),r.b),l={codec:void 0,decoder:void 0};const f=async function(t,e){await function(){if(l.codec)return Promise.resolve();const t=u()({locateFile:t=>t.endsWith(".wasm")?c.toString():t});return new Promise(((e,r)=>{t.then((t=>{l.codec=t,l.decoder=new t.JPEGDecoder,e()}),r)}))}();const r=l.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getDecodedBuffer(),i={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},a=function(t,e){if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,o),s={frameInfo:n};return{...e,pixelData:a,imageInfo:i,encodeOptions:s,...s,...i}},p={JpegImage:void 0,decodeConfig:{}};const d=async function(t,e){var n;if(await(p.decodeConfig=n,p.JpegImage?Promise.resolve():new Promise(((t,e)=>{r.e(8094).then(r.bind(r,8094)).then((e=>{p.JpegImage=e.default,t()})).catch(e)}))),void 0===p.JpegImage)throw new Error("No JPEG Baseline decoder loaded");const o=new p.JpegImage;return o.parse(e),o.colorTransform=!1,8===t.bitsAllocated?(t.pixelData=o.getData(t.columns,t.rows),t):16===t.bitsAllocated?(t.pixelData=o.getData16(t.columns,t.rows),t):void 0},h={jpeg:void 0,decodeConfig:{}};const v=async function(t,e){var n;if(await(h.decodeConfig=n,h.jpeg?Promise.resolve():new Promise(((t,e)=>{r.e(732).then(r.bind(r,10732)).then((({Decoder:e})=>{const r=new e;h.jpeg=r,t()}),e)}))),void 0===h.jpeg)throw new Error("No JPEG Lossless decoder loaded");const o=t.bitsAllocated<=8?1:2,i=e.buffer,a=h.jpeg.decode(i,e.byteOffset,e.length,o);return 0===t.pixelRepresentation?16===t.bitsAllocated?(t.pixelData=new Uint16Array(a.buffer),t):(t.pixelData=new Uint8Array(a.buffer),t):(t.pixelData=new Int16Array(a.buffer),t)};var y=r(93720),g=r.n(y);const m=new URL(r(46920),r.b),w={codec:void 0,decoder:void 0,decodeConfig:{}};const b=async function(t,e){try{await function(t){if(w.decodeConfig=t,w.codec)return Promise.resolve();const e=g()({locateFile:t=>t.endsWith(".wasm")?m.toString():t});return new Promise(((t,r)=>{e.then((e=>{w.codec=e,w.decoder=new e.JpegLSDecoder,t()}),r)}))}();const r=w.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getInterleaveMode(),i=r.getNearLossless(),a=r.getDecodedBuffer(),s={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},u=function(t,e,r){if(t.bitsPerSample>8)return r?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(r)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,a,e.signed),c={nearLossless:i,interleaveMode:o,frameInfo:n};return{...e,pixelData:u,imageInfo:s,encodeOptions:c,...c,...s}}catch(t){throw"number"==typeof(r=t)?w.codec.getExceptionMessage(r):r}var r};var T=r(53488),P=r.n(T);const C=new URL(r(87840),r.b),$={codec:void 0,decoder:void 0,decodeConfig:{}};const _=async function(t,e){await function(t){if($.decodeConfig=t,$.codec)return Promise.resolve();const e=P()({locateFile:t=>t.endsWith(".wasm")?C.toString():t});return new Promise(((t,r)=>{e.then((e=>{$.codec=e,$.decoder=new e.J2KDecoder,t()}),r)}))}();const r=$.decoder,n=r.getEncodedBuffer(t.length);n.set(t),r.decode();const o=r.getFrameInfo(),i=r.getDecodedBuffer();new Uint8Array(i.length).set(i);const a=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,s=r.getNumDecompositions(),u=r.getNumLayers(),c=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],l=r.getIsReversible(),f=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,p=`${r.getTileSize().width} x ${r.getTileSize().height}`,d=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,h=r.getColorSpace(),v=`${i.length.toLocaleString()} bytes`,y=`${(i.length/n.length).toFixed(2)}:1`,g={columns:o.width,rows:o.height,bitsPerPixel:o.bitsPerSample,signed:o.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:o.componentCount},m=function(t,e){if(t.bitsPerSample>8)return t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(o,i),w={imageOffset:a,numDecompositions:s,numLayers:u,progessionOrder:c,reversible:l,blockDimensions:f,tileSize:p,tileOffset:d,colorTransform:h,decodedSize:v,compressionRatio:y};return{...e,pixelData:m,imageInfo:g,encodeOptions:w,...w,...g}};var A=r(68112),S=r.n(A);const E=new URL(r(12342),r.b),x={codec:void 0,decoder:void 0,decodeConfig:{}};const k=async function(t,e){await function(t){if(x.decodeConfig=t,x.codec)return Promise.resolve();const e=S()({locateFile:t=>t.endsWith(".wasm")?E.toString():t});return new Promise(((t,r)=>{e.then((e=>{x.codec=e,x.decoder=new e.HTJ2KDecoder,t()}),r)}))}();const r=new x.codec.HTJ2KDecoder,n=r.getEncodedBuffer(t.length);n.set(t);const o=e.decodeLevel||0;r.decodeSubResolution(o);const i=r.getFrameInfo();if(e.decodeLevel>0){const{width:t,height:r}=function(t,e,r){const n={width:e,height:r};for(;t>0;)n.width=Math.ceil(n.width/2),n.height=Math.ceil(n.height/2),t--;return n}(e.decodeLevel,i.width,i.height);i.width=t,i.height=r}const a=r.getDecodedBuffer();new Uint8Array(a.length).set(a);const s=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,u=r.getNumDecompositions(),c=r.getNumLayers(),l=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],f=r.getIsReversible(),p=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,d=`${r.getTileSize().width} x ${r.getTileSize().height}`,h=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,v=`${a.length.toLocaleString()} bytes`,y=`${(a.length/n.length).toFixed(2)}:1`,g={columns:i.width,rows:i.height,bitsPerPixel:i.bitsPerSample,signed:i.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:i.componentCount};let m=function(t,e){if(t.bitsPerSample>8)return t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(i,a);const{buffer:w,byteOffset:b,byteLength:T}=m,P=w.slice(b,b+T);m=new m.constructor(P);const C={imageOffset:s,numDecompositions:u,numLayers:c,progessionOrder:l,reversible:f,blockDimensions:p,tileSize:d,tileOffset:h,decodedSize:v,compressionRatio:y};return{...e,pixelData:m,imageInfo:g,encodeOptions:C,...C,...g}};var R=r(52842),O=r(69952),F=r(30922);const W={bilinear:function(t,e){const{rows:r,columns:n,data:o}=t,{rows:i,columns:a,data:s}=e,u=[],c=[],l=[];for(let t=0;t<a;t++){const e=t*(n-1)/(a-1);u[t]=Math.floor(e),c[t]=Math.min(u[t]+1,n-1),l[t]=e-u[t]}for(let t=0;t<i;t++){const e=t*(r-1)/(i-1),f=Math.floor(e)*n,p=Math.min(f+n,(r-1)*n),d=e-Math.floor(e),h=1-d,v=t*a;for(let t=0;t<a;t++){const e=o[f+u[t]],r=o[f+c[t]],n=o[p+u[t]],i=o[p+c[t]],a=1-l[t];s[v+t]=(e*a+r*l[t])*h+(n*a+i*l[t])*d}}return s},replicate:function(t,e){const{rows:r,columns:n,pixelData:o,samplesPerPixel:i=1}=t,{rows:a,columns:s,pixelData:u}=e,c=[];for(let t=0;t<s;t++){const e=t*(n-1)/(s-1);c[t]=Math.floor(e)*i}for(let t=0;t<a;t++){const e=t*(r-1)/(a-1),l=Math.floor(e)*n*i,f=t*s;for(let t=0;t<s;t++)for(let e=0;e<i;e++)u[f+t+e]=o[l+c[t]+e]}return u}},D={Uint8Array,Uint16Array,Int16Array,Float32Array};function j(t,e,r,n){const o=void 0!==t.pixelRepresentation&&1===t.pixelRepresentation,i=o&&void 0!==t.bitsStored?32-t.bitsStored:void 0;if(o&&void 0!==i)for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=t.pixelData[e]<<i>>i;let a=t.pixelData;t.pixelDataLength=t.pixelData.length;const{min:s,max:u}=(0,R.A)(t.pixelData),c=void 0===e.allowFloatRendering||e.allowFloatRendering;let l=(0,F.A)(t.photometricInterpretation)&&void 0===e.targetBuffer?.offset;const f=e.preScale?.enabled,p=f&&Object.values(e.preScale.scalingParameters).some((t=>"number"==typeof t&&!Number.isInteger(t))),d=!e.preScale.enabled||!c&&p,h=e.targetBuffer?.type;if(h&&e.preScale.enabled&&!d){const{rescaleSlope:t,rescaleIntercept:r}=e.preScale.scalingParameters,n=t*s+r,o=t*u+r;l=!(0,O.r)(n,o,D[h])}a=h&&!l?function(t,e,r,n){const{arrayBuffer:o,type:i,offset:a=0,length:s,rows:u}=t.targetBuffer,c=r[i];if(!c)throw new Error(`target array ${i} is not supported, or doesn't exist.`);u&&u!=e.rows&&function(t,e,r){const n=function(t,e,r){const{samplesPerPixel:n}=t,{rows:o,columns:i}=e,a=o*i*n,s=new r(a),u=s.byteLength/a;return{pixelData:s,rows:o,columns:i,frameInfo:{...t.frameInfo,rows:o,columns:i},imageInfo:{...t.imageInfo,rows:o,columns:i,bytesPerPixel:u}}}(t,e,r),{scalingType:o="replicate"}=e;W[o](t,n),Object.assign(t,n),t.pixelDataLength=t.pixelData.length}(e,t.targetBuffer,c);const l=e.pixelDataLength,f=a,p=null!=s?s:l-f,d=e.pixelData;if(p!==d.length)throw new Error(`target array for image does not have the same length (${p}) as the decoded image length (${d.length}).`);const h=o?new c(o,f,p):new c(p);return h.set(d,0),n=h,n}(e,t,D,a):e.preScale.enabled&&!d?function(t,e,r,n){const o=t.preScale.scalingParameters;U(o);const{rescaleSlope:i,rescaleIntercept:a}=o;let s=e,u=r;"number"==typeof i&&"number"==typeof a&&(s=i*e+a,u=i*r+a);return I(s,u,n)}(e,s,u,t):I(s,u,t);let v=s,y=u;if(e.preScale.enabled&&!d){const r=e.preScale.scalingParameters;U(r);const{rescaleSlope:n,rescaleIntercept:o}=r;if("number"==typeof n&&"number"==typeof o){!function(t,e){const r=t.length,{rescaleSlope:n,rescaleIntercept:o,suvbw:i}=e;if("PT"!==e.modality||"number"!=typeof i||isNaN(i))for(let e=0;e<r;e++)t[e]=t[e]*n+o;else for(let e=0;e<r;e++)t[e]=i*(t[e]*n+o)}(a,r),t.preScale={...e.preScale,scaled:!0};const{rescaleIntercept:n,rescaleSlope:o,suvbw:i}=r;v=o*s+n,y=o*u+n,i&&(v*=i,y*=i)}}else d&&(t.preScale={enabled:!0,scaled:!1},v=s,y=u);t.pixelData=a,t.smallestPixelValue=v,t.largestPixelValue=y;const g=(new Date).getTime();return t.decodeTimeInMS=g-r,t}function I(t,e,r){const n=new((0,O.A)(t,e))(r.pixelData.length);return n.set(r.pixelData,0),n}function U(t){if(!t)throw new Error("options.preScale.scalingParameters must be defined if preScale.enabled is true, and scalingParameters cannot be derived from the metadata providers.")}const L={decodeTask:({imageFrame:t,transferSyntax:e,decodeConfig:r,options:n,pixelData:s,callbackFn:u})=>async function(t,e,r,n,s,u){const c=(new Date).getTime();let l,p=null;switch(e){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.1.99":p=o(t,r);break;case"1.2.840.10008.1.2.2":p=i(t,r);break;case"1.2.840.10008.1.2.5":p=a(t,r);break;case"1.2.840.10008.1.2.4.50":l={...t},p=f(r,l);break;case"1.2.840.10008.1.2.4.51":p=d(t,r);break;case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":p=v(t,r);break;case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":l={signed:1===t.pixelRepresentation,bytesPerPixel:t.bitsAllocated<=8?1:2,...t},p=b(r,l);break;case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":l={...t},p=_(r,l);break;case"3.2.840.10008.1.2.4.96":case"1.2.840.10008.1.2.4.201":case"1.2.840.10008.1.2.4.202":case"1.2.840.10008.1.2.4.203":l={...t},p=k(r,l);break;default:throw new Error(`no decoder for transfer syntax ${e}`)}if(!p)throw new Error("decodePromise not defined");const h=j(await p,s,c);return u?.(h),h}(t,e,s,0,n,u)};(0,n.p)(L)},52842:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){let e,r=t[0],n=t[0];const o=t.length;for(let i=1;i<o;i++)e=t[i],r=Math.min(r,e),n=Math.max(n,e);return{min:r,max:n}}},69952:(t,e,r)=>{"use strict";function n(t,e){let r;return Number.isInteger(t)&&Number.isInteger(e)&&(t>=0?e<=255?r=Uint8Array:e<=65535&&(r=Uint16Array):t>=-128&&e<=127?r=Int8Array:t>=-32768&&e<=32767&&(r=Int16Array)),r||Float32Array}function o(t,e,r){return n(t,e)===r}r.d(e,{A:()=>n,r:()=>o})},30922:(t,e,r)=>{"use strict";function n(t){return"RGB"===t||"PALETTE COLOR"===t||"YBR_FULL"===t||"YBR_FULL_422"===t||"YBR_PARTIAL_422"===t||"YBR_PARTIAL_420"===t||"YBR_RCT"===t||"YBR_ICT"===t}r.d(e,{A:()=>n})},46920:(t,e,r)=>{"use strict";t.exports=r.p+"5004fdc02f329ce53b69.wasm"},99441:(t,e,r)=>{"use strict";t.exports=r.p+"c22b37c3488e1d6c3aa4.wasm"},87840:(t,e,r)=>{"use strict";t.exports=r.p+"031089e563a18ada8441.wasm"},12342:(t,e,r)=>{"use strict";t.exports=r.p+"20fc4c659b85ccd2a9c0.wasm"},99178:(t,e,r)=>{"use strict";r.d(e,{p:()=>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),d=(i.data.argumentList||[]).map(b);let h;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":h=r;break;case"SET":e[p.slice(-1)[0]]=b(i.data.value),h=!0;break;case"APPLY":h=r.apply(e,d);break;case"CONSTRUCT":h=function(t){return Object.assign(t,{[n]:!0})}(new r(...d));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;l(t,r),h=function(t,e){return m.set(t,e),t}(e,[e])}break;case"RELEASE":h=void 0;break;default:return}}catch(t){h={value:t,[s]:0}}Promise.resolve(h).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 d(t){return T(t,{type:"RELEASE"}).then((()=>{f(t)}))}const h=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(h.get(t)||0)-1;h.set(t,e),0===e&&d(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),d(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]=g(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]=g(o);return T(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:i},a).then(b)}});return function(t,e){const r=(h.get(e)||0)+1;h.set(e,r),v&&v.register(t,e,t)}(a,t),a}function g(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 m=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},m.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)}))}}}]);
//# sourceMappingURL=3353.bundle.8e3d8ce70a6b548a5e16.js.map