@hpcc-js/wasm 1.17.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +392 -87
- package/bin/{cli.js → dot-wasm.mjs} +72 -74
- package/bin/dot-wasm.mjs.map +1 -0
- package/bin/sfx-wasm.mjs +44 -0
- package/bin/sfx-wasm.mjs.map +1 -0
- package/dist/base91lib.wasm +0 -0
- package/dist/expat.es6.js +7 -4
- package/dist/expat.es6.js.map +1 -1
- package/dist/expat.js +7 -4
- package/dist/expat.js.map +1 -1
- package/dist/expatlib.wasm +0 -0
- package/dist/extract.es6.js +680 -0
- package/dist/extract.es6.js.map +1 -0
- package/dist/extract.js +690 -0
- package/dist/extract.js.map +1 -0
- package/dist/graphviz.es6.js +21 -9
- package/dist/graphviz.es6.js.map +1 -1
- package/dist/graphviz.js +21 -9
- package/dist/graphviz.js.map +1 -1
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +887 -25
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +889 -24
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.es6.mjs +891 -17
- package/dist/index.node.es6.mjs.map +1 -1
- package/dist/index.node.js +893 -16
- package/dist/index.node.js.map +1 -1
- package/dist/zstd.es6.js +166 -0
- package/dist/zstd.es6.js.map +1 -0
- package/dist/zstd.js +176 -0
- package/dist/zstd.js.map +1 -0
- package/dist/zstdlib.wasm +0 -0
- package/package.json +32 -12
- package/types/__bin__/dot-wasm.d.mts +2 -0
- package/types/__bin__/dot-wasm.d.mts.map +1 -0
- package/types/__bin__/sfx-wasm.d.mts +2 -0
- package/types/__bin__/sfx-wasm.d.mts.map +1 -0
- package/types/__tests__/base91.d.ts +2 -0
- package/types/__tests__/base91.d.ts.map +1 -0
- package/types/__tests__/index.d.ts +2 -0
- package/types/__tests__/index.d.ts.map +1 -1
- package/types/__tests__/zstd.d.ts +2 -0
- package/types/__tests__/zstd.d.ts.map +1 -0
- package/types/base91.d.ts +9 -0
- package/types/base91.d.ts.map +1 -0
- package/types/extract.d.ts +2 -0
- package/types/extract.d.ts.map +1 -0
- package/types/fetch-browser.d.ts +0 -1
- package/types/fetch-browser.d.ts.map +1 -1
- package/types/fetch-node.d.ts.map +1 -1
- package/types/graphviz.d.ts.map +1 -1
- package/types/index-common.d.ts +7 -0
- package/types/index-common.d.ts.map +1 -0
- package/types/index-node.d.ts +1 -3
- package/types/index-node.d.ts.map +1 -1
- package/types/index.d.ts +1 -3
- package/types/index.d.ts.map +1 -1
- package/types/util.d.ts +0 -1
- package/types/util.d.ts.map +1 -1
- package/types/wasm-library.d.ts +22 -0
- package/types/wasm-library.d.ts.map +1 -0
- package/types/zstd.d.ts +12 -0
- package/types/zstd.d.ts.map +1 -0
|
@@ -1,74 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (argv.n
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
yargs.showHelp();
|
|
74
|
-
}
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { exit } from 'process';
|
|
3
|
+
import yargs from 'yargs';
|
|
4
|
+
import { hideBin } from 'yargs/helpers';
|
|
5
|
+
import { graphvizVersion, graphviz } from '../dist/index.node.es6.mjs';
|
|
6
|
+
|
|
7
|
+
const myYargs = yargs(hideBin(process.argv));
|
|
8
|
+
myYargs
|
|
9
|
+
.usage("Usage: dot-wasm [options] fileOrDot")
|
|
10
|
+
.demandCommand(0, 1)
|
|
11
|
+
.example("dot-wasm -K neato -T xdot ./input.dot", "Execute NEATO layout and outputs XDOT format.")
|
|
12
|
+
.alias("K", "layout")
|
|
13
|
+
.nargs("K", 1)
|
|
14
|
+
.describe("K", "Set layout engine (circo | dot | fdp | sfdp | neato | osage | patchwork | twopi). By default, dot is used.")
|
|
15
|
+
.alias("T", "format")
|
|
16
|
+
.nargs("T", 1)
|
|
17
|
+
.describe("T", "Set output language to one of the supported formats (svg | dot | json | dot_json | xdot_json | plain | plain-ext). By default, svg is produced.")
|
|
18
|
+
.alias("n", "neato-no-op")
|
|
19
|
+
.nargs("n", 1)
|
|
20
|
+
.describe("n", "Sets no-op flag in neato. \"-n 1\" assumes neato nodes have already been positioned and all nodes have a pos attribute giving the positions. It then performs an optional adjustment to remove node-node overlap, depending on the value of the overlap attribute, computes the edge layouts, depending on the value of the splines attribute, and emits the graph in the appropriate format.\n\"-n 2\" Use node positions as specified, with no adjustment to remove node-node overlaps, and use any edge layouts already specified by the pos attribute. neato computes an edge layout for any edge that does not have a pos attribute. As usual, edge layout is guided by the splines attribute.")
|
|
21
|
+
.alias("y", "invert-y")
|
|
22
|
+
.nargs("y", 0)
|
|
23
|
+
.describe("y", "By default, the coordinate system used in generic output formats, such as attributed dot, extended dot, plain and plain-ext, is the standard cartesian system with the origin in the lower left corner, and with increasing y coordinates as points move from bottom to top. If the -y flag is used, the coordinate system is inverted, so that increasing values of y correspond to movement from top to bottom.")
|
|
24
|
+
.nargs("v", 0)
|
|
25
|
+
.describe("v", "Echo GraphViz library version")
|
|
26
|
+
.help("h")
|
|
27
|
+
.alias("h", "help")
|
|
28
|
+
.epilog("https://github.com/hpcc-systems/hpcc-js-wasm");
|
|
29
|
+
const argv = await myYargs.argv;
|
|
30
|
+
try {
|
|
31
|
+
let dot;
|
|
32
|
+
if (fs.existsSync(argv._[0])) {
|
|
33
|
+
dot = fs.readFileSync(argv._[0], "utf8");
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
dot = argv._[0];
|
|
37
|
+
}
|
|
38
|
+
if (argv.v) {
|
|
39
|
+
graphvizVersion().then(version => {
|
|
40
|
+
console.log(`GraphViz version: ${version}`);
|
|
41
|
+
}).catch(e => {
|
|
42
|
+
console.error(e.message);
|
|
43
|
+
exit(1);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
else if (dot) {
|
|
47
|
+
if (argv.n && argv.layout.trim() !== "neato") {
|
|
48
|
+
throw new Error("-n option is only supported with -T neato");
|
|
49
|
+
}
|
|
50
|
+
const ext = {};
|
|
51
|
+
if (argv.n) {
|
|
52
|
+
ext.nop = parseInt(argv.n);
|
|
53
|
+
}
|
|
54
|
+
if (argv.y) {
|
|
55
|
+
ext.yInvert = true;
|
|
56
|
+
}
|
|
57
|
+
graphviz.layout(dot, (argv.format?.trim() ?? "svg"), (argv.layout?.trim() ?? "dot"), ext).then(response => {
|
|
58
|
+
console.log(response);
|
|
59
|
+
}).catch(e => {
|
|
60
|
+
console.error(e.message);
|
|
61
|
+
exit(1);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
throw new Error("'fileOrDot' is required.");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
console.error(`Error: ${e?.message}\n`);
|
|
70
|
+
myYargs.showHelp();
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=dot-wasm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot-wasm.mjs","sources":["../src/__bin__/dot-wasm.mts"],"sourcesContent":["import fs from \"fs\";\r\nimport { exit } from \"process\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from 'yargs/helpers'\r\nimport { graphviz, graphvizVersion, Ext, Format, Engine } from \"../index-node\";\r\n\r\nconst myYargs = yargs(hideBin(process.argv)) as yargs.Argv<{ vx: boolean, layout: Engine, format: Format, n: string }>;\r\nmyYargs\r\n .usage(\"Usage: dot-wasm [options] fileOrDot\")\r\n .demandCommand(0, 1)\r\n .example(\"dot-wasm -K neato -T xdot ./input.dot\", \"Execute NEATO layout and outputs XDOT format.\")\r\n .alias(\"K\", \"layout\")\r\n .nargs(\"K\", 1)\r\n .describe(\"K\", \"Set layout engine (circo | dot | fdp | sfdp | neato | osage | patchwork | twopi). By default, dot is used.\")\r\n .alias(\"T\", \"format\")\r\n .nargs(\"T\", 1)\r\n .describe(\"T\", \"Set output language to one of the supported formats (svg | dot | json | dot_json | xdot_json | plain | plain-ext). By default, svg is produced.\")\r\n .alias(\"n\", \"neato-no-op\")\r\n .nargs(\"n\", 1)\r\n .describe(\"n\", \"Sets no-op flag in neato. \\\"-n 1\\\" assumes neato nodes have already been positioned and all nodes have a pos attribute giving the positions. It then performs an optional adjustment to remove node-node overlap, depending on the value of the overlap attribute, computes the edge layouts, depending on the value of the splines attribute, and emits the graph in the appropriate format.\\n\\\"-n 2\\\" Use node positions as specified, with no adjustment to remove node-node overlaps, and use any edge layouts already specified by the pos attribute. neato computes an edge layout for any edge that does not have a pos attribute. As usual, edge layout is guided by the splines attribute.\")\r\n .alias(\"y\", \"invert-y\")\r\n .nargs(\"y\", 0)\r\n .describe(\"y\", \"By default, the coordinate system used in generic output formats, such as attributed dot, extended dot, plain and plain-ext, is the standard cartesian system with the origin in the lower left corner, and with increasing y coordinates as points move from bottom to top. If the -y flag is used, the coordinate system is inverted, so that increasing values of y correspond to movement from top to bottom.\")\r\n .nargs(\"v\", 0)\r\n .describe(\"v\", \"Echo GraphViz library version\")\r\n .help(\"h\")\r\n .alias(\"h\", \"help\")\r\n .epilog(\"https://github.com/hpcc-systems/hpcc-js-wasm\")\r\n ;\r\n\r\nconst argv = await myYargs.argv;\r\n\r\ntry {\r\n let dot;\r\n if (fs.existsSync(argv._[0] as string)) {\r\n dot = fs.readFileSync(argv._[0], \"utf8\");\r\n } else {\r\n dot = argv._[0] as string;\r\n }\r\n\r\n if (argv.v) {\r\n graphvizVersion().then(version => {\r\n console.log(`GraphViz version: ${version}`);\r\n }).catch(e => {\r\n console.error(e.message);\r\n exit(1);\r\n })\r\n } else if (dot) {\r\n\r\n if (argv.n && argv.layout.trim() !== \"neato\") {\r\n throw new Error(\"-n option is only supported with -T neato\");\r\n }\r\n\r\n const ext: Ext = {\r\n };\r\n if (argv.n) {\r\n ext.nop = parseInt(argv.n);\r\n }\r\n if (argv.y) {\r\n ext.yInvert = true;\r\n }\r\n\r\n graphviz.layout(dot, (argv.format?.trim() ?? \"svg\") as Format, (argv.layout?.trim() ?? \"dot\") as Engine, ext).then(response => {\r\n console.log(response);\r\n }).catch(e => {\r\n console.error(e.message);\r\n exit(1);\r\n });\r\n } else {\r\n throw new Error(\"'fileOrDot' is required.\")\r\n }\r\n} catch (e: any) {\r\n console.error(`Error: ${e?.message}\\n`);\r\n myYargs.showHelp();\r\n}\r\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAA2E,CAAC;AACvH,OAAO;KACF,KAAK,CAAC,qCAAqC,CAAC;AAC5C,KAAA,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;AACnB,KAAA,OAAO,CAAC,uCAAuC,EAAE,+CAA+C,CAAC;AACjG,KAAA,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC;AACpB,KAAA,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACb,KAAA,QAAQ,CAAC,GAAG,EAAE,4GAA4G,CAAC;AAC3H,KAAA,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC;AACpB,KAAA,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACb,KAAA,QAAQ,CAAC,GAAG,EAAE,iJAAiJ,CAAC;AAChK,KAAA,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC;AACzB,KAAA,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACb,KAAA,QAAQ,CAAC,GAAG,EAAE,sqBAAsqB,CAAC;AACrrB,KAAA,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC;AACtB,KAAA,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACb,KAAA,QAAQ,CAAC,GAAG,EAAE,mZAAmZ,CAAC;AACla,KAAA,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACb,KAAA,QAAQ,CAAC,GAAG,EAAE,+BAA+B,CAAC;KAC9C,IAAI,CAAC,GAAG,CAAC;AACT,KAAA,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;KAClB,MAAM,CAAC,8CAA8C,CAAC,CACtD;AAEL,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;AAEhC,IAAI;AACA,IAAA,IAAI,GAAG,CAAC;IACR,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,EAAE;AACpC,QAAA,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAC5C,KAAA;AAAM,SAAA;AACH,QAAA,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;AAC7B,KAAA;IAED,IAAI,IAAI,CAAC,CAAC,EAAE;AACR,QAAA,eAAe,EAAE,CAAC,IAAI,CAAC,OAAO,IAAG;AAC7B,YAAA,OAAO,CAAC,GAAG,CAAC,sBAAsB,OAAO,CAAA,CAAE,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAG;AACT,YAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACzB,IAAI,CAAC,CAAC,CAAC,CAAC;AACZ,SAAC,CAAC,CAAA;AACL,KAAA;AAAM,SAAA,IAAI,GAAG,EAAE;AAEZ,QAAA,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,OAAO,EAAE;AAC1C,YAAA,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;AAChE,SAAA;QAED,MAAM,GAAG,GAAQ,EAChB,CAAC;QACF,IAAI,IAAI,CAAC,CAAC,EAAE;YACR,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9B,SAAA;QACD,IAAI,IAAI,CAAC,CAAC,EAAE;AACR,YAAA,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,SAAA;AAED,QAAA,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,IAAc,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,GAAa,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAG;AAC1H,YAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAG;AACT,YAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACzB,IAAI,CAAC,CAAC,CAAC,CAAC;AACZ,SAAC,CAAC,CAAC;AACN,KAAA;AAAM,SAAA;AACH,QAAA,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;AAC9C,KAAA;AACJ,CAAA;AAAC,OAAO,CAAM,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,CAAA,QAAA,EAAW,CAAC,EAAE,OAAO,CAAI,EAAA,CAAA,CAAC,CAAC;IACzC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACtB"}
|
package/bin/sfx-wasm.mjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import yargs from 'yargs';
|
|
3
|
+
import { hideBin } from 'yargs/helpers';
|
|
4
|
+
import { Zstd, Base91, extract } from '../dist/index.node.es6.mjs';
|
|
5
|
+
|
|
6
|
+
const myYargs = yargs(hideBin(process.argv));
|
|
7
|
+
myYargs
|
|
8
|
+
.usage("Usage: sfx-wasm [options] filePath")
|
|
9
|
+
.demandCommand(0, 1)
|
|
10
|
+
.example("sfx-wasm ./input.wasm", "Wrap file in a self extracting JavaScript file.")
|
|
11
|
+
.help("h")
|
|
12
|
+
.alias("h", "help")
|
|
13
|
+
.epilog("https://github.com/hpcc-systems/hpcc-js-wasm");
|
|
14
|
+
const argv = await myYargs.argv;
|
|
15
|
+
try {
|
|
16
|
+
const wasmPath = argv._[0];
|
|
17
|
+
let wasmContent;
|
|
18
|
+
if (fs.existsSync(wasmPath)) {
|
|
19
|
+
wasmContent = fs.readFileSync(wasmPath);
|
|
20
|
+
}
|
|
21
|
+
if (wasmContent) {
|
|
22
|
+
const zstd = await Zstd.load();
|
|
23
|
+
const compressed = zstd.compress(new Uint8Array(wasmContent));
|
|
24
|
+
const base91 = await Base91.load();
|
|
25
|
+
const str = base91.encode(compressed);
|
|
26
|
+
console.log(`\
|
|
27
|
+
import { extract } from "./extract";
|
|
28
|
+
const blobStr = '${str}';
|
|
29
|
+
export const wasmBinary = extract(blobStr);
|
|
30
|
+
`);
|
|
31
|
+
const test = extract(str);
|
|
32
|
+
if (test.length !== wasmContent.length) {
|
|
33
|
+
throw new Error("Oh oh");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throw new Error("'filePath' is required.");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
console.error(`Error: ${e?.message}\n`);
|
|
42
|
+
myYargs.showHelp();
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=sfx-wasm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sfx-wasm.mjs","sources":["../src/__bin__/sfx-wasm.mts"],"sourcesContent":["import fs from \"fs\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from 'yargs/helpers'\r\nimport { Zstd, Base91, extract } from \"../index-node\";\r\n\r\nconst myYargs = yargs(hideBin(process.argv)) as yargs.Argv<{}>;\r\nmyYargs\r\n .usage(\"Usage: sfx-wasm [options] filePath\")\r\n .demandCommand(0, 1)\r\n .example(\"sfx-wasm ./input.wasm\", \"Wrap file in a self extracting JavaScript file.\")\r\n .help(\"h\")\r\n .alias(\"h\", \"help\")\r\n .epilog(\"https://github.com/hpcc-systems/hpcc-js-wasm\")\r\n ;\r\n\r\nconst argv = await myYargs.argv;\r\n\r\ntry {\r\n const wasmPath = argv._[0] as string;\r\n let wasmContent;\r\n if (fs.existsSync(wasmPath)) {\r\n wasmContent = fs.readFileSync(wasmPath);\r\n }\r\n if (wasmContent) {\r\n const zstd = await Zstd.load();\r\n const compressed = zstd.compress(new Uint8Array(wasmContent))\r\n const base91 = await Base91.load();\r\n const str = base91.encode(compressed);\r\n console.log(`\\\r\nimport { extract } from \"./extract\";\r\nconst blobStr = '${str}';\r\nexport const wasmBinary = extract(blobStr);\r\n `);\r\n const test = extract(str);\r\n if (test.length !== wasmContent.length) {\r\n throw new Error(\"Oh oh\");\r\n }\r\n } else {\r\n throw new Error(\"'filePath' is required.\")\r\n }\r\n} catch (e: any) {\r\n console.error(`Error: ${e?.message}\\n`);\r\n myYargs.showHelp();\r\n}\r\n"],"names":[],"mappings":";;;;;AAKA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAmB,CAAC;AAC/D,OAAO;KACF,KAAK,CAAC,oCAAoC,CAAC;AAC3C,KAAA,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;AACnB,KAAA,OAAO,CAAC,uBAAuB,EAAE,iDAAiD,CAAC;KACnF,IAAI,CAAC,GAAG,CAAC;AACT,KAAA,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;KAClB,MAAM,CAAC,8CAA8C,CAAC,CACtD;AAEL,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;AAEhC,IAAI;IACA,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;AACrC,IAAA,IAAI,WAAW,CAAC;AAChB,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACzB,QAAA,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC3C,KAAA;AACD,IAAA,IAAI,WAAW,EAAE;AACb,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AAC/B,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC,CAAA;AAC7D,QAAA,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,CAAA;;mBAED,GAAG,CAAA;;AAEb,QAAA,CAAA,CAAC,CAAC;AACH,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1B,QAAA,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE;AACpC,YAAA,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAA;AACJ,KAAA;AAAM,SAAA;AACH,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;AAC7C,KAAA;AACJ,CAAA;AAAC,OAAO,CAAM,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,CAAA,QAAA,EAAW,CAAC,EAAE,OAAO,CAAI,EAAA,CAAA,CAAC,CAAC;IACzC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACtB"}
|
|
Binary file
|
package/dist/expat.es6.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var cpp = (() => {
|
|
2
|
-
|
|
2
|
+
typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
|
3
3
|
|
|
4
4
|
return (
|
|
5
5
|
function(cpp) {
|
|
6
6
|
cpp = cpp || {};
|
|
7
7
|
|
|
8
|
-
var Module=typeof cpp!="undefined"?cpp:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject;});var moduleOverrides=Object.assign({},Module);var thisProgram="./this.program";var ENVIRONMENT_IS_WEB=true;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readBinary;{if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src;}if(_scriptDir){scriptDirectory=_scriptDir;}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1);}else {scriptDirectory="";}}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected");}var wasmMemory;var ABORT=false;function assert(condition,text){if(!condition){abort(text);}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2;}else {u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63;}if(u0<65536){str+=String.fromCharCode(u0);}else {var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023;}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;}else {if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;}}heap[outIdx]=0;return outIdx-startIdx}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++;}else if(c<=2047){len+=2;}else if(c>=55296&&c<=57343){len+=4;++i;}else {len+=3;}}return len}var buffer,HEAP8,HEAPU8,HEAP32,HEAPU32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf);}Module["INITIAL_MEMORY"]||16777216;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function initRuntime(){callRuntimeCallbacks(__ATINIT__);}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}function addOnInit(cb){__ATINIT__.unshift(cb);}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}function abort(what){{if(Module["onAbort"]){Module["onAbort"](what);}}what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;wasmBinaryFile="expatlib.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile);}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary);throw "both async and sync fetching of the wasm failed"}catch(err){abort(err);}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB)){if(typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw "failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["m"];updateGlobalBufferAndViews(wasmMemory.buffer);Module["asm"]["G"];addOnInit(Module["asm"]["n"]);removeRunDependency();}addRunDependency();function receiveInstantiationResult(result){receiveInstance(result["instance"]);}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason);})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else {return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e);}}instantiateAsync().catch(readyPromiseReject);return {}}var ASM_CONSTS={11554:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("startElement"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";self["startElement"]();},11772:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("endElement"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";self["endElement"]();},11984:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("characterData"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";self["characterData"]();}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module);}}function ___syscall_openat(dirfd,path,flags,varargs){}function _abort(){abort("");}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){buf+=ch!=105&buf;readAsmConstArgsArray.push(ch==105?HEAP32[buf]:HEAPF64[buf++>>1]);++buf;}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);return ASM_CONSTS[code].apply(null,args)}function _emscripten_date_now(){return Date.now()}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num);}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x];}var strings=[];for(var x in env){strings.push(x+"="+env[x]);}getEnvStrings.strings=strings;}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i);}if(!dontAddNull)HEAP8[buffer>>0]=0;}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1;});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1;});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){return 52}function _fd_read(fd,iov,iovcnt,pnum){return 52}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){return 70}var printCharBuffers=[null,[],[]];function printChar(stream,curr){var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0;}else {buffer.push(curr);}}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j]);}num+=len;}HEAPU32[pnum>>2]=num;return 0}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"g":___syscall_openat,"c":_abort,"a":_emscripten_asm_const_int,"j":_emscripten_date_now,"k":_emscripten_memcpy_big,"e":_emscripten_resize_heap,"h":_environ_get,"i":_environ_sizes_get,"d":_fd_close,"f":_fd_read,"l":_fd_seek,"b":_fd_write};createWasm();Module["___wasm_call_ctors"]=function(){return (Module["___wasm_call_ctors"]=Module["asm"]["n"]).apply(null,arguments)};var _emscripten_bind_CExpat_CExpat_0=Module["_emscripten_bind_CExpat_CExpat_0"]=function(){return (_emscripten_bind_CExpat_CExpat_0=Module["_emscripten_bind_CExpat_CExpat_0"]=Module["asm"]["o"]).apply(null,arguments)};var _emscripten_bind_CExpat_version_0=Module["_emscripten_bind_CExpat_version_0"]=function(){return (_emscripten_bind_CExpat_version_0=Module["_emscripten_bind_CExpat_version_0"]=Module["asm"]["p"]).apply(null,arguments)};var _emscripten_bind_CExpat_create_0=Module["_emscripten_bind_CExpat_create_0"]=function(){return (_emscripten_bind_CExpat_create_0=Module["_emscripten_bind_CExpat_create_0"]=Module["asm"]["q"]).apply(null,arguments)};var _emscripten_bind_CExpat_destroy_0=Module["_emscripten_bind_CExpat_destroy_0"]=function(){return (_emscripten_bind_CExpat_destroy_0=Module["_emscripten_bind_CExpat_destroy_0"]=Module["asm"]["r"]).apply(null,arguments)};var _emscripten_bind_CExpat_parse_1=Module["_emscripten_bind_CExpat_parse_1"]=function(){return (_emscripten_bind_CExpat_parse_1=Module["_emscripten_bind_CExpat_parse_1"]=Module["asm"]["s"]).apply(null,arguments)};var _emscripten_bind_CExpat_tag_0=Module["_emscripten_bind_CExpat_tag_0"]=function(){return (_emscripten_bind_CExpat_tag_0=Module["_emscripten_bind_CExpat_tag_0"]=Module["asm"]["t"]).apply(null,arguments)};var _emscripten_bind_CExpat_attrs_0=Module["_emscripten_bind_CExpat_attrs_0"]=function(){return (_emscripten_bind_CExpat_attrs_0=Module["_emscripten_bind_CExpat_attrs_0"]=Module["asm"]["u"]).apply(null,arguments)};var _emscripten_bind_CExpat_content_0=Module["_emscripten_bind_CExpat_content_0"]=function(){return (_emscripten_bind_CExpat_content_0=Module["_emscripten_bind_CExpat_content_0"]=Module["asm"]["v"]).apply(null,arguments)};var _emscripten_bind_CExpat_startElement_0=Module["_emscripten_bind_CExpat_startElement_0"]=function(){return (_emscripten_bind_CExpat_startElement_0=Module["_emscripten_bind_CExpat_startElement_0"]=Module["asm"]["w"]).apply(null,arguments)};var _emscripten_bind_CExpat_endElement_0=Module["_emscripten_bind_CExpat_endElement_0"]=function(){return (_emscripten_bind_CExpat_endElement_0=Module["_emscripten_bind_CExpat_endElement_0"]=Module["asm"]["x"]).apply(null,arguments)};var _emscripten_bind_CExpat_characterData_0=Module["_emscripten_bind_CExpat_characterData_0"]=function(){return (_emscripten_bind_CExpat_characterData_0=Module["_emscripten_bind_CExpat_characterData_0"]=Module["asm"]["y"]).apply(null,arguments)};var _emscripten_bind_CExpat___destroy___0=Module["_emscripten_bind_CExpat___destroy___0"]=function(){return (_emscripten_bind_CExpat___destroy___0=Module["_emscripten_bind_CExpat___destroy___0"]=Module["asm"]["z"]).apply(null,arguments)};var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=function(){return (_emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=Module["asm"]["A"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_CExpatJS_0=Module["_emscripten_bind_CExpatJS_CExpatJS_0"]=function(){return (_emscripten_bind_CExpatJS_CExpatJS_0=Module["_emscripten_bind_CExpatJS_CExpatJS_0"]=Module["asm"]["B"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_startElement_0=Module["_emscripten_bind_CExpatJS_startElement_0"]=function(){return (_emscripten_bind_CExpatJS_startElement_0=Module["_emscripten_bind_CExpatJS_startElement_0"]=Module["asm"]["C"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_endElement_0=Module["_emscripten_bind_CExpatJS_endElement_0"]=function(){return (_emscripten_bind_CExpatJS_endElement_0=Module["_emscripten_bind_CExpatJS_endElement_0"]=Module["asm"]["D"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_characterData_0=Module["_emscripten_bind_CExpatJS_characterData_0"]=function(){return (_emscripten_bind_CExpatJS_characterData_0=Module["_emscripten_bind_CExpatJS_characterData_0"]=Module["asm"]["E"]).apply(null,arguments)};var _emscripten_bind_CExpatJS___destroy___0=Module["_emscripten_bind_CExpatJS___destroy___0"]=function(){return (_emscripten_bind_CExpatJS___destroy___0=Module["_emscripten_bind_CExpatJS___destroy___0"]=Module["asm"]["F"]).apply(null,arguments)};Module["_malloc"]=function(){return (Module["_malloc"]=Module["asm"]["H"]).apply(null,arguments)};Module["___start_em_js"]=11456;Module["___stop_em_js"]=11554;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller;};function run(args){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else {doRun();}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return (__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw "Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr];}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i]);}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0;}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer);}ensureCache.pos=0;},alloc:function(array,view){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret);}else {ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len;}return ret},copy:function(array,view,offset){offset>>>=0;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offset>>>=1;break;case 4:offset>>>=2;break;case 8:offset>>>=3;break}for(var i=0;i<array.length;i++){view[offset+i]=array[i];}}};function ensureString(value){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function CExpat(){this.ptr=_emscripten_bind_CExpat_CExpat_0();getCache(CExpat)[this.ptr]=this;}CExpat.prototype=Object.create(WrapperObject.prototype);CExpat.prototype.constructor=CExpat;CExpat.prototype.__class__=CExpat;CExpat.__cache__={};Module["CExpat"]=CExpat;CExpat.prototype["version"]=CExpat.prototype.version=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_version_0(self))};CExpat.prototype["create"]=CExpat.prototype.create=function(){var self=this.ptr;return !!_emscripten_bind_CExpat_create_0(self)};CExpat.prototype["destroy"]=CExpat.prototype.destroy=function(){var self=this.ptr;_emscripten_bind_CExpat_destroy_0(self);};CExpat.prototype["parse"]=CExpat.prototype.parse=function(xml){var self=this.ptr;ensureCache.prepare();if(xml&&typeof xml==="object")xml=xml.ptr;else xml=ensureString(xml);return !!_emscripten_bind_CExpat_parse_1(self,xml)};CExpat.prototype["tag"]=CExpat.prototype.tag=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_tag_0(self))};CExpat.prototype["attrs"]=CExpat.prototype.attrs=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_attrs_0(self))};CExpat.prototype["content"]=CExpat.prototype.content=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_content_0(self))};CExpat.prototype["startElement"]=CExpat.prototype.startElement=function(){var self=this.ptr;_emscripten_bind_CExpat_startElement_0(self);};CExpat.prototype["endElement"]=CExpat.prototype.endElement=function(){var self=this.ptr;_emscripten_bind_CExpat_endElement_0(self);};CExpat.prototype["characterData"]=CExpat.prototype.characterData=function(){var self=this.ptr;_emscripten_bind_CExpat_characterData_0(self);};CExpat.prototype["__destroy__"]=CExpat.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_CExpat___destroy___0(self);};function VoidPtr(){throw "cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self);};function CExpatJS(){this.ptr=_emscripten_bind_CExpatJS_CExpatJS_0();getCache(CExpatJS)[this.ptr]=this;}CExpatJS.prototype=Object.create(CExpat.prototype);CExpatJS.prototype.constructor=CExpatJS;CExpatJS.prototype.__class__=CExpatJS;CExpatJS.__cache__={};Module["CExpatJS"]=CExpatJS;CExpatJS.prototype["startElement"]=CExpatJS.prototype.startElement=function(){var self=this.ptr;_emscripten_bind_CExpatJS_startElement_0(self);};CExpatJS.prototype["endElement"]=CExpatJS.prototype.endElement=function(){var self=this.ptr;_emscripten_bind_CExpatJS_endElement_0(self);};CExpatJS.prototype["characterData"]=CExpatJS.prototype.characterData=function(){var self=this.ptr;_emscripten_bind_CExpatJS_characterData_0(self);};CExpatJS.prototype["__destroy__"]=CExpatJS.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_CExpatJS___destroy___0(self);};
|
|
8
|
+
var Module=typeof cpp!="undefined"?cpp:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject;});var moduleOverrides=Object.assign({},Module);var thisProgram="./this.program";var ENVIRONMENT_IS_WORKER=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readBinary;var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected");}var wasmMemory;var ABORT=false;function assert(condition,text){if(!condition){abort(text);}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2;}else {u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63;}if(u0<65536){str+=String.fromCharCode(u0);}else {var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023;}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;}else {if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;}}heap[outIdx]=0;return outIdx-startIdx}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++;}else if(c<=2047){len+=2;}else if(c>=55296&&c<=57343){len+=4;++i;}else {len+=3;}}return len}var buffer,HEAP8,HEAPU8,HEAP32,HEAPU32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf);}Module["INITIAL_MEMORY"]||16777216;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function initRuntime(){callRuntimeCallbacks(__ATINIT__);}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}function addOnInit(cb){__ATINIT__.unshift(cb);}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}function abort(what){{if(Module["onAbort"]){Module["onAbort"](what);}}what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="expatlib.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile);}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary);throw "both async and sync fetching of the wasm failed"}catch(err){abort(err);}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw "failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["m"];updateGlobalBufferAndViews(wasmMemory.buffer);Module["asm"]["G"];addOnInit(Module["asm"]["n"]);removeRunDependency();}addRunDependency();function receiveInstantiationResult(result){receiveInstance(result["instance"]);}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason);})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else {return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e);}}instantiateAsync().catch(readyPromiseReject);return {}}var ASM_CONSTS={11554:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("startElement"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";self["startElement"]();},11772:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("endElement"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";self["endElement"]();},11984:$0=>{var self=Module["getCache"](Module["CExpatJS"])[$0];if(!self.hasOwnProperty("characterData"))throw "a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";self["characterData"]();}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module);}}function ___syscall_openat(dirfd,path,flags,varargs){}function _abort(){abort("");}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){buf+=ch!=105&buf;readAsmConstArgsArray.push(ch==105?HEAP32[buf]:HEAPF64[buf++>>1]);++buf;}return readAsmConstArgsArray}function _emscripten_asm_const_int(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);return ASM_CONSTS[code].apply(null,args)}function _emscripten_date_now(){return Date.now()}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num);}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x];}var strings=[];for(var x in env){strings.push(x+"="+env[x]);}getEnvStrings.strings=strings;}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i);}if(!dontAddNull)HEAP8[buffer>>0]=0;}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1;});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1;});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){return 52}function _fd_read(fd,iov,iovcnt,pnum){return 52}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){return 70}var printCharBuffers=[null,[],[]];function printChar(stream,curr){var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0;}else {buffer.push(curr);}}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j]);}num+=len;}HEAPU32[pnum>>2]=num;return 0}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"g":___syscall_openat,"c":_abort,"a":_emscripten_asm_const_int,"j":_emscripten_date_now,"k":_emscripten_memcpy_big,"e":_emscripten_resize_heap,"h":_environ_get,"i":_environ_sizes_get,"d":_fd_close,"f":_fd_read,"l":_fd_seek,"b":_fd_write};createWasm();Module["___wasm_call_ctors"]=function(){return (Module["___wasm_call_ctors"]=Module["asm"]["n"]).apply(null,arguments)};var _emscripten_bind_CExpat_CExpat_0=Module["_emscripten_bind_CExpat_CExpat_0"]=function(){return (_emscripten_bind_CExpat_CExpat_0=Module["_emscripten_bind_CExpat_CExpat_0"]=Module["asm"]["o"]).apply(null,arguments)};var _emscripten_bind_CExpat_version_0=Module["_emscripten_bind_CExpat_version_0"]=function(){return (_emscripten_bind_CExpat_version_0=Module["_emscripten_bind_CExpat_version_0"]=Module["asm"]["p"]).apply(null,arguments)};var _emscripten_bind_CExpat_create_0=Module["_emscripten_bind_CExpat_create_0"]=function(){return (_emscripten_bind_CExpat_create_0=Module["_emscripten_bind_CExpat_create_0"]=Module["asm"]["q"]).apply(null,arguments)};var _emscripten_bind_CExpat_destroy_0=Module["_emscripten_bind_CExpat_destroy_0"]=function(){return (_emscripten_bind_CExpat_destroy_0=Module["_emscripten_bind_CExpat_destroy_0"]=Module["asm"]["r"]).apply(null,arguments)};var _emscripten_bind_CExpat_parse_1=Module["_emscripten_bind_CExpat_parse_1"]=function(){return (_emscripten_bind_CExpat_parse_1=Module["_emscripten_bind_CExpat_parse_1"]=Module["asm"]["s"]).apply(null,arguments)};var _emscripten_bind_CExpat_tag_0=Module["_emscripten_bind_CExpat_tag_0"]=function(){return (_emscripten_bind_CExpat_tag_0=Module["_emscripten_bind_CExpat_tag_0"]=Module["asm"]["t"]).apply(null,arguments)};var _emscripten_bind_CExpat_attrs_0=Module["_emscripten_bind_CExpat_attrs_0"]=function(){return (_emscripten_bind_CExpat_attrs_0=Module["_emscripten_bind_CExpat_attrs_0"]=Module["asm"]["u"]).apply(null,arguments)};var _emscripten_bind_CExpat_content_0=Module["_emscripten_bind_CExpat_content_0"]=function(){return (_emscripten_bind_CExpat_content_0=Module["_emscripten_bind_CExpat_content_0"]=Module["asm"]["v"]).apply(null,arguments)};var _emscripten_bind_CExpat_startElement_0=Module["_emscripten_bind_CExpat_startElement_0"]=function(){return (_emscripten_bind_CExpat_startElement_0=Module["_emscripten_bind_CExpat_startElement_0"]=Module["asm"]["w"]).apply(null,arguments)};var _emscripten_bind_CExpat_endElement_0=Module["_emscripten_bind_CExpat_endElement_0"]=function(){return (_emscripten_bind_CExpat_endElement_0=Module["_emscripten_bind_CExpat_endElement_0"]=Module["asm"]["x"]).apply(null,arguments)};var _emscripten_bind_CExpat_characterData_0=Module["_emscripten_bind_CExpat_characterData_0"]=function(){return (_emscripten_bind_CExpat_characterData_0=Module["_emscripten_bind_CExpat_characterData_0"]=Module["asm"]["y"]).apply(null,arguments)};var _emscripten_bind_CExpat___destroy___0=Module["_emscripten_bind_CExpat___destroy___0"]=function(){return (_emscripten_bind_CExpat___destroy___0=Module["_emscripten_bind_CExpat___destroy___0"]=Module["asm"]["z"]).apply(null,arguments)};var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=function(){return (_emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=Module["asm"]["A"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_CExpatJS_0=Module["_emscripten_bind_CExpatJS_CExpatJS_0"]=function(){return (_emscripten_bind_CExpatJS_CExpatJS_0=Module["_emscripten_bind_CExpatJS_CExpatJS_0"]=Module["asm"]["B"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_startElement_0=Module["_emscripten_bind_CExpatJS_startElement_0"]=function(){return (_emscripten_bind_CExpatJS_startElement_0=Module["_emscripten_bind_CExpatJS_startElement_0"]=Module["asm"]["C"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_endElement_0=Module["_emscripten_bind_CExpatJS_endElement_0"]=function(){return (_emscripten_bind_CExpatJS_endElement_0=Module["_emscripten_bind_CExpatJS_endElement_0"]=Module["asm"]["D"]).apply(null,arguments)};var _emscripten_bind_CExpatJS_characterData_0=Module["_emscripten_bind_CExpatJS_characterData_0"]=function(){return (_emscripten_bind_CExpatJS_characterData_0=Module["_emscripten_bind_CExpatJS_characterData_0"]=Module["asm"]["E"]).apply(null,arguments)};var _emscripten_bind_CExpatJS___destroy___0=Module["_emscripten_bind_CExpatJS___destroy___0"]=function(){return (_emscripten_bind_CExpatJS___destroy___0=Module["_emscripten_bind_CExpatJS___destroy___0"]=Module["asm"]["F"]).apply(null,arguments)};Module["_malloc"]=function(){return (Module["_malloc"]=Module["asm"]["H"]).apply(null,arguments)};Module["___start_em_js"]=11456;Module["___stop_em_js"]=11554;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller;};function run(args){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else {doRun();}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return (__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw "Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr];}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i]);}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0;}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer);}ensureCache.pos=0;},alloc:function(array,view){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret);}else {ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len;}return ret},copy:function(array,view,offset){offset>>>=0;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offset>>>=1;break;case 4:offset>>>=2;break;case 8:offset>>>=3;break}for(var i=0;i<array.length;i++){view[offset+i]=array[i];}}};function ensureString(value){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function CExpat(){this.ptr=_emscripten_bind_CExpat_CExpat_0();getCache(CExpat)[this.ptr]=this;}CExpat.prototype=Object.create(WrapperObject.prototype);CExpat.prototype.constructor=CExpat;CExpat.prototype.__class__=CExpat;CExpat.__cache__={};Module["CExpat"]=CExpat;CExpat.prototype["version"]=CExpat.prototype.version=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_version_0(self))};CExpat.prototype["create"]=CExpat.prototype.create=function(){var self=this.ptr;return !!_emscripten_bind_CExpat_create_0(self)};CExpat.prototype["destroy"]=CExpat.prototype.destroy=function(){var self=this.ptr;_emscripten_bind_CExpat_destroy_0(self);};CExpat.prototype["parse"]=CExpat.prototype.parse=function(xml){var self=this.ptr;ensureCache.prepare();if(xml&&typeof xml==="object")xml=xml.ptr;else xml=ensureString(xml);return !!_emscripten_bind_CExpat_parse_1(self,xml)};CExpat.prototype["tag"]=CExpat.prototype.tag=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_tag_0(self))};CExpat.prototype["attrs"]=CExpat.prototype.attrs=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_attrs_0(self))};CExpat.prototype["content"]=CExpat.prototype.content=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_CExpat_content_0(self))};CExpat.prototype["startElement"]=CExpat.prototype.startElement=function(){var self=this.ptr;_emscripten_bind_CExpat_startElement_0(self);};CExpat.prototype["endElement"]=CExpat.prototype.endElement=function(){var self=this.ptr;_emscripten_bind_CExpat_endElement_0(self);};CExpat.prototype["characterData"]=CExpat.prototype.characterData=function(){var self=this.ptr;_emscripten_bind_CExpat_characterData_0(self);};CExpat.prototype["__destroy__"]=CExpat.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_CExpat___destroy___0(self);};function VoidPtr(){throw "cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self);};function CExpatJS(){this.ptr=_emscripten_bind_CExpatJS_CExpatJS_0();getCache(CExpatJS)[this.ptr]=this;}CExpatJS.prototype=Object.create(CExpat.prototype);CExpatJS.prototype.constructor=CExpatJS;CExpatJS.prototype.__class__=CExpatJS;CExpatJS.__cache__={};Module["CExpatJS"]=CExpatJS;CExpatJS.prototype["startElement"]=CExpatJS.prototype.startElement=function(){var self=this.ptr;_emscripten_bind_CExpatJS_startElement_0(self);};CExpatJS.prototype["endElement"]=CExpatJS.prototype.endElement=function(){var self=this.ptr;_emscripten_bind_CExpatJS_endElement_0(self);};CExpatJS.prototype["characterData"]=CExpatJS.prototype.characterData=function(){var self=this.ptr;_emscripten_bind_CExpatJS_characterData_0(self);};CExpatJS.prototype["__destroy__"]=CExpatJS.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_CExpatJS___destroy___0(self);};
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
return cpp.ready
|
|
@@ -45,11 +45,14 @@ function trimStart(str, charToRemove) {
|
|
|
45
45
|
const g_wasmCache = {};
|
|
46
46
|
async function _loadWasm(_wasmLib, wasmUrl, wasmBinary) {
|
|
47
47
|
const wasmLib = _wasmLib.default || _wasmLib;
|
|
48
|
-
if (!wasmBinary) {
|
|
48
|
+
if (!wasmBinary && interop.doFetch) {
|
|
49
49
|
wasmBinary = await interop.doFetch(wasmUrl);
|
|
50
50
|
}
|
|
51
51
|
return await wasmLib({
|
|
52
|
-
"wasmBinary": wasmBinary
|
|
52
|
+
"wasmBinary": wasmBinary,
|
|
53
|
+
locateFile: (path, scriptDirectory) => {
|
|
54
|
+
return wasmUrl;
|
|
55
|
+
}
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
async function loadWasm(_wasmLib, filename, wf, wasmBinary) {
|