@cichol/shader-compressor 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dists/bindings.d.ts +2 -2
- package/dists/bindings.js +87 -82
- package/dists/bindings.wasm +0 -0
- package/package.json +1 -1
package/dists/bindings.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface ClassHandle {
|
|
|
13
13
|
clone(): this;
|
|
14
14
|
}
|
|
15
15
|
export interface Validator extends ClassHandle {
|
|
16
|
-
readonly error:
|
|
16
|
+
readonly error: string | undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface Optimizer extends ClassHandle {
|
|
@@ -21,7 +21,7 @@ export interface Optimizer extends ClassHandle {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface Minifier extends ClassHandle {
|
|
24
|
-
readonly result:
|
|
24
|
+
readonly result: string | undefined;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface EmbindModule {
|
package/dists/bindings.js
CHANGED
|
@@ -1,84 +1,89 @@
|
|
|
1
|
-
async function Module(moduleArg={}){var moduleRtn;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
a
|
|
37
|
-
b)
|
|
1
|
+
async function Module(moduleArg={}){var moduleRtn;(function(){function a(c){c=c.split("-")[0];for(c=c.split(".").slice(0,3);3>c.length;)c.push("00");c=c.map(d=>d.padStart(2,"0"));return c.join("")}var b="undefined"!==typeof process&&process?.versions?.node?a(process.versions.node):2147483647;if(17E4>b)throw Error(`This emscripten-generated code requires node v${"17.0.0"} (detected v${[b/1E4|0,(b/100|0)%100,b%100].join(".")})`);b="undefined"!==typeof navigator&&navigator?.userAgent?.includes("Safari/")&&navigator.userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)?
|
|
2
|
+
a(navigator.userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)[1]):2147483647;if(2147483647>b)throw Error(`This page was compiled without support for Safari browser. Pass -sMIN_SAFARI_VERSION=${b} or lower to enable support for this browser.`);if(2147483647>b)throw Error(`This emscripten-generated code requires Safari v${"214748.36.47"} (detected v${b})`);b="undefined"!==typeof navigator&&navigator?.userAgent?.match(/Firefox\/(\d+(?:\.\d+)?)/)?parseFloat(navigator.userAgent.match(/Firefox\/(\d+(?:\.\d+)?)/)[1]):
|
|
3
|
+
2147483647;if(2147483647>b)throw Error(`This page was compiled without support for Firefox browser. Pass -sMIN_FIREFOX_VERSION=${b} or lower to enable support for this browser.`);if(2147483647>b)throw Error(`This emscripten-generated code requires Firefox v2147483647 (detected v${b})`);b="undefined"!==typeof navigator&&navigator?.userAgent?.match(/Chrome\/(\d+(?:\.\d+)?)/)?parseFloat(navigator.userAgent.match(/Chrome\/(\d+(?:\.\d+)?)/)[1]):2147483647;if(2147483647>b)throw Error(`This page was compiled without support for Chrome browser. Pass -sMIN_CHROME_VERSION=${b} or lower to enable support for this browser.`);
|
|
4
|
+
if(2147483647>b)throw Error(`This emscripten-generated code requires Chrome v2147483647 (detected v${b})`);})();var k=moduleArg;const {createRequire:aa}=await import("module");var require=aa(import.meta.url),ba="./this.program",ca=(a,b)=>{throw b;},da=import.meta.url,ea="",fa,ha,fs=require("fs");da.startsWith("file:")&&(ea=require("path").dirname(require("url").fileURLToPath(da))+"/");ha=a=>{a=ia(a)?new URL(a):a;a=fs.readFileSync(a);l(Buffer.isBuffer(a));return a};
|
|
5
|
+
fa=async a=>{a=ia(a)?new URL(a):a;a=fs.readFileSync(a,void 0);l(Buffer.isBuffer(a));return a};1<process.argv.length&&(ba=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);ca=(a,b)=>{process.exitCode=a;throw b;};var q=console.log.bind(console),u=console.error.bind(console);l(!0,"web environment detected but not enabled at build time. Add `web` to `-sENVIRONMENT` to enable.");l(!0,"worker environment detected but not enabled at build time. Add `worker` to `-sENVIRONMENT` to enable.");
|
|
6
|
+
l(!0,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var ja;globalThis.WebAssembly||u("no native wasm support detected");var x=!1,ka;function l(a,b){a||y("Assertion failed"+(b?": "+b:""))}var ia=a=>a.startsWith("file://");function la(){var a=ma();l(0==(a&3));0==a&&(a+=4);z[a>>2]=34821223;z[a+4>>2]=2310721022;z[0]=1668509029}
|
|
7
|
+
function A(){if(!x){var a=ma();0==a&&(a+=4);var b=z[a>>2],c=z[a+4>>2];34821223==b&&2310721022==c||y(`Stack overflow! Stack cookie has been overwritten at ${C(a)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${C(c)} ${C(b)}`);1668509029!=z[0]&&y("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var na=new Int16Array(1),oa=new Int8Array(na.buffer);na[0]=25459;115===oa[0]&&99===oa[1]||y("Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)");
|
|
8
|
+
function pa(a){Object.getOwnPropertyDescriptor(k,a)||Object.defineProperty(k,a,{configurable:!0,set(){y(`Attempt to set \`Module.${a}\` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}function E(a){return()=>l(!1,`call to '${a}' via reference taken before Wasm module initialization`)}
|
|
9
|
+
function qa(a){Object.getOwnPropertyDescriptor(k,a)||Object.defineProperty(k,a,{configurable:!0,get(){var b=`'${a}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;"FS_createPath"!==a&&"FS_createDataFile"!==a&&"FS_createPreloadedFile"!==a&&"FS_preloadFile"!==a&&"FS_unlink"!==a&&"addRunDependency"!==a&&"FS_createLazyFile"!==a&&"FS_createDevice"!==a&&"removeRunDependency"!==a||(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
|
|
10
|
+
y(b)}})}var ra,sa,ta,F,H,ua,I,z,va,wa,xa,ya,za=!1;function Aa(){var a=Ba.buffer;ta=new Int8Array(a);H=new Int16Array(a);F=new Uint8Array(a);ua=new Uint16Array(a);I=new Int32Array(a);z=new Uint32Array(a);va=new Float32Array(a);wa=new Float64Array(a);xa=new BigInt64Array(a);ya=new BigUint64Array(a)}l(globalThis.Int32Array&&globalThis.Float64Array&&Int32Array.prototype.subarray&&Int32Array.prototype.set,"JS engine does not provide full typed array support");
|
|
11
|
+
function y(a){k.onAbort?.(a);a="Aborted("+a+")";u(a);x=!0;za&&Ca();a=new WebAssembly.RuntimeError(a);sa?.(a);throw a;}function Da(){y("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")}
|
|
12
|
+
function J(a,b){return(...c)=>{l(za,`native function \`${a}\` called before runtime initialization`);var d=Ea[a];l(d,`exported native function \`${a}\` not found`);l(c.length<=b,`native function \`${a}\` called with ${c.length} args but expects ${b}`);return d(...c)}}var Fa;async function Ga(a){if(!ja)try{var b=await fa(a);return new Uint8Array(b)}catch{}if(a==Fa&&ja)a=new Uint8Array(ja);else if(ha)a=ha(a);else throw"both async and sync fetching of the wasm failed";return a}
|
|
13
|
+
async function Ha(a){var b=Fa;try{var c=await Ga(b);return await WebAssembly.instantiate(c,a)}catch(d){u(`failed to asynchronously prepare wasm: ${d}`),ia(b)&&u(`warning: Loading from a file URI (${b}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),y(d)}}async function Ia(a){return Ha(a)}
|
|
14
|
+
class Ja{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}var Ka=a=>{for(;0<a.length;)a.shift()(k)},La=[],Ma=[],Na=()=>{var a=k.preRun.shift();Ma.push(a)},Oa=!0,C=a=>{l("number"===typeof a,`ptrToString expects a number, got ${typeof a}`);return"0x"+(a>>>0).toString(16).padStart(8,"0")},K=a=>{K.O||(K.O={});K.O[a]||(K.O[a]=1,u("warning: "+a))};
|
|
15
|
+
function Pa(a,b){const c="undefined"!==typeof SharedArrayBuffer&&F.buffer instanceof SharedArrayBuffer,d=c?new ArrayBuffer(b):F.buffer,e=c?0:a;for(let f=0;f<b;f+=65536){const g=new Uint8Array(d,e+f,Math.min(b-f,65536));crypto.getRandomValues(g)}c&&(new Uint8Array(F.buffer,a,b)).set(new Uint8Array(d))}
|
|
16
|
+
var Qa=globalThis.TextDecoder&&new TextDecoder,Ra=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;return b},Sa=(a,b=0,c,d)=>{c=Ra(a,b,c,d);if(16<c-b&&a.buffer&&Qa)return Qa.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;224==(e&240)?e=(e&15)<<12|f<<6|g:(240!=(e&248)&&K("Invalid UTF-8 leading byte "+C(e)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),e=(e&
|
|
17
|
+
7)<<18|f<<12|g<<6|a[b++]&63);65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},L=(a,b,c)=>{l("number"==typeof a,`UTF8ToString expects a number (got ${typeof a})`);return a?Sa(F,a,b,c):""},Va=a=>{a=a.getArg(Ta,0);return Ua(a)},$a=a=>{var b=Va(a);a=Wa();var c=Xa(4),d=Xa(4);Ya(b,c,d);b=z[c>>2];d=z[d>>2];c=L(b);N(b);if(d){var e=L(d);N(d)}Za(a);return[c,e]},O=a=>{for(var b="";;){var c=F[a++];if(!c)return b;b+=String.fromCharCode(c)}},
|
|
18
|
+
P={},Q={},ab={},R=class extends Error{constructor(a){super(a);this.name="BindingError"}},bb=a=>{throw new R(a);};function cb(a,b,c={}){var d=b.name;if(!a)throw new R(`type "${d}" must have a positive integer typeid pointer`);if(Q.hasOwnProperty(a)){if(c.X)return;throw new R(`Cannot register type '${d}' twice`);}Q[a]=b;delete ab[a];P.hasOwnProperty(a)&&(b=P[a],delete P[a],b.forEach(e=>e()))}function T(a,b,c={}){return cb(a,b,c)}
|
|
19
|
+
var eb=(a,b,c)=>{switch(b){case 1:return c?d=>ta[d]:d=>F[d];case 2:return c?d=>H[d>>1]:d=>ua[d>>1];case 4:return c?d=>I[d>>2]:d=>z[d>>2];case 8:return c?d=>xa[d>>3]:d=>ya[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},U=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a},fb=(a,b,c,d)=>{if(b<c||b>d)throw new TypeError(`Passing a number "${U(b)}" from JS side to C/C++ side to an argument of type "${a}", which is outside the valid range [${c}, ${d}]!`);
|
|
20
|
+
},gb=a=>{throw new R(a.g.j.h.name+" instance already deleted");},hb=!1,ib=()=>{},jb=(a,b,c)=>{if(b===c)return a;if(void 0===c.o)return null;a=jb(a,b,c.o);return null===a?null:c.U(a)},kb={},lb={},mb=(a,b)=>{if(void 0===b)throw new R("ptr should not be undefined");for(;a.o;)b=a.I(b),a=a.o;return lb[b]},nb=class extends Error{constructor(a){super(a);this.name="InternalError"}},pb=(a,b)=>{if(!b.j||!b.i)throw new nb("makeClassHandle requires ptr and ptrType");if(!!b.v!==!!b.m)throw new nb("Both smartPtrType and smartPtr must be specified");
|
|
21
|
+
b.count={value:1};return ob(Object.create(a,{g:{value:b,writable:!0}}))};
|
|
22
|
+
function qb(a){function b(){return this.M?pb(this.h.F,{j:this.$,i:c,v:this,m:a}):pb(this.h.F,{j:this,i:a})}var c=this.W(a);if(!c)return this.P(a),null;var d=mb(this.h,c);if(void 0!==d){if(0===d.g.count.value)return d.g.i=c,d.g.m=a,d.clone();d=d.clone();this.P(a);return d}d=this.h.V(c);d=kb[d];if(!d)return b.call(this);d=this.L?d.T:d.pointerType;var e=jb(c,this.h,d.h);return null===e?b.call(this):this.M?pb(d.h.F,{j:d,i:e,v:this,m:a}):pb(d.h.F,{j:d,i:e})}
|
|
23
|
+
var ob=a=>{if(!globalThis.FinalizationRegistry)return ob=b=>b,a;hb=new FinalizationRegistry(b=>{console.warn(b.Z);b=b.g;--b.count.value;0===b.count.value&&(b.m?b.v.C(b.m):b.j.h.C(b.i))});ob=b=>{var c=b.g;if(c.m){var d={g:c};c=Error(`Embind found a leaked C++ instance ${c.j.h.name} <${C(c.i)}>.\n`+"We'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated");
|
|
24
|
+
"captureStackTrace"in Error&&Error.captureStackTrace(c,qb);d.Z=c.stack.replace(/^Error: /,"");hb.register(b,d,b)}return b};ib=b=>{hb.unregister(b)};return ob(a)},rb=[];function sb(){}
|
|
25
|
+
var tb=(a,b)=>Object.defineProperty(b,"name",{value:a}),ub=(a,b,c)=>{if(void 0===a[b].B){var d=a[b];a[b]=function(...e){if(!a[b].B.hasOwnProperty(e.length))throw new R(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].B})!`);return a[b].B[e.length].apply(this,e)};a[b].B=[];a[b].B[d.K]=d}},vb=(a,b)=>{if(k.hasOwnProperty(a))throw new R(`Cannot register public name '${a}' twice`);k[a]=b;k[a].K=void 0},wb=a=>{l("string"===typeof a);a=a.replace(/[^a-zA-Z0-9_]/g,
|
|
26
|
+
"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function xb(a,b,c,d,e,f,g,h){this.name=a;this.constructor=b;this.F=c;this.C=d;this.o=e;this.V=f;this.I=g;this.U=h}var yb=(a,b,c)=>{for(;b!==c;){if(!b.I)throw new R(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.I(a);b=b.o}return a};
|
|
27
|
+
function zb(a,b){if(null===b){if(this.N)throw new R(`null is not a valid ${this.name}`);return 0}if(!b.g)throw new R(`Cannot pass "${U(b)}" as a ${this.name}`);if(!b.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);return yb(b.g.i,b.g.j.h,this.h)}
|
|
28
|
+
function Ab(a,b){if(null===b){if(this.N)throw new R(`null is not a valid ${this.name}`);if(this.M){var c=this.ba();null!==a&&a.push(this.C,c);return c}return 0}if(!b||!b.g)throw new R(`Cannot pass "${U(b)}" as a ${this.name}`);if(!b.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.L&&b.g.j.L)throw new R(`Cannot convert argument of type ${b.g.v?b.g.v.name:b.g.j.name} to parameter type ${this.name}`);c=yb(b.g.i,b.g.j.h,this.h);if(this.M){if(void 0===b.g.m)throw new R("Passing raw pointer to smart pointer is illegal");
|
|
29
|
+
switch(this.ea){case 0:if(b.g.v===this)c=b.g.m;else throw new R(`Cannot convert argument of type ${b.g.v?b.g.v.name:b.g.j.name} to parameter type ${this.name}`);break;case 1:c=b.g.m;break;case 2:if(b.g.v===this)c=b.g.m;else{var d=b.clone();c=this.da(c,Bb(()=>d["delete"]()));null!==a&&a.push(this.C,c)}break;default:throw new R("Unsupporting sharing policy");}}return c}
|
|
30
|
+
function Cb(a,b){if(null===b){if(this.N)throw new R(`null is not a valid ${this.name}`);return 0}if(!b.g)throw new R(`Cannot pass "${U(b)}" as a ${this.name}`);if(!b.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.g.j.L)throw new R(`Cannot convert argument of type ${b.g.j.name} to parameter type ${this.name}`);return yb(b.g.i,b.g.j.h,this.h)}function Db(a){return this.l(z[a>>2])}
|
|
31
|
+
function Eb(a,b,c,d,e,f,g,h,m,p,n){this.name=a;this.h=b;this.N=c;this.L=d;this.M=e;this.$=f;this.ea=g;this.R=h;this.ba=m;this.da=p;this.C=n;e||void 0!==b.o?this.s=Ab:(this.s=d?zb:Cb,this.u=null)}
|
|
32
|
+
var Fb=(a,b)=>{if(!k.hasOwnProperty(a))throw new nb("Replacing nonexistent public symbol");k[a]=b;k[a].K=void 0},Gb=[],Ib=a=>{var b=Gb[a];b||(Gb[a]=b=Hb.get(a));l(Hb.get(a)==b,"JavaScript-side Wasm function table mirror is out of date!");return b},V=(a,b,c=!1)=>{l(!c,"Async bindings are only supported with JSPI.");a=O(a);c=Ib(b);if("function"!=typeof c)throw new R(`unknown function pointer with signature ${a}: ${b}`);return c};class Jb extends Error{}
|
|
33
|
+
var Lb=a=>{a=Kb(a);var b=O(a);N(a);return b},Mb=(a,b)=>{function c(f){e[f]||Q[f]||(ab[f]?ab[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new Jb(`${a}: `+d.map(Lb).join([", "]));},W=(a,b,c)=>{function d(h){h=c(h);if(h.length!==a.length)throw new nb("Mismatched type converter count");for(var m=0;m<a.length;++m)T(a[m],h[m])}a.forEach(h=>ab[h]=b);var e=Array(b.length),f=[],g=0;b.forEach((h,m)=>{Q.hasOwnProperty(h)?e[m]=Q[h]:(f.push(h),P.hasOwnProperty(h)||(P[h]=[]),P[h].push(()=>
|
|
34
|
+
{e[m]=Q[h];++g;g===f.length&&d(e)}))});0===f.length&&d(e)},Nb=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}},Ob={ftfnt:function(a,b,c,d,e,f,g,h,m,p,n,r,t){if(13!==arguments.length)throw Error(a+"Expected 13 closure arguments "+arguments.length+" given.");return function(v,w){n(arguments.length,r,t,a,b);var B=h(null,v),G=m(null,w);B=c(d,B,G);p(G);return f(B)}},fff:function(a,b,c,d,e,f,g,h,m,p){if(10!==arguments.length)throw Error(a+"Expected 10 closure arguments "+arguments.length+" given.");return function(){h(arguments.length,
|
|
35
|
+
m,p,a,b);c(d)}},ftft:function(a,b,c,d,e,f,g,h,m,p,n,r){if(12!==arguments.length)throw Error(a+"Expected 12 closure arguments "+arguments.length+" given.");return function(t){p(arguments.length,n,r,a,b);var v=h(null,t),w=c(d,v);m(v);return f(w)}}};function Pb(a,b,c,d,e){(a<b||a>c)&&e(`function ${d} called with ${a} arguments, expected ${b==c?b:`${b} to ${c}`}`)}
|
|
36
|
+
function Qb(a,b,c,d,e){var f=b.length;if(2>f)throw new R("argTypes array size mismatch! Must at least get return value and 'this' types!");l(!e,"Async bindings are only supported with JSPI.");var g=null!==b[1]&&!1,h;a:{for(h=1;h<b.length;++h)if(null!==b[h]&&void 0===b[h].u){h=!0;break a}h=!1}var m=!b[0].Y,p=f-2;var n=b.length-2;for(var r=b.length-1;2<=r&&b[r].optional;--r)n--;r=b[0];var t=b[1];c=[a,bb,c,d,Nb,r.l.bind(r),t?.s.bind(t)];for(d=2;d<f;++d)r=b[d],c.push(r.s.bind(r));if(!h)for(d=g?1:2;d<
|
|
37
|
+
b.length;++d)null!==b[d].u&&c.push(b[d].u);c.push(Pb,n,p);e=[g?"t":"f",m?"t":"f",e?"t":"f"];for(g=g?1:2;g<b.length;++g)f=b[g],e.push(void 0===f.u?"u":null===f.u?"n":"t");b=Ob[e.join("")](...c);return tb(a,b)}
|
|
38
|
+
var Rb=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(z[b+4*d>>2]);return c},Sb=a=>{a=a.trim();const b=a.indexOf("(");if(-1===b)return a;l(a.endsWith(")"),"Parentheses for argument names should match.");return a.slice(0,b)},Tb=(a,b,c)=>{if(!(a instanceof Object))throw new R(`${c} with invalid "this": ${a}`);if(!(a instanceof b.h.constructor))throw new R(`${c} incompatible with "this" of type ${a.constructor.name}`);if(!a.g.i)throw new R(`cannot call emscripten binding method ${c} on deleted object`);return yb(a.g.i,
|
|
39
|
+
a.g.j.h,b.h)},Ub=[],X=[0,1,,1,null,1,!0,1,!1,1],Vb=a=>{9<a&&0===--X[a+1]&&(l(void 0!==X[a],"Decref for unallocated handle."),X[a]=void 0,Ub.push(a))},Wb=a=>{if(!a)throw new R(`Cannot use deleted val. handle = ${a}`);l(2===a||void 0!==X[a]&&0===a%2,`invalid handle: ${a}`);return X[a]},Bb=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=Ub.pop()||X.length;X[b]=a;X[b+1]=1;return b}},Xb={name:"emscripten::val",l:a=>{var b=Wb(a);Vb(a);return b},s:(a,
|
|
40
|
+
b)=>Bb(b),A:Db,u:null},Yb=(a,b)=>{switch(b){case 4:return function(c){return this.l(va[c>>2])};case 8:return function(c){return this.l(wa[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Zb=Object.assign({optional:!0},Xb),Y=(a,b,c)=>{l("number"==typeof c,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");var d=F;l("string"===typeof a,`stringToUTF8Array expects a string (got ${typeof a})`);if(0<c){var e=
|
|
38
41
|
b;c=b+c-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(b>=c)break;d[b++]=g}else if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6;d[b++]=128|g&63}else if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12;d[b++]=128|g>>6&63;d[b++]=128|g&63}else{if(b+3>=c)break;1114111<g&&K("Invalid Unicode code point "+C(g)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");d[b++]=240|g>>18;d[b++]=128|g>>12&63;d[b++]=128|
|
|
39
|
-
g>>6&63;d[b++]=128|g&63;f++}}d[b]=0;a=b-e}else a=0;return a}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
[];addEventListener("message",d=>{if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
k.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
__syscall_getcwd:()=>{
|
|
62
|
-
__syscall_unlinkat:()=>{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"*",D,!1,!1,!1);G=new
|
|
66
|
-
(v.K=c-1,t[b]=v):t[b].B[c-1]=v;if(p.h.J)for(const w of p.h.J)w.constructor.hasOwnProperty(b)||(w.constructor[b]=v);return[]});return[]})},_embind_register_class_constructor:(a,b,c,d,e,f)=>{
|
|
67
|
-
h.h.D[b-1]=()=>{
|
|
68
|
-
W([],
|
|
69
|
-
b,c,d,e)=>{b=O(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}
|
|
70
|
-
{X:!0})},_embind_register_optional:a=>{
|
|
71
|
-
{c=O(c);if(2===b){var d=
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(Y(a,d,17),Y(b,c,17))},clock_time_get:function(a,b,c){if(!(0<=a&&3>=a))return 28;
|
|
75
|
-
1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math,f=e.min;d=Math.max(a,d);
|
|
76
|
-
0,d=0,e;for(e of
|
|
77
|
-
2],h=
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
42
|
+
g>>6&63;d[b++]=128|g&63;f++}}d[b]=0;a=b-e}else a=0;return a},$b=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},ac=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,bc=(a,b,c)=>{l(0==a%2,"Pointer passed to UTF16ToString must be aligned to two bytes!");a>>=1;b=Ra(ua,a,b/2,c);if(16<b-a&&ac)return ac.decode(ua.subarray(a,b));for(c="";a<b;++a)c+=String.fromCharCode(ua[a]);return c},cc=(a,b,c)=>{l(0==b%2,"Pointer passed to stringToUTF16 must be aligned to two bytes!");
|
|
43
|
+
l("number"==typeof c,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");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)H[b>>1]=a.charCodeAt(e),b+=2;H[b>>1]=0;return b-d},dc=a=>2*a.length,ec=(a,b,c)=>{l(0==a%4,"Pointer passed to UTF32ToString must be aligned to four bytes!");var d="";a>>=2;for(var e=0;!(e>=b/4);e++){var f=z[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},
|
|
44
|
+
fc=(a,b,c)=>{l(0==b%4,"Pointer passed to stringToUTF32 must be aligned to four bytes!");l("number"==typeof c,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);65535<f&&e++;I[b>>2]=f;b+=4;if(b+4>c)break}I[b>>2]=0;return b-d},hc=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},ic=[],jc=a=>{var b=ic.length;
|
|
45
|
+
ic.push(a);return b},kc=(a,b)=>{for(var c=Array(a),d=0;d<a;++d){var e=d,f=z[b+4*d>>2],g=Q[f];if(void 0===g)throw a=`${`parameter ${d}`} has unknown type ${Lb(f)}`,new R(a);c[e]=g}return c},lc={},mc=a=>{a instanceof Ja||"unwind"==a||(A(),a instanceof WebAssembly.RuntimeError&&0>=Wa()&&u("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),ca(1,a))},oc=(a,b)=>{ka=a;nc();Oa&&!b&&(b=`program exited (with status: ${a}), but keepRuntimeAlive() is set (counter=${0}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`,
|
|
46
|
+
sa?.(b),u(b));ka=a;Oa||(k.onExit?.(a),x=!0);ca(a,new Ja(a))},pc=()=>{if(!Oa)try{oc(ka)}catch(a){mc(a)}},qc=a=>{if(x)u("user callback triggered after runtime exited or application aborted. Ignoring.");else try{a(),pc()}catch(b){mc(b)}},rc=(a,b)=>{setTimeout(()=>{qc(a)},b)},Bc=(a,b)=>{sc=a;tc=b;if(uc)if(vc||=!0,0==a)Z=function(){setTimeout(wc,Math.max(0,xc+b-performance.now())|0)},yc="timeout";else if(1==a)Z=function(){zc(wc)},yc="rAF";else{if(2==a){if(!Ac)if(globalThis.setImmediate)Ac=setImmediate;
|
|
47
|
+
else{var c=[];addEventListener("message",d=>{if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);Ac=d=>{c.push(d);postMessage("setimmediate","*")}}Z=function(){Ac(wc)};yc="immediate"}}else u("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.")},Jc=a=>{function b(){return c<Cc?(pc(),!1):!0}l(!uc,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");
|
|
48
|
+
uc=a;var c=Cc;vc=!1;wc=function(){if(!x)if(0<Dc.length){var d=Dc.shift();d.ja(d.ga);if(Ec){var e=Ec,f=0==e%1?e-1:Math.floor(e);Ec=d.ha?f:(8*e+(f+.5))/9}k.setStatus&&(d=k.statusMessage||"Please wait...",e=Ec??0,f=Fc.ia??0,e?e<f?k.setStatus("{message} ({expected - remaining}/{expected})"):k.setStatus(d):k.setStatus(""));b()&&setTimeout(wc,0)}else if(b())if(Gc=Gc+1|0,1==sc&&1<tc&&0!=Gc%tc)Z();else{0==sc&&(xc=performance.now());"timeout"===yc&&k.ctx&&(K("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),
|
|
49
|
+
yc="");a:if(!x){for(d of Hc)if(!1===d())break a;qc(a);for(e of Ic)e();A()}b()&&Z()}}},vc=!1,Z=null,yc="",Cc=0,uc=null,sc=0,tc=0,Gc=0,Dc=[],Hc=[],Ic=[],Kc=0;function zc(a){if(globalThis.requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===Kc)Kc=b+1E3/60;else for(;b+2>=Kc;)Kc+=1E3/60;setTimeout(a,Math.max(Kc-b,0))}}
|
|
50
|
+
var Fc={},xc,wc,Ac,Ec,Lc={},Nc=()=>{if(!Mc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:ba||"./this.program"},b;for(b in Lc)void 0===Lc[b]?delete a[b]:a[b]=Lc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Mc=c}return Mc},Mc,Oc=[null,[],[]],Pc=(a,b)=>{var c=Oc[a];l(c);0===b||10===b?((1===a?q:u)(Sa(c)),c.length=0):c.push(b)};
|
|
51
|
+
(()=>{let a=sb.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof sb&&c instanceof sb))return!1;var d=this.g.j.h,e=this.g.i;c.g=c.g;var f=c.g.j.h;for(c=c.g.i;d.o;)e=d.I(e),d=d.o;for(;f.o;)c=f.I(c),f=f.o;return d===f&&e===c},clone:function(){this.g.i||gb(this);if(this.g.H)return this.g.count.value+=1,this;var c=ob,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.g;c=c(e.call(d,f,{g:{value:{count:g.count,G:g.G,H:g.H,i:g.i,j:g.j,m:g.m,v:g.v}}}));c.g.count.value+=1;c.g.G=!1;
|
|
52
|
+
return c},["delete"](){this.g.i||gb(this);if(this.g.G&&!this.g.H)throw new R("Object already scheduled for deletion");ib(this);var c=this.g;--c.count.value;0===c.count.value&&(c.m?c.v.C(c.m):c.j.h.C(c.i));this.g.H||(this.g.m=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){this.g.i||gb(this);if(this.g.G&&!this.g.H)throw new R("Object already scheduled for deletion");rb.push(this);this.g.G=!0;return this}});const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
|
|
53
|
+
Object.assign(Eb.prototype,{W(a){this.R&&(a=this.R(a));return a},P(a){this.C?.(a)},A:Db,l:qb});l(10===X.length);k.requestAnimationFrame=zc;k.pauseMainLoop=function(){Z=null;Cc++};k.resumeMainLoop=function(){Cc++;var a=sc,b=tc,c=uc;uc=null;Jc(c);Bc(a,b);Z()};k.preMainLoop&&Hc.push(k.preMainLoop);k.postMainLoop&&Ic.push(k.postMainLoop);k.noExitRuntime&&(Oa=k.noExitRuntime);k.print&&(q=k.print);k.printErr&&(u=k.printErr);k.wasmBinary&&(ja=k.wasmBinary);k.FS_createDataFile=function(){Da()};
|
|
54
|
+
k.FS_createPreloadedFile=function(){Da()};Object.getOwnPropertyDescriptor(k,"fetchSettings")&&y("`Module.fetchSettings` was supplied but `fetchSettings` not included in INCOMING_MODULE_JS_API");k.thisProgram&&(ba=k.thisProgram);l("undefined"==typeof k.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");l("undefined"==typeof k.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
|
|
55
|
+
l("undefined"==typeof k.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");l("undefined"==typeof k.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead");l("undefined"==typeof k.read,"Module.read option was removed");l("undefined"==typeof k.readAsync,"Module.readAsync option was removed (modify readAsync in JS)");l("undefined"==typeof k.readBinary,"Module.readBinary option was removed (modify readBinary in JS)");
|
|
56
|
+
l("undefined"==typeof k.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");l("undefined"==typeof k.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");l("undefined"==typeof k.ENVIRONMENT,"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");l("undefined"==typeof k.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time");
|
|
57
|
+
l("undefined"==typeof k.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally");l("undefined"==typeof k.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);0<k.preInit.length;)k.preInit.shift()();pa("preInit");"writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertI32PairToI53Checked convertU32PairToI53 getTempRet0 setTempRet0 zeroMemory withStackSave strError inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr readEmAsmArgs jstoi_q autoResumeAudioContext getDynCaller dynCall runtimeKeepalivePush runtimeKeepalivePop asyncLoad asmjsMangle mmapAlloc HandleAllocator getUniqueRunDependency addRunDependency removeRunDependency addOnInit addOnPostCtor addOnPreMain addOnExit STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS ccall cwrap convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction intArrayFromString intArrayToString stringToAscii stringToNewUTF8 stringToUTF8OnStack writeArrayToMemory registerKeyEventCallback maybeCStringToJsString findEventTarget getBoundingClientRect fillMouseEventData registerMouseEventCallback registerWheelEventCallback registerUiEventCallback registerFocusEventCallback fillDeviceOrientationEventData registerDeviceOrientationEventCallback fillDeviceMotionEventData registerDeviceMotionEventCallback screenOrientation fillOrientationChangeEventData registerOrientationChangeEventCallback fillFullscreenChangeEventData registerFullscreenChangeEventCallback JSEvents_requestFullscreen JSEvents_resizeCanvasForFullscreen registerRestoreOldStyle hideEverythingExceptGivenElement restoreHiddenElements setLetterbox softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData registerBatteryEventCallback setCanvasElementSize getCanvasElementSize jsStackTrace getCallstack convertPCtoSourceLocation wasiRightsToMuslOFlags wasiOFlagsToMuslOFlags initRandomFill randomFill setImmediateWrapped clearImmediateWrapped registerPostMainLoop registerPreMainLoop getPromise makePromise idsToPromises makePromiseCallback Browser_asyncPrepareDataCounter isLeapYear ydayFromDate arraySum addDays getSocketFromFD getSocketAddress heapObjectForWebGLType toTypedArrayIndex webgl_enable_ANGLE_instanced_arrays webgl_enable_OES_vertex_array_object webgl_enable_WEBGL_draw_buffers webgl_enable_WEBGL_multi_draw webgl_enable_EXT_polygon_offset_clamp webgl_enable_EXT_clip_control webgl_enable_WEBGL_polygon_mode emscriptenWebGLGet computeUnpackAlignedImageSize colorChannelsInGlTextureFormat emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib __glGetActiveAttribOrUniform writeGLArray registerWebGlEventCallback runAndAbortIfError ALLOC_NORMAL ALLOC_STACK allocate writeStringToMemory writeAsciiToMemory allocateUTF8 allocateUTF8OnStack demangle stackTrace getNativeTypeSize getFunctionArgsName createJsInvoker PureVirtualError registerInheritedInstance unregisterInheritedInstance getInheritedInstanceCount getLiveInheritedInstances enumReadValueFromPointer setDelayFunction count_emval_handles".split(" ").forEach(function(a){qa(a)});
|
|
58
|
+
"run out err callMain abort wasmExports HEAPF32 HEAPF64 HEAP8 HEAPU8 HEAP16 HEAPU16 HEAP32 HEAPU32 HEAP64 HEAPU64 writeStackCookie checkStackCookie INT53_MAX INT53_MIN bigintToI53Checked stackSave stackRestore stackAlloc createNamedFunction ptrToString exitJS getHeapMax growMemory ENV ERRNO_CODES DNS Protocols Sockets timers warnOnce readEmAsmArgsArray getExecutableName handleException keepRuntimeAlive callUserCallback maybeExit alignMemory wasmTable wasmMemory noExitRuntime addOnPreRun addOnPostRun freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS UTF8Decoder UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 AsciiToString UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 JSEvents specialHTMLTargets findCanvasEventTarget currentFullscreenStrategy restoreOldWindowedStyle UNWIND_CACHE ExitStatus getEnvStrings checkWasiClock flush_NO_FILESYSTEM safeSetTimeout safeRequestAnimationFrame emSetImmediate emClearImmediate_deps emClearImmediate promiseMap getExceptionMessageCommon getCppExceptionTag getCppExceptionThrownObjectFromWebAssemblyException Browser requestFullscreen requestFullScreen setCanvasSize getUserMedia createContext getPreloadedImageData__data wget MONTH_DAYS_REGULAR MONTH_DAYS_LEAP MONTH_DAYS_REGULAR_CUMULATIVE MONTH_DAYS_LEAP_CUMULATIVE SYSCALLS tempFixedLengthArray miniTempWebGLFloatBuffers miniTempWebGLIntBuffers GL AL GLUT EGL GLEW IDBStore SDL SDL_gfx print printErr jstoi_s DOTNETENTROPY InternalError BindingError throwInternalError throwBindingError registeredTypes awaitingDependencies typeDependencies tupleRegistrations structRegistrations sharedRegisterType whenDependentTypesAreResolved getTypeName getFunctionName heap32VectorToArray requireRegisteredType usesDestructorStack createJsInvokerSignature checkArgCount getRequiredArgCount UnboundTypeError InvokerFunctions EmValType EmValOptionalType throwUnboundTypeError ensureOverloadTable exposePublicSymbol replacePublicSymbol embindRepr registeredInstances getBasestPointer getInheritedInstance registeredPointers registerType integerReadValueFromPointer floatReadValueFromPointer assertIntegerRange readPointer runDestructors craftInvokerFunction embind__requireFunction genericPointerToWireType constNoSmartPtrRawPointerToWireType nonConstNoSmartPtrRawPointerToWireType init_RegisteredPointer RegisteredPointer RegisteredPointer_fromWireType runDestructor releaseClassHandle finalizationRegistry detachFinalizer_deps detachFinalizer attachFinalizer makeClassHandle init_ClassHandle ClassHandle throwInstanceAlreadyDeleted deletionQueue flushPendingDeletes delayFunction RegisteredClass shallowCopyInternalPointer downcastPointer upcastPointer validateThis char_0 char_9 makeLegalFunctionName emval_freelist emval_handles emval_symbols getStringOrSymbol Emval emval_returnValue emval_lookupTypes emval_methodCallers emval_addMethodCaller".split(" ").forEach(qa);
|
|
59
|
+
k.getExceptionMessage=$a;k.incrementExceptionRefcount=a=>{a=Va(a);Qc(a)};k.decrementExceptionRefcount=a=>{a=Va(a);Rc(a)};
|
|
60
|
+
var N=E("_free"),Sc=E("_malloc"),Tc=E("_fflush"),Kb=E("___getTypeName"),ma=E("_emscripten_stack_get_end"),Ca=E("___trap"),Uc=E("_emscripten_stack_init"),Za=E("__emscripten_stack_restore"),Xa=E("__emscripten_stack_alloc"),Wa=E("_emscripten_stack_get_current"),Rc=E("___cxa_decrement_exception_refcount"),Qc=E("___cxa_increment_exception_refcount"),Ua=E("___thrown_object_from_unwind_exception"),Ya=E("___get_exception_message"),Ta=E("___cpp_exception"),Ba=E("wasmMemory"),Hb=E("wasmTable"),Vc={RhpGetBiasedWasmFunctionIndexForFunctionPointer:function(a){a=
|
|
61
|
+
Hb.get(a);a=parseInt(a.name)+2;isNaN(a)&&(a=0);return a},RhpGetCurrentBrowserThreadStackTrace:function(a,b,c){const d=(a=0===b)?Error().stack:k.S;let e=0;var f="";for(let m=0,p;m<d.length;m=p+1){p=d.indexOf("\n",m);0>p&&(p=d.length);const n=d.slice(m,p);var g=n.indexOf("wasm-function[");if(!(0>g&&0===e))if(0<=g&&n.endsWith(f,g)&&!c){0===e&&(f=n.lastIndexOf("//",g),0>f&&(f=0),f=n.slice(f,g));if(!a){var h=0;let r=0;g+=14;let t=n.indexOf("]",g);0<=t&&(h=parseInt(n.slice(g,t),10)+2,!isNaN(h)&&n.startsWith("]:0x",
|
|
62
|
+
t)&&(r=parseInt(n.slice(t+4),16)));I[b>>>2]=h;b+=4;I[b>>>2]=r;b+=4}e+=2}else{g=2*n.length+3>>2;if(!a){I[b>>>2]=-n.length;b+=4;for(h=0;h<n.length;h++)H[(b>>>1)+h]=n.charCodeAt(h);b+=4*g}e+=1+g}}k.S=a?d:null;return e},SystemJS_RandomBytes:function(a,b){let c="object"===typeof crypto&&"function"===typeof crypto.getRandomValues;if(!c&&(globalThis.crypto||(globalThis.crypto={}),!globalThis.crypto.getRandomValues)){let d=void 0;try{d=require("node:crypto")}catch{}d?d.fa?globalThis.crypto=d.fa:d.aa&&(globalThis.crypto.getRandomValues=
|
|
63
|
+
function(e){e&&e.set(d.aa(e.length))}):globalThis.crypto.getRandomValues=function(){throw Error("Using node without crypto support. To enable current operation, either provide polyfill for 'globalThis.crypto.getRandomValues' or enable 'node:crypto' module.");};c=!0}return c?(Pa(a,b),0):-1},__assert_fail:(a,b,c,d)=>y(`Assertion failed: ${L(a)}, at: `+[b?L(b):"unknown filename",c,d?L(d):"unknown function"]),__syscall_fadvise64:()=>0,__syscall_fcntl64:function(){return 0},__syscall_fstat64:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},
|
|
64
|
+
__syscall_getcwd:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},__syscall_lstat64:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},__syscall_newfstatat:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},__syscall_openat:function(){y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},__syscall_stat64:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},
|
|
65
|
+
__syscall_unlinkat:()=>{y("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")},__throw_exception_with_stack_trace:a=>{a=new WebAssembly.Exception(Ta,[a],{traceStack:!0});a.message=$a(a);throw a;},_abort_js:()=>y("native code called abort()"),_embind_register_bigint:(a,b,c,d,e)=>{b=O(b);const f=0n===d;let g=h=>h;if(f){const h=8*c;g=m=>BigInt.asUintN(h,m);e=g(e)}T(a,{name:b,l:g,s:(h,m)=>{if("number"==typeof m)m=BigInt(m);else if("bigint"!=typeof m)throw new TypeError(`Cannot convert "${U(m)}" to ${this.name}`);
|
|
66
|
+
fb(b,m,d,e);return m},A:eb(b,c,!f),u:null})},_embind_register_bool:(a,b,c,d)=>{b=O(b);T(a,{name:b,l:function(e){return!!e},s:function(e,f){return f?c:d},A:function(e){return this.l(F[e])},u:null})},_embind_register_class:(a,b,c,d,e,f,g,h,m,p,n,r,t)=>{n=O(n);f=V(e,f);h&&=V(g,h);p&&=V(m,p);t=V(r,t);var v=wb(n);vb(v,function(){Mb(`Cannot construct ${n} due to unbound types`,[d])});W([a,b,c],d?[d]:[],w=>{w=w[0];if(d){var B=w.h;var G=B.F}else G=sb.prototype;w=tb(n,function(...db){if(Object.getPrototypeOf(this)!==
|
|
67
|
+
S)throw new R(`Use 'new' to construct ${n}`);if(void 0===D.D)throw new R(`${n} has no accessible constructor`);var gc=D.D[db.length];if(void 0===gc)throw new R(`Tried to invoke ctor of ${n} with invalid number of parameters (${db.length}) - expected (${Object.keys(D.D).toString()}) parameters instead!`);return gc.apply(this,db)});var S=Object.create(G,{constructor:{value:w}});w.prototype=S;var D=new xb(n,w,S,t,B,f,h,p);if(D.o){var M;(M=D.o).J??(M.J=[]);D.o.J.push(D)}B=new Eb(n,D,!0,!1,!1);M=new Eb(n+
|
|
68
|
+
"*",D,!1,!1,!1);G=new Eb(n+" const*",D,!1,!0,!1);kb[a]={pointerType:M,T:G};Fb(v,w);return[B,M,G]})},_embind_register_class_class_function:(a,b,c,d,e,f,g,h)=>{var m=Rb(c,d);b=O(b);b=Sb(b);f=V(e,f,h);W([],[a],p=>{function n(){Mb(`Cannot call ${r} due to unbound types`,m)}p=p[0];var r=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var t=p.h.constructor;void 0===t[b]?(n.K=c-1,t[b]=n):(ub(t,b,r),t[b].B[c-1]=n);W([],m,v=>{v=[v[0],null].concat(v.slice(1));v=Qb(r,v,f,g,h);void 0===t[b].B?
|
|
69
|
+
(v.K=c-1,t[b]=v):t[b].B[c-1]=v;if(p.h.J)for(const w of p.h.J)w.constructor.hasOwnProperty(b)||(w.constructor[b]=v);return[]});return[]})},_embind_register_class_constructor:(a,b,c,d,e,f)=>{l(0<b);var g=Rb(b,c);e=V(d,e);W([],[a],h=>{h=h[0];var m=`constructor ${h.name}`;void 0===h.h.D&&(h.h.D=[]);if(void 0!==h.h.D[b-1])throw new R(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
70
|
+
h.h.D[b-1]=()=>{Mb(`Cannot construct ${h.name} due to unbound types`,g)};W([],g,p=>{p.splice(1,0,null);h.h.D[b-1]=Qb(m,p,e,f);return[]});return[]})},_embind_register_class_property:(a,b,c,d,e,f,g,h,m,p)=>{b=O(b);e=V(d,e);W([],[a],n=>{n=n[0];var r=`${n.name}.${b}`,t={get(){Mb(`Cannot access ${r} due to unbound types`,[c,g])},enumerable:!0,configurable:!0};t.set=m?()=>Mb(`Cannot access ${r} due to unbound types`,[c,g]):()=>{throw new R(r+" is a read-only property");};Object.defineProperty(n.h.F,b,t);
|
|
71
|
+
W([],m?[c,g]:[c],v=>{var w=v[0],B={get(){var S=Tb(this,n,r+" getter");return w.l(e(f,S))},enumerable:!0};if(m){m=V(h,m);var G=v[1];B.set=function(S){var D=Tb(this,n,r+" setter"),M=[];m(p,D,G.s(M,S));Nb(M)}}Object.defineProperty(n.h.F,b,B);return[]});return[]})},_embind_register_emval:a=>T(a,Xb),_embind_register_float:(a,b,c)=>{b=O(b);T(a,{name:b,l:d=>d,s:(d,e)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert ${U(e)} to ${this.name}`);return e},A:Yb(b,c),u:null})},_embind_register_integer:(a,
|
|
72
|
+
b,c,d,e)=>{b=O(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}T(a,{name:b,l:f,s:(h,m)=>{if("number"!=typeof m&&"boolean"!=typeof m)throw new TypeError(`Cannot convert "${U(m)}" to ${b}`);fb(b,m,d,e);return m},A:eb(b,c,0!==d),u:null})},_embind_register_memory_view:(a,b,c)=>{function d(f){return new e(ta.buffer,z[f+4>>2],z[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=O(c);T(a,{name:c,l:d,A:d},
|
|
73
|
+
{X:!0})},_embind_register_optional:a=>{T(a,Zb)},_embind_register_std_string:(a,b)=>{b=O(b);T(a,{name:b,l(c){var d=L(c+4,z[c>>2],!0);N(c);return d},s(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new R("Cannot pass non-string to std::string");var f=e?$b(d):d.length;var g=Sc(4+f+1),h=g+4;z[g>>2]=f;e?Y(d,h,f+1):F.set(d,h);null!==c&&c.push(N,g);return g},A:Db,u(c){N(c)}})},_embind_register_std_wstring:(a,b,c)=>
|
|
74
|
+
{c=O(c);if(2===b){var d=bc;var e=cc;var f=dc}else l(4===b,"only 2-byte and 4-byte strings are currently supported"),d=ec,e=fc,f=hc;T(a,{name:c,l:g=>{var h=d(g+4,z[g>>2]*b,!0);N(g);return h},s:(g,h)=>{if("string"!=typeof h)throw new R(`Cannot pass non-string to C++ string type ${c}`);var m=f(h),p=Sc(4+m+b);z[p>>2]=m/b;e(h,p+4,m+b);null!==g&&g.push(N,p);return p},A:Db,u(g){N(g)}})},_embind_register_void:(a,b)=>{b=O(b);T(a,{Y:!0,name:b,l:()=>{},s:()=>{}})},_emval_create_invoker:(a,b,c)=>{var [d,...e]=
|
|
75
|
+
kc(a,b),f=d.s.bind(d),g=e.map(m=>m.A.bind(m));a--;var h=Array(a);b=`methodCaller<(${e.map(m=>m.name)}) => ${d.name}>`;return jc(tb(b,(m,p,n,r)=>{for(var t=0,v=0;v<a;++v)h[v]=g[v](r+t),t+=8;switch(c){case 0:var w=Wb(m).apply(null,h);break;case 2:w=Reflect.construct(Wb(m),h);break;case 3:w=h[0];break;case 1:w=B;r=lc[p];p=w[void 0===r?O(p):r];var B;Wb(m);w=p.call(w,...h)}m=[];p=f(m,w);m.length&&(z[n>>2]=Bb(m));return p}))},_emval_invoke:(a,b,c,d,e)=>ic[a](b,c,d,e),_emval_run_destructors:a=>{var b=Wb(a);
|
|
76
|
+
Nb(b);Vb(a)},_tzset_js:(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();z[a>>2]=60*Math.max(f,e);I[b>>2]=Number(f!=e);b=g=>{var h=Math.abs(g);return`UTC${0<=g?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(f);b=b(e);l(a);l(b);l(16>=$b(a),`timezone name truncated to fit in TZNAME_MAX (${a})`);l(16>=$b(b),`timezone name truncated to fit in TZNAME_MAX (${b})`);e<f?(Y(a,c,17),Y(b,d,17)):
|
|
77
|
+
(Y(a,d,17),Y(b,c,17))},clock_time_get:function(a,b,c){if(!(0<=a&&3>=a))return 28;xa[c>>3]=BigInt(Math.round(1E6*(0===a?Date.now():performance.now())));return 0},emscripten_async_call:(a,b,c)=>{rc(()=>Ib(a)(b),c)},emscripten_date_now:()=>Date.now(),emscripten_get_heap_max:()=>2147483648,emscripten_get_now:()=>performance.now(),emscripten_resize_heap:a=>{var b=F.length;a>>>=0;l(a>b);if(2147483648<a)return u(`Cannot enlarge memory, requested ${a} bytes, but the limit is ${2147483648} bytes!`),!1;for(var c=
|
|
78
|
+
1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math,f=e.min;d=Math.max(a,d);l(65536,"alignment argument is required");e=f.call(e,2147483648,65536*Math.ceil(d/65536));a:{f=e;d=Ba.buffer.byteLength;try{Ba.grow((f-d+65535)/65536|0);Aa();var g=1;break a}catch(h){u(`growMemory: Attempted to grow heap from ${d} bytes to ${f} bytes, but got error: ${h}`)}g=void 0}if(g)return!0}u(`Failed to grow the heap from ${b} bytes to ${e} bytes, not enough memory!`);return!1},environ_get:(a,b)=>{var c=
|
|
79
|
+
0,d=0,e;for(e of Nc()){var f=b+c;z[a+d>>2]=f;c+=Y(e,f,Infinity)+1;d+=4}return 0},environ_sizes_get:(a,b)=>{var c=Nc();z[a>>2]=c.length;a=0;for(var d of c)a+=$b(d)+1;z[b>>2]=a;return 0},exit:oc,fd_close:()=>{y("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM")},fd_pwrite:function(){y("fd_pwrite called without SYSCALLS_REQUIRE_FILESYSTEM")},fd_read:()=>{y("fd_read called without SYSCALLS_REQUIRE_FILESYSTEM")},fd_seek:function(){return 70},fd_write:(a,b,c,d)=>{for(var e=0,f=0;f<c;f++){var g=z[b>>
|
|
80
|
+
2],h=z[b+4>>2];b+=8;for(var m=0;m<h;m++)Pc(a,F[g+m]);e+=h}z[d>>2]=e;return 0}},Wc;function nc(){var a=q,b=u,c=!1;q=u=()=>{c=!0};try{Tc(0),Oc[1].length&&Pc(1,10),Oc[2].length&&Pc(2,10)}catch(d){}q=a;u=b;c&&(K("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc."),K("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}var Ea;
|
|
81
|
+
Ea=await (async function(){function a(d){d=Ea=d.exports;l("undefined"!=typeof d.free,"missing Wasm export: free");N=J("free",1);l("undefined"!=typeof d.malloc,"missing Wasm export: malloc");Sc=J("malloc",1);l("undefined"!=typeof d.fflush,"missing Wasm export: fflush");Tc=J("fflush",1);l("undefined"!=typeof d.__getTypeName,"missing Wasm export: __getTypeName");Kb=J("__getTypeName",1);l("undefined"!=typeof d.emscripten_stack_get_end,"missing Wasm export: emscripten_stack_get_end");ma=d.emscripten_stack_get_end;
|
|
82
|
+
l("undefined"!=typeof d.emscripten_stack_get_base,"missing Wasm export: emscripten_stack_get_base");l("undefined"!=typeof d.htons,"missing Wasm export: htons");l("undefined"!=typeof d.ntohs,"missing Wasm export: ntohs");l("undefined"!=typeof d.__trap,"missing Wasm export: __trap");Ca=d.__trap;l("undefined"!=typeof d.emscripten_stack_init,"missing Wasm export: emscripten_stack_init");Uc=d.emscripten_stack_init;l("undefined"!=typeof d.emscripten_stack_get_free,"missing Wasm export: emscripten_stack_get_free");
|
|
83
|
+
l("undefined"!=typeof d._emscripten_stack_restore,"missing Wasm export: _emscripten_stack_restore");Za=d._emscripten_stack_restore;l("undefined"!=typeof d._emscripten_stack_alloc,"missing Wasm export: _emscripten_stack_alloc");Xa=d._emscripten_stack_alloc;l("undefined"!=typeof d.emscripten_stack_get_current,"missing Wasm export: emscripten_stack_get_current");Wa=d.emscripten_stack_get_current;l("undefined"!=typeof d.__cxa_decrement_exception_refcount,"missing Wasm export: __cxa_decrement_exception_refcount");
|
|
84
|
+
Rc=J("__cxa_decrement_exception_refcount",1);l("undefined"!=typeof d.__cxa_increment_exception_refcount,"missing Wasm export: __cxa_increment_exception_refcount");Qc=J("__cxa_increment_exception_refcount",1);l("undefined"!=typeof d.__thrown_object_from_unwind_exception,"missing Wasm export: __thrown_object_from_unwind_exception");Ua=J("__thrown_object_from_unwind_exception",1);l("undefined"!=typeof d.__get_exception_message,"missing Wasm export: __get_exception_message");Ya=J("__get_exception_message",
|
|
85
|
+
3);l("undefined"!=typeof d.memory,"missing Wasm export: memory");Ba=d.memory;l("undefined"!=typeof d.__indirect_function_table,"missing Wasm export: __indirect_function_table");Hb=d.__indirect_function_table;l("undefined"!=typeof d.__cpp_exception,"missing Wasm export: __cpp_exception");Ta=d.__cpp_exception;Aa();return Ea}var b=k,c={env:Vc,wasi_snapshot_preview1:Vc};if(k.instantiateWasm)return new Promise((d,e)=>{try{k.instantiateWasm(c,(f,g)=>{d(a(f,g))})}catch(f){u(`Module.instantiateWasm callback failed with error: ${f}`),
|
|
86
|
+
e(f)}});Fa??=k.locateFile?k.locateFile?k.locateFile("bindings.wasm",ea):ea+"bindings.wasm":(new URL("bindings.wasm",import.meta.url)).href;return function(d){l(k===b,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");b=null;return a(d.instance)}(await Ia(c))}());
|
|
87
|
+
(function(){function a(){l(!Wc);Wc=!0;k.calledRun=!0;if(!x){l(!za);za=!0;A();Ea.__wasm_call_ctors();ra?.(k);k.onRuntimeInitialized?.();pa("onRuntimeInitialized");l(!k._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');A();if(k.postRun)for("function"==typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;){var b=k.postRun.shift();La.push(b)}pa("postRun");Ka(La)}}Uc();la();if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.preRun]);k.preRun.length;)Na();
|
|
88
|
+
pa("preRun");Ka(Ma);k.setStatus?(k.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>k.setStatus(""),1);a()},1)):a();A()})();za?moduleRtn=k:moduleRtn=new Promise((a,b)=>{ra=a;sa=b});for(const a of Object.keys(k))a in moduleArg||Object.defineProperty(moduleArg,a,{configurable:!0,get(){y(`Access to module property ('${a}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});
|
|
84
89
|
;return moduleRtn}export default Module;
|
package/dists/bindings.wasm
CHANGED
|
Binary file
|