@imgly/plugin-print-ready-pdfs-web 0.1.0-rc.1
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/CHANGELOG.md +31 -0
- package/LICENSE.md +25 -0
- package/README.md +422 -0
- package/dist/GRACoL2013_CRPC6.icc +0 -0
- package/dist/ISOcoated_v2_eci.icc +0 -0
- package/dist/gs.js +3065 -0
- package/dist/gs.wasm +0 -0
- package/dist/index.mjs +30 -0
- package/dist/index.mjs.map +7 -0
- package/dist/sRGB_IEC61966-2-1.icc +0 -0
- package/package.json +99 -0
- package/src/wasm/ghostscript-module.ts +51 -0
- package/src/wasm/gs.js +3065 -0
- package/src/wasm/gs.wasm +0 -0
package/dist/gs.js
ADDED
|
@@ -0,0 +1,3065 @@
|
|
|
1
|
+
|
|
2
|
+
var Module = (() => {
|
|
3
|
+
var _scriptName = import.meta.url;
|
|
4
|
+
|
|
5
|
+
return (
|
|
6
|
+
async function(moduleArg = {}) {
|
|
7
|
+
var moduleRtn;
|
|
8
|
+
|
|
9
|
+
var f = Object.assign({}, moduleArg), aa, ba, ca = new Promise((a, b) => {
|
|
10
|
+
aa = a;
|
|
11
|
+
ba = b;
|
|
12
|
+
});
|
|
13
|
+
"getExceptionMessage incrementExceptionRefcount decrementExceptionRefcount _memory ___indirect_function_table _main onRuntimeInitialized".split(" ").forEach(a => {
|
|
14
|
+
Object.getOwnPropertyDescriptor(ca, a) || Object.defineProperty(ca, a, {get:() => h("You are getting " + a + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"), set:() => h("You are setting " + a + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),});
|
|
15
|
+
});
|
|
16
|
+
var da = "object" == typeof window, ea = "function" == typeof importScripts, fa = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, ha = !da && !fa && !ea;
|
|
17
|
+
if (f.ENVIRONMENT) {
|
|
18
|
+
throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");
|
|
19
|
+
}
|
|
20
|
+
if (fa) {
|
|
21
|
+
const {createRequire:a} = await import("module");
|
|
22
|
+
var require = a(import.meta.url);
|
|
23
|
+
}
|
|
24
|
+
f.noInitialRun = !0;
|
|
25
|
+
var ia = Object.assign({}, f), ja = [], ka = "./this.program", la = (a, b) => {
|
|
26
|
+
throw b;
|
|
27
|
+
}, l = "", ma, na, oa;
|
|
28
|
+
if (fa) {
|
|
29
|
+
if ("undefined" == typeof process || !process.release || "node" !== process.release.name) {
|
|
30
|
+
throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
31
|
+
}
|
|
32
|
+
var pa = process.versions.node, qa = pa.split(".").slice(0, 3);
|
|
33
|
+
qa = 10000 * qa[0] + 100 * qa[1] + 1 * qa[2].split("-")[0];
|
|
34
|
+
if (160000 > qa) {
|
|
35
|
+
throw Error("This emscripten-generated code requires node v16.0.0 (detected v" + pa + ")");
|
|
36
|
+
}
|
|
37
|
+
var fs = require("fs"), ra = require("path");
|
|
38
|
+
l = require("url").fileURLToPath(new URL("./", import.meta.url));
|
|
39
|
+
ma = (a, b) => {
|
|
40
|
+
a = sa(a) ? new URL(a) : ra.normalize(a);
|
|
41
|
+
return fs.readFileSync(a, b ? void 0 : "utf8");
|
|
42
|
+
};
|
|
43
|
+
oa = a => {
|
|
44
|
+
a = ma(a, !0);
|
|
45
|
+
a.buffer || (a = new Uint8Array(a));
|
|
46
|
+
n(a.buffer);
|
|
47
|
+
return a;
|
|
48
|
+
};
|
|
49
|
+
na = (a, b, c, d = !0) => {
|
|
50
|
+
a = sa(a) ? new URL(a) : ra.normalize(a);
|
|
51
|
+
fs.readFile(a, d ? void 0 : "utf8", (e, g) => {
|
|
52
|
+
e ? c(e) : b(d ? g.buffer : g);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
!f.thisProgram && 1 < process.argv.length && (ka = process.argv[1].replace(/\\/g, "/"));
|
|
56
|
+
ja = process.argv.slice(2);
|
|
57
|
+
la = (a, b) => {
|
|
58
|
+
process.exitCode = a;
|
|
59
|
+
throw b;
|
|
60
|
+
};
|
|
61
|
+
} else if (ha) {
|
|
62
|
+
if ("object" == typeof process && "function" === typeof require || "object" == typeof window || "function" == typeof importScripts) {
|
|
63
|
+
throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
64
|
+
}
|
|
65
|
+
} else if (da || ea) {
|
|
66
|
+
ea ? l = self.location.href : "undefined" != typeof document && document.currentScript && (l = document.currentScript.src);
|
|
67
|
+
_scriptName && (l = _scriptName);
|
|
68
|
+
l.startsWith("blob:") ? l = "" : l = l.substr(0, l.replace(/[?#].*/, "").lastIndexOf("/") + 1);
|
|
69
|
+
if ("object" != typeof window && "function" != typeof importScripts) {
|
|
70
|
+
throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
71
|
+
}
|
|
72
|
+
ma = a => {
|
|
73
|
+
var b = new XMLHttpRequest();
|
|
74
|
+
b.open("GET", a, !1);
|
|
75
|
+
b.send(null);
|
|
76
|
+
return b.responseText;
|
|
77
|
+
};
|
|
78
|
+
ea && (oa = a => {
|
|
79
|
+
var b = new XMLHttpRequest();
|
|
80
|
+
b.open("GET", a, !1);
|
|
81
|
+
b.responseType = "arraybuffer";
|
|
82
|
+
b.send(null);
|
|
83
|
+
return new Uint8Array(b.response);
|
|
84
|
+
});
|
|
85
|
+
na = (a, b, c) => {
|
|
86
|
+
var d = new XMLHttpRequest();
|
|
87
|
+
d.open("GET", a, !0);
|
|
88
|
+
d.responseType = "arraybuffer";
|
|
89
|
+
d.onload = () => {
|
|
90
|
+
200 == d.status || 0 == d.status && d.response ? b(d.response) : c();
|
|
91
|
+
};
|
|
92
|
+
d.onerror = c;
|
|
93
|
+
d.send(null);
|
|
94
|
+
};
|
|
95
|
+
} else {
|
|
96
|
+
throw Error("environment detection error");
|
|
97
|
+
}
|
|
98
|
+
var ta = f.print || console.log.bind(console), p = f.printErr || console.error.bind(console);
|
|
99
|
+
Object.assign(f, ia);
|
|
100
|
+
ia = null;
|
|
101
|
+
q("ENVIRONMENT");
|
|
102
|
+
q("GL_MAX_TEXTURE_IMAGE_UNITS");
|
|
103
|
+
q("SDL_canPlayWithWebAudio");
|
|
104
|
+
q("SDL_numSimultaneouslyQueuedBuffers");
|
|
105
|
+
q("INITIAL_MEMORY");
|
|
106
|
+
q("wasmMemory");
|
|
107
|
+
q("arguments");
|
|
108
|
+
q("buffer");
|
|
109
|
+
q("canvas");
|
|
110
|
+
q("doNotCaptureKeyboard");
|
|
111
|
+
q("dynamicLibraries");
|
|
112
|
+
q("elementPointerLock");
|
|
113
|
+
q("extraStackTrace");
|
|
114
|
+
q("forcedAspectRatio");
|
|
115
|
+
q("keyboardListeningElement");
|
|
116
|
+
q("freePreloadedMediaOnUse");
|
|
117
|
+
q("loadSplitModule");
|
|
118
|
+
q("logReadFiles");
|
|
119
|
+
q("mainScriptUrlOrBlob");
|
|
120
|
+
q("mem");
|
|
121
|
+
q("monitorRunDependencies");
|
|
122
|
+
q("noExitRuntime");
|
|
123
|
+
q("onAbort");
|
|
124
|
+
q("onCustomMessage");
|
|
125
|
+
q("onExit");
|
|
126
|
+
q("onFree");
|
|
127
|
+
q("onFullScreen");
|
|
128
|
+
q("onMalloc");
|
|
129
|
+
q("onRealloc");
|
|
130
|
+
q("onRuntimeInitialized");
|
|
131
|
+
q("postMainLoop");
|
|
132
|
+
q("postRun");
|
|
133
|
+
q("preInit");
|
|
134
|
+
q("preMainLoop");
|
|
135
|
+
q("preinitializedWebGLContext");
|
|
136
|
+
q("preloadPlugins");
|
|
137
|
+
q("quit");
|
|
138
|
+
q("setStatus");
|
|
139
|
+
q("statusMessage");
|
|
140
|
+
q("stderr");
|
|
141
|
+
q("stdin");
|
|
142
|
+
q("stdout");
|
|
143
|
+
q("thisProgram");
|
|
144
|
+
q("wasm");
|
|
145
|
+
q("wasmBinary");
|
|
146
|
+
q("websocket");
|
|
147
|
+
q("fetchSettings");
|
|
148
|
+
ua("arguments", "arguments_");
|
|
149
|
+
ua("thisProgram", "thisProgram");
|
|
150
|
+
ua("quit", "quit_");
|
|
151
|
+
n("undefined" == typeof f.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
|
|
152
|
+
n("undefined" == typeof f.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
|
|
153
|
+
n("undefined" == typeof f.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
|
|
154
|
+
n("undefined" == typeof f.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
|
|
155
|
+
n("undefined" == typeof f.read, "Module.read option was removed (modify read_ in JS)");
|
|
156
|
+
n("undefined" == typeof f.readAsync, "Module.readAsync option was removed (modify readAsync in JS)");
|
|
157
|
+
n("undefined" == typeof f.readBinary, "Module.readBinary option was removed (modify readBinary in JS)");
|
|
158
|
+
n("undefined" == typeof f.setWindowTitle, "Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");
|
|
159
|
+
n("undefined" == typeof f.TOTAL_MEMORY, "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");
|
|
160
|
+
ua("asm", "wasmExports");
|
|
161
|
+
ua("read", "read_");
|
|
162
|
+
ua("readAsync", "readAsync");
|
|
163
|
+
ua("readBinary", "readBinary");
|
|
164
|
+
ua("setWindowTitle", "setWindowTitle");
|
|
165
|
+
n(!ha, "shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");
|
|
166
|
+
ua("wasmBinary", "wasmBinary");
|
|
167
|
+
"object" != typeof WebAssembly && p("no native wasm support detected");
|
|
168
|
+
var va, wa = !1, xa;
|
|
169
|
+
function n(a, b) {
|
|
170
|
+
a || h("Assertion failed" + (b ? ": " + b : ""));
|
|
171
|
+
}
|
|
172
|
+
var v, ya, za, w, A, Aa;
|
|
173
|
+
function Ba() {
|
|
174
|
+
var a = va.buffer;
|
|
175
|
+
f.HEAP8 = v = new Int8Array(a);
|
|
176
|
+
f.HEAP16 = za = new Int16Array(a);
|
|
177
|
+
f.HEAPU8 = ya = new Uint8Array(a);
|
|
178
|
+
f.HEAPU16 = new Uint16Array(a);
|
|
179
|
+
f.HEAP32 = w = new Int32Array(a);
|
|
180
|
+
f.HEAPU32 = A = new Uint32Array(a);
|
|
181
|
+
f.HEAPF32 = new Float32Array(a);
|
|
182
|
+
f.HEAPF64 = new Float64Array(a);
|
|
183
|
+
f.HEAP64 = Aa = new BigInt64Array(a);
|
|
184
|
+
f.HEAPU64 = new BigUint64Array(a);
|
|
185
|
+
}
|
|
186
|
+
n(!f.STACK_SIZE, "STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time");
|
|
187
|
+
n("undefined" != typeof Int32Array && "undefined" !== typeof Float64Array && void 0 != Int32Array.prototype.subarray && void 0 != Int32Array.prototype.set, "JS engine does not provide full typed array support");
|
|
188
|
+
n(!f.wasmMemory, "Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally");
|
|
189
|
+
n(!f.INITIAL_MEMORY, "Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");
|
|
190
|
+
function Ca() {
|
|
191
|
+
if (!wa) {
|
|
192
|
+
var a = Da();
|
|
193
|
+
0 == a && (a += 4);
|
|
194
|
+
var b = A[a >> 2], c = A[a + 4 >> 2];
|
|
195
|
+
34821223 == b && 2310721022 == c || h(`Stack overflow! Stack cookie has been overwritten at ${Ea(a)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${Ea(c)} ${Ea(b)}`);
|
|
196
|
+
1668509029 != A[0] && h("Runtime error: The application has corrupted its heap memory area (address zero)!");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
var Fa = new Int16Array(1), Ga = new Int8Array(Fa.buffer);
|
|
200
|
+
Fa[0] = 25459;
|
|
201
|
+
if (115 !== Ga[0] || 99 !== Ga[1]) {
|
|
202
|
+
throw "Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";
|
|
203
|
+
}
|
|
204
|
+
var Ha = [], Ia = [], Ja = [], Ka = [], La = !1;
|
|
205
|
+
n(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
206
|
+
n(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
207
|
+
n(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
208
|
+
n(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
209
|
+
var Ma = 0, Na = null, Oa = null, Pa = {};
|
|
210
|
+
function Qa(a) {
|
|
211
|
+
for (var b = a;;) {
|
|
212
|
+
if (!Pa[a]) {
|
|
213
|
+
return a;
|
|
214
|
+
}
|
|
215
|
+
a = b + Math.random();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function Ra(a) {
|
|
219
|
+
Ma++;
|
|
220
|
+
a ? (n(!Pa[a]), Pa[a] = 1, null === Na && "undefined" != typeof setInterval && (Na = setInterval(() => {
|
|
221
|
+
if (wa) {
|
|
222
|
+
clearInterval(Na), Na = null;
|
|
223
|
+
} else {
|
|
224
|
+
var b = !1, c;
|
|
225
|
+
for (c in Pa) {
|
|
226
|
+
b || (b = !0, p("still waiting on run dependencies:")), p(`dependency: ${c}`);
|
|
227
|
+
}
|
|
228
|
+
b && p("(end of list)");
|
|
229
|
+
}
|
|
230
|
+
}, 10000))) : p("warning: run dependency added without ID");
|
|
231
|
+
}
|
|
232
|
+
function Sa(a) {
|
|
233
|
+
Ma--;
|
|
234
|
+
a ? (n(Pa[a]), delete Pa[a]) : p("warning: run dependency removed without ID");
|
|
235
|
+
0 == Ma && (null !== Na && (clearInterval(Na), Na = null), Oa && (a = Oa, Oa = null, a()));
|
|
236
|
+
}
|
|
237
|
+
function h(a) {
|
|
238
|
+
a = "Aborted(" + a + ")";
|
|
239
|
+
p(a);
|
|
240
|
+
wa = !0;
|
|
241
|
+
xa = 1;
|
|
242
|
+
a = new WebAssembly.RuntimeError(a);
|
|
243
|
+
ba(a);
|
|
244
|
+
throw a;
|
|
245
|
+
}
|
|
246
|
+
var Ta = a => a.startsWith("data:application/octet-stream;base64,"), sa = a => a.startsWith("file://");
|
|
247
|
+
function C(a, b) {
|
|
248
|
+
return (...c) => {
|
|
249
|
+
n(La, `native function \`${a}\` called before runtime initialization`);
|
|
250
|
+
var d = D[a];
|
|
251
|
+
n(d, `exported native function \`${a}\` not found`);
|
|
252
|
+
n(c.length <= b, `native function \`${a}\` called with ${c.length} args but expects ${b}`);
|
|
253
|
+
return d(...c);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
class E extends Error {
|
|
257
|
+
}
|
|
258
|
+
class Ua extends E {
|
|
259
|
+
}
|
|
260
|
+
class Va extends E {
|
|
261
|
+
constructor(a) {
|
|
262
|
+
super(a);
|
|
263
|
+
this.F = a;
|
|
264
|
+
a = Wa(a);
|
|
265
|
+
this.name = a[0];
|
|
266
|
+
this.message = a[1];
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
var Xa;
|
|
270
|
+
function Ya(a) {
|
|
271
|
+
if (oa) {
|
|
272
|
+
return oa(a);
|
|
273
|
+
}
|
|
274
|
+
throw "both async and sync fetching of the wasm failed";
|
|
275
|
+
}
|
|
276
|
+
function Za(a) {
|
|
277
|
+
if (da || ea) {
|
|
278
|
+
if ("function" == typeof fetch && !sa(a)) {
|
|
279
|
+
return fetch(a, {credentials:"same-origin"}).then(b => {
|
|
280
|
+
if (!b.ok) {
|
|
281
|
+
throw `failed to load wasm binary file at '${a}'`;
|
|
282
|
+
}
|
|
283
|
+
return b.arrayBuffer();
|
|
284
|
+
}).catch(() => Ya(a));
|
|
285
|
+
}
|
|
286
|
+
if (na) {
|
|
287
|
+
return new Promise((b, c) => {
|
|
288
|
+
na(a, d => b(new Uint8Array(d)), c);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return Promise.resolve().then(() => Ya(a));
|
|
293
|
+
}
|
|
294
|
+
function $a(a, b, c) {
|
|
295
|
+
return Za(a).then(d => WebAssembly.instantiate(d, b)).then(c, d => {
|
|
296
|
+
p(`failed to asynchronously prepare wasm: ${d}`);
|
|
297
|
+
sa(Xa) && p(`warning: Loading from a file URI (${Xa}) 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`);
|
|
298
|
+
h(d);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function ab(a, b) {
|
|
302
|
+
var c = Xa;
|
|
303
|
+
return "function" != typeof WebAssembly.instantiateStreaming || Ta(c) || sa(c) || fa || "function" != typeof fetch ? $a(c, a, b) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, a).then(b, function(e) {
|
|
304
|
+
p(`wasm streaming compile failed: ${e}`);
|
|
305
|
+
p("falling back to ArrayBuffer instantiation");
|
|
306
|
+
return $a(c, a, b);
|
|
307
|
+
}));
|
|
308
|
+
}
|
|
309
|
+
function ua(a, b) {
|
|
310
|
+
Object.getOwnPropertyDescriptor(f, a) || Object.defineProperty(f, a, {configurable:!0, get() {
|
|
311
|
+
h(`\`Module.${a}\` has been replaced by \`${b}\`` + " (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)");
|
|
312
|
+
}});
|
|
313
|
+
}
|
|
314
|
+
function q(a) {
|
|
315
|
+
Object.getOwnPropertyDescriptor(f, a) && h(`\`Module.${a}\` was supplied but \`${a}\` not included in INCOMING_MODULE_JS_API`);
|
|
316
|
+
}
|
|
317
|
+
function bb(a) {
|
|
318
|
+
return "FS_createPath" === a || "FS_createDataFile" === a || "FS_createPreloadedFile" === a || "FS_unlink" === a || "addRunDependency" === a || "FS_createLazyFile" === a || "FS_createDevice" === a || "removeRunDependency" === a;
|
|
319
|
+
}
|
|
320
|
+
function cb(a, b) {
|
|
321
|
+
"undefined" != typeof globalThis && Object.defineProperty(globalThis, a, {configurable:!0, get() {
|
|
322
|
+
db(`\`${a}\` is not longer defined by emscripten. ${b}`);
|
|
323
|
+
}});
|
|
324
|
+
}
|
|
325
|
+
cb("buffer", "Please use HEAP8.buffer or wasmMemory.buffer");
|
|
326
|
+
cb("asm", "Please use wasmExports instead");
|
|
327
|
+
function eb(a) {
|
|
328
|
+
Object.getOwnPropertyDescriptor(f, a) || Object.defineProperty(f, a, {configurable:!0, get() {
|
|
329
|
+
var b = `'${a}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;
|
|
330
|
+
bb(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
|
|
331
|
+
h(b);
|
|
332
|
+
}});
|
|
333
|
+
}
|
|
334
|
+
function fb(a) {
|
|
335
|
+
this.name = "ExitStatus";
|
|
336
|
+
this.message = `Program terminated with exit(${a})`;
|
|
337
|
+
this.status = a;
|
|
338
|
+
}
|
|
339
|
+
var gb = a => {
|
|
340
|
+
for (; 0 < a.length;) {
|
|
341
|
+
a.shift()(f);
|
|
342
|
+
}
|
|
343
|
+
}, Ea = a => {
|
|
344
|
+
n("number" === typeof a);
|
|
345
|
+
return "0x" + (a >>> 0).toString(16).padStart(8, "0");
|
|
346
|
+
}, db = a => {
|
|
347
|
+
db.pa || (db.pa = {});
|
|
348
|
+
db.pa[a] || (db.pa[a] = 1, fa && (a = "warning: " + a), p(a));
|
|
349
|
+
}, hb = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, ib = (a, b) => {
|
|
350
|
+
for (var c = b + NaN, d = b; a[d] && !(d >= c);) {
|
|
351
|
+
++d;
|
|
352
|
+
}
|
|
353
|
+
if (16 < d - b && a.buffer && hb) {
|
|
354
|
+
return hb.decode(a.subarray(b, d));
|
|
355
|
+
}
|
|
356
|
+
for (c = ""; b < d;) {
|
|
357
|
+
var e = a[b++];
|
|
358
|
+
if (e & 128) {
|
|
359
|
+
var g = a[b++] & 63;
|
|
360
|
+
if (192 == (e & 224)) {
|
|
361
|
+
c += String.fromCharCode((e & 31) << 6 | g);
|
|
362
|
+
} else {
|
|
363
|
+
var k = a[b++] & 63;
|
|
364
|
+
224 == (e & 240) ? e = (e & 15) << 12 | g << 6 | k : (240 != (e & 248) && db("Invalid UTF-8 leading byte " + Ea(e) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), e = (e & 7) << 18 | g << 12 | k << 6 | a[b++] & 63);
|
|
365
|
+
65536 > e ? c += String.fromCharCode(e) : (e -= 65536, c += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
c += String.fromCharCode(e);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return c;
|
|
372
|
+
}, F = a => {
|
|
373
|
+
n("number" == typeof a, `UTF8ToString expects a number (got ${typeof a})`);
|
|
374
|
+
return a ? ib(ya, a) : "";
|
|
375
|
+
}, jb = [], kb = 0, lb = 0;
|
|
376
|
+
class mb {
|
|
377
|
+
constructor(a) {
|
|
378
|
+
this.F = a;
|
|
379
|
+
this.v = a - 24;
|
|
380
|
+
}
|
|
381
|
+
L(a, b) {
|
|
382
|
+
A[this.v + 16 >> 2] = 0;
|
|
383
|
+
A[this.v + 4 >> 2] = a;
|
|
384
|
+
A[this.v + 8 >> 2] = b;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
var qb = a => {
|
|
388
|
+
var b = lb?.F;
|
|
389
|
+
if (!b) {
|
|
390
|
+
return nb(0), 0;
|
|
391
|
+
}
|
|
392
|
+
var c = new mb(b);
|
|
393
|
+
A[c.v + 16 >> 2] = b;
|
|
394
|
+
var d = A[c.v + 4 >> 2];
|
|
395
|
+
if (!d) {
|
|
396
|
+
return nb(0), b;
|
|
397
|
+
}
|
|
398
|
+
for (var e in a) {
|
|
399
|
+
var g = a[e];
|
|
400
|
+
if (0 === g || g === d) {
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
if (ob(g, d, c.v + 16)) {
|
|
404
|
+
return nb(g), b;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
nb(d);
|
|
408
|
+
return b;
|
|
409
|
+
}, rb = (a, b) => {
|
|
410
|
+
for (var c = 0, d = a.length - 1; 0 <= d; d--) {
|
|
411
|
+
var e = a[d];
|
|
412
|
+
"." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
|
|
413
|
+
}
|
|
414
|
+
if (b) {
|
|
415
|
+
for (; c; c--) {
|
|
416
|
+
a.unshift("..");
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return a;
|
|
420
|
+
}, G = a => {
|
|
421
|
+
var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
|
|
422
|
+
(a = rb(a.split("/").filter(d => !!d), !b).join("/")) || b || (a = ".");
|
|
423
|
+
a && c && (a += "/");
|
|
424
|
+
return (b ? "/" : "") + a;
|
|
425
|
+
}, sb = a => {
|
|
426
|
+
var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
|
|
427
|
+
a = b[0];
|
|
428
|
+
b = b[1];
|
|
429
|
+
if (!a && !b) {
|
|
430
|
+
return ".";
|
|
431
|
+
}
|
|
432
|
+
b &&= b.substr(0, b.length - 1);
|
|
433
|
+
return a + b;
|
|
434
|
+
}, tb = a => {
|
|
435
|
+
if ("/" === a) {
|
|
436
|
+
return "/";
|
|
437
|
+
}
|
|
438
|
+
a = G(a);
|
|
439
|
+
a = a.replace(/\/$/, "");
|
|
440
|
+
var b = a.lastIndexOf("/");
|
|
441
|
+
return -1 === b ? a : a.substr(b + 1);
|
|
442
|
+
}, ub = (...a) => G(a.join("/")), vb = (a, b) => G(a + "/" + b), wb = () => {
|
|
443
|
+
if ("object" == typeof crypto && "function" == typeof crypto.getRandomValues) {
|
|
444
|
+
return c => crypto.getRandomValues(c);
|
|
445
|
+
}
|
|
446
|
+
if (fa) {
|
|
447
|
+
try {
|
|
448
|
+
var a = require("crypto");
|
|
449
|
+
if (a.randomFillSync) {
|
|
450
|
+
return c => a.randomFillSync(c);
|
|
451
|
+
}
|
|
452
|
+
var b = a.randomBytes;
|
|
453
|
+
return c => (c.set(b(c.byteLength)), c);
|
|
454
|
+
} catch (c) {
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
h("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
|
|
458
|
+
}, xb = a => (xb = wb())(a), yb = (...a) => {
|
|
459
|
+
for (var b = "", c = !1, d = a.length - 1; -1 <= d && !c; d--) {
|
|
460
|
+
c = 0 <= d ? a[d] : H.cwd();
|
|
461
|
+
if ("string" != typeof c) {
|
|
462
|
+
throw new TypeError("Arguments to path.resolve must be strings");
|
|
463
|
+
}
|
|
464
|
+
if (!c) {
|
|
465
|
+
return "";
|
|
466
|
+
}
|
|
467
|
+
b = c + "/" + b;
|
|
468
|
+
c = "/" === c.charAt(0);
|
|
469
|
+
}
|
|
470
|
+
b = rb(b.split("/").filter(e => !!e), !c).join("/");
|
|
471
|
+
return (c ? "/" : "") + b || ".";
|
|
472
|
+
}, zb = (a, b) => {
|
|
473
|
+
function c(k) {
|
|
474
|
+
for (var m = 0; m < k.length && "" === k[m]; m++) {
|
|
475
|
+
}
|
|
476
|
+
for (var r = k.length - 1; 0 <= r && "" === k[r]; r--) {
|
|
477
|
+
}
|
|
478
|
+
return m > r ? [] : k.slice(m, r - m + 1);
|
|
479
|
+
}
|
|
480
|
+
a = yb(a).substr(1);
|
|
481
|
+
b = yb(b).substr(1);
|
|
482
|
+
a = c(a.split("/"));
|
|
483
|
+
b = c(b.split("/"));
|
|
484
|
+
for (var d = Math.min(a.length, b.length), e = d, g = 0; g < d; g++) {
|
|
485
|
+
if (a[g] !== b[g]) {
|
|
486
|
+
e = g;
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
d = [];
|
|
491
|
+
for (g = e; g < a.length; g++) {
|
|
492
|
+
d.push("..");
|
|
493
|
+
}
|
|
494
|
+
d = d.concat(b.slice(e));
|
|
495
|
+
return d.join("/");
|
|
496
|
+
}, Ab = [], Bb = a => {
|
|
497
|
+
for (var b = 0, c = 0; c < a.length; ++c) {
|
|
498
|
+
var d = a.charCodeAt(c);
|
|
499
|
+
127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
|
|
500
|
+
}
|
|
501
|
+
return b;
|
|
502
|
+
}, Cb = (a, b, c, d) => {
|
|
503
|
+
n("string" === typeof a, `stringToUTF8Array expects a string (got ${typeof a})`);
|
|
504
|
+
if (!(0 < d)) {
|
|
505
|
+
return 0;
|
|
506
|
+
}
|
|
507
|
+
var e = c;
|
|
508
|
+
d = c + d - 1;
|
|
509
|
+
for (var g = 0; g < a.length; ++g) {
|
|
510
|
+
var k = a.charCodeAt(g);
|
|
511
|
+
if (55296 <= k && 57343 >= k) {
|
|
512
|
+
var m = a.charCodeAt(++g);
|
|
513
|
+
k = 65536 + ((k & 1023) << 10) | m & 1023;
|
|
514
|
+
}
|
|
515
|
+
if (127 >= k) {
|
|
516
|
+
if (c >= d) {
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
b[c++] = k;
|
|
520
|
+
} else {
|
|
521
|
+
if (2047 >= k) {
|
|
522
|
+
if (c + 1 >= d) {
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
b[c++] = 192 | k >> 6;
|
|
526
|
+
} else {
|
|
527
|
+
if (65535 >= k) {
|
|
528
|
+
if (c + 2 >= d) {
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
b[c++] = 224 | k >> 12;
|
|
532
|
+
} else {
|
|
533
|
+
if (c + 3 >= d) {
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
1114111 < k && db("Invalid Unicode code point " + Ea(k) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");
|
|
537
|
+
b[c++] = 240 | k >> 18;
|
|
538
|
+
b[c++] = 128 | k >> 12 & 63;
|
|
539
|
+
}
|
|
540
|
+
b[c++] = 128 | k >> 6 & 63;
|
|
541
|
+
}
|
|
542
|
+
b[c++] = 128 | k & 63;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
b[c] = 0;
|
|
546
|
+
return c - e;
|
|
547
|
+
};
|
|
548
|
+
function Db(a) {
|
|
549
|
+
var b = Array(Bb(a) + 1);
|
|
550
|
+
a = Cb(a, b, 0, b.length);
|
|
551
|
+
b.length = a;
|
|
552
|
+
return b;
|
|
553
|
+
}
|
|
554
|
+
var Eb = [];
|
|
555
|
+
function Fb(a, b) {
|
|
556
|
+
Eb[a] = {input:[], output:[], I:b};
|
|
557
|
+
Gb(a, Hb);
|
|
558
|
+
}
|
|
559
|
+
var Hb = {open(a) {
|
|
560
|
+
var b = Eb[a.node.rdev];
|
|
561
|
+
if (!b) {
|
|
562
|
+
throw new H.g(43);
|
|
563
|
+
}
|
|
564
|
+
a.tty = b;
|
|
565
|
+
a.seekable = !1;
|
|
566
|
+
}, close(a) {
|
|
567
|
+
a.tty.I.fsync(a.tty);
|
|
568
|
+
}, fsync(a) {
|
|
569
|
+
a.tty.I.fsync(a.tty);
|
|
570
|
+
}, read(a, b, c, d) {
|
|
571
|
+
if (!a.tty || !a.tty.I.wa) {
|
|
572
|
+
throw new H.g(60);
|
|
573
|
+
}
|
|
574
|
+
for (var e = 0, g = 0; g < d; g++) {
|
|
575
|
+
try {
|
|
576
|
+
var k = a.tty.I.wa(a.tty);
|
|
577
|
+
} catch (m) {
|
|
578
|
+
throw new H.g(29);
|
|
579
|
+
}
|
|
580
|
+
if (void 0 === k && 0 === e) {
|
|
581
|
+
throw new H.g(6);
|
|
582
|
+
}
|
|
583
|
+
if (null === k || void 0 === k) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
e++;
|
|
587
|
+
b[c + g] = k;
|
|
588
|
+
}
|
|
589
|
+
e && (a.node.timestamp = Date.now());
|
|
590
|
+
return e;
|
|
591
|
+
}, write(a, b, c, d) {
|
|
592
|
+
if (!a.tty || !a.tty.I.la) {
|
|
593
|
+
throw new H.g(60);
|
|
594
|
+
}
|
|
595
|
+
try {
|
|
596
|
+
for (var e = 0; e < d; e++) {
|
|
597
|
+
a.tty.I.la(a.tty, b[c + e]);
|
|
598
|
+
}
|
|
599
|
+
} catch (g) {
|
|
600
|
+
throw new H.g(29);
|
|
601
|
+
}
|
|
602
|
+
d && (a.node.timestamp = Date.now());
|
|
603
|
+
return e;
|
|
604
|
+
},}, Ib = {wa() {
|
|
605
|
+
a: {
|
|
606
|
+
if (!Ab.length) {
|
|
607
|
+
var a = null;
|
|
608
|
+
if (fa) {
|
|
609
|
+
var b = Buffer.alloc(256), c = 0, d = process.stdin.fd;
|
|
610
|
+
try {
|
|
611
|
+
c = fs.readSync(d, b, 0, 256);
|
|
612
|
+
} catch (e) {
|
|
613
|
+
if (e.toString().includes("EOF")) {
|
|
614
|
+
c = 0;
|
|
615
|
+
} else {
|
|
616
|
+
throw e;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
0 < c && (a = b.slice(0, c).toString("utf-8"));
|
|
620
|
+
} else {
|
|
621
|
+
"undefined" != typeof window && "function" == typeof window.prompt && (a = window.prompt("Input: "), null !== a && (a += "\n"));
|
|
622
|
+
}
|
|
623
|
+
if (!a) {
|
|
624
|
+
a = null;
|
|
625
|
+
break a;
|
|
626
|
+
}
|
|
627
|
+
Ab = Db(a);
|
|
628
|
+
}
|
|
629
|
+
a = Ab.shift();
|
|
630
|
+
}
|
|
631
|
+
return a;
|
|
632
|
+
}, la(a, b) {
|
|
633
|
+
null === b || 10 === b ? (ta(ib(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
|
|
634
|
+
}, fsync(a) {
|
|
635
|
+
a.output && 0 < a.output.length && (ta(ib(a.output, 0)), a.output = []);
|
|
636
|
+
}, Na() {
|
|
637
|
+
return {ab:25856, cb:5, $a:191, bb:35387, Za:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
|
|
638
|
+
}, Oa() {
|
|
639
|
+
return 0;
|
|
640
|
+
}, Pa() {
|
|
641
|
+
return [24, 80];
|
|
642
|
+
},}, Jb = {la(a, b) {
|
|
643
|
+
null === b || 10 === b ? (p(ib(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
|
|
644
|
+
}, fsync(a) {
|
|
645
|
+
a.output && 0 < a.output.length && (p(ib(a.output, 0)), a.output = []);
|
|
646
|
+
},}, Kb = () => {
|
|
647
|
+
h("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported");
|
|
648
|
+
};
|
|
649
|
+
function Lb(a, b) {
|
|
650
|
+
var c = a.j ? a.j.length : 0;
|
|
651
|
+
c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.j, a.j = new Uint8Array(b), 0 < a.o && a.j.set(c.subarray(0, a.o), 0));
|
|
652
|
+
}
|
|
653
|
+
var J = {H:null, m() {
|
|
654
|
+
return J.createNode(null, "/", 16895, 0);
|
|
655
|
+
}, createNode(a, b, c, d) {
|
|
656
|
+
if (24576 === (c & 61440) || H.isFIFO(c)) {
|
|
657
|
+
throw new H.g(63);
|
|
658
|
+
}
|
|
659
|
+
J.H || (J.H = {dir:{node:{A:J.h.A, s:J.h.s, lookup:J.h.lookup, B:J.h.B, rename:J.h.rename, unlink:J.h.unlink, rmdir:J.h.rmdir, readdir:J.h.readdir, symlink:J.h.symlink}, stream:{u:J.i.u}}, file:{node:{A:J.h.A, s:J.h.s}, stream:{u:J.i.u, read:J.i.read, write:J.i.write, U:J.i.U, O:J.i.O, S:J.i.S}}, link:{node:{A:J.h.A, s:J.h.s, readlink:J.h.readlink}, stream:{}}, sa:{node:{A:J.h.A, s:J.h.s}, stream:H.Ha}});
|
|
660
|
+
c = H.createNode(a, b, c, d);
|
|
661
|
+
K(c.mode) ? (c.h = J.H.dir.node, c.i = J.H.dir.stream, c.j = {}) : H.isFile(c.mode) ? (c.h = J.H.file.node, c.i = J.H.file.stream, c.o = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.h = J.H.link.node, c.i = J.H.link.stream) : 8192 === (c.mode & 61440) && (c.h = J.H.sa.node, c.i = J.H.sa.stream);
|
|
662
|
+
c.timestamp = Date.now();
|
|
663
|
+
a && (a.j[b] = c, a.timestamp = c.timestamp);
|
|
664
|
+
return c;
|
|
665
|
+
}, kb(a) {
|
|
666
|
+
return a.j ? a.j.subarray ? a.j.subarray(0, a.o) : new Uint8Array(a.j) : new Uint8Array(0);
|
|
667
|
+
}, h:{A(a) {
|
|
668
|
+
var b = {};
|
|
669
|
+
b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
|
|
670
|
+
b.ino = a.id;
|
|
671
|
+
b.mode = a.mode;
|
|
672
|
+
b.nlink = 1;
|
|
673
|
+
b.uid = 0;
|
|
674
|
+
b.gid = 0;
|
|
675
|
+
b.rdev = a.rdev;
|
|
676
|
+
K(a.mode) ? b.size = 4096 : H.isFile(a.mode) ? b.size = a.o : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
|
|
677
|
+
b.atime = new Date(a.timestamp);
|
|
678
|
+
b.mtime = new Date(a.timestamp);
|
|
679
|
+
b.ctime = new Date(a.timestamp);
|
|
680
|
+
b.J = 4096;
|
|
681
|
+
b.blocks = Math.ceil(b.size / b.J);
|
|
682
|
+
return b;
|
|
683
|
+
}, s(a, b) {
|
|
684
|
+
void 0 !== b.mode && (a.mode = b.mode);
|
|
685
|
+
void 0 !== b.timestamp && (a.timestamp = b.timestamp);
|
|
686
|
+
if (void 0 !== b.size && (b = b.size, a.o != b)) {
|
|
687
|
+
if (0 == b) {
|
|
688
|
+
a.j = null, a.o = 0;
|
|
689
|
+
} else {
|
|
690
|
+
var c = a.j;
|
|
691
|
+
a.j = new Uint8Array(b);
|
|
692
|
+
c && a.j.set(c.subarray(0, Math.min(b, a.o)));
|
|
693
|
+
a.o = b;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}, lookup() {
|
|
697
|
+
throw H.ea[44];
|
|
698
|
+
}, B(a, b, c, d) {
|
|
699
|
+
return J.createNode(a, b, c, d);
|
|
700
|
+
}, rename(a, b, c) {
|
|
701
|
+
if (K(a.mode)) {
|
|
702
|
+
try {
|
|
703
|
+
var d = L(b, c);
|
|
704
|
+
} catch (g) {
|
|
705
|
+
}
|
|
706
|
+
if (d) {
|
|
707
|
+
for (var e in d.j) {
|
|
708
|
+
throw new H.g(55);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
delete a.parent.j[a.name];
|
|
713
|
+
a.parent.timestamp = Date.now();
|
|
714
|
+
a.name = c;
|
|
715
|
+
b.j[c] = a;
|
|
716
|
+
b.timestamp = a.parent.timestamp;
|
|
717
|
+
a.parent = b;
|
|
718
|
+
}, unlink(a, b) {
|
|
719
|
+
delete a.j[b];
|
|
720
|
+
a.timestamp = Date.now();
|
|
721
|
+
}, rmdir(a, b) {
|
|
722
|
+
var c = L(a, b), d;
|
|
723
|
+
for (d in c.j) {
|
|
724
|
+
throw new H.g(55);
|
|
725
|
+
}
|
|
726
|
+
delete a.j[b];
|
|
727
|
+
a.timestamp = Date.now();
|
|
728
|
+
}, readdir(a) {
|
|
729
|
+
var b = [".", ".."], c;
|
|
730
|
+
for (c of Object.keys(a.j)) {
|
|
731
|
+
b.push(c);
|
|
732
|
+
}
|
|
733
|
+
return b;
|
|
734
|
+
}, symlink(a, b, c) {
|
|
735
|
+
a = J.createNode(a, b, 41471, 0);
|
|
736
|
+
a.link = c;
|
|
737
|
+
return a;
|
|
738
|
+
}, readlink(a) {
|
|
739
|
+
if (40960 !== (a.mode & 61440)) {
|
|
740
|
+
throw new H.g(28);
|
|
741
|
+
}
|
|
742
|
+
return a.link;
|
|
743
|
+
},}, i:{read(a, b, c, d, e) {
|
|
744
|
+
var g = a.node.j;
|
|
745
|
+
if (e >= a.node.o) {
|
|
746
|
+
return 0;
|
|
747
|
+
}
|
|
748
|
+
a = Math.min(a.node.o - e, d);
|
|
749
|
+
n(0 <= a);
|
|
750
|
+
if (8 < a && g.subarray) {
|
|
751
|
+
b.set(g.subarray(e, e + a), c);
|
|
752
|
+
} else {
|
|
753
|
+
for (d = 0; d < a; d++) {
|
|
754
|
+
b[c + d] = g[e + d];
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return a;
|
|
758
|
+
}, write(a, b, c, d, e, g) {
|
|
759
|
+
n(!(b instanceof ArrayBuffer));
|
|
760
|
+
b.buffer === v.buffer && (g = !1);
|
|
761
|
+
if (!d) {
|
|
762
|
+
return 0;
|
|
763
|
+
}
|
|
764
|
+
a = a.node;
|
|
765
|
+
a.timestamp = Date.now();
|
|
766
|
+
if (b.subarray && (!a.j || a.j.subarray)) {
|
|
767
|
+
if (g) {
|
|
768
|
+
return n(0 === e, "canOwn must imply no weird position inside the file"), a.j = b.subarray(c, c + d), a.o = d;
|
|
769
|
+
}
|
|
770
|
+
if (0 === a.o && 0 === e) {
|
|
771
|
+
return a.j = b.slice(c, c + d), a.o = d;
|
|
772
|
+
}
|
|
773
|
+
if (e + d <= a.o) {
|
|
774
|
+
return a.j.set(b.subarray(c, c + d), e), d;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
Lb(a, e + d);
|
|
778
|
+
if (a.j.subarray && b.subarray) {
|
|
779
|
+
a.j.set(b.subarray(c, c + d), e);
|
|
780
|
+
} else {
|
|
781
|
+
for (g = 0; g < d; g++) {
|
|
782
|
+
a.j[e + g] = b[c + g];
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
a.o = Math.max(a.o, e + d);
|
|
786
|
+
return d;
|
|
787
|
+
}, u(a, b, c) {
|
|
788
|
+
1 === c ? b += a.position : 2 === c && H.isFile(a.node.mode) && (b += a.node.o);
|
|
789
|
+
if (0 > b) {
|
|
790
|
+
throw new H.g(28);
|
|
791
|
+
}
|
|
792
|
+
return b;
|
|
793
|
+
}, U(a, b, c) {
|
|
794
|
+
Lb(a.node, b + c);
|
|
795
|
+
a.node.o = Math.max(a.node.o, b + c);
|
|
796
|
+
}, O(a, b, c, d, e) {
|
|
797
|
+
if (!H.isFile(a.node.mode)) {
|
|
798
|
+
throw new H.g(43);
|
|
799
|
+
}
|
|
800
|
+
a = a.node.j;
|
|
801
|
+
if (e & 2 || a.buffer !== v.buffer) {
|
|
802
|
+
if (0 < c || c + b < a.length) {
|
|
803
|
+
a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
|
|
804
|
+
}
|
|
805
|
+
c = !0;
|
|
806
|
+
b = Kb();
|
|
807
|
+
if (!b) {
|
|
808
|
+
throw new H.g(48);
|
|
809
|
+
}
|
|
810
|
+
v.set(a, b);
|
|
811
|
+
} else {
|
|
812
|
+
c = !1, b = a.byteOffset;
|
|
813
|
+
}
|
|
814
|
+
return {v:b, ra:c};
|
|
815
|
+
}, S(a, b, c, d) {
|
|
816
|
+
J.i.write(a, b, 0, d, c, !1);
|
|
817
|
+
return 0;
|
|
818
|
+
},},}, Mb = (a, b, c) => {
|
|
819
|
+
var d = Qa(`al ${a}`);
|
|
820
|
+
na(a, e => {
|
|
821
|
+
n(e, `Loading data file "${a}" failed (no arrayBuffer).`);
|
|
822
|
+
b(new Uint8Array(e));
|
|
823
|
+
d && Sa(d);
|
|
824
|
+
}, () => {
|
|
825
|
+
if (c) {
|
|
826
|
+
c();
|
|
827
|
+
} else {
|
|
828
|
+
throw `Loading data file "${a}" failed.`;
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
d && Ra(d);
|
|
832
|
+
}, Nb = [], Ob = (a, b, c, d) => {
|
|
833
|
+
"undefined" != typeof Browser && Browser.L();
|
|
834
|
+
var e = !1;
|
|
835
|
+
Nb.forEach(g => {
|
|
836
|
+
!e && g.canHandle(b) && (g.handle(a, b, c, d), e = !0);
|
|
837
|
+
});
|
|
838
|
+
return e;
|
|
839
|
+
}, Pb = (a, b) => {
|
|
840
|
+
var c = 0;
|
|
841
|
+
a && (c |= 365);
|
|
842
|
+
b && (c |= 146);
|
|
843
|
+
return c;
|
|
844
|
+
}, Qb = {EPERM:63, ENOENT:44, ESRCH:71, EINTR:27, EIO:29, ENXIO:60, E2BIG:1, ENOEXEC:45, EBADF:8, ECHILD:12, EAGAIN:6, EWOULDBLOCK:6, ENOMEM:48, EACCES:2, EFAULT:21, ENOTBLK:105, EBUSY:10, EEXIST:20, EXDEV:75, ENODEV:43, ENOTDIR:54, EISDIR:31, EINVAL:28, ENFILE:41, EMFILE:33, ENOTTY:59, ETXTBSY:74, EFBIG:22, ENOSPC:51, ESPIPE:70, EROFS:69, EMLINK:34, EPIPE:64, EDOM:18, ERANGE:68, ENOMSG:49, EIDRM:24, ECHRNG:106, EL2NSYNC:156, EL3HLT:107, EL3RST:108, ELNRNG:109, EUNATCH:110, ENOCSI:111, EL2HLT:112,
|
|
845
|
+
EDEADLK:16, ENOLCK:46, EBADE:113, EBADR:114, EXFULL:115, ENOANO:104, EBADRQC:103, EBADSLT:102, EDEADLOCK:16, EBFONT:101, ENOSTR:100, ENODATA:116, ETIME:117, ENOSR:118, ENONET:119, ENOPKG:120, EREMOTE:121, ENOLINK:47, EADV:122, ESRMNT:123, ECOMM:124, EPROTO:65, EMULTIHOP:36, EDOTDOT:125, EBADMSG:9, ENOTUNIQ:126, EBADFD:127, EREMCHG:128, ELIBACC:129, ELIBBAD:130, ELIBSCN:131, ELIBMAX:132, ELIBEXEC:133, ENOSYS:52, ENOTEMPTY:55, ENAMETOOLONG:37, ELOOP:32, EOPNOTSUPP:138, EPFNOSUPPORT:139, ECONNRESET:15,
|
|
846
|
+
ENOBUFS:42, EAFNOSUPPORT:5, EPROTOTYPE:67, ENOTSOCK:57, ENOPROTOOPT:50, ESHUTDOWN:140, ECONNREFUSED:14, EADDRINUSE:3, ECONNABORTED:13, ENETUNREACH:40, ENETDOWN:38, ETIMEDOUT:73, EHOSTDOWN:142, EHOSTUNREACH:23, EINPROGRESS:26, EALREADY:7, EDESTADDRREQ:17, EMSGSIZE:35, EPROTONOSUPPORT:66, ESOCKTNOSUPPORT:137, EADDRNOTAVAIL:4, ENETRESET:39, EISCONN:30, ENOTCONN:53, ETOOMANYREFS:141, EUSERS:136, EDQUOT:19, ESTALE:72, ENOTSUP:138, ENOMEDIUM:148, EILSEQ:25, EOVERFLOW:61, ECANCELED:11, ENOTRECOVERABLE:56,
|
|
847
|
+
EOWNERDEAD:62, ESTRPIPE:135,};
|
|
848
|
+
function N(a) {
|
|
849
|
+
try {
|
|
850
|
+
return a();
|
|
851
|
+
} catch (c) {
|
|
852
|
+
if (!c.code) {
|
|
853
|
+
throw c;
|
|
854
|
+
}
|
|
855
|
+
if ("UNKNOWN" === c.code) {
|
|
856
|
+
throw new H.g(28);
|
|
857
|
+
}
|
|
858
|
+
a = H.g;
|
|
859
|
+
var b = c.code;
|
|
860
|
+
n(b in Qb, `unexpected node error code: ${b} (${c})`);
|
|
861
|
+
throw new a(Qb[b]);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
function Rb(a) {
|
|
865
|
+
var b;
|
|
866
|
+
return N(() => {
|
|
867
|
+
b = fs.lstatSync(a);
|
|
868
|
+
O.ja && (b.mode |= (b.mode & 292) >> 2);
|
|
869
|
+
return b.mode;
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
function P(a) {
|
|
873
|
+
for (var b = []; a.parent !== a;) {
|
|
874
|
+
b.push(a.name), a = a.parent;
|
|
875
|
+
}
|
|
876
|
+
b.push(a.m.X.root);
|
|
877
|
+
b.reverse();
|
|
878
|
+
return ub(...b);
|
|
879
|
+
}
|
|
880
|
+
var O = {ja:!1, qa() {
|
|
881
|
+
O.ja = !!process.platform.match(/^win/);
|
|
882
|
+
var a = process.binding("constants");
|
|
883
|
+
a.fs && (a = a.fs);
|
|
884
|
+
O.ba = {1024:a.O_APPEND, 64:a.O_CREAT, 128:a.O_EXCL, 256:a.O_NOCTTY, 0:a.O_RDONLY, 2:a.O_RDWR, 4096:a.O_SYNC, 512:a.O_TRUNC, 1:a.O_WRONLY, 131072:a.O_NOFOLLOW,};
|
|
885
|
+
n(0 === O.ba["0"]);
|
|
886
|
+
}, m(a) {
|
|
887
|
+
n(fa);
|
|
888
|
+
return O.createNode(null, "/", Rb(a.X.root), 0);
|
|
889
|
+
}, createNode(a, b, c) {
|
|
890
|
+
if (!K(c) && !H.isFile(c) && 40960 !== (c & 61440)) {
|
|
891
|
+
throw new H.g(28);
|
|
892
|
+
}
|
|
893
|
+
a = H.createNode(a, b, c);
|
|
894
|
+
a.h = O.h;
|
|
895
|
+
a.i = O.i;
|
|
896
|
+
return a;
|
|
897
|
+
}, h:{A(a) {
|
|
898
|
+
var b = P(a), c;
|
|
899
|
+
N(() => c = fs.lstatSync(b));
|
|
900
|
+
O.ja && (c.J || (c.J = 4096), c.blocks || (c.blocks = (c.size + c.J - 1) / c.J | 0), c.mode |= (c.mode & 292) >> 2);
|
|
901
|
+
return {dev:c.dev, ino:c.ino, mode:c.mode, nlink:c.nlink, uid:c.uid, gid:c.gid, rdev:c.rdev, size:c.size, atime:c.atime, mtime:c.mtime, ctime:c.ctime, J:c.J, blocks:c.blocks};
|
|
902
|
+
}, s(a, b) {
|
|
903
|
+
var c = P(a);
|
|
904
|
+
N(() => {
|
|
905
|
+
void 0 !== b.mode && (fs.chmodSync(c, b.mode), a.mode = b.mode);
|
|
906
|
+
void 0 !== b.size && fs.truncateSync(c, b.size);
|
|
907
|
+
});
|
|
908
|
+
}, lookup(a, b) {
|
|
909
|
+
var c = P(a);
|
|
910
|
+
c = G(c + "/" + b);
|
|
911
|
+
c = Rb(c);
|
|
912
|
+
return O.createNode(a, b, c);
|
|
913
|
+
}, B(a, b, c, d) {
|
|
914
|
+
var e = O.createNode(a, b, c, d), g = P(e);
|
|
915
|
+
N(() => {
|
|
916
|
+
K(e.mode) ? fs.mkdirSync(g, e.mode) : fs.writeFileSync(g, "", {mode:e.mode});
|
|
917
|
+
});
|
|
918
|
+
return e;
|
|
919
|
+
}, rename(a, b, c) {
|
|
920
|
+
var d = P(a), e = vb(P(b), c);
|
|
921
|
+
N(() => fs.renameSync(d, e));
|
|
922
|
+
a.name = c;
|
|
923
|
+
}, unlink(a, b) {
|
|
924
|
+
var c = vb(P(a), b);
|
|
925
|
+
N(() => fs.unlinkSync(c));
|
|
926
|
+
}, rmdir(a, b) {
|
|
927
|
+
var c = vb(P(a), b);
|
|
928
|
+
N(() => fs.rmdirSync(c));
|
|
929
|
+
}, readdir(a) {
|
|
930
|
+
var b = P(a);
|
|
931
|
+
return N(() => fs.readdirSync(b));
|
|
932
|
+
}, symlink(a, b, c) {
|
|
933
|
+
var d = vb(P(a), b);
|
|
934
|
+
N(() => fs.symlinkSync(c, d));
|
|
935
|
+
}, readlink(a) {
|
|
936
|
+
var b = P(a);
|
|
937
|
+
return N(() => fs.readlinkSync(b));
|
|
938
|
+
},}, i:{open(a) {
|
|
939
|
+
var b = P(a.node);
|
|
940
|
+
N(() => {
|
|
941
|
+
if (H.isFile(a.node.mode)) {
|
|
942
|
+
a.R.Ba = 1;
|
|
943
|
+
var c = fs, d = c.openSync, e = a.flags;
|
|
944
|
+
e &= -2721793;
|
|
945
|
+
var g = 0, k;
|
|
946
|
+
for (k in O.ba) {
|
|
947
|
+
e & k && (g |= O.ba[k], e ^= k);
|
|
948
|
+
}
|
|
949
|
+
if (e) {
|
|
950
|
+
throw new H.g(28);
|
|
951
|
+
}
|
|
952
|
+
a.W = d.call(c, b, g);
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
}, close(a) {
|
|
956
|
+
N(() => {
|
|
957
|
+
H.isFile(a.node.mode) && a.W && 0 === --a.R.Ba && fs.closeSync(a.W);
|
|
958
|
+
});
|
|
959
|
+
}, Ja(a) {
|
|
960
|
+
a.R.Ba++;
|
|
961
|
+
}, read(a, b, c, d, e) {
|
|
962
|
+
return 0 === d ? 0 : N(() => fs.readSync(a.W, new Int8Array(b.buffer, c, d), 0, d, e));
|
|
963
|
+
}, write(a, b, c, d, e) {
|
|
964
|
+
return N(() => fs.writeSync(a.W, new Int8Array(b.buffer, c, d), 0, d, e));
|
|
965
|
+
}, u(a, b, c) {
|
|
966
|
+
var d = b;
|
|
967
|
+
1 === c ? d += a.position : 2 === c && H.isFile(a.node.mode) && N(() => {
|
|
968
|
+
d += fs.fstatSync(a.W).size;
|
|
969
|
+
});
|
|
970
|
+
if (0 > d) {
|
|
971
|
+
throw new H.g(28);
|
|
972
|
+
}
|
|
973
|
+
return d;
|
|
974
|
+
}, O(a, b, c) {
|
|
975
|
+
if (!H.isFile(a.node.mode)) {
|
|
976
|
+
throw new H.g(43);
|
|
977
|
+
}
|
|
978
|
+
var d = Kb();
|
|
979
|
+
O.i.read(a, v, d, b, c);
|
|
980
|
+
return {v:d, ra:!0};
|
|
981
|
+
}, S(a, b, c, d) {
|
|
982
|
+
O.i.write(a, b, 0, d, c, !1);
|
|
983
|
+
return 0;
|
|
984
|
+
},},}, Q = {aa:16895, T:33279, na:null, m(a) {
|
|
985
|
+
function b(g) {
|
|
986
|
+
g = g.split("/");
|
|
987
|
+
for (var k = d, m = 0; m < g.length - 1; m++) {
|
|
988
|
+
var r = g.slice(0, m + 1).join("/");
|
|
989
|
+
let t, y;
|
|
990
|
+
(t = e)[y = r] || (t[y] = Q.createNode(k, g[m], Q.aa, 0));
|
|
991
|
+
k = e[r];
|
|
992
|
+
}
|
|
993
|
+
return k;
|
|
994
|
+
}
|
|
995
|
+
function c(g) {
|
|
996
|
+
g = g.split("/");
|
|
997
|
+
return g[g.length - 1];
|
|
998
|
+
}
|
|
999
|
+
n(ea);
|
|
1000
|
+
Q.na || (Q.na = new FileReaderSync());
|
|
1001
|
+
var d = Q.createNode(null, "/", Q.aa, 0), e = {};
|
|
1002
|
+
Array.prototype.forEach.call(a.X.files || [], function(g) {
|
|
1003
|
+
Q.createNode(b(g.name), c(g.name), Q.T, 0, g, g.lastModifiedDate);
|
|
1004
|
+
});
|
|
1005
|
+
(a.X.blobs || []).forEach(function(g) {
|
|
1006
|
+
Q.createNode(b(g.name), c(g.name), Q.T, 0, g.data);
|
|
1007
|
+
});
|
|
1008
|
+
(a.X.packages || []).forEach(function(g) {
|
|
1009
|
+
g.metadata.files.forEach(function(k) {
|
|
1010
|
+
var m = k.filename.substr(1);
|
|
1011
|
+
Q.createNode(b(m), c(m), Q.T, 0, g.blob.slice(k.start, k.end));
|
|
1012
|
+
});
|
|
1013
|
+
});
|
|
1014
|
+
return d;
|
|
1015
|
+
}, createNode(a, b, c, d, e, g) {
|
|
1016
|
+
d = H.createNode(a, b, c);
|
|
1017
|
+
d.mode = c;
|
|
1018
|
+
d.h = Q.h;
|
|
1019
|
+
d.i = Q.i;
|
|
1020
|
+
d.timestamp = (g || new Date()).getTime();
|
|
1021
|
+
n(Q.T !== Q.aa);
|
|
1022
|
+
c === Q.T ? (d.size = e.size, d.j = e) : (d.size = 4096, d.j = {});
|
|
1023
|
+
a && (a.j[b] = d);
|
|
1024
|
+
return d;
|
|
1025
|
+
}, h:{A(a) {
|
|
1026
|
+
return {dev:1, ino:a.id, mode:a.mode, nlink:1, uid:0, gid:0, rdev:0, size:a.size, atime:new Date(a.timestamp), mtime:new Date(a.timestamp), ctime:new Date(a.timestamp), J:4096, blocks:Math.ceil(a.size / 4096),};
|
|
1027
|
+
}, s(a, b) {
|
|
1028
|
+
void 0 !== b.mode && (a.mode = b.mode);
|
|
1029
|
+
void 0 !== b.timestamp && (a.timestamp = b.timestamp);
|
|
1030
|
+
}, lookup() {
|
|
1031
|
+
throw new H.g(44);
|
|
1032
|
+
}, B() {
|
|
1033
|
+
throw new H.g(63);
|
|
1034
|
+
}, rename() {
|
|
1035
|
+
throw new H.g(63);
|
|
1036
|
+
}, unlink() {
|
|
1037
|
+
throw new H.g(63);
|
|
1038
|
+
}, rmdir() {
|
|
1039
|
+
throw new H.g(63);
|
|
1040
|
+
}, readdir(a) {
|
|
1041
|
+
var b = [".", ".."], c;
|
|
1042
|
+
for (c of Object.keys(a.j)) {
|
|
1043
|
+
b.push(c);
|
|
1044
|
+
}
|
|
1045
|
+
return b;
|
|
1046
|
+
}, symlink() {
|
|
1047
|
+
throw new H.g(63);
|
|
1048
|
+
},}, i:{read(a, b, c, d, e) {
|
|
1049
|
+
if (e >= a.node.size) {
|
|
1050
|
+
return 0;
|
|
1051
|
+
}
|
|
1052
|
+
a = a.node.j.slice(e, e + d);
|
|
1053
|
+
d = Q.na.readAsArrayBuffer(a);
|
|
1054
|
+
b.set(new Uint8Array(d), c);
|
|
1055
|
+
return a.size;
|
|
1056
|
+
}, write() {
|
|
1057
|
+
throw new H.g(29);
|
|
1058
|
+
}, u(a, b, c) {
|
|
1059
|
+
1 === c ? b += a.position : 2 === c && H.isFile(a.node.mode) && (b += a.node.size);
|
|
1060
|
+
if (0 > b) {
|
|
1061
|
+
throw new H.g(28);
|
|
1062
|
+
}
|
|
1063
|
+
return b;
|
|
1064
|
+
},},}, Sb = {0:"Success", 1:"Arg list too long", 2:"Permission denied", 3:"Address already in use", 4:"Address not available", 5:"Address family not supported by protocol family", 6:"No more processes", 7:"Socket already connected", 8:"Bad file number", 9:"Trying to read unreadable message", 10:"Mount device busy", 11:"Operation canceled", 12:"No children", 13:"Connection aborted", 14:"Connection refused", 15:"Connection reset by peer", 16:"File locking deadlock error", 17:"Destination address required",
|
|
1065
|
+
18:"Math arg out of domain of func", 19:"Quota exceeded", 20:"File exists", 21:"Bad address", 22:"File too large", 23:"Host is unreachable", 24:"Identifier removed", 25:"Illegal byte sequence", 26:"Connection already in progress", 27:"Interrupted system call", 28:"Invalid argument", 29:"I/O error", 30:"Socket is already connected", 31:"Is a directory", 32:"Too many symbolic links", 33:"Too many open files", 34:"Too many links", 35:"Message too long", 36:"Multihop attempted", 37:"File or path name too long",
|
|
1066
|
+
38:"Network interface is not configured", 39:"Connection reset by network", 40:"Network is unreachable", 41:"Too many open files in system", 42:"No buffer space available", 43:"No such device", 44:"No such file or directory", 45:"Exec format error", 46:"No record locks available", 47:"The link has been severed", 48:"Not enough core", 49:"No message of desired type", 50:"Protocol not available", 51:"No space left on device", 52:"Function not implemented", 53:"Socket is not connected", 54:"Not a directory",
|
|
1067
|
+
55:"Directory not empty", 56:"State not recoverable", 57:"Socket operation on non-socket", 59:"Not a typewriter", 60:"No such device or address", 61:"Value too large for defined data type", 62:"Previous owner died", 63:"Not super-user", 64:"Broken pipe", 65:"Protocol error", 66:"Unknown protocol", 67:"Protocol wrong type for socket", 68:"Math result not representable", 69:"Read only file system", 70:"Illegal seek", 71:"No such process", 72:"Stale file handle", 73:"Connection timed out", 74:"Text file busy",
|
|
1068
|
+
75:"Cross-device link", 100:"Device not a stream", 101:"Bad font file fmt", 102:"Invalid slot", 103:"Invalid request code", 104:"No anode", 105:"Block device required", 106:"Channel number out of range", 107:"Level 3 halted", 108:"Level 3 reset", 109:"Link number out of range", 110:"Protocol driver not attached", 111:"No CSI structure available", 112:"Level 2 halted", 113:"Invalid exchange", 114:"Invalid request descriptor", 115:"Exchange full", 116:"No data (for no delay io)", 117:"Timer expired",
|
|
1069
|
+
118:"Out of streams resources", 119:"Machine is not on the network", 120:"Package not installed", 121:"The object is remote", 122:"Advertise error", 123:"Srmount error", 124:"Communication error on send", 125:"Cross mount point (not really error)", 126:"Given log. name not unique", 127:"f.d. invalid for this operation", 128:"Remote address changed", 129:"Can access a needed shared lib", 130:"Accessing a corrupted shared lib", 131:".lib section in a.out corrupted", 132:"Attempting to link in too many libs",
|
|
1070
|
+
133:"Attempting to exec a shared library", 135:"Streams pipe error", 136:"Too many users", 137:"Socket type not supported", 138:"Not supported", 139:"Protocol family not supported", 140:"Can't send after socket shutdown", 141:"Too many references", 142:"Host is down", 148:"No medium (in tape drive)", 156:"Level 2 not synchronized",};
|
|
1071
|
+
function Gb(a, b) {
|
|
1072
|
+
H.ua[a] = {i:b};
|
|
1073
|
+
}
|
|
1074
|
+
function K(a) {
|
|
1075
|
+
return 16384 === (a & 61440);
|
|
1076
|
+
}
|
|
1077
|
+
function L(a, b) {
|
|
1078
|
+
var c = K(a.mode) ? (c = Tb(a, "x")) ? c : a.h.lookup ? 0 : 2 : 54;
|
|
1079
|
+
if (c) {
|
|
1080
|
+
throw new H.g(c);
|
|
1081
|
+
}
|
|
1082
|
+
for (c = H.G[Ub(a.id, b)]; c; c = c.P) {
|
|
1083
|
+
var d = c.name;
|
|
1084
|
+
if (c.parent.id === a.id && d === b) {
|
|
1085
|
+
return c;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return H.lookup(a, b);
|
|
1089
|
+
}
|
|
1090
|
+
function T(a, b = {}) {
|
|
1091
|
+
a = yb(a);
|
|
1092
|
+
if (!a) {
|
|
1093
|
+
return {path:"", node:null};
|
|
1094
|
+
}
|
|
1095
|
+
b = Object.assign({da:!0, oa:0}, b);
|
|
1096
|
+
if (8 < b.oa) {
|
|
1097
|
+
throw new H.g(32);
|
|
1098
|
+
}
|
|
1099
|
+
a = a.split("/").filter(k => !!k);
|
|
1100
|
+
for (var c = H.root, d = "/", e = 0; e < a.length; e++) {
|
|
1101
|
+
var g = e === a.length - 1;
|
|
1102
|
+
if (g && b.parent) {
|
|
1103
|
+
break;
|
|
1104
|
+
}
|
|
1105
|
+
c = L(c, a[e]);
|
|
1106
|
+
d = G(d + "/" + a[e]);
|
|
1107
|
+
c.C && (!g || g && b.da) && (c = c.C.root);
|
|
1108
|
+
if (!g || b.D) {
|
|
1109
|
+
for (g = 0; 40960 === (c.mode & 61440);) {
|
|
1110
|
+
if (c = H.readlink(d), d = yb(sb(d), c), c = T(d, {oa:b.oa + 1}).node, 40 < g++) {
|
|
1111
|
+
throw new H.g(32);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
return {path:d, node:c};
|
|
1117
|
+
}
|
|
1118
|
+
function Vb(a) {
|
|
1119
|
+
for (var b;;) {
|
|
1120
|
+
if (H.$(a)) {
|
|
1121
|
+
return a = a.m.Aa, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
|
|
1122
|
+
}
|
|
1123
|
+
b = b ? `${a.name}/${b}` : a.name;
|
|
1124
|
+
a = a.parent;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
function Ub(a, b) {
|
|
1128
|
+
for (var c = 0, d = 0; d < b.length; d++) {
|
|
1129
|
+
c = (c << 5) - c + b.charCodeAt(d) | 0;
|
|
1130
|
+
}
|
|
1131
|
+
return (a + c >>> 0) % H.G.length;
|
|
1132
|
+
}
|
|
1133
|
+
function Wb(a) {
|
|
1134
|
+
var b = Ub(a.parent.id, a.name);
|
|
1135
|
+
a.P = H.G[b];
|
|
1136
|
+
H.G[b] = a;
|
|
1137
|
+
}
|
|
1138
|
+
function Xb(a) {
|
|
1139
|
+
var b = Ub(a.parent.id, a.name);
|
|
1140
|
+
if (H.G[b] === a) {
|
|
1141
|
+
H.G[b] = a.P;
|
|
1142
|
+
} else {
|
|
1143
|
+
for (b = H.G[b]; b;) {
|
|
1144
|
+
if (b.P === a) {
|
|
1145
|
+
b.P = a.P;
|
|
1146
|
+
break;
|
|
1147
|
+
}
|
|
1148
|
+
b = b.P;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
function Yb(a) {
|
|
1153
|
+
var b = ["r", "w", "rw"][a & 3];
|
|
1154
|
+
a & 512 && (b += "w");
|
|
1155
|
+
return b;
|
|
1156
|
+
}
|
|
1157
|
+
function Tb(a, b) {
|
|
1158
|
+
if (H.ha) {
|
|
1159
|
+
return 0;
|
|
1160
|
+
}
|
|
1161
|
+
if (!b.includes("r") || a.mode & 292) {
|
|
1162
|
+
if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) {
|
|
1163
|
+
return 2;
|
|
1164
|
+
}
|
|
1165
|
+
} else {
|
|
1166
|
+
return 2;
|
|
1167
|
+
}
|
|
1168
|
+
return 0;
|
|
1169
|
+
}
|
|
1170
|
+
function Zb(a, b) {
|
|
1171
|
+
try {
|
|
1172
|
+
return L(a, b), 20;
|
|
1173
|
+
} catch (c) {
|
|
1174
|
+
}
|
|
1175
|
+
return Tb(a, "wx");
|
|
1176
|
+
}
|
|
1177
|
+
function $b(a, b, c) {
|
|
1178
|
+
try {
|
|
1179
|
+
var d = L(a, b);
|
|
1180
|
+
} catch (e) {
|
|
1181
|
+
return e.l;
|
|
1182
|
+
}
|
|
1183
|
+
if (a = Tb(a, "wx")) {
|
|
1184
|
+
return a;
|
|
1185
|
+
}
|
|
1186
|
+
if (c) {
|
|
1187
|
+
if (!K(d.mode)) {
|
|
1188
|
+
return 54;
|
|
1189
|
+
}
|
|
1190
|
+
if (H.$(d) || Vb(d) === H.cwd()) {
|
|
1191
|
+
return 10;
|
|
1192
|
+
}
|
|
1193
|
+
} else {
|
|
1194
|
+
if (K(d.mode)) {
|
|
1195
|
+
return 31;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return 0;
|
|
1199
|
+
}
|
|
1200
|
+
function U(a) {
|
|
1201
|
+
a = H.va(a);
|
|
1202
|
+
if (!a) {
|
|
1203
|
+
throw new H.g(8);
|
|
1204
|
+
}
|
|
1205
|
+
return a;
|
|
1206
|
+
}
|
|
1207
|
+
function ac(a, b = -1) {
|
|
1208
|
+
a = Object.assign(new H.Ea(), a);
|
|
1209
|
+
if (-1 == b) {
|
|
1210
|
+
a: {
|
|
1211
|
+
for (b = 0; b <= H.Fa; b++) {
|
|
1212
|
+
if (!H.streams[b]) {
|
|
1213
|
+
break a;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
throw new H.g(33);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
a.fd = b;
|
|
1220
|
+
return H.streams[b] = a;
|
|
1221
|
+
}
|
|
1222
|
+
function bc(a, b = -1) {
|
|
1223
|
+
a = ac(a, b);
|
|
1224
|
+
a.i?.Ja?.(a);
|
|
1225
|
+
return a;
|
|
1226
|
+
}
|
|
1227
|
+
function cc(a) {
|
|
1228
|
+
var b = [];
|
|
1229
|
+
for (a = [a]; a.length;) {
|
|
1230
|
+
var c = a.pop();
|
|
1231
|
+
b.push(c);
|
|
1232
|
+
a.push(...c.V);
|
|
1233
|
+
}
|
|
1234
|
+
return b;
|
|
1235
|
+
}
|
|
1236
|
+
function dc(a, b, c) {
|
|
1237
|
+
"undefined" == typeof c && (c = b, b = 438);
|
|
1238
|
+
return H.B(a, b | 8192, c);
|
|
1239
|
+
}
|
|
1240
|
+
function ec() {
|
|
1241
|
+
H.mkdir("/dev");
|
|
1242
|
+
Gb(H.N(1, 3), {read:() => 0, write:(d, e, g, k) => k,});
|
|
1243
|
+
dc("/dev/null", H.N(1, 3));
|
|
1244
|
+
Fb(H.N(5, 0), Ib);
|
|
1245
|
+
Fb(H.N(6, 0), Jb);
|
|
1246
|
+
dc("/dev/tty", H.N(5, 0));
|
|
1247
|
+
dc("/dev/tty1", H.N(6, 0));
|
|
1248
|
+
var a = new Uint8Array(1024), b = 0, c = () => {
|
|
1249
|
+
0 === b && (b = xb(a).byteLength);
|
|
1250
|
+
return a[--b];
|
|
1251
|
+
};
|
|
1252
|
+
H.K("/dev", "random", c);
|
|
1253
|
+
H.K("/dev", "urandom", c);
|
|
1254
|
+
H.mkdir("/dev/shm");
|
|
1255
|
+
H.mkdir("/dev/shm/tmp");
|
|
1256
|
+
}
|
|
1257
|
+
function fc() {
|
|
1258
|
+
H.mkdir("/proc");
|
|
1259
|
+
var a = H.mkdir("/proc/self");
|
|
1260
|
+
H.mkdir("/proc/self/fd");
|
|
1261
|
+
H.m({m() {
|
|
1262
|
+
var b = H.createNode(a, "fd", 16895, 73);
|
|
1263
|
+
b.h = {lookup(c, d) {
|
|
1264
|
+
var e = U(+d);
|
|
1265
|
+
c = {parent:null, m:{Aa:"fake"}, h:{readlink:() => e.path},};
|
|
1266
|
+
return c.parent = c;
|
|
1267
|
+
}};
|
|
1268
|
+
return b;
|
|
1269
|
+
}}, {}, "/proc/self/fd");
|
|
1270
|
+
}
|
|
1271
|
+
function gc(a, b) {
|
|
1272
|
+
try {
|
|
1273
|
+
var c = T(a, {D:!b});
|
|
1274
|
+
a = c.path;
|
|
1275
|
+
} catch (e) {
|
|
1276
|
+
}
|
|
1277
|
+
var d = {$:!1, exists:!1, error:0, name:null, path:null, object:null, Ua:!1, Wa:null, Va:null};
|
|
1278
|
+
try {
|
|
1279
|
+
c = T(a, {parent:!0}), d.Ua = !0, d.Wa = c.path, d.Va = c.node, d.name = tb(a), c = T(a, {D:!b}), d.exists = !0, d.path = c.path, d.object = c.node, d.name = c.node.name, d.$ = "/" === c.path;
|
|
1280
|
+
} catch (e) {
|
|
1281
|
+
d.error = e.l;
|
|
1282
|
+
}
|
|
1283
|
+
return d;
|
|
1284
|
+
}
|
|
1285
|
+
function hc(a, b, c, d) {
|
|
1286
|
+
a = "string" == typeof a ? a : Vb(a);
|
|
1287
|
+
b = G(a + "/" + b);
|
|
1288
|
+
return H.create(b, Pb(c, d));
|
|
1289
|
+
}
|
|
1290
|
+
function ic(a) {
|
|
1291
|
+
if (!(a.Qa || a.Ra || a.link || a.j)) {
|
|
1292
|
+
if ("undefined" != typeof XMLHttpRequest) {
|
|
1293
|
+
throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
|
|
1294
|
+
}
|
|
1295
|
+
if (ma) {
|
|
1296
|
+
try {
|
|
1297
|
+
a.j = Db(ma(a.url)), a.o = a.j.length;
|
|
1298
|
+
} catch (b) {
|
|
1299
|
+
throw new H.g(29);
|
|
1300
|
+
}
|
|
1301
|
+
} else {
|
|
1302
|
+
throw Error("Cannot load without read() or XMLHttpRequest.");
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
var H = {root:null, V:[], ua:{}, streams:[], Sa:1, G:null, ta:"/", Z:!1, ha:!0, g:class extends Error {
|
|
1307
|
+
constructor(a) {
|
|
1308
|
+
super(Sb[a]);
|
|
1309
|
+
this.name = "ErrnoError";
|
|
1310
|
+
this.l = a;
|
|
1311
|
+
for (var b in Qb) {
|
|
1312
|
+
if (Qb[b] === a) {
|
|
1313
|
+
this.code = b;
|
|
1314
|
+
break;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}, ea:{}, La:null, Y:0, Ea:class {
|
|
1319
|
+
constructor() {
|
|
1320
|
+
this.R = {};
|
|
1321
|
+
this.node = null;
|
|
1322
|
+
}
|
|
1323
|
+
get object() {
|
|
1324
|
+
return this.node;
|
|
1325
|
+
}
|
|
1326
|
+
set object(a) {
|
|
1327
|
+
this.node = a;
|
|
1328
|
+
}
|
|
1329
|
+
get flags() {
|
|
1330
|
+
return this.R.flags;
|
|
1331
|
+
}
|
|
1332
|
+
set flags(a) {
|
|
1333
|
+
this.R.flags = a;
|
|
1334
|
+
}
|
|
1335
|
+
get position() {
|
|
1336
|
+
return this.R.position;
|
|
1337
|
+
}
|
|
1338
|
+
set position(a) {
|
|
1339
|
+
this.R.position = a;
|
|
1340
|
+
}
|
|
1341
|
+
}, Da:class {
|
|
1342
|
+
constructor(a, b, c, d) {
|
|
1343
|
+
a ||= this;
|
|
1344
|
+
this.parent = a;
|
|
1345
|
+
this.m = a.m;
|
|
1346
|
+
this.C = null;
|
|
1347
|
+
this.id = H.Sa++;
|
|
1348
|
+
this.name = b;
|
|
1349
|
+
this.mode = c;
|
|
1350
|
+
this.h = {};
|
|
1351
|
+
this.i = {};
|
|
1352
|
+
this.rdev = d;
|
|
1353
|
+
}
|
|
1354
|
+
get read() {
|
|
1355
|
+
return 365 === (this.mode & 365);
|
|
1356
|
+
}
|
|
1357
|
+
set read(a) {
|
|
1358
|
+
a ? this.mode |= 365 : this.mode &= -366;
|
|
1359
|
+
}
|
|
1360
|
+
get write() {
|
|
1361
|
+
return 146 === (this.mode & 146);
|
|
1362
|
+
}
|
|
1363
|
+
set write(a) {
|
|
1364
|
+
a ? this.mode |= 146 : this.mode &= -147;
|
|
1365
|
+
}
|
|
1366
|
+
get Ra() {
|
|
1367
|
+
return K(this.mode);
|
|
1368
|
+
}
|
|
1369
|
+
get Qa() {
|
|
1370
|
+
return 8192 === (this.mode & 61440);
|
|
1371
|
+
}
|
|
1372
|
+
}, createNode(a, b, c, d) {
|
|
1373
|
+
n("object" == typeof a);
|
|
1374
|
+
a = new H.Da(a, b, c, d);
|
|
1375
|
+
Wb(a);
|
|
1376
|
+
return a;
|
|
1377
|
+
}, $(a) {
|
|
1378
|
+
return a === a.parent;
|
|
1379
|
+
}, isFile(a) {
|
|
1380
|
+
return 32768 === (a & 61440);
|
|
1381
|
+
}, isFIFO(a) {
|
|
1382
|
+
return 4096 === (a & 61440);
|
|
1383
|
+
}, isSocket(a) {
|
|
1384
|
+
return 49152 === (a & 49152);
|
|
1385
|
+
}, Fa:4096, va:a => H.streams[a], Ha:{open(a) {
|
|
1386
|
+
a.i = H.Ma(a.node.rdev).i;
|
|
1387
|
+
a.i.open?.(a);
|
|
1388
|
+
}, u() {
|
|
1389
|
+
throw new H.g(70);
|
|
1390
|
+
},}, ka:a => a >> 8, mb:a => a & 255, N:(a, b) => a << 8 | b, Ma:a => H.ua[a], Ca(a, b) {
|
|
1391
|
+
function c(k) {
|
|
1392
|
+
n(0 < H.Y);
|
|
1393
|
+
H.Y--;
|
|
1394
|
+
return b(k);
|
|
1395
|
+
}
|
|
1396
|
+
function d(k) {
|
|
1397
|
+
if (k) {
|
|
1398
|
+
if (!d.Ka) {
|
|
1399
|
+
return d.Ka = !0, c(k);
|
|
1400
|
+
}
|
|
1401
|
+
} else {
|
|
1402
|
+
++g >= e.length && c(null);
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
"function" == typeof a && (b = a, a = !1);
|
|
1406
|
+
H.Y++;
|
|
1407
|
+
1 < H.Y && p(`warning: ${H.Y} FS.syncfs operations in flight at once, probably just doing extra work`);
|
|
1408
|
+
var e = cc(H.root.m), g = 0;
|
|
1409
|
+
e.forEach(k => {
|
|
1410
|
+
if (!k.type.Ca) {
|
|
1411
|
+
return d(null);
|
|
1412
|
+
}
|
|
1413
|
+
k.type.Ca(k, a, d);
|
|
1414
|
+
});
|
|
1415
|
+
}, m(a, b, c) {
|
|
1416
|
+
if ("string" == typeof a) {
|
|
1417
|
+
throw a;
|
|
1418
|
+
}
|
|
1419
|
+
var d = "/" === c;
|
|
1420
|
+
if (d && H.root) {
|
|
1421
|
+
throw new H.g(10);
|
|
1422
|
+
}
|
|
1423
|
+
if (!d && c) {
|
|
1424
|
+
var e = T(c, {da:!1});
|
|
1425
|
+
c = e.path;
|
|
1426
|
+
e = e.node;
|
|
1427
|
+
if (e.C) {
|
|
1428
|
+
throw new H.g(10);
|
|
1429
|
+
}
|
|
1430
|
+
if (!K(e.mode)) {
|
|
1431
|
+
throw new H.g(54);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
b = {type:a, X:b, Aa:c, V:[]};
|
|
1435
|
+
a = a.m(b);
|
|
1436
|
+
a.m = b;
|
|
1437
|
+
b.root = a;
|
|
1438
|
+
d ? H.root = a : e && (e.C = b, e.m && e.m.V.push(b));
|
|
1439
|
+
return a;
|
|
1440
|
+
}, rb(a) {
|
|
1441
|
+
a = T(a, {da:!1});
|
|
1442
|
+
if (!a.node.C) {
|
|
1443
|
+
throw new H.g(28);
|
|
1444
|
+
}
|
|
1445
|
+
a = a.node;
|
|
1446
|
+
var b = a.C, c = cc(b);
|
|
1447
|
+
Object.keys(H.G).forEach(d => {
|
|
1448
|
+
for (d = H.G[d]; d;) {
|
|
1449
|
+
var e = d.P;
|
|
1450
|
+
c.includes(d.m) && Xb(d);
|
|
1451
|
+
d = e;
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
a.C = null;
|
|
1455
|
+
b = a.m.V.indexOf(b);
|
|
1456
|
+
n(-1 !== b);
|
|
1457
|
+
a.m.V.splice(b, 1);
|
|
1458
|
+
}, lookup(a, b) {
|
|
1459
|
+
return a.h.lookup(a, b);
|
|
1460
|
+
}, B(a, b, c) {
|
|
1461
|
+
var d = T(a, {parent:!0}).node;
|
|
1462
|
+
a = tb(a);
|
|
1463
|
+
if (!a || "." === a || ".." === a) {
|
|
1464
|
+
throw new H.g(28);
|
|
1465
|
+
}
|
|
1466
|
+
var e = Zb(d, a);
|
|
1467
|
+
if (e) {
|
|
1468
|
+
throw new H.g(e);
|
|
1469
|
+
}
|
|
1470
|
+
if (!d.h.B) {
|
|
1471
|
+
throw new H.g(63);
|
|
1472
|
+
}
|
|
1473
|
+
return d.h.B(d, a, b, c);
|
|
1474
|
+
}, create(a, b) {
|
|
1475
|
+
return H.B(a, (void 0 !== b ? b : 438) & 4095 | 32768, 0);
|
|
1476
|
+
}, mkdir(a, b) {
|
|
1477
|
+
return H.B(a, (void 0 !== b ? b : 511) & 1023 | 16384, 0);
|
|
1478
|
+
}, nb(a, b) {
|
|
1479
|
+
a = a.split("/");
|
|
1480
|
+
for (var c = "", d = 0; d < a.length; ++d) {
|
|
1481
|
+
if (a[d]) {
|
|
1482
|
+
c += "/" + a[d];
|
|
1483
|
+
try {
|
|
1484
|
+
H.mkdir(c, b);
|
|
1485
|
+
} catch (e) {
|
|
1486
|
+
if (20 != e.l) {
|
|
1487
|
+
throw e;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
}, symlink(a, b) {
|
|
1493
|
+
if (!yb(a)) {
|
|
1494
|
+
throw new H.g(44);
|
|
1495
|
+
}
|
|
1496
|
+
var c = T(b, {parent:!0}).node;
|
|
1497
|
+
if (!c) {
|
|
1498
|
+
throw new H.g(44);
|
|
1499
|
+
}
|
|
1500
|
+
b = tb(b);
|
|
1501
|
+
var d = Zb(c, b);
|
|
1502
|
+
if (d) {
|
|
1503
|
+
throw new H.g(d);
|
|
1504
|
+
}
|
|
1505
|
+
if (!c.h.symlink) {
|
|
1506
|
+
throw new H.g(63);
|
|
1507
|
+
}
|
|
1508
|
+
return c.h.symlink(c, b, a);
|
|
1509
|
+
}, rename(a, b) {
|
|
1510
|
+
var c = sb(a), d = sb(b), e = tb(a), g = tb(b);
|
|
1511
|
+
var k = T(a, {parent:!0});
|
|
1512
|
+
var m = k.node;
|
|
1513
|
+
k = T(b, {parent:!0});
|
|
1514
|
+
k = k.node;
|
|
1515
|
+
if (!m || !k) {
|
|
1516
|
+
throw new H.g(44);
|
|
1517
|
+
}
|
|
1518
|
+
if (m.m !== k.m) {
|
|
1519
|
+
throw new H.g(75);
|
|
1520
|
+
}
|
|
1521
|
+
var r = L(m, e);
|
|
1522
|
+
a = zb(a, d);
|
|
1523
|
+
if ("." !== a.charAt(0)) {
|
|
1524
|
+
throw new H.g(28);
|
|
1525
|
+
}
|
|
1526
|
+
a = zb(b, c);
|
|
1527
|
+
if ("." !== a.charAt(0)) {
|
|
1528
|
+
throw new H.g(55);
|
|
1529
|
+
}
|
|
1530
|
+
try {
|
|
1531
|
+
var t = L(k, g);
|
|
1532
|
+
} catch (y) {
|
|
1533
|
+
}
|
|
1534
|
+
if (r !== t) {
|
|
1535
|
+
b = K(r.mode);
|
|
1536
|
+
if (e = $b(m, e, b)) {
|
|
1537
|
+
throw new H.g(e);
|
|
1538
|
+
}
|
|
1539
|
+
if (e = t ? $b(k, g, b) : Zb(k, g)) {
|
|
1540
|
+
throw new H.g(e);
|
|
1541
|
+
}
|
|
1542
|
+
if (!m.h.rename) {
|
|
1543
|
+
throw new H.g(63);
|
|
1544
|
+
}
|
|
1545
|
+
if (r.C || t && t.C) {
|
|
1546
|
+
throw new H.g(10);
|
|
1547
|
+
}
|
|
1548
|
+
if (k !== m && (e = Tb(m, "w"))) {
|
|
1549
|
+
throw new H.g(e);
|
|
1550
|
+
}
|
|
1551
|
+
Xb(r);
|
|
1552
|
+
try {
|
|
1553
|
+
m.h.rename(r, k, g);
|
|
1554
|
+
} catch (y) {
|
|
1555
|
+
throw y;
|
|
1556
|
+
} finally {
|
|
1557
|
+
Wb(r);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
}, rmdir(a) {
|
|
1561
|
+
var b = T(a, {parent:!0}).node;
|
|
1562
|
+
a = tb(a);
|
|
1563
|
+
var c = L(b, a), d = $b(b, a, !0);
|
|
1564
|
+
if (d) {
|
|
1565
|
+
throw new H.g(d);
|
|
1566
|
+
}
|
|
1567
|
+
if (!b.h.rmdir) {
|
|
1568
|
+
throw new H.g(63);
|
|
1569
|
+
}
|
|
1570
|
+
if (c.C) {
|
|
1571
|
+
throw new H.g(10);
|
|
1572
|
+
}
|
|
1573
|
+
b.h.rmdir(b, a);
|
|
1574
|
+
Xb(c);
|
|
1575
|
+
}, readdir(a) {
|
|
1576
|
+
a = T(a, {D:!0}).node;
|
|
1577
|
+
if (!a.h.readdir) {
|
|
1578
|
+
throw new H.g(54);
|
|
1579
|
+
}
|
|
1580
|
+
return a.h.readdir(a);
|
|
1581
|
+
}, unlink(a) {
|
|
1582
|
+
var b = T(a, {parent:!0}).node;
|
|
1583
|
+
if (!b) {
|
|
1584
|
+
throw new H.g(44);
|
|
1585
|
+
}
|
|
1586
|
+
a = tb(a);
|
|
1587
|
+
var c = L(b, a), d = $b(b, a, !1);
|
|
1588
|
+
if (d) {
|
|
1589
|
+
throw new H.g(d);
|
|
1590
|
+
}
|
|
1591
|
+
if (!b.h.unlink) {
|
|
1592
|
+
throw new H.g(63);
|
|
1593
|
+
}
|
|
1594
|
+
if (c.C) {
|
|
1595
|
+
throw new H.g(10);
|
|
1596
|
+
}
|
|
1597
|
+
b.h.unlink(b, a);
|
|
1598
|
+
Xb(c);
|
|
1599
|
+
}, readlink(a) {
|
|
1600
|
+
a = T(a).node;
|
|
1601
|
+
if (!a) {
|
|
1602
|
+
throw new H.g(44);
|
|
1603
|
+
}
|
|
1604
|
+
if (!a.h.readlink) {
|
|
1605
|
+
throw new H.g(28);
|
|
1606
|
+
}
|
|
1607
|
+
return yb(Vb(a.parent), a.h.readlink(a));
|
|
1608
|
+
}, stat(a, b) {
|
|
1609
|
+
a = T(a, {D:!b}).node;
|
|
1610
|
+
if (!a) {
|
|
1611
|
+
throw new H.g(44);
|
|
1612
|
+
}
|
|
1613
|
+
if (!a.h.A) {
|
|
1614
|
+
throw new H.g(63);
|
|
1615
|
+
}
|
|
1616
|
+
return a.h.A(a);
|
|
1617
|
+
}, lstat(a) {
|
|
1618
|
+
return H.stat(a, !0);
|
|
1619
|
+
}, chmod(a, b, c) {
|
|
1620
|
+
a = "string" == typeof a ? T(a, {D:!c}).node : a;
|
|
1621
|
+
if (!a.h.s) {
|
|
1622
|
+
throw new H.g(63);
|
|
1623
|
+
}
|
|
1624
|
+
a.h.s(a, {mode:b & 4095 | a.mode & -4096, timestamp:Date.now()});
|
|
1625
|
+
}, lchmod(a, b) {
|
|
1626
|
+
H.chmod(a, b, !0);
|
|
1627
|
+
}, fchmod(a, b) {
|
|
1628
|
+
a = U(a);
|
|
1629
|
+
H.chmod(a.node, b);
|
|
1630
|
+
}, chown(a, b, c, d) {
|
|
1631
|
+
a = "string" == typeof a ? T(a, {D:!d}).node : a;
|
|
1632
|
+
if (!a.h.s) {
|
|
1633
|
+
throw new H.g(63);
|
|
1634
|
+
}
|
|
1635
|
+
a.h.s(a, {timestamp:Date.now()});
|
|
1636
|
+
}, lchown(a, b, c) {
|
|
1637
|
+
H.chown(a, b, c, !0);
|
|
1638
|
+
}, fchown(a, b, c) {
|
|
1639
|
+
a = U(a);
|
|
1640
|
+
H.chown(a.node, b, c);
|
|
1641
|
+
}, truncate(a, b) {
|
|
1642
|
+
if (0 > b) {
|
|
1643
|
+
throw new H.g(28);
|
|
1644
|
+
}
|
|
1645
|
+
a = "string" == typeof a ? T(a, {D:!0}).node : a;
|
|
1646
|
+
if (!a.h.s) {
|
|
1647
|
+
throw new H.g(63);
|
|
1648
|
+
}
|
|
1649
|
+
if (K(a.mode)) {
|
|
1650
|
+
throw new H.g(31);
|
|
1651
|
+
}
|
|
1652
|
+
if (!H.isFile(a.mode)) {
|
|
1653
|
+
throw new H.g(28);
|
|
1654
|
+
}
|
|
1655
|
+
var c = Tb(a, "w");
|
|
1656
|
+
if (c) {
|
|
1657
|
+
throw new H.g(c);
|
|
1658
|
+
}
|
|
1659
|
+
a.h.s(a, {size:b, timestamp:Date.now()});
|
|
1660
|
+
}, jb(a, b) {
|
|
1661
|
+
a = U(a);
|
|
1662
|
+
if (0 === (a.flags & 2097155)) {
|
|
1663
|
+
throw new H.g(28);
|
|
1664
|
+
}
|
|
1665
|
+
H.truncate(a.node, b);
|
|
1666
|
+
}, sb(a, b, c) {
|
|
1667
|
+
a = T(a, {D:!0}).node;
|
|
1668
|
+
a.h.s(a, {timestamp:Math.max(b, c)});
|
|
1669
|
+
}, open(a, b, c) {
|
|
1670
|
+
if ("" === a) {
|
|
1671
|
+
throw new H.g(44);
|
|
1672
|
+
}
|
|
1673
|
+
if ("string" == typeof b) {
|
|
1674
|
+
var d = {r:0, "r+":2, w:577, "w+":578, a:1089, "a+":1090,}[b];
|
|
1675
|
+
if ("undefined" == typeof d) {
|
|
1676
|
+
throw Error(`Unknown file open mode: ${b}`);
|
|
1677
|
+
}
|
|
1678
|
+
b = d;
|
|
1679
|
+
}
|
|
1680
|
+
c = b & 64 ? ("undefined" == typeof c ? 438 : c) & 4095 | 32768 : 0;
|
|
1681
|
+
if ("object" == typeof a) {
|
|
1682
|
+
var e = a;
|
|
1683
|
+
} else {
|
|
1684
|
+
a = G(a);
|
|
1685
|
+
try {
|
|
1686
|
+
e = T(a, {D:!(b & 131072)}).node;
|
|
1687
|
+
} catch (g) {
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
d = !1;
|
|
1691
|
+
if (b & 64) {
|
|
1692
|
+
if (e) {
|
|
1693
|
+
if (b & 128) {
|
|
1694
|
+
throw new H.g(20);
|
|
1695
|
+
}
|
|
1696
|
+
} else {
|
|
1697
|
+
e = H.B(a, c, 0), d = !0;
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
if (!e) {
|
|
1701
|
+
throw new H.g(44);
|
|
1702
|
+
}
|
|
1703
|
+
8192 === (e.mode & 61440) && (b &= -513);
|
|
1704
|
+
if (b & 65536 && !K(e.mode)) {
|
|
1705
|
+
throw new H.g(54);
|
|
1706
|
+
}
|
|
1707
|
+
if (!d && (c = e ? 40960 === (e.mode & 61440) ? 32 : K(e.mode) && ("r" !== Yb(b) || b & 512) ? 31 : Tb(e, Yb(b)) : 44)) {
|
|
1708
|
+
throw new H.g(c);
|
|
1709
|
+
}
|
|
1710
|
+
b & 512 && !d && H.truncate(e, 0);
|
|
1711
|
+
b &= -131713;
|
|
1712
|
+
e = ac({node:e, path:Vb(e), flags:b, seekable:!0, position:0, i:e.i, Xa:[], error:!1});
|
|
1713
|
+
e.i.open && e.i.open(e);
|
|
1714
|
+
!f.logReadFiles || b & 1 || (H.ma || (H.ma = {}), a in H.ma || (H.ma[a] = 1));
|
|
1715
|
+
return e;
|
|
1716
|
+
}, close(a) {
|
|
1717
|
+
if (null === a.fd) {
|
|
1718
|
+
throw new H.g(8);
|
|
1719
|
+
}
|
|
1720
|
+
a.M && (a.M = null);
|
|
1721
|
+
try {
|
|
1722
|
+
a.i.close && a.i.close(a);
|
|
1723
|
+
} catch (b) {
|
|
1724
|
+
throw b;
|
|
1725
|
+
} finally {
|
|
1726
|
+
H.streams[a.fd] = null;
|
|
1727
|
+
}
|
|
1728
|
+
a.fd = null;
|
|
1729
|
+
}, u(a, b, c) {
|
|
1730
|
+
if (null === a.fd) {
|
|
1731
|
+
throw new H.g(8);
|
|
1732
|
+
}
|
|
1733
|
+
if (!a.seekable || !a.i.u) {
|
|
1734
|
+
throw new H.g(70);
|
|
1735
|
+
}
|
|
1736
|
+
if (0 != c && 1 != c && 2 != c) {
|
|
1737
|
+
throw new H.g(28);
|
|
1738
|
+
}
|
|
1739
|
+
a.position = a.i.u(a, b, c);
|
|
1740
|
+
a.Xa = [];
|
|
1741
|
+
return a.position;
|
|
1742
|
+
}, read(a, b, c, d, e) {
|
|
1743
|
+
n(0 <= c);
|
|
1744
|
+
if (0 > d || 0 > e) {
|
|
1745
|
+
throw new H.g(28);
|
|
1746
|
+
}
|
|
1747
|
+
if (null === a.fd) {
|
|
1748
|
+
throw new H.g(8);
|
|
1749
|
+
}
|
|
1750
|
+
if (1 === (a.flags & 2097155)) {
|
|
1751
|
+
throw new H.g(8);
|
|
1752
|
+
}
|
|
1753
|
+
if (K(a.node.mode)) {
|
|
1754
|
+
throw new H.g(31);
|
|
1755
|
+
}
|
|
1756
|
+
if (!a.i.read) {
|
|
1757
|
+
throw new H.g(28);
|
|
1758
|
+
}
|
|
1759
|
+
var g = "undefined" != typeof e;
|
|
1760
|
+
if (!g) {
|
|
1761
|
+
e = a.position;
|
|
1762
|
+
} else if (!a.seekable) {
|
|
1763
|
+
throw new H.g(70);
|
|
1764
|
+
}
|
|
1765
|
+
b = a.i.read(a, b, c, d, e);
|
|
1766
|
+
g || (a.position += b);
|
|
1767
|
+
return b;
|
|
1768
|
+
}, write(a, b, c, d, e, g) {
|
|
1769
|
+
n(0 <= c);
|
|
1770
|
+
if (0 > d || 0 > e) {
|
|
1771
|
+
throw new H.g(28);
|
|
1772
|
+
}
|
|
1773
|
+
if (null === a.fd) {
|
|
1774
|
+
throw new H.g(8);
|
|
1775
|
+
}
|
|
1776
|
+
if (0 === (a.flags & 2097155)) {
|
|
1777
|
+
throw new H.g(8);
|
|
1778
|
+
}
|
|
1779
|
+
if (K(a.node.mode)) {
|
|
1780
|
+
throw new H.g(31);
|
|
1781
|
+
}
|
|
1782
|
+
if (!a.i.write) {
|
|
1783
|
+
throw new H.g(28);
|
|
1784
|
+
}
|
|
1785
|
+
a.seekable && a.flags & 1024 && H.u(a, 0, 2);
|
|
1786
|
+
var k = "undefined" != typeof e;
|
|
1787
|
+
if (!k) {
|
|
1788
|
+
e = a.position;
|
|
1789
|
+
} else if (!a.seekable) {
|
|
1790
|
+
throw new H.g(70);
|
|
1791
|
+
}
|
|
1792
|
+
b = a.i.write(a, b, c, d, e, g);
|
|
1793
|
+
k || (a.position += b);
|
|
1794
|
+
return b;
|
|
1795
|
+
}, U(a, b, c) {
|
|
1796
|
+
if (null === a.fd) {
|
|
1797
|
+
throw new H.g(8);
|
|
1798
|
+
}
|
|
1799
|
+
if (0 > b || 0 >= c) {
|
|
1800
|
+
throw new H.g(28);
|
|
1801
|
+
}
|
|
1802
|
+
if (0 === (a.flags & 2097155)) {
|
|
1803
|
+
throw new H.g(8);
|
|
1804
|
+
}
|
|
1805
|
+
if (!H.isFile(a.node.mode) && !K(a.node.mode)) {
|
|
1806
|
+
throw new H.g(43);
|
|
1807
|
+
}
|
|
1808
|
+
if (!a.i.U) {
|
|
1809
|
+
throw new H.g(138);
|
|
1810
|
+
}
|
|
1811
|
+
a.i.U(a, b, c);
|
|
1812
|
+
}, O(a, b, c, d, e) {
|
|
1813
|
+
if (0 !== (d & 2) && 0 === (e & 2) && 2 !== (a.flags & 2097155)) {
|
|
1814
|
+
throw new H.g(2);
|
|
1815
|
+
}
|
|
1816
|
+
if (1 === (a.flags & 2097155)) {
|
|
1817
|
+
throw new H.g(2);
|
|
1818
|
+
}
|
|
1819
|
+
if (!a.i.O) {
|
|
1820
|
+
throw new H.g(43);
|
|
1821
|
+
}
|
|
1822
|
+
return a.i.O(a, b, c, d, e);
|
|
1823
|
+
}, S(a, b, c, d, e) {
|
|
1824
|
+
n(0 <= c);
|
|
1825
|
+
return a.i.S ? a.i.S(a, b, c, d, e) : 0;
|
|
1826
|
+
}, ia(a, b, c) {
|
|
1827
|
+
if (!a.i.ia) {
|
|
1828
|
+
throw new H.g(59);
|
|
1829
|
+
}
|
|
1830
|
+
return a.i.ia(a, b, c);
|
|
1831
|
+
}, readFile(a, b = {}) {
|
|
1832
|
+
b.flags = b.flags || 0;
|
|
1833
|
+
b.encoding = b.encoding || "binary";
|
|
1834
|
+
if ("utf8" !== b.encoding && "binary" !== b.encoding) {
|
|
1835
|
+
throw Error(`Invalid encoding type "${b.encoding}"`);
|
|
1836
|
+
}
|
|
1837
|
+
var c, d = H.open(a, b.flags);
|
|
1838
|
+
a = H.stat(a).size;
|
|
1839
|
+
var e = new Uint8Array(a);
|
|
1840
|
+
H.read(d, e, 0, a, 0);
|
|
1841
|
+
"utf8" === b.encoding ? c = ib(e, 0) : "binary" === b.encoding && (c = e);
|
|
1842
|
+
H.close(d);
|
|
1843
|
+
return c;
|
|
1844
|
+
}, writeFile(a, b, c = {}) {
|
|
1845
|
+
c.flags = c.flags || 577;
|
|
1846
|
+
a = H.open(a, c.flags, c.mode);
|
|
1847
|
+
if ("string" == typeof b) {
|
|
1848
|
+
var d = new Uint8Array(Bb(b) + 1);
|
|
1849
|
+
b = Cb(b, d, 0, d.length);
|
|
1850
|
+
H.write(a, d, 0, b, void 0, c.Ga);
|
|
1851
|
+
} else if (ArrayBuffer.isView(b)) {
|
|
1852
|
+
H.write(a, b, 0, b.byteLength, void 0, c.Ga);
|
|
1853
|
+
} else {
|
|
1854
|
+
throw Error("Unsupported data type");
|
|
1855
|
+
}
|
|
1856
|
+
H.close(a);
|
|
1857
|
+
}, cwd:() => H.ta, chdir(a) {
|
|
1858
|
+
a = T(a, {D:!0});
|
|
1859
|
+
if (null === a.node) {
|
|
1860
|
+
throw new H.g(44);
|
|
1861
|
+
}
|
|
1862
|
+
if (!K(a.node.mode)) {
|
|
1863
|
+
throw new H.g(54);
|
|
1864
|
+
}
|
|
1865
|
+
var b = Tb(a.node, "x");
|
|
1866
|
+
if (b) {
|
|
1867
|
+
throw new H.g(b);
|
|
1868
|
+
}
|
|
1869
|
+
H.ta = a.path;
|
|
1870
|
+
}, qa() {
|
|
1871
|
+
[44].forEach(a => {
|
|
1872
|
+
H.ea[a] = new H.g(a);
|
|
1873
|
+
H.ea[a].stack = "<generic error, no stack>";
|
|
1874
|
+
});
|
|
1875
|
+
H.G = Array(4096);
|
|
1876
|
+
H.m(J, {}, "/");
|
|
1877
|
+
H.mkdir("/tmp");
|
|
1878
|
+
H.mkdir("/home");
|
|
1879
|
+
H.mkdir("/home/web_user");
|
|
1880
|
+
ec();
|
|
1881
|
+
fc();
|
|
1882
|
+
H.La = {MEMFS:J, NODEFS:O, WORKERFS:Q,};
|
|
1883
|
+
}, L(a, b, c) {
|
|
1884
|
+
n(!H.L.Z, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
|
|
1885
|
+
H.L.Z = !0;
|
|
1886
|
+
f.stdin = a || f.stdin;
|
|
1887
|
+
f.stdout = b || f.stdout;
|
|
1888
|
+
f.stderr = c || f.stderr;
|
|
1889
|
+
f.stdin ? H.K("/dev", "stdin", f.stdin) : H.symlink("/dev/tty", "/dev/stdin");
|
|
1890
|
+
f.stdout ? H.K("/dev", "stdout", null, f.stdout) : H.symlink("/dev/tty", "/dev/stdout");
|
|
1891
|
+
f.stderr ? H.K("/dev", "stderr", null, f.stderr) : H.symlink("/dev/tty1", "/dev/stderr");
|
|
1892
|
+
a = H.open("/dev/stdin", 0);
|
|
1893
|
+
b = H.open("/dev/stdout", 1);
|
|
1894
|
+
c = H.open("/dev/stderr", 1);
|
|
1895
|
+
n(0 === a.fd, `invalid handle for stdin (${a.fd})`);
|
|
1896
|
+
n(1 === b.fd, `invalid handle for stdout (${b.fd})`);
|
|
1897
|
+
n(2 === c.fd, `invalid handle for stderr (${c.fd})`);
|
|
1898
|
+
}, pb() {
|
|
1899
|
+
H.L.Z = !1;
|
|
1900
|
+
jc(0);
|
|
1901
|
+
for (var a = 0; a < H.streams.length; a++) {
|
|
1902
|
+
var b = H.streams[a];
|
|
1903
|
+
b && H.close(b);
|
|
1904
|
+
}
|
|
1905
|
+
}, ib(a, b) {
|
|
1906
|
+
a = gc(a, b);
|
|
1907
|
+
return a.exists ? a.object : null;
|
|
1908
|
+
}, gb(a, b) {
|
|
1909
|
+
a = "string" == typeof a ? a : Vb(a);
|
|
1910
|
+
for (b = b.split("/").reverse(); b.length;) {
|
|
1911
|
+
var c = b.pop();
|
|
1912
|
+
if (c) {
|
|
1913
|
+
var d = G(a + "/" + c);
|
|
1914
|
+
try {
|
|
1915
|
+
H.mkdir(d);
|
|
1916
|
+
} catch (e) {
|
|
1917
|
+
}
|
|
1918
|
+
a = d;
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
return d;
|
|
1922
|
+
}, K(a, b, c, d) {
|
|
1923
|
+
a = vb("string" == typeof a ? a : Vb(a), b);
|
|
1924
|
+
b = Pb(!!c, !!d);
|
|
1925
|
+
H.K.ka || (H.K.ka = 64);
|
|
1926
|
+
var e = H.N(H.K.ka++, 0);
|
|
1927
|
+
Gb(e, {open(g) {
|
|
1928
|
+
g.seekable = !1;
|
|
1929
|
+
}, close() {
|
|
1930
|
+
d?.buffer?.length && d(10);
|
|
1931
|
+
}, read(g, k, m, r) {
|
|
1932
|
+
for (var t = 0, y = 0; y < r; y++) {
|
|
1933
|
+
try {
|
|
1934
|
+
var u = c();
|
|
1935
|
+
} catch (z) {
|
|
1936
|
+
throw new H.g(29);
|
|
1937
|
+
}
|
|
1938
|
+
if (void 0 === u && 0 === t) {
|
|
1939
|
+
throw new H.g(6);
|
|
1940
|
+
}
|
|
1941
|
+
if (null === u || void 0 === u) {
|
|
1942
|
+
break;
|
|
1943
|
+
}
|
|
1944
|
+
t++;
|
|
1945
|
+
k[m + y] = u;
|
|
1946
|
+
}
|
|
1947
|
+
t && (g.node.timestamp = Date.now());
|
|
1948
|
+
return t;
|
|
1949
|
+
}, write(g, k, m, r) {
|
|
1950
|
+
for (var t = 0; t < r; t++) {
|
|
1951
|
+
try {
|
|
1952
|
+
d(k[m + t]);
|
|
1953
|
+
} catch (y) {
|
|
1954
|
+
throw new H.g(29);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
r && (g.node.timestamp = Date.now());
|
|
1958
|
+
return t;
|
|
1959
|
+
}});
|
|
1960
|
+
return dc(a, b, e);
|
|
1961
|
+
}, Ia(a, b, c, d, e) {
|
|
1962
|
+
function g(u, z, M, I, B) {
|
|
1963
|
+
u = u.node.j;
|
|
1964
|
+
if (B >= u.length) {
|
|
1965
|
+
return 0;
|
|
1966
|
+
}
|
|
1967
|
+
I = Math.min(u.length - B, I);
|
|
1968
|
+
n(0 <= I);
|
|
1969
|
+
if (u.slice) {
|
|
1970
|
+
for (var x = 0; x < I; x++) {
|
|
1971
|
+
z[M + x] = u[B + x];
|
|
1972
|
+
}
|
|
1973
|
+
} else {
|
|
1974
|
+
for (x = 0; x < I; x++) {
|
|
1975
|
+
z[M + x] = u.get(B + x);
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
return I;
|
|
1979
|
+
}
|
|
1980
|
+
class k {
|
|
1981
|
+
constructor() {
|
|
1982
|
+
this.ga = !1;
|
|
1983
|
+
this.F = [];
|
|
1984
|
+
this.fa = void 0;
|
|
1985
|
+
this.xa = this.ya = 0;
|
|
1986
|
+
}
|
|
1987
|
+
get(u) {
|
|
1988
|
+
if (!(u > this.length - 1 || 0 > u)) {
|
|
1989
|
+
var z = u % this.chunkSize;
|
|
1990
|
+
return this.fa(u / this.chunkSize | 0)[z];
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
Ta(u) {
|
|
1994
|
+
this.fa = u;
|
|
1995
|
+
}
|
|
1996
|
+
za() {
|
|
1997
|
+
var u = new XMLHttpRequest();
|
|
1998
|
+
u.open("HEAD", c, !1);
|
|
1999
|
+
u.send(null);
|
|
2000
|
+
if (!(200 <= u.status && 300 > u.status || 304 === u.status)) {
|
|
2001
|
+
throw Error("Couldn't load " + c + ". Status: " + u.status);
|
|
2002
|
+
}
|
|
2003
|
+
var z = Number(u.getResponseHeader("Content-length")), M, I = (M = u.getResponseHeader("Accept-Ranges")) && "bytes" === M;
|
|
2004
|
+
u = (M = u.getResponseHeader("Content-Encoding")) && "gzip" === M;
|
|
2005
|
+
var B = 1048576;
|
|
2006
|
+
I || (B = z);
|
|
2007
|
+
var x = this;
|
|
2008
|
+
x.Ta(R => {
|
|
2009
|
+
var X = R * B, Y = (R + 1) * B - 1;
|
|
2010
|
+
Y = Math.min(Y, z - 1);
|
|
2011
|
+
if ("undefined" == typeof x.F[R]) {
|
|
2012
|
+
var pb = x.F;
|
|
2013
|
+
if (X > Y) {
|
|
2014
|
+
throw Error("invalid range (" + X + ", " + Y + ") or no bytes requested!");
|
|
2015
|
+
}
|
|
2016
|
+
if (Y > z - 1) {
|
|
2017
|
+
throw Error("only " + z + " bytes available! programmer error!");
|
|
2018
|
+
}
|
|
2019
|
+
var S = new XMLHttpRequest();
|
|
2020
|
+
S.open("GET", c, !1);
|
|
2021
|
+
z !== B && S.setRequestHeader("Range", "bytes=" + X + "-" + Y);
|
|
2022
|
+
S.responseType = "arraybuffer";
|
|
2023
|
+
S.overrideMimeType && S.overrideMimeType("text/plain; charset=x-user-defined");
|
|
2024
|
+
S.send(null);
|
|
2025
|
+
if (!(200 <= S.status && 300 > S.status || 304 === S.status)) {
|
|
2026
|
+
throw Error("Couldn't load " + c + ". Status: " + S.status);
|
|
2027
|
+
}
|
|
2028
|
+
X = void 0 !== S.response ? new Uint8Array(S.response || []) : Db(S.responseText || "");
|
|
2029
|
+
pb[R] = X;
|
|
2030
|
+
}
|
|
2031
|
+
if ("undefined" == typeof x.F[R]) {
|
|
2032
|
+
throw Error("doXHR failed!");
|
|
2033
|
+
}
|
|
2034
|
+
return x.F[R];
|
|
2035
|
+
});
|
|
2036
|
+
if (u || !z) {
|
|
2037
|
+
B = z = 1, B = z = this.fa(0).length, ta("LazyFiles on gzip forces download of the whole file when length is accessed");
|
|
2038
|
+
}
|
|
2039
|
+
this.ya = z;
|
|
2040
|
+
this.xa = B;
|
|
2041
|
+
this.ga = !0;
|
|
2042
|
+
}
|
|
2043
|
+
get length() {
|
|
2044
|
+
this.ga || this.za();
|
|
2045
|
+
return this.ya;
|
|
2046
|
+
}
|
|
2047
|
+
get chunkSize() {
|
|
2048
|
+
this.ga || this.za();
|
|
2049
|
+
return this.xa;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
if ("undefined" != typeof XMLHttpRequest) {
|
|
2053
|
+
if (!ea) {
|
|
2054
|
+
throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";
|
|
2055
|
+
}
|
|
2056
|
+
var m = new k();
|
|
2057
|
+
var r = void 0;
|
|
2058
|
+
} else {
|
|
2059
|
+
r = c, m = void 0;
|
|
2060
|
+
}
|
|
2061
|
+
var t = hc(a, b, d, e);
|
|
2062
|
+
m ? t.j = m : r && (t.j = null, t.url = r);
|
|
2063
|
+
Object.defineProperties(t, {o:{get:function() {
|
|
2064
|
+
return this.j.length;
|
|
2065
|
+
}}});
|
|
2066
|
+
var y = {};
|
|
2067
|
+
Object.keys(t.i).forEach(u => {
|
|
2068
|
+
var z = t.i[u];
|
|
2069
|
+
y[u] = (...M) => {
|
|
2070
|
+
ic(t);
|
|
2071
|
+
return z(...M);
|
|
2072
|
+
};
|
|
2073
|
+
});
|
|
2074
|
+
y.read = (u, z, M, I, B) => {
|
|
2075
|
+
ic(t);
|
|
2076
|
+
return g(u, z, M, I, B);
|
|
2077
|
+
};
|
|
2078
|
+
y.O = (u, z, M) => {
|
|
2079
|
+
ic(t);
|
|
2080
|
+
var I = Kb();
|
|
2081
|
+
if (!I) {
|
|
2082
|
+
throw new H.g(48);
|
|
2083
|
+
}
|
|
2084
|
+
g(u, v, I, z, M);
|
|
2085
|
+
return {v:I, ra:!0};
|
|
2086
|
+
};
|
|
2087
|
+
t.i = y;
|
|
2088
|
+
return t;
|
|
2089
|
+
}, Ya() {
|
|
2090
|
+
h("FS.absolutePath has been removed; use PATH_FS.resolve instead");
|
|
2091
|
+
}, eb() {
|
|
2092
|
+
h("FS.createFolder has been removed; use FS.mkdir instead");
|
|
2093
|
+
}, fb() {
|
|
2094
|
+
h("FS.createLink has been removed; use FS.symlink instead");
|
|
2095
|
+
}, lb() {
|
|
2096
|
+
h("FS.joinPath has been removed; use PATH.join instead");
|
|
2097
|
+
}, ob() {
|
|
2098
|
+
h("FS.mmapAlloc has been replaced by the top level function mmapAlloc");
|
|
2099
|
+
}, qb() {
|
|
2100
|
+
h("FS.standardizePath has been removed; use PATH.normalize instead");
|
|
2101
|
+
},};
|
|
2102
|
+
function kc(a, b, c) {
|
|
2103
|
+
if ("/" === b.charAt(0)) {
|
|
2104
|
+
return b;
|
|
2105
|
+
}
|
|
2106
|
+
a = -100 === a ? H.cwd() : U(a).path;
|
|
2107
|
+
if (0 == b.length) {
|
|
2108
|
+
if (!c) {
|
|
2109
|
+
throw new H.g(44);
|
|
2110
|
+
}
|
|
2111
|
+
return a;
|
|
2112
|
+
}
|
|
2113
|
+
return G(a + "/" + b);
|
|
2114
|
+
}
|
|
2115
|
+
function lc(a, b, c) {
|
|
2116
|
+
a = a(b);
|
|
2117
|
+
w[c >> 2] = a.dev;
|
|
2118
|
+
w[c + 4 >> 2] = a.mode;
|
|
2119
|
+
A[c + 8 >> 2] = a.nlink;
|
|
2120
|
+
w[c + 12 >> 2] = a.uid;
|
|
2121
|
+
w[c + 16 >> 2] = a.gid;
|
|
2122
|
+
w[c + 20 >> 2] = a.rdev;
|
|
2123
|
+
Aa[c + 24 >> 3] = BigInt(a.size);
|
|
2124
|
+
w[c + 32 >> 2] = 4096;
|
|
2125
|
+
w[c + 36 >> 2] = a.blocks;
|
|
2126
|
+
b = a.atime.getTime();
|
|
2127
|
+
var d = a.mtime.getTime(), e = a.ctime.getTime();
|
|
2128
|
+
Aa[c + 40 >> 3] = BigInt(Math.floor(b / 1000));
|
|
2129
|
+
A[c + 48 >> 2] = b % 1000 * 1000;
|
|
2130
|
+
Aa[c + 56 >> 3] = BigInt(Math.floor(d / 1000));
|
|
2131
|
+
A[c + 64 >> 2] = d % 1000 * 1000;
|
|
2132
|
+
Aa[c + 72 >> 3] = BigInt(Math.floor(e / 1000));
|
|
2133
|
+
A[c + 80 >> 2] = e % 1000 * 1000;
|
|
2134
|
+
Aa[c + 88 >> 3] = BigInt(a.ino);
|
|
2135
|
+
return 0;
|
|
2136
|
+
}
|
|
2137
|
+
var mc = void 0;
|
|
2138
|
+
function nc() {
|
|
2139
|
+
n(void 0 != mc);
|
|
2140
|
+
var a = w[+mc >> 2];
|
|
2141
|
+
mc += 4;
|
|
2142
|
+
return a;
|
|
2143
|
+
}
|
|
2144
|
+
var oc = (a, b, c) => {
|
|
2145
|
+
n("number" == typeof c, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
|
|
2146
|
+
Cb(a, ya, b, c);
|
|
2147
|
+
}, pc = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), qc = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], rc = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], sc = {}, uc = () => {
|
|
2148
|
+
if (!tc) {
|
|
2149
|
+
var a = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:ka || "./this.program"}, b;
|
|
2150
|
+
for (b in sc) {
|
|
2151
|
+
void 0 === sc[b] ? delete a[b] : a[b] = sc[b];
|
|
2152
|
+
}
|
|
2153
|
+
var c = [];
|
|
2154
|
+
for (b in a) {
|
|
2155
|
+
c.push(`${b}=${a[b]}`);
|
|
2156
|
+
}
|
|
2157
|
+
tc = c;
|
|
2158
|
+
}
|
|
2159
|
+
return tc;
|
|
2160
|
+
}, tc, wc = a => {
|
|
2161
|
+
xa = a;
|
|
2162
|
+
vc();
|
|
2163
|
+
xa = a;
|
|
2164
|
+
wa = !0;
|
|
2165
|
+
la(a, new fb(a));
|
|
2166
|
+
}, xc = (a, b, c, d) => {
|
|
2167
|
+
for (var e = 0, g = 0; g < c; g++) {
|
|
2168
|
+
var k = A[b >> 2], m = A[b + 4 >> 2];
|
|
2169
|
+
b += 8;
|
|
2170
|
+
k = H.read(a, v, k, m, d);
|
|
2171
|
+
if (0 > k) {
|
|
2172
|
+
return -1;
|
|
2173
|
+
}
|
|
2174
|
+
e += k;
|
|
2175
|
+
if (k < m) {
|
|
2176
|
+
break;
|
|
2177
|
+
}
|
|
2178
|
+
"undefined" != typeof d && (d += k);
|
|
2179
|
+
}
|
|
2180
|
+
return e;
|
|
2181
|
+
}, yc = (a, b, c, d) => {
|
|
2182
|
+
for (var e = 0, g = 0; g < c; g++) {
|
|
2183
|
+
var k = A[b >> 2], m = A[b + 4 >> 2];
|
|
2184
|
+
b += 8;
|
|
2185
|
+
k = H.write(a, v, k, m, d);
|
|
2186
|
+
if (0 > k) {
|
|
2187
|
+
return -1;
|
|
2188
|
+
}
|
|
2189
|
+
e += k;
|
|
2190
|
+
"undefined" != typeof d && (d += k);
|
|
2191
|
+
}
|
|
2192
|
+
return e;
|
|
2193
|
+
}, zc = a => {
|
|
2194
|
+
if (a instanceof fb || "unwind" == a) {
|
|
2195
|
+
return xa;
|
|
2196
|
+
}
|
|
2197
|
+
Ca();
|
|
2198
|
+
a instanceof WebAssembly.RuntimeError && 0 >= V() && p("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 131072)");
|
|
2199
|
+
la(1, a);
|
|
2200
|
+
}, Ac;
|
|
2201
|
+
f.incrementExceptionRefcount = a => Bc(a);
|
|
2202
|
+
f.decrementExceptionRefcount = a => Cc(a);
|
|
2203
|
+
var Wa = a => {
|
|
2204
|
+
var b = V(), c = Dc(4), d = Dc(4);
|
|
2205
|
+
Ec(a, c, d);
|
|
2206
|
+
a = A[c >> 2];
|
|
2207
|
+
d = A[d >> 2];
|
|
2208
|
+
c = F(a);
|
|
2209
|
+
Fc(a);
|
|
2210
|
+
if (d) {
|
|
2211
|
+
var e = F(d);
|
|
2212
|
+
Fc(d);
|
|
2213
|
+
}
|
|
2214
|
+
W(b);
|
|
2215
|
+
return [c, e];
|
|
2216
|
+
};
|
|
2217
|
+
f.getExceptionMessage = a => Wa(a);
|
|
2218
|
+
H.hb = (a, b, c, d, e, g, k, m, r, t) => {
|
|
2219
|
+
function y(M) {
|
|
2220
|
+
function I(B) {
|
|
2221
|
+
t?.();
|
|
2222
|
+
if (!m) {
|
|
2223
|
+
var x = a, R = b;
|
|
2224
|
+
x && (x = "string" == typeof x ? x : Vb(x), R = b ? G(x + "/" + b) : x);
|
|
2225
|
+
x = Pb(d, e);
|
|
2226
|
+
R = H.create(R, x);
|
|
2227
|
+
if (B) {
|
|
2228
|
+
if ("string" == typeof B) {
|
|
2229
|
+
for (var X = Array(B.length), Y = 0, pb = B.length; Y < pb; ++Y) {
|
|
2230
|
+
X[Y] = B.charCodeAt(Y);
|
|
2231
|
+
}
|
|
2232
|
+
B = X;
|
|
2233
|
+
}
|
|
2234
|
+
H.chmod(R, x | 146);
|
|
2235
|
+
X = H.open(R, 577);
|
|
2236
|
+
H.write(X, B, 0, B.length, 0, r);
|
|
2237
|
+
H.close(X);
|
|
2238
|
+
H.chmod(R, x);
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
g?.();
|
|
2242
|
+
Sa(z);
|
|
2243
|
+
}
|
|
2244
|
+
Ob(M, u, I, () => {
|
|
2245
|
+
k?.();
|
|
2246
|
+
Sa(z);
|
|
2247
|
+
}) || I(M);
|
|
2248
|
+
}
|
|
2249
|
+
var u = b ? yb(G(a + "/" + b)) : a, z = Qa(`cp ${u}`);
|
|
2250
|
+
Ra(z);
|
|
2251
|
+
"string" == typeof c ? Mb(c, y, k) : y(c);
|
|
2252
|
+
};
|
|
2253
|
+
H.qa();
|
|
2254
|
+
fa && O.qa();
|
|
2255
|
+
var Vc = {__assert_fail:(a, b, c, d) => {
|
|
2256
|
+
h(`Assertion failed: ${F(a)}, at: ` + [b ? F(b) : "unknown filename", c, d ? F(d) : "unknown function"]);
|
|
2257
|
+
}, __cxa_begin_catch:a => {
|
|
2258
|
+
a = new mb(a);
|
|
2259
|
+
0 == v[a.v + 12] && (v[a.v + 12] = 1, kb--);
|
|
2260
|
+
v[a.v + 13] = 0;
|
|
2261
|
+
jb.push(a);
|
|
2262
|
+
Bc(a.F);
|
|
2263
|
+
if (Gc(A[a.v + 4 >> 2])) {
|
|
2264
|
+
a = A[a.F >> 2];
|
|
2265
|
+
} else {
|
|
2266
|
+
var b = A[a.v + 16 >> 2];
|
|
2267
|
+
a = 0 !== b ? b : a.F;
|
|
2268
|
+
}
|
|
2269
|
+
return a;
|
|
2270
|
+
}, __cxa_find_matching_catch_2:() => qb([]), __cxa_find_matching_catch_3:a => qb([a]), __resumeException:a => {
|
|
2271
|
+
lb ||= new Va(a);
|
|
2272
|
+
throw lb;
|
|
2273
|
+
}, __syscall_dup:function(a) {
|
|
2274
|
+
try {
|
|
2275
|
+
var b = U(a);
|
|
2276
|
+
return bc(b).fd;
|
|
2277
|
+
} catch (c) {
|
|
2278
|
+
if ("undefined" == typeof H || "ErrnoError" !== c.name) {
|
|
2279
|
+
throw c;
|
|
2280
|
+
}
|
|
2281
|
+
return -c.l;
|
|
2282
|
+
}
|
|
2283
|
+
}, __syscall_dup3:function(a, b, c) {
|
|
2284
|
+
try {
|
|
2285
|
+
var d = U(a);
|
|
2286
|
+
n(!c);
|
|
2287
|
+
if (d.fd === b) {
|
|
2288
|
+
return -28;
|
|
2289
|
+
}
|
|
2290
|
+
var e = H.va(b);
|
|
2291
|
+
e && H.close(e);
|
|
2292
|
+
return bc(d, b).fd;
|
|
2293
|
+
} catch (g) {
|
|
2294
|
+
if ("undefined" == typeof H || "ErrnoError" !== g.name) {
|
|
2295
|
+
throw g;
|
|
2296
|
+
}
|
|
2297
|
+
return -g.l;
|
|
2298
|
+
}
|
|
2299
|
+
}, __syscall_fcntl64:function(a, b, c) {
|
|
2300
|
+
mc = c;
|
|
2301
|
+
try {
|
|
2302
|
+
var d = U(a);
|
|
2303
|
+
switch(b) {
|
|
2304
|
+
case 0:
|
|
2305
|
+
var e = nc();
|
|
2306
|
+
if (0 > e) {
|
|
2307
|
+
break;
|
|
2308
|
+
}
|
|
2309
|
+
for (; H.streams[e];) {
|
|
2310
|
+
e++;
|
|
2311
|
+
}
|
|
2312
|
+
return bc(d, e).fd;
|
|
2313
|
+
case 1:
|
|
2314
|
+
case 2:
|
|
2315
|
+
return 0;
|
|
2316
|
+
case 3:
|
|
2317
|
+
return d.flags;
|
|
2318
|
+
case 4:
|
|
2319
|
+
return e = nc(), d.flags |= e, 0;
|
|
2320
|
+
case 12:
|
|
2321
|
+
return e = nc(), za[e + 0 >> 1] = 2, 0;
|
|
2322
|
+
case 13:
|
|
2323
|
+
case 14:
|
|
2324
|
+
return 0;
|
|
2325
|
+
}
|
|
2326
|
+
return -28;
|
|
2327
|
+
} catch (g) {
|
|
2328
|
+
if ("undefined" == typeof H || "ErrnoError" !== g.name) {
|
|
2329
|
+
throw g;
|
|
2330
|
+
}
|
|
2331
|
+
return -g.l;
|
|
2332
|
+
}
|
|
2333
|
+
}, __syscall_fstat64:function(a, b) {
|
|
2334
|
+
try {
|
|
2335
|
+
var c = U(a);
|
|
2336
|
+
return lc(H.stat, c.path, b);
|
|
2337
|
+
} catch (d) {
|
|
2338
|
+
if ("undefined" == typeof H || "ErrnoError" !== d.name) {
|
|
2339
|
+
throw d;
|
|
2340
|
+
}
|
|
2341
|
+
return -d.l;
|
|
2342
|
+
}
|
|
2343
|
+
}, __syscall_getdents64:function(a, b, c) {
|
|
2344
|
+
try {
|
|
2345
|
+
var d = U(a);
|
|
2346
|
+
d.M || (d.M = H.readdir(d.path));
|
|
2347
|
+
a = 0;
|
|
2348
|
+
for (var e = H.u(d, 0, 1), g = Math.floor(e / 280); g < d.M.length && a + 280 <= c;) {
|
|
2349
|
+
var k = d.M[g];
|
|
2350
|
+
if ("." === k) {
|
|
2351
|
+
var m = d.node.id;
|
|
2352
|
+
var r = 4;
|
|
2353
|
+
} else if (".." === k) {
|
|
2354
|
+
m = T(d.path, {parent:!0}).node.id, r = 4;
|
|
2355
|
+
} else {
|
|
2356
|
+
var t = L(d.node, k);
|
|
2357
|
+
m = t.id;
|
|
2358
|
+
r = 8192 === (t.mode & 61440) ? 2 : K(t.mode) ? 4 : 40960 === (t.mode & 61440) ? 10 : 8;
|
|
2359
|
+
}
|
|
2360
|
+
n(m);
|
|
2361
|
+
Aa[b + a >> 3] = BigInt(m);
|
|
2362
|
+
Aa[b + a + 8 >> 3] = BigInt(280 * (g + 1));
|
|
2363
|
+
za[b + a + 16 >> 1] = 280;
|
|
2364
|
+
v[b + a + 18] = r;
|
|
2365
|
+
oc(k, b + a + 19, 256);
|
|
2366
|
+
a += 280;
|
|
2367
|
+
g += 1;
|
|
2368
|
+
}
|
|
2369
|
+
H.u(d, 280 * g, 0);
|
|
2370
|
+
return a;
|
|
2371
|
+
} catch (y) {
|
|
2372
|
+
if ("undefined" == typeof H || "ErrnoError" !== y.name) {
|
|
2373
|
+
throw y;
|
|
2374
|
+
}
|
|
2375
|
+
return -y.l;
|
|
2376
|
+
}
|
|
2377
|
+
}, __syscall_ioctl:function(a, b, c) {
|
|
2378
|
+
mc = c;
|
|
2379
|
+
try {
|
|
2380
|
+
var d = U(a);
|
|
2381
|
+
switch(b) {
|
|
2382
|
+
case 21509:
|
|
2383
|
+
return d.tty ? 0 : -59;
|
|
2384
|
+
case 21505:
|
|
2385
|
+
if (!d.tty) {
|
|
2386
|
+
return -59;
|
|
2387
|
+
}
|
|
2388
|
+
if (d.tty.I.Na) {
|
|
2389
|
+
a = [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
|
|
2390
|
+
var e = nc();
|
|
2391
|
+
w[e >> 2] = 25856;
|
|
2392
|
+
w[e + 4 >> 2] = 5;
|
|
2393
|
+
w[e + 8 >> 2] = 191;
|
|
2394
|
+
w[e + 12 >> 2] = 35387;
|
|
2395
|
+
for (var g = 0; 32 > g; g++) {
|
|
2396
|
+
v[e + g + 17] = a[g] || 0;
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
return 0;
|
|
2400
|
+
case 21510:
|
|
2401
|
+
case 21511:
|
|
2402
|
+
case 21512:
|
|
2403
|
+
return d.tty ? 0 : -59;
|
|
2404
|
+
case 21506:
|
|
2405
|
+
case 21507:
|
|
2406
|
+
case 21508:
|
|
2407
|
+
if (!d.tty) {
|
|
2408
|
+
return -59;
|
|
2409
|
+
}
|
|
2410
|
+
if (d.tty.I.Oa) {
|
|
2411
|
+
for (e = nc(), a = [], g = 0; 32 > g; g++) {
|
|
2412
|
+
a.push(v[e + g + 17]);
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
return 0;
|
|
2416
|
+
case 21519:
|
|
2417
|
+
if (!d.tty) {
|
|
2418
|
+
return -59;
|
|
2419
|
+
}
|
|
2420
|
+
e = nc();
|
|
2421
|
+
return w[e >> 2] = 0;
|
|
2422
|
+
case 21520:
|
|
2423
|
+
return d.tty ? -28 : -59;
|
|
2424
|
+
case 21531:
|
|
2425
|
+
return e = nc(), H.ia(d, b, e);
|
|
2426
|
+
case 21523:
|
|
2427
|
+
if (!d.tty) {
|
|
2428
|
+
return -59;
|
|
2429
|
+
}
|
|
2430
|
+
d.tty.I.Pa && (g = [24, 80], e = nc(), za[e >> 1] = g[0], za[e + 2 >> 1] = g[1]);
|
|
2431
|
+
return 0;
|
|
2432
|
+
case 21524:
|
|
2433
|
+
return d.tty ? 0 : -59;
|
|
2434
|
+
case 21515:
|
|
2435
|
+
return d.tty ? 0 : -59;
|
|
2436
|
+
default:
|
|
2437
|
+
return -28;
|
|
2438
|
+
}
|
|
2439
|
+
} catch (k) {
|
|
2440
|
+
if ("undefined" == typeof H || "ErrnoError" !== k.name) {
|
|
2441
|
+
throw k;
|
|
2442
|
+
}
|
|
2443
|
+
return -k.l;
|
|
2444
|
+
}
|
|
2445
|
+
}, __syscall_lstat64:function(a, b) {
|
|
2446
|
+
try {
|
|
2447
|
+
return a = F(a), lc(H.lstat, a, b);
|
|
2448
|
+
} catch (c) {
|
|
2449
|
+
if ("undefined" == typeof H || "ErrnoError" !== c.name) {
|
|
2450
|
+
throw c;
|
|
2451
|
+
}
|
|
2452
|
+
return -c.l;
|
|
2453
|
+
}
|
|
2454
|
+
}, __syscall_newfstatat:function(a, b, c, d) {
|
|
2455
|
+
try {
|
|
2456
|
+
b = F(b);
|
|
2457
|
+
var e = d & 256, g = d & 4096;
|
|
2458
|
+
d &= -6401;
|
|
2459
|
+
n(!d, `unknown flags in __syscall_newfstatat: ${d}`);
|
|
2460
|
+
b = kc(a, b, g);
|
|
2461
|
+
return lc(e ? H.lstat : H.stat, b, c);
|
|
2462
|
+
} catch (k) {
|
|
2463
|
+
if ("undefined" == typeof H || "ErrnoError" !== k.name) {
|
|
2464
|
+
throw k;
|
|
2465
|
+
}
|
|
2466
|
+
return -k.l;
|
|
2467
|
+
}
|
|
2468
|
+
}, __syscall_openat:function(a, b, c, d) {
|
|
2469
|
+
mc = d;
|
|
2470
|
+
try {
|
|
2471
|
+
b = F(b);
|
|
2472
|
+
b = kc(a, b);
|
|
2473
|
+
var e = d ? nc() : 0;
|
|
2474
|
+
return H.open(b, c, e).fd;
|
|
2475
|
+
} catch (g) {
|
|
2476
|
+
if ("undefined" == typeof H || "ErrnoError" !== g.name) {
|
|
2477
|
+
throw g;
|
|
2478
|
+
}
|
|
2479
|
+
return -g.l;
|
|
2480
|
+
}
|
|
2481
|
+
}, __syscall_renameat:function(a, b, c, d) {
|
|
2482
|
+
try {
|
|
2483
|
+
return b = F(b), d = F(d), b = kc(a, b), d = kc(c, d), H.rename(b, d), 0;
|
|
2484
|
+
} catch (e) {
|
|
2485
|
+
if ("undefined" == typeof H || "ErrnoError" !== e.name) {
|
|
2486
|
+
throw e;
|
|
2487
|
+
}
|
|
2488
|
+
return -e.l;
|
|
2489
|
+
}
|
|
2490
|
+
}, __syscall_rmdir:function(a) {
|
|
2491
|
+
try {
|
|
2492
|
+
return a = F(a), H.rmdir(a), 0;
|
|
2493
|
+
} catch (b) {
|
|
2494
|
+
if ("undefined" == typeof H || "ErrnoError" !== b.name) {
|
|
2495
|
+
throw b;
|
|
2496
|
+
}
|
|
2497
|
+
return -b.l;
|
|
2498
|
+
}
|
|
2499
|
+
}, __syscall_stat64:function(a, b) {
|
|
2500
|
+
try {
|
|
2501
|
+
return a = F(a), lc(H.stat, a, b);
|
|
2502
|
+
} catch (c) {
|
|
2503
|
+
if ("undefined" == typeof H || "ErrnoError" !== c.name) {
|
|
2504
|
+
throw c;
|
|
2505
|
+
}
|
|
2506
|
+
return -c.l;
|
|
2507
|
+
}
|
|
2508
|
+
}, __syscall_unlinkat:function(a, b, c) {
|
|
2509
|
+
try {
|
|
2510
|
+
return b = F(b), b = kc(a, b), 0 === c ? H.unlink(b) : 512 === c ? H.rmdir(b) : h("Invalid flags passed to unlinkat"), 0;
|
|
2511
|
+
} catch (d) {
|
|
2512
|
+
if ("undefined" == typeof H || "ErrnoError" !== d.name) {
|
|
2513
|
+
throw d;
|
|
2514
|
+
}
|
|
2515
|
+
return -d.l;
|
|
2516
|
+
}
|
|
2517
|
+
}, _abort_js:() => {
|
|
2518
|
+
h("native code called abort()");
|
|
2519
|
+
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_throw_longjmp:() => {
|
|
2520
|
+
throw new Ua();
|
|
2521
|
+
}, _gmtime_js:function(a, b) {
|
|
2522
|
+
a = -9007199254740992 > a || 9007199254740992 < a ? NaN : Number(a);
|
|
2523
|
+
a = new Date(1000 * a);
|
|
2524
|
+
w[b >> 2] = a.getUTCSeconds();
|
|
2525
|
+
w[b + 4 >> 2] = a.getUTCMinutes();
|
|
2526
|
+
w[b + 8 >> 2] = a.getUTCHours();
|
|
2527
|
+
w[b + 12 >> 2] = a.getUTCDate();
|
|
2528
|
+
w[b + 16 >> 2] = a.getUTCMonth();
|
|
2529
|
+
w[b + 20 >> 2] = a.getUTCFullYear() - 1900;
|
|
2530
|
+
w[b + 24 >> 2] = a.getUTCDay();
|
|
2531
|
+
w[b + 28 >> 2] = (a.getTime() - Date.UTC(a.getUTCFullYear(), 0, 1, 0, 0, 0, 0)) / 864E5 | 0;
|
|
2532
|
+
}, _localtime_js:function(a, b) {
|
|
2533
|
+
a = -9007199254740992 > a || 9007199254740992 < a ? NaN : Number(a);
|
|
2534
|
+
a = new Date(1000 * a);
|
|
2535
|
+
w[b >> 2] = a.getSeconds();
|
|
2536
|
+
w[b + 4 >> 2] = a.getMinutes();
|
|
2537
|
+
w[b + 8 >> 2] = a.getHours();
|
|
2538
|
+
w[b + 12 >> 2] = a.getDate();
|
|
2539
|
+
w[b + 16 >> 2] = a.getMonth();
|
|
2540
|
+
w[b + 20 >> 2] = a.getFullYear() - 1900;
|
|
2541
|
+
w[b + 24 >> 2] = a.getDay();
|
|
2542
|
+
w[b + 28 >> 2] = (pc(a.getFullYear()) ? qc : rc)[a.getMonth()] + a.getDate() - 1 | 0;
|
|
2543
|
+
w[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
|
|
2544
|
+
var c = (new Date(a.getFullYear(), 6, 1)).getTimezoneOffset(), d = (new Date(a.getFullYear(), 0, 1)).getTimezoneOffset();
|
|
2545
|
+
w[b + 32 >> 2] = (c != d && a.getTimezoneOffset() == Math.min(d, c)) | 0;
|
|
2546
|
+
}, _mktime_js:function(a) {
|
|
2547
|
+
var b = new Date(w[a + 20 >> 2] + 1900, w[a + 16 >> 2], w[a + 12 >> 2], w[a + 8 >> 2], w[a + 4 >> 2], w[a >> 2], 0), c = w[a + 32 >> 2], d = b.getTimezoneOffset(), e = (new Date(b.getFullYear(), 6, 1)).getTimezoneOffset(), g = (new Date(b.getFullYear(), 0, 1)).getTimezoneOffset(), k = Math.min(g, e);
|
|
2548
|
+
0 > c ? w[a + 32 >> 2] = Number(e != g && k == d) : 0 < c != (k == d) && (e = Math.max(g, e), b.setTime(b.getTime() + 60000 * ((0 < c ? k : e) - d)));
|
|
2549
|
+
w[a + 24 >> 2] = b.getDay();
|
|
2550
|
+
w[a + 28 >> 2] = (pc(b.getFullYear()) ? qc : rc)[b.getMonth()] + b.getDate() - 1 | 0;
|
|
2551
|
+
w[a >> 2] = b.getSeconds();
|
|
2552
|
+
w[a + 4 >> 2] = b.getMinutes();
|
|
2553
|
+
w[a + 8 >> 2] = b.getHours();
|
|
2554
|
+
w[a + 12 >> 2] = b.getDate();
|
|
2555
|
+
w[a + 16 >> 2] = b.getMonth();
|
|
2556
|
+
w[a + 20 >> 2] = b.getYear();
|
|
2557
|
+
a = b.getTime();
|
|
2558
|
+
return BigInt(isNaN(a) ? -1 : a / 1000);
|
|
2559
|
+
}, _tzset_js:(a, b, c, d) => {
|
|
2560
|
+
var e = (new Date()).getFullYear(), g = new Date(e, 0, 1), k = new Date(e, 6, 1);
|
|
2561
|
+
e = g.getTimezoneOffset();
|
|
2562
|
+
var m = k.getTimezoneOffset();
|
|
2563
|
+
A[a >> 2] = 60 * Math.max(e, m);
|
|
2564
|
+
w[b >> 2] = Number(e != m);
|
|
2565
|
+
a = r => r.toLocaleTimeString(void 0, {hour12:!1, timeZoneName:"short"}).split(" ")[1];
|
|
2566
|
+
g = a(g);
|
|
2567
|
+
k = a(k);
|
|
2568
|
+
n(g);
|
|
2569
|
+
n(k);
|
|
2570
|
+
n(16 >= Bb(g), `timezone name truncated to fit in TZNAME_MAX (${g})`);
|
|
2571
|
+
n(16 >= Bb(k), `timezone name truncated to fit in TZNAME_MAX (${k})`);
|
|
2572
|
+
m < e ? (oc(g, c, 17), oc(k, d, 17)) : (oc(g, d, 17), oc(k, c, 17));
|
|
2573
|
+
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:a => {
|
|
2574
|
+
var b = ya.length;
|
|
2575
|
+
a >>>= 0;
|
|
2576
|
+
n(a > b);
|
|
2577
|
+
if (2147483648 < a) {
|
|
2578
|
+
return p(`Cannot enlarge memory, requested ${a} bytes, but the limit is ${2147483648} bytes!`), !1;
|
|
2579
|
+
}
|
|
2580
|
+
for (var c = 1; 4 >= c; c *= 2) {
|
|
2581
|
+
var d = b * (1 + 0.2 / c);
|
|
2582
|
+
d = Math.min(d, a + 100663296);
|
|
2583
|
+
var e = Math;
|
|
2584
|
+
d = Math.max(a, d);
|
|
2585
|
+
e = e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536);
|
|
2586
|
+
a: {
|
|
2587
|
+
d = e;
|
|
2588
|
+
var g = va.buffer, k = (d - g.byteLength + 65535) / 65536;
|
|
2589
|
+
try {
|
|
2590
|
+
va.grow(k);
|
|
2591
|
+
Ba();
|
|
2592
|
+
var m = 1;
|
|
2593
|
+
break a;
|
|
2594
|
+
} catch (r) {
|
|
2595
|
+
p(`growMemory: Attempted to grow heap from ${g.byteLength} bytes to ${d} bytes, but got error: ${r}`);
|
|
2596
|
+
}
|
|
2597
|
+
m = void 0;
|
|
2598
|
+
}
|
|
2599
|
+
if (m) {
|
|
2600
|
+
return !0;
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
p(`Failed to grow the heap from ${b} bytes to ${e} bytes, not enough memory!`);
|
|
2604
|
+
return !1;
|
|
2605
|
+
}, environ_get:(a, b) => {
|
|
2606
|
+
var c = 0;
|
|
2607
|
+
uc().forEach((d, e) => {
|
|
2608
|
+
var g = b + c;
|
|
2609
|
+
e = A[a + 4 * e >> 2] = g;
|
|
2610
|
+
for (g = 0; g < d.length; ++g) {
|
|
2611
|
+
n(d.charCodeAt(g) === (d.charCodeAt(g) & 255)), v[e++] = d.charCodeAt(g);
|
|
2612
|
+
}
|
|
2613
|
+
v[e] = 0;
|
|
2614
|
+
c += d.length + 1;
|
|
2615
|
+
});
|
|
2616
|
+
return 0;
|
|
2617
|
+
}, environ_sizes_get:(a, b) => {
|
|
2618
|
+
var c = uc();
|
|
2619
|
+
A[a >> 2] = c.length;
|
|
2620
|
+
var d = 0;
|
|
2621
|
+
c.forEach(e => d += e.length + 1);
|
|
2622
|
+
A[b >> 2] = d;
|
|
2623
|
+
return 0;
|
|
2624
|
+
}, exit:wc, fd_close:function(a) {
|
|
2625
|
+
try {
|
|
2626
|
+
var b = U(a);
|
|
2627
|
+
H.close(b);
|
|
2628
|
+
return 0;
|
|
2629
|
+
} catch (c) {
|
|
2630
|
+
if ("undefined" == typeof H || "ErrnoError" !== c.name) {
|
|
2631
|
+
throw c;
|
|
2632
|
+
}
|
|
2633
|
+
return c.l;
|
|
2634
|
+
}
|
|
2635
|
+
}, fd_pread:function(a, b, c, d, e) {
|
|
2636
|
+
d = -9007199254740992 > d || 9007199254740992 < d ? NaN : Number(d);
|
|
2637
|
+
try {
|
|
2638
|
+
if (isNaN(d)) {
|
|
2639
|
+
return 61;
|
|
2640
|
+
}
|
|
2641
|
+
var g = U(a), k = xc(g, b, c, d);
|
|
2642
|
+
A[e >> 2] = k;
|
|
2643
|
+
return 0;
|
|
2644
|
+
} catch (m) {
|
|
2645
|
+
if ("undefined" == typeof H || "ErrnoError" !== m.name) {
|
|
2646
|
+
throw m;
|
|
2647
|
+
}
|
|
2648
|
+
return m.l;
|
|
2649
|
+
}
|
|
2650
|
+
}, fd_pwrite:function(a, b, c, d, e) {
|
|
2651
|
+
d = -9007199254740992 > d || 9007199254740992 < d ? NaN : Number(d);
|
|
2652
|
+
try {
|
|
2653
|
+
if (isNaN(d)) {
|
|
2654
|
+
return 61;
|
|
2655
|
+
}
|
|
2656
|
+
var g = U(a), k = yc(g, b, c, d);
|
|
2657
|
+
A[e >> 2] = k;
|
|
2658
|
+
return 0;
|
|
2659
|
+
} catch (m) {
|
|
2660
|
+
if ("undefined" == typeof H || "ErrnoError" !== m.name) {
|
|
2661
|
+
throw m;
|
|
2662
|
+
}
|
|
2663
|
+
return m.l;
|
|
2664
|
+
}
|
|
2665
|
+
}, fd_read:function(a, b, c, d) {
|
|
2666
|
+
try {
|
|
2667
|
+
var e = U(a), g = xc(e, b, c);
|
|
2668
|
+
A[d >> 2] = g;
|
|
2669
|
+
return 0;
|
|
2670
|
+
} catch (k) {
|
|
2671
|
+
if ("undefined" == typeof H || "ErrnoError" !== k.name) {
|
|
2672
|
+
throw k;
|
|
2673
|
+
}
|
|
2674
|
+
return k.l;
|
|
2675
|
+
}
|
|
2676
|
+
}, fd_seek:function(a, b, c, d) {
|
|
2677
|
+
b = -9007199254740992 > b || 9007199254740992 < b ? NaN : Number(b);
|
|
2678
|
+
try {
|
|
2679
|
+
if (isNaN(b)) {
|
|
2680
|
+
return 61;
|
|
2681
|
+
}
|
|
2682
|
+
var e = U(a);
|
|
2683
|
+
H.u(e, b, c);
|
|
2684
|
+
Aa[d >> 3] = BigInt(e.position);
|
|
2685
|
+
e.M && 0 === b && 0 === c && (e.M = null);
|
|
2686
|
+
return 0;
|
|
2687
|
+
} catch (g) {
|
|
2688
|
+
if ("undefined" == typeof H || "ErrnoError" !== g.name) {
|
|
2689
|
+
throw g;
|
|
2690
|
+
}
|
|
2691
|
+
return g.l;
|
|
2692
|
+
}
|
|
2693
|
+
}, fd_write:function(a, b, c, d) {
|
|
2694
|
+
try {
|
|
2695
|
+
var e = U(a), g = yc(e, b, c);
|
|
2696
|
+
A[d >> 2] = g;
|
|
2697
|
+
return 0;
|
|
2698
|
+
} catch (k) {
|
|
2699
|
+
if ("undefined" == typeof H || "ErrnoError" !== k.name) {
|
|
2700
|
+
throw k;
|
|
2701
|
+
}
|
|
2702
|
+
return k.l;
|
|
2703
|
+
}
|
|
2704
|
+
}, invoke_ii:Hc, invoke_iii:Ic, invoke_iiii:Jc, invoke_iiiii:Kc, invoke_iiiiiii:Lc, invoke_iiiiiiiii:Mc, invoke_iiji:Nc, invoke_v:Oc, invoke_vi:Pc, invoke_vii:Qc, invoke_viii:Rc, invoke_viiii:Sc, invoke_viiiii:Tc, invoke_viiiiii:Uc}, D = function() {
|
|
2705
|
+
function a(d) {
|
|
2706
|
+
D = d.exports;
|
|
2707
|
+
va = D.memory;
|
|
2708
|
+
n(va, "memory not found in wasm exports");
|
|
2709
|
+
Ba();
|
|
2710
|
+
Ac = D.__indirect_function_table;
|
|
2711
|
+
n(Ac, "table not found in wasm exports");
|
|
2712
|
+
Ia.unshift(D.__wasm_call_ctors);
|
|
2713
|
+
Sa("wasm-instantiate");
|
|
2714
|
+
return D;
|
|
2715
|
+
}
|
|
2716
|
+
var b = {env:Vc, wasi_snapshot_preview1:Vc,};
|
|
2717
|
+
Ra("wasm-instantiate");
|
|
2718
|
+
var c = f;
|
|
2719
|
+
if (f.instantiateWasm) {
|
|
2720
|
+
try {
|
|
2721
|
+
return f.instantiateWasm(b, a);
|
|
2722
|
+
} catch (d) {
|
|
2723
|
+
p(`Module.instantiateWasm callback failed with error: ${d}`), ba(d);
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2726
|
+
Xa ||= f.locateFile ? Ta("gs.wasm") ? "gs.wasm" : f.locateFile ? f.locateFile("gs.wasm", l) : l + "gs.wasm" : (new URL("gs.wasm", import.meta.url)).href;
|
|
2727
|
+
ab(b, function(d) {
|
|
2728
|
+
n(f === c, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
|
|
2729
|
+
c = null;
|
|
2730
|
+
a(d.instance);
|
|
2731
|
+
}).catch(ba);
|
|
2732
|
+
return {};
|
|
2733
|
+
}(), Wc = f._main = C("__main_argc_argv", 2), Fc = C("free", 1), jc = C("fflush", 1), Z = C("setThrew", 2), nb = C("_emscripten_tempret_set", 1), Xc = () => (Xc = D.emscripten_stack_init)(), Da = () => (Da = D.emscripten_stack_get_end)(), W = a => (W = D._emscripten_stack_restore)(a), Dc = a => (Dc = D._emscripten_stack_alloc)(a), V = () => (V = D.emscripten_stack_get_current)(), Bc = C("__cxa_increment_exception_refcount", 1), Cc = C("__cxa_decrement_exception_refcount", 1), Ec = C("__get_exception_message",
|
|
2734
|
+
3), ob = C("__cxa_can_catch", 3), Gc = C("__cxa_is_pointer_type", 1);
|
|
2735
|
+
f.dynCall_jiji = C("dynCall_jiji", 4);
|
|
2736
|
+
var Yc = f.dynCall_iiii = C("dynCall_iiii", 4), Zc = f.dynCall_ii = C("dynCall_ii", 2);
|
|
2737
|
+
f.dynCall_iidiiii = C("dynCall_iidiiii", 7);
|
|
2738
|
+
var dynCall_vii = f.dynCall_vii = C("dynCall_vii", 3), dynCall_v = f.dynCall_v = C("dynCall_v", 1), dynCall_vi = f.dynCall_vi = C("dynCall_vi", 2), $c = f.dynCall_viiii = C("dynCall_viiii", 5), ad = f.dynCall_viiiiii = C("dynCall_viiiiii", 7), bd = f.dynCall_viiiii = C("dynCall_viiiii", 6), dynCall_iii = f.dynCall_iii = C("dynCall_iii", 3), cd = f.dynCall_viii = C("dynCall_viii", 4);
|
|
2739
|
+
f.dynCall_iiiiii = C("dynCall_iiiiii", 6);
|
|
2740
|
+
f.dynCall_iiiiiiii = C("dynCall_iiiiiiii", 8);
|
|
2741
|
+
var dd = f.dynCall_iiiii = C("dynCall_iiiii", 5), ed = f.dynCall_iiiiiii = C("dynCall_iiiiiii", 7), fd = f.dynCall_iiiiiiiii = C("dynCall_iiiiiiiii", 9);
|
|
2742
|
+
f.dynCall_iiiiiiiiiiii = C("dynCall_iiiiiiiiiiii", 12);
|
|
2743
|
+
f.dynCall_iiiiiiiiiii = C("dynCall_iiiiiiiiiii", 11);
|
|
2744
|
+
f.dynCall_iiiiiiiiiiiiiiiii = C("dynCall_iiiiiiiiiiiiiiiii", 17);
|
|
2745
|
+
f.dynCall_iiiiiiiiii = C("dynCall_iiiiiiiiii", 10);
|
|
2746
|
+
var gd = f.dynCall_iiji = C("dynCall_iiji", 4);
|
|
2747
|
+
f.dynCall_jii = C("dynCall_jii", 3);
|
|
2748
|
+
f.dynCall_iiiiiiijjii = C("dynCall_iiiiiiijjii", 11);
|
|
2749
|
+
f.dynCall_iiiiiiiiiiji = C("dynCall_iiiiiiiiiiji", 12);
|
|
2750
|
+
f.dynCall_iiiiiiiiiijj = C("dynCall_iiiiiiiiiijj", 12);
|
|
2751
|
+
f.dynCall_iiiiiij = C("dynCall_iiiiiij", 7);
|
|
2752
|
+
f.dynCall_iiiiiiiiiiiiii = C("dynCall_iiiiiiiiiiiiii", 14);
|
|
2753
|
+
f.dynCall_iddii = C("dynCall_iddii", 5);
|
|
2754
|
+
f.dynCall_fdi = C("dynCall_fdi", 3);
|
|
2755
|
+
f.dynCall_fdii = C("dynCall_fdii", 4);
|
|
2756
|
+
f.dynCall_viiiiiiiiijiiii = C("dynCall_viiiiiiiiijiiii", 15);
|
|
2757
|
+
f.dynCall_iiijiii = C("dynCall_iiijiii", 7);
|
|
2758
|
+
f.dynCall_iijiii = C("dynCall_iijiii", 6);
|
|
2759
|
+
f.dynCall_iij = C("dynCall_iij", 3);
|
|
2760
|
+
f.dynCall_iidiii = C("dynCall_iidiii", 6);
|
|
2761
|
+
f.dynCall_viiiiiii = C("dynCall_viiiiiii", 8);
|
|
2762
|
+
f.dynCall_idii = C("dynCall_idii", 4);
|
|
2763
|
+
f.dynCall_iiiiiiiiiiiiiii = C("dynCall_iiiiiiiiiiiiiii", 15);
|
|
2764
|
+
f.dynCall_viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijiiiiii = C("dynCall_viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijiiiiii", 40);
|
|
2765
|
+
f.dynCall_viiiiiiiiiiiiiijiiiii = C("dynCall_viiiiiiiiiiiiiijiiiii", 21);
|
|
2766
|
+
f.dynCall_viiiiiiiii = C("dynCall_viiiiiiiii", 10);
|
|
2767
|
+
f.dynCall_iji = C("dynCall_iji", 3);
|
|
2768
|
+
f.dynCall_jji = C("dynCall_jji", 3);
|
|
2769
|
+
f.dynCall_viij = C("dynCall_viij", 4);
|
|
2770
|
+
f.dynCall_ji = C("dynCall_ji", 2);
|
|
2771
|
+
f.dynCall_iiiiiiiiiiiii = C("dynCall_iiiiiiiiiiiii", 13);
|
|
2772
|
+
f.dynCall_id = C("dynCall_id", 2);
|
|
2773
|
+
f.dynCall_dd = C("dynCall_dd", 2);
|
|
2774
|
+
f.dynCall_viiiiiiii = C("dynCall_viiiiiiii", 9);
|
|
2775
|
+
f.dynCall_iijii = C("dynCall_iijii", 5);
|
|
2776
|
+
f.dynCall_iiiiiiiiiiiiiiii = C("dynCall_iiiiiiiiiiiiiiii", 16);
|
|
2777
|
+
f.dynCall_fdd = C("dynCall_fdd", 3);
|
|
2778
|
+
f.dynCall_iidd = C("dynCall_iidd", 4);
|
|
2779
|
+
f.dynCall_iiiij = C("dynCall_iiiij", 5);
|
|
2780
|
+
f.dynCall_iid = C("dynCall_iid", 3);
|
|
2781
|
+
f.dynCall_iiddi = C("dynCall_iiddi", 5);
|
|
2782
|
+
f.dynCall_iidddddd = C("dynCall_iidddddd", 8);
|
|
2783
|
+
f.dynCall_iiddddd = C("dynCall_iiddddd", 7);
|
|
2784
|
+
f.dynCall_iiiijj = C("dynCall_iiiijj", 6);
|
|
2785
|
+
f.dynCall_iiiiijiiii = C("dynCall_iiiiijiiii", 10);
|
|
2786
|
+
f.dynCall_iiiiiiiifi = C("dynCall_iiiiiiiifi", 10);
|
|
2787
|
+
f.dynCall_iiiijii = C("dynCall_iiiijii", 7);
|
|
2788
|
+
f.dynCall_iiiiijiiiii = C("dynCall_iiiiijiiiii", 11);
|
|
2789
|
+
f.dynCall_vijii = C("dynCall_vijii", 5);
|
|
2790
|
+
f.dynCall_diiid = C("dynCall_diiid", 5);
|
|
2791
|
+
f.dynCall_iidi = C("dynCall_iidi", 4);
|
|
2792
|
+
f.dynCall_iiiid = C("dynCall_iiiid", 5);
|
|
2793
|
+
f.dynCall_iiddddi = C("dynCall_iiddddi", 7);
|
|
2794
|
+
f.dynCall_iiddddddddi = C("dynCall_iiddddddddi", 11);
|
|
2795
|
+
f.dynCall_ddd = C("dynCall_ddd", 3);
|
|
2796
|
+
f.dynCall_iijj = C("dynCall_iijj", 4);
|
|
2797
|
+
f.dynCall_iiiji = C("dynCall_iiiji", 5);
|
|
2798
|
+
f.dynCall_iijjjjjj = C("dynCall_iijjjjjj", 8);
|
|
2799
|
+
f.dynCall_iiijii = C("dynCall_iiijii", 6);
|
|
2800
|
+
f.dynCall_iiiijiiii = C("dynCall_iiiijiiii", 9);
|
|
2801
|
+
function Hc(a, b) {
|
|
2802
|
+
var c = V();
|
|
2803
|
+
try {
|
|
2804
|
+
return Zc(a, b);
|
|
2805
|
+
} catch (d) {
|
|
2806
|
+
W(c);
|
|
2807
|
+
if (!(d instanceof E)) {
|
|
2808
|
+
throw d;
|
|
2809
|
+
}
|
|
2810
|
+
Z(1, 0);
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
function Oc(a) {
|
|
2814
|
+
var b = V();
|
|
2815
|
+
try {
|
|
2816
|
+
dynCall_v(a);
|
|
2817
|
+
} catch (c) {
|
|
2818
|
+
W(b);
|
|
2819
|
+
if (!(c instanceof E)) {
|
|
2820
|
+
throw c;
|
|
2821
|
+
}
|
|
2822
|
+
Z(1, 0);
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
function Qc(a, b, c) {
|
|
2826
|
+
var d = V();
|
|
2827
|
+
try {
|
|
2828
|
+
dynCall_vii(a, b, c);
|
|
2829
|
+
} catch (e) {
|
|
2830
|
+
W(d);
|
|
2831
|
+
if (!(e instanceof E)) {
|
|
2832
|
+
throw e;
|
|
2833
|
+
}
|
|
2834
|
+
Z(1, 0);
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
function Pc(a, b) {
|
|
2838
|
+
var c = V();
|
|
2839
|
+
try {
|
|
2840
|
+
dynCall_vi(a, b);
|
|
2841
|
+
} catch (d) {
|
|
2842
|
+
W(c);
|
|
2843
|
+
if (!(d instanceof E)) {
|
|
2844
|
+
throw d;
|
|
2845
|
+
}
|
|
2846
|
+
Z(1, 0);
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
function Sc(a, b, c, d, e) {
|
|
2850
|
+
var g = V();
|
|
2851
|
+
try {
|
|
2852
|
+
$c(a, b, c, d, e);
|
|
2853
|
+
} catch (k) {
|
|
2854
|
+
W(g);
|
|
2855
|
+
if (!(k instanceof E)) {
|
|
2856
|
+
throw k;
|
|
2857
|
+
}
|
|
2858
|
+
Z(1, 0);
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
function Ic(a, b, c) {
|
|
2862
|
+
var d = V();
|
|
2863
|
+
try {
|
|
2864
|
+
return dynCall_iii(a, b, c);
|
|
2865
|
+
} catch (e) {
|
|
2866
|
+
W(d);
|
|
2867
|
+
if (!(e instanceof E)) {
|
|
2868
|
+
throw e;
|
|
2869
|
+
}
|
|
2870
|
+
Z(1, 0);
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
function Rc(a, b, c, d) {
|
|
2874
|
+
var e = V();
|
|
2875
|
+
try {
|
|
2876
|
+
cd(a, b, c, d);
|
|
2877
|
+
} catch (g) {
|
|
2878
|
+
W(e);
|
|
2879
|
+
if (!(g instanceof E)) {
|
|
2880
|
+
throw g;
|
|
2881
|
+
}
|
|
2882
|
+
Z(1, 0);
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
function Jc(a, b, c, d) {
|
|
2886
|
+
var e = V();
|
|
2887
|
+
try {
|
|
2888
|
+
return Yc(a, b, c, d);
|
|
2889
|
+
} catch (g) {
|
|
2890
|
+
W(e);
|
|
2891
|
+
if (!(g instanceof E)) {
|
|
2892
|
+
throw g;
|
|
2893
|
+
}
|
|
2894
|
+
Z(1, 0);
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
function Kc(a, b, c, d, e) {
|
|
2898
|
+
var g = V();
|
|
2899
|
+
try {
|
|
2900
|
+
return dd(a, b, c, d, e);
|
|
2901
|
+
} catch (k) {
|
|
2902
|
+
W(g);
|
|
2903
|
+
if (!(k instanceof E)) {
|
|
2904
|
+
throw k;
|
|
2905
|
+
}
|
|
2906
|
+
Z(1, 0);
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
function Lc(a, b, c, d, e, g, k) {
|
|
2910
|
+
var m = V();
|
|
2911
|
+
try {
|
|
2912
|
+
return ed(a, b, c, d, e, g, k);
|
|
2913
|
+
} catch (r) {
|
|
2914
|
+
W(m);
|
|
2915
|
+
if (!(r instanceof E)) {
|
|
2916
|
+
throw r;
|
|
2917
|
+
}
|
|
2918
|
+
Z(1, 0);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
function Nc(a, b, c, d) {
|
|
2922
|
+
var e = V();
|
|
2923
|
+
try {
|
|
2924
|
+
return gd(a, b, c, d);
|
|
2925
|
+
} catch (g) {
|
|
2926
|
+
W(e);
|
|
2927
|
+
if (!(g instanceof E)) {
|
|
2928
|
+
throw g;
|
|
2929
|
+
}
|
|
2930
|
+
Z(1, 0);
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
function Tc(a, b, c, d, e, g) {
|
|
2934
|
+
var k = V();
|
|
2935
|
+
try {
|
|
2936
|
+
bd(a, b, c, d, e, g);
|
|
2937
|
+
} catch (m) {
|
|
2938
|
+
W(k);
|
|
2939
|
+
if (!(m instanceof E)) {
|
|
2940
|
+
throw m;
|
|
2941
|
+
}
|
|
2942
|
+
Z(1, 0);
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
function Uc(a, b, c, d, e, g, k) {
|
|
2946
|
+
var m = V();
|
|
2947
|
+
try {
|
|
2948
|
+
ad(a, b, c, d, e, g, k);
|
|
2949
|
+
} catch (r) {
|
|
2950
|
+
W(m);
|
|
2951
|
+
if (!(r instanceof E)) {
|
|
2952
|
+
throw r;
|
|
2953
|
+
}
|
|
2954
|
+
Z(1, 0);
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
function Mc(a, b, c, d, e, g, k, m, r) {
|
|
2958
|
+
var t = V();
|
|
2959
|
+
try {
|
|
2960
|
+
return fd(a, b, c, d, e, g, k, m, r);
|
|
2961
|
+
} catch (y) {
|
|
2962
|
+
W(t);
|
|
2963
|
+
if (!(y instanceof E)) {
|
|
2964
|
+
throw y;
|
|
2965
|
+
}
|
|
2966
|
+
Z(1, 0);
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
f.callMain = hd;
|
|
2970
|
+
f.ENV = sc;
|
|
2971
|
+
f.FS = H;
|
|
2972
|
+
f.NODEFS = O;
|
|
2973
|
+
f.WORKERFS = Q;
|
|
2974
|
+
"writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertI32PairToI53Checked convertU32PairToI53 getTempRet0 arraySum addDays inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr emscriptenLog readEmAsmArgs jstoi_q listenOnce autoResumeAudioContext dynCallLegacy getDynCaller dynCall runtimeKeepalivePush runtimeKeepalivePop callUserCallback maybeExit asmjsMangle HandleAllocator getNativeTypeSize STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS getCFunc ccall cwrap uleb128Encode sigToWasmTypes generateFuncType convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction reallyNegative unSign strLen reSign formatString intArrayToString AsciiToString UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 stringToNewUTF8 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 battery registerBatteryEventCallback setCanvasElementSize getCanvasElementSize jsStackTrace getCallstack convertPCtoSourceLocation checkWasiClock wasiRightsToMuslOFlags wasiOFlagsToMuslOFlags createDyncallWrapper safeSetTimeout setImmediateWrapped clearImmediateWrapped polyfillSetImmediate getPromise makePromise idsToPromises makePromiseCallback Browser_asyncPrepareDataCounter setMainLoop getSocketFromFD getSocketAddress FS_unlink FS_mkdirTree _setNetworkCallback heapObjectForWebGLType toTypedArrayIndex webgl_enable_ANGLE_instanced_arrays webgl_enable_OES_vertex_array_object webgl_enable_WEBGL_draw_buffers webgl_enable_WEBGL_multi_draw emscriptenWebGLGet computeUnpackAlignedImageSize colorChannelsInGlTextureFormat emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib __glGetActiveAttribOrUniform writeGLArray registerWebGlEventCallback runAndAbortIfError ALLOC_NORMAL ALLOC_STACK allocate writeStringToMemory writeAsciiToMemory setErrNo demangle stackTrace".split(" ").forEach(function(a) {
|
|
2975
|
+
"undefined" == typeof globalThis || Object.getOwnPropertyDescriptor(globalThis, a) || Object.defineProperty(globalThis, a, {configurable:!0, get() {
|
|
2976
|
+
var b = `\`${a}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`, c = a;
|
|
2977
|
+
c.startsWith("_") || (c = "$" + a);
|
|
2978
|
+
b += ` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${c}')`;
|
|
2979
|
+
bb(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
|
|
2980
|
+
db(b);
|
|
2981
|
+
}});
|
|
2982
|
+
eb(a);
|
|
2983
|
+
});
|
|
2984
|
+
"run addOnPreRun addOnInit addOnPreMain addOnExit addOnPostRun addRunDependency removeRunDependency out err abort wasmMemory wasmExports writeStackCookie checkStackCookie MAX_INT53 MIN_INT53 bigintToI53Checked stackSave stackRestore stackAlloc setTempRet0 ptrToString zeroMemory exitJS getHeapMax growMemory MONTH_DAYS_REGULAR MONTH_DAYS_LEAP MONTH_DAYS_REGULAR_CUMULATIVE MONTH_DAYS_LEAP_CUMULATIVE isLeapYear ydayFromDate ERRNO_CODES ERRNO_MESSAGES DNS Protocols Sockets initRandomFill randomFill timers warnOnce readEmAsmArgsArray jstoi_s getExecutableName handleException keepRuntimeAlive asyncLoad alignMemory mmapAlloc wasmTable noExitRuntime freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS UTF8Decoder UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 intArrayFromString stringToAscii UTF16Decoder stringToUTF8OnStack JSEvents specialHTMLTargets findCanvasEventTarget currentFullscreenStrategy restoreOldWindowedStyle UNWIND_CACHE ExitStatus getEnvStrings doReadv doWritev promiseMap uncaughtExceptionCount exceptionLast exceptionCaught ExceptionInfo findMatchingCatch getExceptionMessageCommon incrementExceptionRefcount decrementExceptionRefcount getExceptionMessage Browser getPreloadedImageData__data wget SYSCALLS preloadPlugins FS_createPreloadedFile FS_modeStringToFlags FS_getMode FS_stdin_getChar_buffer FS_stdin_getChar FS_createPath FS_createDevice FS_readFile FS_createDataFile FS_createLazyFile MEMFS TTY PIPEFS SOCKFS tempFixedLengthArray miniTempWebGLFloatBuffers miniTempWebGLIntBuffers GL AL GLUT EGL GLEW IDBStore SDL SDL_gfx allocateUTF8 allocateUTF8OnStack print printErr".split(" ").forEach(eb);
|
|
2985
|
+
var jd;
|
|
2986
|
+
Oa = function kd() {
|
|
2987
|
+
jd || ld();
|
|
2988
|
+
jd || (Oa = kd);
|
|
2989
|
+
};
|
|
2990
|
+
function hd(a = []) {
|
|
2991
|
+
n(0 == Ma, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
|
|
2992
|
+
n(0 == Ha.length, "cannot call main when preRun functions remain to be called");
|
|
2993
|
+
a.unshift(ka);
|
|
2994
|
+
var b = a.length, c = Dc(4 * (b + 1)), d = c;
|
|
2995
|
+
a.forEach(g => {
|
|
2996
|
+
var k = A, m = d >> 2, r = Bb(g) + 1, t = Dc(r);
|
|
2997
|
+
oc(g, t, r);
|
|
2998
|
+
k[m] = t;
|
|
2999
|
+
d += 4;
|
|
3000
|
+
});
|
|
3001
|
+
A[d >> 2] = 0;
|
|
3002
|
+
try {
|
|
3003
|
+
var e = Wc(b, c);
|
|
3004
|
+
wc(e, !0);
|
|
3005
|
+
return e;
|
|
3006
|
+
} catch (g) {
|
|
3007
|
+
return zc(g);
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
function ld() {
|
|
3011
|
+
var a = ja;
|
|
3012
|
+
if (!(0 < Ma)) {
|
|
3013
|
+
Xc();
|
|
3014
|
+
var b = Da();
|
|
3015
|
+
n(0 == (b & 3));
|
|
3016
|
+
0 == b && (b += 4);
|
|
3017
|
+
A[b >> 2] = 34821223;
|
|
3018
|
+
A[b + 4 >> 2] = 2310721022;
|
|
3019
|
+
A[0] = 1668509029;
|
|
3020
|
+
if (f.preRun) {
|
|
3021
|
+
for ("function" == typeof f.preRun && (f.preRun = [f.preRun]); f.preRun.length;) {
|
|
3022
|
+
b = f.preRun.shift(), Ha.unshift(b);
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
gb(Ha);
|
|
3026
|
+
0 < Ma || (jd || (jd = !0, f.calledRun = !0, wa || (n(!La), La = !0, Ca(), f.noFSInit || H.L.Z || H.L(), H.ha = !1, gb(Ia), Ca(), gb(Ja), aa(f), md && hd(a), Ca(), gb(Ka))), Ca());
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
function vc() {
|
|
3030
|
+
var a = ta, b = p, c = !1;
|
|
3031
|
+
ta = p = () => {
|
|
3032
|
+
c = !0;
|
|
3033
|
+
};
|
|
3034
|
+
try {
|
|
3035
|
+
jc(0), ["stdout", "stderr"].forEach(function(d) {
|
|
3036
|
+
(d = gc("/dev/" + d)) && Eb[d.object.rdev]?.output?.length && (c = !0);
|
|
3037
|
+
});
|
|
3038
|
+
} catch (d) {
|
|
3039
|
+
}
|
|
3040
|
+
ta = a;
|
|
3041
|
+
p = b;
|
|
3042
|
+
c && db("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.");
|
|
3043
|
+
}
|
|
3044
|
+
var md = !0;
|
|
3045
|
+
f.noInitialRun && (md = !1);
|
|
3046
|
+
ld();
|
|
3047
|
+
Object.assign(H, {init:H.L, mkdir:H.mkdir, mount:H.m, chdir:H.chdir, writeFile:H.writeFile, readFile:H.readFile, createLazyFile:H.Ia, setIgnorePermissions:function(a) {
|
|
3048
|
+
H.ha = a;
|
|
3049
|
+
},});
|
|
3050
|
+
f.version = "10.03.1";
|
|
3051
|
+
moduleRtn = ca;
|
|
3052
|
+
for (const a of Object.keys(f)) {
|
|
3053
|
+
a in moduleArg || Object.defineProperty(moduleArg, a, {configurable:!0, get() {
|
|
3054
|
+
h(`Access to module property ('${a}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`);
|
|
3055
|
+
}});
|
|
3056
|
+
}
|
|
3057
|
+
;
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
return moduleRtn;
|
|
3061
|
+
}
|
|
3062
|
+
);
|
|
3063
|
+
})();
|
|
3064
|
+
export default Module;
|
|
3065
|
+
export const version = "10.03.1";
|