-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathimmolate.js
54 lines (54 loc) · 22.9 KB
/
immolate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var k;k||=typeof Immolate != 'undefined' ? Immolate : {};var aa=Object.assign({},k),ba=(a,b)=>{throw b;},ca="object"==typeof window,p="function"==typeof importScripts,da="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,w="",ea,fa,ha;
if(da){var fs=require("fs"),ia=require("path");w=p?ia.dirname(w)+"/":__dirname+"/";ea=(a,b)=>{a=ja(a)?new URL(a):ia.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};ha=a=>{a=ea(a,!0);a.buffer||(a=new Uint8Array(a));return a};fa=(a,b,c,d=!0)=>{a=ja(a)?new URL(a):ia.normalize(a);fs.readFile(a,d?void 0:"utf8",(e,h)=>{e?c(e):b(d?h.buffer:h)})};process.argv.slice(2);"undefined"!=typeof module&&(module.exports=k);process.on("uncaughtException",a=>{if(!("unwind"===a||a instanceof ka||a.context instanceof
ka))throw a;});ba=(a,b)=>{process.exitCode=a;throw b;}}else if(ca||p)p?w=self.location.href:"undefined"!=typeof document&&document.currentScript&&(w=document.currentScript.src),w=w.startsWith("blob:")?"":w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1),ea=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},p&&(ha=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),fa=(a,b,c)=>{var d=new XMLHttpRequest;
d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};k.print||console.log.bind(console);var x=k.printErr||console.error.bind(console);Object.assign(k,aa);aa=null;k.quit&&(ba=k.quit);var y;k.wasmBinary&&(y=k.wasmBinary);var la,ma=!1,na,A,B,oa,C,D,pa,qa,ra=[],sa=[],ta=[],ua=[];function va(){var a=k.preRun.shift();ra.unshift(a)}var E=0,wa=null,F=null;
function xa(a){k.onAbort?.(a);a="Aborted("+a+")";x(a);ma=!0;throw new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");}var ya=a=>a.startsWith("data:application/octet-stream;base64,"),ja=a=>a.startsWith("file://"),G;G="immolate.wasm";if(!ya(G)){var za=G;G=k.locateFile?k.locateFile(za,w):w+za}function Aa(a){if(a==G&&y)return new Uint8Array(y);if(ha)return ha(a);throw"both async and sync fetching of the wasm failed";}
function Ba(a){if(!y&&(ca||p)){if("function"==typeof fetch&&!ja(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Aa(a));if(fa)return new Promise((b,c)=>{fa(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Aa(a))}function Ca(a,b,c){return Ba(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{x(`failed to asynchronously prepare wasm: ${d}`);xa(d)})}
function Da(a,b){var c=G;y||"function"!=typeof WebAssembly.instantiateStreaming||ya(c)||ja(c)||da||"function"!=typeof fetch?Ca(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){x(`wasm streaming compile failed: ${e}`);x("falling back to ArrayBuffer instantiation");return Ca(c,a,b)}))}function ka(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
var Ea=a=>{for(;0<a.length;)a.shift()(k)},Fa=k.noExitRuntime||!0;class Ha{constructor(a){this.F=a-24}}
var Ia=0,Ja=0,Ka,I=a=>{for(var b="";A[a];)b+=Ka[A[a++]];return b},J={},M={},La={},N,Ma=a=>{throw new N(a);},O,Q=(a,b,c)=>{function d(g){g=c(g);if(g.length!==a.length)throw new O("Mismatched type converter count");for(var m=0;m<a.length;++m)P(a[m],g[m])}a.forEach(function(g){La[g]=b});var e=Array(b.length),h=[],f=0;b.forEach((g,m)=>{M.hasOwnProperty(g)?e[m]=M[g]:(h.push(g),J.hasOwnProperty(g)||(J[g]=[]),J[g].push(()=>{e[m]=M[g];++f;f===h.length&&d(e)}))});0===h.length&&d(e)};
function Na(a,b,c={}){var d=b.name;if(!a)throw new N(`type "${d}" must have a positive integer typeid pointer`);if(M.hasOwnProperty(a)){if(c.ea)return;throw new N(`Cannot register type '${d}' twice`);}M[a]=b;delete La[a];J.hasOwnProperty(a)&&(b=J[a],delete J[a],b.forEach(e=>e()))}function P(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Na(a,b,c)}
var Oa=a=>{throw new N(a.C.G.D.name+" instance already deleted");},Pa=!1,Qa=()=>{},Ra=(a,b,c)=>{if(b===c)return a;if(void 0===c.J)return null;a=Ra(a,b,c.J);return null===a?null:c.aa(a)},Sa={},R=[],Ta=()=>{for(;R.length;){var a=R.pop();a.C.P=!1;a["delete"]()}},S,T={},Ua=(a,b)=>{if(void 0===b)throw new N("ptr should not be undefined");for(;a.J;)b=a.S(b),a=a.J;return T[b]},Va=(a,b)=>{if(!b.G||!b.F)throw new O("makeClassHandle requires ptr and ptrType");if(!!b.K!==!!b.H)throw new O("Both smartPtrType and smartPtr must be specified");
b.count={value:1};return U(Object.create(a,{C:{value:b,writable:!0}}))},U=a=>{if("undefined"===typeof FinalizationRegistry)return U=b=>b,a;Pa=new FinalizationRegistry(b=>{b=b.C;--b.count.value;0===b.count.value&&(b.H?b.K.N(b.H):b.G.D.N(b.F))});U=b=>{var c=b.C;c.H&&Pa.register(b,{C:c},b);return b};Qa=b=>{Pa.unregister(b)};return U(a)};function Wa(){}
var Xa=(a,b)=>Object.defineProperty(b,"name",{value:a}),Ya=(a,b,c)=>{if(void 0===a[b].I){var d=a[b];a[b]=function(...e){if(!a[b].I.hasOwnProperty(e.length))throw new N(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].I})!`);return a[b].I[e.length].apply(this,e)};a[b].I=[];a[b].I[d.T]=d}},Za=(a,b,c)=>{if(k.hasOwnProperty(a)){if(void 0===c||void 0!==k[a].I&&void 0!==k[a].I[c])throw new N(`Cannot register public name '${a}' twice`);Ya(k,a,a);if(k.hasOwnProperty(c))throw new N(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
k[a].I[c]=b}else k[a]=b,void 0!==c&&(k[a].la=c)},$a=a=>{if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function ab(a,b,c,d,e,h,f,g){this.name=a;this.constructor=b;this.M=c;this.N=d;this.J=e;this.ba=h;this.S=f;this.aa=g;this.ga=[]}var bb=(a,b,c)=>{for(;b!==c;){if(!b.S)throw new N(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.S(a);b=b.J}return a};
function cb(a,b){if(null===b){if(this.W)throw new N(`null is not a valid ${this.name}`);return 0}if(!b.C)throw new N(`Cannot pass "${db(b)}" as a ${this.name}`);if(!b.C.F)throw new N(`Cannot pass deleted object as a pointer of type ${this.name}`);return bb(b.C.F,b.C.G.D,this.D)}
function eb(a,b){if(null===b){if(this.W)throw new N(`null is not a valid ${this.name}`);if(this.V){var c=this.ha();null!==a&&a.push(this.N,c);return c}return 0}if(!b||!b.C)throw new N(`Cannot pass "${db(b)}" as a ${this.name}`);if(!b.C.F)throw new N(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.U&&b.C.G.U)throw new N(`Cannot convert argument of type ${b.C.K?b.C.K.name:b.C.G.name} to parameter type ${this.name}`);c=bb(b.C.F,b.C.G.D,this.D);if(this.V){if(void 0===b.C.H)throw new N("Passing raw pointer to smart pointer is illegal");
switch(this.ja){case 0:if(b.C.K===this)c=b.C.H;else throw new N(`Cannot convert argument of type ${b.C.K?b.C.K.name:b.C.G.name} to parameter type ${this.name}`);break;case 1:c=b.C.H;break;case 2:if(b.C.K===this)c=b.C.H;else{var d=b.clone();c=this.ia(c,fb(()=>d["delete"]()));null!==a&&a.push(this.N,c)}break;default:throw new N("Unsupporting sharing policy");}}return c}
function gb(a,b){if(null===b){if(this.W)throw new N(`null is not a valid ${this.name}`);return 0}if(!b.C)throw new N(`Cannot pass "${db(b)}" as a ${this.name}`);if(!b.C.F)throw new N(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.C.G.U)throw new N(`Cannot convert argument of type ${b.C.G.name} to parameter type ${this.name}`);return bb(b.C.F,b.C.G.D,this.D)}function hb(a){return this.fromWireType(D[a>>2])}
function ib(a,b,c,d,e,h,f,g,m,n,l){this.name=a;this.D=b;this.W=c;this.U=d;this.V=e;this.fa=h;this.ja=f;this.Z=g;this.ha=m;this.ia=n;this.N=l;e||void 0!==b.J?this.toWireType=eb:(this.toWireType=d?cb:gb,this.L=null)}
var jb=(a,b,c)=>{if(!k.hasOwnProperty(a))throw new O("Replacing nonexistent public symbol");void 0!==k[a].I&&void 0!==c?k[a].I[c]=b:(k[a]=b,k[a].T=c)},kb=[],lb,mb=a=>{var b=kb[a];b||(a>=kb.length&&(kb.length=a+1),kb[a]=b=lb.get(a));return b},nb=(a,b,c=[])=>{a.includes("j")?(a=a.replace(/p/g,"i"),b=(0,k["dynCall_"+a])(b,...c)):b=mb(b)(...c);return b},ob=(a,b)=>(...c)=>nb(a,b,c),V=(a,b)=>{a=I(a);var c=a.includes("j")?ob(a,b):mb(b);if("function"!=typeof c)throw new N(`unknown function pointer with signature ${a}: ${b}`);
return c},qb,sb=a=>{a=rb(a);var b=I(a);W(a);return b},X=(a,b)=>{function c(h){e[h]||M[h]||(La[h]?La[h].forEach(c):(d.push(h),e[h]=!0))}var d=[],e={};b.forEach(c);throw new qb(`${a}: `+d.map(sb).join([", "]));},tb=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(D[b+4*d>>2]);return c},ub=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};function vb(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].L)return!0;return!1}
function wb(a){var b=Function;if(!(b instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof b} which is not a function`);var c=Xa(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
function xb(a,b,c,d,e,h){var f=b.length;if(2>f)throw new N("argTypes array size mismatch! Must at least get return value and 'this' types!");var g=null!==b[1]&&null!==c,m=vb(b);c="void"!==b[0].name;d=[a,Ma,d,e,ub,b[0],b[1]];for(e=0;e<f-2;++e)d.push(b[e+2]);if(!m)for(e=g?1:2;e<b.length;++e)null!==b[e].L&&d.push(b[e].L);m=vb(b);e=b.length;var n="",l="";for(f=0;f<e-2;++f)n+=(0!==f?", ":"")+"arg"+f,l+=(0!==f?", ":"")+"arg"+f+"Wired";n=`\n return function (${n}) {\n if (arguments.length !== ${e-
2}) {\n throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${e-2}');\n }`;m&&(n+="var destructors = [];\n");var r=m?"destructors":"null",q="humanName throwBindingError invoker fn runDestructors retType classParam".split(" ");g&&(n+="var thisWired = classParam['toWireType']("+r+", this);\n");for(f=0;f<e-2;++f)n+="var arg"+f+"Wired = argType"+f+"['toWireType']("+r+", arg"+f+");\n",q.push("argType"+f);g&&(l="thisWired"+(0<l.length?", ":
"")+l);n+=(c||h?"var rv = ":"")+"invoker(fn"+(0<l.length?", ":"")+l+");\n";if(m)n+="runDestructors(destructors);\n";else for(f=g?1:2;f<b.length;++f)h=1===f?"thisWired":"arg"+(f-2)+"Wired",null!==b[f].L&&(n+=`${h}_dtor(${h});\n`,q.push(`${h}_dtor`));c&&(n+="var ret = retType['fromWireType'](rv);\nreturn ret;\n");let [u,v]=[q,n+"}\n"];u.push(v);b=wb(u)(...d);return Xa(a,b)}
for(var yb=a=>{a=a.trim();const b=a.indexOf("(");return-1!==b?a.substr(0,b):a},zb=(a,b,c)=>{if(!(a instanceof Object))throw new N(`${c} with invalid "this": ${a}`);if(!(a instanceof b.D.constructor))throw new N(`${c} incompatible with "this" of type ${a.constructor.name}`);if(!a.C.F)throw new N(`cannot call emscripten binding method ${c} on deleted object`);return bb(a.C.F,a.C.G.D,b.D)},Ab=[],Y=[],fb=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=
Ab.pop()||Y.length;Y[b]=a;Y[b+1]=1;return b}},Bb={name:"emscripten::val",fromWireType:a=>{if(!a)throw new N("Cannot use deleted val. handle = "+a);var b=Y[a];9<a&&0===--Y[a+1]&&(Y[a]=void 0,Ab.push(a));return b},toWireType:(a,b)=>fb(b),argPackAdvance:8,readValueFromPointer:hb,L:null},db=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a},Cb=(a,b)=>{switch(b){case 4:return function(c){return this.fromWireType(pa[c>>2])};case 8:return function(c){return this.fromWireType(qa[c>>
3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Db=(a,b,c)=>{switch(b){case 1:return c?d=>na[d]:d=>A[d];case 2:return c?d=>B[d>>1]:d=>oa[d>>1];case 4:return c?d=>C[d>>2]:d=>D[d>>2];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Eb="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Fb="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Gb=(a,b)=>{var c=a>>1;for(var d=c+b/2;!(c>=d)&&oa[c];)++c;c<<=1;if(32<c-a&&Fb)return Fb.decode(A.subarray(a,
c));c="";for(d=0;!(d>=b/2);++d){var e=B[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c},Hb=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)B[b>>1]=a.charCodeAt(e),b+=2;B[b>>1]=0;return b-d},Ib=a=>2*a.length,Jb=(a,b)=>{for(var c=0,d="";!(c>=b/4);){var e=C[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d},Kb=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=
b;c=d+c-4;for(var e=0;e<a.length;++e){var h=a.charCodeAt(e);if(55296<=h&&57343>=h){var f=a.charCodeAt(++e);h=65536+((h&1023)<<10)|f&1023}C[b>>2]=h;b+=4;if(b+4>c)break}C[b>>2]=0;return b-d},Lb=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b},Mb=Array(256),Nb=0;256>Nb;++Nb)Mb[Nb]=String.fromCharCode(Nb);Ka=Mb;N=k.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};
O=k.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};
Object.assign(Wa.prototype,{isAliasOf:function(a){if(!(this instanceof Wa&&a instanceof Wa))return!1;var b=this.C.G.D,c=this.C.F;a.C=a.C;var d=a.C.G.D;for(a=a.C.F;b.J;)c=b.S(c),b=b.J;for(;d.J;)a=d.S(a),d=d.J;return b===d&&c===a},clone:function(){this.C.F||Oa(this);if(this.C.R)return this.C.count.value+=1,this;var a=U,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.C;a=a(c.call(b,d,{C:{value:{count:e.count,P:e.P,R:e.R,F:e.F,G:e.G,H:e.H,K:e.K}}}));a.C.count.value+=1;a.C.P=!1;return a},["delete"](){this.C.F||
Oa(this);if(this.C.P&&!this.C.R)throw new N("Object already scheduled for deletion");Qa(this);var a=this.C;--a.count.value;0===a.count.value&&(a.H?a.K.N(a.H):a.G.D.N(a.F));this.C.R||(this.C.H=void 0,this.C.F=void 0)},isDeleted:function(){return!this.C.F},deleteLater:function(){this.C.F||Oa(this);if(this.C.P&&!this.C.R)throw new N("Object already scheduled for deletion");R.push(this);1===R.length&&S&&S(Ta);this.C.P=!0;return this}});k.getInheritedInstanceCount=()=>Object.keys(T).length;
k.getLiveInheritedInstances=()=>{var a=[],b;for(b in T)T.hasOwnProperty(b)&&a.push(T[b]);return a};k.flushPendingDeletes=Ta;k.setDelayFunction=a=>{S=a;R.length&&S&&S(Ta)};
Object.assign(ib.prototype,{da(a){this.Z&&(a=this.Z(a));return a},Y(a){this.N?.(a)},argPackAdvance:8,readValueFromPointer:hb,fromWireType:function(a){function b(){return this.V?Va(this.D.M,{G:this.fa,F:c,K:this,H:a}):Va(this.D.M,{G:this,F:a})}var c=this.da(a);if(!c)return this.Y(a),null;var d=Ua(this.D,c);if(void 0!==d){if(0===d.C.count.value)return d.C.F=c,d.C.H=a,d.clone();d=d.clone();this.Y(a);return d}d=this.D.ba(c);d=Sa[d];if(!d)return b.call(this);d=this.U?d.$:d.pointerType;var e=Ra(c,this.D,
d.D);return null===e?b.call(this):this.V?Va(d.D.M,{G:d,F:e,K:this,H:a}):Va(d.D.M,{G:d,F:e})}});qb=k.UnboundTypeError=((a,b)=>{var c=Xa(b,function(d){this.name=b;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(a.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`};return c})(Error,"UnboundTypeError");
Y.push(0,1,void 0,1,null,1,!0,1,!1,1);k.count_emval_handles=()=>Y.length/2-5-Ab.length;
var Pb={k:(a,b,c)=>{var d=new Ha(a);D[d.F+16>>2]=0;D[d.F+4>>2]=b;D[d.F+8>>2]=c;Ia=a;Ja++;throw Ia;},p:()=>{},u:(a,b,c,d)=>{b=I(b);P(a,{name:b,fromWireType:function(e){return!!e},toWireType:function(e,h){return h?c:d},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(A[e])},L:null})},f:(a,b,c,d,e,h,f,g,m,n,l,r,q)=>{l=I(l);h=V(e,h);g&&=V(f,g);n&&=V(m,n);q=V(r,q);var u=$a(l);Za(u,function(){X(`Cannot construct ${l} due to unbound types`,[d])});Q([a,b,c],d?[d]:[],v=>{v=v[0];if(d){var t=
v.D;var K=t.M}else K=Wa.prototype;v=Xa(l,function(...Ga){if(Object.getPrototypeOf(this)!==L)throw new N("Use 'new' to construct "+l);if(void 0===z.O)throw new N(l+" has no accessible constructor");var pb=z.O[Ga.length];if(void 0===pb)throw new N(`Tried to invoke ctor of ${l} with invalid number of parameters (${Ga.length}) - expected (${Object.keys(z.O).toString()}) parameters instead!`);return pb.apply(this,Ga)});var L=Object.create(K,{constructor:{value:v}});v.prototype=L;var z=new ab(l,v,L,q,t,
h,g,n);if(z.J){var H;(H=z.J).X??(H.X=[]);z.J.X.push(z)}t=new ib(l,z,!0,!1,!1);H=new ib(l+"*",z,!1,!1,!1);K=new ib(l+" const*",z,!1,!0,!1);Sa[a]={pointerType:H,$:K};jb(u,v);return[t,H,K]})},c:(a,b,c,d,e,h)=>{var f=tb(b,c);e=V(d,e);Q([],[a],g=>{g=g[0];var m=`constructor ${g.name}`;void 0===g.D.O&&(g.D.O=[]);if(void 0!==g.D.O[b-1])throw new N(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${g.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
g.D.O[b-1]=()=>{X(`Cannot construct ${g.name} due to unbound types`,f)};Q([],f,n=>{n.splice(1,0,null);g.D.O[b-1]=xb(m,n,null,e,h);return[]});return[]})},a:(a,b,c,d,e,h,f,g,m)=>{var n=tb(c,d);b=I(b);b=yb(b);h=V(e,h);Q([],[a],l=>{function r(){X(`Cannot call ${q} due to unbound types`,n)}l=l[0];var q=`${l.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);g&&l.D.ga.push(b);var u=l.D.M,v=u[b];void 0===v||void 0===v.I&&v.className!==l.name&&v.T===c-2?(r.T=c-2,r.className=l.name,u[b]=r):(Ya(u,b,
q),u[b].I[c-2]=r);Q([],n,t=>{t=xb(q,t,l,h,f,m);void 0===u[b].I?(t.T=c-2,u[b]=t):u[b].I[c-2]=t;return[]});return[]})},b:(a,b,c,d,e,h,f,g,m,n)=>{b=I(b);e=V(d,e);Q([],[a],l=>{l=l[0];var r=`${l.name}.${b}`,q={get(){X(`Cannot access ${r} due to unbound types`,[c,f])},enumerable:!0,configurable:!0};q.set=m?()=>X(`Cannot access ${r} due to unbound types`,[c,f]):()=>{throw new N(r+" is a read-only property");};Object.defineProperty(l.D.M,b,q);Q([],m?[c,f]:[c],u=>{var v=u[0],t={get(){var L=zb(this,l,r+" getter");
return v.fromWireType(e(h,L))},enumerable:!0};if(m){m=V(g,m);var K=u[1];t.set=function(L){var z=zb(this,l,r+" setter"),H=[];m(n,z,K.toWireType(H,L));ub(H)}}Object.defineProperty(l.D.M,b,t);return[]});return[]})},e:(a,b,c)=>{a=I(a);Q([],[b],d=>{d=d[0];k[a]=d.fromWireType(c);return[]})},t:a=>P(a,Bb),n:(a,b,c)=>{b=I(b);P(a,{name:b,fromWireType:d=>d,toWireType:(d,e)=>e,argPackAdvance:8,readValueFromPointer:Cb(b,c),L:null})},l:(a,b,c,d,e,h,f)=>{var g=tb(b,c);a=I(a);a=yb(a);e=V(d,e);Za(a,function(){X(`Cannot call ${a} due to unbound types`,
g)},b-1);Q([],g,m=>{m=[m[0],null].concat(m.slice(1));jb(a,xb(a,m,null,e,h,f),b-1);return[]})},g:(a,b,c,d,e)=>{b=I(b);-1===e&&(e=4294967295);e=g=>g;if(0===d){var h=32-8*c;e=g=>g<<h>>>h}var f=b.includes("unsigned")?function(g,m){return m>>>0}:function(g,m){return m};P(a,{name:b,fromWireType:e,toWireType:f,argPackAdvance:8,readValueFromPointer:Db(b,c,0!==d),L:null})},d:(a,b,c)=>{function d(h){return new e(na.buffer,D[h+4>>2],D[h>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,
Float32Array,Float64Array][b];c=I(c);P(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ea:!0})},i:a=>{P(a,Bb)},m:(a,b)=>{b=I(b);var c="std::string"===b;P(a,{name:b,fromWireType:function(d){var e=D[d>>2],h=d+4;if(c)for(var f=h,g=0;g<=e;++g){var m=h+g;if(g==e||0==A[m]){if(f){var n=f;var l=A,r=n+(m-f);for(f=n;l[f]&&!(f>=r);)++f;if(16<f-n&&l.buffer&&Eb)n=Eb.decode(l.subarray(n,f));else{for(r="";n<f;){var q=l[n++];if(q&128){var u=l[n++]&63;if(192==(q&224))r+=String.fromCharCode((q&31)<<
6|u);else{var v=l[n++]&63;q=224==(q&240)?(q&15)<<12|u<<6|v:(q&7)<<18|u<<12|v<<6|l[n++]&63;65536>q?r+=String.fromCharCode(q):(q-=65536,r+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else r+=String.fromCharCode(q)}n=r}}else n="";if(void 0===t)var t=n;else t+=String.fromCharCode(0),t+=n;f=m+1}}else{t=Array(e);for(g=0;g<e;++g)t[g]=String.fromCharCode(A[h+g]);t=t.join("")}W(d);return t},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var h,f="string"==typeof e;if(!(f||e instanceof
Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array))throw new N("Cannot pass non-string to std::string");var g;if(c&&f)for(h=g=0;h<e.length;++h){var m=e.charCodeAt(h);127>=m?g++:2047>=m?g+=2:55296<=m&&57343>=m?(g+=4,++h):g+=3}else g=e.length;h=g;g=Ob(4+h+1);m=g+4;D[g>>2]=h;if(c&&f){if(f=m,m=h+1,h=A,0<m){m=f+m-1;for(var n=0;n<e.length;++n){var l=e.charCodeAt(n);if(55296<=l&&57343>=l){var r=e.charCodeAt(++n);l=65536+((l&1023)<<10)|r&1023}if(127>=l){if(f>=m)break;h[f++]=l}else{if(2047>=
l){if(f+1>=m)break;h[f++]=192|l>>6}else{if(65535>=l){if(f+2>=m)break;h[f++]=224|l>>12}else{if(f+3>=m)break;h[f++]=240|l>>18;h[f++]=128|l>>12&63}h[f++]=128|l>>6&63}h[f++]=128|l&63}}h[f]=0}}else if(f)for(f=0;f<h;++f){n=e.charCodeAt(f);if(255<n)throw W(m),new N("String has UTF-16 code units that do not fit in 8 bits");A[m+f]=n}else for(f=0;f<h;++f)A[m+f]=e[f];null!==d&&d.push(W,g);return g},argPackAdvance:8,readValueFromPointer:hb,L(d){W(d)}})},j:(a,b,c)=>{c=I(c);if(2===b){var d=Gb;var e=Hb;var h=Ib;
var f=g=>oa[g>>1]}else 4===b&&(d=Jb,e=Kb,h=Lb,f=g=>D[g>>2]);P(a,{name:c,fromWireType:g=>{for(var m=D[g>>2],n,l=g+4,r=0;r<=m;++r){var q=g+4+r*b;if(r==m||0==f(q))l=d(l,q-l),void 0===n?n=l:(n+=String.fromCharCode(0),n+=l),l=q+b}W(g);return n},toWireType:(g,m)=>{if("string"!=typeof m)throw new N(`Cannot pass non-string to C++ string type ${c}`);var n=h(m),l=Ob(4+n+b);D[l>>2]=n/b;e(m,l+4,n+b);null!==g&&g.push(W,l);return l},argPackAdvance:8,readValueFromPointer:hb,L(g){W(g)}})},o:(a,b)=>{b=I(b);P(a,{ka:!0,
name:b,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},s:(a,b,c)=>A.copyWithin(a,b,b+c),h:(a,b)=>{var c=M[a];if(void 0===c)throw a=`${"_emval_take_value"} has unknown type ${sb(a)}`,new N(a);a=c;a=a.readValueFromPointer(b);return fb(a)},q:()=>{xa("")},r:()=>{xa("OOM")}},Z=function(){function a(c){Z=c.exports;la=Z.v;c=la.buffer;k.HEAP8=na=new Int8Array(c);k.HEAP16=B=new Int16Array(c);k.HEAPU8=A=new Uint8Array(c);k.HEAPU16=oa=new Uint16Array(c);k.HEAP32=C=new Int32Array(c);k.HEAPU32=D=new Uint32Array(c);
k.HEAPF32=pa=new Float32Array(c);k.HEAPF64=qa=new Float64Array(c);lb=Z.z;sa.unshift(Z.w);E--;k.monitorRunDependencies?.(E);0==E&&(null!==wa&&(clearInterval(wa),wa=null),F&&(c=F,F=null,c()));return Z}var b={a:Pb};E++;k.monitorRunDependencies?.(E);if(k.instantiateWasm)try{return k.instantiateWasm(b,a)}catch(c){return x(`Module.instantiateWasm callback failed with error: ${c}`),!1}Da(b,function(c){a(c.instance)});return{}}(),rb=a=>(rb=Z.x)(a),Ob=a=>(Ob=Z.y)(a),Qb=k._main=(a,b)=>(Qb=k._main=Z.A)(a,b),
W=a=>(W=Z.B)(a),Rb;F=function Sb(){Rb||Tb();Rb||(F=Sb)};
function Tb(){function a(){if(!Rb&&(Rb=!0,k.calledRun=!0,!ma)){Ea(sa);Ea(ta);if(k.onRuntimeInitialized)k.onRuntimeInitialized();if(Ub){var b=Qb;try{var c=b(0,0);Fa||(k.onExit?.(c),ma=!0);ba(c,new ka(c))}catch(d){d instanceof ka||"unwind"==d||ba(1,d)}}if(k.postRun)for("function"==typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;)b=k.postRun.shift(),ua.unshift(b);Ea(ua)}}if(!(0<E)){if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.preRun]);k.preRun.length;)va();Ea(ra);0<E||(k.setStatus?
(k.setStatus("Running..."),setTimeout(function(){setTimeout(function(){k.setStatus("")},1);a()},1)):a())}}if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);0<k.preInit.length;)k.preInit.pop()();var Ub=!0;k.noInitialRun&&(Ub=!1);Tb();