Path: blob/main/src/resources/js/graphviz-wasm.js
12921 views
// deno-lint-ignore-file12/*3* graphviz-wasm.js4*5* This is a pretty-printed, hand-edited version of the minified build from https://github.com/hpcc-systems/hpcc-js-wasm/6*7*8* Copyright (C) 2022 by https://github.com/hpcc-systems/hpcc-js-wasm authors9*10* adaptations to make it run on deno are11*12* Copyright (C) 2022 Posit Software, PBC13*14*/1516/*import { resourcePath } from "../../core/resources.ts";17import { asDataUrl } from "../../core/data-url.ts";*/1819const exportVals = {};2021export function graphviz() {22return exportVals.graphviz;23}2425export function graphvizSync() {26return exportVals.graphvizSync;27}2829export function wasmPath() {30return `${Deno.env.get("QUARTO_SHARE_PATH")}/wasm/graphvizlib.wasm`;31}3233export function graphvizWasmModule() {34const gvWasmSrc = Deno.readFileSync(wasmPath());35return new WebAssembly.Module(gvWasmSrc);36}3738export function graphvizWasm() {39throw new Error("I bet we don't trigger this.");40/*const gvWasmSrc = Deno.readFileSync(wasmPath()).buffer;41return asDataUrl(gvWasmSrc, "application/wasm");*/42}4344!(function (r, e) {45e(r);46/*"object" == typeof exports && "undefined" != typeof module47? e(exports)48: "function" == typeof define && define.amd49? define(["exports"], e)50: e(51(r = "undefined" != typeof globalThis ? globalThis : r || self)[52"@hpcc-js/wasm"53] = {},54);*/55})(exportVals, function (r) {56"use strict";57function e(r, e) {58return (59e.forEach(function (e) {60e &&61"string" != typeof e &&62!Array.isArray(e) &&63Object.keys(e).forEach(function (t) {64if ("default" !== t && !(t in r)) {65var n = Object.getOwnPropertyDescriptor(e, t);66Object.defineProperty(67r,68t,69n.get70? n71: {72enumerable: !0,73get: function () {74return e[t];75},76}77);78}79});80}),81Object.freeze(r)82);83}84var t = { exports: {} };85!(function (r, e) {86var t,87n =88((t =89"undefined" != typeof document && document.currentScript90? document.currentScript.src91: void 0),92function (r) {93var e,94n,95o = void 0 !== (r = r || {}) ? r : {};96o.ready = new Promise(function (r, t) {97(e = r), (n = t);98});99var a,100i,101s = Object.assign({}, o),102u = "./this.program",103c = "";104"undefined" != typeof document &&105document.currentScript &&106(c = document.currentScript.src),107t && (c = t),108(c =1090 !== c.indexOf("blob:")110? c.substr(0, c.replace(/[?#].*/, "").lastIndexOf("/") + 1)111: ""),112(a = (r) => {113var e = new XMLHttpRequest();114return e.open("GET", r, !1), e.send(null), e.responseText;115}),116(i = (r, e, t) => {117var n = new XMLHttpRequest();118n.open("GET", r, !0),119(n.responseType = "arraybuffer"),120(n.onload = () => {121200 == n.status || (0 == n.status && n.response)122? e(n.response)123: t();124}),125(n.onerror = t),126n.send(null);127});128var l,129d,130f = o.print || console.log.bind(console),131p = o.printErr || console.warn.bind(console);132Object.assign(o, s),133(s = null),134o.arguments,135o.thisProgram && (u = o.thisProgram),136o.quit,137o.wasmBinary && (l = o.wasmBinary),138o.noExitRuntime,139"object" != typeof WebAssembly &&140L("no native wasm support detected");141var m = !1;142function h(r, e) {143r || L(e);144}145var v,146w,147_,148y,149E,150g,151b =152"undefined" != typeof TextDecoder153? new TextDecoder("utf8")154: void 0;155function k(r, e, t) {156for (var n = e + t, o = e; r[o] && !(o >= n); ) ++o;157if (o - e > 16 && r.subarray && b) {158return b.decode(r.subarray(e, o));159}160for (var a = ""; e < o; ) {161var i = r[e++];162if (128 & i) {163var s = 63 & r[e++];164if (192 != (224 & i)) {165var u = 63 & r[e++];166if (167(i =168224 == (240 & i)169? ((15 & i) << 12) | (s << 6) | u170: ((7 & i) << 18) |171(s << 12) |172(u << 6) |173(63 & r[e++])) < 65536174) {175a += String.fromCharCode(i);176} else {177var c = i - 65536;178a += String.fromCharCode(17955296 | (c >> 10),18056320 | (1023 & c)181);182}183} else a += String.fromCharCode(((31 & i) << 6) | s);184} else a += String.fromCharCode(i);185}186return a;187}188function D(r, e) {189return r ? k(_, r, e) : "";190}191function S(r, e, t, n) {192if (!(n > 0)) {193return 0;194}195for (var o = t, a = t + n - 1, i = 0; i < r.length; ++i) {196var s = r.charCodeAt(i);197if (198(s >= 55296 &&199s <= 57343 &&200(s =201(65536 + ((1023 & s) << 10)) | (1023 & r.charCodeAt(++i))),202s <= 127)203) {204if (t >= a) {205break;206}207e[t++] = s;208} else if (s <= 2047) {209if (t + 1 >= a) break;210(e[t++] = 192 | (s >> 6)), (e[t++] = 128 | (63 & s));211} else if (s <= 65535) {212if (t + 2 >= a) break;213(e[t++] = 224 | (s >> 12)),214(e[t++] = 128 | ((s >> 6) & 63)),215(e[t++] = 128 | (63 & s));216} else {217if (t + 3 >= a) break;218(e[t++] = 240 | (s >> 18)),219(e[t++] = 128 | ((s >> 12) & 63)),220(e[t++] = 128 | ((s >> 6) & 63)),221(e[t++] = 128 | (63 & s));222}223}224return (e[t] = 0), t - o;225}226function P(r) {227for (var e = 0, t = 0; t < r.length; ++t) {228var n = r.charCodeAt(t);229n >= 55296 &&230n <= 57343 &&231(n = (65536 + ((1023 & n) << 10)) | (1023 & r.charCodeAt(++t))),232n <= 127 ? ++e : (e += n <= 2047 ? 2 : n <= 65535 ? 3 : 4);233}234return e;235}236function A(r) {237(v = r),238(o.HEAP8 = w = new Int8Array(r)),239(o.HEAP16 = new Int16Array(r)),240(o.HEAP32 = y = new Int32Array(r)),241(o.HEAPU8 = _ = new Uint8Array(r)),242(o.HEAPU16 = new Uint16Array(r)),243(o.HEAPU32 = new Uint32Array(r)),244(o.HEAPF32 = new Float32Array(r)),245(o.HEAPF64 = E = new Float64Array(r));246}247o.INITIAL_MEMORY;248var F,249x,250M,251R,252C = [],253z = [],254B = [],255j = 0,256T = null;257function N(r) {258j++, o.monitorRunDependencies && o.monitorRunDependencies(j);259}260function O(r) {261if (262(j--,263o.monitorRunDependencies && o.monitorRunDependencies(j),2640 == j && T)265) {266var e = T;267(T = null), e();268}269}270function L(r) {271o.onAbort && o.onAbort(r),272p((r = "Aborted(" + r + ")")),273(m = !0),274(r += ". Build with -s ASSERTIONS=1 for more info.");275var e = new WebAssembly.RuntimeError(r);276throw (n(e), e);277}278function I(r) {279return r.startsWith("data:application/octet-stream;base64,");280}281function H(r) {282try {283if (r == F && l) return new Uint8Array(l);284throw "both async and sync fetching of the wasm failed";285} catch (r) {286L(r);287}288}289throw new Error(290"Internal Error: Attempting to load expatlib, which is currently not supported in this version."291);292(o.preloadedImages = {}),293(o.preloadedAudios = {}),294I((F = "expatlib.wasm")) ||295((x = F), (F = o.locateFile ? o.locateFile(x, c) : c + x));296var U = {29711678: function (r) {298var e = o.getCache(o.CExpatJS)[r];299if (!e.hasOwnProperty("startElement")) {300throw "a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";301}302e.startElement();303},30411896: function (r) {305var e = o.getCache(o.CExpatJS)[r];306if (!e.hasOwnProperty("endElement")) {307throw "a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";308}309e.endElement();310},31112108: function (r) {312var e = o.getCache(o.CExpatJS)[r];313if (!e.hasOwnProperty("characterData")) {314throw "a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";315}316e.characterData();317},318};319function G(r) {320for (; r.length > 0; ) {321var e = r.shift();322if ("function" != typeof e) {323var t = e.func;324"number" == typeof t325? void 0 === e.arg326? q(t)()327: q(t)(e.arg)328: t(void 0 === e.arg ? null : e.arg);329} else e(o);330}331}332function q(r) {333return g.get(r);334}335var W = {336splitPath: function (r) {337return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/338.exec(r)339.slice(1);340},341normalizeArray: function (r, e) {342for (var t = 0, n = r.length - 1; n >= 0; n--) {343var o = r[n];344"." === o345? r.splice(n, 1)346: ".." === o347? (r.splice(n, 1), t++)348: t && (r.splice(n, 1), t--);349}350if (e) for (; t; t--) r.unshift("..");351return r;352},353normalize: function (r) {354var e = "/" === r.charAt(0),355t = "/" === r.substr(-1);356return (357(r = W.normalizeArray(358r.split("/").filter(function (r) {359return !!r;360}),361!e362).join("/")) ||363e ||364(r = "."),365r && t && (r += "/"),366(e ? "/" : "") + r367);368},369dirname: function (r) {370var e = W.splitPath(r),371t = e[0],372n = e[1];373return t || n374? (n && (n = n.substr(0, n.length - 1)), t + n)375: ".";376},377basename: function (r) {378if ("/" === r) return "/";379var e = (r = (r = W.normalize(r)).replace(380/\/$/,381""382)).lastIndexOf("/");383return -1 === e ? r : r.substr(e + 1);384},385extname: function (r) {386return W.splitPath(r)[3];387},388join: function () {389var r = Array.prototype.slice.call(arguments, 0);390return W.normalize(r.join("/"));391},392join2: function (r, e) {393return W.normalize(r + "/" + e);394},395},396J = {397resolve: function () {398for (399var r = "", e = !1, t = arguments.length - 1;400t >= -1 && !e;401t--402) {403var n = t >= 0 ? arguments[t] : $.cwd();404if ("string" != typeof n) {405throw new TypeError(406"Arguments to path.resolve must be strings"407);408}409if (!n) return "";410(r = n + "/" + r), (e = "/" === n.charAt(0));411}412return (413(e ? "/" : "") +414(r = W.normalizeArray(415r.split("/").filter(function (r) {416return !!r;417}),418!e419).join("/")) || "."420);421},422relative: function (r, e) {423function t(r) {424for (var e = 0; e < r.length && "" === r[e]; e++);425for (var t = r.length - 1; t >= 0 && "" === r[t]; t--);426return e > t ? [] : r.slice(e, t - e + 1);427}428(r = J.resolve(r).substr(1)), (e = J.resolve(e).substr(1));429for (430var n = t(r.split("/")),431o = t(e.split("/")),432a = Math.min(n.length, o.length),433i = a,434s = 0;435s < a;436s++437) {438if (n[s] !== o[s]) {439i = s;440break;441}442}443var u = [];444for (s = i; s < n.length; s++) u.push("..");445return (u = u.concat(o.slice(i))).join("/");446},447},448V = {449ttys: [],450init: function () {},451shutdown: function () {},452register: function (r, e) {453(V.ttys[r] = { input: [], output: [], ops: e }),454$.registerDevice(r, V.stream_ops);455},456stream_ops: {457open: function (r) {458var e = V.ttys[r.node.rdev];459if (!e) throw new $.ErrnoError(43);460(r.tty = e), (r.seekable = !1);461},462close: function (r) {463r.tty.ops.flush(r.tty);464},465flush: function (r) {466r.tty.ops.flush(r.tty);467},468read: function (r, e, t, n, o) {469if (!r.tty || !r.tty.ops.get_char) throw new $.ErrnoError(60);470for (var a = 0, i = 0; i < n; i++) {471var s;472try {473s = r.tty.ops.get_char(r.tty);474} catch (r) {475throw new $.ErrnoError(29);476}477if (void 0 === s && 0 === a) throw new $.ErrnoError(6);478if (null == s) break;479a++, (e[t + i] = s);480}481return a && (r.node.timestamp = Date.now()), a;482},483write: function (r, e, t, n, o) {484if (!r.tty || !r.tty.ops.put_char) {485throw new $.ErrnoError(60);486}487try {488for (var a = 0; a < n; a++) {489r.tty.ops.put_char(r.tty, e[t + a]);490}491} catch (r) {492throw new $.ErrnoError(29);493}494return n && (r.node.timestamp = Date.now()), a;495},496},497default_tty_ops: {498get_char: function (r) {499if (!r.input.length) {500var e = null;501if (502("undefined" != typeof window &&503"function" == typeof window.prompt504? null !== (e = window.prompt("Input: ")) && (e += "\n")505: "function" == typeof readline &&506null !== (e = readline()) &&507(e += "\n"),508!e)509) {510return null;511}512r.input = or(e, !0);513}514return r.input.shift();515},516put_char: function (r, e) {517null === e || 10 === e518? (f(k(r.output, 0)), (r.output = []))519: 0 != e && r.output.push(e);520},521flush: function (r) {522r.output &&523r.output.length > 0 &&524(f(k(r.output, 0)), (r.output = []));525},526},527default_tty1_ops: {528put_char: function (r, e) {529null === e || 10 === e530? (p(k(r.output, 0)), (r.output = []))531: 0 != e && r.output.push(e);532},533flush: function (r) {534r.output &&535r.output.length > 0 &&536(p(k(r.output, 0)), (r.output = []));537},538},539},540X = {541ops_table: null,542mount: function (r) {543return X.createNode(null, "/", 16895, 0);544},545createNode: function (r, e, t, n) {546if ($.isBlkdev(t) || $.isFIFO(t)) throw new $.ErrnoError(63);547X.ops_table ||548(X.ops_table = {549dir: {550node: {551getattr: X.node_ops.getattr,552setattr: X.node_ops.setattr,553lookup: X.node_ops.lookup,554mknod: X.node_ops.mknod,555rename: X.node_ops.rename,556unlink: X.node_ops.unlink,557rmdir: X.node_ops.rmdir,558readdir: X.node_ops.readdir,559symlink: X.node_ops.symlink,560},561stream: { llseek: X.stream_ops.llseek },562},563file: {564node: {565getattr: X.node_ops.getattr,566setattr: X.node_ops.setattr,567},568stream: {569llseek: X.stream_ops.llseek,570read: X.stream_ops.read,571write: X.stream_ops.write,572allocate: X.stream_ops.allocate,573mmap: X.stream_ops.mmap,574msync: X.stream_ops.msync,575},576},577link: {578node: {579getattr: X.node_ops.getattr,580setattr: X.node_ops.setattr,581readlink: X.node_ops.readlink,582},583stream: {},584},585chrdev: {586node: {587getattr: X.node_ops.getattr,588setattr: X.node_ops.setattr,589},590stream: $.chrdev_stream_ops,591},592});593var o = $.createNode(r, e, t, n);594return (595$.isDir(o.mode)596? ((o.node_ops = X.ops_table.dir.node),597(o.stream_ops = X.ops_table.dir.stream),598(o.contents = {}))599: $.isFile(o.mode)600? ((o.node_ops = X.ops_table.file.node),601(o.stream_ops = X.ops_table.file.stream),602(o.usedBytes = 0),603(o.contents = null))604: $.isLink(o.mode)605? ((o.node_ops = X.ops_table.link.node),606(o.stream_ops = X.ops_table.link.stream))607: $.isChrdev(o.mode) &&608((o.node_ops = X.ops_table.chrdev.node),609(o.stream_ops = X.ops_table.chrdev.stream)),610(o.timestamp = Date.now()),611r && ((r.contents[e] = o), (r.timestamp = o.timestamp)),612o613);614},615getFileDataAsTypedArray: function (r) {616return r.contents617? r.contents.subarray618? r.contents.subarray(0, r.usedBytes)619: new Uint8Array(r.contents)620: new Uint8Array(0);621},622expandFileStorage: function (r, e) {623var t = r.contents ? r.contents.length : 0;624if (!(t >= e)) {625(e = Math.max(e, (t * (t < 1048576 ? 2 : 1.125)) >>> 0)),6260 != t && (e = Math.max(e, 256));627var n = r.contents;628(r.contents = new Uint8Array(e)),629r.usedBytes > 0 &&630r.contents.set(n.subarray(0, r.usedBytes), 0);631}632},633resizeFileStorage: function (r, e) {634if (r.usedBytes != e) {635if (0 == e) (r.contents = null), (r.usedBytes = 0);636else {637var t = r.contents;638(r.contents = new Uint8Array(e)),639t &&640r.contents.set(t.subarray(0, Math.min(e, r.usedBytes))),641(r.usedBytes = e);642}643}644},645node_ops: {646getattr: function (r) {647var e = {};648return (649(e.dev = $.isChrdev(r.mode) ? r.id : 1),650(e.ino = r.id),651(e.mode = r.mode),652(e.nlink = 1),653(e.uid = 0),654(e.gid = 0),655(e.rdev = r.rdev),656$.isDir(r.mode)657? (e.size = 4096)658: $.isFile(r.mode)659? (e.size = r.usedBytes)660: $.isLink(r.mode)661? (e.size = r.link.length)662: (e.size = 0),663(e.atime = new Date(r.timestamp)),664(e.mtime = new Date(r.timestamp)),665(e.ctime = new Date(r.timestamp)),666(e.blksize = 4096),667(e.blocks = Math.ceil(e.size / e.blksize)),668e669);670},671setattr: function (r, e) {672void 0 !== e.mode && (r.mode = e.mode),673void 0 !== e.timestamp && (r.timestamp = e.timestamp),674void 0 !== e.size && X.resizeFileStorage(r, e.size);675},676lookup: function (r, e) {677throw $.genericErrors[44];678},679mknod: function (r, e, t, n) {680return X.createNode(r, e, t, n);681},682rename: function (r, e, t) {683if ($.isDir(r.mode)) {684var n;685try {686n = $.lookupNode(e, t);687} catch (r) {}688if (n) for (var o in n.contents) throw new $.ErrnoError(55);689}690delete r.parent.contents[r.name],691(r.parent.timestamp = Date.now()),692(r.name = t),693(e.contents[t] = r),694(e.timestamp = r.parent.timestamp),695(r.parent = e);696},697unlink: function (r, e) {698delete r.contents[e], (r.timestamp = Date.now());699},700rmdir: function (r, e) {701var t = $.lookupNode(r, e);702for (var n in t.contents) throw new $.ErrnoError(55);703delete r.contents[e], (r.timestamp = Date.now());704},705readdir: function (r) {706var e = [".", ".."];707for (var t in r.contents) {708r.contents.hasOwnProperty(t) && e.push(t);709}710return e;711},712symlink: function (r, e, t) {713var n = X.createNode(r, e, 41471, 0);714return (n.link = t), n;715},716readlink: function (r) {717if (!$.isLink(r.mode)) throw new $.ErrnoError(28);718return r.link;719},720},721stream_ops: {722read: function (r, e, t, n, o) {723var a = r.node.contents;724if (o >= r.node.usedBytes) return 0;725var i = Math.min(r.node.usedBytes - o, n);726if (i > 8 && a.subarray) e.set(a.subarray(o, o + i), t);727else for (var s = 0; s < i; s++) e[t + s] = a[o + s];728return i;729},730write: function (r, e, t, n, o, a) {731if ((e.buffer === w.buffer && (a = !1), !n)) {732return 0;733}734var i = r.node;735if (736((i.timestamp = Date.now()),737e.subarray && (!i.contents || i.contents.subarray))738) {739if (a) {740return (741(i.contents = e.subarray(t, t + n)),742(i.usedBytes = n),743n744);745}746if (0 === i.usedBytes && 0 === o) {747return (748(i.contents = e.slice(t, t + n)), (i.usedBytes = n), n749);750}751if (o + n <= i.usedBytes) {752return i.contents.set(e.subarray(t, t + n), o), n;753}754}755if (756(X.expandFileStorage(i, o + n),757i.contents.subarray && e.subarray)758) {759i.contents.set(e.subarray(t, t + n), o);760} else {761for (var s = 0; s < n; s++) i.contents[o + s] = e[t + s];762}763return (i.usedBytes = Math.max(i.usedBytes, o + n)), n;764},765llseek: function (r, e, t) {766var n = e;767if (768(1 === t769? (n += r.position)770: 2 === t &&771$.isFile(r.node.mode) &&772(n += r.node.usedBytes),773n < 0)774) {775throw new $.ErrnoError(28);776}777return n;778},779allocate: function (r, e, t) {780X.expandFileStorage(r.node, e + t),781(r.node.usedBytes = Math.max(r.node.usedBytes, e + t));782},783mmap: function (r, e, t, n, o, a) {784if (0 !== e) throw new $.ErrnoError(28);785if (!$.isFile(r.node.mode)) throw new $.ErrnoError(43);786var i,787s,788u = r.node.contents;789if (2 & a || u.buffer !== v) {790if (791((n > 0 || n + t < u.length) &&792(u = u.subarray793? u.subarray(n, n + t)794: Array.prototype.slice.call(u, n, n + t)),795(s = !0),796!(i = void L()))797) {798throw new $.ErrnoError(48);799}800w.set(u, i);801} else {802(s = !1), (i = u.byteOffset);803}804return { ptr: i, allocated: s };805},806msync: function (r, e, t, n, o) {807if (!$.isFile(r.node.mode)) throw new $.ErrnoError(43);808return 2 & o || X.stream_ops.write(r, e, 0, n, t, !1), 0;809},810},811},812$ = {813root: null,814mounts: [],815devices: {},816streams: [],817nextInode: 1,818nameTable: null,819currentPath: "/",820initialized: !1,821ignorePermissions: !0,822ErrnoError: null,823genericErrors: {},824filesystems: null,825syncFSRequests: 0,826lookupPath: (r, e = {}) => {827if (!(r = J.resolve($.cwd(), r))) {828return { path: "", node: null };829}830var t = { follow_mount: !0, recurse_count: 0 };831for (var n in t) void 0 === e[n] && (e[n] = t[n]);832if (e.recurse_count > 8) throw new $.ErrnoError(32);833for (834var o = W.normalizeArray(835r.split("/").filter((r) => !!r),836!1837),838a = $.root,839i = "/",840s = 0;841s < o.length;842s++843) {844var u = s === o.length - 1;845if (u && e.parent) break;846if (847((a = $.lookupNode(a, o[s])),848(i = W.join2(i, o[s])),849$.isMountpoint(a) &&850(!u || (u && e.follow_mount)) &&851(a = a.mounted.root),852!u || e.follow)853) {854for (var c = 0; $.isLink(a.mode); ) {855var l = $.readlink(i);856if (857((i = J.resolve(W.dirname(i), l)),858(a = $.lookupPath(i, {859recurse_count: e.recurse_count,860}).node),861c++ > 40)862) {863throw new $.ErrnoError(32);864}865}866}867}868return { path: i, node: a };869},870getPath: (r) => {871for (var e; ; ) {872if ($.isRoot(r)) {873var t = r.mount.mountpoint;874return e875? "/" !== t[t.length - 1]876? t + "/" + e877: t + e878: t;879}880(e = e ? r.name + "/" + e : r.name), (r = r.parent);881}882},883hashName: (r, e) => {884for (var t = 0, n = 0; n < e.length; n++) {885t = ((t << 5) - t + e.charCodeAt(n)) | 0;886}887return ((r + t) >>> 0) % $.nameTable.length;888},889hashAddNode: (r) => {890var e = $.hashName(r.parent.id, r.name);891(r.name_next = $.nameTable[e]), ($.nameTable[e] = r);892},893hashRemoveNode: (r) => {894var e = $.hashName(r.parent.id, r.name);895if ($.nameTable[e] === r) $.nameTable[e] = r.name_next;896else {897for (var t = $.nameTable[e]; t; ) {898if (t.name_next === r) {899t.name_next = r.name_next;900break;901}902t = t.name_next;903}904}905},906lookupNode: (r, e) => {907var t = $.mayLookup(r);908if (t) throw new $.ErrnoError(t, r);909for (910var n = $.hashName(r.id, e), o = $.nameTable[n];911o;912o = o.name_next913) {914var a = o.name;915if (o.parent.id === r.id && a === e) return o;916}917return $.lookup(r, e);918},919createNode: (r, e, t, n) => {920var o = new $.FSNode(r, e, t, n);921return $.hashAddNode(o), o;922},923destroyNode: (r) => {924$.hashRemoveNode(r);925},926isRoot: (r) => r === r.parent,927isMountpoint: (r) => !!r.mounted,928isFile: (r) => 32768 == (61440 & r),929isDir: (r) => 16384 == (61440 & r),930isLink: (r) => 40960 == (61440 & r),931isChrdev: (r) => 8192 == (61440 & r),932isBlkdev: (r) => 24576 == (61440 & r),933isFIFO: (r) => 4096 == (61440 & r),934isSocket: (r) => 49152 == (49152 & r),935flagModes: {936r: 0,937"r+": 2,938w: 577,939"w+": 578,940a: 1089,941"a+": 1090,942},943modeStringToFlags: (r) => {944var e = $.flagModes[r];945if (void 0 === e) {946throw new Error("Unknown file open mode: " + r);947}948return e;949},950flagsToPermissionString: (r) => {951var e = ["r", "w", "rw"][3 & r];952return 512 & r && (e += "w"), e;953},954nodePermissions: (r, e) =>955$.ignorePermissions ||956((!e.includes("r") || 292 & r.mode) &&957(!e.includes("w") || 146 & r.mode) &&958(!e.includes("x") || 73 & r.mode))959? 0960: 2,961mayLookup: (r) => {962var e = $.nodePermissions(r, "x");963return e || (r.node_ops.lookup ? 0 : 2);964},965mayCreate: (r, e) => {966try {967return $.lookupNode(r, e), 20;968} catch (r) {}969return $.nodePermissions(r, "wx");970},971mayDelete: (r, e, t) => {972var n;973try {974n = $.lookupNode(r, e);975} catch (r) {976return r.errno;977}978var o = $.nodePermissions(r, "wx");979if (o) return o;980if (t) {981if (!$.isDir(n.mode)) return 54;982if ($.isRoot(n) || $.getPath(n) === $.cwd()) return 10;983} else if ($.isDir(n.mode)) return 31;984return 0;985},986mayOpen: (r, e) =>987r988? $.isLink(r.mode)989? 32990: $.isDir(r.mode) &&991("r" !== $.flagsToPermissionString(e) || 512 & e)992? 31993: $.nodePermissions(r, $.flagsToPermissionString(e))994: 44,995MAX_OPEN_FDS: 4096,996nextfd: (r = 0, e = $.MAX_OPEN_FDS) => {997for (var t = r; t <= e; t++) if (!$.streams[t]) return t;998throw new $.ErrnoError(33);999},1000getStream: (r) => $.streams[r],1001createStream: (r, e, t) => {1002$.FSStream ||1003(($.FSStream = function () {}),1004($.FSStream.prototype = {1005object: {1006get: function () {1007return this.node;1008},1009set: function (r) {1010this.node = r;1011},1012},1013isRead: {1014get: function () {1015return 1 != (2097155 & this.flags);1016},1017},1018isWrite: {1019get: function () {1020return 0 != (2097155 & this.flags);1021},1022},1023isAppend: {1024get: function () {1025return 1024 & this.flags;1026},1027},1028})),1029(r = Object.assign(new $.FSStream(), r));1030var n = $.nextfd(e, t);1031return (r.fd = n), ($.streams[n] = r), r;1032},1033closeStream: (r) => {1034$.streams[r] = null;1035},1036chrdev_stream_ops: {1037open: (r) => {1038var e = $.getDevice(r.node.rdev);1039(r.stream_ops = e.stream_ops),1040r.stream_ops.open && r.stream_ops.open(r);1041},1042llseek: () => {1043throw new $.ErrnoError(70);1044},1045},1046major: (r) => r >> 8,1047minor: (r) => 255 & r,1048makedev: (r, e) => (r << 8) | e,1049registerDevice: (r, e) => {1050$.devices[r] = { stream_ops: e };1051},1052getDevice: (r) => $.devices[r],1053getMounts: (r) => {1054for (var e = [], t = [r]; t.length; ) {1055var n = t.pop();1056e.push(n), t.push.apply(t, n.mounts);1057}1058return e;1059},1060syncfs: (r, e) => {1061"function" == typeof r && ((e = r), (r = !1)),1062$.syncFSRequests++,1063$.syncFSRequests > 1 &&1064p(1065"warning: " +1066$.syncFSRequests +1067" FS.syncfs operations in flight at once, probably just doing extra work"1068);1069var t = $.getMounts($.root.mount),1070n = 0;1071function o(r) {1072return $.syncFSRequests--, e(r);1073}1074function a(r) {1075if (r) return a.errored ? void 0 : ((a.errored = !0), o(r));1076++n >= t.length && o(null);1077}1078t.forEach((e) => {1079if (!e.type.syncfs) return a(null);1080e.type.syncfs(e, r, a);1081});1082},1083mount: (r, e, t) => {1084var n,1085o = "/" === t,1086a = !t;1087if (o && $.root) throw new $.ErrnoError(10);1088if (!o && !a) {1089var i = $.lookupPath(t, { follow_mount: !1 });1090if (((t = i.path), (n = i.node), $.isMountpoint(n))) {1091throw new $.ErrnoError(10);1092}1093if (!$.isDir(n.mode)) throw new $.ErrnoError(54);1094}1095var s = { type: r, opts: e, mountpoint: t, mounts: [] },1096u = r.mount(s);1097return (1098(u.mount = s),1099(s.root = u),1100o1101? ($.root = u)1102: n && ((n.mounted = s), n.mount && n.mount.mounts.push(s)),1103u1104);1105},1106unmount: (r) => {1107var e = $.lookupPath(r, { follow_mount: !1 });1108if (!$.isMountpoint(e.node)) throw new $.ErrnoError(28);1109var t = e.node,1110n = t.mounted,1111o = $.getMounts(n);1112Object.keys($.nameTable).forEach((r) => {1113for (var e = $.nameTable[r]; e; ) {1114var t = e.name_next;1115o.includes(e.mount) && $.destroyNode(e), (e = t);1116}1117}),1118(t.mounted = null);1119var a = t.mount.mounts.indexOf(n);1120t.mount.mounts.splice(a, 1);1121},1122lookup: (r, e) => r.node_ops.lookup(r, e),1123mknod: (r, e, t) => {1124var n = $.lookupPath(r, { parent: !0 }).node,1125o = W.basename(r);1126if (!o || "." === o || ".." === o) throw new $.ErrnoError(28);1127var a = $.mayCreate(n, o);1128if (a) {1129throw new $.ErrnoError(a);1130}1131if (!n.node_ops.mknod) {1132throw new $.ErrnoError(63);1133}1134return n.node_ops.mknod(n, o, e, t);1135},1136create: (r, e) => (1137(e = void 0 !== e ? e : 438),1138(e &= 4095),1139(e |= 32768),1140$.mknod(r, e, 0)1141),1142mkdir: (r, e) => (1143(e = void 0 !== e ? e : 511),1144(e &= 1023),1145(e |= 16384),1146$.mknod(r, e, 0)1147),1148mkdirTree: (r, e) => {1149for (var t = r.split("/"), n = "", o = 0; o < t.length; ++o) {1150if (t[o]) {1151n += "/" + t[o];1152try {1153$.mkdir(n, e);1154} catch (r) {1155if (20 != r.errno) throw r;1156}1157}1158}1159},1160mkdev: (r, e, t) => (1161void 0 === t && ((t = e), (e = 438)),1162(e |= 8192),1163$.mknod(r, e, t)1164),1165symlink: (r, e) => {1166if (!J.resolve(r)) throw new $.ErrnoError(44);1167var t = $.lookupPath(e, { parent: !0 }).node;1168if (!t) throw new $.ErrnoError(44);1169var n = W.basename(e),1170o = $.mayCreate(t, n);1171if (o) {1172throw new $.ErrnoError(o);1173}1174if (!t.node_ops.symlink) throw new $.ErrnoError(63);1175return t.node_ops.symlink(t, n, r);1176},1177rename: (r, e) => {1178var t,1179n,1180o = W.dirname(r),1181a = W.dirname(e),1182i = W.basename(r),1183s = W.basename(e);1184if (1185((t = $.lookupPath(r, { parent: !0 }).node),1186(n = $.lookupPath(e, { parent: !0 }).node),1187!t || !n)1188) {1189throw new $.ErrnoError(44);1190}1191if (t.mount !== n.mount) {1192throw new $.ErrnoError(75);1193}1194var u,1195c = $.lookupNode(t, i),1196l = J.relative(r, a);1197if ("." !== l.charAt(0)) throw new $.ErrnoError(28);1198if ("." !== (l = J.relative(e, o)).charAt(0)) {1199throw new $.ErrnoError(55);1200}1201try {1202u = $.lookupNode(n, s);1203} catch (r) {}1204if (c !== u) {1205var d = $.isDir(c.mode),1206f = $.mayDelete(t, i, d);1207if (f) throw new $.ErrnoError(f);1208if ((f = u ? $.mayDelete(n, s, d) : $.mayCreate(n, s))) {1209throw new $.ErrnoError(f);1210}1211if (!t.node_ops.rename) {1212throw new $.ErrnoError(63);1213}1214if ($.isMountpoint(c) || (u && $.isMountpoint(u))) {1215throw new $.ErrnoError(10);1216}1217if (n !== t && (f = $.nodePermissions(t, "w"))) {1218throw new $.ErrnoError(f);1219}1220$.hashRemoveNode(c);1221try {1222t.node_ops.rename(c, n, s);1223} catch (r) {1224throw r;1225} finally {1226$.hashAddNode(c);1227}1228}1229},1230rmdir: (r) => {1231var e = $.lookupPath(r, { parent: !0 }).node,1232t = W.basename(r),1233n = $.lookupNode(e, t),1234o = $.mayDelete(e, t, !0);1235if (o) throw new $.ErrnoError(o);1236if (!e.node_ops.rmdir) {1237throw new $.ErrnoError(63);1238}1239if ($.isMountpoint(n)) throw new $.ErrnoError(10);1240e.node_ops.rmdir(e, t), $.destroyNode(n);1241},1242readdir: (r) => {1243var e = $.lookupPath(r, { follow: !0 }).node;1244if (!e.node_ops.readdir) throw new $.ErrnoError(54);1245return e.node_ops.readdir(e);1246},1247unlink: (r) => {1248var e = $.lookupPath(r, { parent: !0 }).node;1249if (!e) throw new $.ErrnoError(44);1250var t = W.basename(r),1251n = $.lookupNode(e, t),1252o = $.mayDelete(e, t, !1);1253if (o) throw new $.ErrnoError(o);1254if (!e.node_ops.unlink) throw new $.ErrnoError(63);1255if ($.isMountpoint(n)) throw new $.ErrnoError(10);1256e.node_ops.unlink(e, t), $.destroyNode(n);1257},1258readlink: (r) => {1259var e = $.lookupPath(r).node;1260if (!e) throw new $.ErrnoError(44);1261if (!e.node_ops.readlink) throw new $.ErrnoError(28);1262return J.resolve($.getPath(e.parent), e.node_ops.readlink(e));1263},1264stat: (r, e) => {1265var t = $.lookupPath(r, { follow: !e }).node;1266if (!t) throw new $.ErrnoError(44);1267if (!t.node_ops.getattr) {1268throw new $.ErrnoError(63);1269}1270return t.node_ops.getattr(t);1271},1272lstat: (r) => $.stat(r, !0),1273chmod: (r, e, t) => {1274var n;1275if (1276!(n =1277"string" == typeof r1278? $.lookupPath(r, { follow: !t }).node1279: r).node_ops.setattr1280) {1281throw new $.ErrnoError(63);1282}1283n.node_ops.setattr(n, {1284mode: (4095 & e) | (-4096 & n.mode),1285timestamp: Date.now(),1286});1287},1288lchmod: (r, e) => {1289$.chmod(r, e, !0);1290},1291fchmod: (r, e) => {1292var t = $.getStream(r);1293if (!t) throw new $.ErrnoError(8);1294$.chmod(t.node, e);1295},1296chown: (r, e, t, n) => {1297var o;1298if (1299!(o =1300"string" == typeof r1301? $.lookupPath(r, { follow: !n }).node1302: r).node_ops.setattr1303) {1304throw new $.ErrnoError(63);1305}1306o.node_ops.setattr(o, { timestamp: Date.now() });1307},1308lchown: (r, e, t) => {1309$.chown(r, e, t, !0);1310},1311fchown: (r, e, t) => {1312var n = $.getStream(r);1313if (!n) throw new $.ErrnoError(8);1314$.chown(n.node, e, t);1315},1316truncate: (r, e) => {1317if (e < 0) throw new $.ErrnoError(28);1318var t;1319if (1320!(t =1321"string" == typeof r1322? $.lookupPath(r, { follow: !0 }).node1323: r).node_ops.setattr1324) {1325throw new $.ErrnoError(63);1326}1327if ($.isDir(t.mode)) throw new $.ErrnoError(31);1328if (!$.isFile(t.mode)) throw new $.ErrnoError(28);1329var n = $.nodePermissions(t, "w");1330if (n) throw new $.ErrnoError(n);1331t.node_ops.setattr(t, { size: e, timestamp: Date.now() });1332},1333ftruncate: (r, e) => {1334var t = $.getStream(r);1335if (!t) throw new $.ErrnoError(8);1336if (0 == (2097155 & t.flags)) throw new $.ErrnoError(28);1337$.truncate(t.node, e);1338},1339utime: (r, e, t) => {1340var n = $.lookupPath(r, { follow: !0 }).node;1341n.node_ops.setattr(n, { timestamp: Math.max(e, t) });1342},1343open: (r, e, t, n, a) => {1344if ("" === r) throw new $.ErrnoError(44);1345var i;1346if (1347((t = void 0 === t ? 438 : t),1348(t =134964 & (e = "string" == typeof e ? $.modeStringToFlags(e) : e)1350? (4095 & t) | 327681351: 0),1352"object" == typeof r)1353) {1354i = r;1355} else {1356r = W.normalize(r);1357try {1358i = $.lookupPath(r, { follow: !(131072 & e) }).node;1359} catch (r) {}1360}1361var s = !1;1362if (64 & e) {1363if (i)1364if (128 & e) throw new $.ErrnoError(20);1365else (i = $.mknod(r, t, 0)), (s = !0);1366}1367if (!i) throw new $.ErrnoError(44);1368if (1369($.isChrdev(i.mode) && (e &= -513),137065536 & e && !$.isDir(i.mode))1371) {1372throw new $.ErrnoError(54);1373}1374if (!s) {1375var u = $.mayOpen(i, e);1376if (u) throw new $.ErrnoError(u);1377}1378512 & e && $.truncate(i, 0), (e &= -131713);1379var c = $.createStream(1380{1381node: i,1382path: $.getPath(i),1383flags: e,1384seekable: !0,1385position: 0,1386stream_ops: i.stream_ops,1387ungotten: [],1388error: !1,1389},1390n,1391a1392);1393return (1394c.stream_ops.open && c.stream_ops.open(c),1395!o.logReadFiles ||13961 & e ||1397($.readFiles || ($.readFiles = {}),1398r in $.readFiles || ($.readFiles[r] = 1)),1399c1400);1401},1402close: (r) => {1403if ($.isClosed(r)) throw new $.ErrnoError(8);1404r.getdents && (r.getdents = null);1405try {1406r.stream_ops.close && r.stream_ops.close(r);1407} catch (r) {1408throw r;1409} finally {1410$.closeStream(r.fd);1411}1412r.fd = null;1413},1414isClosed: (r) => null === r.fd,1415llseek: (r, e, t) => {1416if ($.isClosed(r)) throw new $.ErrnoError(8);1417if (!r.seekable || !r.stream_ops.llseek) {1418throw new $.ErrnoError(70);1419}1420if (0 != t && 1 != t && 2 != t) throw new $.ErrnoError(28);1421return (1422(r.position = r.stream_ops.llseek(r, e, t)),1423(r.ungotten = []),1424r.position1425);1426},1427read: (r, e, t, n, o) => {1428if (n < 0 || o < 0) throw new $.ErrnoError(28);1429if ($.isClosed(r)) {1430throw new $.ErrnoError(8);1431}1432if (1 == (2097155 & r.flags)) throw new $.ErrnoError(8);1433if ($.isDir(r.node.mode)) throw new $.ErrnoError(31);1434if (!r.stream_ops.read) throw new $.ErrnoError(28);1435var a = void 0 !== o;1436if (a)1437if (!r.seekable) throw new $.ErrnoError(70);1438else o = r.position;1439var i = r.stream_ops.read(r, e, t, n, o);1440return a || (r.position += i), i;1441},1442write: (r, e, t, n, o, a) => {1443if (n < 0 || o < 0) throw new $.ErrnoError(28);1444if ($.isClosed(r)) throw new $.ErrnoError(8);1445if (0 == (2097155 & r.flags)) throw new $.ErrnoError(8);1446if ($.isDir(r.node.mode)) throw new $.ErrnoError(31);1447if (!r.stream_ops.write) throw new $.ErrnoError(28);1448r.seekable && 1024 & r.flags && $.llseek(r, 0, 2);1449var i = void 0 !== o;1450if (i)1451if (!r.seekable) throw new $.ErrnoError(70);1452else o = r.position;1453var s = r.stream_ops.write(r, e, t, n, o, a);1454return i || (r.position += s), s;1455},1456allocate: (r, e, t) => {1457if ($.isClosed(r)) throw new $.ErrnoError(8);1458if (e < 0 || t <= 0) throw new $.ErrnoError(28);1459if (0 == (2097155 & r.flags)) throw new $.ErrnoError(8);1460if (!$.isFile(r.node.mode) && !$.isDir(r.node.mode)) {1461throw new $.ErrnoError(43);1462}1463if (!r.stream_ops.allocate) {1464throw new $.ErrnoError(138);1465}1466r.stream_ops.allocate(r, e, t);1467},1468mmap: (r, e, t, n, o, a) => {1469if (0 != (2 & o) && 0 == (2 & a) && 2 != (2097155 & r.flags)) {1470throw new $.ErrnoError(2);1471}1472if (1 == (2097155 & r.flags)) throw new $.ErrnoError(2);1473if (!r.stream_ops.mmap) throw new $.ErrnoError(43);1474return r.stream_ops.mmap(r, e, t, n, o, a);1475},1476msync: (r, e, t, n, o) =>1477r && r.stream_ops.msync ? r.stream_ops.msync(r, e, t, n, o) : 0,1478munmap: (r) => 0,1479ioctl: (r, e, t) => {1480if (!r.stream_ops.ioctl) throw new $.ErrnoError(59);1481return r.stream_ops.ioctl(r, e, t);1482},1483readFile: (r, e = {}) => {1484if (1485((e.flags = e.flags || 0),1486(e.encoding = e.encoding || "binary"),1487"utf8" !== e.encoding && "binary" !== e.encoding)1488) {1489throw new Error('Invalid encoding type "' + e.encoding + '"');1490}1491var t,1492n = $.open(r, e.flags),1493o = $.stat(r).size,1494a = new Uint8Array(o);1495return (1496$.read(n, a, 0, o, 0),1497"utf8" === e.encoding1498? (t = k(a, 0))1499: "binary" === e.encoding && (t = a),1500$.close(n),1501t1502);1503},1504writeFile: (r, e, t = {}) => {1505t.flags = t.flags || 577;1506var n = $.open(r, t.flags, t.mode);1507if ("string" == typeof e) {1508var o = new Uint8Array(P(e) + 1),1509a = S(e, o, 0, o.length);1510$.write(n, o, 0, a, void 0, t.canOwn);1511} else {1512if (!ArrayBuffer.isView(e)) {1513throw new Error("Unsupported data type");1514}1515$.write(n, e, 0, e.byteLength, void 0, t.canOwn);1516}1517$.close(n);1518},1519cwd: () => $.currentPath,1520chdir: (r) => {1521var e = $.lookupPath(r, { follow: !0 });1522if (null === e.node) throw new $.ErrnoError(44);1523if (!$.isDir(e.node.mode)) throw new $.ErrnoError(54);1524var t = $.nodePermissions(e.node, "x");1525if (t) throw new $.ErrnoError(t);1526$.currentPath = e.path;1527},1528createDefaultDirectories: () => {1529$.mkdir("/tmp"), $.mkdir("/home"), $.mkdir("/home/web_user");1530},1531createDefaultDevices: () => {1532$.mkdir("/dev"),1533$.registerDevice($.makedev(1, 3), {1534read: () => 0,1535write: (r, e, t, n, o) => n,1536}),1537$.mkdev("/dev/null", $.makedev(1, 3)),1538V.register($.makedev(5, 0), V.default_tty_ops),1539V.register($.makedev(6, 0), V.default_tty1_ops),1540$.mkdev("/dev/tty", $.makedev(5, 0)),1541$.mkdev("/dev/tty1", $.makedev(6, 0));1542var r = (function () {1543if (1544"object" == typeof crypto &&1545"function" == typeof crypto.getRandomValues1546) {1547var r = new Uint8Array(1);1548return function () {1549return crypto.getRandomValues(r), r[0];1550};1551}1552return function () {1553L("randomDevice");1554};1555})();1556$.createDevice("/dev", "random", r),1557$.createDevice("/dev", "urandom", r),1558$.mkdir("/dev/shm"),1559$.mkdir("/dev/shm/tmp");1560},1561createSpecialDirectories: () => {1562$.mkdir("/proc");1563var r = $.mkdir("/proc/self");1564$.mkdir("/proc/self/fd"),1565$.mount(1566{1567mount: () => {1568var e = $.createNode(r, "fd", 16895, 73);1569return (1570(e.node_ops = {1571lookup: (r, e) => {1572var t = +e,1573n = $.getStream(t);1574if (!n) throw new $.ErrnoError(8);1575var o = {1576parent: null,1577mount: { mountpoint: "fake" },1578node_ops: { readlink: () => n.path },1579};1580return (o.parent = o), o;1581},1582}),1583e1584);1585},1586},1587{},1588"/proc/self/fd"1589);1590},1591createStandardStreams: () => {1592o.stdin1593? $.createDevice("/dev", "stdin", o.stdin)1594: $.symlink("/dev/tty", "/dev/stdin"),1595o.stdout1596? $.createDevice("/dev", "stdout", null, o.stdout)1597: $.symlink("/dev/tty", "/dev/stdout"),1598o.stderr1599? $.createDevice("/dev", "stderr", null, o.stderr)1600: $.symlink("/dev/tty1", "/dev/stderr"),1601$.open("/dev/stdin", 0),1602$.open("/dev/stdout", 1),1603$.open("/dev/stderr", 1);1604},1605ensureErrnoError: () => {1606$.ErrnoError ||1607(($.ErrnoError = function (r, e) {1608(this.node = e),1609(this.setErrno = function (r) {1610this.errno = r;1611}),1612this.setErrno(r),1613(this.message = "FS error");1614}),1615($.ErrnoError.prototype = new Error()),1616($.ErrnoError.prototype.constructor = $.ErrnoError),1617[44].forEach((r) => {1618($.genericErrors[r] = new $.ErrnoError(r)),1619($.genericErrors[r].stack = "<generic error, no stack>");1620}));1621},1622staticInit: () => {1623$.ensureErrnoError(),1624($.nameTable = new Array(4096)),1625$.mount(X, {}, "/"),1626$.createDefaultDirectories(),1627$.createDefaultDevices(),1628$.createSpecialDirectories(),1629($.filesystems = { MEMFS: X });1630},1631init: (r, e, t) => {1632($.init.initialized = !0),1633$.ensureErrnoError(),1634(o.stdin = r || o.stdin),1635(o.stdout = e || o.stdout),1636(o.stderr = t || o.stderr),1637$.createStandardStreams();1638},1639quit: () => {1640$.init.initialized = !1;1641for (var r = 0; r < $.streams.length; r++) {1642var e = $.streams[r];1643e && $.close(e);1644}1645},1646getMode: (r, e) => {1647var t = 0;1648return r && (t |= 365), e && (t |= 146), t;1649},1650findObject: (r, e) => {1651var t = $.analyzePath(r, e);1652return t.exists ? t.object : null;1653},1654analyzePath: (r, e) => {1655try {1656r = (n = $.lookupPath(r, { follow: !e })).path;1657} catch (r) {}1658var t = {1659isRoot: !1,1660exists: !1,1661error: 0,1662name: null,1663path: null,1664object: null,1665parentExists: !1,1666parentPath: null,1667parentObject: null,1668};1669try {1670var n = $.lookupPath(r, { parent: !0 });1671(t.parentExists = !0),1672(t.parentPath = n.path),1673(t.parentObject = n.node),1674(t.name = W.basename(r)),1675(n = $.lookupPath(r, { follow: !e })),1676(t.exists = !0),1677(t.path = n.path),1678(t.object = n.node),1679(t.name = n.node.name),1680(t.isRoot = "/" === n.path);1681} catch (r) {1682t.error = r.errno;1683}1684return t;1685},1686createPath: (r, e, t, n) => {1687r = "string" == typeof r ? r : $.getPath(r);1688for (var o = e.split("/").reverse(); o.length; ) {1689var a = o.pop();1690if (a) {1691var i = W.join2(r, a);1692try {1693$.mkdir(i);1694} catch (r) {}1695r = i;1696}1697}1698return i;1699},1700createFile: (r, e, t, n, o) => {1701var a = W.join2("string" == typeof r ? r : $.getPath(r), e),1702i = $.getMode(n, o);1703return $.create(a, i);1704},1705createDataFile: (r, e, t, n, o, a) => {1706var i = e;1707r &&1708((r = "string" == typeof r ? r : $.getPath(r)),1709(i = e ? W.join2(r, e) : r));1710var s = $.getMode(n, o),1711u = $.create(i, s);1712if (t) {1713if ("string" == typeof t) {1714for (1715var c = new Array(t.length), l = 0, d = t.length;1716l < d;1717++l1718) {1719c[l] = t.charCodeAt(l);1720}1721t = c;1722}1723$.chmod(u, 146 | s);1724var f = $.open(u, 577);1725$.write(f, t, 0, t.length, 0, a), $.close(f), $.chmod(u, s);1726}1727return u;1728},1729createDevice: (r, e, t, n) => {1730var o = W.join2("string" == typeof r ? r : $.getPath(r), e),1731a = $.getMode(!!t, !!n);1732$.createDevice.major || ($.createDevice.major = 64);1733var i = $.makedev($.createDevice.major++, 0);1734return (1735$.registerDevice(i, {1736open: (r) => {1737r.seekable = !1;1738},1739close: (r) => {1740n && n.buffer && n.buffer.length && n(10);1741},1742read: (r, e, n, o, a) => {1743for (var i = 0, s = 0; s < o; s++) {1744var u;1745try {1746u = t();1747} catch (r) {1748throw new $.ErrnoError(29);1749}1750if (void 0 === u && 0 === i) throw new $.ErrnoError(6);1751if (null == u) break;1752i++, (e[n + s] = u);1753}1754return i && (r.node.timestamp = Date.now()), i;1755},1756write: (r, e, t, o, a) => {1757for (var i = 0; i < o; i++) {1758try {1759n(e[t + i]);1760} catch (r) {1761throw new $.ErrnoError(29);1762}1763}1764return o && (r.node.timestamp = Date.now()), i;1765},1766}),1767$.mkdev(o, a, i)1768);1769},1770forceLoadFile: (r) => {1771if (r.isDevice || r.isFolder || r.link || r.contents) return !0;1772if ("undefined" != typeof XMLHttpRequest) {1773throw new Error(1774"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."1775);1776}1777if (!a) {1778throw new Error(1779"Cannot load without read() or XMLHttpRequest."1780);1781}1782try {1783(r.contents = or(a(r.url), !0)),1784(r.usedBytes = r.contents.length);1785} catch (r) {1786throw new $.ErrnoError(29);1787}1788},1789createLazyFile: (r, e, t, n, o) => {1790function a() {1791(this.lengthKnown = !1), (this.chunks = []);1792}1793if (1794((a.prototype.get = function (r) {1795if (!(r > this.length - 1 || r < 0)) {1796var e = r % this.chunkSize,1797t = (r / this.chunkSize) | 0;1798return this.getter(t)[e];1799}1800}),1801(a.prototype.setDataGetter = function (r) {1802this.getter = r;1803}),1804(a.prototype.cacheLength = function () {1805var r = new XMLHttpRequest();1806if (1807(r.open("HEAD", t, !1),1808r.send(null),1809!(1810(r.status >= 200 && r.status < 300) ||1811304 === r.status1812))1813) {1814throw new Error(1815"Couldn't load " + t + ". Status: " + r.status1816);1817}1818var e,1819n = Number(r.getResponseHeader("Content-length")),1820o =1821(e = r.getResponseHeader("Accept-Ranges")) &&1822"bytes" === e,1823a =1824(e = r.getResponseHeader("Content-Encoding")) &&1825"gzip" === e,1826i = 1048576;1827o || (i = n);1828var s = this;1829s.setDataGetter((r) => {1830var e = r * i,1831o = (r + 1) * i - 1;1832if (1833((o = Math.min(o, n - 1)),1834void 0 === s.chunks[r] &&1835(s.chunks[r] = ((r, e) => {1836if (r > e) {1837throw new Error(1838"invalid range (" +1839r +1840", " +1841e +1842") or no bytes requested!"1843);1844}1845if (e > n - 1) {1846throw new Error(1847"only " +1848n +1849" bytes available! programmer error!"1850);1851}1852var o = new XMLHttpRequest();1853if (1854(o.open("GET", t, !1),1855n !== i &&1856o.setRequestHeader(1857"Range",1858"bytes=" + r + "-" + e1859),1860(o.responseType = "arraybuffer"),1861o.overrideMimeType &&1862o.overrideMimeType(1863"text/plain; charset=x-user-defined"1864),1865o.send(null),1866!(1867(o.status >= 200 && o.status < 300) ||1868304 === o.status1869))1870) {1871throw new Error(1872"Couldn't load " + t + ". Status: " + o.status1873);1874}1875return void 0 !== o.response1876? new Uint8Array(o.response || [])1877: or(o.responseText || "", !0);1878})(e, o)),1879void 0 === s.chunks[r])1880) {1881throw new Error("doXHR failed!");1882}1883return s.chunks[r];1884}),1885(!a && n) ||1886((i = n = 1),1887(n = this.getter(0).length),1888(i = n),1889f(1890"LazyFiles on gzip forces download of the whole file when length is accessed"1891)),1892(this._length = n),1893(this._chunkSize = i),1894(this.lengthKnown = !0);1895}),1896"undefined" != typeof XMLHttpRequest)1897) {1898throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";1899}1900var i = { isDevice: !1, url: t },1901s = $.createFile(r, e, i, n, o);1902i.contents1903? (s.contents = i.contents)1904: i.url && ((s.contents = null), (s.url = i.url)),1905Object.defineProperties(s, {1906usedBytes: {1907get: function () {1908return this.contents.length;1909},1910},1911});1912var u = {};1913return (1914Object.keys(s.stream_ops).forEach((r) => {1915var e = s.stream_ops[r];1916u[r] = function () {1917return $.forceLoadFile(s), e.apply(null, arguments);1918};1919}),1920(u.read = (r, e, t, n, o) => {1921$.forceLoadFile(s);1922var a = r.node.contents;1923if (o >= a.length) return 0;1924var i = Math.min(a.length - o, n);1925if (a.slice) {1926for (var u = 0; u < i; u++) {1927e[t + u] = a[o + u];1928}1929} else for (u = 0; u < i; u++) e[t + u] = a.get(o + u);1930return i;1931}),1932(s.stream_ops = u),1933s1934);1935},1936createPreloadedFile: (r, e, t, n, o, a, s, u, c, l) => {1937var d = e ? J.resolve(W.join2(r, e)) : r;1938function f(t) {1939function i(t) {1940l && l(),1941u || $.createDataFile(r, e, t, n, o, c),1942a && a(),1943O();1944}1945Browser.handledByPreloadPlugin(t, d, i, () => {1946s && s(), O();1947}) || i(t);1948}1949N(),1950"string" == typeof t1951? (function (r, e, t, n) {1952var o = n ? "" : "al " + r;1953i(1954r,1955function (t) {1956h(1957t,1958'Loading data file "' +1959r +1960'" failed (no arrayBuffer).'1961),1962e(new Uint8Array(t)),1963o && O();1964},1965function (e) {1966if (!t)1967throw 'Loading data file "' + r + '" failed.';1968t();1969}1970),1971o && N();1972})(t, (r) => f(r), s)1973: f(t);1974},1975indexedDB: () =>1976window.indexedDB ||1977window.mozIndexedDB ||1978window.webkitIndexedDB ||1979window.msIndexedDB,1980DB_NAME: () => "EM_FS_" + window.location.pathname,1981DB_VERSION: 20,1982DB_STORE_NAME: "FILE_DATA",1983saveFilesToDB: (r, e, t) => {1984(e = e || (() => {})), (t = t || (() => {}));1985var n = $.indexedDB();1986try {1987var o = n.open($.DB_NAME(), $.DB_VERSION);1988} catch (r) {1989return t(r);1990}1991(o.onupgradeneeded = () => {1992f("creating db"), o.result.createObjectStore($.DB_STORE_NAME);1993}),1994(o.onsuccess = () => {1995var n = o.result.transaction(1996[$.DB_STORE_NAME],1997"readwrite"1998),1999a = n.objectStore($.DB_STORE_NAME),2000i = 0,2001s = 0,2002u = r.length;2003function c() {20040 == s ? e() : t();2005}2006r.forEach((r) => {2007var e = a.put($.analyzePath(r).object.contents, r);2008(e.onsuccess = () => {2009++i + s == u && c();2010}),2011(e.onerror = () => {2012s++, i + s == u && c();2013});2014}),2015(n.onerror = t);2016}),2017(o.onerror = t);2018},2019loadFilesFromDB: (r, e, t) => {2020(e = e || (() => {})), (t = t || (() => {}));2021var n = $.indexedDB();2022try {2023var o = n.open($.DB_NAME(), $.DB_VERSION);2024} catch (r) {2025return t(r);2026}2027(o.onupgradeneeded = t),2028(o.onsuccess = () => {2029var n = o.result;2030try {2031var a = n.transaction([$.DB_STORE_NAME], "readonly");2032} catch (r) {2033return void t(r);2034}2035var i = a.objectStore($.DB_STORE_NAME),2036s = 0,2037u = 0,2038c = r.length;2039function l() {20400 == u ? e() : t();2041}2042r.forEach((r) => {2043var e = i.get(r);2044(e.onsuccess = () => {2045$.analyzePath(r).exists && $.unlink(r),2046$.createDataFile(2047W.dirname(r),2048W.basename(r),2049e.result,2050!0,2051!0,2052!02053),2054++s + u == c && l();2055}),2056(e.onerror = () => {2057u++, s + u == c && l();2058});2059}),2060(a.onerror = t);2061}),2062(o.onerror = t);2063},2064},2065K = {2066DEFAULT_POLLMASK: 5,2067calculateAt: function (r, e, t) {2068if ("/" === e[0]) return e;2069var n;2070if (-100 === r) n = $.cwd();2071else {2072var o = $.getStream(r);2073if (!o) throw new $.ErrnoError(8);2074n = o.path;2075}2076if (0 == e.length) {2077if (!t) throw new $.ErrnoError(44);2078return n;2079}2080return W.join2(n, e);2081},2082doStat: function (r, e, t) {2083try {2084var n = r(e);2085} catch (r) {2086if (2087r &&2088r.node &&2089W.normalize(e) !== W.normalize($.getPath(r.node))2090) {2091return -54;2092}2093throw r;2094}2095return (2096(y[t >> 2] = n.dev),2097(y[(t + 4) >> 2] = 0),2098(y[(t + 8) >> 2] = n.ino),2099(y[(t + 12) >> 2] = n.mode),2100(y[(t + 16) >> 2] = n.nlink),2101(y[(t + 20) >> 2] = n.uid),2102(y[(t + 24) >> 2] = n.gid),2103(y[(t + 28) >> 2] = n.rdev),2104(y[(t + 32) >> 2] = 0),2105(R = [2106n.size >>> 0,2107((M = n.size),2108+Math.abs(M) >= 12109? M > 02110? (0 |2111Math.min(2112+Math.floor(M / 4294967296),211342949672952114)) >>>211502116: ~~+Math.ceil((M - +(~~M >>> 0)) / 4294967296) >>> 02117: 0),2118]),2119(y[(t + 40) >> 2] = R[0]),2120(y[(t + 44) >> 2] = R[1]),2121(y[(t + 48) >> 2] = 4096),2122(y[(t + 52) >> 2] = n.blocks),2123(y[(t + 56) >> 2] = (n.atime.getTime() / 1e3) | 0),2124(y[(t + 60) >> 2] = 0),2125(y[(t + 64) >> 2] = (n.mtime.getTime() / 1e3) | 0),2126(y[(t + 68) >> 2] = 0),2127(y[(t + 72) >> 2] = (n.ctime.getTime() / 1e3) | 0),2128(y[(t + 76) >> 2] = 0),2129(R = [2130n.ino >>> 0,2131((M = n.ino),2132+Math.abs(M) >= 12133? M > 02134? (0 |2135Math.min(2136+Math.floor(M / 4294967296),213742949672952138)) >>>213902140: ~~+Math.ceil((M - +(~~M >>> 0)) / 4294967296) >>> 02141: 0),2142]),2143(y[(t + 80) >> 2] = R[0]),2144(y[(t + 84) >> 2] = R[1]),214502146);2147},2148doMsync: function (r, e, t, n, o) {2149var a = _.slice(r, r + t);2150$.msync(e, a, o, t, n);2151},2152doMkdir: function (r, e) {2153return (2154"/" === (r = W.normalize(r))[r.length - 1] &&2155(r = r.substr(0, r.length - 1)),2156$.mkdir(r, e, 0),215702158);2159},2160doMknod: function (r, e, t) {2161switch (61440 & e) {2162case 32768:2163case 8192:2164case 24576:2165case 4096:2166case 49152:2167break;2168default:2169return -28;2170}2171return $.mknod(r, e, t), 0;2172},2173doReadlink: function (r, e, t) {2174if (t <= 0) return -28;2175var n = $.readlink(r),2176o = Math.min(t, P(n)),2177a = w[e + o];2178return S(n, _, e, t + 1), (w[e + o] = a), o;2179},2180doAccess: function (r, e) {2181if (-8 & e) return -28;2182var t = $.lookupPath(r, { follow: !0 }).node;2183if (!t) return -44;2184var n = "";2185return (21864 & e && (n += "r"),21872 & e && (n += "w"),21881 & e && (n += "x"),2189n && $.nodePermissions(t, n) ? -2 : 02190);2191},2192doDup: function (r, e, t) {2193var n = $.getStream(t);2194return n && $.close(n), $.open(r, e, 0, t, t).fd;2195},2196doReadv: function (r, e, t, n) {2197for (var o = 0, a = 0; a < t; a++) {2198var i = y[(e + 8 * a) >> 2],2199s = y[(e + (8 * a + 4)) >> 2],2200u = $.read(r, w, i, s, n);2201if (u < 0) return -1;2202if (((o += u), u < s)) break;2203}2204return o;2205},2206doWritev: function (r, e, t, n) {2207for (var o = 0, a = 0; a < t; a++) {2208var i = y[(e + 8 * a) >> 2],2209s = y[(e + (8 * a + 4)) >> 2],2210u = $.write(r, w, i, s, n);2211if (u < 0) return -1;2212o += u;2213}2214return o;2215},2216varargs: void 0,2217get: function () {2218return (K.varargs += 4), y[(K.varargs - 4) >> 2];2219},2220getStr: function (r) {2221return D(r);2222},2223getStreamFromFD: function (r) {2224var e = $.getStream(r);2225if (!e) throw new $.ErrnoError(8);2226return e;2227},2228get64: function (r, e) {2229return r;2230},2231},2232Y = [];2233function Q(r) {2234try {2235return d.grow((r - v.byteLength + 65535) >>> 16), A(d.buffer), 1;2236} catch (r) {}2237}2238var Z = {};2239function rr() {2240if (!rr.strings) {2241var r = {2242USER: "web_user",2243LOGNAME: "web_user",2244PATH: "/",2245PWD: "/",2246HOME: "/home/web_user",2247LANG:2248(2249("object" == typeof navigator &&2250navigator.languages &&2251navigator.languages[0]) ||2252"C"2253).replace("-", "_") + ".UTF-8",2254_: u || "./this.program",2255};2256for (var e in Z) void 0 === Z[e] ? delete r[e] : (r[e] = Z[e]);2257var t = [];2258for (var e in r) t.push(e + "=" + r[e]);2259rr.strings = t;2260}2261return rr.strings;2262}2263var er = function (r, e, t, n) {2264r || (r = this),2265(this.parent = r),2266(this.mount = r.mount),2267(this.mounted = null),2268(this.id = $.nextInode++),2269(this.name = e),2270(this.mode = t),2271(this.node_ops = {}),2272(this.stream_ops = {}),2273(this.rdev = n);2274},2275tr = 365,2276nr = 146;2277function or(r, e, t) {2278var n = t > 0 ? t : P(r) + 1,2279o = new Array(n),2280a = S(r, o, 0, o.length);2281return e && (o.length = a), o;2282}2283Object.defineProperties(er.prototype, {2284read: {2285get: function () {2286return (this.mode & tr) === tr;2287},2288set: function (r) {2289r ? (this.mode |= tr) : (this.mode &= -366);2290},2291},2292write: {2293get: function () {2294return (this.mode & nr) === nr;2295},2296set: function (r) {2297r ? (this.mode |= nr) : (this.mode &= -147);2298},2299},2300isFolder: {2301get: function () {2302return $.isDir(this.mode);2303},2304},2305isDevice: {2306get: function () {2307return $.isChrdev(this.mode);2308},2309},2310}),2311($.FSNode = er),2312$.staticInit();2313var ar = {2314g: function (r, e, t) {2315K.varargs = t;2316try {2317var n = K.getStr(r),2318o = t ? K.get() : 0;2319return $.open(n, e, o).fd;2320} catch (r) {2321if (void 0 === $ || !(r instanceof $.ErrnoError)) throw r;2322return -r.errno;2323}2324},2325d: function () {2326L("");2327},2328a: function (r, e, t) {2329var n = (function (r, e) {2330var t;2331for (Y.length = 0, e >>= 2; (t = _[r++]); ) {2332var n = t < 105;2333n && 1 & e && e++, Y.push(n ? E[e++ >> 1] : y[e]), ++e;2334}2335return Y;2336})(e, t);2337return U[r].apply(null, n);2338},2339j: function (r, e, t) {2340_.copyWithin(r, e, e + t);2341},2342e: function (r) {2343var e,2344t,2345n = _.length,2346o = 2147483648;2347if ((r >>>= 0) > o) return !1;2348for (var a = 1; a <= 4; a *= 2) {2349var i = n * (1 + 0.2 / a);2350if (2351((i = Math.min(i, r + 100663296)),2352Q(2353Math.min(2354o,2355(e = Math.max(r, i)) + (((t = 65536) - (e % t)) % t)2356)2357))2358) {2359return !0;2360}2361}2362return !1;2363},2364h: function (r, e) {2365var t = 0;2366return (2367rr().forEach(function (n, o) {2368var a = e + t;2369(y[(r + 4 * o) >> 2] = a),2370(function (r, e, t) {2371for (var n = 0; n < r.length; ++n) {2372w[e++ >> 0] = r.charCodeAt(n);2373}2374t || (w[e >> 0] = 0);2375})(n, a),2376(t += n.length + 1);2377}),237802379);2380},2381i: function (r, e) {2382var t = rr();2383y[r >> 2] = t.length;2384var n = 0;2385return (2386t.forEach(function (r) {2387n += r.length + 1;2388}),2389(y[e >> 2] = n),239002391);2392},2393c: function (r) {2394try {2395var e = K.getStreamFromFD(r);2396return $.close(e), 0;2397} catch (r) {2398if (void 0 === $ || !(r instanceof $.ErrnoError)) throw r;2399return r.errno;2400}2401},2402f: function (r, e, t, n) {2403try {2404var o = K.getStreamFromFD(r),2405a = K.doReadv(o, e, t);2406return (y[n >> 2] = a), 0;2407} catch (r) {2408if (void 0 === $ || !(r instanceof $.ErrnoError)) throw r;2409return r.errno;2410}2411},2412k: function (r, e, t, n, o) {2413try {2414var a = K.getStreamFromFD(r),2415i = 4294967296 * t + (e >>> 0),2416s = 9007199254740992;2417return i <= -s || i >= s2418? -612419: ($.llseek(a, i, n),2420(R = [2421a.position >>> 0,2422((M = a.position),2423+Math.abs(M) >= 12424? M > 02425? (0 |2426Math.min(2427+Math.floor(M / 4294967296),242842949672952429)) >>>243002431: ~~+Math.ceil((M - +(~~M >>> 0)) / 4294967296) >>> 02432: 0),2433]),2434(y[o >> 2] = R[0]),2435(y[(o + 4) >> 2] = R[1]),2436a.getdents && 0 === i && 0 === n && (a.getdents = null),24370);2438} catch (r) {2439if (void 0 === $ || !(r instanceof $.ErrnoError)) throw r;2440return r.errno;2441}2442},2443b: function (r, e, t, n) {2444try {2445var o = K.getStreamFromFD(r),2446a = K.doWritev(o, e, t);2447return (y[n >> 2] = a), 0;2448} catch (r) {2449if (void 0 === $ || !(r instanceof $.ErrnoError)) throw r;2450return r.errno;2451}2452},2453l: function (r) {2454var e = Date.now();2455return (2456(y[r >> 2] = (e / 1e3) | 0),2457(y[(r + 4) >> 2] = ((e % 1e3) * 1e3) | 0),245802459);2460},2461};2462!(function () {2463var r = { a: ar };2464function e(r, e) {2465var t,2466n = r.exports;2467(o.asm = n),2468A((d = o.asm.m).buffer),2469(g = o.asm.G),2470(t = o.asm.n),2471z.unshift(t),2472O();2473}2474function t(r) {2475e(r.instance);2476}2477function a(e) {2478return (2479l || "function" != typeof fetch2480? Promise.resolve().then(function () {2481return H(F);2482})2483: fetch(F, { credentials: "same-origin" })2484.then(function (r) {2485if (!r.ok) {2486throw (2487"failed to load wasm binary file at '" + F + "'"2488);2489}2490return r.arrayBuffer();2491})2492.catch(function () {2493return H(F);2494})2495)2496.then(function (e) {2497return WebAssembly.instantiate(e, r);2498})2499.then(function (r) {2500return r;2501})2502.then(e, function (r) {2503p("failed to asynchronously prepare wasm: " + r), L(r);2504});2505}2506if ((N(), o.instantiateWasm)) {2507try {2508return o.instantiateWasm(r, e);2509} catch (r) {2510return (2511p("Module.instantiateWasm callback failed with error: " + r),2512!12513);2514}2515}2516(l ||2517"function" != typeof WebAssembly.instantiateStreaming ||2518I(F) ||2519"function" != typeof fetch2520? a(t)2521: fetch(F, { credentials: "same-origin" }).then(function (e) {2522return WebAssembly.instantiateStreaming(e, r).then(2523t,2524function (r) {2525return (2526p("wasm streaming compile failed: " + r),2527p("falling back to ArrayBuffer instantiation"),2528a(t)2529);2530}2531);2532})2533).catch(n);2534})(),2535(o.___wasm_call_ctors = function () {2536return (o.___wasm_call_ctors = o.asm.n).apply(null, arguments);2537});2538var ir,2539sr = (o._emscripten_bind_CExpat_CExpat_0 = function () {2540return (sr = o._emscripten_bind_CExpat_CExpat_0 = o.asm.o).apply(2541null,2542arguments2543);2544}),2545ur = (o._emscripten_bind_CExpat_version_0 = function () {2546return (ur = o._emscripten_bind_CExpat_version_0 = o.asm.p).apply(2547null,2548arguments2549);2550}),2551cr = (o._emscripten_bind_CExpat_create_0 = function () {2552return (cr = o._emscripten_bind_CExpat_create_0 = o.asm.q).apply(2553null,2554arguments2555);2556}),2557lr = (o._emscripten_bind_CExpat_destroy_0 = function () {2558return (lr = o._emscripten_bind_CExpat_destroy_0 = o.asm.r).apply(2559null,2560arguments2561);2562}),2563dr = (o._emscripten_bind_CExpat_parse_1 = function () {2564return (dr = o._emscripten_bind_CExpat_parse_1 = o.asm.s).apply(2565null,2566arguments2567);2568}),2569fr = (o._emscripten_bind_CExpat_tag_0 = function () {2570return (fr = o._emscripten_bind_CExpat_tag_0 = o.asm.t).apply(2571null,2572arguments2573);2574}),2575pr = (o._emscripten_bind_CExpat_attrs_0 = function () {2576return (pr = o._emscripten_bind_CExpat_attrs_0 = o.asm.u).apply(2577null,2578arguments2579);2580}),2581mr = (o._emscripten_bind_CExpat_content_0 = function () {2582return (mr = o._emscripten_bind_CExpat_content_0 = o.asm.v).apply(2583null,2584arguments2585);2586}),2587hr = (o._emscripten_bind_CExpat_startElement_0 = function () {2588return (hr = o._emscripten_bind_CExpat_startElement_0 =2589o.asm.w).apply(null, arguments);2590}),2591vr = (o._emscripten_bind_CExpat_endElement_0 = function () {2592return (vr = o._emscripten_bind_CExpat_endElement_0 =2593o.asm.x).apply(null, arguments);2594}),2595wr = (o._emscripten_bind_CExpat_characterData_0 = function () {2596return (wr = o._emscripten_bind_CExpat_characterData_0 =2597o.asm.y).apply(null, arguments);2598}),2599_r = (o._emscripten_bind_CExpat___destroy___0 = function () {2600return (_r = o._emscripten_bind_CExpat___destroy___0 =2601o.asm.z).apply(null, arguments);2602}),2603yr = (o._emscripten_bind_VoidPtr___destroy___0 = function () {2604return (yr = o._emscripten_bind_VoidPtr___destroy___0 =2605o.asm.A).apply(null, arguments);2606}),2607Er = (o._emscripten_bind_CExpatJS_CExpatJS_0 = function () {2608return (Er = o._emscripten_bind_CExpatJS_CExpatJS_0 =2609o.asm.B).apply(null, arguments);2610}),2611gr = (o._emscripten_bind_CExpatJS_startElement_0 = function () {2612return (gr = o._emscripten_bind_CExpatJS_startElement_0 =2613o.asm.C).apply(null, arguments);2614}),2615br = (o._emscripten_bind_CExpatJS_endElement_0 = function () {2616return (br = o._emscripten_bind_CExpatJS_endElement_0 =2617o.asm.D).apply(null, arguments);2618}),2619kr = (o._emscripten_bind_CExpatJS_characterData_0 = function () {2620return (kr = o._emscripten_bind_CExpatJS_characterData_0 =2621o.asm.E).apply(null, arguments);2622}),2623Dr = (o._emscripten_bind_CExpatJS___destroy___0 = function () {2624return (Dr = o._emscripten_bind_CExpatJS___destroy___0 =2625o.asm.F).apply(null, arguments);2626});2627function Sr(r) {2628function t() {2629ir ||2630((ir = !0),2631(o.calledRun = !0),2632m ||2633(o.noFSInit || $.init.initialized || $.init(),2634($.ignorePermissions = !1),2635G(z),2636e(o),2637o.onRuntimeInitialized && o.onRuntimeInitialized(),2638(function () {2639if (o.postRun) {2640for (2641"function" == typeof o.postRun &&2642(o.postRun = [o.postRun]);2643o.postRun.length;26442645) {2646(r = o.postRun.shift()), B.unshift(r);2647}2648}2649var r;2650G(B);2651})()));2652}2653j > 0 ||2654((function () {2655if (o.preRun) {2656for (2657"function" == typeof o.preRun && (o.preRun = [o.preRun]);2658o.preRun.length;26592660) {2661(r = o.preRun.shift()), C.unshift(r);2662}2663}2664var r;2665G(C);2666})(),2667j > 0 ||2668(o.setStatus2669? (o.setStatus("Running..."),2670setTimeout(function () {2671setTimeout(function () {2672o.setStatus("");2673}, 1),2674t();2675}, 1))2676: t()));2677}2678if (2679((o._malloc = function () {2680return (o._malloc = o.asm.H).apply(null, arguments);2681}),2682(T = function r() {2683ir || Sr(), ir || (T = r);2684}),2685(o.run = Sr),2686o.preInit)2687) {2688for (2689"function" == typeof o.preInit && (o.preInit = [o.preInit]);2690o.preInit.length > 0;26912692) {2693o.preInit.pop()();2694}2695}2696function Pr() {}2697function Ar(r) {2698return (r || Pr).__cache__;2699}2700function Fr(r, e) {2701var t = Ar(e),2702n = t[r];2703return (2704n ||2705(((n = Object.create((e || Pr).prototype)).ptr = r), (t[r] = n))2706);2707}2708Sr(),2709(Pr.prototype = Object.create(Pr.prototype)),2710(Pr.prototype.constructor = Pr),2711(Pr.prototype.__class__ = Pr),2712(Pr.__cache__ = {}),2713(o.WrapperObject = Pr),2714(o.getCache = Ar),2715(o.wrapPointer = Fr),2716(o.castObject = function (r, e) {2717return Fr(r.ptr, e);2718}),2719(o.NULL = Fr(0)),2720(o.destroy = function (r) {2721if (!r.__destroy__) {2722throw "Error: Cannot destroy object. (Did you create it yourself?)";2723}2724r.__destroy__(), delete Ar(r.__class__)[r.ptr];2725}),2726(o.compare = function (r, e) {2727return r.ptr === e.ptr;2728}),2729(o.getPointer = function (r) {2730return r.ptr;2731}),2732(o.getClass = function (r) {2733return r.__class__;2734});2735var xr = {2736buffer: 0,2737size: 0,2738pos: 0,2739temps: [],2740needed: 0,2741prepare: function () {2742if (xr.needed) {2743for (var r = 0; r < xr.temps.length; r++) o._free(xr.temps[r]);2744(xr.temps.length = 0),2745o._free(xr.buffer),2746(xr.buffer = 0),2747(xr.size += xr.needed),2748(xr.needed = 0);2749}2750xr.buffer ||2751((xr.size += 128),2752(xr.buffer = o._malloc(xr.size)),2753h(xr.buffer)),2754(xr.pos = 0);2755},2756alloc: function (r, e) {2757h(xr.buffer);2758var t,2759n = e.BYTES_PER_ELEMENT,2760a = r.length * n;2761return (2762(a = (a + 7) & -8),2763xr.pos + a >= xr.size2764? (h(a > 0),2765(xr.needed += a),2766(t = o._malloc(a)),2767xr.temps.push(t))2768: ((t = xr.buffer + xr.pos), (xr.pos += a)),2769t2770);2771},2772copy: function (r, e, t) {2773switch (((t >>>= 0), e.BYTES_PER_ELEMENT)) {2774case 2:2775t >>>= 1;2776break;2777case 4:2778t >>>= 2;2779break;2780case 8:2781t >>>= 3;2782}2783for (var n = 0; n < r.length; n++) e[t + n] = r[n];2784},2785};2786function Mr() {2787(this.ptr = sr()), (Ar(Mr)[this.ptr] = this);2788}2789function Rr() {2790throw "cannot construct a VoidPtr, no constructor in IDL";2791}2792function Cr() {2793(this.ptr = Er()), (Ar(Cr)[this.ptr] = this);2794}2795return (2796(Mr.prototype = Object.create(Pr.prototype)),2797(Mr.prototype.constructor = Mr),2798(Mr.prototype.__class__ = Mr),2799(Mr.__cache__ = {}),2800(o.CExpat = Mr),2801(Mr.prototype.version = Mr.prototype.version =2802function () {2803var r = this.ptr;2804return D(ur(r));2805}),2806(Mr.prototype.create = Mr.prototype.create =2807function () {2808var r = this.ptr;2809return !!cr(r);2810}),2811(Mr.prototype.destroy = Mr.prototype.destroy =2812function () {2813var r = this.ptr;2814lr(r);2815}),2816(Mr.prototype.parse = Mr.prototype.parse =2817function (r) {2818var e = this.ptr;2819return (2820xr.prepare(),2821(r =2822r && "object" == typeof r2823? r.ptr2824: (function (r) {2825if ("string" == typeof r) {2826var e = or(r),2827t = xr.alloc(e, w);2828return xr.copy(e, w, t), t;2829}2830return r;2831})(r)),2832!!dr(e, r)2833);2834}),2835(Mr.prototype.tag = Mr.prototype.tag =2836function () {2837var r = this.ptr;2838return D(fr(r));2839}),2840(Mr.prototype.attrs = Mr.prototype.attrs =2841function () {2842var r = this.ptr;2843return D(pr(r));2844}),2845(Mr.prototype.content = Mr.prototype.content =2846function () {2847var r = this.ptr;2848return D(mr(r));2849}),2850(Mr.prototype.startElement = Mr.prototype.startElement =2851function () {2852var r = this.ptr;2853hr(r);2854}),2855(Mr.prototype.endElement = Mr.prototype.endElement =2856function () {2857var r = this.ptr;2858vr(r);2859}),2860(Mr.prototype.characterData = Mr.prototype.characterData =2861function () {2862var r = this.ptr;2863wr(r);2864}),2865(Mr.prototype.__destroy__ = Mr.prototype.__destroy__ =2866function () {2867var r = this.ptr;2868_r(r);2869}),2870(Rr.prototype = Object.create(Pr.prototype)),2871(Rr.prototype.constructor = Rr),2872(Rr.prototype.__class__ = Rr),2873(Rr.__cache__ = {}),2874(o.VoidPtr = Rr),2875(Rr.prototype.__destroy__ = Rr.prototype.__destroy__ =2876function () {2877var r = this.ptr;2878yr(r);2879}),2880(Cr.prototype = Object.create(Mr.prototype)),2881(Cr.prototype.constructor = Cr),2882(Cr.prototype.__class__ = Cr),2883(Cr.__cache__ = {}),2884(o.CExpatJS = Cr),2885(Cr.prototype.startElement = Cr.prototype.startElement =2886function () {2887var r = this.ptr;2888gr(r);2889}),2890(Cr.prototype.endElement = Cr.prototype.endElement =2891function () {2892var r = this.ptr;2893br(r);2894}),2895(Cr.prototype.characterData = Cr.prototype.characterData =2896function () {2897var r = this.ptr;2898kr(r);2899}),2900(Cr.prototype.__destroy__ = Cr.prototype.__destroy__ =2901function () {2902var r = this.ptr;2903Dr(r);2904}),2905r.ready2906);2907});2908r.exports = n;2909})(t);2910var n = e({ __proto__: null, default: t.exports }, [t.exports]);2911let o =2912(function () {2913if ("undefined" != typeof self) return self;2914if ("undefined" != typeof window) return window;2915if ("undefined" != typeof global) return global;2916throw new Error("unable to locate global object");2917})().__hpcc_wasmFolder || void 0;2918function a(r) {2919if (!arguments.length) return o;2920const e = o;2921return (o = r), e;2922}2923function i(r, e, t) {2924const n = r.default || r;2925return (2926n.__hpcc_promise ||2927(n.__hpcc_promise = n({2928wasmBinary: t,2929locateFile: (r, t) =>2930`${(function (r, e) {2931for (; r.charAt(r.length - 1) === e; ) {2932r = r.substring(0, r.length - 1);2933}2934return r;2935})(e || a() || t || ".", "/")}/${(function (r, e) {2936for (; r.charAt(0) === e; ) r = r.substring(1);2937return r;2938})(r, "/")}`,2939})),2940n.__hpcc_promise2941);2942}2943class s {2944constructor(r, e) {2945(this.tag = r), (this.attrs = e), (this._content = "");2946}2947get content() {2948return this._content;2949}2950appendContent(r) {2951this._content += r;2952}2953}2954function u(r, e, t, o) {2955return i(n, t, o).then((t) => {2956const n = new t.CExpatJS();2957(n.startElement = function () {2958e.startElement(2959this.tag(),2960(function (r) {2961const e = {},2962t = r,2963n = `${String.fromCharCode(1)}`,2964o = `${n}${n}`;2965return (2966t2967.split(o)2968.filter((r) => !!r)2969.forEach((r) => {2970const t = r.split(n);2971e[t[0]] = t[1];2972}),2973e2974);2975})(this.attrs())2976);2977}),2978(n.endElement = function () {2979e.endElement(this.tag());2980}),2981(n.characterData = function () {2982e.characterData(this.content());2983}),2984n.create();2985const o = n.parse(r);2986return n.destroy(), t.destroy(n), o;2987});2988}2989var c = { exports: {} };2990!(function (r, e) {2991var t,2992n =2993((t =2994"undefined" != typeof document && document.currentScript2995? document.currentScript.src2996: void 0),2997function (r) {2998var e,2999n,3000o = void 0 !== (r = r || {}) ? r : {};3001o.ready = new Promise(function (r, t) {3002(e = r), (n = t);3003});3004var a,3005i,3006s = Object.assign({}, o),3007u = "./this.program",3008c = (r, e) => {3009throw e;3010},3011l = "";3012"undefined" != typeof document &&3013document.currentScript &&3014(l = document.currentScript.src),3015t && (l = t),3016(l =30170 !== l.indexOf("blob:")3018? l.substr(0, l.replace(/[?#].*/, "").lastIndexOf("/") + 1)3019: ""),3020(a = (r) => {3021var e = new XMLHttpRequest();3022return e.open("GET", r, !1), e.send(null), e.responseText;3023}),3024(i = (r, e, t) => {3025var n = new XMLHttpRequest();3026n.open("GET", r, !0),3027(n.responseType = "arraybuffer"),3028(n.onload = () => {3029200 == n.status || (0 == n.status && n.response)3030? e(n.response)3031: t();3032}),3033(n.onerror = t),3034n.send(null);3035});3036var d = o.print || console.log.bind(console),3037f = o.printErr || console.warn.bind(console);3038Object.assign(o, s),3039(s = null),3040o.arguments,3041o.thisProgram && (u = o.thisProgram),3042o.quit && (c = o.quit);3043var p,3044m = 0;3045o.wasmBinary && (p = o.wasmBinary);3046var h,3047v = o.noExitRuntime || !0;3048"object" != typeof WebAssembly &&3049G("no native wasm support detected");3050var w = !1;3051function _(r, e) {3052r || G(e);3053}3054var y,3055E,3056g,3057b,3058k,3059D,3060S,3061P =3062"undefined" != typeof TextDecoder3063? new TextDecoder("utf8")3064: void 0;3065function A(r, e, t) {3066for (var n = e + t, o = e; r[o] && !(o >= n); ) ++o;3067if (o - e > 16 && r.subarray && P) {3068return P.decode(r.subarray(e, o));3069}3070for (var a = ""; e < o; ) {3071var i = r[e++];3072if (128 & i) {3073var s = 63 & r[e++];3074if (192 != (224 & i)) {3075var u = 63 & r[e++];3076if (3077(i =3078224 == (240 & i)3079? ((15 & i) << 12) | (s << 6) | u3080: ((7 & i) << 18) |3081(s << 12) |3082(u << 6) |3083(63 & r[e++])) < 655363084) {3085a += String.fromCharCode(i);3086} else {3087var c = i - 65536;3088a += String.fromCharCode(308955296 | (c >> 10),309056320 | (1023 & c)3091);3092}3093} else {3094a += String.fromCharCode(((31 & i) << 6) | s);3095}3096} else {3097a += String.fromCharCode(i);3098}3099}3100return a;3101}3102function F(r, e) {3103return r ? A(g, r, e) : "";3104}3105function x(r, e, t, n) {3106if (!(n > 0)) return 0;3107for (var o = t, a = t + n - 1, i = 0; i < r.length; ++i) {3108var s = r.charCodeAt(i);3109if (3110(s >= 55296 &&3111s <= 57343 &&3112(s =3113(65536 + ((1023 & s) << 10)) | (1023 & r.charCodeAt(++i))),3114s <= 127)3115) {3116if (t >= a) break;3117e[t++] = s;3118} else if (s <= 2047) {3119if (t + 1 >= a) {3120break;3121}3122(e[t++] = 192 | (s >> 6)), (e[t++] = 128 | (63 & s));3123} else if (s <= 65535) {3124if (t + 2 >= a) break;3125(e[t++] = 224 | (s >> 12)),3126(e[t++] = 128 | ((s >> 6) & 63)),3127(e[t++] = 128 | (63 & s));3128} else {3129if (t + 3 >= a) break;3130(e[t++] = 240 | (s >> 18)),3131(e[t++] = 128 | ((s >> 12) & 63)),3132(e[t++] = 128 | ((s >> 6) & 63)),3133(e[t++] = 128 | (63 & s));3134}3135}3136return (e[t] = 0), t - o;3137}3138function M(r) {3139for (var e = 0, t = 0; t < r.length; ++t) {3140var n = r.charCodeAt(t);3141n >= 55296 &&3142n <= 57343 &&3143(n = (65536 + ((1023 & n) << 10)) | (1023 & r.charCodeAt(++t))),3144n <= 127 ? ++e : (e += n <= 2047 ? 2 : n <= 65535 ? 3 : 4);3145}3146return e;3147}3148function R(r) {3149(y = r),3150(o.HEAP8 = E = new Int8Array(r)),3151(o.HEAP16 = b = new Int16Array(r)),3152(o.HEAP32 = k = new Int32Array(r)),3153(o.HEAPU8 = g = new Uint8Array(r)),3154(o.HEAPU16 = new Uint16Array(r)),3155(o.HEAPU32 = new Uint32Array(r)),3156(o.HEAPF32 = new Float32Array(r)),3157(o.HEAPF64 = D = new Float64Array(r));3158}3159o.INITIAL_MEMORY;3160var C,3161z,3162B,3163j,3164T = [],3165N = [],3166O = [],3167L = 0,3168I = null;3169function H(r) {3170L++, o.monitorRunDependencies && o.monitorRunDependencies(L);3171}3172function U(r) {3173if (3174(L--,3175o.monitorRunDependencies && o.monitorRunDependencies(L),31760 == L && I)3177) {3178var e = I;3179(I = null), e();3180}3181}3182function G(r) {3183o.onAbort && o.onAbort(r),3184f((r = "Aborted(" + r + ")")),3185(w = !0),3186(r += ". Build with -s ASSERTIONS=1 for more info.");3187var e = new WebAssembly.RuntimeError(r);3188throw (n(e), e);3189}3190function q(r) {3191return r.startsWith("data:application/octet-stream;base64,");3192}3193function W(r) {3194try {3195if (r == C && p) return new Uint8Array(p);3196throw "both async and sync fetching of the wasm failed";3197} catch (r) {3198G(r);3199}3200}3201// C = graphvizWasm();3202(o.preloadedImages = {}), (o.preloadedAudios = {}); // ,3203// q(C) || ((z = C), (C = o.locateFile ? o.locateFile(z, l) : l + z));3204var J,3205V = {3206161520: function (r, e) {3207var t = F(r),3208n = F(e);3209tr.createPath("/", Y.dirname(t)),3210tr.writeFile(Y.join("/", t), n);3211},3212};3213function X(r) {3214for (; r.length > 0; ) {3215var e = r.shift();3216if ("function" != typeof e) {3217var t = e.func;3218"number" == typeof t3219? void 0 === e.arg3220? $(t)()3221: $(t)(e.arg)3222: t(void 0 === e.arg ? null : e.arg);3223} else e(o);3224}3225}3226function $(r) {3227return S.get(r);3228}3229function K(r) {3230return (k[gr() >> 2] = r), r;3231}3232J = () => performance.now();3233var Y = {3234splitPath: function (r) {3235return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/3236.exec(r)3237.slice(1);3238},3239normalizeArray: function (r, e) {3240for (var t = 0, n = r.length - 1; n >= 0; n--) {3241var o = r[n];3242"." === o3243? r.splice(n, 1)3244: ".." === o3245? (r.splice(n, 1), t++)3246: t && (r.splice(n, 1), t--);3247}3248if (e) for (; t; t--) r.unshift("..");3249return r;3250},3251normalize: function (r) {3252var e = "/" === r.charAt(0),3253t = "/" === r.substr(-1);3254return (3255(r = Y.normalizeArray(3256r.split("/").filter(function (r) {3257return !!r;3258}),3259!e3260).join("/")) ||3261e ||3262(r = "."),3263r && t && (r += "/"),3264(e ? "/" : "") + r3265);3266},3267dirname: function (r) {3268var e = Y.splitPath(r),3269t = e[0],3270n = e[1];3271return t || n3272? (n && (n = n.substr(0, n.length - 1)), t + n)3273: ".";3274},3275basename: function (r) {3276if ("/" === r) return "/";3277var e = (r = (r = Y.normalize(r)).replace(3278/\/$/,3279""3280)).lastIndexOf("/");3281return -1 === e ? r : r.substr(e + 1);3282},3283extname: function (r) {3284return Y.splitPath(r)[3];3285},3286join: function () {3287var r = Array.prototype.slice.call(arguments, 0);3288return Y.normalize(r.join("/"));3289},3290join2: function (r, e) {3291return Y.normalize(r + "/" + e);3292},3293},3294Q = {3295resolve: function () {3296for (3297var r = "", e = !1, t = arguments.length - 1;3298t >= -1 && !e;3299t--3300) {3301var n = t >= 0 ? arguments[t] : tr.cwd();3302if ("string" != typeof n) {3303throw new TypeError(3304"Arguments to path.resolve must be strings"3305);3306}3307if (!n) return "";3308(r = n + "/" + r), (e = "/" === n.charAt(0));3309}3310return (3311(e ? "/" : "") +3312(r = Y.normalizeArray(3313r.split("/").filter(function (r) {3314return !!r;3315}),3316!e3317).join("/")) || "."3318);3319},3320relative: function (r, e) {3321function t(r) {3322for (var e = 0; e < r.length && "" === r[e]; e++);3323for (var t = r.length - 1; t >= 0 && "" === r[t]; t--);3324return e > t ? [] : r.slice(e, t - e + 1);3325}3326(r = Q.resolve(r).substr(1)), (e = Q.resolve(e).substr(1));3327for (3328var n = t(r.split("/")),3329o = t(e.split("/")),3330a = Math.min(n.length, o.length),3331i = a,3332s = 0;3333s < a;3334s++3335) {3336if (n[s] !== o[s]) {3337i = s;3338break;3339}3340}3341var u = [];3342for (s = i; s < n.length; s++) {3343u.push("..");3344}3345return (u = u.concat(o.slice(i))).join("/");3346},3347},3348Z = {3349ttys: [],3350init: function () {},3351shutdown: function () {},3352register: function (r, e) {3353(Z.ttys[r] = { input: [], output: [], ops: e }),3354tr.registerDevice(r, Z.stream_ops);3355},3356stream_ops: {3357open: function (r) {3358var e = Z.ttys[r.node.rdev];3359if (!e) throw new tr.ErrnoError(43);3360(r.tty = e), (r.seekable = !1);3361},3362close: function (r) {3363r.tty.ops.flush(r.tty);3364},3365flush: function (r) {3366r.tty.ops.flush(r.tty);3367},3368read: function (r, e, t, n, o) {3369if (!r.tty || !r.tty.ops.get_char) {3370throw new tr.ErrnoError(60);3371}3372for (var a = 0, i = 0; i < n; i++) {3373var s;3374try {3375s = r.tty.ops.get_char(r.tty);3376} catch (r) {3377throw new tr.ErrnoError(29);3378}3379if (void 0 === s && 0 === a) throw new tr.ErrnoError(6);3380if (null == s) break;3381a++, (e[t + i] = s);3382}3383return a && (r.node.timestamp = Date.now()), a;3384},3385write: function (r, e, t, n, o) {3386if (!r.tty || !r.tty.ops.put_char) {3387throw new tr.ErrnoError(60);3388}3389try {3390for (var a = 0; a < n; a++) {3391r.tty.ops.put_char(r.tty, e[t + a]);3392}3393} catch (r) {3394throw new tr.ErrnoError(29);3395}3396return n && (r.node.timestamp = Date.now()), a;3397},3398},3399default_tty_ops: {3400get_char: function (r) {3401if (!r.input.length) {3402var e = null;3403if (3404("undefined" != typeof window &&3405"function" == typeof window.prompt3406? null !== (e = window.prompt("Input: ")) && (e += "\n")3407: "function" == typeof readline &&3408null !== (e = readline()) &&3409(e += "\n"),3410!e)3411) {3412return null;3413}3414r.input = dr(e, !0);3415}3416return r.input.shift();3417},3418put_char: function (r, e) {3419null === e || 10 === e3420? (d(A(r.output, 0)), (r.output = []))3421: 0 != e && r.output.push(e);3422},3423flush: function (r) {3424r.output &&3425r.output.length > 0 &&3426(d(A(r.output, 0)), (r.output = []));3427},3428},3429default_tty1_ops: {3430put_char: function (r, e) {3431null === e || 10 === e3432? (f(A(r.output, 0)), (r.output = []))3433: 0 != e && r.output.push(e);3434},3435flush: function (r) {3436r.output &&3437r.output.length > 0 &&3438(f(A(r.output, 0)), (r.output = []));3439},3440},3441};3442function rr(r) {3443r = (function (r, e) {3444return Math.ceil(r / e) * e;3445})(r, 65536);3446var e = br(65536, r);3447return e3448? ((function (r, e) {3449g.fill(0, r, r + e);3450})(e, r),3451e)3452: 0;3453}3454var er = {3455ops_table: null,3456mount: function (r) {3457return er.createNode(null, "/", 16895, 0);3458},3459createNode: function (r, e, t, n) {3460if (tr.isBlkdev(t) || tr.isFIFO(t)) throw new tr.ErrnoError(63);3461er.ops_table ||3462(er.ops_table = {3463dir: {3464node: {3465getattr: er.node_ops.getattr,3466setattr: er.node_ops.setattr,3467lookup: er.node_ops.lookup,3468mknod: er.node_ops.mknod,3469rename: er.node_ops.rename,3470unlink: er.node_ops.unlink,3471rmdir: er.node_ops.rmdir,3472readdir: er.node_ops.readdir,3473symlink: er.node_ops.symlink,3474},3475stream: { llseek: er.stream_ops.llseek },3476},3477file: {3478node: {3479getattr: er.node_ops.getattr,3480setattr: er.node_ops.setattr,3481},3482stream: {3483llseek: er.stream_ops.llseek,3484read: er.stream_ops.read,3485write: er.stream_ops.write,3486allocate: er.stream_ops.allocate,3487mmap: er.stream_ops.mmap,3488msync: er.stream_ops.msync,3489},3490},3491link: {3492node: {3493getattr: er.node_ops.getattr,3494setattr: er.node_ops.setattr,3495readlink: er.node_ops.readlink,3496},3497stream: {},3498},3499chrdev: {3500node: {3501getattr: er.node_ops.getattr,3502setattr: er.node_ops.setattr,3503},3504stream: tr.chrdev_stream_ops,3505},3506});3507var o = tr.createNode(r, e, t, n);3508return (3509tr.isDir(o.mode)3510? ((o.node_ops = er.ops_table.dir.node),3511(o.stream_ops = er.ops_table.dir.stream),3512(o.contents = {}))3513: tr.isFile(o.mode)3514? ((o.node_ops = er.ops_table.file.node),3515(o.stream_ops = er.ops_table.file.stream),3516(o.usedBytes = 0),3517(o.contents = null))3518: tr.isLink(o.mode)3519? ((o.node_ops = er.ops_table.link.node),3520(o.stream_ops = er.ops_table.link.stream))3521: tr.isChrdev(o.mode) &&3522((o.node_ops = er.ops_table.chrdev.node),3523(o.stream_ops = er.ops_table.chrdev.stream)),3524(o.timestamp = Date.now()),3525r && ((r.contents[e] = o), (r.timestamp = o.timestamp)),3526o3527);3528},3529getFileDataAsTypedArray: function (r) {3530return r.contents3531? r.contents.subarray3532? r.contents.subarray(0, r.usedBytes)3533: new Uint8Array(r.contents)3534: new Uint8Array(0);3535},3536expandFileStorage: function (r, e) {3537var t = r.contents ? r.contents.length : 0;3538if (!(t >= e)) {3539(e = Math.max(e, (t * (t < 1048576 ? 2 : 1.125)) >>> 0)),35400 != t && (e = Math.max(e, 256));3541var n = r.contents;3542(r.contents = new Uint8Array(e)),3543r.usedBytes > 0 &&3544r.contents.set(n.subarray(0, r.usedBytes), 0);3545}3546},3547resizeFileStorage: function (r, e) {3548if (r.usedBytes != e) {3549if (0 == e) (r.contents = null), (r.usedBytes = 0);3550else {3551var t = r.contents;3552(r.contents = new Uint8Array(e)),3553t &&3554r.contents.set(t.subarray(0, Math.min(e, r.usedBytes))),3555(r.usedBytes = e);3556}3557}3558},3559node_ops: {3560getattr: function (r) {3561var e = {};3562return (3563(e.dev = tr.isChrdev(r.mode) ? r.id : 1),3564(e.ino = r.id),3565(e.mode = r.mode),3566(e.nlink = 1),3567(e.uid = 0),3568(e.gid = 0),3569(e.rdev = r.rdev),3570tr.isDir(r.mode)3571? (e.size = 4096)3572: tr.isFile(r.mode)3573? (e.size = r.usedBytes)3574: tr.isLink(r.mode)3575? (e.size = r.link.length)3576: (e.size = 0),3577(e.atime = new Date(r.timestamp)),3578(e.mtime = new Date(r.timestamp)),3579(e.ctime = new Date(r.timestamp)),3580(e.blksize = 4096),3581(e.blocks = Math.ceil(e.size / e.blksize)),3582e3583);3584},3585setattr: function (r, e) {3586void 0 !== e.mode && (r.mode = e.mode),3587void 0 !== e.timestamp && (r.timestamp = e.timestamp),3588void 0 !== e.size && er.resizeFileStorage(r, e.size);3589},3590lookup: function (r, e) {3591throw tr.genericErrors[44];3592},3593mknod: function (r, e, t, n) {3594return er.createNode(r, e, t, n);3595},3596rename: function (r, e, t) {3597if (tr.isDir(r.mode)) {3598var n;3599try {3600n = tr.lookupNode(e, t);3601} catch (r) {}3602if (n) {3603for (var o in n.contents) throw new tr.ErrnoError(55);3604}3605}3606delete r.parent.contents[r.name],3607(r.parent.timestamp = Date.now()),3608(r.name = t),3609(e.contents[t] = r),3610(e.timestamp = r.parent.timestamp),3611(r.parent = e);3612},3613unlink: function (r, e) {3614delete r.contents[e], (r.timestamp = Date.now());3615},3616rmdir: function (r, e) {3617var t = tr.lookupNode(r, e);3618for (var n in t.contents) throw new tr.ErrnoError(55);3619delete r.contents[e], (r.timestamp = Date.now());3620},3621readdir: function (r) {3622var e = [".", ".."];3623for (var t in r.contents) {3624r.contents.hasOwnProperty(t) && e.push(t);3625}3626return e;3627},3628symlink: function (r, e, t) {3629var n = er.createNode(r, e, 41471, 0);3630return (n.link = t), n;3631},3632readlink: function (r) {3633if (!tr.isLink(r.mode)) throw new tr.ErrnoError(28);3634return r.link;3635},3636},3637stream_ops: {3638read: function (r, e, t, n, o) {3639var a = r.node.contents;3640if (o >= r.node.usedBytes) return 0;3641var i = Math.min(r.node.usedBytes - o, n);3642if (i > 8 && a.subarray) e.set(a.subarray(o, o + i), t);3643else for (var s = 0; s < i; s++) e[t + s] = a[o + s];3644return i;3645},3646write: function (r, e, t, n, o, a) {3647if ((e.buffer === E.buffer && (a = !1), !n)) return 0;3648var i = r.node;3649if (3650((i.timestamp = Date.now()),3651e.subarray && (!i.contents || i.contents.subarray))3652) {3653if (a) {3654return (3655(i.contents = e.subarray(t, t + n)),3656(i.usedBytes = n),3657n3658);3659}3660if (0 === i.usedBytes && 0 === o) {3661return (3662(i.contents = e.slice(t, t + n)), (i.usedBytes = n), n3663);3664}3665if (o + n <= i.usedBytes) {3666return i.contents.set(e.subarray(t, t + n), o), n;3667}3668}3669if (3670(er.expandFileStorage(i, o + n),3671i.contents.subarray && e.subarray)3672) {3673i.contents.set(e.subarray(t, t + n), o);3674} else {3675for (var s = 0; s < n; s++) i.contents[o + s] = e[t + s];3676}3677return (i.usedBytes = Math.max(i.usedBytes, o + n)), n;3678},3679llseek: function (r, e, t) {3680var n = e;3681if (3682(1 === t3683? (n += r.position)3684: 2 === t &&3685tr.isFile(r.node.mode) &&3686(n += r.node.usedBytes),3687n < 0)3688) {3689throw new tr.ErrnoError(28);3690}3691return n;3692},3693allocate: function (r, e, t) {3694er.expandFileStorage(r.node, e + t),3695(r.node.usedBytes = Math.max(r.node.usedBytes, e + t));3696},3697mmap: function (r, e, t, n, o, a) {3698if (0 !== e) throw new tr.ErrnoError(28);3699if (!tr.isFile(r.node.mode)) throw new tr.ErrnoError(43);3700var i,3701s,3702u = r.node.contents;3703if (2 & a || u.buffer !== y) {3704if (3705((n > 0 || n + t < u.length) &&3706(u = u.subarray3707? u.subarray(n, n + t)3708: Array.prototype.slice.call(u, n, n + t)),3709(s = !0),3710!(i = rr(t)))3711) {3712throw new tr.ErrnoError(48);3713}3714E.set(u, i);3715} else (s = !1), (i = u.byteOffset);3716return { ptr: i, allocated: s };3717},3718msync: function (r, e, t, n, o) {3719if (!tr.isFile(r.node.mode)) throw new tr.ErrnoError(43);3720return 2 & o || er.stream_ops.write(r, e, 0, n, t, !1), 0;3721},3722},3723},3724tr = {3725root: null,3726mounts: [],3727devices: {},3728streams: [],3729nextInode: 1,3730nameTable: null,3731currentPath: "/",3732initialized: !1,3733ignorePermissions: !0,3734ErrnoError: null,3735genericErrors: {},3736filesystems: null,3737syncFSRequests: 0,3738lookupPath: (r, e = {}) => {3739if (!(r = Q.resolve(tr.cwd(), r))) {3740return { path: "", node: null };3741}3742var t = { follow_mount: !0, recurse_count: 0 };3743for (var n in t) void 0 === e[n] && (e[n] = t[n]);3744if (e.recurse_count > 8) throw new tr.ErrnoError(32);3745for (3746var o = Y.normalizeArray(3747r.split("/").filter((r) => !!r),3748!13749),3750a = tr.root,3751i = "/",3752s = 0;3753s < o.length;3754s++3755) {3756var u = s === o.length - 1;3757if (u && e.parent) break;3758if (3759((a = tr.lookupNode(a, o[s])),3760(i = Y.join2(i, o[s])),3761tr.isMountpoint(a) &&3762(!u || (u && e.follow_mount)) &&3763(a = a.mounted.root),3764!u || e.follow)3765) {3766for (var c = 0; tr.isLink(a.mode); ) {3767var l = tr.readlink(i);3768if (3769((i = Q.resolve(Y.dirname(i), l)),3770(a = tr.lookupPath(i, {3771recurse_count: e.recurse_count,3772}).node),3773c++ > 40)3774) {3775throw new tr.ErrnoError(32);3776}3777}3778}3779}3780return { path: i, node: a };3781},3782getPath: (r) => {3783for (var e; ; ) {3784if (tr.isRoot(r)) {3785var t = r.mount.mountpoint;3786return e3787? "/" !== t[t.length - 1]3788? t + "/" + e3789: t + e3790: t;3791}3792(e = e ? r.name + "/" + e : r.name), (r = r.parent);3793}3794},3795hashName: (r, e) => {3796for (var t = 0, n = 0; n < e.length; n++) {3797t = ((t << 5) - t + e.charCodeAt(n)) | 0;3798}3799return ((r + t) >>> 0) % tr.nameTable.length;3800},3801hashAddNode: (r) => {3802var e = tr.hashName(r.parent.id, r.name);3803(r.name_next = tr.nameTable[e]), (tr.nameTable[e] = r);3804},3805hashRemoveNode: (r) => {3806var e = tr.hashName(r.parent.id, r.name);3807if (tr.nameTable[e] === r) tr.nameTable[e] = r.name_next;3808else {3809for (var t = tr.nameTable[e]; t; ) {3810if (t.name_next === r) {3811t.name_next = r.name_next;3812break;3813}3814t = t.name_next;3815}3816}3817},3818lookupNode: (r, e) => {3819var t = tr.mayLookup(r);3820if (t) throw new tr.ErrnoError(t, r);3821for (3822var n = tr.hashName(r.id, e), o = tr.nameTable[n];3823o;3824o = o.name_next3825) {3826var a = o.name;3827if (o.parent.id === r.id && a === e) return o;3828}3829return tr.lookup(r, e);3830},3831createNode: (r, e, t, n) => {3832var o = new tr.FSNode(r, e, t, n);3833return tr.hashAddNode(o), o;3834},3835destroyNode: (r) => {3836tr.hashRemoveNode(r);3837},3838isRoot: (r) => r === r.parent,3839isMountpoint: (r) => !!r.mounted,3840isFile: (r) => 32768 == (61440 & r),3841isDir: (r) => 16384 == (61440 & r),3842isLink: (r) => 40960 == (61440 & r),3843isChrdev: (r) => 8192 == (61440 & r),3844isBlkdev: (r) => 24576 == (61440 & r),3845isFIFO: (r) => 4096 == (61440 & r),3846isSocket: (r) => 49152 == (49152 & r),3847flagModes: {3848r: 0,3849"r+": 2,3850w: 577,3851"w+": 578,3852a: 1089,3853"a+": 1090,3854},3855modeStringToFlags: (r) => {3856var e = tr.flagModes[r];3857if (void 0 === e) {3858throw new Error("Unknown file open mode: " + r);3859}3860return e;3861},3862flagsToPermissionString: (r) => {3863var e = ["r", "w", "rw"][3 & r];3864return 512 & r && (e += "w"), e;3865},3866nodePermissions: (r, e) =>3867tr.ignorePermissions ||3868((!e.includes("r") || 292 & r.mode) &&3869(!e.includes("w") || 146 & r.mode) &&3870(!e.includes("x") || 73 & r.mode))3871? 03872: 2,3873mayLookup: (r) => {3874var e = tr.nodePermissions(r, "x");3875return e || (r.node_ops.lookup ? 0 : 2);3876},3877mayCreate: (r, e) => {3878try {3879return tr.lookupNode(r, e), 20;3880} catch (r) {}3881return tr.nodePermissions(r, "wx");3882},3883mayDelete: (r, e, t) => {3884var n;3885try {3886n = tr.lookupNode(r, e);3887} catch (r) {3888return r.errno;3889}3890var o = tr.nodePermissions(r, "wx");3891if (o) return o;3892if (t) {3893if (!tr.isDir(n.mode)) return 54;3894if (tr.isRoot(n) || tr.getPath(n) === tr.cwd()) return 10;3895} else if (tr.isDir(n.mode)) return 31;3896return 0;3897},3898mayOpen: (r, e) =>3899r3900? tr.isLink(r.mode)3901? 323902: tr.isDir(r.mode) &&3903("r" !== tr.flagsToPermissionString(e) || 512 & e)3904? 313905: tr.nodePermissions(r, tr.flagsToPermissionString(e))3906: 44,3907MAX_OPEN_FDS: 4096,3908nextfd: (r = 0, e = tr.MAX_OPEN_FDS) => {3909for (var t = r; t <= e; t++) {3910if (!tr.streams[t]) return t;3911}3912throw new tr.ErrnoError(33);3913},3914getStream: (r) => tr.streams[r],3915createStream: (r, e, t) => {3916tr.FSStream ||3917((tr.FSStream = function () {}),3918(tr.FSStream.prototype = {3919object: {3920get: function () {3921return this.node;3922},3923set: function (r) {3924this.node = r;3925},3926},3927isRead: {3928get: function () {3929return 1 != (2097155 & this.flags);3930},3931},3932isWrite: {3933get: function () {3934return 0 != (2097155 & this.flags);3935},3936},3937isAppend: {3938get: function () {3939return 1024 & this.flags;3940},3941},3942})),3943(r = Object.assign(new tr.FSStream(), r));3944var n = tr.nextfd(e, t);3945return (r.fd = n), (tr.streams[n] = r), r;3946},3947closeStream: (r) => {3948tr.streams[r] = null;3949},3950chrdev_stream_ops: {3951open: (r) => {3952var e = tr.getDevice(r.node.rdev);3953(r.stream_ops = e.stream_ops),3954r.stream_ops.open && r.stream_ops.open(r);3955},3956llseek: () => {3957throw new tr.ErrnoError(70);3958},3959},3960major: (r) => r >> 8,3961minor: (r) => 255 & r,3962makedev: (r, e) => (r << 8) | e,3963registerDevice: (r, e) => {3964tr.devices[r] = { stream_ops: e };3965},3966getDevice: (r) => tr.devices[r],3967getMounts: (r) => {3968for (var e = [], t = [r]; t.length; ) {3969var n = t.pop();3970e.push(n), t.push.apply(t, n.mounts);3971}3972return e;3973},3974syncfs: (r, e) => {3975"function" == typeof r && ((e = r), (r = !1)),3976tr.syncFSRequests++,3977tr.syncFSRequests > 1 &&3978f(3979"warning: " +3980tr.syncFSRequests +3981" FS.syncfs operations in flight at once, probably just doing extra work"3982);3983var t = tr.getMounts(tr.root.mount),3984n = 0;3985function o(r) {3986return tr.syncFSRequests--, e(r);3987}3988function a(r) {3989if (r) return a.errored ? void 0 : ((a.errored = !0), o(r));3990++n >= t.length && o(null);3991}3992t.forEach((e) => {3993if (!e.type.syncfs) return a(null);3994e.type.syncfs(e, r, a);3995});3996},3997mount: (r, e, t) => {3998var n,3999o = "/" === t,4000a = !t;4001if (o && tr.root) throw new tr.ErrnoError(10);4002if (!o && !a) {4003var i = tr.lookupPath(t, { follow_mount: !1 });4004if (((t = i.path), (n = i.node), tr.isMountpoint(n))) {4005throw new tr.ErrnoError(10);4006}4007if (!tr.isDir(n.mode)) {4008throw new tr.ErrnoError(54);4009}4010}4011var s = { type: r, opts: e, mountpoint: t, mounts: [] },4012u = r.mount(s);4013return (4014(u.mount = s),4015(s.root = u),4016o4017? (tr.root = u)4018: n && ((n.mounted = s), n.mount && n.mount.mounts.push(s)),4019u4020);4021},4022unmount: (r) => {4023var e = tr.lookupPath(r, { follow_mount: !1 });4024if (!tr.isMountpoint(e.node)) throw new tr.ErrnoError(28);4025var t = e.node,4026n = t.mounted,4027o = tr.getMounts(n);4028Object.keys(tr.nameTable).forEach((r) => {4029for (var e = tr.nameTable[r]; e; ) {4030var t = e.name_next;4031o.includes(e.mount) && tr.destroyNode(e), (e = t);4032}4033}),4034(t.mounted = null);4035var a = t.mount.mounts.indexOf(n);4036t.mount.mounts.splice(a, 1);4037},4038lookup: (r, e) => r.node_ops.lookup(r, e),4039mknod: (r, e, t) => {4040var n = tr.lookupPath(r, { parent: !0 }).node,4041o = Y.basename(r);4042if (!o || "." === o || ".." === o) {4043throw new tr.ErrnoError(28);4044}4045var a = tr.mayCreate(n, o);4046if (a) throw new tr.ErrnoError(a);4047if (!n.node_ops.mknod) throw new tr.ErrnoError(63);4048return n.node_ops.mknod(n, o, e, t);4049},4050create: (r, e) => (4051(e = void 0 !== e ? e : 438),4052(e &= 4095),4053(e |= 32768),4054tr.mknod(r, e, 0)4055),4056mkdir: (r, e) => (4057(e = void 0 !== e ? e : 511),4058(e &= 1023),4059(e |= 16384),4060tr.mknod(r, e, 0)4061),4062mkdirTree: (r, e) => {4063for (var t = r.split("/"), n = "", o = 0; o < t.length; ++o) {4064if (t[o]) {4065n += "/" + t[o];4066try {4067tr.mkdir(n, e);4068} catch (r) {4069if (20 != r.errno) throw r;4070}4071}4072}4073},4074mkdev: (r, e, t) => (4075void 0 === t && ((t = e), (e = 438)),4076(e |= 8192),4077tr.mknod(r, e, t)4078),4079symlink: (r, e) => {4080if (!Q.resolve(r)) throw new tr.ErrnoError(44);4081var t = tr.lookupPath(e, { parent: !0 }).node;4082if (!t) throw new tr.ErrnoError(44);4083var n = Y.basename(e),4084o = tr.mayCreate(t, n);4085if (o) throw new tr.ErrnoError(o);4086if (!t.node_ops.symlink) throw new tr.ErrnoError(63);4087return t.node_ops.symlink(t, n, r);4088},4089rename: (r, e) => {4090var t,4091n,4092o = Y.dirname(r),4093a = Y.dirname(e),4094i = Y.basename(r),4095s = Y.basename(e);4096if (4097((t = tr.lookupPath(r, { parent: !0 }).node),4098(n = tr.lookupPath(e, { parent: !0 }).node),4099!t || !n)4100) {4101throw new tr.ErrnoError(44);4102}4103if (t.mount !== n.mount) throw new tr.ErrnoError(75);4104var u,4105c = tr.lookupNode(t, i),4106l = Q.relative(r, a);4107if ("." !== l.charAt(0)) throw new tr.ErrnoError(28);4108if ("." !== (l = Q.relative(e, o)).charAt(0)) {4109throw new tr.ErrnoError(55);4110}4111try {4112u = tr.lookupNode(n, s);4113} catch (r) {}4114if (c !== u) {4115var d = tr.isDir(c.mode),4116f = tr.mayDelete(t, i, d);4117if (f) throw new tr.ErrnoError(f);4118if ((f = u ? tr.mayDelete(n, s, d) : tr.mayCreate(n, s))) {4119throw new tr.ErrnoError(f);4120}4121if (!t.node_ops.rename) throw new tr.ErrnoError(63);4122if (tr.isMountpoint(c) || (u && tr.isMountpoint(u))) {4123throw new tr.ErrnoError(10);4124}4125if (n !== t && (f = tr.nodePermissions(t, "w"))) {4126throw new tr.ErrnoError(f);4127}4128tr.hashRemoveNode(c);4129try {4130t.node_ops.rename(c, n, s);4131} catch (r) {4132throw r;4133} finally {4134tr.hashAddNode(c);4135}4136}4137},4138rmdir: (r) => {4139var e = tr.lookupPath(r, { parent: !0 }).node,4140t = Y.basename(r),4141n = tr.lookupNode(e, t),4142o = tr.mayDelete(e, t, !0);4143if (o) throw new tr.ErrnoError(o);4144if (!e.node_ops.rmdir) {4145throw new tr.ErrnoError(63);4146}4147if (tr.isMountpoint(n)) throw new tr.ErrnoError(10);4148e.node_ops.rmdir(e, t), tr.destroyNode(n);4149},4150readdir: (r) => {4151var e = tr.lookupPath(r, { follow: !0 }).node;4152if (!e.node_ops.readdir) throw new tr.ErrnoError(54);4153return e.node_ops.readdir(e);4154},4155unlink: (r) => {4156var e = tr.lookupPath(r, { parent: !0 }).node;4157if (!e) throw new tr.ErrnoError(44);4158var t = Y.basename(r),4159n = tr.lookupNode(e, t),4160o = tr.mayDelete(e, t, !1);4161if (o) throw new tr.ErrnoError(o);4162if (!e.node_ops.unlink) throw new tr.ErrnoError(63);4163if (tr.isMountpoint(n)) throw new tr.ErrnoError(10);4164e.node_ops.unlink(e, t), tr.destroyNode(n);4165},4166readlink: (r) => {4167var e = tr.lookupPath(r).node;4168if (!e) throw new tr.ErrnoError(44);4169if (!e.node_ops.readlink) throw new tr.ErrnoError(28);4170return Q.resolve(tr.getPath(e.parent), e.node_ops.readlink(e));4171},4172stat: (r, e) => {4173var t = tr.lookupPath(r, { follow: !e }).node;4174if (!t) throw new tr.ErrnoError(44);4175if (!t.node_ops.getattr) throw new tr.ErrnoError(63);4176return t.node_ops.getattr(t);4177},4178lstat: (r) => tr.stat(r, !0),4179chmod: (r, e, t) => {4180var n;4181if (4182!(n =4183"string" == typeof r4184? tr.lookupPath(r, { follow: !t }).node4185: r).node_ops.setattr4186) {4187throw new tr.ErrnoError(63);4188}4189n.node_ops.setattr(n, {4190mode: (4095 & e) | (-4096 & n.mode),4191timestamp: Date.now(),4192});4193},4194lchmod: (r, e) => {4195tr.chmod(r, e, !0);4196},4197fchmod: (r, e) => {4198var t = tr.getStream(r);4199if (!t) throw new tr.ErrnoError(8);4200tr.chmod(t.node, e);4201},4202chown: (r, e, t, n) => {4203var o;4204if (4205!(o =4206"string" == typeof r4207? tr.lookupPath(r, { follow: !n }).node4208: r).node_ops.setattr4209) {4210throw new tr.ErrnoError(63);4211}4212o.node_ops.setattr(o, { timestamp: Date.now() });4213},4214lchown: (r, e, t) => {4215tr.chown(r, e, t, !0);4216},4217fchown: (r, e, t) => {4218var n = tr.getStream(r);4219if (!n) throw new tr.ErrnoError(8);4220tr.chown(n.node, e, t);4221},4222truncate: (r, e) => {4223if (e < 0) throw new tr.ErrnoError(28);4224var t;4225if (4226!(t =4227"string" == typeof r4228? tr.lookupPath(r, { follow: !0 }).node4229: r).node_ops.setattr4230) {4231throw new tr.ErrnoError(63);4232}4233if (tr.isDir(t.mode)) throw new tr.ErrnoError(31);4234if (!tr.isFile(t.mode)) throw new tr.ErrnoError(28);4235var n = tr.nodePermissions(t, "w");4236if (n) throw new tr.ErrnoError(n);4237t.node_ops.setattr(t, { size: e, timestamp: Date.now() });4238},4239ftruncate: (r, e) => {4240var t = tr.getStream(r);4241if (!t) throw new tr.ErrnoError(8);4242if (0 == (2097155 & t.flags)) throw new tr.ErrnoError(28);4243tr.truncate(t.node, e);4244},4245utime: (r, e, t) => {4246var n = tr.lookupPath(r, { follow: !0 }).node;4247n.node_ops.setattr(n, { timestamp: Math.max(e, t) });4248},4249open: (r, e, t, n, a) => {4250if ("" === r) throw new tr.ErrnoError(44);4251var i;4252if (4253((t = void 0 === t ? 438 : t),4254(t =425564 &4256(e = "string" == typeof e ? tr.modeStringToFlags(e) : e)4257? (4095 & t) | 327684258: 0),4259"object" == typeof r)4260) {4261i = r;4262} else {4263r = Y.normalize(r);4264try {4265i = tr.lookupPath(r, { follow: !(131072 & e) }).node;4266} catch (r) {}4267}4268var s = !1;4269if (64 & e) {4270if (i)4271if (128 & e) throw new tr.ErrnoError(20);4272else (i = tr.mknod(r, t, 0)), (s = !0);4273}4274if (!i) throw new tr.ErrnoError(44);4275if (4276(tr.isChrdev(i.mode) && (e &= -513),427765536 & e && !tr.isDir(i.mode))4278) {4279throw new tr.ErrnoError(54);4280}4281if (!s) {4282var u = tr.mayOpen(i, e);4283if (u) throw new tr.ErrnoError(u);4284}4285512 & e && tr.truncate(i, 0), (e &= -131713);4286var c = tr.createStream(4287{4288node: i,4289path: tr.getPath(i),4290flags: e,4291seekable: !0,4292position: 0,4293stream_ops: i.stream_ops,4294ungotten: [],4295error: !1,4296},4297n,4298a4299);4300return (4301c.stream_ops.open && c.stream_ops.open(c),4302!o.logReadFiles ||43031 & e ||4304(tr.readFiles || (tr.readFiles = {}),4305r in tr.readFiles || (tr.readFiles[r] = 1)),4306c4307);4308},4309close: (r) => {4310if (tr.isClosed(r)) throw new tr.ErrnoError(8);4311r.getdents && (r.getdents = null);4312try {4313r.stream_ops.close && r.stream_ops.close(r);4314} catch (r) {4315throw r;4316} finally {4317tr.closeStream(r.fd);4318}4319r.fd = null;4320},4321isClosed: (r) => null === r.fd,4322llseek: (r, e, t) => {4323if (tr.isClosed(r)) throw new tr.ErrnoError(8);4324if (!r.seekable || !r.stream_ops.llseek) {4325throw new tr.ErrnoError(70);4326}4327if (0 != t && 1 != t && 2 != t) throw new tr.ErrnoError(28);4328return (4329(r.position = r.stream_ops.llseek(r, e, t)),4330(r.ungotten = []),4331r.position4332);4333},4334read: (r, e, t, n, o) => {4335if (n < 0 || o < 0) throw new tr.ErrnoError(28);4336if (tr.isClosed(r)) {4337throw new tr.ErrnoError(8);4338}4339if (1 == (2097155 & r.flags)) throw new tr.ErrnoError(8);4340if (tr.isDir(r.node.mode)) throw new tr.ErrnoError(31);4341if (!r.stream_ops.read) throw new tr.ErrnoError(28);4342var a = void 0 !== o;4343if (a)4344if (!r.seekable) throw new tr.ErrnoError(70);4345else o = r.position;4346var i = r.stream_ops.read(r, e, t, n, o);4347return a || (r.position += i), i;4348},4349write: (r, e, t, n, o, a) => {4350if (n < 0 || o < 0) throw new tr.ErrnoError(28);4351if (tr.isClosed(r)) throw new tr.ErrnoError(8);4352if (0 == (2097155 & r.flags)) throw new tr.ErrnoError(8);4353if (tr.isDir(r.node.mode)) throw new tr.ErrnoError(31);4354if (!r.stream_ops.write) throw new tr.ErrnoError(28);4355r.seekable && 1024 & r.flags && tr.llseek(r, 0, 2);4356var i = void 0 !== o;4357if (i)4358if (!r.seekable) throw new tr.ErrnoError(70);4359else o = r.position;4360var s = r.stream_ops.write(r, e, t, n, o, a);4361return i || (r.position += s), s;4362},4363allocate: (r, e, t) => {4364if (tr.isClosed(r)) throw new tr.ErrnoError(8);4365if (e < 0 || t <= 0) throw new tr.ErrnoError(28);4366if (0 == (2097155 & r.flags)) throw new tr.ErrnoError(8);4367if (!tr.isFile(r.node.mode) && !tr.isDir(r.node.mode)) {4368throw new tr.ErrnoError(43);4369}4370if (!r.stream_ops.allocate) throw new tr.ErrnoError(138);4371r.stream_ops.allocate(r, e, t);4372},4373mmap: (r, e, t, n, o, a) => {4374if (0 != (2 & o) && 0 == (2 & a) && 2 != (2097155 & r.flags)) {4375throw new tr.ErrnoError(2);4376}4377if (1 == (2097155 & r.flags)) throw new tr.ErrnoError(2);4378if (!r.stream_ops.mmap) throw new tr.ErrnoError(43);4379return r.stream_ops.mmap(r, e, t, n, o, a);4380},4381msync: (r, e, t, n, o) =>4382r && r.stream_ops.msync ? r.stream_ops.msync(r, e, t, n, o) : 0,4383munmap: (r) => 0,4384ioctl: (r, e, t) => {4385if (!r.stream_ops.ioctl) throw new tr.ErrnoError(59);4386return r.stream_ops.ioctl(r, e, t);4387},4388readFile: (r, e = {}) => {4389if (4390((e.flags = e.flags || 0),4391(e.encoding = e.encoding || "binary"),4392"utf8" !== e.encoding && "binary" !== e.encoding)4393) {4394throw new Error('Invalid encoding type "' + e.encoding + '"');4395}4396var t,4397n = tr.open(r, e.flags),4398o = tr.stat(r).size,4399a = new Uint8Array(o);4400return (4401tr.read(n, a, 0, o, 0),4402"utf8" === e.encoding4403? (t = A(a, 0))4404: "binary" === e.encoding && (t = a),4405tr.close(n),4406t4407);4408},4409writeFile: (r, e, t = {}) => {4410t.flags = t.flags || 577;4411var n = tr.open(r, t.flags, t.mode);4412if ("string" == typeof e) {4413var o = new Uint8Array(M(e) + 1),4414a = x(e, o, 0, o.length);4415tr.write(n, o, 0, a, void 0, t.canOwn);4416} else {4417if (!ArrayBuffer.isView(e)) {4418throw new Error("Unsupported data type");4419}4420tr.write(n, e, 0, e.byteLength, void 0, t.canOwn);4421}4422tr.close(n);4423},4424cwd: () => tr.currentPath,4425chdir: (r) => {4426var e = tr.lookupPath(r, { follow: !0 });4427if (null === e.node) throw new tr.ErrnoError(44);4428if (!tr.isDir(e.node.mode)) throw new tr.ErrnoError(54);4429var t = tr.nodePermissions(e.node, "x");4430if (t) throw new tr.ErrnoError(t);4431tr.currentPath = e.path;4432},4433createDefaultDirectories: () => {4434tr.mkdir("/tmp"), tr.mkdir("/home"), tr.mkdir("/home/web_user");4435},4436createDefaultDevices: () => {4437tr.mkdir("/dev"),4438tr.registerDevice(tr.makedev(1, 3), {4439read: () => 0,4440write: (r, e, t, n, o) => n,4441}),4442tr.mkdev("/dev/null", tr.makedev(1, 3)),4443Z.register(tr.makedev(5, 0), Z.default_tty_ops),4444Z.register(tr.makedev(6, 0), Z.default_tty1_ops),4445tr.mkdev("/dev/tty", tr.makedev(5, 0)),4446tr.mkdev("/dev/tty1", tr.makedev(6, 0));4447var r = (function () {4448if (4449"object" == typeof crypto &&4450"function" == typeof crypto.getRandomValues4451) {4452var r = new Uint8Array(1);4453return function () {4454return crypto.getRandomValues(r), r[0];4455};4456}4457return function () {4458G("randomDevice");4459};4460})();4461tr.createDevice("/dev", "random", r),4462tr.createDevice("/dev", "urandom", r),4463tr.mkdir("/dev/shm"),4464tr.mkdir("/dev/shm/tmp");4465},4466createSpecialDirectories: () => {4467tr.mkdir("/proc");4468var r = tr.mkdir("/proc/self");4469tr.mkdir("/proc/self/fd"),4470tr.mount(4471{4472mount: () => {4473var e = tr.createNode(r, "fd", 16895, 73);4474return (4475(e.node_ops = {4476lookup: (r, e) => {4477var t = +e,4478n = tr.getStream(t);4479if (!n) throw new tr.ErrnoError(8);4480var o = {4481parent: null,4482mount: { mountpoint: "fake" },4483node_ops: { readlink: () => n.path },4484};4485return (o.parent = o), o;4486},4487}),4488e4489);4490},4491},4492{},4493"/proc/self/fd"4494);4495},4496createStandardStreams: () => {4497o.stdin4498? tr.createDevice("/dev", "stdin", o.stdin)4499: tr.symlink("/dev/tty", "/dev/stdin"),4500o.stdout4501? tr.createDevice("/dev", "stdout", null, o.stdout)4502: tr.symlink("/dev/tty", "/dev/stdout"),4503o.stderr4504? tr.createDevice("/dev", "stderr", null, o.stderr)4505: tr.symlink("/dev/tty1", "/dev/stderr"),4506tr.open("/dev/stdin", 0),4507tr.open("/dev/stdout", 1),4508tr.open("/dev/stderr", 1);4509},4510ensureErrnoError: () => {4511tr.ErrnoError ||4512((tr.ErrnoError = function (r, e) {4513(this.node = e),4514(this.setErrno = function (r) {4515this.errno = r;4516}),4517this.setErrno(r),4518(this.message = "FS error");4519}),4520(tr.ErrnoError.prototype = new Error()),4521(tr.ErrnoError.prototype.constructor = tr.ErrnoError),4522[44].forEach((r) => {4523(tr.genericErrors[r] = new tr.ErrnoError(r)),4524(tr.genericErrors[r].stack = "<generic error, no stack>");4525}));4526},4527staticInit: () => {4528tr.ensureErrnoError(),4529(tr.nameTable = new Array(4096)),4530tr.mount(er, {}, "/"),4531tr.createDefaultDirectories(),4532tr.createDefaultDevices(),4533tr.createSpecialDirectories(),4534(tr.filesystems = { MEMFS: er });4535},4536init: (r, e, t) => {4537(tr.init.initialized = !0),4538tr.ensureErrnoError(),4539(o.stdin = r || o.stdin),4540(o.stdout = e || o.stdout),4541(o.stderr = t || o.stderr),4542tr.createStandardStreams();4543},4544quit: () => {4545tr.init.initialized = !1;4546for (var r = 0; r < tr.streams.length; r++) {4547var e = tr.streams[r];4548e && tr.close(e);4549}4550},4551getMode: (r, e) => {4552var t = 0;4553return r && (t |= 365), e && (t |= 146), t;4554},4555findObject: (r, e) => {4556var t = tr.analyzePath(r, e);4557return t.exists ? t.object : null;4558},4559analyzePath: (r, e) => {4560try {4561r = (n = tr.lookupPath(r, { follow: !e })).path;4562} catch (r) {}4563var t = {4564isRoot: !1,4565exists: !1,4566error: 0,4567name: null,4568path: null,4569object: null,4570parentExists: !1,4571parentPath: null,4572parentObject: null,4573};4574try {4575var n = tr.lookupPath(r, { parent: !0 });4576(t.parentExists = !0),4577(t.parentPath = n.path),4578(t.parentObject = n.node),4579(t.name = Y.basename(r)),4580(n = tr.lookupPath(r, { follow: !e })),4581(t.exists = !0),4582(t.path = n.path),4583(t.object = n.node),4584(t.name = n.node.name),4585(t.isRoot = "/" === n.path);4586} catch (r) {4587t.error = r.errno;4588}4589return t;4590},4591createPath: (r, e, t, n) => {4592r = "string" == typeof r ? r : tr.getPath(r);4593for (var o = e.split("/").reverse(); o.length; ) {4594var a = o.pop();4595if (a) {4596var i = Y.join2(r, a);4597try {4598tr.mkdir(i);4599} catch (r) {}4600r = i;4601}4602}4603return i;4604},4605createFile: (r, e, t, n, o) => {4606var a = Y.join2("string" == typeof r ? r : tr.getPath(r), e),4607i = tr.getMode(n, o);4608return tr.create(a, i);4609},4610createDataFile: (r, e, t, n, o, a) => {4611var i = e;4612r &&4613((r = "string" == typeof r ? r : tr.getPath(r)),4614(i = e ? Y.join2(r, e) : r));4615var s = tr.getMode(n, o),4616u = tr.create(i, s);4617if (t) {4618if ("string" == typeof t) {4619for (4620var c = new Array(t.length), l = 0, d = t.length;4621l < d;4622++l4623) {4624c[l] = t.charCodeAt(l);4625}4626t = c;4627}4628tr.chmod(u, 146 | s);4629var f = tr.open(u, 577);4630tr.write(f, t, 0, t.length, 0, a),4631tr.close(f),4632tr.chmod(u, s);4633}4634return u;4635},4636createDevice: (r, e, t, n) => {4637var o = Y.join2("string" == typeof r ? r : tr.getPath(r), e),4638a = tr.getMode(!!t, !!n);4639tr.createDevice.major || (tr.createDevice.major = 64);4640var i = tr.makedev(tr.createDevice.major++, 0);4641return (4642tr.registerDevice(i, {4643open: (r) => {4644r.seekable = !1;4645},4646close: (r) => {4647n && n.buffer && n.buffer.length && n(10);4648},4649read: (r, e, n, o, a) => {4650for (var i = 0, s = 0; s < o; s++) {4651var u;4652try {4653u = t();4654} catch (r) {4655throw new tr.ErrnoError(29);4656}4657if (void 0 === u && 0 === i) throw new tr.ErrnoError(6);4658if (null == u) break;4659i++, (e[n + s] = u);4660}4661return i && (r.node.timestamp = Date.now()), i;4662},4663write: (r, e, t, o, a) => {4664for (var i = 0; i < o; i++) {4665try {4666n(e[t + i]);4667} catch (r) {4668throw new tr.ErrnoError(29);4669}4670}4671return o && (r.node.timestamp = Date.now()), i;4672},4673}),4674tr.mkdev(o, a, i)4675);4676},4677forceLoadFile: (r) => {4678if (r.isDevice || r.isFolder || r.link || r.contents) {4679return !0;4680}4681if ("undefined" != typeof XMLHttpRequest) {4682throw new Error(4683"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."4684);4685}4686if (!a) {4687throw new Error(4688"Cannot load without read() or XMLHttpRequest."4689);4690}4691try {4692(r.contents = dr(a(r.url), !0)),4693(r.usedBytes = r.contents.length);4694} catch (r) {4695throw new tr.ErrnoError(29);4696}4697},4698createLazyFile: (r, e, t, n, o) => {4699function a() {4700(this.lengthKnown = !1), (this.chunks = []);4701}4702if (4703((a.prototype.get = function (r) {4704if (!(r > this.length - 1 || r < 0)) {4705var e = r % this.chunkSize,4706t = (r / this.chunkSize) | 0;4707return this.getter(t)[e];4708}4709}),4710(a.prototype.setDataGetter = function (r) {4711this.getter = r;4712}),4713(a.prototype.cacheLength = function () {4714var r = new XMLHttpRequest();4715if (4716(r.open("HEAD", t, !1),4717r.send(null),4718!(4719(r.status >= 200 && r.status < 300) ||4720304 === r.status4721))4722) {4723throw new Error(4724"Couldn't load " + t + ". Status: " + r.status4725);4726}4727var e,4728n = Number(r.getResponseHeader("Content-length")),4729o =4730(e = r.getResponseHeader("Accept-Ranges")) &&4731"bytes" === e,4732a =4733(e = r.getResponseHeader("Content-Encoding")) &&4734"gzip" === e,4735i = 1048576;4736o || (i = n);4737var s = this;4738s.setDataGetter((r) => {4739var e = r * i,4740o = (r + 1) * i - 1;4741if (4742((o = Math.min(o, n - 1)),4743void 0 === s.chunks[r] &&4744(s.chunks[r] = ((r, e) => {4745if (r > e) {4746throw new Error(4747"invalid range (" +4748r +4749", " +4750e +4751") or no bytes requested!"4752);4753}4754if (e > n - 1) {4755throw new Error(4756"only " +4757n +4758" bytes available! programmer error!"4759);4760}4761var o = new XMLHttpRequest();4762if (4763(o.open("GET", t, !1),4764n !== i &&4765o.setRequestHeader(4766"Range",4767"bytes=" + r + "-" + e4768),4769(o.responseType = "arraybuffer"),4770o.overrideMimeType &&4771o.overrideMimeType(4772"text/plain; charset=x-user-defined"4773),4774o.send(null),4775!(4776(o.status >= 200 && o.status < 300) ||4777304 === o.status4778))4779) {4780throw new Error(4781"Couldn't load " + t + ". Status: " + o.status4782);4783}4784return void 0 !== o.response4785? new Uint8Array(o.response || [])4786: dr(o.responseText || "", !0);4787})(e, o)),4788void 0 === s.chunks[r])4789) {4790throw new Error("doXHR failed!");4791}4792return s.chunks[r];4793}),4794(!a && n) ||4795((i = n = 1),4796(n = this.getter(0).length),4797(i = n),4798d(4799"LazyFiles on gzip forces download of the whole file when length is accessed"4800)),4801(this._length = n),4802(this._chunkSize = i),4803(this.lengthKnown = !0);4804}),4805"undefined" != typeof XMLHttpRequest)4806) {4807throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";4808}4809var i = { isDevice: !1, url: t },4810s = tr.createFile(r, e, i, n, o);4811i.contents4812? (s.contents = i.contents)4813: i.url && ((s.contents = null), (s.url = i.url)),4814Object.defineProperties(s, {4815usedBytes: {4816get: function () {4817return this.contents.length;4818},4819},4820});4821var u = {};4822return (4823Object.keys(s.stream_ops).forEach((r) => {4824var e = s.stream_ops[r];4825u[r] = function () {4826return tr.forceLoadFile(s), e.apply(null, arguments);4827};4828}),4829(u.read = (r, e, t, n, o) => {4830tr.forceLoadFile(s);4831var a = r.node.contents;4832if (o >= a.length) return 0;4833var i = Math.min(a.length - o, n);4834if (a.slice) {4835for (var u = 0; u < i; u++) e[t + u] = a[o + u];4836} else for (u = 0; u < i; u++) e[t + u] = a.get(o + u);4837return i;4838}),4839(s.stream_ops = u),4840s4841);4842},4843createPreloadedFile: (r, e, t, n, o, a, s, u, c, l) => {4844var d = e ? Q.resolve(Y.join2(r, e)) : r;4845function f(t) {4846function i(t) {4847l && l(),4848u || tr.createDataFile(r, e, t, n, o, c),4849a && a(),4850U();4851}4852Browser.handledByPreloadPlugin(t, d, i, () => {4853s && s(), U();4854}) || i(t);4855}4856H(),4857"string" == typeof t4858? (function (r, e, t, n) {4859var o = n ? "" : "al " + r;4860i(4861r,4862function (t) {4863_(4864t,4865'Loading data file "' +4866r +4867'" failed (no arrayBuffer).'4868),4869e(new Uint8Array(t)),4870o && U();4871},4872function (e) {4873if (!t)4874throw 'Loading data file "' + r + '" failed.';4875t();4876}4877),4878o && H();4879})(t, (r) => f(r), s)4880: f(t);4881},4882indexedDB: () =>4883window.indexedDB ||4884window.mozIndexedDB ||4885window.webkitIndexedDB ||4886window.msIndexedDB,4887DB_NAME: () => "EM_FS_" + window.location.pathname,4888DB_VERSION: 20,4889DB_STORE_NAME: "FILE_DATA",4890saveFilesToDB: (r, e, t) => {4891(e = e || (() => {})), (t = t || (() => {}));4892var n = tr.indexedDB();4893try {4894var o = n.open(tr.DB_NAME(), tr.DB_VERSION);4895} catch (r) {4896return t(r);4897}4898(o.onupgradeneeded = () => {4899d("creating db"),4900o.result.createObjectStore(tr.DB_STORE_NAME);4901}),4902(o.onsuccess = () => {4903var n = o.result.transaction(4904[tr.DB_STORE_NAME],4905"readwrite"4906),4907a = n.objectStore(tr.DB_STORE_NAME),4908i = 0,4909s = 0,4910u = r.length;4911function c() {49120 == s ? e() : t();4913}4914r.forEach((r) => {4915var e = a.put(tr.analyzePath(r).object.contents, r);4916(e.onsuccess = () => {4917++i + s == u && c();4918}),4919(e.onerror = () => {4920s++, i + s == u && c();4921});4922}),4923(n.onerror = t);4924}),4925(o.onerror = t);4926},4927loadFilesFromDB: (r, e, t) => {4928(e = e || (() => {})), (t = t || (() => {}));4929var n = tr.indexedDB();4930try {4931var o = n.open(tr.DB_NAME(), tr.DB_VERSION);4932} catch (r) {4933return t(r);4934}4935(o.onupgradeneeded = t),4936(o.onsuccess = () => {4937var n = o.result;4938try {4939var a = n.transaction([tr.DB_STORE_NAME], "readonly");4940} catch (r) {4941return void t(r);4942}4943var i = a.objectStore(tr.DB_STORE_NAME),4944s = 0,4945u = 0,4946c = r.length;4947function l() {49480 == u ? e() : t();4949}4950r.forEach((r) => {4951var e = i.get(r);4952(e.onsuccess = () => {4953tr.analyzePath(r).exists && tr.unlink(r),4954tr.createDataFile(4955Y.dirname(r),4956Y.basename(r),4957e.result,4958!0,4959!0,4960!04961),4962++s + u == c && l();4963}),4964(e.onerror = () => {4965u++, s + u == c && l();4966});4967}),4968(a.onerror = t);4969}),4970(o.onerror = t);4971},4972},4973nr = {4974DEFAULT_POLLMASK: 5,4975calculateAt: function (r, e, t) {4976if ("/" === e[0]) return e;4977var n;4978if (-100 === r) n = tr.cwd();4979else {4980var o = tr.getStream(r);4981if (!o) throw new tr.ErrnoError(8);4982n = o.path;4983}4984if (0 == e.length) {4985if (!t) throw new tr.ErrnoError(44);4986return n;4987}4988return Y.join2(n, e);4989},4990doStat: function (r, e, t) {4991try {4992var n = r(e);4993} catch (r) {4994if (4995r &&4996r.node &&4997Y.normalize(e) !== Y.normalize(tr.getPath(r.node))4998) {4999return -54;5000}5001throw r;5002}5003return (5004(k[t >> 2] = n.dev),5005(k[(t + 4) >> 2] = 0),5006(k[(t + 8) >> 2] = n.ino),5007(k[(t + 12) >> 2] = n.mode),5008(k[(t + 16) >> 2] = n.nlink),5009(k[(t + 20) >> 2] = n.uid),5010(k[(t + 24) >> 2] = n.gid),5011(k[(t + 28) >> 2] = n.rdev),5012(k[(t + 32) >> 2] = 0),5013(j = [5014n.size >>> 0,5015((B = n.size),5016+Math.abs(B) >= 15017? B > 05018? (0 |5019Math.min(5020+Math.floor(B / 4294967296),502142949672955022)) >>>502305024: ~~+Math.ceil((B - +(~~B >>> 0)) / 4294967296) >>> 05025: 0),5026]),5027(k[(t + 40) >> 2] = j[0]),5028(k[(t + 44) >> 2] = j[1]),5029(k[(t + 48) >> 2] = 4096),5030(k[(t + 52) >> 2] = n.blocks),5031(k[(t + 56) >> 2] = (n.atime.getTime() / 1e3) | 0),5032(k[(t + 60) >> 2] = 0),5033(k[(t + 64) >> 2] = (n.mtime.getTime() / 1e3) | 0),5034(k[(t + 68) >> 2] = 0),5035(k[(t + 72) >> 2] = (n.ctime.getTime() / 1e3) | 0),5036(k[(t + 76) >> 2] = 0),5037(j = [5038n.ino >>> 0,5039((B = n.ino),5040+Math.abs(B) >= 15041? B > 05042? (0 |5043Math.min(5044+Math.floor(B / 4294967296),504542949672955046)) >>>504705048: ~~+Math.ceil((B - +(~~B >>> 0)) / 4294967296) >>> 05049: 0),5050]),5051(k[(t + 80) >> 2] = j[0]),5052(k[(t + 84) >> 2] = j[1]),505305054);5055},5056doMsync: function (r, e, t, n, o) {5057var a = g.slice(r, r + t);5058tr.msync(e, a, o, t, n);5059},5060doMkdir: function (r, e) {5061return (5062"/" === (r = Y.normalize(r))[r.length - 1] &&5063(r = r.substr(0, r.length - 1)),5064tr.mkdir(r, e, 0),506505066);5067},5068doMknod: function (r, e, t) {5069switch (61440 & e) {5070case 32768:5071case 8192:5072case 24576:5073case 4096:5074case 49152:5075break;5076default:5077return -28;5078}5079return tr.mknod(r, e, t), 0;5080},5081doReadlink: function (r, e, t) {5082if (t <= 0) return -28;5083var n = tr.readlink(r),5084o = Math.min(t, M(n)),5085a = E[e + o];5086return x(n, g, e, t + 1), (E[e + o] = a), o;5087},5088doAccess: function (r, e) {5089if (-8 & e) return -28;5090var t = tr.lookupPath(r, { follow: !0 }).node;5091if (!t) return -44;5092var n = "";5093return (50944 & e && (n += "r"),50952 & e && (n += "w"),50961 & e && (n += "x"),5097n && tr.nodePermissions(t, n) ? -2 : 05098);5099},5100doDup: function (r, e, t) {5101var n = tr.getStream(t);5102return n && tr.close(n), tr.open(r, e, 0, t, t).fd;5103},5104doReadv: function (r, e, t, n) {5105for (var o = 0, a = 0; a < t; a++) {5106var i = k[(e + 8 * a) >> 2],5107s = k[(e + (8 * a + 4)) >> 2],5108u = tr.read(r, E, i, s, n);5109if (u < 0) return -1;5110if (((o += u), u < s)) break;5111}5112return o;5113},5114doWritev: function (r, e, t, n) {5115for (var o = 0, a = 0; a < t; a++) {5116var i = k[(e + 8 * a) >> 2],5117s = k[(e + (8 * a + 4)) >> 2],5118u = tr.write(r, E, i, s, n);5119if (u < 0) return -1;5120o += u;5121}5122return o;5123},5124varargs: void 0,5125get: function () {5126return (nr.varargs += 4), k[(nr.varargs - 4) >> 2];5127},5128getStr: function (r) {5129return F(r);5130},5131getStreamFromFD: function (r) {5132var e = tr.getStream(r);5133if (!e) throw new tr.ErrnoError(8);5134return e;5135},5136get64: function (r, e) {5137return r;5138},5139},5140or = [];5141function ar(r) {5142try {5143return h.grow((r - y.byteLength + 65535) >>> 16), R(h.buffer), 1;5144} catch (r) {}5145}5146var ir = {};5147function sr() {5148if (!sr.strings) {5149var r = {5150USER: "web_user",5151LOGNAME: "web_user",5152PATH: "/",5153PWD: "/",5154HOME: "/home/web_user",5155LANG:5156(5157("object" == typeof navigator &&5158navigator.languages &&5159navigator.languages[0]) ||5160"C"5161).replace("-", "_") + ".UTF-8",5162_: u || "./this.program",5163};5164for (var e in ir) void 0 === ir[e] ? delete r[e] : (r[e] = ir[e]);5165var t = [];5166for (var e in r) t.push(e + "=" + r[e]);5167sr.strings = t;5168}5169return sr.strings;5170}5171var ur = function (r, e, t, n) {5172r || (r = this),5173(this.parent = r),5174(this.mount = r.mount),5175(this.mounted = null),5176(this.id = tr.nextInode++),5177(this.name = e),5178(this.mode = t),5179(this.node_ops = {}),5180(this.stream_ops = {}),5181(this.rdev = n);5182},5183cr = 365,5184lr = 146;5185function dr(r, e, t) {5186var n = t > 0 ? t : M(r) + 1,5187o = new Array(n),5188a = x(r, o, 0, o.length);5189return e && (o.length = a), o;5190}5191Object.defineProperties(ur.prototype, {5192read: {5193get: function () {5194return (this.mode & cr) === cr;5195},5196set: function (r) {5197r ? (this.mode |= cr) : (this.mode &= -366);5198},5199},5200write: {5201get: function () {5202return (this.mode & lr) === lr;5203},5204set: function (r) {5205r ? (this.mode |= lr) : (this.mode &= -147);5206},5207},5208isFolder: {5209get: function () {5210return tr.isDir(this.mode);5211},5212},5213isDevice: {5214get: function () {5215return tr.isChrdev(this.mode);5216},5217},5218}),5219(tr.FSNode = ur),5220tr.staticInit();5221var fr = {5222s: function (r, e) {5223return (function (r, e) {5224var t;5225if (0 === r) t = Date.now();5226else {5227if (1 !== r && 4 !== r) return K(28), -1;5228t = J();5229}5230return (5231(k[e >> 2] = (t / 1e3) | 0),5232(k[(e + 4) >> 2] = ((t % 1e3) * 1e3 * 1e3) | 0),523305234);5235})(r, e);5236},5237j: function (r, e, t, n) {5238try {5239return (5240(e = nr.getStr(e)),5241(e = nr.calculateAt(r, e)),5242nr.doAccess(e, t)5243);5244} catch (r) {5245if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5246return -r.errno;5247}5248},5249i: function (r, e, t) {5250nr.varargs = t;5251try {5252var n = nr.getStreamFromFD(r);5253switch (e) {5254case 0:5255return (o = nr.get()) < 05256? -285257: tr.open(n.path, n.flags, 0, o).fd;5258case 1:5259case 2:5260case 6:5261case 7:5262return 0;5263case 3:5264return n.flags;5265case 4:5266var o = nr.get();5267return (n.flags |= o), 0;5268case 5:5269return (o = nr.get()), (b[(o + 0) >> 1] = 2), 0;5270case 16:5271case 8:5272default:5273return -28;5274case 9:5275return K(28), -1;5276}5277} catch (r) {5278if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5279return -r.errno;5280}5281},5282z: function (r, e) {5283try {5284var t = nr.getStreamFromFD(r);5285return nr.doStat(tr.stat, t.path, e);5286} catch (r) {5287if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5288return -r.errno;5289}5290},5291x: function (r, e, t, n) {5292try {5293e = nr.getStr(e);5294var o = 256 & n,5295a = 4096 & n;5296return (5297(n &= -4353),5298(e = nr.calculateAt(r, e, a)),5299nr.doStat(o ? tr.lstat : tr.stat, e, t)5300);5301} catch (r) {5302if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5303return -r.errno;5304}5305},5306A: function (r, e, t) {5307nr.varargs = t;5308try {5309var n = nr.getStreamFromFD(r);5310switch (e) {5311case 21509:5312case 21505:5313case 21510:5314case 21511:5315case 21512:5316case 21506:5317case 21507:5318case 21508:5319case 21523:5320case 21524:5321return n.tty ? 0 : -59;5322case 21519:5323if (!n.tty) return -59;5324var o = nr.get();5325return (k[o >> 2] = 0), 0;5326case 21520:5327return n.tty ? -28 : -59;5328case 21531:5329return (o = nr.get()), tr.ioctl(n, e, o);5330default:5331G("bad ioctl syscall " + e);5332}5333} catch (r) {5334if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5335return -r.errno;5336}5337},5338d: function (r, e, t) {5339nr.varargs = t;5340try {5341var n = nr.getStr(r),5342o = t ? nr.get() : 0;5343return tr.open(n, e, o).fd;5344} catch (r) {5345if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5346return -r.errno;5347}5348},5349y: function (r, e) {5350try {5351return (r = nr.getStr(r)), nr.doStat(tr.stat, r, e);5352} catch (r) {5353if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5354return -r.errno;5355}5356},5357r: function (r) {5358try {5359return (r = nr.getStr(r)), tr.unlink(r), 0;5360} catch (r) {5361if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5362return -r.errno;5363}5364},5365p: function () {5366throw 1 / 0;5367},5368t: function (r, e, t, n, o, a, i, s) {5369try {5370var u = tr.getStream(o);5371if (!u) return -8;5372var c = tr.mmap(u, r, e, a, t, n),5373l = c.ptr;5374return (k[i >> 2] = c.allocated), l;5375} catch (r) {5376if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5377return -r.errno;5378}5379},5380u: function (r, e, t, n, o, a) {5381try {5382var i = tr.getStream(o);5383i && (2 & t && nr.doMsync(r, i, e, n, a), tr.munmap(i));5384} catch (r) {5385if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5386return -r.errno;5387}5388},5389o: function () {5390G("");5391},5392C: function (r, e, t) {5393var n = (function (r, e) {5394var t;5395for (or.length = 0, e >>= 2; (t = g[r++]); ) {5396var n = t < 105;5397n && 1 & e && e++, or.push(n ? D[e++ >> 1] : k[e]), ++e;5398}5399return or;5400})(e, t);5401return V[r].apply(null, n);5402},5403B: function (r, e, t) {5404g.copyWithin(r, e, e + t);5405},5406q: function (r) {5407var e,5408t,5409n = g.length,5410o = 2147483648;5411if ((r >>>= 0) > o) return !1;5412for (var a = 1; a <= 4; a *= 2) {5413var i = n * (1 + 0.2 / a);5414if (5415((i = Math.min(i, r + 100663296)),5416ar(5417Math.min(5418o,5419(e = Math.max(r, i)) + (((t = 65536) - (e % t)) % t)5420)5421))5422) {5423return !0;5424}5425}5426return !1;5427},5428v: function (r, e) {5429var t = 0;5430return (5431sr().forEach(function (n, o) {5432var a = e + t;5433(k[(r + 4 * o) >> 2] = a),5434(function (r, e, t) {5435for (var n = 0; n < r.length; ++n) {5436E[e++ >> 0] = r.charCodeAt(n);5437}5438t || (E[e >> 0] = 0);5439})(n, a),5440(t += n.length + 1);5441}),544205443);5444},5445w: function (r, e) {5446var t = sr();5447k[r >> 2] = t.length;5448var n = 0;5449return (5450t.forEach(function (r) {5451n += r.length + 1;5452}),5453(k[e >> 2] = n),545405455);5456},5457e: function (r) {5458!(function (r, e) {5459var t;5460(t = r),5461v || (o.onExit && o.onExit(t), (w = !0)),5462c(t, new Pr(t));5463})(r);5464},5465c: function (r) {5466try {5467var e = nr.getStreamFromFD(r);5468return tr.close(e), 0;5469} catch (r) {5470if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5471return r.errno;5472}5473},5474g: function (r, e, t, n) {5475try {5476var o = nr.getStreamFromFD(r),5477a = nr.doReadv(o, e, t);5478return (k[n >> 2] = a), 0;5479} catch (r) {5480if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5481return r.errno;5482}5483},5484n: function (r, e, t, n, o) {5485try {5486var a = nr.getStreamFromFD(r),5487i = 4294967296 * t + (e >>> 0),5488s = 9007199254740992;5489return i <= -s || i >= s5490? -615491: (tr.llseek(a, i, n),5492(j = [5493a.position >>> 0,5494((B = a.position),5495+Math.abs(B) >= 15496? B > 05497? (0 |5498Math.min(5499+Math.floor(B / 4294967296),550042949672955501)) >>>550205503: ~~+Math.ceil((B - +(~~B >>> 0)) / 4294967296) >>> 05504: 0),5505]),5506(k[o >> 2] = j[0]),5507(k[(o + 4) >> 2] = j[1]),5508a.getdents && 0 === i && 0 === n && (a.getdents = null),55090);5510} catch (r) {5511if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5512return r.errno;5513}5514},5515h: function (r, e, t, n) {5516try {5517var o = nr.getStreamFromFD(r),5518a = nr.doWritev(o, e, t);5519return (k[n >> 2] = a), 0;5520} catch (r) {5521if (void 0 === tr || !(r instanceof tr.ErrnoError)) throw r;5522return r.errno;5523}5524},5525b: function () {5526return m;5527},5528k: function (r) {5529var e = Date.now();5530return (5531(k[r >> 2] = (e / 1e3) | 0),5532(k[(r + 4) >> 2] = ((e % 1e3) * 1e3) | 0),553305534);5535},5536l: function (r, e, t, n, o, a, i) {5537var s = Dr();5538try {5539return $(r)(e, t, n, o, a, i);5540} catch (r) {5541if ((Sr(s), r !== r + 0)) throw r;5542kr(1, 0);5543}5544},5545m: function (r, e) {5546var t = Dr();5547try {5548$(r)(e);5549} catch (r) {5550if ((Sr(t), r !== r + 0)) throw r;5551kr(1, 0);5552}5553},5554a: function (r) {5555m = r;5556},5557f: function (r) {5558var e = (Date.now() / 1e3) | 0;5559return r && (k[r >> 2] = e), e;5560},5561};5562!(function () {5563var r = { a: fr };5564function e(r, e) {5565var t,5566n = r.exports;5567(o.asm = n),5568R((h = o.asm.D).buffer),5569(S = o.asm.M),5570(t = o.asm.E),5571N.unshift(t),5572U();5573}5574function t(r) {5575e(r.instance);5576}5577function a(e) {5578return Promise.resolve()5579.then(function () {5580const module = graphvizWasmModule();5581const instance = new WebAssembly.Instance(module, r);5582return { module, instance };5583// return WebAssembly.instantiate(e, r);5584})5585.then(function (r) {5586return r;5587})5588.then(e, function (r) {5589f("failed to asynchronously prepare wasm: " + r), G(r);5590});5591}5592if ((H(), o.instantiateWasm)) {5593try {5594return o.instantiateWasm(r, e);5595} catch (r) {5596return (5597f("Module.instantiateWasm callback failed with error: " + r),5598!15599);5600}5601}56025603a(t).catch(n);5604})(),5605(o.___wasm_call_ctors = function () {5606return (o.___wasm_call_ctors = o.asm.E).apply(null, arguments);5607});5608var pr = (o._emscripten_bind_VoidPtr___destroy___0 = function () {5609return (pr = o._emscripten_bind_VoidPtr___destroy___0 =5610o.asm.F).apply(null, arguments);5611}),5612mr = (o._emscripten_bind_Graphviz_Graphviz_2 = function () {5613return (mr = o._emscripten_bind_Graphviz_Graphviz_2 =5614o.asm.G).apply(null, arguments);5615}),5616hr = (o._emscripten_bind_Graphviz_version_0 = function () {5617return (hr = o._emscripten_bind_Graphviz_version_0 =5618o.asm.H).apply(null, arguments);5619}),5620vr = (o._emscripten_bind_Graphviz_lastError_0 = function () {5621return (vr = o._emscripten_bind_Graphviz_lastError_0 =5622o.asm.I).apply(null, arguments);5623}),5624wr = (o._emscripten_bind_Graphviz_layout_3 = function () {5625return (wr = o._emscripten_bind_Graphviz_layout_3 =5626o.asm.J).apply(null, arguments);5627}),5628_r = (o._emscripten_bind_Graphviz_createFile_2 = function () {5629return (_r = o._emscripten_bind_Graphviz_createFile_2 =5630o.asm.K).apply(null, arguments);5631}),5632yr = (o._emscripten_bind_Graphviz___destroy___0 = function () {5633return (yr = o._emscripten_bind_Graphviz___destroy___0 =5634o.asm.L).apply(null, arguments);5635});5636(o._malloc = function () {5637return (o._malloc = o.asm.N).apply(null, arguments);5638}),5639(o._free = function () {5640return (o._free = o.asm.O).apply(null, arguments);5641});5642var Er,5643gr = (o.___errno_location = function () {5644return (gr = o.___errno_location = o.asm.P).apply(5645null,5646arguments5647);5648}),5649br = (o._emscripten_builtin_memalign = function () {5650return (br = o._emscripten_builtin_memalign = o.asm.Q).apply(5651null,5652arguments5653);5654}),5655kr = (o._setThrew = function () {5656return (kr = o._setThrew = o.asm.R).apply(null, arguments);5657}),5658Dr = (o.stackSave = function () {5659return (Dr = o.stackSave = o.asm.S).apply(null, arguments);5660}),5661Sr = (o.stackRestore = function () {5662return (Sr = o.stackRestore = o.asm.T).apply(null, arguments);5663});5664function Pr(r) {5665(this.name = "ExitStatus"),5666(this.message = "Program terminated with exit(" + r + ")"),5667(this.status = r);5668}5669function Ar(r) {5670function t() {5671Er ||5672((Er = !0),5673(o.calledRun = !0),5674w ||5675(o.noFSInit || tr.init.initialized || tr.init(),5676(tr.ignorePermissions = !1),5677X(N),5678e(o),5679o.onRuntimeInitialized && o.onRuntimeInitialized(),5680(function () {5681if (o.postRun) {5682for (5683"function" == typeof o.postRun &&5684(o.postRun = [o.postRun]);5685o.postRun.length;56865687) {5688(r = o.postRun.shift()), O.unshift(r);5689}5690}5691var r;5692X(O);5693})()));5694}5695L > 0 ||5696((function () {5697if (o.preRun) {5698for (5699"function" == typeof o.preRun && (o.preRun = [o.preRun]);5700o.preRun.length;57015702) {5703(r = o.preRun.shift()), T.unshift(r);5704}5705}5706var r;5707X(T);5708})(),5709L > 0 ||5710(o.setStatus5711? (o.setStatus("Running..."),5712setTimeout(function () {5713setTimeout(function () {5714o.setStatus("");5715}, 1),5716t();5717}, 1))5718: t()));5719}5720if (5721((I = function r() {5722Er || Ar(), Er || (I = r);5723}),5724(o.run = Ar),5725o.preInit)5726) {5727for (5728"function" == typeof o.preInit && (o.preInit = [o.preInit]);5729o.preInit.length > 0;57305731) {5732o.preInit.pop()();5733}5734}5735function Fr() {}5736function xr(r) {5737return (r || Fr).__cache__;5738}5739function Mr(r, e) {5740var t = xr(e),5741n = t[r];5742return (5743n ||5744(((n = Object.create((e || Fr).prototype)).ptr = r), (t[r] = n))5745);5746}5747Ar(),5748(Fr.prototype = Object.create(Fr.prototype)),5749(Fr.prototype.constructor = Fr),5750(Fr.prototype.__class__ = Fr),5751(Fr.__cache__ = {}),5752(o.WrapperObject = Fr),5753(o.getCache = xr),5754(o.wrapPointer = Mr),5755(o.castObject = function (r, e) {5756return Mr(r.ptr, e);5757}),5758(o.NULL = Mr(0)),5759(o.destroy = function (r) {5760if (!r.__destroy__) {5761throw "Error: Cannot destroy object. (Did you create it yourself?)";5762}5763r.__destroy__(), delete xr(r.__class__)[r.ptr];5764}),5765(o.compare = function (r, e) {5766return r.ptr === e.ptr;5767}),5768(o.getPointer = function (r) {5769return r.ptr;5770}),5771(o.getClass = function (r) {5772return r.__class__;5773});5774var Rr = {5775buffer: 0,5776size: 0,5777pos: 0,5778temps: [],5779needed: 0,5780prepare: function () {5781if (Rr.needed) {5782for (var r = 0; r < Rr.temps.length; r++) o._free(Rr.temps[r]);5783(Rr.temps.length = 0),5784o._free(Rr.buffer),5785(Rr.buffer = 0),5786(Rr.size += Rr.needed),5787(Rr.needed = 0);5788}5789Rr.buffer ||5790((Rr.size += 128),5791(Rr.buffer = o._malloc(Rr.size)),5792_(Rr.buffer)),5793(Rr.pos = 0);5794},5795alloc: function (r, e) {5796_(Rr.buffer);5797var t,5798n = e.BYTES_PER_ELEMENT,5799a = r.length * n;5800return (5801(a = (a + 7) & -8),5802Rr.pos + a >= Rr.size5803? (_(a > 0),5804(Rr.needed += a),5805(t = o._malloc(a)),5806Rr.temps.push(t))5807: ((t = Rr.buffer + Rr.pos), (Rr.pos += a)),5808t5809);5810},5811copy: function (r, e, t) {5812switch (((t >>>= 0), e.BYTES_PER_ELEMENT)) {5813case 2:5814t >>>= 1;5815break;5816case 4:5817t >>>= 2;5818break;5819case 8:5820t >>>= 3;5821}5822for (var n = 0; n < r.length; n++) e[t + n] = r[n];5823},5824};5825function Cr(r) {5826if ("string" == typeof r) {5827var e = dr(r),5828t = Rr.alloc(e, E);5829return Rr.copy(e, E, t), t;5830}5831return r;5832}5833function zr() {5834throw "cannot construct a VoidPtr, no constructor in IDL";5835}5836function Br(r, e) {5837r && "object" == typeof r && (r = r.ptr),5838e && "object" == typeof e && (e = e.ptr),5839(this.ptr = mr(r, e)),5840(xr(Br)[this.ptr] = this);5841}5842return (5843(zr.prototype = Object.create(Fr.prototype)),5844(zr.prototype.constructor = zr),5845(zr.prototype.__class__ = zr),5846(zr.__cache__ = {}),5847(o.VoidPtr = zr),5848(zr.prototype.__destroy__ = zr.prototype.__destroy__ =5849function () {5850var r = this.ptr;5851pr(r);5852}),5853(Br.prototype = Object.create(Fr.prototype)),5854(Br.prototype.constructor = Br),5855(Br.prototype.__class__ = Br),5856(Br.__cache__ = {}),5857(o.Graphviz = Br),5858(Br.prototype.version = Br.prototype.version =5859function () {5860var r = this.ptr;5861return F(hr(r));5862}),5863(Br.prototype.lastError = Br.prototype.lastError =5864function () {5865var r = this.ptr;5866return F(vr(r));5867}),5868(Br.prototype.layout = Br.prototype.layout =5869function (r, e, t) {5870var n = this.ptr;5871return (5872Rr.prepare(),5873(r = r && "object" == typeof r ? r.ptr : Cr(r)),5874(e = e && "object" == typeof e ? e.ptr : Cr(e)),5875(t = t && "object" == typeof t ? t.ptr : Cr(t)),5876F(wr(n, r, e, t))5877);5878}),5879(Br.prototype.createFile = Br.prototype.createFile =5880function (r, e) {5881var t = this.ptr;5882Rr.prepare(),5883(r = r && "object" == typeof r ? r.ptr : Cr(r)),5884(e = e && "object" == typeof e ? e.ptr : Cr(e)),5885_r(t, r, e);5886}),5887(Br.prototype.__destroy__ = Br.prototype.__destroy__ =5888function () {5889var r = this.ptr;5890yr(r);5891}),5892r.ready5893);5894});5895r.exports = n;5896})(c);5897var l = e({ __proto__: null, default: c.exports }, [c.exports]);5898function d(r) {5899return {5900path: r.path,5901data: `<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="${r.width}" height="${r.height}"></svg>`,5902};5903}5904function f(r, e) {5905const t = { images: [], files: [], ...e };5906var n;5907[...t.files, ...((n = t.images), n.map(d))].forEach((e) =>5908r.createFile(e.path, e.data)5909);5910}5911const p = {5912layout: (r, e = "svg", t = "dot", n) =>5913r5914? i(5915l,5916null == n ? void 0 : n.wasmFolder,5917null == n ? void 0 : n.wasmBinary5918).then((o) => {5919const a = new o.Graphviz(5920void 0 !== (null == n ? void 0 : n.yInvert) &&5921(null == n ? void 0 : n.yInvert),5922void 0 !== (null == n ? void 0 : n.nop)5923? null == n5924? void 05925: n.nop5926: 05927);5928f(a, n);5929const i = a.layout(r, e, t);5930if ((o.destroy(a), !i)) {5931throw new Error(o.Graphviz.prototype.lastError());5932}5933return i;5934})5935: Promise.resolve(""),5936circo(r, e = "svg", t) {5937return this.layout(r, e, "circo", t);5938},5939dot(r, e = "svg", t) {5940return this.layout(r, e, "dot", t);5941},5942fdp(r, e = "svg", t) {5943return this.layout(r, e, "fdp", t);5944},5945sfdp(r, e = "svg", t) {5946return this.layout(r, e, "sfdp", t);5947},5948neato(r, e = "svg", t) {5949return this.layout(r, e, "neato", t);5950},5951osage(r, e = "svg", t) {5952return this.layout(r, e, "osage", t);5953},5954patchwork(r, e = "svg", t) {5955return this.layout(r, e, "patchwork", t);5956},5957twopi(r, e = "svg", t) {5958return this.layout(r, e, "twopi", t);5959},5960};5961class m {5962constructor(r) {5963this._wasm = r;5964}5965layout(r, e = "svg", t = "dot", n) {5966if (!r) return "";5967const o = new this._wasm.Graphviz(5968(null == n ? void 0 : n.yInvert) ? 1 : 0,5969(null == n ? void 0 : n.nop) ? (null == n ? void 0 : n.nop) : 05970);5971f(o, n);5972const a = o.layout(r, e, t);5973if ((this._wasm.destroy(o), !a)) {5974throw new Error(this._wasm.Graphviz.prototype.lastError());5975}5976return a;5977}5978circo(r, e = "svg", t) {5979return this.layout(r, e, "circo", t);5980}5981dot(r, e = "svg", t) {5982return this.layout(r, e, "dot", t);5983}5984fdp(r, e = "svg", t) {5985return this.layout(r, e, "fdp", t);5986}5987sfdp(r, e = "svg", t) {5988return this.layout(r, e, "sfdp", t);5989}5990neato(r, e = "svg", t) {5991return this.layout(r, e, "neato", t);5992}5993osage(r, e = "svg", t) {5994return this.layout(r, e, "osage", t);5995}5996patchwork(r, e = "svg", t) {5997return this.layout(r, e, "patchwork", t);5998}5999twopi(r, e = "svg", t) {6000return this.layout(r, e, "twopi", t);6001}6002}6003(r.GraphvizSync = m),6004(r.StackElement = s),6005(r.StackParser = class {6006constructor() {6007this._stack = [];6008}6009parse(r, e, t) {6010return u(r, this, e, t);6011}6012top() {6013return this._stack[this._stack.length - 1];6014}6015startElement(r, e) {6016const t = new s(r, e);6017return this._stack.push(t), t;6018}6019endElement(r) {6020return this._stack.pop();6021}6022characterData(r) {6023this.top().appendContent(r);6024}6025}),6026(r.expatVersion = function (r, e) {6027return i(n, r, e).then((r) => r.CExpat.prototype.version());6028}),6029(r.graphviz = p),6030(r.graphvizSync = function (r, e) {6031return i(l, r, e).then((r) => new m(r));6032}),6033(r.graphvizVersion = function (r, e) {6034return i(l, r, e).then((r) => r.Graphviz.prototype.version());6035}),6036(r.parse = u),6037(r.wasmFolder = a),6038Object.defineProperty(r, "__esModule", { value: !0 });6039});604060416042