modified-dicom-pacs
Version:
A modified version of DICOM PACS implementation
1 lines • 169 kB
JavaScript
(()=>{var e,t,r={4559:(e,t,r)=>{e.exports=r(9842)},7552:(e,t,r)=>{e.exports=r(5697)},7647:(e,t,r)=>{e.exports=r(3798)},6028:(e,t,r)=>{e.exports=r(671)},337:(e,t,r)=>{e.exports=r(3751)},2770:(e,t,r)=>{e.exports=r(1380)},1882:(e,t,r)=>{e.exports=r(6601)},7878:(e,t,r)=>{e.exports=r(8783)},2250:(e,t,r)=>{e.exports=r(4731)},1082:(e,t,r)=>{e.exports=r(5723)},5534:(e,t,r)=>{e.exports=r(5213)},7458:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(e,t,r){var n=f;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var s=l(e,t,r);if("normal"===s.type){if(n=r.done?v:p,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",h={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(S([])));_&&_!==r&&n.call(_,i)&&(b=_);var T=m.prototype=y.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var s=l(e[o],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function S(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:E}}function E(){return{value:t,done:!0}}return g.prototype=m,s(T,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},e.awrap=function(e){return{__await:e}},C(P.prototype),s(P.prototype,a,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(T),s(T,u,"Generator"),s(T,i,(function(){return this})),s(T,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),$(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;$(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},2043:(e,t,r)=>{e.exports=r(7458)},8327:(e,t,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(e){var t,o=void 0!==(e=e||{})?e:{},i={};for(t in o)o.hasOwnProperty(t)&&(i[t]=o[t]);var a=[],u=!1,s=!1,c=!1,l=!1;u="object"==typeof window,s="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!u&&!s,l=!u&&!c&&!s;var f,p,d,v,h="";function y(e){return o.locateFile?o.locateFile(e,h):h+e}c?(h="//",f=function(e,t){return d||(d=r(981)),v||(v=r(1209)),e=v.normalize(e),d.readFileSync(e,t?null:"utf8")},p=function(e){var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),P(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),a=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof zr))throw e})),process.on("unhandledRejection",pe),o.inspect=function(){return"[Emscripten Module object]"}):l?("undefined"!=typeof read&&(f=function(e){return read(e)}),p=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(P("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(u||s)&&(s?h=self.location.href:document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.lastIndexOf("/")+1):"",f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s&&(p=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var g=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);for(t in i)i.hasOwnProperty(t)&&(o[t]=i[t]);i=null,o.arguments&&(a=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit;var b,w,_=function(e){};o.wasmBinary&&(b=o.wasmBinary),o.noExitRuntime&&o.noExitRuntime,"object"!=typeof WebAssembly&&m("no native wasm support detected");var T=new WebAssembly.Table({initial:181,maximum:181,element:"anyfunc"}),C=!1;function P(e,t){e||pe("Assertion failed: "+t)}function x(e){var t=o["_"+e];return P(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function A(e,t,r,n,o){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);k(e,t=Br(r),r)}return t},array:function(e){var t=Br(e.length);return F(e,t),t}},a=x(e),u=[],s=0;if(n)for(var c=0;c<n.length;c++){var l=i[r[c]];l?(0===s&&(s=Nr()),u[c]=l(n[c])):u[c]=n[c]}var f=a.apply(null,u);return f=function(e){return"string"===t?S(e):"boolean"===t?Boolean(e):e}(f),0!==s&&Vr(s),f}var $="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&$)return $.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var u=63&e[t++];if(192!=(224&a)){var s=63&e[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&e[t++])<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|u)}else i+=String.fromCharCode(a)}return i}function S(e,t){return e?O(R,e,t):""}function E(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var u=e.charCodeAt(a);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&e.charCodeAt(++a)),u<=127){if(r>=i)break;t[r++]=u}else if(u<=2047){if(r+1>=i)break;t[r++]=192|u>>6,t[r++]=128|63&u}else if(u<=65535){if(r+2>=i)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(r+3>=i)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}function k(e,t,r){return E(e,R,t,r)}function j(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function F(e,t){W.set(e,t)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var I,W,R,D,L,M,U,N,B,V=65536;function z(e,t){return e%t>0&&(e+=t-e%t),e}function G(e){I=e,o.HEAP8=W=new Int8Array(e),o.HEAP16=D=new Int16Array(e),o.HEAP32=M=new Int32Array(e),o.HEAPU8=R=new Uint8Array(e),o.HEAPU16=L=new Uint16Array(e),o.HEAPU32=U=new Uint32Array(e),o.HEAPF32=N=new Float32Array(e),o.HEAPF64=B=new Float64Array(e)}var H=5289088,q=46048,J=o.TOTAL_MEMORY||1073741824;function Z(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?o.dynCall_v(r):o.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(w=o.wasmMemory?o.wasmMemory:new WebAssembly.Memory({initial:J/V}))&&(I=w.buffer),J=I.byteLength,G(I),M[q>>2]=H;var Y=[],X=[],K=[],Q=[],ee=[];function te(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)ie(o.preRun.shift());Z(Y)}function re(){Z(X)}function ne(){Z(K)}function oe(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)ae(o.postRun.shift());Z(ee)}function ie(e){Y.unshift(e)}function ae(e){ee.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var ue=0,se=null,ce=null;function le(e){ue++,o.monitorRunDependencies&&o.monitorRunDependencies(ue)}function fe(e){if(ue--,o.monitorRunDependencies&&o.monitorRunDependencies(ue),0==ue&&(null!==se&&(clearInterval(se),se=null),ce)){var t=ce;ce=null,t()}}function pe(e){throw o.onAbort&&o.onAbort(e),g(e+=""),m(e),C=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}o.preloadedImages={},o.preloadedAudios={};var de="data:application/octet-stream;base64,";function ve(e){return String.prototype.startsWith?e.startsWith(de):0===e.indexOf(de)}var he="charlswasm_decode.wasm";function ye(){try{if(b)return new Uint8Array(b);if(p)return p(he);throw"both async and sync fetching of the wasm failed"}catch(e){pe(e)}}function ge(){return b||!u&&!s||"function"!=typeof fetch?new Promise((function(e,t){e(ye())})):fetch(he,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+he+"'";return e.arrayBuffer()})).catch((function(){return ye()}))}function me(){var e={env:Fr,wasi_snapshot_preview1:Fr};function t(e,t){var r=e.exports;o.asm=r,fe()}function r(e){t(e.instance)}function n(t){return ge().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){m("failed to asynchronously prepare wasm: "+e),pe(e)}))}if(le(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(b||"function"!=typeof WebAssembly.instantiateStreaming||ve(he)||"function"!=typeof fetch)return n(r);fetch(he,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}function be(e){return Dr(e)}function we(e,t){Q.unshift({func:e,arg:t})}function _e(){return we.apply(null,arguments)}function Te(){return we.apply(null,arguments)}ve(he)||(he=y(he)),X.push({func:function(){Rr()}});var Ce={};function Pe(e,t,r){throw Ce[e]={ptr:e,adjusted:[e],type:t,destructor:r,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in Lr?Lr.uncaught_exceptions++:Lr.uncaught_exceptions=1,e}var xe={};function Ae(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function $e(e){return this.fromWireType(U[e>>2])}var Oe={},Se={},Ee={},ke=48,je=57;function Fe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=ke&&t<=je?"_"+e:e}function Ie(e,t){return e=Fe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function We(e,t){var r=Ie(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Re=void 0;function De(e){throw new Re(e)}function Le(e,t,r){function n(t){var n=r(t);n.length!==e.length&&De("Mismatched type converter count");for(var o=0;o<e.length;++o)He(e[o],n[o])}e.forEach((function(e){Ee[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Se.hasOwnProperty(e)?o[t]=Se[e]:(i.push(e),Oe.hasOwnProperty(e)||(Oe[e]=[]),Oe[e].push((function(){o[t]=Se[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Me(e){var t=xe[e];delete xe[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Le([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],u=t.getter,s=t.getterContext,c=e[r+o.length],l=t.setter,f=t.setterContext;i[n]={read:function(e){return a.fromWireType(u(s,e))},write:function(e,t){var r=[];l(f,e,c.toWireType(r,t)),Ae(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError("Missing field");var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:$e,destructorFunction:n}]}))}function Ue(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function Ne(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Be=e}var Be=void 0;function Ve(e){for(var t="",r=e;R[r];)t+=Be[R[r++]];return t}var ze=void 0;function Ge(e){throw new ze(e)}function He(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||Ge('type "'+n+'" must have a positive integer typeid pointer'),Se.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ge("Cannot register type '"+n+"' twice")}if(Se[e]=t,delete Ee[e],Oe.hasOwnProperty(e)){var o=Oe[e];delete Oe[e],o.forEach((function(e){e()}))}}function qe(e,t,r,n,o){var i=Ue(r);He(e,{name:t=Ve(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=W;else if(2===r)n=D;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=M}return this.fromWireType(n[e>>i])},destructorFunction:null})}function Je(e){if(!(this instanceof lt))return!1;if(!(e instanceof lt))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Ze(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ye(e){Ge(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Xe=!1;function Ke(e){}function Qe(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function et(e){e.count.value-=1,0===e.count.value&&Qe(e)}function tt(e){return"undefined"==typeof FinalizationGroup?(tt=function(e){return e},e):(Xe=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?et(r):console.warn("object already deleted: "+r.ptr)}})),Ke=function(e){Xe.unregister(e.$$)},(tt=function(e){return Xe.register(e,e.$$,e.$$),e})(e))}function rt(){if(this.$$.ptr||Ye(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=tt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function nt(){this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),Ke(this),et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ot(){return!this.$$.ptr}var it=void 0,at=[];function ut(){for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}}function st(){return this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),at.push(this),1===at.length&&it&&it(ut),this.$$.deleteScheduled=!0,this}function ct(){lt.prototype.isAliasOf=Je,lt.prototype.clone=rt,lt.prototype.delete=nt,lt.prototype.isDeleted=ot,lt.prototype.deleteLater=st}function lt(){}var ft={};function pt(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ge("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function dt(e,t,r){o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&Ge("Cannot register public name '"+e+"' twice"),pt(o,e,e),o.hasOwnProperty(r)&&Ge("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),o[e].overloadTable[r]=t):(o[e]=t,void 0!==r&&(o[e].numArguments=r))}function vt(e,t,r,n,o,i,a,u){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function ht(e,t,r){for(;t!==r;)t.upcast||Ge("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function yt(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,r,this.registeredClass)}function gt(e,t){var r;if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ge('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=ht(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ge("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,Xt((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ge("Unsupporting sharing policy")}return r}function mt(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,r,this.registeredClass)}function bt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function wt(e){this.rawDestructor&&this.rawDestructor(e)}function _t(e){null!==e&&e.delete()}function Tt(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Tt(e,t,r.baseClass);return null===n?null:r.downcast(n)}function Ct(){return Object.keys($t).length}function Pt(){var e=[];for(var t in $t)$t.hasOwnProperty(t)&&e.push($t[t]);return e}function xt(e){it=e,at.length&&it&&it(ut)}function At(){o.getInheritedInstanceCount=Ct,o.getLiveInheritedInstances=Pt,o.flushPendingDeletes=ut,o.setDelayFunction=xt}var $t={};function Ot(e,t){for(void 0===t&&Ge("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function St(e,t){return t=Ot(e,t),$t[t]}function Et(e,t){return t.ptrType&&t.ptr||De("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&De("Both smartPtrType and smartPtr must be specified"),t.count={value:1},tt(Object.create(e,{$$:{value:t}}))}function kt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=St(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),u=ft[a];if(!u)return o.call(this);i=this.isConst?u.constPointerType:u.pointerType;var s=Tt(t,this.registeredClass,i.registeredClass);return null===s?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s,smartPtrType:this,smartPtr:e}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s})}function jt(){Ft.prototype.getPointee=bt,Ft.prototype.destructor=wt,Ft.prototype.argPackAdvance=8,Ft.prototype.readValueFromPointer=$e,Ft.prototype.deleteObject=_t,Ft.prototype.fromWireType=kt}function Ft(e,t,r,n,o,i,a,u,s,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=gt:n?(this.toWireType=yt,this.destructorFunction=null):(this.toWireType=mt,this.destructorFunction=null)}function It(e,t,r){o.hasOwnProperty(e)||De("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==r?o[e].overloadTable[r]=t:(o[e]=t,o[e].argCount=r)}function Wt(e,t){var r;if(e=Ve(e),void 0!==o["FUNCTION_TABLE_"+e])r=o["FUNCTION_TABLE_"+e][t];else if("undefined"!=typeof FUNCTION_TABLE)r=FUNCTION_TABLE[t];else{var n=o["dynCall_"+e];void 0===n&&void 0===(n=o["dynCall_"+e.replace(/f/g,"d")])&&Ge("No dynCall invoker for signature: "+e),r=function(r){for(var n=[],o=1;o<e.length;++o)n.push("a"+o);var i="return function dynCall_"+e+"_"+t+"("+n.join(", ")+") {\n";return i+=" return dynCall(rawFunction"+(n.length?", ":"")+n.join(", ")+");\n",i+="};\n",new Function("dynCall","rawFunction",i)(r,t)}(n)}return"function"!=typeof r&&Ge("unknown function pointer with signature "+e+": "+t),r}var Rt=void 0;function Dt(e){var t=Ur(e),r=Ve(t);return Mr(t),r}function Lt(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Se[t]||(Ee[t]?Ee[t].forEach(e):(r.push(t),n[t]=!0))})),new Rt(e+": "+r.map(Dt).join([", "]))}function Mt(e,t,r,n,o,i,a,u,s,c,l,f,p){l=Ve(l),i=Wt(o,i),u&&(u=Wt(a,u)),c&&(c=Wt(s,c)),p=Wt(f,p);var d=Fe(l);dt(d,(function(){Lt("Cannot construct "+l+" due to unbound types",[n])})),Le([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:lt.prototype;var a=Ie(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new ze("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new ze(l+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new ze("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),s=Object.create(o,{constructor:{value:a}});a.prototype=s;var f=new vt(l,a,s,p,r,i,u,c),v=new Ft(l,f,!0,!1,!1),h=new Ft(l+"*",f,!1,!1,!1),y=new Ft(l+" const*",f,!1,!0,!1);return ft[e]={pointerType:h,constPointerType:y},It(d,a),[v,h,y]}))}function Ut(e,t){for(var r=[],n=0;n<e;n++)r.push(M[(t>>2)+n]);return r}function Nt(e,t,r,n,o,i){P(t>0);var a=Ut(t,r);o=Wt(n,o);var u=[i],s=[];Le([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ze("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Lt("Cannot construct "+e.name+" due to unbound types",a)},Le([],a,(function(n){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&Ge(r+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,u.length=t;for(var e=1;e<t;++e)u[e]=n[e].toWireType(s,arguments[e-1]);var i=o.apply(null,u);return Ae(s),n[0].fromWireType(i)},[]})),[]}))}function Bt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Ie(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function Vt(e,t,r,n,o){var i=t.length;i<2&&Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,u=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){u=!0;break}var c="void"!==t[0].name,l="",f="";for(s=0;s<i-2;++s)l+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Fe(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",v=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[Ge,n,o,Ae,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),s=0;s<i-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+t[s+2].name+"\n",v.push("argType"+s),h.push(t[s+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)p+="runDestructors(destructors);\n";else for(s=a?1:2;s<t.length;++s){var y=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(p+=y+"_dtor("+y+"); // "+t[s].name+"\n",v.push(y+"_dtor"),h.push(t[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",v.push(p),Bt(Function,v).apply(null,h)}function zt(e,t,r,n,o,i,a,u){var s=Ut(r,n);t=Ve(t),i=Wt(o,i),Le([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Lt("Cannot call "+n+" due to unbound types",s)}u&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(o.argCount=r-2,o.className=e.name,c[t]=o):(pt(c,t,n),c[t].overloadTable[r-2]=o),Le([],s,(function(o){var u=Vt(n,o,e,i,a);return void 0===c[t].overloadTable?(u.argCount=r-2,c[t]=u):c[t].overloadTable[r-2]=u,[]})),[]}))}var Gt=[],Ht=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function qt(e){e>4&&0==--Ht[e].refcount&&(Ht[e]=void 0,Gt.push(e))}function Jt(){for(var e=0,t=5;t<Ht.length;++t)void 0!==Ht[t]&&++e;return e}function Zt(){for(var e=5;e<Ht.length;++e)if(void 0!==Ht[e])return Ht[e];return null}function Yt(){o.count_emval_handles=Jt,o.get_first_emval=Zt}function Xt(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Gt.length?Gt.pop():Ht.length;return Ht[t]={refcount:1,value:e},t}}function Kt(e,t){He(e,{name:t=Ve(t),fromWireType:function(e){var t=Ht[e].value;return qt(e),t},toWireType:function(e,t){return Xt(t)},argPackAdvance:8,readValueFromPointer:$e,destructorFunction:null})}function Qt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function er(e,t){switch(t){case 2:return function(e){return this.fromWireType(N[e>>2])};case 3:return function(e){return this.fromWireType(B[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function tr(e,t,r){var n=Ue(r);He(e,{name:t=Ve(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Qt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:er(t,n),destructorFunction:null})}function rr(e,t,r,n,o,i){var a=Ut(t,r);e=Ve(e),o=Wt(n,o),dt(e,(function(){Lt("Cannot call "+e+" due to unbound types",a)}),t-1),Le([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return It(e,Vt(e,n,null,o,i),t-1),[]}))}function nr(e,t,r){switch(t){case 0:return r?function(e){return W[e]}:function(e){return R[e]};case 1:return r?function(e){return D[e>>1]}:function(e){return L[e>>1]};case 2:return r?function(e){return M[e>>2]}:function(e){return U[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function or(e,t,r,n,o){t=Ve(t),-1===o&&(o=4294967295);var i=Ue(r),a=function(e){return e};if(0===n){var u=32-8*r;a=function(e){return e<<u>>>u}}var s=-1!=t.indexOf("unsigned");He(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Qt(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+Qt(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return s?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:nr(t,i,0!==n),destructorFunction:null})}function ir(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=U,r=t[e>>=2],o=t[e+1];return new n(t.buffer,o,r)}He(e,{name:r=Ve(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function ar(e,t){var r="std::string"===(t=Ve(t));He(e,{name:t,fromWireType:function(e){var t,n=U[e>>2];if(r){var o=R[e+4+n],i=0;0!=o&&(i=o,R[e+4+n]=0);for(var a=e+4,u=0;u<=n;++u){var s=e+4+u;if(0==R[s]){var c=S(a);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),a=s+1}}0!=i&&(R[e+4+n]=i)}else{var l=new Array(n);for(u=0;u<n;++u)l[u]=String.fromCharCode(R[e+4+u]);t=l.join("")}return Mr(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Ge("Cannot pass non-string to std::string");var o=(r&&n?function(){return j(t)}:function(){return t.length})(),i=Dr(4+o+1);if(U[i>>2]=o,r&&n)k(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var u=t.charCodeAt(a);u>255&&(Mr(i),Ge("String has UTF-16 code units that do not fit in 8 bits")),R[i+4+a]=u}else for(a=0;a<o;++a)R[i+4+a]=t[a];return null!==e&&e.push(Mr,i),i},argPackAdvance:8,readValueFromPointer:$e,destructorFunction:function(e){Mr(e)}})}function ur(e,t,r){var n,o;r=Ve(r),2===t?(n=function(){return L},o=1):4===t&&(n=function(){return U},o=2),He(e,{name:r,fromWireType:function(e){for(var t=n(),r=U[e>>2],i=new Array(r),a=e+4>>o,u=0;u<r;++u)i[u]=String.fromCharCode(t[a+u]);return Mr(e),i.join("")},toWireType:function(e,r){var i=r.length,a=Dr(4+i*t),u=n();U[a>>2]=i;for(var s=a+4>>o,c=0;c<i;++c)u[s+c]=r.charCodeAt(c);return null!==e&&e.push(Mr,a),a},argPackAdvance:8,readValueFromPointer:$e,destructorFunction:function(e){Mr(e)}})}function sr(e,t,r,n,o,i){xe[e]={name:Ve(t),rawConstructor:Wt(r,n),rawDestructor:Wt(o,i),fields:[]}}function cr(e,t,r,n,o,i,a,u,s,c){xe[e].fields.push({fieldName:Ve(t),getterReturnType:r,getter:Wt(n,o),getterContext:i,setterArgumentType:a,setter:Wt(u,s),setterContext:c})}function lr(e,t){He(e,{isVoid:!0,name:t=Ve(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}var fr={};function pr(e){var t=fr[e];return void 0===t?Ve(e):t}function dr(){return"object"==typeof globalThis?globalThis:Function("return this")()}function vr(e){return 0===e?Xt(dr()):(e=pr(e),Xt(dr()[e]))}function hr(e){e>4&&(Ht[e].refcount+=1)}function yr(e,t){var r=Se[e];return void 0===r&&Ge(t+" has unknown type "+Dt(e)),r}function gr(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n";for(r=0;r<e;++r)n+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(yr,o,Xt)}var mr={};function br(e){return e||Ge("Cannot use deleted val. handle = "+e),Ht[e].value}function wr(e,t,r,n){e=br(e);var o=mr[t];return o||(o=gr(t),mr[t]=o),o(e,r,n)}function _r(e,t){return Xt((e=yr(e,"_emval_take_value")).readValueFromPointer(t))}function Tr(){pe()}function Cr(){return W.length}function Pr(){return 46048}function xr(e,t,r){R.set(R.subarray(t,t+r),e)}function Ar(e){try{return w.grow(e-I.byteLength+65535>>16),G(w.buffer),1}catch(e){}}function $r(e){var t=Cr(),r=65536,n=2147418112;if(e>n)return!1;for(var o=Math.max(t,16777216);o<e;)o=o<=536870912?z(2*o,r):Math.min(z((3*o+2147483648)/4,r),n);return!!Ar(o)}var Or={buffers:[null,[],[]],printChar:function(e,t){var r=Or.buffers[e];0===t||10===t?((1===e?g:m)(O(r,0)),r.length=0):r.push(t)},varargs:0,get:function(e){return Or.varargs+=4,M[Or.varargs-4>>2]},getStr:function(){return S(Or.get())},get64:function(){var e=Or.get();return Or.get(),e},getZero:function(){Or.get()}};function Sr(e){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||pe(e),e.errno}}function Er(e,t,r,n,o){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||pe(e),e.errno}}function kr(e,t,r,n){try{for(var o=0,i=0;i<r;i++){for(var a=M[t+8*i>>2],u=M[t+(8*i+4)>>2],s=0;s<u;s++)Or.printChar(e,R[a+s]);o+=u}return M[n>>2]=o,0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||pe(e),e.errno}}function jr(e){_(0|e)}Re=o.InternalError=We(Error,"InternalError"),Ne(),ze=o.BindingError=We(Error,"BindingError"),ct(),jt(),At(),Rt=o.UnboundTypeError=We(Error,"UnboundTypeError"),Yt();var Fr={__cxa_allocate_exception:be,__cxa_atexit:_e,__cxa_thread_atexit:Te,__cxa_throw:Pe,_embind_finalize_value_object:Me,_embind_register_bool:qe,_embind_register_class:Mt,_embind_register_class_constructor:Nt,_embind_register_class_function:zt,_embind_register_emval:Kt,_embind_register_float:tr,_embind_register_function:rr,_embind_register_integer:or,_embind_register_memory_view:ir,_embind_register_std_string:ar,_embind_register_std_wstring:ur,_embind_register_value_object:sr,_embind_register_value_object_field:cr,_embind_register_void:lr,_emval_decref:qt,_emval_get_global:vr,_emval_incref:hr,_emval_new:wr,_emval_take_value:_r,abort:Tr,emscripten_get_sbrk_ptr:Pr,emscripten_memcpy_big:xr,emscripten_resize_heap:$r,fd_close:Sr,fd_seek:Er,fd_write:kr,memory:w,setTempRet0:jr,table:T},Ir=me();o.asm=Ir;var Wr,Rr=o.___wasm_call_ctors=function(){return o.asm.__wasm_call_ctors.apply(null,arguments)},Dr=o._malloc=function(){return o.asm.malloc.apply(null,arguments)},Lr=(o._setThrew=function(){return o.asm.setThrew.apply(null,arguments)},o.__ZSt18uncaught_exceptionv=function(){return o.asm._ZSt18uncaught_exceptionv.apply(null,arguments)}),Mr=o._free=function(){return o.asm.free.apply(null,arguments)},Ur=o.___getTypeName=function(){return o.asm.__getTypeName.apply(null,arguments)},Nr=(o.___embind_register_native_and_builtin_types=function(){return o.asm.__embind_register_native_and_builtin_types.apply(null,arguments)},o.stackSave=function(){return o.asm.stackSave.apply(null,arguments)}),Br=o.stackAlloc=function(){return o.asm.stackAlloc.apply(null,arguments)},Vr=o.stackRestore=function(){return o.asm.stackRestore.apply(null,arguments)};function zr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Gr(e){function t(){Wr||(Wr=!0,C||(re(),ne(),o.onRuntimeInitialized&&o.onRuntimeInitialized(),oe()))}e=e||a,ue>0||(te(),ue>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.__growWasmMemory=function(){return o.asm.__growWasmMemory.apply(null,arguments)},o.dynCall_i=function(){return o.asm.dynCall_i.apply(null,arguments)},o.dynCall_vi=function(){return o.asm.dynCall_vi.apply(null,arguments)},o.dynCall_iii=function(){return o.asm.dynCall_iii.apply(null,arguments)},o.dynCall_viii=function(){return o.asm.dynCall_viii.apply(null,arguments)},o.dynCall_ii=function(){return o.asm.dynCall_ii.apply(null,arguments)},o.dynCall_iiii=function(){return o.asm.dynCall_iiii.apply(null,arguments)},o.dynCall_vii=function(){return o.asm.dynCall_vii.apply(null,arguments)},o.dynCall_viiii=function(){return o.asm.dynCall_viiii.apply(null,arguments)},o.dynCall_v=function(){return o.asm.dynCall_v.apply(null,arguments)},o.dynCall_iidiiii=function(){return o.asm.dynCall_iidiiii.apply(null,arguments)},o.dynCall_jiji=function(){return o.asm.dynCall_jiji.apply(null,arguments)},o.dynCall_viiiiii=function(){return o.asm.dynCall_viiiiii.apply(null,arguments)},o.dynCall_viiiii=function(){return o.asm.dynCall_viiiii.apply(null,arguments)},o.asm=Ir,o.ccall=A,o.then=function(e){if(Wr)e(o);else{var t=o.onRuntimeInitialized;o.onRuntimeInitialized=function(){t&&t(),e(o)}}return o},ce=function e(){Wr||Gr(),Wr||(ce=e)},o.run=Gr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Gr(),e});e.exports=o},9400:(e,t,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(e){var t,o=void 0!==(e=e||{})?e:{},i={};for(t in o)o.hasOwnProperty(t)&&(i[t]=o[t]);var a=[],u="./this.program",s=function(e,t){throw t},c=!1,l=!1,f=!1,p=!1;c="object"==typeof window,l="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!c&&!l,p=!c&&!f&&!l;var d,v,h,y,g="";function m(e){return o.locateFile?o.locateFile(e,g):g+e}f?(g="//",d=function(e,t){return h||(h=r(1973)),y||(y=r(378)),e=y.normalize(e),h.readFileSync(e,t?null:"utf8")},v=function(e){var t=d(e,!0);return t.buffer||(t=new Uint8Array(t)),S(t.buffer),t},process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof bn))throw e})),process.on("unhandledRejection",be),s=function(e){process.exit(e)},o.inspect=function(){return"[Emscripten Module object]"}):p?("undefined"!=typeof read&&(d=function(e){return read(e)}),v=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(S("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&(s=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(c||l)&&(l?g=self.location.href:document.currentScript&&(g=document.currentScript.src),n&&(g=n),g=0!==g.indexOf("blob:")?g.substr(0,g.lastIndexOf("/")+1):"",d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},l&&(v=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var b=o.print||console.log.bind(console),w=o.printErr||console.warn.bind(console);for(t in i)i.hasOwnProperty(t)&&(o[t]=i[t]);i=null,o.arguments&&(a=o.arguments),o.thisProgram&&(u=o.thisProgram),o.quit&&(s=o.quit);var _,T,C,P=0,x=function(e){P=e},A=function(){return P};o.wasmBinary&&(_=o.wasmBinary),o.noExitRuntime&&(T=o.noExitRuntime),"object"!=typeof WebAssembly&&w("no native wasm support detected");var $=new WebAssembly.Table({initial:204,maximum:204,element:"anyfunc"}),O=!1;function S(e,t){e||be("Assertion failed: "+t)}function E(e){var t=o["_"+e];return S(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function k(e,t,r,n,o){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);R(e,t=pn(r),r)}return t},array:function(e){var t=pn(e.length);return L(e,t),t}},a=E(e),u=[],s=0;if(n)for(var c=0;c<n.length;c++){var l=i[r[c]];l?(0===s&&(s=fn()),u[c]=l(n[c])):u[c]=n[c]}var f=a.apply(null,u);return f=function(e){return"string"===t?I(e):"boolean"===t?Boolean(e):e}(f),0!==s&&dn(s),f}var j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&j)return j.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var u=63&e[t++];if(192!=(224&a)){var s=63&e[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&e[t++])<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|u)}else i+=String.fromCharCode(a)}return i}function I(e,t){return e?F(B,e,t):""}function W(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var u=e.charCodeAt(a);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&e.charCodeAt(++a)),u<=127){if(r>=i)break;t[r++]=u}else if(u<=2047){if(r+1>=i)break;t[r++]=192|u>>6,t[r++]=128|63&u}else if(u<=65535){if(r+2>=i)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(r+3>=i)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}function R(e,t,r){return W(e,B,t,r)}function D(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function L(e,t){N.set(e,t)}function M(e,t,r){for(var n=0;n<e.length;++n)N[t++>>0]=e.charCodeAt(n);r||(N[t>>0]=0)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var U,N,B,V,z,G,H,q,J,Z=65536;function Y(e,t){return e%t>0&&(e+=t-e%t),e}function X(e){U=e,o.HEAP8=N=new Int8Array(e),o.HEAP16=V=new Int16Array(e),o.HEAP32=G=new Int32Array(e),o.HEAPU8=B=new Uint8Array(e),o.HEAPU16=z=new Uint16Array(e),o.HEAPU32=H=new Uint32Array(e),o.HEAPF32=q=new Float32Array(e),o.HEAPF64=J=new Float64Array(e)}var K=5258768,Q=15728,ee=o.TOTAL_MEMORY||1073741824;function te(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?o.dynCall_v(r):o.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(C=o.wasmMemory?o.wasmMemory:new WebAssembly.Memory({initial:ee/Z}))&&(U=C.buffer),ee=U.byteLength,X(U),G[Q>>2]=K;var re=[],ne=[],oe=[],ie=[],ae=[];function ue(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)pe(o.preRun.shift());te(re)}function se(){te(ne)}function ce(){te(oe)}function le(){}function fe(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)de(o.postRun.shift());te(ae)}function pe(e){re.unshift(e)}function de(e){ae.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var ve=0,he=null,ye=null;function ge(e){ve++,o.monitorRunDependencies&&o.monitorRunDependencies(ve)}function me(e){if(ve--,o.monitorRunDependencies&&o.monitorRunDependencies(ve),0==ve&&(null!==he&&(clearInterval(he),he=null),ye)){var t=ye;ye=null,t()}}function be(e){throw o.onAbort&&o.onAbort(e),b(e+=""),w(e),O=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}o.preloadedImages={},o.preloadedAudios={};var we="data:application/octet-stream;base64,";function _e(e){return String.prototype.startsWith?e.startsWith(we):0===e.indexOf(we)}var Te="libjpegturbowasm_decode.wasm";function Ce(){try{if(_)return new Uint8Array(_);if(v)return v(Te);throw"both async and sync fetching of the wasm failed"}catch(e){be(e)}}function Pe(){return _||!c&&!l||"function"!=typeof fetch?new Promise((function(e,t){e(Ce())})):fetch(Te,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Te+"'";return e.arrayBuffer()})).catch((function(){return Ce()}))}function xe(){var e={env:Zr,wasi_snapshot_preview1:Zr};function t(e,t){var r=e.exports;o.asm=r,me()}function r(e){t(e.instance)}function n(t){return Pe().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){w("failed to asynchronously prepare wasm: "+e),be(e)}))}if(ge(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return w("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(_||"function"!=typeof WebAssembly.instantiateStreaming||_e(Te)||"function"!=typeof fetch)return n(r);fetch(Te,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){w("wasm streaming compile failed: "+e),w("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}function Ae(e){return Qr(e)}function $e(e,t){ie.unshift({func:e,arg:t})}function Oe(){return $e.apply(null,arguments)}_e(Te)||(Te=m(Te)),ne.push({func:function(){Kr()}});var Se={};function Ee(e,t,r){throw Se[e]={ptr:e,adjusted:[e],type:t,destructor:r,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in nn?nn.uncaught_exceptions++:nn.uncaught_exceptions=1,e}var ke={};function je(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Fe(e){return this.fromWireType(H[e>>2])}var Ie={},We={},Re={},De=48,Le=57;function Me(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=De&&t<=Le?"_"+e:e}function Ue(e,t){return e=Me(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ne(e,t){var r=Ue(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Be=void 0;function Ve(e){throw new Be(e)}function ze(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Ve("Mismatched type converter count");for(var o=0;o<e.length;++o)Ke(e[o],n[o])}e.forEach((function(e){Re[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){We.hasOwnProperty(e)?o[t]=We[e]:(i.push(e),Ie.hasOwnProperty(e)||(Ie[e]=[]),Ie[e].push((function(){o[t]=We[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ge(e){var t=ke[e];delete ke[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;ze([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],u=t.getter,s=t.getterContext,c=e[r+o.length],l=t.setter,f=t.setterContext;i[n]={read:function(e){return a.fromWireType(u(s,e))},write:function(e,t){var r=[];l(f,e,c.toWireType(r,t)),j