@sec-ant/zxing-wasm
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,20 +0,20 @@ | ||
import { g as fi, r as ci, d as N, a as li, w as di, c as q } from "../core-407013f0.js"; | ||
import { Z as wi, b as bi, p as Pi, s as Ci } from "../core-407013f0.js"; | ||
var ke = (() => { | ||
import { g as ui, r as fi, d as N, a as ci, w as li, c as q } from "../core-a879f5a9.js"; | ||
import { Z as mi, b as wi, p as bi, s as Pi } from "../core-a879f5a9.js"; | ||
var De = (() => { | ||
var W = import.meta.url; | ||
return function(H = {}) { | ||
var u = typeof H < "u" ? H : {}, B, J; | ||
u.ready = new Promise(function(e, r) { | ||
B = e, J = r; | ||
u.ready = new Promise(function(e, t) { | ||
B = e, J = t; | ||
}); | ||
var ve = Object.assign({}, u), pe = "./this.program", Ge = typeof window == "object", he = typeof importScripts == "function"; | ||
var ve = Object.assign({}, u), pe = "./this.program", Xe = typeof window == "object", he = typeof importScripts == "function"; | ||
typeof process == "object" && typeof process.versions == "object" && process.versions.node; | ||
var j = ""; | ||
function Or(e) { | ||
function Ot(e) { | ||
return u.locateFile ? u.locateFile(e, j) : j + e; | ||
} | ||
var De; | ||
(Ge || he) && (he ? j = self.location.href : typeof document < "u" && document.currentScript && (j = document.currentScript.src), W && (j = W), j.indexOf("blob:") !== 0 ? j = j.substr(0, j.replace(/[?#].*/, "").lastIndexOf("/") + 1) : j = "", he && (De = (e) => { | ||
var r = new XMLHttpRequest(); | ||
return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response); | ||
var ke; | ||
(Xe || he) && (he ? j = self.location.href : typeof document < "u" && document.currentScript && (j = document.currentScript.src), W && (j = W), j.indexOf("blob:") !== 0 ? j = j.substr(0, j.replace(/[?#].*/, "").lastIndexOf("/") + 1) : j = "", he && (ke = (e) => { | ||
var t = new XMLHttpRequest(); | ||
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response); | ||
})), u.print || console.log.bind(console); | ||
@@ -25,113 +25,113 @@ var ne = u.printErr || console.warn.bind(console); | ||
u.wasmBinary && (ie = u.wasmBinary), u.noExitRuntime, typeof WebAssembly != "object" && Q("no native wasm support detected"); | ||
var _e, qe = !1; | ||
function Wr(e, r) { | ||
e || Q(r); | ||
var _e, Ze = !1; | ||
function Wt(e, t) { | ||
e || Q(t); | ||
} | ||
var U, k, K, ge, T, F, Je, Ke; | ||
function Qe() { | ||
var U, D, K, ge, T, E, Ge, qe; | ||
function Je() { | ||
var e = _e.buffer; | ||
u.HEAP8 = U = new Int8Array(e), u.HEAP16 = K = new Int16Array(e), u.HEAP32 = T = new Int32Array(e), u.HEAPU8 = k = new Uint8Array(e), u.HEAPU16 = ge = new Uint16Array(e), u.HEAPU32 = F = new Uint32Array(e), u.HEAPF32 = Je = new Float32Array(e), u.HEAPF64 = Ke = new Float64Array(e); | ||
u.HEAP8 = U = new Int8Array(e), u.HEAP16 = K = new Int16Array(e), u.HEAP32 = T = new Int32Array(e), u.HEAPU8 = D = new Uint8Array(e), u.HEAPU16 = ge = new Uint16Array(e), u.HEAPU32 = E = new Uint32Array(e), u.HEAPF32 = Ge = new Float32Array(e), u.HEAPF64 = qe = new Float64Array(e); | ||
} | ||
var er, rr = [], tr = [], nr = []; | ||
function jr() { | ||
var Ke, Qe = [], et = [], tt = []; | ||
function jt() { | ||
if (u.preRun) | ||
for (typeof u.preRun == "function" && (u.preRun = [u.preRun]); u.preRun.length; ) | ||
Mr(u.preRun.shift()); | ||
Oe(rr); | ||
Mt(u.preRun.shift()); | ||
Oe(Qe); | ||
} | ||
function Ur() { | ||
Oe(tr); | ||
function Ut() { | ||
Oe(et); | ||
} | ||
function Hr() { | ||
function Ht() { | ||
if (u.postRun) | ||
for (typeof u.postRun == "function" && (u.postRun = [u.postRun]); u.postRun.length; ) | ||
xr(u.postRun.shift()); | ||
Oe(nr); | ||
xt(u.postRun.shift()); | ||
Oe(tt); | ||
} | ||
function Mr(e) { | ||
rr.unshift(e); | ||
function Mt(e) { | ||
Qe.unshift(e); | ||
} | ||
function Ir(e) { | ||
tr.unshift(e); | ||
function It(e) { | ||
et.unshift(e); | ||
} | ||
function xr(e) { | ||
nr.unshift(e); | ||
function xt(e) { | ||
tt.unshift(e); | ||
} | ||
var z = 0, ae = null; | ||
function Yr(e) { | ||
function Yt(e) { | ||
z++, u.monitorRunDependencies && u.monitorRunDependencies(z); | ||
} | ||
function Vr(e) { | ||
function Vt(e) { | ||
if (z--, u.monitorRunDependencies && u.monitorRunDependencies(z), z == 0 && ae) { | ||
var r = ae; | ||
ae = null, r(); | ||
var t = ae; | ||
ae = null, t(); | ||
} | ||
} | ||
function Q(e) { | ||
u.onAbort && u.onAbort(e), e = "Aborted(" + e + ")", ne(e), qe = !0, e += ". Build with -sASSERTIONS for more info."; | ||
var r = new WebAssembly.RuntimeError(e); | ||
throw J(r), r; | ||
u.onAbort && u.onAbort(e), e = "Aborted(" + e + ")", ne(e), Ze = !0, e += ". Build with -sASSERTIONS for more info."; | ||
var t = new WebAssembly.RuntimeError(e); | ||
throw J(t), t; | ||
} | ||
var Br = "data:application/octet-stream;base64,"; | ||
function ir(e) { | ||
return e.startsWith(Br); | ||
var Bt = "data:application/octet-stream;base64,"; | ||
function rt(e) { | ||
return e.startsWith(Bt); | ||
} | ||
var X; | ||
u.locateFile ? (X = "zxing_full.wasm", ir(X) || (X = Or(X))) : X = new URL("/full/zxing_full.wasm", self.location).href; | ||
function ar(e) { | ||
u.locateFile ? (X = "zxing_full.wasm", rt(X) || (X = Ot(X))) : X = new URL("/full/zxing_full.wasm", self.location).href; | ||
function nt(e) { | ||
try { | ||
if (e == X && ie) | ||
return new Uint8Array(ie); | ||
if (De) | ||
return De(e); | ||
if (ke) | ||
return ke(e); | ||
throw "both async and sync fetching of the wasm failed"; | ||
} catch (r) { | ||
Q(r); | ||
} catch (t) { | ||
Q(t); | ||
} | ||
} | ||
function Lr(e) { | ||
return !ie && (Ge || he) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(r) { | ||
if (!r.ok) | ||
function Lt(e) { | ||
return !ie && (Xe || he) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(t) { | ||
if (!t.ok) | ||
throw "failed to load wasm binary file at '" + e + "'"; | ||
return r.arrayBuffer(); | ||
return t.arrayBuffer(); | ||
}).catch(function() { | ||
return ar(e); | ||
return nt(e); | ||
}) : Promise.resolve().then(function() { | ||
return ar(e); | ||
return nt(e); | ||
}); | ||
} | ||
function or(e, r, t) { | ||
return Lr(e).then(function(n) { | ||
return WebAssembly.instantiate(n, r); | ||
function it(e, t, r) { | ||
return Lt(e).then(function(n) { | ||
return WebAssembly.instantiate(n, t); | ||
}).then(function(n) { | ||
return n; | ||
}).then(t, function(n) { | ||
}).then(r, function(n) { | ||
ne("failed to asynchronously prepare wasm: " + n), Q(n); | ||
}); | ||
} | ||
function Nr(e, r, t, n) { | ||
return !e && typeof WebAssembly.instantiateStreaming == "function" && !ir(r) && typeof fetch == "function" ? fetch(r, { credentials: "same-origin" }).then(function(i) { | ||
var a = WebAssembly.instantiateStreaming(i, t); | ||
function Nt(e, t, r, n) { | ||
return !e && typeof WebAssembly.instantiateStreaming == "function" && !rt(t) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then(function(i) { | ||
var a = WebAssembly.instantiateStreaming(i, r); | ||
return a.then(n, function(s) { | ||
return ne("wasm streaming compile failed: " + s), ne("falling back to ArrayBuffer instantiation"), or(r, t, n); | ||
return ne("wasm streaming compile failed: " + s), ne("falling back to ArrayBuffer instantiation"), it(t, r, n); | ||
}); | ||
}) : or(r, t, n); | ||
}) : it(t, r, n); | ||
} | ||
function zr() { | ||
var e = { a: kn }; | ||
function r(n, i) { | ||
function zt() { | ||
var e = { a: Rn }; | ||
function t(n, i) { | ||
var a = n.exports; | ||
return u.asm = a, _e = u.asm.oa, Qe(), er = u.asm.ta, Ir(u.asm.pa), Vr(), a; | ||
return u.asm = a, _e = u.asm.oa, Je(), Ke = u.asm.ta, It(u.asm.pa), Vt(), a; | ||
} | ||
Yr(); | ||
function t(n) { | ||
r(n.instance); | ||
Yt(); | ||
function r(n) { | ||
t(n.instance); | ||
} | ||
if (u.instantiateWasm) | ||
try { | ||
return u.instantiateWasm(e, r); | ||
return u.instantiateWasm(e, t); | ||
} catch (n) { | ||
ne("Module.instantiateWasm callback failed with error: " + n), J(n); | ||
} | ||
return Nr(ie, X, e, t).catch(J), {}; | ||
return Nt(ie, X, e, r).catch(J), {}; | ||
} | ||
@@ -143,66 +143,66 @@ function Oe(e) { | ||
var ye = []; | ||
function Xr(e) { | ||
function Xt(e) { | ||
e.add_ref(); | ||
} | ||
var me = 0; | ||
function Zr(e) { | ||
var r = new be(e); | ||
return r.get_caught() || (r.set_caught(!0), me--), r.set_rethrown(!1), ye.push(r), Xr(r), r.get_exception_ptr(); | ||
function Zt(e) { | ||
var t = new be(e); | ||
return t.get_caught() || (t.set_caught(!0), me--), t.set_rethrown(!1), ye.push(t), Xt(t), t.get_exception_ptr(); | ||
} | ||
var M = 0, we = []; | ||
function m(e) { | ||
var r = we[e]; | ||
return r || (e >= we.length && (we.length = e + 1), we[e] = r = er.get(e)), r; | ||
var t = we[e]; | ||
return t || (e >= we.length && (we.length = e + 1), we[e] = t = Ke.get(e)), t; | ||
} | ||
function Gr(e) { | ||
function Gt(e) { | ||
if (e.release_ref() && !e.get_rethrown()) { | ||
var r = e.get_destructor(); | ||
r && m(r)(e.excPtr), Ar(e.excPtr); | ||
var t = e.get_destructor(); | ||
t && m(t)(e.excPtr), At(e.excPtr); | ||
} | ||
} | ||
function qr() { | ||
function qt() { | ||
y(0); | ||
var e = ye.pop(); | ||
Gr(e), M = 0; | ||
Gt(e), M = 0; | ||
} | ||
function be(e) { | ||
this.excPtr = e, this.ptr = e - 24, this.set_type = function(r) { | ||
F[this.ptr + 4 >> 2] = r; | ||
this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) { | ||
E[this.ptr + 4 >> 2] = t; | ||
}, this.get_type = function() { | ||
return F[this.ptr + 4 >> 2]; | ||
}, this.set_destructor = function(r) { | ||
F[this.ptr + 8 >> 2] = r; | ||
return E[this.ptr + 4 >> 2]; | ||
}, this.set_destructor = function(t) { | ||
E[this.ptr + 8 >> 2] = t; | ||
}, this.get_destructor = function() { | ||
return F[this.ptr + 8 >> 2]; | ||
}, this.set_refcount = function(r) { | ||
T[this.ptr >> 2] = r; | ||
}, this.set_caught = function(r) { | ||
r = r ? 1 : 0, U[this.ptr + 12 >> 0] = r; | ||
return E[this.ptr + 8 >> 2]; | ||
}, this.set_refcount = function(t) { | ||
T[this.ptr >> 2] = t; | ||
}, this.set_caught = function(t) { | ||
t = t ? 1 : 0, U[this.ptr + 12 >> 0] = t; | ||
}, this.get_caught = function() { | ||
return U[this.ptr + 12 >> 0] != 0; | ||
}, this.set_rethrown = function(r) { | ||
r = r ? 1 : 0, U[this.ptr + 13 >> 0] = r; | ||
}, this.set_rethrown = function(t) { | ||
t = t ? 1 : 0, U[this.ptr + 13 >> 0] = t; | ||
}, this.get_rethrown = function() { | ||
return U[this.ptr + 13 >> 0] != 0; | ||
}, this.init = function(r, t) { | ||
this.set_adjusted_ptr(0), this.set_type(r), this.set_destructor(t), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1); | ||
}, this.init = function(t, r) { | ||
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1); | ||
}, this.add_ref = function() { | ||
var r = T[this.ptr >> 2]; | ||
T[this.ptr >> 2] = r + 1; | ||
var t = T[this.ptr >> 2]; | ||
T[this.ptr >> 2] = t + 1; | ||
}, this.release_ref = function() { | ||
var r = T[this.ptr >> 2]; | ||
return T[this.ptr >> 2] = r - 1, r === 1; | ||
}, this.set_adjusted_ptr = function(r) { | ||
F[this.ptr + 16 >> 2] = r; | ||
var t = T[this.ptr >> 2]; | ||
return T[this.ptr >> 2] = t - 1, t === 1; | ||
}, this.set_adjusted_ptr = function(t) { | ||
E[this.ptr + 16 >> 2] = t; | ||
}, this.get_adjusted_ptr = function() { | ||
return F[this.ptr + 16 >> 2]; | ||
return E[this.ptr + 16 >> 2]; | ||
}, this.get_exception_ptr = function() { | ||
var r = Sr(this.get_type()); | ||
if (r) | ||
return F[this.excPtr >> 2]; | ||
var t = this.get_adjusted_ptr(); | ||
return t !== 0 ? t : this.excPtr; | ||
var t = St(this.get_type()); | ||
if (t) | ||
return E[this.excPtr >> 2]; | ||
var r = this.get_adjusted_ptr(); | ||
return r !== 0 ? r : this.excPtr; | ||
}; | ||
} | ||
function Jr(e) { | ||
function Jt(e) { | ||
throw M || (M = e), M; | ||
@@ -214,32 +214,32 @@ } | ||
return de(0), 0; | ||
var r = new be(e); | ||
r.set_adjusted_ptr(e); | ||
var t = r.get_type(); | ||
if (!t) | ||
var t = new be(e); | ||
t.set_adjusted_ptr(e); | ||
var r = t.get_type(); | ||
if (!r) | ||
return de(0), e; | ||
for (var n = 0; n < arguments.length; n++) { | ||
var i = arguments[n]; | ||
if (i === 0 || i === t) | ||
if (i === 0 || i === r) | ||
break; | ||
var a = r.ptr + 16; | ||
if (Er(i, t, a)) | ||
var a = t.ptr + 16; | ||
if (Et(i, r, a)) | ||
return de(i), e; | ||
} | ||
return de(t), e; | ||
return de(r), e; | ||
} | ||
var Kr = We, Qr = We, et = We; | ||
function rt(e) { | ||
var Kt = We, Qt = We, er = We; | ||
function tr(e) { | ||
return new be(e).get_exception_ptr(); | ||
} | ||
function tt() { | ||
function rr() { | ||
var e = ye.pop(); | ||
e || Q("no exception to throw"); | ||
var r = e.excPtr; | ||
throw e.get_rethrown() || (ye.push(e), e.set_rethrown(!0), e.set_caught(!1), me++), M = r, M; | ||
var t = e.excPtr; | ||
throw e.get_rethrown() || (ye.push(e), e.set_rethrown(!0), e.set_caught(!1), me++), M = t, M; | ||
} | ||
function nt(e, r, t) { | ||
function nr(e, t, r) { | ||
var n = new be(e); | ||
throw n.init(r, t), M = e, me++, M; | ||
throw n.init(t, r), M = e, me++, M; | ||
} | ||
function it() { | ||
function ir() { | ||
return me; | ||
@@ -250,4 +250,4 @@ } | ||
for (; e.length; ) { | ||
var r = e.pop(), t = e.pop(); | ||
t(r); | ||
var t = e.pop(), r = e.pop(); | ||
r(t); | ||
} | ||
@@ -258,18 +258,18 @@ } | ||
} | ||
var ee = {}, Z = {}, Ce = {}, at = 48, ot = 57; | ||
function Ue(e) { | ||
var ee = {}, Z = {}, Ce = {}, ar = 48, or = 57; | ||
function at(e) { | ||
if (e === void 0) | ||
return "_unknown"; | ||
e = e.replace(/[^a-zA-Z0-9_]/g, "$"); | ||
var r = e.charCodeAt(0); | ||
return r >= at && r <= ot ? "_" + e : e; | ||
var t = e.charCodeAt(0); | ||
return t >= ar && t <= or ? "_" + e : e; | ||
} | ||
function He(e, r) { | ||
return e = Ue(e), { [e]: function() { | ||
return r.apply(this, arguments); | ||
function ot(e, t) { | ||
return e = at(e), { [e]: function() { | ||
return t.apply(this, arguments); | ||
} }[e]; | ||
} | ||
function Me(e, r) { | ||
var t = He(r, function(n) { | ||
this.name = r, this.message = n; | ||
function Ue(e, t) { | ||
var r = ot(t, function(n) { | ||
this.name = t, this.message = n; | ||
var i = new Error(n).stack; | ||
@@ -279,16 +279,16 @@ i !== void 0 && (this.stack = this.toString() + ` | ||
}); | ||
return t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.prototype.toString = function() { | ||
return r.prototype = Object.create(e.prototype), r.prototype.constructor = r, r.prototype.toString = function() { | ||
return this.message === void 0 ? this.name : this.name + ": " + this.message; | ||
}, t; | ||
}, r; | ||
} | ||
var sr = void 0; | ||
var st = void 0; | ||
function Te(e) { | ||
throw new sr(e); | ||
throw new st(e); | ||
} | ||
function I(e, r, t) { | ||
function I(e, t, r) { | ||
e.forEach(function(o) { | ||
Ce[o] = r; | ||
Ce[o] = t; | ||
}); | ||
function n(o) { | ||
var f = t(o); | ||
var f = r(o); | ||
f.length !== e.length && Te("Mismatched type converter count"); | ||
@@ -298,4 +298,4 @@ for (var c = 0; c < e.length; ++c) | ||
} | ||
var i = new Array(r.length), a = [], s = 0; | ||
r.forEach((o, f) => { | ||
var i = new Array(t.length), a = [], s = 0; | ||
t.forEach((o, f) => { | ||
Z.hasOwnProperty(o) ? i[f] = Z[o] : (a.push(o), ee.hasOwnProperty(o) || (ee[o] = []), ee[o].push(() => { | ||
@@ -306,15 +306,15 @@ i[f] = Z[o], ++s, s === a.length && n(i); | ||
} | ||
function st(e) { | ||
var r = Pe[e]; | ||
function sr(e) { | ||
var t = Pe[e]; | ||
delete Pe[e]; | ||
var t = r.rawConstructor, n = r.rawDestructor, i = r.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType)); | ||
var r = t.rawConstructor, n = t.rawDestructor, i = t.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType)); | ||
I([e], a, (s) => { | ||
var o = {}; | ||
return i.forEach((f, c) => { | ||
var d = f.fieldName, v = s[c], h = f.getter, _ = f.getterContext, P = s[c + i.length], A = f.setter, $ = f.setterContext; | ||
o[d] = { read: (C) => v.fromWireType(h(_, C)), write: (C, l) => { | ||
var d = f.fieldName, v = s[c], h = f.getter, _ = f.getterContext, P = s[c + i.length], A = f.setter, C = f.setterContext; | ||
o[d] = { read: ($) => v.fromWireType(h(_, $)), write: ($, l) => { | ||
var p = []; | ||
A($, C, P.toWireType(p, l)), je(p); | ||
A(C, $, P.toWireType(p, l)), je(p); | ||
} }; | ||
}), [{ name: r.name, fromWireType: function(f) { | ||
}), [{ name: t.name, fromWireType: function(f) { | ||
var c = {}; | ||
@@ -328,3 +328,3 @@ for (var d in o) | ||
throw new TypeError('Missing field: "' + d + '"'); | ||
var v = t(); | ||
var v = r(); | ||
for (d in o) | ||
@@ -336,5 +336,5 @@ o[d].write(v, c[d]); | ||
} | ||
function ut(e, r, t, n, i) { | ||
function ur(e, t, r, n, i) { | ||
} | ||
function Ie(e) { | ||
function He(e) { | ||
switch (e) { | ||
@@ -353,27 +353,27 @@ case 1: | ||
} | ||
function ft() { | ||
for (var e = new Array(256), r = 0; r < 256; ++r) | ||
e[r] = String.fromCharCode(r); | ||
ur = e; | ||
function fr() { | ||
for (var e = new Array(256), t = 0; t < 256; ++t) | ||
e[t] = String.fromCharCode(t); | ||
ut = e; | ||
} | ||
var ur = void 0; | ||
function S(e) { | ||
for (var r = "", t = e; k[t]; ) | ||
r += ur[k[t++]]; | ||
return r; | ||
var ut = void 0; | ||
function R(e) { | ||
for (var t = "", r = e; D[r]; ) | ||
t += ut[D[r++]]; | ||
return t; | ||
} | ||
var re = void 0; | ||
var te = void 0; | ||
function g(e) { | ||
throw new re(e); | ||
throw new te(e); | ||
} | ||
function x(e, r, t = {}) { | ||
if (!("argPackAdvance" in r)) | ||
function x(e, t, r = {}) { | ||
if (!("argPackAdvance" in t)) | ||
throw new TypeError("registerType registeredInstance requires argPackAdvance"); | ||
var n = r.name; | ||
var n = t.name; | ||
if (e || g('type "' + n + '" must have a positive integer typeid pointer'), Z.hasOwnProperty(e)) { | ||
if (t.ignoreDuplicateRegistrations) | ||
if (r.ignoreDuplicateRegistrations) | ||
return; | ||
g("Cannot register type '" + n + "' twice"); | ||
} | ||
if (Z[e] = r, delete Ce[e], ee.hasOwnProperty(e)) { | ||
if (Z[e] = t, delete Ce[e], ee.hasOwnProperty(e)) { | ||
var i = ee[e]; | ||
@@ -383,5 +383,5 @@ delete ee[e], i.forEach((a) => a()); | ||
} | ||
function ct(e, r, t, n, i) { | ||
var a = Ie(t); | ||
r = S(r), x(e, { name: r, fromWireType: function(s) { | ||
function cr(e, t, r, n, i) { | ||
var a = He(r); | ||
t = R(t), x(e, { name: t, fromWireType: function(s) { | ||
return !!s; | ||
@@ -392,62 +392,62 @@ }, toWireType: function(s, o) { | ||
var o; | ||
if (t === 1) | ||
if (r === 1) | ||
o = U; | ||
else if (t === 2) | ||
else if (r === 2) | ||
o = K; | ||
else if (t === 4) | ||
else if (r === 4) | ||
o = T; | ||
else | ||
throw new TypeError("Unknown boolean type size: " + r); | ||
throw new TypeError("Unknown boolean type size: " + t); | ||
return this.fromWireType(o[s >> a]); | ||
}, destructorFunction: null }); | ||
} | ||
function lt(e) { | ||
function lr(e) { | ||
if (!(this instanceof L) || !(e instanceof L)) | ||
return !1; | ||
for (var r = this.$$.ptrType.registeredClass, t = this.$$.ptr, n = e.$$.ptrType.registeredClass, i = e.$$.ptr; r.baseClass; ) | ||
t = r.upcast(t), r = r.baseClass; | ||
for (var t = this.$$.ptrType.registeredClass, r = this.$$.ptr, n = e.$$.ptrType.registeredClass, i = e.$$.ptr; t.baseClass; ) | ||
r = t.upcast(r), t = t.baseClass; | ||
for (; n.baseClass; ) | ||
i = n.upcast(i), n = n.baseClass; | ||
return r === n && t === i; | ||
return t === n && r === i; | ||
} | ||
function dt(e) { | ||
function dr(e) { | ||
return { count: e.count, deleteScheduled: e.deleteScheduled, preservePointerOnDelete: e.preservePointerOnDelete, ptr: e.ptr, ptrType: e.ptrType, smartPtr: e.smartPtr, smartPtrType: e.smartPtrType }; | ||
} | ||
function xe(e) { | ||
function r(t) { | ||
return t.$$.ptrType.registeredClass.name; | ||
function Me(e) { | ||
function t(r) { | ||
return r.$$.ptrType.registeredClass.name; | ||
} | ||
g(r(e) + " instance already deleted"); | ||
g(t(e) + " instance already deleted"); | ||
} | ||
var Ye = !1; | ||
function fr(e) { | ||
var Ie = !1; | ||
function ft(e) { | ||
} | ||
function vt(e) { | ||
function vr(e) { | ||
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr); | ||
} | ||
function cr(e) { | ||
function ct(e) { | ||
e.count.value -= 1; | ||
var r = e.count.value === 0; | ||
r && vt(e); | ||
var t = e.count.value === 0; | ||
t && vr(e); | ||
} | ||
function lr(e, r, t) { | ||
if (r === t) | ||
function lt(e, t, r) { | ||
if (t === r) | ||
return e; | ||
if (t.baseClass === void 0) | ||
if (r.baseClass === void 0) | ||
return null; | ||
var n = lr(e, r, t.baseClass); | ||
return n === null ? null : t.downcast(n); | ||
var n = lt(e, t, r.baseClass); | ||
return n === null ? null : r.downcast(n); | ||
} | ||
var dr = {}; | ||
function pt() { | ||
var dt = {}; | ||
function pr() { | ||
return Object.keys(fe).length; | ||
} | ||
function ht() { | ||
function hr() { | ||
var e = []; | ||
for (var r in fe) | ||
fe.hasOwnProperty(r) && e.push(fe[r]); | ||
for (var t in fe) | ||
fe.hasOwnProperty(t) && e.push(fe[t]); | ||
return e; | ||
} | ||
var se = []; | ||
function Ve() { | ||
function xe() { | ||
for (; se.length; ) { | ||
@@ -459,37 +459,37 @@ var e = se.pop(); | ||
var ue = void 0; | ||
function _t(e) { | ||
ue = e, se.length && ue && ue(Ve); | ||
function _r(e) { | ||
ue = e, se.length && ue && ue(xe); | ||
} | ||
function gt() { | ||
u.getInheritedInstanceCount = pt, u.getLiveInheritedInstances = ht, u.flushPendingDeletes = Ve, u.setDelayFunction = _t; | ||
function gr() { | ||
u.getInheritedInstanceCount = pr, u.getLiveInheritedInstances = hr, u.flushPendingDeletes = xe, u.setDelayFunction = _r; | ||
} | ||
var fe = {}; | ||
function yt(e, r) { | ||
for (r === void 0 && g("ptr should not be undefined"); e.baseClass; ) | ||
r = e.upcast(r), e = e.baseClass; | ||
return r; | ||
function yr(e, t) { | ||
for (t === void 0 && g("ptr should not be undefined"); e.baseClass; ) | ||
t = e.upcast(t), e = e.baseClass; | ||
return t; | ||
} | ||
function mt(e, r) { | ||
return r = yt(e, r), fe[r]; | ||
function mr(e, t) { | ||
return t = yr(e, t), fe[t]; | ||
} | ||
function $e(e, r) { | ||
(!r.ptrType || !r.ptr) && Te("makeClassHandle requires ptr and ptrType"); | ||
var t = !!r.smartPtrType, n = !!r.smartPtr; | ||
return t !== n && Te("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, ce(Object.create(e, { $$: { value: r } })); | ||
function $e(e, t) { | ||
(!t.ptrType || !t.ptr) && Te("makeClassHandle requires ptr and ptrType"); | ||
var r = !!t.smartPtrType, n = !!t.smartPtr; | ||
return r !== n && Te("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, ce(Object.create(e, { $$: { value: t } })); | ||
} | ||
function wt(e) { | ||
var r = this.getPointee(e); | ||
if (!r) | ||
function wr(e) { | ||
var t = this.getPointee(e); | ||
if (!t) | ||
return this.destructor(e), null; | ||
var t = mt(this.registeredClass, r); | ||
if (t !== void 0) { | ||
if (t.$$.count.value === 0) | ||
return t.$$.ptr = r, t.$$.smartPtr = e, t.clone(); | ||
var n = t.clone(); | ||
var r = mr(this.registeredClass, t); | ||
if (r !== void 0) { | ||
if (r.$$.count.value === 0) | ||
return r.$$.ptr = t, r.$$.smartPtr = e, r.clone(); | ||
var n = r.clone(); | ||
return this.destructor(e), n; | ||
} | ||
function i() { | ||
return this.isSmartPointer ? $e(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: r, smartPtrType: this, smartPtr: e }) : $e(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
return this.isSmartPointer ? $e(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: e }) : $e(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
} | ||
var a = this.registeredClass.getActualType(r), s = dr[a]; | ||
var a = this.registeredClass.getActualType(t), s = dt[a]; | ||
if (!s) | ||
@@ -499,85 +499,85 @@ return i.call(this); | ||
this.isConst ? o = s.constPointerType : o = s.pointerType; | ||
var f = lr(r, this.registeredClass, o.registeredClass); | ||
var f = lt(t, this.registeredClass, o.registeredClass); | ||
return f === null ? i.call(this) : this.isSmartPointer ? $e(o.registeredClass.instancePrototype, { ptrType: o, ptr: f, smartPtrType: this, smartPtr: e }) : $e(o.registeredClass.instancePrototype, { ptrType: o, ptr: f }); | ||
} | ||
function ce(e) { | ||
return typeof FinalizationRegistry > "u" ? (ce = (r) => r, e) : (Ye = new FinalizationRegistry((r) => { | ||
cr(r.$$); | ||
}), ce = (r) => { | ||
var t = r.$$, n = !!t.smartPtr; | ||
return typeof FinalizationRegistry > "u" ? (ce = (t) => t, e) : (Ie = new FinalizationRegistry((t) => { | ||
ct(t.$$); | ||
}), ce = (t) => { | ||
var r = t.$$, n = !!r.smartPtr; | ||
if (n) { | ||
var i = { $$: t }; | ||
Ye.register(r, i, r); | ||
var i = { $$: r }; | ||
Ie.register(t, i, t); | ||
} | ||
return r; | ||
}, fr = (r) => Ye.unregister(r), ce(e)); | ||
return t; | ||
}, ft = (t) => Ie.unregister(t), ce(e)); | ||
} | ||
function bt() { | ||
if (this.$$.ptr || xe(this), this.$$.preservePointerOnDelete) | ||
function br() { | ||
if (this.$$.ptr || Me(this), this.$$.preservePointerOnDelete) | ||
return this.$$.count.value += 1, this; | ||
var e = ce(Object.create(Object.getPrototypeOf(this), { $$: { value: dt(this.$$) } })); | ||
var e = ce(Object.create(Object.getPrototypeOf(this), { $$: { value: dr(this.$$) } })); | ||
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e; | ||
} | ||
function Pt() { | ||
this.$$.ptr || xe(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && g("Object already scheduled for deletion"), fr(this), cr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
function Pr() { | ||
this.$$.ptr || Me(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && g("Object already scheduled for deletion"), ft(this), ct(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
} | ||
function Ct() { | ||
function Cr() { | ||
return !this.$$.ptr; | ||
} | ||
function Tt() { | ||
return this.$$.ptr || xe(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && g("Object already scheduled for deletion"), se.push(this), se.length === 1 && ue && ue(Ve), this.$$.deleteScheduled = !0, this; | ||
function Tr() { | ||
return this.$$.ptr || Me(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && g("Object already scheduled for deletion"), se.push(this), se.length === 1 && ue && ue(xe), this.$$.deleteScheduled = !0, this; | ||
} | ||
function $t() { | ||
L.prototype.isAliasOf = lt, L.prototype.clone = bt, L.prototype.delete = Pt, L.prototype.isDeleted = Ct, L.prototype.deleteLater = Tt; | ||
function $r() { | ||
L.prototype.isAliasOf = lr, L.prototype.clone = br, L.prototype.delete = Pr, L.prototype.isDeleted = Cr, L.prototype.deleteLater = Tr; | ||
} | ||
function L() { | ||
} | ||
function vr(e, r, t) { | ||
if (e[r].overloadTable === void 0) { | ||
var n = e[r]; | ||
e[r] = function() { | ||
return e[r].overloadTable.hasOwnProperty(arguments.length) || g("Function '" + t + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + e[r].overloadTable + ")!"), e[r].overloadTable[arguments.length].apply(this, arguments); | ||
}, e[r].overloadTable = [], e[r].overloadTable[n.argCount] = n; | ||
function vt(e, t, r) { | ||
if (e[t].overloadTable === void 0) { | ||
var n = e[t]; | ||
e[t] = function() { | ||
return e[t].overloadTable.hasOwnProperty(arguments.length) || g("Function '" + r + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + e[t].overloadTable + ")!"), e[t].overloadTable[arguments.length].apply(this, arguments); | ||
}, e[t].overloadTable = [], e[t].overloadTable[n.argCount] = n; | ||
} | ||
} | ||
function pr(e, r, t) { | ||
u.hasOwnProperty(e) ? ((t === void 0 || u[e].overloadTable !== void 0 && u[e].overloadTable[t] !== void 0) && g("Cannot register public name '" + e + "' twice"), vr(u, e, e), u.hasOwnProperty(t) && g("Cannot register multiple overloads of a function with the same number of arguments (" + t + ")!"), u[e].overloadTable[t] = r) : (u[e] = r, t !== void 0 && (u[e].numArguments = t)); | ||
function pt(e, t, r) { | ||
u.hasOwnProperty(e) ? ((r === void 0 || u[e].overloadTable !== void 0 && u[e].overloadTable[r] !== void 0) && g("Cannot register public name '" + e + "' twice"), vt(u, e, e), u.hasOwnProperty(r) && g("Cannot register multiple overloads of a function with the same number of arguments (" + r + ")!"), u[e].overloadTable[r] = t) : (u[e] = t, r !== void 0 && (u[e].numArguments = r)); | ||
} | ||
function At(e, r, t, n, i, a, s, o) { | ||
this.name = e, this.constructor = r, this.instancePrototype = t, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = []; | ||
function Ar(e, t, r, n, i, a, s, o) { | ||
this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = []; | ||
} | ||
function Ae(e, r, t) { | ||
for (; r !== t; ) | ||
r.upcast || g("Expected null or instance of " + t.name + ", got an instance of " + r.name), e = r.upcast(e), r = r.baseClass; | ||
function Ae(e, t, r) { | ||
for (; t !== r; ) | ||
t.upcast || g("Expected null or instance of " + r.name + ", got an instance of " + t.name), e = t.upcast(e), t = t.baseClass; | ||
return e; | ||
} | ||
function Ft(e, r) { | ||
if (r === null) | ||
function Fr(e, t) { | ||
if (t === null) | ||
return this.isReference && g("null is not a valid " + this.name), 0; | ||
r.$$ || g('Cannot pass "' + Ne(r) + '" as a ' + this.name), r.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name); | ||
var t = r.$$.ptrType.registeredClass, n = Ae(r.$$.ptr, t, this.registeredClass); | ||
t.$$ || g('Cannot pass "' + Be(t) + '" as a ' + this.name), t.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = Ae(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function Et(e, r) { | ||
var t; | ||
if (r === null) | ||
return this.isReference && g("null is not a valid " + this.name), this.isSmartPointer ? (t = this.rawConstructor(), e !== null && e.push(this.rawDestructor, t), t) : 0; | ||
r.$$ || g('Cannot pass "' + Ne(r) + '" as a ' + this.name), r.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && r.$$.ptrType.isConst && g("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name); | ||
var n = r.$$.ptrType.registeredClass; | ||
if (t = Ae(r.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
switch (r.$$.smartPtr === void 0 && g("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) { | ||
function Er(e, t) { | ||
var r; | ||
if (t === null) | ||
return this.isReference && g("null is not a valid " + this.name), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0; | ||
t.$$ || g('Cannot pass "' + Be(t) + '" as a ' + this.name), t.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && t.$$.ptrType.isConst && g("Cannot convert argument of type " + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + " to parameter type " + this.name); | ||
var n = t.$$.ptrType.registeredClass; | ||
if (r = Ae(t.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
switch (t.$$.smartPtr === void 0 && g("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) { | ||
case 0: | ||
r.$$.smartPtrType === this ? t = r.$$.smartPtr : g("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name); | ||
t.$$.smartPtrType === this ? r = t.$$.smartPtr : g("Cannot convert argument of type " + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + " to parameter type " + this.name); | ||
break; | ||
case 1: | ||
t = r.$$.smartPtr; | ||
r = t.$$.smartPtr; | ||
break; | ||
case 2: | ||
if (r.$$.smartPtrType === this) | ||
t = r.$$.smartPtr; | ||
if (t.$$.smartPtrType === this) | ||
r = t.$$.smartPtr; | ||
else { | ||
var i = r.clone(); | ||
t = this.rawShare(t, Fe.toHandle(function() { | ||
var i = t.clone(); | ||
r = this.rawShare(r, Fe.toHandle(function() { | ||
i.delete(); | ||
})), e !== null && e.push(this.rawDestructor, t); | ||
})), e !== null && e.push(this.rawDestructor, r); | ||
} | ||
@@ -588,60 +588,60 @@ break; | ||
} | ||
return t; | ||
return r; | ||
} | ||
function St(e, r) { | ||
if (r === null) | ||
function Sr(e, t) { | ||
if (t === null) | ||
return this.isReference && g("null is not a valid " + this.name), 0; | ||
r.$$ || g('Cannot pass "' + Ne(r) + '" as a ' + this.name), r.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name), r.$$.ptrType.isConst && g("Cannot convert argument of type " + r.$$.ptrType.name + " to parameter type " + this.name); | ||
var t = r.$$.ptrType.registeredClass, n = Ae(r.$$.ptr, t, this.registeredClass); | ||
t.$$ || g('Cannot pass "' + Be(t) + '" as a ' + this.name), t.$$.ptr || g("Cannot pass deleted object as a pointer of type " + this.name), t.$$.ptrType.isConst && g("Cannot convert argument of type " + t.$$.ptrType.name + " to parameter type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = Ae(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function Rt(e) { | ||
function Rr(e) { | ||
return this.rawGetPointee && (e = this.rawGetPointee(e)), e; | ||
} | ||
function kt(e) { | ||
function Dr(e) { | ||
this.rawDestructor && this.rawDestructor(e); | ||
} | ||
function Dt(e) { | ||
function kr(e) { | ||
e !== null && e.delete(); | ||
} | ||
function Ot() { | ||
Y.prototype.getPointee = Rt, Y.prototype.destructor = kt, Y.prototype.argPackAdvance = 8, Y.prototype.readValueFromPointer = oe, Y.prototype.deleteObject = Dt, Y.prototype.fromWireType = wt; | ||
function Or() { | ||
Y.prototype.getPointee = Rr, Y.prototype.destructor = Dr, Y.prototype.argPackAdvance = 8, Y.prototype.readValueFromPointer = oe, Y.prototype.deleteObject = kr, Y.prototype.fromWireType = wr; | ||
} | ||
function Y(e, r, t, n, i, a, s, o, f, c, d) { | ||
this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = f, this.rawShare = c, this.rawDestructor = d, !i && r.baseClass === void 0 ? n ? (this.toWireType = Ft, this.destructorFunction = null) : (this.toWireType = St, this.destructorFunction = null) : this.toWireType = Et; | ||
function Y(e, t, r, n, i, a, s, o, f, c, d) { | ||
this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = f, this.rawShare = c, this.rawDestructor = d, !i && t.baseClass === void 0 ? n ? (this.toWireType = Fr, this.destructorFunction = null) : (this.toWireType = Sr, this.destructorFunction = null) : this.toWireType = Er; | ||
} | ||
function hr(e, r, t) { | ||
u.hasOwnProperty(e) || Te("Replacing nonexistant public symbol"), u[e].overloadTable !== void 0 && t !== void 0 ? u[e].overloadTable[t] = r : (u[e] = r, u[e].argCount = t); | ||
function ht(e, t, r) { | ||
u.hasOwnProperty(e) || Te("Replacing nonexistant public symbol"), u[e].overloadTable !== void 0 && r !== void 0 ? u[e].overloadTable[r] = t : (u[e] = t, u[e].argCount = r); | ||
} | ||
function Wt(e, r, t) { | ||
function Wr(e, t, r) { | ||
var n = u["dynCall_" + e]; | ||
return t && t.length ? n.apply(null, [r].concat(t)) : n.call(null, r); | ||
return r && r.length ? n.apply(null, [t].concat(r)) : n.call(null, t); | ||
} | ||
function jt(e, r, t) { | ||
function jr(e, t, r) { | ||
if (e.includes("j")) | ||
return Wt(e, r, t); | ||
var n = m(r).apply(null, t); | ||
return Wr(e, t, r); | ||
var n = m(t).apply(null, r); | ||
return n; | ||
} | ||
function Ut(e, r) { | ||
var t = []; | ||
function Ur(e, t) { | ||
var r = []; | ||
return function() { | ||
return t.length = 0, Object.assign(t, arguments), jt(e, r, t); | ||
return r.length = 0, Object.assign(r, arguments), jr(e, t, r); | ||
}; | ||
} | ||
function D(e, r) { | ||
e = S(e); | ||
function t() { | ||
return e.includes("j") ? Ut(e, r) : m(r); | ||
function k(e, t) { | ||
e = R(e); | ||
function r() { | ||
return e.includes("j") ? Ur(e, t) : m(t); | ||
} | ||
var n = t(); | ||
return typeof n != "function" && g("unknown function pointer with signature " + e + ": " + r), n; | ||
var n = r(); | ||
return typeof n != "function" && g("unknown function pointer with signature " + e + ": " + t), n; | ||
} | ||
var _r = void 0; | ||
function gr(e) { | ||
var r = Fr(e), t = S(r); | ||
return V(r), t; | ||
var _t = void 0; | ||
function gt(e) { | ||
var t = Ft(e), r = R(t); | ||
return V(t), r; | ||
} | ||
function te(e, r) { | ||
var t = [], n = {}; | ||
function re(e, t) { | ||
var r = [], n = {}; | ||
function i(a) { | ||
@@ -653,150 +653,133 @@ if (!n[a] && !Z[a]) { | ||
} | ||
t.push(a), n[a] = !0; | ||
r.push(a), n[a] = !0; | ||
} | ||
} | ||
throw r.forEach(i), new _r(e + ": " + t.map(gr).join([", "])); | ||
throw t.forEach(i), new _t(e + ": " + r.map(gt).join([", "])); | ||
} | ||
function Ht(e, r, t, n, i, a, s, o, f, c, d, v, h) { | ||
d = S(d), a = D(i, a), o && (o = D(s, o)), c && (c = D(f, c)), h = D(v, h); | ||
var _ = Ue(d); | ||
pr(_, function() { | ||
te("Cannot construct " + d + " due to unbound types", [n]); | ||
}), I([e, r, t], n ? [n] : [], function(P) { | ||
function Hr(e, t, r, n, i, a, s, o, f, c, d, v, h) { | ||
d = R(d), a = k(i, a), o && (o = k(s, o)), c && (c = k(f, c)), h = k(v, h); | ||
var _ = at(d); | ||
pt(_, function() { | ||
re("Cannot construct " + d + " due to unbound types", [n]); | ||
}), I([e, t, r], n ? [n] : [], function(P) { | ||
P = P[0]; | ||
var A, $; | ||
n ? (A = P.registeredClass, $ = A.instancePrototype) : $ = L.prototype; | ||
var C = He(_, function() { | ||
var A, C; | ||
n ? (A = P.registeredClass, C = A.instancePrototype) : C = L.prototype; | ||
var $ = ot(_, function() { | ||
if (Object.getPrototypeOf(this) !== l) | ||
throw new re("Use 'new' to construct " + d); | ||
throw new te("Use 'new' to construct " + d); | ||
if (p.constructor_body === void 0) | ||
throw new re(d + " has no accessible constructor"); | ||
throw new te(d + " has no accessible constructor"); | ||
var Re = p.constructor_body[arguments.length]; | ||
if (Re === void 0) | ||
throw new re("Tried to invoke ctor of " + d + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(p.constructor_body).toString() + ") parameters instead!"); | ||
throw new te("Tried to invoke ctor of " + d + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(p.constructor_body).toString() + ") parameters instead!"); | ||
return Re.apply(this, arguments); | ||
}), l = Object.create($, { constructor: { value: C } }); | ||
C.prototype = l; | ||
var p = new At(d, C, l, h, A, a, o, c), R = new Y(d, p, !0, !1, !1), E = new Y(d + "*", p, !1, !1, !1), G = new Y(d + " const*", p, !1, !0, !1); | ||
return dr[e] = { pointerType: E, constPointerType: G }, hr(_, C), [R, E, G]; | ||
}), l = Object.create(C, { constructor: { value: $ } }); | ||
$.prototype = l; | ||
var p = new Ar(d, $, l, h, A, a, o, c), F = new Y(d, p, !0, !1, !1), S = new Y(d + "*", p, !1, !1, !1), G = new Y(d + " const*", p, !1, !0, !1); | ||
return dt[e] = { pointerType: S, constPointerType: G }, ht(_, $), [F, S, G]; | ||
}); | ||
} | ||
function Be(e, r) { | ||
for (var t = [], n = 0; n < e; n++) | ||
t.push(F[r + n * 4 >> 2]); | ||
return t; | ||
function Ye(e, t) { | ||
for (var r = [], n = 0; n < e; n++) | ||
r.push(E[t + n * 4 >> 2]); | ||
return r; | ||
} | ||
function Mt(e, r) { | ||
if (!(e instanceof Function)) | ||
throw new TypeError("new_ called with constructor type " + typeof e + " which is not a function"); | ||
var t = He(e.name || "unknownFunctionName", function() { | ||
}); | ||
t.prototype = e.prototype; | ||
var n = new t(), i = e.apply(n, r); | ||
return i instanceof Object ? i : n; | ||
} | ||
function Le(e, r, t, n, i, a) { | ||
var s = r.length; | ||
function Ve(e, t, r, n, i, a) { | ||
var s = t.length; | ||
s < 2 && g("argTypes array size mismatch! Must at least get return value and 'this' types!"); | ||
for (var o = r[1] !== null && t !== null, f = !1, c = 1; c < r.length; ++c) | ||
if (r[c] !== null && r[c].destructorFunction === void 0) { | ||
for (var o = t[1] !== null && r !== null, f = !1, c = 1; c < t.length; ++c) | ||
if (t[c] !== null && t[c].destructorFunction === void 0) { | ||
f = !0; | ||
break; | ||
} | ||
for (var d = r[0].name !== "void", v = "", h = "", c = 0; c < s - 2; ++c) | ||
v += (c !== 0 ? ", " : "") + "arg" + c, h += (c !== 0 ? ", " : "") + "arg" + c + "Wired"; | ||
var _ = "return function " + Ue(e) + "(" + v + `) { | ||
if (arguments.length !== ` + (s - 2) + `) { | ||
throwBindingError('function ` + e + " called with ' + arguments.length + ' arguments, expected " + (s - 2) + ` args!'); | ||
} | ||
`; | ||
f && (_ += `var destructors = []; | ||
`); | ||
var P = f ? "destructors" : "null", A = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"], $ = [g, n, i, je, r[0], r[1]]; | ||
o && (_ += "var thisWired = classParam.toWireType(" + P + `, this); | ||
`); | ||
for (var c = 0; c < s - 2; ++c) | ||
_ += "var arg" + c + "Wired = argType" + c + ".toWireType(" + P + ", arg" + c + "); // " + r[c + 2].name + ` | ||
`, A.push("argType" + c), $.push(r[c + 2]); | ||
if (o && (h = "thisWired" + (h.length > 0 ? ", " : "") + h), _ += (d || a ? "var rv = " : "") + "invoker(fn" + (h.length > 0 ? ", " : "") + h + `); | ||
`, f) | ||
_ += `runDestructors(destructors); | ||
`; | ||
else | ||
for (var c = o ? 1 : 2; c < r.length; ++c) { | ||
var C = c === 1 ? "thisWired" : "arg" + (c - 2) + "Wired"; | ||
r[c].destructorFunction !== null && (_ += C + "_dtor(" + C + "); // " + r[c].name + ` | ||
`, A.push(C + "_dtor"), $.push(r[c].destructorFunction)); | ||
var d = t[0].name !== "void", v = s - 2, h = new Array(v), _ = [], P = []; | ||
return function() { | ||
arguments.length !== v && g("function " + e + " called with " + arguments.length + " arguments, expected " + v + " args!"), P.length = 0; | ||
var A; | ||
_.length = o ? 2 : 1, _[0] = i, o && (A = t[1].toWireType(P, this), _[1] = A); | ||
for (var C = 0; C < v; ++C) | ||
h[C] = t[C + 2].toWireType(P, arguments[C]), _.push(h[C]); | ||
var $ = n.apply(null, _); | ||
function l(p) { | ||
if (f) | ||
je(P); | ||
else | ||
for (var F = o ? 1 : 2; F < t.length; F++) { | ||
var S = F === 1 ? A : h[F - 2]; | ||
t[F].destructorFunction !== null && t[F].destructorFunction(S); | ||
} | ||
if (d) | ||
return t[0].fromWireType(p); | ||
} | ||
return d && (_ += `var ret = retType.fromWireType(rv); | ||
return ret; | ||
`), _ += `} | ||
`, A.push(_), Mt(Function, A).apply(null, $); | ||
return l($); | ||
}; | ||
} | ||
function It(e, r, t, n, i, a) { | ||
Wr(r > 0); | ||
var s = Be(r, t); | ||
i = D(n, i), I([], [e], function(o) { | ||
function Mr(e, t, r, n, i, a) { | ||
Wt(t > 0); | ||
var s = Ye(t, r); | ||
i = k(n, i), I([], [e], function(o) { | ||
o = o[0]; | ||
var f = "constructor " + o.name; | ||
if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) | ||
throw new re("Cannot register multiple constructors with identical number of parameters (" + (r - 1) + ") for class '" + o.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!"); | ||
return o.registeredClass.constructor_body[r - 1] = () => { | ||
te("Cannot construct " + o.name + " due to unbound types", s); | ||
if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[t - 1] !== void 0) | ||
throw new te("Cannot register multiple constructors with identical number of parameters (" + (t - 1) + ") for class '" + o.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!"); | ||
return o.registeredClass.constructor_body[t - 1] = () => { | ||
re("Cannot construct " + o.name + " due to unbound types", s); | ||
}, I([], s, function(c) { | ||
return c.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = Le(f, c, null, i, a), []; | ||
return c.splice(1, 0, null), o.registeredClass.constructor_body[t - 1] = Ve(f, c, null, i, a), []; | ||
}), []; | ||
}); | ||
} | ||
function xt(e, r, t, n, i, a, s, o, f) { | ||
var c = Be(t, n); | ||
r = S(r), a = D(i, a), I([], [e], function(d) { | ||
function Ir(e, t, r, n, i, a, s, o, f) { | ||
var c = Ye(r, n); | ||
t = R(t), a = k(i, a), I([], [e], function(d) { | ||
d = d[0]; | ||
var v = d.name + "." + r; | ||
r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && d.registeredClass.pureVirtualFunctions.push(r); | ||
var v = d.name + "." + t; | ||
t.startsWith("@@") && (t = Symbol[t.substring(2)]), o && d.registeredClass.pureVirtualFunctions.push(t); | ||
function h() { | ||
te("Cannot call " + v + " due to unbound types", c); | ||
re("Cannot call " + v + " due to unbound types", c); | ||
} | ||
var _ = d.registeredClass.instancePrototype, P = _[r]; | ||
return P === void 0 || P.overloadTable === void 0 && P.className !== d.name && P.argCount === t - 2 ? (h.argCount = t - 2, h.className = d.name, _[r] = h) : (vr(_, r, v), _[r].overloadTable[t - 2] = h), I([], c, function(A) { | ||
var $ = Le(v, A, d, a, s, f); | ||
return _[r].overloadTable === void 0 ? ($.argCount = t - 2, _[r] = $) : _[r].overloadTable[t - 2] = $, []; | ||
var _ = d.registeredClass.instancePrototype, P = _[t]; | ||
return P === void 0 || P.overloadTable === void 0 && P.className !== d.name && P.argCount === r - 2 ? (h.argCount = r - 2, h.className = d.name, _[t] = h) : (vt(_, t, v), _[t].overloadTable[r - 2] = h), I([], c, function(A) { | ||
var C = Ve(v, A, d, a, s); | ||
return _[t].overloadTable === void 0 ? (C.argCount = r - 2, _[t] = C) : _[t].overloadTable[r - 2] = C, []; | ||
}), []; | ||
}); | ||
} | ||
function yr(e, r, t) { | ||
return e instanceof Object || g(t + ' with invalid "this": ' + e), e instanceof r.registeredClass.constructor || g(t + ' incompatible with "this" of type ' + e.constructor.name), e.$$.ptr || g("cannot call emscripten binding method " + t + " on deleted object"), Ae(e.$$.ptr, e.$$.ptrType.registeredClass, r.registeredClass); | ||
function yt(e, t, r) { | ||
return e instanceof Object || g(r + ' with invalid "this": ' + e), e instanceof t.registeredClass.constructor || g(r + ' incompatible with "this" of type ' + e.constructor.name), e.$$.ptr || g("cannot call emscripten binding method " + r + " on deleted object"), Ae(e.$$.ptr, e.$$.ptrType.registeredClass, t.registeredClass); | ||
} | ||
function Yt(e, r, t, n, i, a, s, o, f, c) { | ||
r = S(r), i = D(n, i), I([], [e], function(d) { | ||
function xr(e, t, r, n, i, a, s, o, f, c) { | ||
t = R(t), i = k(n, i), I([], [e], function(d) { | ||
d = d[0]; | ||
var v = d.name + "." + r, h = { get: function() { | ||
te("Cannot access " + v + " due to unbound types", [t, s]); | ||
var v = d.name + "." + t, h = { get: function() { | ||
re("Cannot access " + v + " due to unbound types", [r, s]); | ||
}, enumerable: !0, configurable: !0 }; | ||
return f ? h.set = () => { | ||
te("Cannot access " + v + " due to unbound types", [t, s]); | ||
re("Cannot access " + v + " due to unbound types", [r, s]); | ||
} : h.set = (_) => { | ||
g(v + " is a read-only property"); | ||
}, Object.defineProperty(d.registeredClass.instancePrototype, r, h), I([], f ? [t, s] : [t], function(_) { | ||
}, Object.defineProperty(d.registeredClass.instancePrototype, t, h), I([], f ? [r, s] : [r], function(_) { | ||
var P = _[0], A = { get: function() { | ||
var C = yr(this, d, v + " getter"); | ||
return P.fromWireType(i(a, C)); | ||
var $ = yt(this, d, v + " getter"); | ||
return P.fromWireType(i(a, $)); | ||
}, enumerable: !0 }; | ||
if (f) { | ||
f = D(o, f); | ||
var $ = _[1]; | ||
A.set = function(C) { | ||
var l = yr(this, d, v + " setter"), p = []; | ||
f(c, l, $.toWireType(p, C)), je(p); | ||
f = k(o, f); | ||
var C = _[1]; | ||
A.set = function($) { | ||
var l = yt(this, d, v + " setter"), p = []; | ||
f(c, l, C.toWireType(p, $)), je(p); | ||
}; | ||
} | ||
return Object.defineProperty(d.registeredClass.instancePrototype, r, A), []; | ||
return Object.defineProperty(d.registeredClass.instancePrototype, t, A), []; | ||
}), []; | ||
}); | ||
} | ||
function Vt() { | ||
function Yr() { | ||
this.allocated = [void 0], this.freelist = [], this.get = function(e) { | ||
return this.allocated[e]; | ||
}, this.allocate = function(e) { | ||
let r = this.freelist.pop() || this.allocated.length; | ||
return this.allocated[r] = e, r; | ||
let t = this.freelist.pop() || this.allocated.length; | ||
return this.allocated[t] = e, t; | ||
}, this.free = function(e) { | ||
@@ -806,13 +789,13 @@ this.allocated[e] = void 0, this.freelist.push(e); | ||
} | ||
var O = new Vt(); | ||
function mr(e) { | ||
var O = new Yr(); | ||
function mt(e) { | ||
e >= O.reserved && --O.get(e).refcount === 0 && O.free(e); | ||
} | ||
function Bt() { | ||
for (var e = 0, r = O.reserved; r < O.allocated.length; ++r) | ||
O.allocated[r] !== void 0 && ++e; | ||
function Vr() { | ||
for (var e = 0, t = O.reserved; t < O.allocated.length; ++t) | ||
O.allocated[t] !== void 0 && ++e; | ||
return e; | ||
} | ||
function Lt() { | ||
O.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), O.reserved = O.allocated.length, u.count_emval_handles = Bt; | ||
function Br() { | ||
O.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), O.reserved = O.allocated.length, u.count_emval_handles = Vr; | ||
} | ||
@@ -833,25 +816,25 @@ var Fe = { toValue: (e) => (e || g("Cannot use deleted val. handle = " + e), O.get(e).value), toHandle: (e) => { | ||
} }; | ||
function Nt(e, r) { | ||
r = S(r), x(e, { name: r, fromWireType: function(t) { | ||
var n = Fe.toValue(t); | ||
return mr(t), n; | ||
}, toWireType: function(t, n) { | ||
function Lr(e, t) { | ||
t = R(t), x(e, { name: t, fromWireType: function(r) { | ||
var n = Fe.toValue(r); | ||
return mt(r), n; | ||
}, toWireType: function(r, n) { | ||
return Fe.toHandle(n); | ||
}, argPackAdvance: 8, readValueFromPointer: oe, destructorFunction: null }); | ||
} | ||
function Ne(e) { | ||
function Be(e) { | ||
if (e === null) | ||
return "null"; | ||
var r = typeof e; | ||
return r === "object" || r === "array" || r === "function" ? e.toString() : "" + e; | ||
var t = typeof e; | ||
return t === "object" || t === "array" || t === "function" ? e.toString() : "" + e; | ||
} | ||
function zt(e, r) { | ||
switch (r) { | ||
function Nr(e, t) { | ||
switch (t) { | ||
case 2: | ||
return function(t) { | ||
return this.fromWireType(Je[t >> 2]); | ||
return function(r) { | ||
return this.fromWireType(Ge[r >> 2]); | ||
}; | ||
case 3: | ||
return function(t) { | ||
return this.fromWireType(Ke[t >> 3]); | ||
return function(r) { | ||
return this.fromWireType(qe[r >> 3]); | ||
}; | ||
@@ -862,29 +845,29 @@ default: | ||
} | ||
function Xt(e, r, t) { | ||
var n = Ie(t); | ||
r = S(r), x(e, { name: r, fromWireType: function(i) { | ||
function zr(e, t, r) { | ||
var n = He(r); | ||
t = R(t), x(e, { name: t, fromWireType: function(i) { | ||
return i; | ||
}, toWireType: function(i, a) { | ||
return a; | ||
}, argPackAdvance: 8, readValueFromPointer: zt(r, n), destructorFunction: null }); | ||
}, argPackAdvance: 8, readValueFromPointer: Nr(t, n), destructorFunction: null }); | ||
} | ||
function Zt(e, r, t, n, i, a, s) { | ||
var o = Be(r, t); | ||
e = S(e), i = D(n, i), pr(e, function() { | ||
te("Cannot call " + e + " due to unbound types", o); | ||
}, r - 1), I([], o, function(f) { | ||
function Xr(e, t, r, n, i, a, s) { | ||
var o = Ye(t, r); | ||
e = R(e), i = k(n, i), pt(e, function() { | ||
re("Cannot call " + e + " due to unbound types", o); | ||
}, t - 1), I([], o, function(f) { | ||
var c = [f[0], null].concat(f.slice(1)); | ||
return hr(e, Le(e, c, null, i, a, s), r - 1), []; | ||
return ht(e, Ve(e, c, null, i, a), t - 1), []; | ||
}); | ||
} | ||
function Gt(e, r, t) { | ||
switch (r) { | ||
function Zr(e, t, r) { | ||
switch (t) { | ||
case 0: | ||
return t ? function(i) { | ||
return r ? function(i) { | ||
return U[i]; | ||
} : function(i) { | ||
return k[i]; | ||
return D[i]; | ||
}; | ||
case 1: | ||
return t ? function(i) { | ||
return r ? function(i) { | ||
return K[i >> 1]; | ||
@@ -895,6 +878,6 @@ } : function(i) { | ||
case 2: | ||
return t ? function(i) { | ||
return r ? function(i) { | ||
return T[i >> 2]; | ||
} : function(i) { | ||
return F[i >> 2]; | ||
return E[i >> 2]; | ||
}; | ||
@@ -905,10 +888,10 @@ default: | ||
} | ||
function qt(e, r, t, n, i) { | ||
r = S(r); | ||
var a = Ie(t), s = (v) => v; | ||
function Gr(e, t, r, n, i) { | ||
t = R(t); | ||
var a = He(r), s = (v) => v; | ||
if (n === 0) { | ||
var o = 32 - 8 * t; | ||
var o = 32 - 8 * r; | ||
s = (v) => v << o >>> o; | ||
} | ||
var f = r.includes("unsigned"), c = (v, h) => { | ||
var f = t.includes("unsigned"), c = (v, h) => { | ||
}, d; | ||
@@ -919,17 +902,17 @@ f ? d = function(v, h) { | ||
return c(h, this.name), h; | ||
}, x(e, { name: r, fromWireType: s, toWireType: d, argPackAdvance: 8, readValueFromPointer: Gt(r, a, n !== 0), destructorFunction: null }); | ||
}, x(e, { name: t, fromWireType: s, toWireType: d, argPackAdvance: 8, readValueFromPointer: Zr(t, a, n !== 0), destructorFunction: null }); | ||
} | ||
function Jt(e, r, t) { | ||
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], i = n[r]; | ||
function qr(e, t, r) { | ||
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], i = n[t]; | ||
function a(s) { | ||
s = s >> 2; | ||
var o = F, f = o[s], c = o[s + 1]; | ||
var o = E, f = o[s], c = o[s + 1]; | ||
return new i(o.buffer, c, f); | ||
} | ||
t = S(t), x(e, { name: t, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
r = R(r), x(e, { name: r, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
} | ||
function wr(e, r, t, n) { | ||
function wt(e, t, r, n) { | ||
if (!(n > 0)) | ||
return 0; | ||
for (var i = t, a = t + n - 1, s = 0; s < e.length; ++s) { | ||
for (var i = r, a = r + n - 1, s = 0; s < e.length; ++s) { | ||
var o = e.charCodeAt(s); | ||
@@ -941,39 +924,39 @@ if (o >= 55296 && o <= 57343) { | ||
if (o <= 127) { | ||
if (t >= a) | ||
if (r >= a) | ||
break; | ||
r[t++] = o; | ||
t[r++] = o; | ||
} else if (o <= 2047) { | ||
if (t + 1 >= a) | ||
if (r + 1 >= a) | ||
break; | ||
r[t++] = 192 | o >> 6, r[t++] = 128 | o & 63; | ||
t[r++] = 192 | o >> 6, t[r++] = 128 | o & 63; | ||
} else if (o <= 65535) { | ||
if (t + 2 >= a) | ||
if (r + 2 >= a) | ||
break; | ||
r[t++] = 224 | o >> 12, r[t++] = 128 | o >> 6 & 63, r[t++] = 128 | o & 63; | ||
t[r++] = 224 | o >> 12, t[r++] = 128 | o >> 6 & 63, t[r++] = 128 | o & 63; | ||
} else { | ||
if (t + 3 >= a) | ||
if (r + 3 >= a) | ||
break; | ||
r[t++] = 240 | o >> 18, r[t++] = 128 | o >> 12 & 63, r[t++] = 128 | o >> 6 & 63, r[t++] = 128 | o & 63; | ||
t[r++] = 240 | o >> 18, t[r++] = 128 | o >> 12 & 63, t[r++] = 128 | o >> 6 & 63, t[r++] = 128 | o & 63; | ||
} | ||
} | ||
return r[t] = 0, t - i; | ||
return t[r] = 0, r - i; | ||
} | ||
function Kt(e, r, t) { | ||
return wr(e, k, r, t); | ||
function Jr(e, t, r) { | ||
return wt(e, D, t, r); | ||
} | ||
function br(e) { | ||
for (var r = 0, t = 0; t < e.length; ++t) { | ||
var n = e.charCodeAt(t); | ||
n <= 127 ? r++ : n <= 2047 ? r += 2 : n >= 55296 && n <= 57343 ? (r += 4, ++t) : r += 3; | ||
function bt(e) { | ||
for (var t = 0, r = 0; r < e.length; ++r) { | ||
var n = e.charCodeAt(r); | ||
n <= 127 ? t++ : n <= 2047 ? t += 2 : n >= 55296 && n <= 57343 ? (t += 4, ++r) : t += 3; | ||
} | ||
return r; | ||
return t; | ||
} | ||
var Pr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function Qt(e, r, t) { | ||
for (var n = r + t, i = r; e[i] && !(i >= n); ) | ||
var Pt = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function Kr(e, t, r) { | ||
for (var n = t + r, i = t; e[i] && !(i >= n); ) | ||
++i; | ||
if (i - r > 16 && e.buffer && Pr) | ||
return Pr.decode(e.subarray(r, i)); | ||
for (var a = ""; r < i; ) { | ||
var s = e[r++]; | ||
if (i - t > 16 && e.buffer && Pt) | ||
return Pt.decode(e.subarray(t, i)); | ||
for (var a = ""; t < i; ) { | ||
var s = e[t++]; | ||
if (!(s & 128)) { | ||
@@ -983,3 +966,3 @@ a += String.fromCharCode(s); | ||
} | ||
var o = e[r++] & 63; | ||
var o = e[t++] & 63; | ||
if ((s & 224) == 192) { | ||
@@ -989,4 +972,4 @@ a += String.fromCharCode((s & 31) << 6 | o); | ||
} | ||
var f = e[r++] & 63; | ||
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | f : s = (s & 7) << 18 | o << 12 | f << 6 | e[r++] & 63, s < 65536) | ||
var f = e[t++] & 63; | ||
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | f : s = (s & 7) << 18 | o << 12 | f << 6 | e[t++] & 63, s < 65536) | ||
a += String.fromCharCode(s); | ||
@@ -1000,15 +983,15 @@ else { | ||
} | ||
function ze(e, r) { | ||
return e ? Qt(k, e, r) : ""; | ||
function Le(e, t) { | ||
return e ? Kr(D, e, t) : ""; | ||
} | ||
function en(e, r) { | ||
r = S(r); | ||
var t = r === "std::string"; | ||
x(e, { name: r, fromWireType: function(n) { | ||
var i = F[n >> 2], a = n + 4, s; | ||
if (t) | ||
function Qr(e, t) { | ||
t = R(t); | ||
var r = t === "std::string"; | ||
x(e, { name: t, fromWireType: function(n) { | ||
var i = E[n >> 2], a = n + 4, s; | ||
if (r) | ||
for (var o = a, f = 0; f <= i; ++f) { | ||
var c = a + f; | ||
if (f == i || k[c] == 0) { | ||
var d = c - o, v = ze(o, d); | ||
if (f == i || D[c] == 0) { | ||
var d = c - o, v = Le(o, d); | ||
s === void 0 ? s = v : (s += String.fromCharCode(0), s += v), o = c + 1; | ||
@@ -1019,3 +1002,3 @@ } | ||
for (var h = new Array(i), f = 0; f < i; ++f) | ||
h[f] = String.fromCharCode(k[a + f]); | ||
h[f] = String.fromCharCode(D[a + f]); | ||
s = h.join(""); | ||
@@ -1027,14 +1010,14 @@ } | ||
var a, s = typeof i == "string"; | ||
s || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int8Array || g("Cannot pass non-string to std::string"), t && s ? a = br(i) : a = i.length; | ||
var o = Ze(4 + a + 1), f = o + 4; | ||
if (F[o >> 2] = a, t && s) | ||
Kt(i, f, a + 1); | ||
s || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int8Array || g("Cannot pass non-string to std::string"), r && s ? a = bt(i) : a = i.length; | ||
var o = ze(4 + a + 1), f = o + 4; | ||
if (E[o >> 2] = a, r && s) | ||
Jr(i, f, a + 1); | ||
else if (s) | ||
for (var c = 0; c < a; ++c) { | ||
var d = i.charCodeAt(c); | ||
d > 255 && (V(f), g("String has UTF-16 code units that do not fit in 8 bits")), k[f + c] = d; | ||
d > 255 && (V(f), g("String has UTF-16 code units that do not fit in 8 bits")), D[f + c] = d; | ||
} | ||
else | ||
for (var c = 0; c < a; ++c) | ||
k[f + c] = i[c]; | ||
D[f + c] = i[c]; | ||
return n !== null && n.push(V, o), o; | ||
@@ -1045,9 +1028,9 @@ }, argPackAdvance: 8, readValueFromPointer: oe, destructorFunction: function(n) { | ||
} | ||
var Cr = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
function rn(e, r) { | ||
for (var t = e, n = t >> 1, i = n + r / 2; !(n >= i) && ge[n]; ) | ||
var Ct = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
function en(e, t) { | ||
for (var r = e, n = r >> 1, i = n + t / 2; !(n >= i) && ge[n]; ) | ||
++n; | ||
if (t = n << 1, t - e > 32 && Cr) | ||
return Cr.decode(k.subarray(e, t)); | ||
for (var a = "", s = 0; !(s >= r / 2); ++s) { | ||
if (r = n << 1, r - e > 32 && Ct) | ||
return Ct.decode(D.subarray(e, r)); | ||
for (var a = "", s = 0; !(s >= t / 2); ++s) { | ||
var o = K[e + s * 2 >> 1]; | ||
@@ -1060,21 +1043,21 @@ if (o == 0) | ||
} | ||
function tn(e, r, t) { | ||
if (t === void 0 && (t = 2147483647), t < 2) | ||
function tn(e, t, r) { | ||
if (r === void 0 && (r = 2147483647), r < 2) | ||
return 0; | ||
t -= 2; | ||
for (var n = r, i = t < e.length * 2 ? t / 2 : e.length, a = 0; a < i; ++a) { | ||
r -= 2; | ||
for (var n = t, i = r < e.length * 2 ? r / 2 : e.length, a = 0; a < i; ++a) { | ||
var s = e.charCodeAt(a); | ||
K[r >> 1] = s, r += 2; | ||
K[t >> 1] = s, t += 2; | ||
} | ||
return K[r >> 1] = 0, r - n; | ||
return K[t >> 1] = 0, t - n; | ||
} | ||
function nn(e) { | ||
function rn(e) { | ||
return e.length * 2; | ||
} | ||
function an(e, r) { | ||
for (var t = 0, n = ""; !(t >= r / 4); ) { | ||
var i = T[e + t * 4 >> 2]; | ||
function nn(e, t) { | ||
for (var r = 0, n = ""; !(r >= t / 4); ) { | ||
var i = T[e + r * 4 >> 2]; | ||
if (i == 0) | ||
break; | ||
if (++t, i >= 65536) { | ||
if (++r, i >= 65536) { | ||
var a = i - 65536; | ||
@@ -1087,6 +1070,6 @@ n += String.fromCharCode(55296 | a >> 10, 56320 | a & 1023); | ||
} | ||
function on(e, r, t) { | ||
if (t === void 0 && (t = 2147483647), t < 4) | ||
function an(e, t, r) { | ||
if (r === void 0 && (r = 2147483647), r < 4) | ||
return 0; | ||
for (var n = r, i = n + t - 4, a = 0; a < e.length; ++a) { | ||
for (var n = t, i = n + r - 4, a = 0; a < e.length; ++a) { | ||
var s = e.charCodeAt(a); | ||
@@ -1097,23 +1080,23 @@ if (s >= 55296 && s <= 57343) { | ||
} | ||
if (T[r >> 2] = s, r += 4, r + 4 > i) | ||
if (T[t >> 2] = s, t += 4, t + 4 > i) | ||
break; | ||
} | ||
return T[r >> 2] = 0, r - n; | ||
return T[t >> 2] = 0, t - n; | ||
} | ||
function sn(e) { | ||
for (var r = 0, t = 0; t < e.length; ++t) { | ||
var n = e.charCodeAt(t); | ||
n >= 55296 && n <= 57343 && ++t, r += 4; | ||
function on(e) { | ||
for (var t = 0, r = 0; r < e.length; ++r) { | ||
var n = e.charCodeAt(r); | ||
n >= 55296 && n <= 57343 && ++r, t += 4; | ||
} | ||
return r; | ||
return t; | ||
} | ||
function un(e, r, t) { | ||
t = S(t); | ||
function sn(e, t, r) { | ||
r = R(r); | ||
var n, i, a, s, o; | ||
r === 2 ? (n = rn, i = tn, s = nn, a = () => ge, o = 1) : r === 4 && (n = an, i = on, s = sn, a = () => F, o = 2), x(e, { name: t, fromWireType: function(f) { | ||
for (var c = F[f >> 2], d = a(), v, h = f + 4, _ = 0; _ <= c; ++_) { | ||
var P = f + 4 + _ * r; | ||
t === 2 ? (n = en, i = tn, s = rn, a = () => ge, o = 1) : t === 4 && (n = nn, i = an, s = on, a = () => E, o = 2), x(e, { name: r, fromWireType: function(f) { | ||
for (var c = E[f >> 2], d = a(), v, h = f + 4, _ = 0; _ <= c; ++_) { | ||
var P = f + 4 + _ * t; | ||
if (_ == c || d[P >> o] == 0) { | ||
var A = P - h, $ = n(h, A); | ||
v === void 0 ? v = $ : (v += String.fromCharCode(0), v += $), h = P + r; | ||
var A = P - h, C = n(h, A); | ||
v === void 0 ? v = C : (v += String.fromCharCode(0), v += C), h = P + t; | ||
} | ||
@@ -1123,5 +1106,5 @@ } | ||
}, toWireType: function(f, c) { | ||
typeof c != "string" && g("Cannot pass non-string to C++ string type " + t); | ||
var d = s(c), v = Ze(4 + d + r); | ||
return F[v >> 2] = d >> o, i(c, v + 4, d + r), f !== null && f.push(V, v), v; | ||
typeof c != "string" && g("Cannot pass non-string to C++ string type " + r); | ||
var d = s(c), v = ze(4 + d + t); | ||
return E[v >> 2] = d >> o, i(c, v + 4, d + t), f !== null && f.push(V, v), v; | ||
}, argPackAdvance: 8, readValueFromPointer: oe, destructorFunction: function(f) { | ||
@@ -1131,52 +1114,52 @@ V(f); | ||
} | ||
function fn(e, r, t, n, i, a) { | ||
Pe[e] = { name: S(r), rawConstructor: D(t, n), rawDestructor: D(i, a), fields: [] }; | ||
function un(e, t, r, n, i, a) { | ||
Pe[e] = { name: R(t), rawConstructor: k(r, n), rawDestructor: k(i, a), fields: [] }; | ||
} | ||
function cn(e, r, t, n, i, a, s, o, f, c) { | ||
Pe[e].fields.push({ fieldName: S(r), getterReturnType: t, getter: D(n, i), getterContext: a, setterArgumentType: s, setter: D(o, f), setterContext: c }); | ||
function fn(e, t, r, n, i, a, s, o, f, c) { | ||
Pe[e].fields.push({ fieldName: R(t), getterReturnType: r, getter: k(n, i), getterContext: a, setterArgumentType: s, setter: k(o, f), setterContext: c }); | ||
} | ||
function ln(e, r) { | ||
r = S(r), x(e, { isVoid: !0, name: r, argPackAdvance: 0, fromWireType: function() { | ||
}, toWireType: function(t, n) { | ||
function cn(e, t) { | ||
t = R(t), x(e, { isVoid: !0, name: t, argPackAdvance: 0, fromWireType: function() { | ||
}, toWireType: function(r, n) { | ||
} }); | ||
} | ||
function dn(e) { | ||
function ln(e) { | ||
e > 4 && (O.get(e).refcount += 1); | ||
} | ||
function vn(e, r) { | ||
var t = Z[e]; | ||
return t === void 0 && g(r + " has unknown type " + gr(e)), t; | ||
function dn(e, t) { | ||
var r = Z[e]; | ||
return r === void 0 && g(t + " has unknown type " + gt(e)), r; | ||
} | ||
function pn(e, r) { | ||
e = vn(e, "_emval_take_value"); | ||
var t = e.readValueFromPointer(r); | ||
return Fe.toHandle(t); | ||
function vn(e, t) { | ||
e = dn(e, "_emval_take_value"); | ||
var r = e.readValueFromPointer(t); | ||
return Fe.toHandle(r); | ||
} | ||
function hn() { | ||
function pn() { | ||
Q(""); | ||
} | ||
function _n(e, r, t) { | ||
k.copyWithin(e, r, r + t); | ||
function hn(e, t, r) { | ||
D.copyWithin(e, t, t + r); | ||
} | ||
function gn() { | ||
function _n() { | ||
return 2147483648; | ||
} | ||
function yn(e) { | ||
var r = _e.buffer; | ||
function gn(e) { | ||
var t = _e.buffer; | ||
try { | ||
return _e.grow(e - r.byteLength + 65535 >>> 16), Qe(), 1; | ||
return _e.grow(e - t.byteLength + 65535 >>> 16), Je(), 1; | ||
} catch { | ||
} | ||
} | ||
function mn(e) { | ||
var r = k.length; | ||
function yn(e) { | ||
var t = D.length; | ||
e = e >>> 0; | ||
var t = gn(); | ||
if (e > t) | ||
var r = _n(); | ||
if (e > r) | ||
return !1; | ||
let n = (f, c) => f + (c - f % c) % c; | ||
for (var i = 1; i <= 4; i *= 2) { | ||
var a = r * (1 + 0.2 / i); | ||
var a = t * (1 + 0.2 / i); | ||
a = Math.min(a, e + 100663296); | ||
var s = Math.min(t, n(Math.max(e, a), 65536)), o = yn(s); | ||
var s = Math.min(r, n(Math.max(e, a), 65536)), o = gn(s); | ||
if (o) | ||
@@ -1187,4 +1170,4 @@ return !0; | ||
} | ||
var Xe = {}; | ||
function wn() { | ||
var Ne = {}; | ||
function mn() { | ||
return pe || "./this.program"; | ||
@@ -1194,8 +1177,8 @@ } | ||
if (!le.strings) { | ||
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", r = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: e, _: wn() }; | ||
for (var t in Xe) | ||
Xe[t] === void 0 ? delete r[t] : r[t] = Xe[t]; | ||
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: e, _: mn() }; | ||
for (var r in Ne) | ||
Ne[r] === void 0 ? delete t[r] : t[r] = Ne[r]; | ||
var n = []; | ||
for (var t in r) | ||
n.push(t + "=" + r[t]); | ||
for (var r in t) | ||
n.push(r + "=" + t[r]); | ||
le.strings = n; | ||
@@ -1205,23 +1188,23 @@ } | ||
} | ||
function bn(e, r) { | ||
for (var t = 0; t < e.length; ++t) | ||
U[r++ >> 0] = e.charCodeAt(t); | ||
U[r >> 0] = 0; | ||
function wn(e, t) { | ||
for (var r = 0; r < e.length; ++r) | ||
U[t++ >> 0] = e.charCodeAt(r); | ||
U[t >> 0] = 0; | ||
} | ||
function Pn(e, r) { | ||
var t = 0; | ||
function bn(e, t) { | ||
var r = 0; | ||
return le().forEach(function(n, i) { | ||
var a = r + t; | ||
F[e + i * 4 >> 2] = a, bn(n, a), t += n.length + 1; | ||
var a = t + r; | ||
E[e + i * 4 >> 2] = a, wn(n, a), r += n.length + 1; | ||
}), 0; | ||
} | ||
function Cn(e, r) { | ||
var t = le(); | ||
F[e >> 2] = t.length; | ||
function Pn(e, t) { | ||
var r = le(); | ||
E[e >> 2] = r.length; | ||
var n = 0; | ||
return t.forEach(function(i) { | ||
return r.forEach(function(i) { | ||
n += i.length + 1; | ||
}), F[r >> 2] = n, 0; | ||
}), E[t >> 2] = n, 0; | ||
} | ||
function Tn(e) { | ||
function Cn(e) { | ||
return e; | ||
@@ -1232,34 +1215,34 @@ } | ||
} | ||
function $n(e, r) { | ||
for (var t = 0, n = 0; n <= r; t += e[n++]) | ||
function Tn(e, t) { | ||
for (var r = 0, n = 0; n <= t; r += e[n++]) | ||
; | ||
return t; | ||
return r; | ||
} | ||
var Tr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], $r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | ||
function An(e, r) { | ||
for (var t = new Date(e.getTime()); r > 0; ) { | ||
var n = Ee(t.getFullYear()), i = t.getMonth(), a = (n ? Tr : $r)[i]; | ||
if (r > a - t.getDate()) | ||
r -= a - t.getDate() + 1, t.setDate(1), i < 11 ? t.setMonth(i + 1) : (t.setMonth(0), t.setFullYear(t.getFullYear() + 1)); | ||
var Tt = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], $t = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | ||
function $n(e, t) { | ||
for (var r = new Date(e.getTime()); t > 0; ) { | ||
var n = Ee(r.getFullYear()), i = r.getMonth(), a = (n ? Tt : $t)[i]; | ||
if (t > a - r.getDate()) | ||
t -= a - r.getDate() + 1, r.setDate(1), i < 11 ? r.setMonth(i + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() + 1)); | ||
else | ||
return t.setDate(t.getDate() + r), t; | ||
return r.setDate(r.getDate() + t), r; | ||
} | ||
return t; | ||
return r; | ||
} | ||
function Fn(e, r, t) { | ||
var n = t > 0 ? t : br(e) + 1, i = new Array(n), a = wr(e, i, 0, i.length); | ||
return r && (i.length = a), i; | ||
function An(e, t, r) { | ||
var n = r > 0 ? r : bt(e) + 1, i = new Array(n), a = wt(e, i, 0, i.length); | ||
return t && (i.length = a), i; | ||
} | ||
function En(e, r) { | ||
U.set(e, r); | ||
function Fn(e, t) { | ||
U.set(e, t); | ||
} | ||
function Sn(e, r, t, n) { | ||
var i = T[n + 40 >> 2], a = { tm_sec: T[n >> 2], tm_min: T[n + 4 >> 2], tm_hour: T[n + 8 >> 2], tm_mday: T[n + 12 >> 2], tm_mon: T[n + 16 >> 2], tm_year: T[n + 20 >> 2], tm_wday: T[n + 24 >> 2], tm_yday: T[n + 28 >> 2], tm_isdst: T[n + 32 >> 2], tm_gmtoff: T[n + 36 >> 2], tm_zone: i ? ze(i) : "" }, s = ze(t), o = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" }; | ||
function En(e, t, r, n) { | ||
var i = T[n + 40 >> 2], a = { tm_sec: T[n >> 2], tm_min: T[n + 4 >> 2], tm_hour: T[n + 8 >> 2], tm_mday: T[n + 12 >> 2], tm_mon: T[n + 16 >> 2], tm_year: T[n + 20 >> 2], tm_wday: T[n + 24 >> 2], tm_yday: T[n + 28 >> 2], tm_isdst: T[n + 32 >> 2], tm_gmtoff: T[n + 36 >> 2], tm_zone: i ? Le(i) : "" }, s = Le(r), o = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" }; | ||
for (var f in o) | ||
s = s.replace(new RegExp(f, "g"), o[f]); | ||
var c = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], d = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | ||
function v(l, p, R) { | ||
for (var E = typeof l == "number" ? l.toString() : l || ""; E.length < p; ) | ||
E = R[0] + E; | ||
return E; | ||
function v(l, p, F) { | ||
for (var S = typeof l == "number" ? l.toString() : l || ""; S.length < p; ) | ||
S = F[0] + S; | ||
return S; | ||
} | ||
@@ -1270,7 +1253,7 @@ function h(l, p) { | ||
function _(l, p) { | ||
function R(G) { | ||
function F(G) { | ||
return G < 0 ? -1 : G > 0 ? 1 : 0; | ||
} | ||
var E; | ||
return (E = R(l.getFullYear() - p.getFullYear())) === 0 && (E = R(l.getMonth() - p.getMonth())) === 0 && (E = R(l.getDate() - p.getDate())), E; | ||
var S; | ||
return (S = F(l.getFullYear() - p.getFullYear())) === 0 && (S = F(l.getMonth() - p.getMonth())) === 0 && (S = F(l.getDate() - p.getDate())), S; | ||
} | ||
@@ -1296,6 +1279,6 @@ function P(l) { | ||
function A(l) { | ||
var p = An(new Date(l.tm_year + 1900, 0, 1), l.tm_yday), R = new Date(p.getFullYear(), 0, 4), E = new Date(p.getFullYear() + 1, 0, 4), G = P(R), Re = P(E); | ||
var p = $n(new Date(l.tm_year + 1900, 0, 1), l.tm_yday), F = new Date(p.getFullYear(), 0, 4), S = new Date(p.getFullYear() + 1, 0, 4), G = P(F), Re = P(S); | ||
return _(G, p) <= 0 ? _(Re, p) <= 0 ? p.getFullYear() + 1 : p.getFullYear() : p.getFullYear() - 1; | ||
} | ||
var $ = { "%a": function(l) { | ||
var C = { "%a": function(l) { | ||
return c[l.tm_wday].substring(0, 3); | ||
@@ -1325,3 +1308,3 @@ }, "%A": function(l) { | ||
}, "%j": function(l) { | ||
return h(l.tm_mday + $n(Ee(l.tm_year + 1900) ? Tr : $r, l.tm_mon - 1), 3); | ||
return h(l.tm_mday + Tn(Ee(l.tm_year + 1900) ? Tt : $t, l.tm_mon - 1), 3); | ||
}, "%m": function(l) { | ||
@@ -1349,9 +1332,9 @@ return h(l.tm_mon + 1, 2); | ||
if (p == 53) { | ||
var E = (l.tm_wday + 371 - l.tm_yday) % 7; | ||
E != 4 && (E != 3 || !Ee(l.tm_year)) && (p = 1); | ||
var S = (l.tm_wday + 371 - l.tm_yday) % 7; | ||
S != 4 && (S != 3 || !Ee(l.tm_year)) && (p = 1); | ||
} | ||
} else { | ||
p = 52; | ||
var R = (l.tm_wday + 7 - l.tm_yday - 1) % 7; | ||
(R == 4 || R == 5 && Ee(l.tm_year % 400 - 1)) && p++; | ||
var F = (l.tm_wday + 7 - l.tm_yday - 1) % 7; | ||
(F == 4 || F == 5 && Ee(l.tm_year % 400 - 1)) && p++; | ||
} | ||
@@ -1369,4 +1352,4 @@ return h(p, 2); | ||
}, "%z": function(l) { | ||
var p = l.tm_gmtoff, R = p >= 0; | ||
return p = Math.abs(p) / 60, p = p / 60 * 100 + p % 60, (R ? "+" : "-") + ("0000" + p).slice(-4); | ||
var p = l.tm_gmtoff, F = p >= 0; | ||
return p = Math.abs(p) / 60, p = p / 60 * 100 + p % 60, (F ? "+" : "-") + ("0000" + p).slice(-4); | ||
}, "%Z": function(l) { | ||
@@ -1378,22 +1361,22 @@ return l.tm_zone; | ||
s = s.replace(/%%/g, "\0\0"); | ||
for (var f in $) | ||
s.includes(f) && (s = s.replace(new RegExp(f, "g"), $[f](a))); | ||
for (var f in C) | ||
s.includes(f) && (s = s.replace(new RegExp(f, "g"), C[f](a))); | ||
s = s.replace(/\0\0/g, "%"); | ||
var C = Fn(s, !1); | ||
return C.length > r ? 0 : (En(C, e), C.length - 1); | ||
var $ = An(s, !1); | ||
return $.length > t ? 0 : (Fn($, e), $.length - 1); | ||
} | ||
function Rn(e, r, t, n, i) { | ||
return Sn(e, r, t, n); | ||
function Sn(e, t, r, n, i) { | ||
return En(e, t, r, n); | ||
} | ||
sr = u.InternalError = Me(Error, "InternalError"), ft(), re = u.BindingError = Me(Error, "BindingError"), $t(), gt(), Ot(), _r = u.UnboundTypeError = Me(Error, "UnboundTypeError"), Lt(); | ||
var kn = { r: Zr, v: qr, a: Kr, i: Qr, n: et, I: rt, W: tt, o: nt, ba: it, d: Jr, ma: st, Y: ut, fa: ct, V: Ht, la: It, D: xt, T: Yt, ea: Nt, R: Xt, N: Zt, x: qt, t: Jt, Q: en, K: un, O: fn, na: cn, ga: ln, ja: mr, ka: dn, U: pn, J: hn, da: _n, ca: mn, $: Pn, aa: Cn, H: qn, P: ii, B: Jn, q: Zn, b: Dn, C: Gn, ha: Qn, c: Un, h: Ln, j: zn, l: Nn, w: Xn, G: ri, M: ti, A: Kn, F: ai, Z: si, X: ui, k: Hn, g: jn, e: Wn, f: On, L: ni, m: Vn, p: Mn, ia: xn, u: Yn, S: Bn, z: ei, s: In, E: oi, y: Tn, _: Rn }; | ||
zr(); | ||
st = u.InternalError = Ue(Error, "InternalError"), fr(), te = u.BindingError = Ue(Error, "BindingError"), $r(), gr(), Or(), _t = u.UnboundTypeError = Ue(Error, "UnboundTypeError"), Br(); | ||
var Rn = { r: Zt, v: qt, a: Kt, i: Qt, n: er, I: tr, W: rr, o: nr, ba: ir, d: Jt, ma: sr, Y: ur, fa: cr, V: Hr, la: Mr, D: Ir, T: xr, ea: Lr, R: zr, N: Xr, x: Gr, t: qr, Q: Qr, K: sn, O: un, na: fn, ga: cn, ja: mt, ka: ln, U: vn, J: pn, da: hn, ca: yn, $: bn, aa: Pn, H: Gn, P: ni, B: qn, q: Xn, b: Dn, C: Zn, ha: Kn, c: jn, h: Bn, j: Nn, l: Ln, w: zn, G: ei, M: ti, A: Jn, F: ii, Z: oi, X: si, k: Un, g: Wn, e: On, f: kn, L: ri, m: Yn, p: Hn, ia: In, u: xn, S: Vn, z: Qn, s: Mn, E: ai, y: Cn, _: Sn }; | ||
zt(); | ||
var V = u._free = function() { | ||
return (V = u._free = u.asm.qa).apply(null, arguments); | ||
}, Ze = u._malloc = function() { | ||
return (Ze = u._malloc = u.asm.ra).apply(null, arguments); | ||
}, Ar = function() { | ||
return (Ar = u.asm.sa).apply(null, arguments); | ||
}, Fr = u.___getTypeName = function() { | ||
return (Fr = u.___getTypeName = u.asm.ua).apply(null, arguments); | ||
}, ze = u._malloc = function() { | ||
return (ze = u._malloc = u.asm.ra).apply(null, arguments); | ||
}, At = function() { | ||
return (At = u.asm.sa).apply(null, arguments); | ||
}, Ft = u.___getTypeName = function() { | ||
return (Ft = u.___getTypeName = u.asm.ua).apply(null, arguments); | ||
}; | ||
@@ -1411,6 +1394,6 @@ u.__embind_initialize_bindings = function() { | ||
return (b = u.asm.za).apply(null, arguments); | ||
}, Er = function() { | ||
return (Er = u.asm.Aa).apply(null, arguments); | ||
}, Sr = function() { | ||
return (Sr = u.asm.Ba).apply(null, arguments); | ||
}, Et = function() { | ||
return (Et = u.asm.Aa).apply(null, arguments); | ||
}, St = function() { | ||
return (St = u.asm.Ba).apply(null, arguments); | ||
}; | ||
@@ -1420,6 +1403,6 @@ u.dynCall_viijii = function() { | ||
}; | ||
var Rr = u.dynCall_jiii = function() { | ||
return (Rr = u.dynCall_jiii = u.asm.Da).apply(null, arguments); | ||
}, kr = u.dynCall_jiiii = function() { | ||
return (kr = u.dynCall_jiiii = u.asm.Ea).apply(null, arguments); | ||
var Rt = u.dynCall_jiii = function() { | ||
return (Rt = u.dynCall_jiii = u.asm.Da).apply(null, arguments); | ||
}, Dt = u.dynCall_jiiii = function() { | ||
return (Dt = u.dynCall_jiiii = u.asm.Ea).apply(null, arguments); | ||
}; | ||
@@ -1433,8 +1416,8 @@ u.dynCall_iiiiij = function() { | ||
}; | ||
function Dn(e, r) { | ||
var t = w(); | ||
function Dn(e, t) { | ||
var r = w(); | ||
try { | ||
return m(e)(r); | ||
return m(e)(t); | ||
} catch (n) { | ||
if (b(t), n !== n + 0) | ||
if (b(r), n !== n + 0) | ||
throw n; | ||
@@ -1444,6 +1427,6 @@ y(1, 0); | ||
} | ||
function On(e, r, t, n) { | ||
function kn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
m(e)(r, t, n); | ||
m(e)(t, r, n); | ||
} catch (a) { | ||
@@ -1455,6 +1438,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function Wn(e, r, t) { | ||
function On(e, t, r) { | ||
var n = w(); | ||
try { | ||
m(e)(r, t); | ||
m(e)(t, r); | ||
} catch (i) { | ||
@@ -1466,8 +1449,8 @@ if (b(n), i !== i + 0) | ||
} | ||
function jn(e, r) { | ||
var t = w(); | ||
function Wn(e, t) { | ||
var r = w(); | ||
try { | ||
m(e)(r); | ||
m(e)(t); | ||
} catch (n) { | ||
if (b(t), n !== n + 0) | ||
if (b(r), n !== n + 0) | ||
throw n; | ||
@@ -1477,6 +1460,6 @@ y(1, 0); | ||
} | ||
function Un(e, r, t) { | ||
function jn(e, t, r) { | ||
var n = w(); | ||
try { | ||
return m(e)(r, t); | ||
return m(e)(t, r); | ||
} catch (i) { | ||
@@ -1488,16 +1471,16 @@ if (b(n), i !== i + 0) | ||
} | ||
function Hn(e) { | ||
var r = w(); | ||
function Un(e) { | ||
var t = w(); | ||
try { | ||
m(e)(); | ||
} catch (t) { | ||
if (b(r), t !== t + 0) | ||
throw t; | ||
} catch (r) { | ||
if (b(t), r !== r + 0) | ||
throw r; | ||
y(1, 0); | ||
} | ||
} | ||
function Mn(e, r, t, n, i, a) { | ||
function Hn(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
m(e)(r, t, n, i, a); | ||
m(e)(t, r, n, i, a); | ||
} catch (o) { | ||
@@ -1509,6 +1492,6 @@ if (b(s), o !== o + 0) | ||
} | ||
function In(e, r, t, n, i, a, s, o, f, c, d) { | ||
function Mn(e, t, r, n, i, a, s, o, f, c, d) { | ||
var v = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s, o, f, c, d); | ||
m(e)(t, r, n, i, a, s, o, f, c, d); | ||
} catch (h) { | ||
@@ -1520,6 +1503,6 @@ if (b(v), h !== h + 0) | ||
} | ||
function xn(e, r, t, n, i, a, s) { | ||
function In(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s); | ||
m(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
@@ -1531,6 +1514,6 @@ if (b(o), f !== f + 0) | ||
} | ||
function Yn(e, r, t, n, i, a, s, o) { | ||
function xn(e, t, r, n, i, a, s, o) { | ||
var f = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s, o); | ||
m(e)(t, r, n, i, a, s, o); | ||
} catch (c) { | ||
@@ -1542,6 +1525,6 @@ if (b(f), c !== c + 0) | ||
} | ||
function Vn(e, r, t, n, i) { | ||
function Yn(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
m(e)(r, t, n, i); | ||
m(e)(t, r, n, i); | ||
} catch (s) { | ||
@@ -1553,6 +1536,6 @@ if (b(a), s !== s + 0) | ||
} | ||
function Bn(e, r, t, n, i, a, s, o, f) { | ||
function Vn(e, t, r, n, i, a, s, o, f) { | ||
var c = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s, o, f); | ||
m(e)(t, r, n, i, a, s, o, f); | ||
} catch (d) { | ||
@@ -1564,6 +1547,6 @@ if (b(c), d !== d + 0) | ||
} | ||
function Ln(e, r, t, n) { | ||
function Bn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return m(e)(r, t, n); | ||
return m(e)(t, r, n); | ||
} catch (a) { | ||
@@ -1575,6 +1558,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function Nn(e, r, t, n, i, a) { | ||
function Ln(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
return m(e)(r, t, n, i, a); | ||
return m(e)(t, r, n, i, a); | ||
} catch (o) { | ||
@@ -1586,6 +1569,6 @@ if (b(s), o !== o + 0) | ||
} | ||
function zn(e, r, t, n, i) { | ||
function Nn(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
return m(e)(r, t, n, i); | ||
return m(e)(t, r, n, i); | ||
} catch (s) { | ||
@@ -1597,6 +1580,6 @@ if (b(a), s !== s + 0) | ||
} | ||
function Xn(e, r, t, n, i, a, s) { | ||
function zn(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
return m(e)(r, t, n, i, a, s); | ||
return m(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
@@ -1608,16 +1591,16 @@ if (b(o), f !== f + 0) | ||
} | ||
function Zn(e) { | ||
var r = w(); | ||
function Xn(e) { | ||
var t = w(); | ||
try { | ||
return m(e)(); | ||
} catch (t) { | ||
if (b(r), t !== t + 0) | ||
throw t; | ||
} catch (r) { | ||
if (b(t), r !== r + 0) | ||
throw r; | ||
y(1, 0); | ||
} | ||
} | ||
function Gn(e, r, t, n) { | ||
function Zn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return m(e)(r, t, n); | ||
return m(e)(t, r, n); | ||
} catch (a) { | ||
@@ -1629,6 +1612,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function qn(e, r, t, n) { | ||
function Gn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return m(e)(r, t, n); | ||
return m(e)(t, r, n); | ||
} catch (a) { | ||
@@ -1640,6 +1623,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function Jn(e, r, t, n, i, a) { | ||
function qn(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
return m(e)(r, t, n, i, a); | ||
return m(e)(t, r, n, i, a); | ||
} catch (o) { | ||
@@ -1651,6 +1634,6 @@ if (b(s), o !== o + 0) | ||
} | ||
function Kn(e, r, t, n, i, a, s, o, f, c) { | ||
function Jn(e, t, r, n, i, a, s, o, f, c) { | ||
var d = w(); | ||
try { | ||
return m(e)(r, t, n, i, a, s, o, f, c); | ||
return m(e)(t, r, n, i, a, s, o, f, c); | ||
} catch (v) { | ||
@@ -1662,6 +1645,6 @@ if (b(d), v !== v + 0) | ||
} | ||
function Qn(e, r, t) { | ||
function Kn(e, t, r) { | ||
var n = w(); | ||
try { | ||
return m(e)(r, t); | ||
return m(e)(t, r); | ||
} catch (i) { | ||
@@ -1673,6 +1656,6 @@ if (b(n), i !== i + 0) | ||
} | ||
function ei(e, r, t, n, i, a, s, o, f, c) { | ||
function Qn(e, t, r, n, i, a, s, o, f, c) { | ||
var d = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s, o, f, c); | ||
m(e)(t, r, n, i, a, s, o, f, c); | ||
} catch (v) { | ||
@@ -1684,6 +1667,6 @@ if (b(d), v !== v + 0) | ||
} | ||
function ri(e, r, t, n, i, a, s, o) { | ||
function ei(e, t, r, n, i, a, s, o) { | ||
var f = w(); | ||
try { | ||
return m(e)(r, t, n, i, a, s, o); | ||
return m(e)(t, r, n, i, a, s, o); | ||
} catch (c) { | ||
@@ -1695,6 +1678,6 @@ if (b(f), c !== c + 0) | ||
} | ||
function ti(e, r, t, n, i, a, s, o, f) { | ||
function ti(e, t, r, n, i, a, s, o, f) { | ||
var c = w(); | ||
try { | ||
return m(e)(r, t, n, i, a, s, o, f); | ||
return m(e)(t, r, n, i, a, s, o, f); | ||
} catch (d) { | ||
@@ -1706,6 +1689,6 @@ if (b(c), d !== d + 0) | ||
} | ||
function ni(e, r, t, n, i, a, s) { | ||
function ri(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s); | ||
m(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
@@ -1717,6 +1700,6 @@ if (b(o), f !== f + 0) | ||
} | ||
function ii(e, r, t, n) { | ||
function ni(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return m(e)(r, t, n); | ||
return m(e)(t, r, n); | ||
} catch (a) { | ||
@@ -1728,6 +1711,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function ai(e, r, t, n, i, a, s, o, f, c, d, v) { | ||
function ii(e, t, r, n, i, a, s, o, f, c, d, v) { | ||
var h = w(); | ||
try { | ||
return m(e)(r, t, n, i, a, s, o, f, c, d, v); | ||
return m(e)(t, r, n, i, a, s, o, f, c, d, v); | ||
} catch (_) { | ||
@@ -1739,16 +1722,16 @@ if (b(h), _ !== _ + 0) | ||
} | ||
function oi(e, r, t, n, i, a, s, o, f, c, d, v, h, _, P, A) { | ||
var $ = w(); | ||
function ai(e, t, r, n, i, a, s, o, f, c, d, v, h, _, P, A) { | ||
var C = w(); | ||
try { | ||
m(e)(r, t, n, i, a, s, o, f, c, d, v, h, _, P, A); | ||
} catch (C) { | ||
if (b($), C !== C + 0) | ||
throw C; | ||
m(e)(t, r, n, i, a, s, o, f, c, d, v, h, _, P, A); | ||
} catch ($) { | ||
if (b(C), $ !== $ + 0) | ||
throw $; | ||
y(1, 0); | ||
} | ||
} | ||
function si(e, r, t, n) { | ||
function oi(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return Rr(e, r, t, n); | ||
return Rt(e, t, r, n); | ||
} catch (a) { | ||
@@ -1760,6 +1743,6 @@ if (b(i), a !== a + 0) | ||
} | ||
function ui(e, r, t, n, i) { | ||
function si(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
return kr(e, r, t, n, i); | ||
return Dt(e, t, r, n, i); | ||
} catch (s) { | ||
@@ -1773,9 +1756,9 @@ if (b(a), s !== s + 0) | ||
ae = function e() { | ||
Se || Dr(), Se || (ae = e); | ||
Se || kt(), Se || (ae = e); | ||
}; | ||
function Dr() { | ||
if (z > 0 || (jr(), z > 0)) | ||
function kt() { | ||
if (z > 0 || (jt(), z > 0)) | ||
return; | ||
function e() { | ||
Se || (Se = !0, u.calledRun = !0, !qe && (Ur(), B(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), Hr())); | ||
Se || (Se = !0, u.calledRun = !0, !Ze && (Ut(), B(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), Ht())); | ||
} | ||
@@ -1791,9 +1774,9 @@ u.setStatus ? (u.setStatus("Running..."), setTimeout(function() { | ||
u.preInit.pop()(); | ||
return Dr(), H.ready; | ||
return kt(), H.ready; | ||
}; | ||
})(); | ||
function pi(W) { | ||
return fi(ke, W); | ||
function vi(W) { | ||
return ui(De, W); | ||
} | ||
async function hi(W, { | ||
async function pi(W, { | ||
tryHarder: H = N.tryHarder, | ||
@@ -1803,3 +1786,3 @@ formats: u = N.formats, | ||
} = N) { | ||
return ci( | ||
return fi( | ||
W, | ||
@@ -1811,6 +1794,6 @@ { | ||
}, | ||
ke | ||
De | ||
); | ||
} | ||
async function _i(W, { | ||
async function hi(W, { | ||
tryHarder: H = N.tryHarder, | ||
@@ -1820,3 +1803,3 @@ formats: u = N.formats, | ||
} = N) { | ||
return li( | ||
return ci( | ||
W, | ||
@@ -1828,6 +1811,6 @@ { | ||
}, | ||
ke | ||
De | ||
); | ||
} | ||
async function gi(W, { | ||
async function _i(W, { | ||
format: H = q.format, | ||
@@ -1840,3 +1823,3 @@ charset: u = q.charset, | ||
} = q) { | ||
return di( | ||
return li( | ||
W, | ||
@@ -1851,16 +1834,16 @@ { | ||
}, | ||
ke | ||
De | ||
); | ||
} | ||
export { | ||
wi as ZXING_BARCODE_FORMAT_NAMES, | ||
bi as ZXING_CHARACTOR_SET_NAMES, | ||
mi as ZXING_BARCODE_FORMAT_NAMES, | ||
wi as ZXING_CHARACTOR_SET_NAMES, | ||
N as defaultZXingReadOptions, | ||
q as defaultZXingWriteOptions, | ||
pi as getZXingModule, | ||
Pi as purgeZXingModule, | ||
_i as readBarcodeFromImageData, | ||
hi as readBarcodeFromImageFile, | ||
Ci as setZXingModuleOverrides, | ||
gi as writeBarcodeToImageFile | ||
vi as getZXingModule, | ||
bi as purgeZXingModule, | ||
hi as readBarcodeFromImageData, | ||
pi as readBarcodeFromImageFile, | ||
Pi as setZXingModuleOverrides, | ||
_i as writeBarcodeToImageFile | ||
}; |
@@ -1,136 +0,136 @@ | ||
import { g as oi, r as si, d as V, a as ui } from "../core-407013f0.js"; | ||
import { Z as hi, b as _i, c as gi, p as yi, s as mi } from "../core-407013f0.js"; | ||
var Ne = (() => { | ||
import { g as ai, r as oi, d as V, a as si } from "../core-a879f5a9.js"; | ||
import { Z as pi, b as hi, c as _i, p as gi, s as yi } from "../core-a879f5a9.js"; | ||
var Ve = (() => { | ||
var x = import.meta.url; | ||
return function(B = {}) { | ||
var u = typeof B < "u" ? B : {}, G, ce; | ||
u.ready = new Promise(function(e, r) { | ||
G = e, ce = r; | ||
return function(N = {}) { | ||
var u = typeof N < "u" ? N : {}, G, ce; | ||
u.ready = new Promise(function(e, t) { | ||
G = e, ce = t; | ||
}); | ||
var Le = Object.assign({}, u), ze = "./this.program", Xe = typeof window == "object", le = typeof importScripts == "function"; | ||
var Ne = Object.assign({}, u), Be = "./this.program", Le = typeof window == "object", le = typeof importScripts == "function"; | ||
typeof process == "object" && typeof process.versions == "object" && process.versions.node; | ||
var W = ""; | ||
function kr(e) { | ||
function Dt(e) { | ||
return u.locateFile ? u.locateFile(e, W) : W + e; | ||
} | ||
var Fe; | ||
(Xe || le) && (le ? W = self.location.href : typeof document < "u" && document.currentScript && (W = document.currentScript.src), x && (W = x), W.indexOf("blob:") !== 0 ? W = W.substr(0, W.replace(/[?#].*/, "").lastIndexOf("/") + 1) : W = "", le && (Fe = (e) => { | ||
var r = new XMLHttpRequest(); | ||
return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response); | ||
(Le || le) && (le ? W = self.location.href : typeof document < "u" && document.currentScript && (W = document.currentScript.src), x && (W = x), W.indexOf("blob:") !== 0 ? W = W.substr(0, W.replace(/[?#].*/, "").lastIndexOf("/") + 1) : W = "", le && (Fe = (e) => { | ||
var t = new XMLHttpRequest(); | ||
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response); | ||
})), u.print || console.log.bind(console); | ||
var ee = u.printErr || console.warn.bind(console); | ||
Object.assign(u, Le), Le = null, u.arguments && u.arguments, u.thisProgram && (ze = u.thisProgram), u.quit && u.quit; | ||
var re; | ||
u.wasmBinary && (re = u.wasmBinary), u.noExitRuntime, typeof WebAssembly != "object" && J("no native wasm support detected"); | ||
var de, Ze = !1; | ||
function Dr(e, r) { | ||
e || J(r); | ||
Object.assign(u, Ne), Ne = null, u.arguments && u.arguments, u.thisProgram && (Be = u.thisProgram), u.quit && u.quit; | ||
var te; | ||
u.wasmBinary && (te = u.wasmBinary), u.noExitRuntime, typeof WebAssembly != "object" && J("no native wasm support detected"); | ||
var de, ze = !1; | ||
function kt(e, t) { | ||
e || J(t); | ||
} | ||
var j, k, q, ve, P, A, Ge, qe; | ||
function Je() { | ||
var U, D, q, ve, T, $, Xe, Ze; | ||
function Ge() { | ||
var e = de.buffer; | ||
u.HEAP8 = j = new Int8Array(e), u.HEAP16 = q = new Int16Array(e), u.HEAP32 = P = new Int32Array(e), u.HEAPU8 = k = new Uint8Array(e), u.HEAPU16 = ve = new Uint16Array(e), u.HEAPU32 = A = new Uint32Array(e), u.HEAPF32 = Ge = new Float32Array(e), u.HEAPF64 = qe = new Float64Array(e); | ||
u.HEAP8 = U = new Int8Array(e), u.HEAP16 = q = new Int16Array(e), u.HEAP32 = T = new Int32Array(e), u.HEAPU8 = D = new Uint8Array(e), u.HEAPU16 = ve = new Uint16Array(e), u.HEAPU32 = $ = new Uint32Array(e), u.HEAPF32 = Xe = new Float32Array(e), u.HEAPF64 = Ze = new Float64Array(e); | ||
} | ||
var Ke, Qe = [], er = [], rr = []; | ||
function Or() { | ||
var qe, Je = [], Ke = [], Qe = []; | ||
function Ot() { | ||
if (u.preRun) | ||
for (typeof u.preRun == "function" && (u.preRun = [u.preRun]); u.preRun.length; ) | ||
Ur(u.preRun.shift()); | ||
Ee(Qe); | ||
jt(u.preRun.shift()); | ||
Ee(Je); | ||
} | ||
function Wr() { | ||
Ee(er); | ||
function Wt() { | ||
Ee(Ke); | ||
} | ||
function jr() { | ||
function Ut() { | ||
if (u.postRun) | ||
for (typeof u.postRun == "function" && (u.postRun = [u.postRun]); u.postRun.length; ) | ||
Mr(u.postRun.shift()); | ||
Ee(rr); | ||
Mt(u.postRun.shift()); | ||
Ee(Qe); | ||
} | ||
function Ur(e) { | ||
Qe.unshift(e); | ||
function jt(e) { | ||
Je.unshift(e); | ||
} | ||
function Hr(e) { | ||
er.unshift(e); | ||
function Ht(e) { | ||
Ke.unshift(e); | ||
} | ||
function Mr(e) { | ||
rr.unshift(e); | ||
function Mt(e) { | ||
Qe.unshift(e); | ||
} | ||
var N = 0, te = null; | ||
function Ir(e) { | ||
N++, u.monitorRunDependencies && u.monitorRunDependencies(N); | ||
var B = 0, re = null; | ||
function It(e) { | ||
B++, u.monitorRunDependencies && u.monitorRunDependencies(B); | ||
} | ||
function xr(e) { | ||
if (N--, u.monitorRunDependencies && u.monitorRunDependencies(N), N == 0 && te) { | ||
var r = te; | ||
te = null, r(); | ||
function xt(e) { | ||
if (B--, u.monitorRunDependencies && u.monitorRunDependencies(B), B == 0 && re) { | ||
var t = re; | ||
re = null, t(); | ||
} | ||
} | ||
function J(e) { | ||
u.onAbort && u.onAbort(e), e = "Aborted(" + e + ")", ee(e), Ze = !0, e += ". Build with -sASSERTIONS for more info."; | ||
var r = new WebAssembly.RuntimeError(e); | ||
throw ce(r), r; | ||
u.onAbort && u.onAbort(e), e = "Aborted(" + e + ")", ee(e), ze = !0, e += ". Build with -sASSERTIONS for more info."; | ||
var t = new WebAssembly.RuntimeError(e); | ||
throw ce(t), t; | ||
} | ||
var Yr = "data:application/octet-stream;base64,"; | ||
function tr(e) { | ||
return e.startsWith(Yr); | ||
var Yt = "data:application/octet-stream;base64,"; | ||
function et(e) { | ||
return e.startsWith(Yt); | ||
} | ||
var L; | ||
u.locateFile ? (L = "zxing_reader.wasm", tr(L) || (L = kr(L))) : L = new URL("/reader/zxing_reader.wasm", self.location).href; | ||
function nr(e) { | ||
u.locateFile ? (L = "zxing_reader.wasm", et(L) || (L = Dt(L))) : L = new URL("/reader/zxing_reader.wasm", self.location).href; | ||
function tt(e) { | ||
try { | ||
if (e == L && re) | ||
return new Uint8Array(re); | ||
if (e == L && te) | ||
return new Uint8Array(te); | ||
if (Fe) | ||
return Fe(e); | ||
throw "both async and sync fetching of the wasm failed"; | ||
} catch (r) { | ||
J(r); | ||
} catch (t) { | ||
J(t); | ||
} | ||
} | ||
function Vr(e) { | ||
return !re && (Xe || le) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(r) { | ||
if (!r.ok) | ||
function Vt(e) { | ||
return !te && (Le || le) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(t) { | ||
if (!t.ok) | ||
throw "failed to load wasm binary file at '" + e + "'"; | ||
return r.arrayBuffer(); | ||
return t.arrayBuffer(); | ||
}).catch(function() { | ||
return nr(e); | ||
return tt(e); | ||
}) : Promise.resolve().then(function() { | ||
return nr(e); | ||
return tt(e); | ||
}); | ||
} | ||
function ir(e, r, t) { | ||
return Vr(e).then(function(n) { | ||
return WebAssembly.instantiate(n, r); | ||
function rt(e, t, r) { | ||
return Vt(e).then(function(n) { | ||
return WebAssembly.instantiate(n, t); | ||
}).then(function(n) { | ||
return n; | ||
}).then(t, function(n) { | ||
}).then(r, function(n) { | ||
ee("failed to asynchronously prepare wasm: " + n), J(n); | ||
}); | ||
} | ||
function Br(e, r, t, n) { | ||
return !e && typeof WebAssembly.instantiateStreaming == "function" && !tr(r) && typeof fetch == "function" ? fetch(r, { credentials: "same-origin" }).then(function(i) { | ||
var a = WebAssembly.instantiateStreaming(i, t); | ||
function Nt(e, t, r, n) { | ||
return !e && typeof WebAssembly.instantiateStreaming == "function" && !et(t) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then(function(i) { | ||
var a = WebAssembly.instantiateStreaming(i, r); | ||
return a.then(n, function(s) { | ||
return ee("wasm streaming compile failed: " + s), ee("falling back to ArrayBuffer instantiation"), ir(r, t, n); | ||
return ee("wasm streaming compile failed: " + s), ee("falling back to ArrayBuffer instantiation"), rt(t, r, n); | ||
}); | ||
}) : ir(r, t, n); | ||
}) : rt(t, r, n); | ||
} | ||
function Nr() { | ||
var e = { a: En }; | ||
function r(n, i) { | ||
function Bt() { | ||
var e = { a: Fn }; | ||
function t(n, i) { | ||
var a = n.exports; | ||
return u.asm = a, de = u.asm.na, Je(), Ke = u.asm.sa, Hr(u.asm.oa), xr(), a; | ||
return u.asm = a, de = u.asm.na, Ge(), qe = u.asm.sa, Ht(u.asm.oa), xt(), a; | ||
} | ||
Ir(); | ||
function t(n) { | ||
r(n.instance); | ||
It(); | ||
function r(n) { | ||
t(n.instance); | ||
} | ||
if (u.instantiateWasm) | ||
try { | ||
return u.instantiateWasm(e, r); | ||
return u.instantiateWasm(e, t); | ||
} catch (n) { | ||
ee("Module.instantiateWasm callback failed with error: " + n), ce(n); | ||
} | ||
return Br(re, L, e, t).catch(ce), {}; | ||
return Nt(te, L, e, r).catch(ce), {}; | ||
} | ||
@@ -142,130 +142,130 @@ function Ee(e) { | ||
var pe = []; | ||
function Lr(e) { | ||
function Lt(e) { | ||
e.add_ref(); | ||
} | ||
var he = 0; | ||
function zr(e) { | ||
var r = new ge(e); | ||
return r.get_caught() || (r.set_caught(!0), he--), r.set_rethrown(!1), pe.push(r), Lr(r), r.get_exception_ptr(); | ||
function zt(e) { | ||
var t = new ge(e); | ||
return t.get_caught() || (t.set_caught(!0), he--), t.set_rethrown(!1), pe.push(t), Lt(t), t.get_exception_ptr(); | ||
} | ||
var U = 0, _e = []; | ||
var j = 0, _e = []; | ||
function y(e) { | ||
var r = _e[e]; | ||
return r || (e >= _e.length && (_e.length = e + 1), _e[e] = r = Ke.get(e)), r; | ||
var t = _e[e]; | ||
return t || (e >= _e.length && (_e.length = e + 1), _e[e] = t = qe.get(e)), t; | ||
} | ||
function Xr(e) { | ||
function Xt(e) { | ||
if (e.release_ref() && !e.get_rethrown()) { | ||
var r = e.get_destructor(); | ||
r && y(r)(e.excPtr), Tr(e.excPtr); | ||
var t = e.get_destructor(); | ||
t && y(t)(e.excPtr), Tt(e.excPtr); | ||
} | ||
} | ||
function Zr() { | ||
g(0); | ||
function Zt() { | ||
_(0); | ||
var e = pe.pop(); | ||
Xr(e), U = 0; | ||
Xt(e), j = 0; | ||
} | ||
function ge(e) { | ||
this.excPtr = e, this.ptr = e - 24, this.set_type = function(r) { | ||
A[this.ptr + 4 >> 2] = r; | ||
this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) { | ||
$[this.ptr + 4 >> 2] = t; | ||
}, this.get_type = function() { | ||
return A[this.ptr + 4 >> 2]; | ||
}, this.set_destructor = function(r) { | ||
A[this.ptr + 8 >> 2] = r; | ||
return $[this.ptr + 4 >> 2]; | ||
}, this.set_destructor = function(t) { | ||
$[this.ptr + 8 >> 2] = t; | ||
}, this.get_destructor = function() { | ||
return A[this.ptr + 8 >> 2]; | ||
}, this.set_refcount = function(r) { | ||
P[this.ptr >> 2] = r; | ||
}, this.set_caught = function(r) { | ||
r = r ? 1 : 0, j[this.ptr + 12 >> 0] = r; | ||
return $[this.ptr + 8 >> 2]; | ||
}, this.set_refcount = function(t) { | ||
T[this.ptr >> 2] = t; | ||
}, this.set_caught = function(t) { | ||
t = t ? 1 : 0, U[this.ptr + 12 >> 0] = t; | ||
}, this.get_caught = function() { | ||
return j[this.ptr + 12 >> 0] != 0; | ||
}, this.set_rethrown = function(r) { | ||
r = r ? 1 : 0, j[this.ptr + 13 >> 0] = r; | ||
return U[this.ptr + 12 >> 0] != 0; | ||
}, this.set_rethrown = function(t) { | ||
t = t ? 1 : 0, U[this.ptr + 13 >> 0] = t; | ||
}, this.get_rethrown = function() { | ||
return j[this.ptr + 13 >> 0] != 0; | ||
}, this.init = function(r, t) { | ||
this.set_adjusted_ptr(0), this.set_type(r), this.set_destructor(t), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1); | ||
return U[this.ptr + 13 >> 0] != 0; | ||
}, this.init = function(t, r) { | ||
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1); | ||
}, this.add_ref = function() { | ||
var r = P[this.ptr >> 2]; | ||
P[this.ptr >> 2] = r + 1; | ||
var t = T[this.ptr >> 2]; | ||
T[this.ptr >> 2] = t + 1; | ||
}, this.release_ref = function() { | ||
var r = P[this.ptr >> 2]; | ||
return P[this.ptr >> 2] = r - 1, r === 1; | ||
}, this.set_adjusted_ptr = function(r) { | ||
A[this.ptr + 16 >> 2] = r; | ||
var t = T[this.ptr >> 2]; | ||
return T[this.ptr >> 2] = t - 1, t === 1; | ||
}, this.set_adjusted_ptr = function(t) { | ||
$[this.ptr + 16 >> 2] = t; | ||
}, this.get_adjusted_ptr = function() { | ||
return A[this.ptr + 16 >> 2]; | ||
return $[this.ptr + 16 >> 2]; | ||
}, this.get_exception_ptr = function() { | ||
var r = Fr(this.get_type()); | ||
if (r) | ||
return A[this.excPtr >> 2]; | ||
var t = this.get_adjusted_ptr(); | ||
return t !== 0 ? t : this.excPtr; | ||
var t = Ft(this.get_type()); | ||
if (t) | ||
return $[this.excPtr >> 2]; | ||
var r = this.get_adjusted_ptr(); | ||
return r !== 0 ? r : this.excPtr; | ||
}; | ||
} | ||
function Gr(e) { | ||
throw U || (U = e), U; | ||
function Gt(e) { | ||
throw j || (j = e), j; | ||
} | ||
function Re() { | ||
var e = U; | ||
var e = j; | ||
if (!e) | ||
return fe(0), 0; | ||
var r = new ge(e); | ||
r.set_adjusted_ptr(e); | ||
var t = r.get_type(); | ||
if (!t) | ||
var t = new ge(e); | ||
t.set_adjusted_ptr(e); | ||
var r = t.get_type(); | ||
if (!r) | ||
return fe(0), e; | ||
for (var n = 0; n < arguments.length; n++) { | ||
var i = arguments[n]; | ||
if (i === 0 || i === t) | ||
if (i === 0 || i === r) | ||
break; | ||
var a = r.ptr + 16; | ||
if (Ar(i, t, a)) | ||
var a = t.ptr + 16; | ||
if ($t(i, r, a)) | ||
return fe(i), e; | ||
} | ||
return fe(t), e; | ||
return fe(r), e; | ||
} | ||
var qr = Re, Jr = Re, Kr = Re; | ||
function Qr(e) { | ||
var qt = Re, Jt = Re, Kt = Re; | ||
function Qt(e) { | ||
return new ge(e).get_exception_ptr(); | ||
} | ||
function et() { | ||
function er() { | ||
var e = pe.pop(); | ||
e || J("no exception to throw"); | ||
var r = e.excPtr; | ||
throw e.get_rethrown() || (pe.push(e), e.set_rethrown(!0), e.set_caught(!1), he++), U = r, U; | ||
var t = e.excPtr; | ||
throw e.get_rethrown() || (pe.push(e), e.set_rethrown(!0), e.set_caught(!1), he++), j = t, j; | ||
} | ||
function rt(e, r, t) { | ||
function tr(e, t, r) { | ||
var n = new ge(e); | ||
throw n.init(r, t), U = e, he++, U; | ||
throw n.init(t, r), j = e, he++, j; | ||
} | ||
function tt() { | ||
function rr() { | ||
return he; | ||
} | ||
var ye = {}; | ||
function ar(e) { | ||
function nt(e) { | ||
for (; e.length; ) { | ||
var r = e.pop(), t = e.pop(); | ||
t(r); | ||
var t = e.pop(), r = e.pop(); | ||
r(t); | ||
} | ||
} | ||
function ne(e) { | ||
return this.fromWireType(P[e >> 2]); | ||
return this.fromWireType(T[e >> 2]); | ||
} | ||
var K = {}, z = {}, me = {}, nt = 48, it = 57; | ||
function Se(e) { | ||
var K = {}, z = {}, me = {}, nr = 48, ir = 57; | ||
function it(e) { | ||
if (e === void 0) | ||
return "_unknown"; | ||
e = e.replace(/[^a-zA-Z0-9_]/g, "$"); | ||
var r = e.charCodeAt(0); | ||
return r >= nt && r <= it ? "_" + e : e; | ||
var t = e.charCodeAt(0); | ||
return t >= nr && t <= ir ? "_" + e : e; | ||
} | ||
function ke(e, r) { | ||
return e = Se(e), { [e]: function() { | ||
return r.apply(this, arguments); | ||
function at(e, t) { | ||
return e = it(e), { [e]: function() { | ||
return t.apply(this, arguments); | ||
} }[e]; | ||
} | ||
function De(e, r) { | ||
var t = ke(r, function(n) { | ||
this.name = r, this.message = n; | ||
function Se(e, t) { | ||
var r = at(t, function(n) { | ||
this.name = t, this.message = n; | ||
var i = new Error(n).stack; | ||
@@ -275,58 +275,58 @@ i !== void 0 && (this.stack = this.toString() + ` | ||
}); | ||
return t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.prototype.toString = function() { | ||
return r.prototype = Object.create(e.prototype), r.prototype.constructor = r, r.prototype.toString = function() { | ||
return this.message === void 0 ? this.name : this.name + ": " + this.message; | ||
}, t; | ||
}, r; | ||
} | ||
var or = void 0; | ||
var ot = void 0; | ||
function we(e) { | ||
throw new or(e); | ||
throw new ot(e); | ||
} | ||
function X(e, r, t) { | ||
function X(e, t, r) { | ||
e.forEach(function(o) { | ||
me[o] = r; | ||
me[o] = t; | ||
}); | ||
function n(o) { | ||
var c = t(o); | ||
c.length !== e.length && we("Mismatched type converter count"); | ||
for (var f = 0; f < e.length; ++f) | ||
H(e[f], c[f]); | ||
var f = r(o); | ||
f.length !== e.length && we("Mismatched type converter count"); | ||
for (var c = 0; c < e.length; ++c) | ||
H(e[c], f[c]); | ||
} | ||
var i = new Array(r.length), a = [], s = 0; | ||
r.forEach((o, c) => { | ||
z.hasOwnProperty(o) ? i[c] = z[o] : (a.push(o), K.hasOwnProperty(o) || (K[o] = []), K[o].push(() => { | ||
i[c] = z[o], ++s, s === a.length && n(i); | ||
var i = new Array(t.length), a = [], s = 0; | ||
t.forEach((o, f) => { | ||
z.hasOwnProperty(o) ? i[f] = z[o] : (a.push(o), K.hasOwnProperty(o) || (K[o] = []), K[o].push(() => { | ||
i[f] = z[o], ++s, s === a.length && n(i); | ||
})); | ||
}), a.length === 0 && n(i); | ||
} | ||
function at(e) { | ||
var r = ye[e]; | ||
function ar(e) { | ||
var t = ye[e]; | ||
delete ye[e]; | ||
var t = r.rawConstructor, n = r.rawDestructor, i = r.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType)); | ||
var r = t.rawConstructor, n = t.rawDestructor, i = t.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType)); | ||
X([e], a, (s) => { | ||
var o = {}; | ||
return i.forEach((c, f) => { | ||
var d = c.fieldName, p = s[f], h = c.getter, _ = c.getterContext, C = s[f + i.length], F = c.setter, T = c.setterContext; | ||
o[d] = { read: ($) => p.fromWireType(h(_, $)), write: ($, l) => { | ||
return i.forEach((f, c) => { | ||
var d = f.fieldName, p = s[c], h = f.getter, g = f.getterContext, P = s[c + i.length], E = f.setter, C = f.setterContext; | ||
o[d] = { read: (R) => p.fromWireType(h(g, R)), write: (R, l) => { | ||
var v = []; | ||
F(T, $, C.toWireType(v, l)), ar(v); | ||
E(C, R, P.toWireType(v, l)), nt(v); | ||
} }; | ||
}), [{ name: r.name, fromWireType: function(c) { | ||
var f = {}; | ||
}), [{ name: t.name, fromWireType: function(f) { | ||
var c = {}; | ||
for (var d in o) | ||
f[d] = o[d].read(c); | ||
return n(c), f; | ||
}, toWireType: function(c, f) { | ||
c[d] = o[d].read(f); | ||
return n(f), c; | ||
}, toWireType: function(f, c) { | ||
for (var d in o) | ||
if (!(d in f)) | ||
if (!(d in c)) | ||
throw new TypeError('Missing field: "' + d + '"'); | ||
var p = t(); | ||
var p = r(); | ||
for (d in o) | ||
o[d].write(p, f[d]); | ||
return c !== null && c.push(n, p), p; | ||
o[d].write(p, c[d]); | ||
return f !== null && f.push(n, p), p; | ||
}, argPackAdvance: 8, readValueFromPointer: ne, destructorFunction: n }]; | ||
}); | ||
} | ||
function ot(e, r, t, n, i) { | ||
function or(e, t, r, n, i) { | ||
} | ||
function Oe(e) { | ||
function De(e) { | ||
switch (e) { | ||
@@ -345,12 +345,12 @@ case 1: | ||
} | ||
function st() { | ||
for (var e = new Array(256), r = 0; r < 256; ++r) | ||
e[r] = String.fromCharCode(r); | ||
sr = e; | ||
function sr() { | ||
for (var e = new Array(256), t = 0; t < 256; ++t) | ||
e[t] = String.fromCharCode(t); | ||
st = e; | ||
} | ||
var sr = void 0; | ||
function R(e) { | ||
for (var r = "", t = e; k[t]; ) | ||
r += sr[k[t++]]; | ||
return r; | ||
var st = void 0; | ||
function S(e) { | ||
for (var t = "", r = e; D[r]; ) | ||
t += st[D[r++]]; | ||
return t; | ||
} | ||
@@ -361,12 +361,12 @@ var Q = void 0; | ||
} | ||
function H(e, r, t = {}) { | ||
if (!("argPackAdvance" in r)) | ||
function H(e, t, r = {}) { | ||
if (!("argPackAdvance" in t)) | ||
throw new TypeError("registerType registeredInstance requires argPackAdvance"); | ||
var n = r.name; | ||
var n = t.name; | ||
if (e || m('type "' + n + '" must have a positive integer typeid pointer'), z.hasOwnProperty(e)) { | ||
if (t.ignoreDuplicateRegistrations) | ||
if (r.ignoreDuplicateRegistrations) | ||
return; | ||
m("Cannot register type '" + n + "' twice"); | ||
} | ||
if (z[e] = r, delete me[e], K.hasOwnProperty(e)) { | ||
if (z[e] = t, delete me[e], K.hasOwnProperty(e)) { | ||
var i = K[e]; | ||
@@ -376,5 +376,5 @@ delete K[e], i.forEach((a) => a()); | ||
} | ||
function ut(e, r, t, n, i) { | ||
var a = Oe(t); | ||
r = R(r), H(e, { name: r, fromWireType: function(s) { | ||
function ur(e, t, r, n, i) { | ||
var a = De(r); | ||
t = S(t), H(e, { name: t, fromWireType: function(s) { | ||
return !!s; | ||
@@ -385,62 +385,62 @@ }, toWireType: function(s, o) { | ||
var o; | ||
if (t === 1) | ||
o = j; | ||
else if (t === 2) | ||
if (r === 1) | ||
o = U; | ||
else if (r === 2) | ||
o = q; | ||
else if (t === 4) | ||
o = P; | ||
else if (r === 4) | ||
o = T; | ||
else | ||
throw new TypeError("Unknown boolean type size: " + r); | ||
throw new TypeError("Unknown boolean type size: " + t); | ||
return this.fromWireType(o[s >> a]); | ||
}, destructorFunction: null }); | ||
} | ||
function ft(e) { | ||
function fr(e) { | ||
if (!(this instanceof Y) || !(e instanceof Y)) | ||
return !1; | ||
for (var r = this.$$.ptrType.registeredClass, t = this.$$.ptr, n = e.$$.ptrType.registeredClass, i = e.$$.ptr; r.baseClass; ) | ||
t = r.upcast(t), r = r.baseClass; | ||
for (var t = this.$$.ptrType.registeredClass, r = this.$$.ptr, n = e.$$.ptrType.registeredClass, i = e.$$.ptr; t.baseClass; ) | ||
r = t.upcast(r), t = t.baseClass; | ||
for (; n.baseClass; ) | ||
i = n.upcast(i), n = n.baseClass; | ||
return r === n && t === i; | ||
return t === n && r === i; | ||
} | ||
function ct(e) { | ||
function cr(e) { | ||
return { count: e.count, deleteScheduled: e.deleteScheduled, preservePointerOnDelete: e.preservePointerOnDelete, ptr: e.ptr, ptrType: e.ptrType, smartPtr: e.smartPtr, smartPtrType: e.smartPtrType }; | ||
} | ||
function We(e) { | ||
function r(t) { | ||
return t.$$.ptrType.registeredClass.name; | ||
function ke(e) { | ||
function t(r) { | ||
return r.$$.ptrType.registeredClass.name; | ||
} | ||
m(r(e) + " instance already deleted"); | ||
m(t(e) + " instance already deleted"); | ||
} | ||
var je = !1; | ||
function ur(e) { | ||
var Oe = !1; | ||
function ut(e) { | ||
} | ||
function lt(e) { | ||
function lr(e) { | ||
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr); | ||
} | ||
function fr(e) { | ||
function ft(e) { | ||
e.count.value -= 1; | ||
var r = e.count.value === 0; | ||
r && lt(e); | ||
var t = e.count.value === 0; | ||
t && lr(e); | ||
} | ||
function cr(e, r, t) { | ||
if (r === t) | ||
function ct(e, t, r) { | ||
if (t === r) | ||
return e; | ||
if (t.baseClass === void 0) | ||
if (r.baseClass === void 0) | ||
return null; | ||
var n = cr(e, r, t.baseClass); | ||
return n === null ? null : t.downcast(n); | ||
var n = ct(e, t, r.baseClass); | ||
return n === null ? null : r.downcast(n); | ||
} | ||
var lr = {}; | ||
function dt() { | ||
var lt = {}; | ||
function dr() { | ||
return Object.keys(oe).length; | ||
} | ||
function vt() { | ||
function vr() { | ||
var e = []; | ||
for (var r in oe) | ||
oe.hasOwnProperty(r) && e.push(oe[r]); | ||
for (var t in oe) | ||
oe.hasOwnProperty(t) && e.push(oe[t]); | ||
return e; | ||
} | ||
var ie = []; | ||
function Ue() { | ||
function We() { | ||
for (; ie.length; ) { | ||
@@ -452,37 +452,37 @@ var e = ie.pop(); | ||
var ae = void 0; | ||
function pt(e) { | ||
ae = e, ie.length && ae && ae(Ue); | ||
function pr(e) { | ||
ae = e, ie.length && ae && ae(We); | ||
} | ||
function ht() { | ||
u.getInheritedInstanceCount = dt, u.getLiveInheritedInstances = vt, u.flushPendingDeletes = Ue, u.setDelayFunction = pt; | ||
function hr() { | ||
u.getInheritedInstanceCount = dr, u.getLiveInheritedInstances = vr, u.flushPendingDeletes = We, u.setDelayFunction = pr; | ||
} | ||
var oe = {}; | ||
function _t(e, r) { | ||
for (r === void 0 && m("ptr should not be undefined"); e.baseClass; ) | ||
r = e.upcast(r), e = e.baseClass; | ||
return r; | ||
function _r(e, t) { | ||
for (t === void 0 && m("ptr should not be undefined"); e.baseClass; ) | ||
t = e.upcast(t), e = e.baseClass; | ||
return t; | ||
} | ||
function gt(e, r) { | ||
return r = _t(e, r), oe[r]; | ||
function gr(e, t) { | ||
return t = _r(e, t), oe[t]; | ||
} | ||
function be(e, r) { | ||
(!r.ptrType || !r.ptr) && we("makeClassHandle requires ptr and ptrType"); | ||
var t = !!r.smartPtrType, n = !!r.smartPtr; | ||
return t !== n && we("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, se(Object.create(e, { $$: { value: r } })); | ||
function be(e, t) { | ||
(!t.ptrType || !t.ptr) && we("makeClassHandle requires ptr and ptrType"); | ||
var r = !!t.smartPtrType, n = !!t.smartPtr; | ||
return r !== n && we("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, se(Object.create(e, { $$: { value: t } })); | ||
} | ||
function yt(e) { | ||
var r = this.getPointee(e); | ||
if (!r) | ||
function yr(e) { | ||
var t = this.getPointee(e); | ||
if (!t) | ||
return this.destructor(e), null; | ||
var t = gt(this.registeredClass, r); | ||
if (t !== void 0) { | ||
if (t.$$.count.value === 0) | ||
return t.$$.ptr = r, t.$$.smartPtr = e, t.clone(); | ||
var n = t.clone(); | ||
var r = gr(this.registeredClass, t); | ||
if (r !== void 0) { | ||
if (r.$$.count.value === 0) | ||
return r.$$.ptr = t, r.$$.smartPtr = e, r.clone(); | ||
var n = r.clone(); | ||
return this.destructor(e), n; | ||
} | ||
function i() { | ||
return this.isSmartPointer ? be(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: r, smartPtrType: this, smartPtr: e }) : be(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
return this.isSmartPointer ? be(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: e }) : be(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
} | ||
var a = this.registeredClass.getActualType(r), s = lr[a]; | ||
var a = this.registeredClass.getActualType(t), s = lt[a]; | ||
if (!s) | ||
@@ -492,85 +492,85 @@ return i.call(this); | ||
this.isConst ? o = s.constPointerType : o = s.pointerType; | ||
var c = cr(r, this.registeredClass, o.registeredClass); | ||
return c === null ? i.call(this) : this.isSmartPointer ? be(o.registeredClass.instancePrototype, { ptrType: o, ptr: c, smartPtrType: this, smartPtr: e }) : be(o.registeredClass.instancePrototype, { ptrType: o, ptr: c }); | ||
var f = ct(t, this.registeredClass, o.registeredClass); | ||
return f === null ? i.call(this) : this.isSmartPointer ? be(o.registeredClass.instancePrototype, { ptrType: o, ptr: f, smartPtrType: this, smartPtr: e }) : be(o.registeredClass.instancePrototype, { ptrType: o, ptr: f }); | ||
} | ||
function se(e) { | ||
return typeof FinalizationRegistry > "u" ? (se = (r) => r, e) : (je = new FinalizationRegistry((r) => { | ||
fr(r.$$); | ||
}), se = (r) => { | ||
var t = r.$$, n = !!t.smartPtr; | ||
return typeof FinalizationRegistry > "u" ? (se = (t) => t, e) : (Oe = new FinalizationRegistry((t) => { | ||
ft(t.$$); | ||
}), se = (t) => { | ||
var r = t.$$, n = !!r.smartPtr; | ||
if (n) { | ||
var i = { $$: t }; | ||
je.register(r, i, r); | ||
var i = { $$: r }; | ||
Oe.register(t, i, t); | ||
} | ||
return r; | ||
}, ur = (r) => je.unregister(r), se(e)); | ||
return t; | ||
}, ut = (t) => Oe.unregister(t), se(e)); | ||
} | ||
function mt() { | ||
if (this.$$.ptr || We(this), this.$$.preservePointerOnDelete) | ||
function mr() { | ||
if (this.$$.ptr || ke(this), this.$$.preservePointerOnDelete) | ||
return this.$$.count.value += 1, this; | ||
var e = se(Object.create(Object.getPrototypeOf(this), { $$: { value: ct(this.$$) } })); | ||
var e = se(Object.create(Object.getPrototypeOf(this), { $$: { value: cr(this.$$) } })); | ||
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e; | ||
} | ||
function wt() { | ||
this.$$.ptr || We(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m("Object already scheduled for deletion"), ur(this), fr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
function wr() { | ||
this.$$.ptr || ke(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m("Object already scheduled for deletion"), ut(this), ft(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
} | ||
function bt() { | ||
function br() { | ||
return !this.$$.ptr; | ||
} | ||
function Pt() { | ||
return this.$$.ptr || We(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m("Object already scheduled for deletion"), ie.push(this), ie.length === 1 && ae && ae(Ue), this.$$.deleteScheduled = !0, this; | ||
function Pr() { | ||
return this.$$.ptr || ke(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m("Object already scheduled for deletion"), ie.push(this), ie.length === 1 && ae && ae(We), this.$$.deleteScheduled = !0, this; | ||
} | ||
function Ct() { | ||
Y.prototype.isAliasOf = ft, Y.prototype.clone = mt, Y.prototype.delete = wt, Y.prototype.isDeleted = bt, Y.prototype.deleteLater = Pt; | ||
function Cr() { | ||
Y.prototype.isAliasOf = fr, Y.prototype.clone = mr, Y.prototype.delete = wr, Y.prototype.isDeleted = br, Y.prototype.deleteLater = Pr; | ||
} | ||
function Y() { | ||
} | ||
function dr(e, r, t) { | ||
if (e[r].overloadTable === void 0) { | ||
var n = e[r]; | ||
e[r] = function() { | ||
return e[r].overloadTable.hasOwnProperty(arguments.length) || m("Function '" + t + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + e[r].overloadTable + ")!"), e[r].overloadTable[arguments.length].apply(this, arguments); | ||
}, e[r].overloadTable = [], e[r].overloadTable[n.argCount] = n; | ||
function dt(e, t, r) { | ||
if (e[t].overloadTable === void 0) { | ||
var n = e[t]; | ||
e[t] = function() { | ||
return e[t].overloadTable.hasOwnProperty(arguments.length) || m("Function '" + r + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + e[t].overloadTable + ")!"), e[t].overloadTable[arguments.length].apply(this, arguments); | ||
}, e[t].overloadTable = [], e[t].overloadTable[n.argCount] = n; | ||
} | ||
} | ||
function vr(e, r, t) { | ||
u.hasOwnProperty(e) ? ((t === void 0 || u[e].overloadTable !== void 0 && u[e].overloadTable[t] !== void 0) && m("Cannot register public name '" + e + "' twice"), dr(u, e, e), u.hasOwnProperty(t) && m("Cannot register multiple overloads of a function with the same number of arguments (" + t + ")!"), u[e].overloadTable[t] = r) : (u[e] = r, t !== void 0 && (u[e].numArguments = t)); | ||
function vt(e, t, r) { | ||
u.hasOwnProperty(e) ? ((r === void 0 || u[e].overloadTable !== void 0 && u[e].overloadTable[r] !== void 0) && m("Cannot register public name '" + e + "' twice"), dt(u, e, e), u.hasOwnProperty(r) && m("Cannot register multiple overloads of a function with the same number of arguments (" + r + ")!"), u[e].overloadTable[r] = t) : (u[e] = t, r !== void 0 && (u[e].numArguments = r)); | ||
} | ||
function Tt(e, r, t, n, i, a, s, o) { | ||
this.name = e, this.constructor = r, this.instancePrototype = t, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = []; | ||
function Tr(e, t, r, n, i, a, s, o) { | ||
this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = []; | ||
} | ||
function He(e, r, t) { | ||
for (; r !== t; ) | ||
r.upcast || m("Expected null or instance of " + t.name + ", got an instance of " + r.name), e = r.upcast(e), r = r.baseClass; | ||
function Ue(e, t, r) { | ||
for (; t !== r; ) | ||
t.upcast || m("Expected null or instance of " + r.name + ", got an instance of " + t.name), e = t.upcast(e), t = t.baseClass; | ||
return e; | ||
} | ||
function $t(e, r) { | ||
if (r === null) | ||
function Ar(e, t) { | ||
if (t === null) | ||
return this.isReference && m("null is not a valid " + this.name), 0; | ||
r.$$ || m('Cannot pass "' + xe(r) + '" as a ' + this.name), r.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name); | ||
var t = r.$$.ptrType.registeredClass, n = He(r.$$.ptr, t, this.registeredClass); | ||
t.$$ || m('Cannot pass "' + Me(t) + '" as a ' + this.name), t.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = Ue(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function At(e, r) { | ||
var t; | ||
if (r === null) | ||
return this.isReference && m("null is not a valid " + this.name), this.isSmartPointer ? (t = this.rawConstructor(), e !== null && e.push(this.rawDestructor, t), t) : 0; | ||
r.$$ || m('Cannot pass "' + xe(r) + '" as a ' + this.name), r.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && r.$$.ptrType.isConst && m("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name); | ||
var n = r.$$.ptrType.registeredClass; | ||
if (t = He(r.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
switch (r.$$.smartPtr === void 0 && m("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) { | ||
function $r(e, t) { | ||
var r; | ||
if (t === null) | ||
return this.isReference && m("null is not a valid " + this.name), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0; | ||
t.$$ || m('Cannot pass "' + Me(t) + '" as a ' + this.name), t.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && t.$$.ptrType.isConst && m("Cannot convert argument of type " + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + " to parameter type " + this.name); | ||
var n = t.$$.ptrType.registeredClass; | ||
if (r = Ue(t.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
switch (t.$$.smartPtr === void 0 && m("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) { | ||
case 0: | ||
r.$$.smartPtrType === this ? t = r.$$.smartPtr : m("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name); | ||
t.$$.smartPtrType === this ? r = t.$$.smartPtr : m("Cannot convert argument of type " + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + " to parameter type " + this.name); | ||
break; | ||
case 1: | ||
t = r.$$.smartPtr; | ||
r = t.$$.smartPtr; | ||
break; | ||
case 2: | ||
if (r.$$.smartPtrType === this) | ||
t = r.$$.smartPtr; | ||
if (t.$$.smartPtrType === this) | ||
r = t.$$.smartPtr; | ||
else { | ||
var i = r.clone(); | ||
t = this.rawShare(t, Ce.toHandle(function() { | ||
var i = t.clone(); | ||
r = this.rawShare(r, Ce.toHandle(function() { | ||
i.delete(); | ||
})), e !== null && e.push(this.rawDestructor, t); | ||
})), e !== null && e.push(this.rawDestructor, r); | ||
} | ||
@@ -581,60 +581,60 @@ break; | ||
} | ||
return t; | ||
return r; | ||
} | ||
function Ft(e, r) { | ||
if (r === null) | ||
function Fr(e, t) { | ||
if (t === null) | ||
return this.isReference && m("null is not a valid " + this.name), 0; | ||
r.$$ || m('Cannot pass "' + xe(r) + '" as a ' + this.name), r.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name), r.$$.ptrType.isConst && m("Cannot convert argument of type " + r.$$.ptrType.name + " to parameter type " + this.name); | ||
var t = r.$$.ptrType.registeredClass, n = He(r.$$.ptr, t, this.registeredClass); | ||
t.$$ || m('Cannot pass "' + Me(t) + '" as a ' + this.name), t.$$.ptr || m("Cannot pass deleted object as a pointer of type " + this.name), t.$$.ptrType.isConst && m("Cannot convert argument of type " + t.$$.ptrType.name + " to parameter type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = Ue(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function Et(e) { | ||
function Er(e) { | ||
return this.rawGetPointee && (e = this.rawGetPointee(e)), e; | ||
} | ||
function Rt(e) { | ||
function Rr(e) { | ||
this.rawDestructor && this.rawDestructor(e); | ||
} | ||
function St(e) { | ||
function Sr(e) { | ||
e !== null && e.delete(); | ||
} | ||
function kt() { | ||
M.prototype.getPointee = Et, M.prototype.destructor = Rt, M.prototype.argPackAdvance = 8, M.prototype.readValueFromPointer = ne, M.prototype.deleteObject = St, M.prototype.fromWireType = yt; | ||
function Dr() { | ||
M.prototype.getPointee = Er, M.prototype.destructor = Rr, M.prototype.argPackAdvance = 8, M.prototype.readValueFromPointer = ne, M.prototype.deleteObject = Sr, M.prototype.fromWireType = yr; | ||
} | ||
function M(e, r, t, n, i, a, s, o, c, f, d) { | ||
this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = c, this.rawShare = f, this.rawDestructor = d, !i && r.baseClass === void 0 ? n ? (this.toWireType = $t, this.destructorFunction = null) : (this.toWireType = Ft, this.destructorFunction = null) : this.toWireType = At; | ||
function M(e, t, r, n, i, a, s, o, f, c, d) { | ||
this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = f, this.rawShare = c, this.rawDestructor = d, !i && t.baseClass === void 0 ? n ? (this.toWireType = Ar, this.destructorFunction = null) : (this.toWireType = Fr, this.destructorFunction = null) : this.toWireType = $r; | ||
} | ||
function pr(e, r, t) { | ||
u.hasOwnProperty(e) || we("Replacing nonexistant public symbol"), u[e].overloadTable !== void 0 && t !== void 0 ? u[e].overloadTable[t] = r : (u[e] = r, u[e].argCount = t); | ||
function pt(e, t, r) { | ||
u.hasOwnProperty(e) || we("Replacing nonexistant public symbol"), u[e].overloadTable !== void 0 && r !== void 0 ? u[e].overloadTable[r] = t : (u[e] = t, u[e].argCount = r); | ||
} | ||
function Dt(e, r, t) { | ||
function kr(e, t, r) { | ||
var n = u["dynCall_" + e]; | ||
return t && t.length ? n.apply(null, [r].concat(t)) : n.call(null, r); | ||
return r && r.length ? n.apply(null, [t].concat(r)) : n.call(null, t); | ||
} | ||
function Ot(e, r, t) { | ||
function Or(e, t, r) { | ||
if (e.includes("j")) | ||
return Dt(e, r, t); | ||
var n = y(r).apply(null, t); | ||
return kr(e, t, r); | ||
var n = y(t).apply(null, r); | ||
return n; | ||
} | ||
function Wt(e, r) { | ||
var t = []; | ||
function Wr(e, t) { | ||
var r = []; | ||
return function() { | ||
return t.length = 0, Object.assign(t, arguments), Ot(e, r, t); | ||
return r.length = 0, Object.assign(r, arguments), Or(e, t, r); | ||
}; | ||
} | ||
function O(e, r) { | ||
e = R(e); | ||
function t() { | ||
return e.includes("j") ? Wt(e, r) : y(r); | ||
function O(e, t) { | ||
e = S(e); | ||
function r() { | ||
return e.includes("j") ? Wr(e, t) : y(t); | ||
} | ||
var n = t(); | ||
return typeof n != "function" && m("unknown function pointer with signature " + e + ": " + r), n; | ||
var n = r(); | ||
return typeof n != "function" && m("unknown function pointer with signature " + e + ": " + t), n; | ||
} | ||
var hr = void 0; | ||
function _r(e) { | ||
var r = $r(e), t = R(r); | ||
return I(r), t; | ||
var ht = void 0; | ||
function _t(e) { | ||
var t = At(e), r = S(t); | ||
return I(t), r; | ||
} | ||
function Pe(e, r) { | ||
var t = [], n = {}; | ||
function Pe(e, t) { | ||
var r = [], n = {}; | ||
function i(a) { | ||
@@ -646,17 +646,17 @@ if (!n[a] && !z[a]) { | ||
} | ||
t.push(a), n[a] = !0; | ||
r.push(a), n[a] = !0; | ||
} | ||
} | ||
throw r.forEach(i), new hr(e + ": " + t.map(_r).join([", "])); | ||
throw t.forEach(i), new ht(e + ": " + r.map(_t).join([", "])); | ||
} | ||
function jt(e, r, t, n, i, a, s, o, c, f, d, p, h) { | ||
d = R(d), a = O(i, a), o && (o = O(s, o)), f && (f = O(c, f)), h = O(p, h); | ||
var _ = Se(d); | ||
vr(_, function() { | ||
function Ur(e, t, r, n, i, a, s, o, f, c, d, p, h) { | ||
d = S(d), a = O(i, a), o && (o = O(s, o)), c && (c = O(f, c)), h = O(p, h); | ||
var g = it(d); | ||
vt(g, function() { | ||
Pe("Cannot construct " + d + " due to unbound types", [n]); | ||
}), X([e, r, t], n ? [n] : [], function(C) { | ||
C = C[0]; | ||
var F, T; | ||
n ? (F = C.registeredClass, T = F.instancePrototype) : T = Y.prototype; | ||
var $ = ke(_, function() { | ||
}), X([e, t, r], n ? [n] : [], function(P) { | ||
P = P[0]; | ||
var E, C; | ||
n ? (E = P.registeredClass, C = E.instancePrototype) : C = Y.prototype; | ||
var R = at(g, function() { | ||
if (Object.getPrototypeOf(this) !== l) | ||
@@ -666,101 +666,84 @@ throw new Q("Use 'new' to construct " + d); | ||
throw new Q(d + " has no accessible constructor"); | ||
var Ae = v.constructor_body[arguments.length]; | ||
if (Ae === void 0) | ||
var $e = v.constructor_body[arguments.length]; | ||
if ($e === void 0) | ||
throw new Q("Tried to invoke ctor of " + d + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(v.constructor_body).toString() + ") parameters instead!"); | ||
return Ae.apply(this, arguments); | ||
}), l = Object.create(T, { constructor: { value: $ } }); | ||
$.prototype = l; | ||
var v = new Tt(d, $, l, h, F, a, o, f), S = new M(d, v, !0, !1, !1), E = new M(d + "*", v, !1, !1, !1), Z = new M(d + " const*", v, !1, !0, !1); | ||
return lr[e] = { pointerType: E, constPointerType: Z }, pr(_, $), [S, E, Z]; | ||
return $e.apply(this, arguments); | ||
}), l = Object.create(C, { constructor: { value: R } }); | ||
R.prototype = l; | ||
var v = new Tr(d, R, l, h, E, a, o, c), A = new M(d, v, !0, !1, !1), F = new M(d + "*", v, !1, !1, !1), Z = new M(d + " const*", v, !1, !0, !1); | ||
return lt[e] = { pointerType: F, constPointerType: Z }, pt(g, R), [A, F, Z]; | ||
}); | ||
} | ||
function Me(e, r) { | ||
for (var t = [], n = 0; n < e; n++) | ||
t.push(A[r + n * 4 >> 2]); | ||
return t; | ||
function je(e, t) { | ||
for (var r = [], n = 0; n < e; n++) | ||
r.push($[t + n * 4 >> 2]); | ||
return r; | ||
} | ||
function Ut(e, r) { | ||
if (!(e instanceof Function)) | ||
throw new TypeError("new_ called with constructor type " + typeof e + " which is not a function"); | ||
var t = ke(e.name || "unknownFunctionName", function() { | ||
}); | ||
t.prototype = e.prototype; | ||
var n = new t(), i = e.apply(n, r); | ||
return i instanceof Object ? i : n; | ||
} | ||
function Ie(e, r, t, n, i, a) { | ||
var s = r.length; | ||
function He(e, t, r, n, i, a) { | ||
var s = t.length; | ||
s < 2 && m("argTypes array size mismatch! Must at least get return value and 'this' types!"); | ||
for (var o = r[1] !== null && t !== null, c = !1, f = 1; f < r.length; ++f) | ||
if (r[f] !== null && r[f].destructorFunction === void 0) { | ||
c = !0; | ||
for (var o = t[1] !== null && r !== null, f = !1, c = 1; c < t.length; ++c) | ||
if (t[c] !== null && t[c].destructorFunction === void 0) { | ||
f = !0; | ||
break; | ||
} | ||
for (var d = r[0].name !== "void", p = "", h = "", f = 0; f < s - 2; ++f) | ||
p += (f !== 0 ? ", " : "") + "arg" + f, h += (f !== 0 ? ", " : "") + "arg" + f + "Wired"; | ||
var _ = "return function " + Se(e) + "(" + p + `) { | ||
if (arguments.length !== ` + (s - 2) + `) { | ||
throwBindingError('function ` + e + " called with ' + arguments.length + ' arguments, expected " + (s - 2) + ` args!'); | ||
} | ||
`; | ||
c && (_ += `var destructors = []; | ||
`); | ||
var C = c ? "destructors" : "null", F = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"], T = [m, n, i, ar, r[0], r[1]]; | ||
o && (_ += "var thisWired = classParam.toWireType(" + C + `, this); | ||
`); | ||
for (var f = 0; f < s - 2; ++f) | ||
_ += "var arg" + f + "Wired = argType" + f + ".toWireType(" + C + ", arg" + f + "); // " + r[f + 2].name + ` | ||
`, F.push("argType" + f), T.push(r[f + 2]); | ||
if (o && (h = "thisWired" + (h.length > 0 ? ", " : "") + h), _ += (d || a ? "var rv = " : "") + "invoker(fn" + (h.length > 0 ? ", " : "") + h + `); | ||
`, c) | ||
_ += `runDestructors(destructors); | ||
`; | ||
else | ||
for (var f = o ? 1 : 2; f < r.length; ++f) { | ||
var $ = f === 1 ? "thisWired" : "arg" + (f - 2) + "Wired"; | ||
r[f].destructorFunction !== null && (_ += $ + "_dtor(" + $ + "); // " + r[f].name + ` | ||
`, F.push($ + "_dtor"), T.push(r[f].destructorFunction)); | ||
var d = t[0].name !== "void", p = s - 2, h = new Array(p), g = [], P = []; | ||
return function() { | ||
arguments.length !== p && m("function " + e + " called with " + arguments.length + " arguments, expected " + p + " args!"), P.length = 0; | ||
var E; | ||
g.length = o ? 2 : 1, g[0] = i, o && (E = t[1].toWireType(P, this), g[1] = E); | ||
for (var C = 0; C < p; ++C) | ||
h[C] = t[C + 2].toWireType(P, arguments[C]), g.push(h[C]); | ||
var R = n.apply(null, g); | ||
function l(v) { | ||
if (f) | ||
nt(P); | ||
else | ||
for (var A = o ? 1 : 2; A < t.length; A++) { | ||
var F = A === 1 ? E : h[A - 2]; | ||
t[A].destructorFunction !== null && t[A].destructorFunction(F); | ||
} | ||
if (d) | ||
return t[0].fromWireType(v); | ||
} | ||
return d && (_ += `var ret = retType.fromWireType(rv); | ||
return ret; | ||
`), _ += `} | ||
`, F.push(_), Ut(Function, F).apply(null, T); | ||
return l(R); | ||
}; | ||
} | ||
function Ht(e, r, t, n, i, a) { | ||
Dr(r > 0); | ||
var s = Me(r, t); | ||
function jr(e, t, r, n, i, a) { | ||
kt(t > 0); | ||
var s = je(t, r); | ||
i = O(n, i), X([], [e], function(o) { | ||
o = o[0]; | ||
var c = "constructor " + o.name; | ||
if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) | ||
throw new Q("Cannot register multiple constructors with identical number of parameters (" + (r - 1) + ") for class '" + o.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!"); | ||
return o.registeredClass.constructor_body[r - 1] = () => { | ||
var f = "constructor " + o.name; | ||
if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[t - 1] !== void 0) | ||
throw new Q("Cannot register multiple constructors with identical number of parameters (" + (t - 1) + ") for class '" + o.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!"); | ||
return o.registeredClass.constructor_body[t - 1] = () => { | ||
Pe("Cannot construct " + o.name + " due to unbound types", s); | ||
}, X([], s, function(f) { | ||
return f.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = Ie(c, f, null, i, a), []; | ||
}, X([], s, function(c) { | ||
return c.splice(1, 0, null), o.registeredClass.constructor_body[t - 1] = He(f, c, null, i, a), []; | ||
}), []; | ||
}); | ||
} | ||
function Mt(e, r, t, n, i, a, s, o, c) { | ||
var f = Me(t, n); | ||
r = R(r), a = O(i, a), X([], [e], function(d) { | ||
function Hr(e, t, r, n, i, a, s, o, f) { | ||
var c = je(r, n); | ||
t = S(t), a = O(i, a), X([], [e], function(d) { | ||
d = d[0]; | ||
var p = d.name + "." + r; | ||
r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && d.registeredClass.pureVirtualFunctions.push(r); | ||
var p = d.name + "." + t; | ||
t.startsWith("@@") && (t = Symbol[t.substring(2)]), o && d.registeredClass.pureVirtualFunctions.push(t); | ||
function h() { | ||
Pe("Cannot call " + p + " due to unbound types", f); | ||
Pe("Cannot call " + p + " due to unbound types", c); | ||
} | ||
var _ = d.registeredClass.instancePrototype, C = _[r]; | ||
return C === void 0 || C.overloadTable === void 0 && C.className !== d.name && C.argCount === t - 2 ? (h.argCount = t - 2, h.className = d.name, _[r] = h) : (dr(_, r, p), _[r].overloadTable[t - 2] = h), X([], f, function(F) { | ||
var T = Ie(p, F, d, a, s, c); | ||
return _[r].overloadTable === void 0 ? (T.argCount = t - 2, _[r] = T) : _[r].overloadTable[t - 2] = T, []; | ||
var g = d.registeredClass.instancePrototype, P = g[t]; | ||
return P === void 0 || P.overloadTable === void 0 && P.className !== d.name && P.argCount === r - 2 ? (h.argCount = r - 2, h.className = d.name, g[t] = h) : (dt(g, t, p), g[t].overloadTable[r - 2] = h), X([], c, function(E) { | ||
var C = He(p, E, d, a, s); | ||
return g[t].overloadTable === void 0 ? (C.argCount = r - 2, g[t] = C) : g[t].overloadTable[r - 2] = C, []; | ||
}), []; | ||
}); | ||
} | ||
function It() { | ||
function Mr() { | ||
this.allocated = [void 0], this.freelist = [], this.get = function(e) { | ||
return this.allocated[e]; | ||
}, this.allocate = function(e) { | ||
let r = this.freelist.pop() || this.allocated.length; | ||
return this.allocated[r] = e, r; | ||
let t = this.freelist.pop() || this.allocated.length; | ||
return this.allocated[t] = e, t; | ||
}, this.free = function(e) { | ||
@@ -770,15 +753,15 @@ this.allocated[e] = void 0, this.freelist.push(e); | ||
} | ||
var D = new It(); | ||
function gr(e) { | ||
e >= D.reserved && --D.get(e).refcount === 0 && D.free(e); | ||
var k = new Mr(); | ||
function gt(e) { | ||
e >= k.reserved && --k.get(e).refcount === 0 && k.free(e); | ||
} | ||
function xt() { | ||
for (var e = 0, r = D.reserved; r < D.allocated.length; ++r) | ||
D.allocated[r] !== void 0 && ++e; | ||
function Ir() { | ||
for (var e = 0, t = k.reserved; t < k.allocated.length; ++t) | ||
k.allocated[t] !== void 0 && ++e; | ||
return e; | ||
} | ||
function Yt() { | ||
D.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), D.reserved = D.allocated.length, u.count_emval_handles = xt; | ||
function xr() { | ||
k.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), k.reserved = k.allocated.length, u.count_emval_handles = Ir; | ||
} | ||
var Ce = { toValue: (e) => (e || m("Cannot use deleted val. handle = " + e), D.get(e).value), toHandle: (e) => { | ||
var Ce = { toValue: (e) => (e || m("Cannot use deleted val. handle = " + e), k.get(e).value), toHandle: (e) => { | ||
switch (e) { | ||
@@ -794,28 +777,28 @@ case void 0: | ||
default: | ||
return D.allocate({ refcount: 1, value: e }); | ||
return k.allocate({ refcount: 1, value: e }); | ||
} | ||
} }; | ||
function Vt(e, r) { | ||
r = R(r), H(e, { name: r, fromWireType: function(t) { | ||
var n = Ce.toValue(t); | ||
return gr(t), n; | ||
}, toWireType: function(t, n) { | ||
function Yr(e, t) { | ||
t = S(t), H(e, { name: t, fromWireType: function(r) { | ||
var n = Ce.toValue(r); | ||
return gt(r), n; | ||
}, toWireType: function(r, n) { | ||
return Ce.toHandle(n); | ||
}, argPackAdvance: 8, readValueFromPointer: ne, destructorFunction: null }); | ||
} | ||
function xe(e) { | ||
function Me(e) { | ||
if (e === null) | ||
return "null"; | ||
var r = typeof e; | ||
return r === "object" || r === "array" || r === "function" ? e.toString() : "" + e; | ||
var t = typeof e; | ||
return t === "object" || t === "array" || t === "function" ? e.toString() : "" + e; | ||
} | ||
function Bt(e, r) { | ||
switch (r) { | ||
function Vr(e, t) { | ||
switch (t) { | ||
case 2: | ||
return function(t) { | ||
return this.fromWireType(Ge[t >> 2]); | ||
return function(r) { | ||
return this.fromWireType(Xe[r >> 2]); | ||
}; | ||
case 3: | ||
return function(t) { | ||
return this.fromWireType(qe[t >> 3]); | ||
return function(r) { | ||
return this.fromWireType(Ze[r >> 3]); | ||
}; | ||
@@ -826,29 +809,29 @@ default: | ||
} | ||
function Nt(e, r, t) { | ||
var n = Oe(t); | ||
r = R(r), H(e, { name: r, fromWireType: function(i) { | ||
function Nr(e, t, r) { | ||
var n = De(r); | ||
t = S(t), H(e, { name: t, fromWireType: function(i) { | ||
return i; | ||
}, toWireType: function(i, a) { | ||
return a; | ||
}, argPackAdvance: 8, readValueFromPointer: Bt(r, n), destructorFunction: null }); | ||
}, argPackAdvance: 8, readValueFromPointer: Vr(t, n), destructorFunction: null }); | ||
} | ||
function Lt(e, r, t, n, i, a, s) { | ||
var o = Me(r, t); | ||
e = R(e), i = O(n, i), vr(e, function() { | ||
function Br(e, t, r, n, i, a, s) { | ||
var o = je(t, r); | ||
e = S(e), i = O(n, i), vt(e, function() { | ||
Pe("Cannot call " + e + " due to unbound types", o); | ||
}, r - 1), X([], o, function(c) { | ||
var f = [c[0], null].concat(c.slice(1)); | ||
return pr(e, Ie(e, f, null, i, a, s), r - 1), []; | ||
}, t - 1), X([], o, function(f) { | ||
var c = [f[0], null].concat(f.slice(1)); | ||
return pt(e, He(e, c, null, i, a), t - 1), []; | ||
}); | ||
} | ||
function zt(e, r, t) { | ||
switch (r) { | ||
function Lr(e, t, r) { | ||
switch (t) { | ||
case 0: | ||
return t ? function(i) { | ||
return j[i]; | ||
return r ? function(i) { | ||
return U[i]; | ||
} : function(i) { | ||
return k[i]; | ||
return D[i]; | ||
}; | ||
case 1: | ||
return t ? function(i) { | ||
return r ? function(i) { | ||
return q[i >> 1]; | ||
@@ -859,6 +842,6 @@ } : function(i) { | ||
case 2: | ||
return t ? function(i) { | ||
return P[i >> 2]; | ||
return r ? function(i) { | ||
return T[i >> 2]; | ||
} : function(i) { | ||
return A[i >> 2]; | ||
return $[i >> 2]; | ||
}; | ||
@@ -869,73 +852,73 @@ default: | ||
} | ||
function Xt(e, r, t, n, i) { | ||
r = R(r); | ||
var a = Oe(t), s = (p) => p; | ||
function zr(e, t, r, n, i) { | ||
t = S(t); | ||
var a = De(r), s = (p) => p; | ||
if (n === 0) { | ||
var o = 32 - 8 * t; | ||
var o = 32 - 8 * r; | ||
s = (p) => p << o >>> o; | ||
} | ||
var c = r.includes("unsigned"), f = (p, h) => { | ||
var f = t.includes("unsigned"), c = (p, h) => { | ||
}, d; | ||
c ? d = function(p, h) { | ||
return f(h, this.name), h >>> 0; | ||
f ? d = function(p, h) { | ||
return c(h, this.name), h >>> 0; | ||
} : d = function(p, h) { | ||
return f(h, this.name), h; | ||
}, H(e, { name: r, fromWireType: s, toWireType: d, argPackAdvance: 8, readValueFromPointer: zt(r, a, n !== 0), destructorFunction: null }); | ||
return c(h, this.name), h; | ||
}, H(e, { name: t, fromWireType: s, toWireType: d, argPackAdvance: 8, readValueFromPointer: Lr(t, a, n !== 0), destructorFunction: null }); | ||
} | ||
function Zt(e, r, t) { | ||
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], i = n[r]; | ||
function Xr(e, t, r) { | ||
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], i = n[t]; | ||
function a(s) { | ||
s = s >> 2; | ||
var o = A, c = o[s], f = o[s + 1]; | ||
return new i(o.buffer, f, c); | ||
var o = $, f = o[s], c = o[s + 1]; | ||
return new i(o.buffer, c, f); | ||
} | ||
t = R(t), H(e, { name: t, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
r = S(r), H(e, { name: r, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
} | ||
function yr(e, r, t, n) { | ||
function yt(e, t, r, n) { | ||
if (!(n > 0)) | ||
return 0; | ||
for (var i = t, a = t + n - 1, s = 0; s < e.length; ++s) { | ||
for (var i = r, a = r + n - 1, s = 0; s < e.length; ++s) { | ||
var o = e.charCodeAt(s); | ||
if (o >= 55296 && o <= 57343) { | ||
var c = e.charCodeAt(++s); | ||
o = 65536 + ((o & 1023) << 10) | c & 1023; | ||
var f = e.charCodeAt(++s); | ||
o = 65536 + ((o & 1023) << 10) | f & 1023; | ||
} | ||
if (o <= 127) { | ||
if (t >= a) | ||
if (r >= a) | ||
break; | ||
r[t++] = o; | ||
t[r++] = o; | ||
} else if (o <= 2047) { | ||
if (t + 1 >= a) | ||
if (r + 1 >= a) | ||
break; | ||
r[t++] = 192 | o >> 6, r[t++] = 128 | o & 63; | ||
t[r++] = 192 | o >> 6, t[r++] = 128 | o & 63; | ||
} else if (o <= 65535) { | ||
if (t + 2 >= a) | ||
if (r + 2 >= a) | ||
break; | ||
r[t++] = 224 | o >> 12, r[t++] = 128 | o >> 6 & 63, r[t++] = 128 | o & 63; | ||
t[r++] = 224 | o >> 12, t[r++] = 128 | o >> 6 & 63, t[r++] = 128 | o & 63; | ||
} else { | ||
if (t + 3 >= a) | ||
if (r + 3 >= a) | ||
break; | ||
r[t++] = 240 | o >> 18, r[t++] = 128 | o >> 12 & 63, r[t++] = 128 | o >> 6 & 63, r[t++] = 128 | o & 63; | ||
t[r++] = 240 | o >> 18, t[r++] = 128 | o >> 12 & 63, t[r++] = 128 | o >> 6 & 63, t[r++] = 128 | o & 63; | ||
} | ||
} | ||
return r[t] = 0, t - i; | ||
return t[r] = 0, r - i; | ||
} | ||
function Gt(e, r, t) { | ||
return yr(e, k, r, t); | ||
function Zr(e, t, r) { | ||
return yt(e, D, t, r); | ||
} | ||
function mr(e) { | ||
for (var r = 0, t = 0; t < e.length; ++t) { | ||
var n = e.charCodeAt(t); | ||
n <= 127 ? r++ : n <= 2047 ? r += 2 : n >= 55296 && n <= 57343 ? (r += 4, ++t) : r += 3; | ||
function mt(e) { | ||
for (var t = 0, r = 0; r < e.length; ++r) { | ||
var n = e.charCodeAt(r); | ||
n <= 127 ? t++ : n <= 2047 ? t += 2 : n >= 55296 && n <= 57343 ? (t += 4, ++r) : t += 3; | ||
} | ||
return r; | ||
return t; | ||
} | ||
var wr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function qt(e, r, t) { | ||
for (var n = r + t, i = r; e[i] && !(i >= n); ) | ||
var wt = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function Gr(e, t, r) { | ||
for (var n = t + r, i = t; e[i] && !(i >= n); ) | ||
++i; | ||
if (i - r > 16 && e.buffer && wr) | ||
return wr.decode(e.subarray(r, i)); | ||
for (var a = ""; r < i; ) { | ||
var s = e[r++]; | ||
if (i - t > 16 && e.buffer && wt) | ||
return wt.decode(e.subarray(t, i)); | ||
for (var a = ""; t < i; ) { | ||
var s = e[t++]; | ||
if (!(s & 128)) { | ||
@@ -945,3 +928,3 @@ a += String.fromCharCode(s); | ||
} | ||
var o = e[r++] & 63; | ||
var o = e[t++] & 63; | ||
if ((s & 224) == 192) { | ||
@@ -951,8 +934,8 @@ a += String.fromCharCode((s & 31) << 6 | o); | ||
} | ||
var c = e[r++] & 63; | ||
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | c : s = (s & 7) << 18 | o << 12 | c << 6 | e[r++] & 63, s < 65536) | ||
var f = e[t++] & 63; | ||
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | f : s = (s & 7) << 18 | o << 12 | f << 6 | e[t++] & 63, s < 65536) | ||
a += String.fromCharCode(s); | ||
else { | ||
var f = s - 65536; | ||
a += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023); | ||
var c = s - 65536; | ||
a += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023); | ||
} | ||
@@ -962,21 +945,21 @@ } | ||
} | ||
function Ye(e, r) { | ||
return e ? qt(k, e, r) : ""; | ||
function Ie(e, t) { | ||
return e ? Gr(D, e, t) : ""; | ||
} | ||
function Jt(e, r) { | ||
r = R(r); | ||
var t = r === "std::string"; | ||
H(e, { name: r, fromWireType: function(n) { | ||
var i = A[n >> 2], a = n + 4, s; | ||
if (t) | ||
for (var o = a, c = 0; c <= i; ++c) { | ||
var f = a + c; | ||
if (c == i || k[f] == 0) { | ||
var d = f - o, p = Ye(o, d); | ||
s === void 0 ? s = p : (s += String.fromCharCode(0), s += p), o = f + 1; | ||
function qr(e, t) { | ||
t = S(t); | ||
var r = t === "std::string"; | ||
H(e, { name: t, fromWireType: function(n) { | ||
var i = $[n >> 2], a = n + 4, s; | ||
if (r) | ||
for (var o = a, f = 0; f <= i; ++f) { | ||
var c = a + f; | ||
if (f == i || D[c] == 0) { | ||
var d = c - o, p = Ie(o, d); | ||
s === void 0 ? s = p : (s += String.fromCharCode(0), s += p), o = c + 1; | ||
} | ||
} | ||
else { | ||
for (var h = new Array(i), c = 0; c < i; ++c) | ||
h[c] = String.fromCharCode(k[a + c]); | ||
for (var h = new Array(i), f = 0; f < i; ++f) | ||
h[f] = String.fromCharCode(D[a + f]); | ||
s = h.join(""); | ||
@@ -988,14 +971,14 @@ } | ||
var a, s = typeof i == "string"; | ||
s || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int8Array || m("Cannot pass non-string to std::string"), t && s ? a = mr(i) : a = i.length; | ||
var o = Be(4 + a + 1), c = o + 4; | ||
if (A[o >> 2] = a, t && s) | ||
Gt(i, c, a + 1); | ||
s || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int8Array || m("Cannot pass non-string to std::string"), r && s ? a = mt(i) : a = i.length; | ||
var o = Ye(4 + a + 1), f = o + 4; | ||
if ($[o >> 2] = a, r && s) | ||
Zr(i, f, a + 1); | ||
else if (s) | ||
for (var f = 0; f < a; ++f) { | ||
var d = i.charCodeAt(f); | ||
d > 255 && (I(c), m("String has UTF-16 code units that do not fit in 8 bits")), k[c + f] = d; | ||
for (var c = 0; c < a; ++c) { | ||
var d = i.charCodeAt(c); | ||
d > 255 && (I(f), m("String has UTF-16 code units that do not fit in 8 bits")), D[f + c] = d; | ||
} | ||
else | ||
for (var f = 0; f < a; ++f) | ||
k[c + f] = i[f]; | ||
for (var c = 0; c < a; ++c) | ||
D[f + c] = i[c]; | ||
return n !== null && n.push(I, o), o; | ||
@@ -1006,9 +989,9 @@ }, argPackAdvance: 8, readValueFromPointer: ne, destructorFunction: function(n) { | ||
} | ||
var br = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
function Kt(e, r) { | ||
for (var t = e, n = t >> 1, i = n + r / 2; !(n >= i) && ve[n]; ) | ||
var bt = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
function Jr(e, t) { | ||
for (var r = e, n = r >> 1, i = n + t / 2; !(n >= i) && ve[n]; ) | ||
++n; | ||
if (t = n << 1, t - e > 32 && br) | ||
return br.decode(k.subarray(e, t)); | ||
for (var a = "", s = 0; !(s >= r / 2); ++s) { | ||
if (r = n << 1, r - e > 32 && bt) | ||
return bt.decode(D.subarray(e, r)); | ||
for (var a = "", s = 0; !(s >= t / 2); ++s) { | ||
var o = q[e + s * 2 >> 1]; | ||
@@ -1021,21 +1004,21 @@ if (o == 0) | ||
} | ||
function Qt(e, r, t) { | ||
if (t === void 0 && (t = 2147483647), t < 2) | ||
function Kr(e, t, r) { | ||
if (r === void 0 && (r = 2147483647), r < 2) | ||
return 0; | ||
t -= 2; | ||
for (var n = r, i = t < e.length * 2 ? t / 2 : e.length, a = 0; a < i; ++a) { | ||
r -= 2; | ||
for (var n = t, i = r < e.length * 2 ? r / 2 : e.length, a = 0; a < i; ++a) { | ||
var s = e.charCodeAt(a); | ||
q[r >> 1] = s, r += 2; | ||
q[t >> 1] = s, t += 2; | ||
} | ||
return q[r >> 1] = 0, r - n; | ||
return q[t >> 1] = 0, t - n; | ||
} | ||
function en(e) { | ||
function Qr(e) { | ||
return e.length * 2; | ||
} | ||
function rn(e, r) { | ||
for (var t = 0, n = ""; !(t >= r / 4); ) { | ||
var i = P[e + t * 4 >> 2]; | ||
function en(e, t) { | ||
for (var r = 0, n = ""; !(r >= t / 4); ) { | ||
var i = T[e + r * 4 >> 2]; | ||
if (i == 0) | ||
break; | ||
if (++t, i >= 65536) { | ||
if (++r, i >= 65536) { | ||
var a = i - 65536; | ||
@@ -1048,6 +1031,6 @@ n += String.fromCharCode(55296 | a >> 10, 56320 | a & 1023); | ||
} | ||
function tn(e, r, t) { | ||
if (t === void 0 && (t = 2147483647), t < 4) | ||
function tn(e, t, r) { | ||
if (r === void 0 && (r = 2147483647), r < 4) | ||
return 0; | ||
for (var n = r, i = n + t - 4, a = 0; a < e.length; ++a) { | ||
for (var n = t, i = n + r - 4, a = 0; a < e.length; ++a) { | ||
var s = e.charCodeAt(a); | ||
@@ -1058,84 +1041,84 @@ if (s >= 55296 && s <= 57343) { | ||
} | ||
if (P[r >> 2] = s, r += 4, r + 4 > i) | ||
if (T[t >> 2] = s, t += 4, t + 4 > i) | ||
break; | ||
} | ||
return P[r >> 2] = 0, r - n; | ||
return T[t >> 2] = 0, t - n; | ||
} | ||
function nn(e) { | ||
for (var r = 0, t = 0; t < e.length; ++t) { | ||
var n = e.charCodeAt(t); | ||
n >= 55296 && n <= 57343 && ++t, r += 4; | ||
function rn(e) { | ||
for (var t = 0, r = 0; r < e.length; ++r) { | ||
var n = e.charCodeAt(r); | ||
n >= 55296 && n <= 57343 && ++r, t += 4; | ||
} | ||
return r; | ||
return t; | ||
} | ||
function an(e, r, t) { | ||
t = R(t); | ||
function nn(e, t, r) { | ||
r = S(r); | ||
var n, i, a, s, o; | ||
r === 2 ? (n = Kt, i = Qt, s = en, a = () => ve, o = 1) : r === 4 && (n = rn, i = tn, s = nn, a = () => A, o = 2), H(e, { name: t, fromWireType: function(c) { | ||
for (var f = A[c >> 2], d = a(), p, h = c + 4, _ = 0; _ <= f; ++_) { | ||
var C = c + 4 + _ * r; | ||
if (_ == f || d[C >> o] == 0) { | ||
var F = C - h, T = n(h, F); | ||
p === void 0 ? p = T : (p += String.fromCharCode(0), p += T), h = C + r; | ||
t === 2 ? (n = Jr, i = Kr, s = Qr, a = () => ve, o = 1) : t === 4 && (n = en, i = tn, s = rn, a = () => $, o = 2), H(e, { name: r, fromWireType: function(f) { | ||
for (var c = $[f >> 2], d = a(), p, h = f + 4, g = 0; g <= c; ++g) { | ||
var P = f + 4 + g * t; | ||
if (g == c || d[P >> o] == 0) { | ||
var E = P - h, C = n(h, E); | ||
p === void 0 ? p = C : (p += String.fromCharCode(0), p += C), h = P + t; | ||
} | ||
} | ||
return I(c), p; | ||
}, toWireType: function(c, f) { | ||
typeof f != "string" && m("Cannot pass non-string to C++ string type " + t); | ||
var d = s(f), p = Be(4 + d + r); | ||
return A[p >> 2] = d >> o, i(f, p + 4, d + r), c !== null && c.push(I, p), p; | ||
}, argPackAdvance: 8, readValueFromPointer: ne, destructorFunction: function(c) { | ||
I(c); | ||
return I(f), p; | ||
}, toWireType: function(f, c) { | ||
typeof c != "string" && m("Cannot pass non-string to C++ string type " + r); | ||
var d = s(c), p = Ye(4 + d + t); | ||
return $[p >> 2] = d >> o, i(c, p + 4, d + t), f !== null && f.push(I, p), p; | ||
}, argPackAdvance: 8, readValueFromPointer: ne, destructorFunction: function(f) { | ||
I(f); | ||
} }); | ||
} | ||
function on(e, r, t, n, i, a) { | ||
ye[e] = { name: R(r), rawConstructor: O(t, n), rawDestructor: O(i, a), fields: [] }; | ||
function an(e, t, r, n, i, a) { | ||
ye[e] = { name: S(t), rawConstructor: O(r, n), rawDestructor: O(i, a), fields: [] }; | ||
} | ||
function sn(e, r, t, n, i, a, s, o, c, f) { | ||
ye[e].fields.push({ fieldName: R(r), getterReturnType: t, getter: O(n, i), getterContext: a, setterArgumentType: s, setter: O(o, c), setterContext: f }); | ||
function on(e, t, r, n, i, a, s, o, f, c) { | ||
ye[e].fields.push({ fieldName: S(t), getterReturnType: r, getter: O(n, i), getterContext: a, setterArgumentType: s, setter: O(o, f), setterContext: c }); | ||
} | ||
function un(e, r) { | ||
r = R(r), H(e, { isVoid: !0, name: r, argPackAdvance: 0, fromWireType: function() { | ||
}, toWireType: function(t, n) { | ||
function sn(e, t) { | ||
t = S(t), H(e, { isVoid: !0, name: t, argPackAdvance: 0, fromWireType: function() { | ||
}, toWireType: function(r, n) { | ||
} }); | ||
} | ||
function fn(e) { | ||
e > 4 && (D.get(e).refcount += 1); | ||
function un(e) { | ||
e > 4 && (k.get(e).refcount += 1); | ||
} | ||
function cn(e, r) { | ||
var t = z[e]; | ||
return t === void 0 && m(r + " has unknown type " + _r(e)), t; | ||
function fn(e, t) { | ||
var r = z[e]; | ||
return r === void 0 && m(t + " has unknown type " + _t(e)), r; | ||
} | ||
function ln(e, r) { | ||
e = cn(e, "_emval_take_value"); | ||
var t = e.readValueFromPointer(r); | ||
return Ce.toHandle(t); | ||
function cn(e, t) { | ||
e = fn(e, "_emval_take_value"); | ||
var r = e.readValueFromPointer(t); | ||
return Ce.toHandle(r); | ||
} | ||
function dn() { | ||
function ln() { | ||
J(""); | ||
} | ||
function vn(e, r, t) { | ||
k.copyWithin(e, r, r + t); | ||
function dn(e, t, r) { | ||
D.copyWithin(e, t, t + r); | ||
} | ||
function pn() { | ||
function vn() { | ||
return 2147483648; | ||
} | ||
function hn(e) { | ||
var r = de.buffer; | ||
function pn(e) { | ||
var t = de.buffer; | ||
try { | ||
return de.grow(e - r.byteLength + 65535 >>> 16), Je(), 1; | ||
return de.grow(e - t.byteLength + 65535 >>> 16), Ge(), 1; | ||
} catch { | ||
} | ||
} | ||
function _n(e) { | ||
var r = k.length; | ||
function hn(e) { | ||
var t = D.length; | ||
e = e >>> 0; | ||
var t = pn(); | ||
if (e > t) | ||
var r = vn(); | ||
if (e > r) | ||
return !1; | ||
let n = (c, f) => c + (f - c % f) % f; | ||
let n = (f, c) => f + (c - f % c) % c; | ||
for (var i = 1; i <= 4; i *= 2) { | ||
var a = r * (1 + 0.2 / i); | ||
var a = t * (1 + 0.2 / i); | ||
a = Math.min(a, e + 100663296); | ||
var s = Math.min(t, n(Math.max(e, a), 65536)), o = hn(s); | ||
var s = Math.min(r, n(Math.max(e, a), 65536)), o = pn(s); | ||
if (o) | ||
@@ -1146,14 +1129,14 @@ return !0; | ||
} | ||
var Ve = {}; | ||
function gn() { | ||
return ze || "./this.program"; | ||
var xe = {}; | ||
function _n() { | ||
return Be || "./this.program"; | ||
} | ||
function ue() { | ||
if (!ue.strings) { | ||
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", r = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: e, _: gn() }; | ||
for (var t in Ve) | ||
Ve[t] === void 0 ? delete r[t] : r[t] = Ve[t]; | ||
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: e, _: _n() }; | ||
for (var r in xe) | ||
xe[r] === void 0 ? delete t[r] : t[r] = xe[r]; | ||
var n = []; | ||
for (var t in r) | ||
n.push(t + "=" + r[t]); | ||
for (var r in t) | ||
n.push(r + "=" + t[r]); | ||
ue.strings = n; | ||
@@ -1163,23 +1146,23 @@ } | ||
} | ||
function yn(e, r) { | ||
for (var t = 0; t < e.length; ++t) | ||
j[r++ >> 0] = e.charCodeAt(t); | ||
j[r >> 0] = 0; | ||
function gn(e, t) { | ||
for (var r = 0; r < e.length; ++r) | ||
U[t++ >> 0] = e.charCodeAt(r); | ||
U[t >> 0] = 0; | ||
} | ||
function mn(e, r) { | ||
var t = 0; | ||
function yn(e, t) { | ||
var r = 0; | ||
return ue().forEach(function(n, i) { | ||
var a = r + t; | ||
A[e + i * 4 >> 2] = a, yn(n, a), t += n.length + 1; | ||
var a = t + r; | ||
$[e + i * 4 >> 2] = a, gn(n, a), r += n.length + 1; | ||
}), 0; | ||
} | ||
function wn(e, r) { | ||
var t = ue(); | ||
A[e >> 2] = t.length; | ||
function mn(e, t) { | ||
var r = ue(); | ||
$[e >> 2] = r.length; | ||
var n = 0; | ||
return t.forEach(function(i) { | ||
return r.forEach(function(i) { | ||
n += i.length + 1; | ||
}), A[r >> 2] = n, 0; | ||
}), $[t >> 2] = n, 0; | ||
} | ||
function bn(e) { | ||
function wn(e) { | ||
return e; | ||
@@ -1190,34 +1173,34 @@ } | ||
} | ||
function Pn(e, r) { | ||
for (var t = 0, n = 0; n <= r; t += e[n++]) | ||
function bn(e, t) { | ||
for (var r = 0, n = 0; n <= t; r += e[n++]) | ||
; | ||
return t; | ||
return r; | ||
} | ||
var Pr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | ||
function Cn(e, r) { | ||
for (var t = new Date(e.getTime()); r > 0; ) { | ||
var n = Te(t.getFullYear()), i = t.getMonth(), a = (n ? Pr : Cr)[i]; | ||
if (r > a - t.getDate()) | ||
r -= a - t.getDate() + 1, t.setDate(1), i < 11 ? t.setMonth(i + 1) : (t.setMonth(0), t.setFullYear(t.getFullYear() + 1)); | ||
var Pt = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ct = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | ||
function Pn(e, t) { | ||
for (var r = new Date(e.getTime()); t > 0; ) { | ||
var n = Te(r.getFullYear()), i = r.getMonth(), a = (n ? Pt : Ct)[i]; | ||
if (t > a - r.getDate()) | ||
t -= a - r.getDate() + 1, r.setDate(1), i < 11 ? r.setMonth(i + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() + 1)); | ||
else | ||
return t.setDate(t.getDate() + r), t; | ||
return r.setDate(r.getDate() + t), r; | ||
} | ||
return t; | ||
return r; | ||
} | ||
function Tn(e, r, t) { | ||
var n = t > 0 ? t : mr(e) + 1, i = new Array(n), a = yr(e, i, 0, i.length); | ||
return r && (i.length = a), i; | ||
function Cn(e, t, r) { | ||
var n = r > 0 ? r : mt(e) + 1, i = new Array(n), a = yt(e, i, 0, i.length); | ||
return t && (i.length = a), i; | ||
} | ||
function $n(e, r) { | ||
j.set(e, r); | ||
function Tn(e, t) { | ||
U.set(e, t); | ||
} | ||
function An(e, r, t, n) { | ||
var i = P[n + 40 >> 2], a = { tm_sec: P[n >> 2], tm_min: P[n + 4 >> 2], tm_hour: P[n + 8 >> 2], tm_mday: P[n + 12 >> 2], tm_mon: P[n + 16 >> 2], tm_year: P[n + 20 >> 2], tm_wday: P[n + 24 >> 2], tm_yday: P[n + 28 >> 2], tm_isdst: P[n + 32 >> 2], tm_gmtoff: P[n + 36 >> 2], tm_zone: i ? Ye(i) : "" }, s = Ye(t), o = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" }; | ||
for (var c in o) | ||
s = s.replace(new RegExp(c, "g"), o[c]); | ||
var f = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], d = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | ||
function p(l, v, S) { | ||
for (var E = typeof l == "number" ? l.toString() : l || ""; E.length < v; ) | ||
E = S[0] + E; | ||
return E; | ||
function An(e, t, r, n) { | ||
var i = T[n + 40 >> 2], a = { tm_sec: T[n >> 2], tm_min: T[n + 4 >> 2], tm_hour: T[n + 8 >> 2], tm_mday: T[n + 12 >> 2], tm_mon: T[n + 16 >> 2], tm_year: T[n + 20 >> 2], tm_wday: T[n + 24 >> 2], tm_yday: T[n + 28 >> 2], tm_isdst: T[n + 32 >> 2], tm_gmtoff: T[n + 36 >> 2], tm_zone: i ? Ie(i) : "" }, s = Ie(r), o = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" }; | ||
for (var f in o) | ||
s = s.replace(new RegExp(f, "g"), o[f]); | ||
var c = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], d = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | ||
function p(l, v, A) { | ||
for (var F = typeof l == "number" ? l.toString() : l || ""; F.length < v; ) | ||
F = A[0] + F; | ||
return F; | ||
} | ||
@@ -1227,10 +1210,10 @@ function h(l, v) { | ||
} | ||
function _(l, v) { | ||
function S(Z) { | ||
function g(l, v) { | ||
function A(Z) { | ||
return Z < 0 ? -1 : Z > 0 ? 1 : 0; | ||
} | ||
var E; | ||
return (E = S(l.getFullYear() - v.getFullYear())) === 0 && (E = S(l.getMonth() - v.getMonth())) === 0 && (E = S(l.getDate() - v.getDate())), E; | ||
var F; | ||
return (F = A(l.getFullYear() - v.getFullYear())) === 0 && (F = A(l.getMonth() - v.getMonth())) === 0 && (F = A(l.getDate() - v.getDate())), F; | ||
} | ||
function C(l) { | ||
function P(l) { | ||
switch (l.getDay()) { | ||
@@ -1253,10 +1236,10 @@ case 0: | ||
} | ||
function F(l) { | ||
var v = Cn(new Date(l.tm_year + 1900, 0, 1), l.tm_yday), S = new Date(v.getFullYear(), 0, 4), E = new Date(v.getFullYear() + 1, 0, 4), Z = C(S), Ae = C(E); | ||
return _(Z, v) <= 0 ? _(Ae, v) <= 0 ? v.getFullYear() + 1 : v.getFullYear() : v.getFullYear() - 1; | ||
function E(l) { | ||
var v = Pn(new Date(l.tm_year + 1900, 0, 1), l.tm_yday), A = new Date(v.getFullYear(), 0, 4), F = new Date(v.getFullYear() + 1, 0, 4), Z = P(A), $e = P(F); | ||
return g(Z, v) <= 0 ? g($e, v) <= 0 ? v.getFullYear() + 1 : v.getFullYear() : v.getFullYear() - 1; | ||
} | ||
var T = { "%a": function(l) { | ||
return f[l.tm_wday].substring(0, 3); | ||
var C = { "%a": function(l) { | ||
return c[l.tm_wday].substring(0, 3); | ||
}, "%A": function(l) { | ||
return f[l.tm_wday]; | ||
return c[l.tm_wday]; | ||
}, "%b": function(l) { | ||
@@ -1274,5 +1257,5 @@ return d[l.tm_mon].substring(0, 3); | ||
}, "%g": function(l) { | ||
return F(l).toString().substring(2); | ||
return E(l).toString().substring(2); | ||
}, "%G": function(l) { | ||
return F(l); | ||
return E(l); | ||
}, "%H": function(l) { | ||
@@ -1284,3 +1267,3 @@ return h(l.tm_hour, 2); | ||
}, "%j": function(l) { | ||
return h(l.tm_mday + Pn(Te(l.tm_year + 1900) ? Pr : Cr, l.tm_mon - 1), 3); | ||
return h(l.tm_mday + bn(Te(l.tm_year + 1900) ? Pt : Ct, l.tm_mon - 1), 3); | ||
}, "%m": function(l) { | ||
@@ -1308,9 +1291,9 @@ return h(l.tm_mon + 1, 2); | ||
if (v == 53) { | ||
var E = (l.tm_wday + 371 - l.tm_yday) % 7; | ||
E != 4 && (E != 3 || !Te(l.tm_year)) && (v = 1); | ||
var F = (l.tm_wday + 371 - l.tm_yday) % 7; | ||
F != 4 && (F != 3 || !Te(l.tm_year)) && (v = 1); | ||
} | ||
} else { | ||
v = 52; | ||
var S = (l.tm_wday + 7 - l.tm_yday - 1) % 7; | ||
(S == 4 || S == 5 && Te(l.tm_year % 400 - 1)) && v++; | ||
var A = (l.tm_wday + 7 - l.tm_yday - 1) % 7; | ||
(A == 4 || A == 5 && Te(l.tm_year % 400 - 1)) && v++; | ||
} | ||
@@ -1328,4 +1311,4 @@ return h(v, 2); | ||
}, "%z": function(l) { | ||
var v = l.tm_gmtoff, S = v >= 0; | ||
return v = Math.abs(v) / 60, v = v / 60 * 100 + v % 60, (S ? "+" : "-") + ("0000" + v).slice(-4); | ||
var v = l.tm_gmtoff, A = v >= 0; | ||
return v = Math.abs(v) / 60, v = v / 60 * 100 + v % 60, (A ? "+" : "-") + ("0000" + v).slice(-4); | ||
}, "%Z": function(l) { | ||
@@ -1337,22 +1320,22 @@ return l.tm_zone; | ||
s = s.replace(/%%/g, "\0\0"); | ||
for (var c in T) | ||
s.includes(c) && (s = s.replace(new RegExp(c, "g"), T[c](a))); | ||
for (var f in C) | ||
s.includes(f) && (s = s.replace(new RegExp(f, "g"), C[f](a))); | ||
s = s.replace(/\0\0/g, "%"); | ||
var $ = Tn(s, !1); | ||
return $.length > r ? 0 : ($n($, e), $.length - 1); | ||
var R = Cn(s, !1); | ||
return R.length > t ? 0 : (Tn(R, e), R.length - 1); | ||
} | ||
function Fn(e, r, t, n, i) { | ||
return An(e, r, t, n); | ||
function $n(e, t, r, n, i) { | ||
return An(e, t, r, n); | ||
} | ||
or = u.InternalError = De(Error, "InternalError"), st(), Q = u.BindingError = De(Error, "BindingError"), Ct(), ht(), kt(), hr = u.UnboundTypeError = De(Error, "UnboundTypeError"), Yt(); | ||
var En = { q: zr, v: Zr, a: qr, h: Jr, l: Kr, I: Qr, S: et, n: rt, Z: tt, d: Gr, la: at, U: ot, ba: ut, ka: jt, ja: Ht, D: Mt, aa: Vt, Q: Nt, R: Lt, x: Xt, t: Zt, P: Jt, K: an, N: on, ma: sn, ca: un, ga: gr, ha: fn, ia: ln, J: dn, $: vn, _: _n, X: mn, Y: wn, H: zn, O: ri, B: Xn, o: Nn, b: Rn, C: Ln, ea: Gn, c: On, i: In, j: Vn, r: xn, w: Bn, G: Jn, M: Kn, A: Zn, F: ti, V: ii, T: ai, k: Wn, g: Dn, e: kn, f: Sn, L: ei, m: Yn, p: jn, fa: Hn, u: Mn, da: Qn, z: qn, s: Un, E: ni, y: bn, W: Fn }; | ||
Nr(); | ||
ot = u.InternalError = Se(Error, "InternalError"), sr(), Q = u.BindingError = Se(Error, "BindingError"), Cr(), hr(), Dr(), ht = u.UnboundTypeError = Se(Error, "UnboundTypeError"), xr(); | ||
var Fn = { q: zt, v: Zt, a: qt, h: Jt, l: Kt, I: Qt, S: er, n: tr, Z: rr, d: Gt, la: ar, U: or, ba: ur, ka: Ur, ja: jr, D: Hr, aa: Yr, Q: Nr, R: Br, x: zr, t: Xr, P: qr, K: nn, N: an, ma: on, ca: sn, ga: gt, ha: un, ia: cn, J: ln, $: dn, _: hn, X: yn, Y: mn, H: Ln, O: ei, B: zn, o: Nn, b: En, C: Bn, ea: Zn, c: kn, i: Mn, j: Yn, r: In, w: Vn, G: qn, M: Jn, A: Xn, F: ti, V: ni, T: ii, k: On, g: Dn, e: Sn, f: Rn, L: Qn, m: xn, p: Wn, fa: jn, u: Hn, da: Kn, z: Gn, s: Un, E: ri, y: wn, W: $n }; | ||
Bt(); | ||
var I = u._free = function() { | ||
return (I = u._free = u.asm.pa).apply(null, arguments); | ||
}, Be = u._malloc = function() { | ||
return (Be = u._malloc = u.asm.qa).apply(null, arguments); | ||
}, Tr = function() { | ||
return (Tr = u.asm.ra).apply(null, arguments); | ||
}, $r = u.___getTypeName = function() { | ||
return ($r = u.___getTypeName = u.asm.ta).apply(null, arguments); | ||
}, Ye = u._malloc = function() { | ||
return (Ye = u._malloc = u.asm.qa).apply(null, arguments); | ||
}, Tt = function() { | ||
return (Tt = u.asm.ra).apply(null, arguments); | ||
}, At = u.___getTypeName = function() { | ||
return (At = u.___getTypeName = u.asm.ta).apply(null, arguments); | ||
}; | ||
@@ -1362,4 +1345,4 @@ u.__embind_initialize_bindings = function() { | ||
}; | ||
var g = function() { | ||
return (g = u.asm.va).apply(null, arguments); | ||
var _ = function() { | ||
return (_ = u.asm.va).apply(null, arguments); | ||
}, fe = function() { | ||
@@ -1371,6 +1354,6 @@ return (fe = u.asm.wa).apply(null, arguments); | ||
return (b = u.asm.ya).apply(null, arguments); | ||
}, Ar = function() { | ||
return (Ar = u.asm.za).apply(null, arguments); | ||
}, Fr = function() { | ||
return (Fr = u.asm.Aa).apply(null, arguments); | ||
}, $t = function() { | ||
return ($t = u.asm.za).apply(null, arguments); | ||
}, Ft = function() { | ||
return (Ft = u.asm.Aa).apply(null, arguments); | ||
}; | ||
@@ -1380,6 +1363,6 @@ u.dynCall_viijii = function() { | ||
}; | ||
var Er = u.dynCall_jiii = function() { | ||
return (Er = u.dynCall_jiii = u.asm.Ca).apply(null, arguments); | ||
}, Rr = u.dynCall_jiiii = function() { | ||
return (Rr = u.dynCall_jiiii = u.asm.Da).apply(null, arguments); | ||
var Et = u.dynCall_jiii = function() { | ||
return (Et = u.dynCall_jiii = u.asm.Ca).apply(null, arguments); | ||
}, Rt = u.dynCall_jiiii = function() { | ||
return (Rt = u.dynCall_jiiii = u.asm.Da).apply(null, arguments); | ||
}; | ||
@@ -1393,321 +1376,321 @@ u.dynCall_iiiiij = function() { | ||
}; | ||
function Rn(e, r) { | ||
var t = w(); | ||
function En(e, t) { | ||
var r = w(); | ||
try { | ||
return y(e)(r); | ||
return y(e)(t); | ||
} catch (n) { | ||
if (b(t), n !== n + 0) | ||
if (b(r), n !== n + 0) | ||
throw n; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Sn(e, r, t, n) { | ||
function Rn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
y(e)(r, t, n); | ||
y(e)(t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function kn(e, r, t) { | ||
function Sn(e, t, r) { | ||
var n = w(); | ||
try { | ||
y(e)(r, t); | ||
y(e)(t, r); | ||
} catch (i) { | ||
if (b(n), i !== i + 0) | ||
throw i; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Dn(e, r) { | ||
var t = w(); | ||
function Dn(e, t) { | ||
var r = w(); | ||
try { | ||
y(e)(r); | ||
y(e)(t); | ||
} catch (n) { | ||
if (b(t), n !== n + 0) | ||
if (b(r), n !== n + 0) | ||
throw n; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function On(e, r, t) { | ||
function kn(e, t, r) { | ||
var n = w(); | ||
try { | ||
return y(e)(r, t); | ||
return y(e)(t, r); | ||
} catch (i) { | ||
if (b(n), i !== i + 0) | ||
throw i; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Wn(e) { | ||
var r = w(); | ||
function On(e) { | ||
var t = w(); | ||
try { | ||
y(e)(); | ||
} catch (t) { | ||
if (b(r), t !== t + 0) | ||
throw t; | ||
g(1, 0); | ||
} catch (r) { | ||
if (b(t), r !== r + 0) | ||
throw r; | ||
_(1, 0); | ||
} | ||
} | ||
function jn(e, r, t, n, i, a) { | ||
function Wn(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
y(e)(r, t, n, i, a); | ||
y(e)(t, r, n, i, a); | ||
} catch (o) { | ||
if (b(s), o !== o + 0) | ||
throw o; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Un(e, r, t, n, i, a, s, o, c, f, d) { | ||
function Un(e, t, r, n, i, a, s, o, f, c, d) { | ||
var p = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s, o, c, f, d); | ||
y(e)(t, r, n, i, a, s, o, f, c, d); | ||
} catch (h) { | ||
if (b(p), h !== h + 0) | ||
throw h; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Hn(e, r, t, n, i, a, s) { | ||
function jn(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s); | ||
} catch (c) { | ||
if (b(o), c !== c + 0) | ||
throw c; | ||
g(1, 0); | ||
y(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
if (b(o), f !== f + 0) | ||
throw f; | ||
_(1, 0); | ||
} | ||
} | ||
function Mn(e, r, t, n, i, a, s, o) { | ||
var c = w(); | ||
function Hn(e, t, r, n, i, a, s, o) { | ||
var f = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s, o); | ||
} catch (f) { | ||
if (b(c), f !== f + 0) | ||
throw f; | ||
g(1, 0); | ||
y(e)(t, r, n, i, a, s, o); | ||
} catch (c) { | ||
if (b(f), c !== c + 0) | ||
throw c; | ||
_(1, 0); | ||
} | ||
} | ||
function In(e, r, t, n) { | ||
function Mn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return y(e)(r, t, n); | ||
return y(e)(t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function xn(e, r, t, n, i, a) { | ||
function In(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
return y(e)(r, t, n, i, a); | ||
return y(e)(t, r, n, i, a); | ||
} catch (o) { | ||
if (b(s), o !== o + 0) | ||
throw o; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Yn(e, r, t, n, i) { | ||
function xn(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
y(e)(r, t, n, i); | ||
y(e)(t, r, n, i); | ||
} catch (s) { | ||
if (b(a), s !== s + 0) | ||
throw s; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Vn(e, r, t, n, i) { | ||
function Yn(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
return y(e)(r, t, n, i); | ||
return y(e)(t, r, n, i); | ||
} catch (s) { | ||
if (b(a), s !== s + 0) | ||
throw s; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Bn(e, r, t, n, i, a, s) { | ||
function Vn(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
return y(e)(r, t, n, i, a, s); | ||
} catch (c) { | ||
if (b(o), c !== c + 0) | ||
throw c; | ||
g(1, 0); | ||
return y(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
if (b(o), f !== f + 0) | ||
throw f; | ||
_(1, 0); | ||
} | ||
} | ||
function Nn(e) { | ||
var r = w(); | ||
var t = w(); | ||
try { | ||
return y(e)(); | ||
} catch (t) { | ||
if (b(r), t !== t + 0) | ||
throw t; | ||
g(1, 0); | ||
} catch (r) { | ||
if (b(t), r !== r + 0) | ||
throw r; | ||
_(1, 0); | ||
} | ||
} | ||
function Ln(e, r, t, n) { | ||
function Bn(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return y(e)(r, t, n); | ||
return y(e)(t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function zn(e, r, t, n) { | ||
function Ln(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return y(e)(r, t, n); | ||
return y(e)(t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Xn(e, r, t, n, i, a) { | ||
function zn(e, t, r, n, i, a) { | ||
var s = w(); | ||
try { | ||
return y(e)(r, t, n, i, a); | ||
return y(e)(t, r, n, i, a); | ||
} catch (o) { | ||
if (b(s), o !== o + 0) | ||
throw o; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Zn(e, r, t, n, i, a, s, o, c, f) { | ||
function Xn(e, t, r, n, i, a, s, o, f, c) { | ||
var d = w(); | ||
try { | ||
return y(e)(r, t, n, i, a, s, o, c, f); | ||
return y(e)(t, r, n, i, a, s, o, f, c); | ||
} catch (p) { | ||
if (b(d), p !== p + 0) | ||
throw p; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Gn(e, r, t) { | ||
function Zn(e, t, r) { | ||
var n = w(); | ||
try { | ||
return y(e)(r, t); | ||
return y(e)(t, r); | ||
} catch (i) { | ||
if (b(n), i !== i + 0) | ||
throw i; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function qn(e, r, t, n, i, a, s, o, c, f) { | ||
function Gn(e, t, r, n, i, a, s, o, f, c) { | ||
var d = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s, o, c, f); | ||
y(e)(t, r, n, i, a, s, o, f, c); | ||
} catch (p) { | ||
if (b(d), p !== p + 0) | ||
throw p; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Jn(e, r, t, n, i, a, s, o) { | ||
var c = w(); | ||
function qn(e, t, r, n, i, a, s, o) { | ||
var f = w(); | ||
try { | ||
return y(e)(r, t, n, i, a, s, o); | ||
} catch (f) { | ||
if (b(c), f !== f + 0) | ||
throw f; | ||
g(1, 0); | ||
return y(e)(t, r, n, i, a, s, o); | ||
} catch (c) { | ||
if (b(f), c !== c + 0) | ||
throw c; | ||
_(1, 0); | ||
} | ||
} | ||
function Kn(e, r, t, n, i, a, s, o, c) { | ||
var f = w(); | ||
function Jn(e, t, r, n, i, a, s, o, f) { | ||
var c = w(); | ||
try { | ||
return y(e)(r, t, n, i, a, s, o, c); | ||
return y(e)(t, r, n, i, a, s, o, f); | ||
} catch (d) { | ||
if (b(f), d !== d + 0) | ||
if (b(c), d !== d + 0) | ||
throw d; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function Qn(e, r, t, n, i, a, s, o, c) { | ||
var f = w(); | ||
function Kn(e, t, r, n, i, a, s, o, f) { | ||
var c = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s, o, c); | ||
y(e)(t, r, n, i, a, s, o, f); | ||
} catch (d) { | ||
if (b(f), d !== d + 0) | ||
if (b(c), d !== d + 0) | ||
throw d; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function ei(e, r, t, n, i, a, s) { | ||
function Qn(e, t, r, n, i, a, s) { | ||
var o = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s); | ||
} catch (c) { | ||
if (b(o), c !== c + 0) | ||
throw c; | ||
g(1, 0); | ||
y(e)(t, r, n, i, a, s); | ||
} catch (f) { | ||
if (b(o), f !== f + 0) | ||
throw f; | ||
_(1, 0); | ||
} | ||
} | ||
function ri(e, r, t, n) { | ||
function ei(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return y(e)(r, t, n); | ||
return y(e)(t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function ti(e, r, t, n, i, a, s, o, c, f, d, p) { | ||
function ti(e, t, r, n, i, a, s, o, f, c, d, p) { | ||
var h = w(); | ||
try { | ||
return y(e)(r, t, n, i, a, s, o, c, f, d, p); | ||
} catch (_) { | ||
if (b(h), _ !== _ + 0) | ||
throw _; | ||
g(1, 0); | ||
return y(e)(t, r, n, i, a, s, o, f, c, d, p); | ||
} catch (g) { | ||
if (b(h), g !== g + 0) | ||
throw g; | ||
_(1, 0); | ||
} | ||
} | ||
function ni(e, r, t, n, i, a, s, o, c, f, d, p, h, _, C, F) { | ||
var T = w(); | ||
function ri(e, t, r, n, i, a, s, o, f, c, d, p, h, g, P, E) { | ||
var C = w(); | ||
try { | ||
y(e)(r, t, n, i, a, s, o, c, f, d, p, h, _, C, F); | ||
} catch ($) { | ||
if (b(T), $ !== $ + 0) | ||
throw $; | ||
g(1, 0); | ||
y(e)(t, r, n, i, a, s, o, f, c, d, p, h, g, P, E); | ||
} catch (R) { | ||
if (b(C), R !== R + 0) | ||
throw R; | ||
_(1, 0); | ||
} | ||
} | ||
function ii(e, r, t, n) { | ||
function ni(e, t, r, n) { | ||
var i = w(); | ||
try { | ||
return Er(e, r, t, n); | ||
return Et(e, t, r, n); | ||
} catch (a) { | ||
if (b(i), a !== a + 0) | ||
throw a; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
function ai(e, r, t, n, i) { | ||
function ii(e, t, r, n, i) { | ||
var a = w(); | ||
try { | ||
return Rr(e, r, t, n, i); | ||
return Rt(e, t, r, n, i); | ||
} catch (s) { | ||
if (b(a), s !== s + 0) | ||
throw s; | ||
g(1, 0); | ||
_(1, 0); | ||
} | ||
} | ||
var $e; | ||
te = function e() { | ||
$e || Sr(), $e || (te = e); | ||
var Ae; | ||
re = function e() { | ||
Ae || St(), Ae || (re = e); | ||
}; | ||
function Sr() { | ||
if (N > 0 || (Or(), N > 0)) | ||
function St() { | ||
if (B > 0 || (Ot(), B > 0)) | ||
return; | ||
function e() { | ||
$e || ($e = !0, u.calledRun = !0, !Ze && (Wr(), G(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), jr())); | ||
Ae || (Ae = !0, u.calledRun = !0, !ze && (Wt(), G(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), Ut())); | ||
} | ||
@@ -1723,48 +1706,48 @@ u.setStatus ? (u.setStatus("Running..."), setTimeout(function() { | ||
u.preInit.pop()(); | ||
return Sr(), B.ready; | ||
return St(), N.ready; | ||
}; | ||
})(); | ||
function ci(x) { | ||
return oi(Ne, x); | ||
function fi(x) { | ||
return ai(Ve, x); | ||
} | ||
async function li(x, { | ||
tryHarder: B = V.tryHarder, | ||
async function ci(x, { | ||
tryHarder: N = V.tryHarder, | ||
formats: u = V.formats, | ||
maxNumberOfSymbols: G = V.maxNumberOfSymbols | ||
} = V) { | ||
return si( | ||
return oi( | ||
x, | ||
{ | ||
tryHarder: B, | ||
tryHarder: N, | ||
formats: u, | ||
maxNumberOfSymbols: G | ||
}, | ||
Ne | ||
Ve | ||
); | ||
} | ||
async function di(x, { | ||
tryHarder: B = V.tryHarder, | ||
async function li(x, { | ||
tryHarder: N = V.tryHarder, | ||
formats: u = V.formats, | ||
maxNumberOfSymbols: G = V.maxNumberOfSymbols | ||
} = V) { | ||
return ui( | ||
return si( | ||
x, | ||
{ | ||
tryHarder: B, | ||
tryHarder: N, | ||
formats: u, | ||
maxNumberOfSymbols: G | ||
}, | ||
Ne | ||
Ve | ||
); | ||
} | ||
export { | ||
hi as ZXING_BARCODE_FORMAT_NAMES, | ||
_i as ZXING_CHARACTOR_SET_NAMES, | ||
pi as ZXING_BARCODE_FORMAT_NAMES, | ||
hi as ZXING_CHARACTOR_SET_NAMES, | ||
V as defaultZXingReadOptions, | ||
gi as defaultZXingWriteOptions, | ||
ci as getZXingModule, | ||
yi as purgeZXingModule, | ||
di as readBarcodeFromImageData, | ||
li as readBarcodeFromImageFile, | ||
mi as setZXingModuleOverrides | ||
_i as defaultZXingWriteOptions, | ||
fi as getZXingModule, | ||
gi as purgeZXingModule, | ||
li as readBarcodeFromImageData, | ||
ci as readBarcodeFromImageFile, | ||
yi as setZXingModuleOverrides | ||
}; |
@@ -1,49 +0,46 @@ | ||
import { g as yn, w as _n, c as V } from "../core-407013f0.js"; | ||
import { Z as Cn, b as $n, d as An, p as Rn, s as Fn } from "../core-407013f0.js"; | ||
var ht = (() => { | ||
var B = import.meta.url; | ||
return function(X = {}) { | ||
var o = typeof X < "u" ? X : {}, ie, L; | ||
import { g as gn, w as yn, c as L } from "../core-a879f5a9.js"; | ||
import { Z as Cn, b as Tn, d as $n, p as An, s as Rn } from "../core-a879f5a9.js"; | ||
var vt = (() => { | ||
var N = import.meta.url; | ||
return function(q = {}) { | ||
var o = typeof q < "u" ? q : {}, ae, Z; | ||
o.ready = new Promise(function(e, t) { | ||
ie = e, L = t; | ||
ae = e, Z = t; | ||
}); | ||
var ae = Object.assign({}, o), oe = typeof window == "object", se = typeof importScripts == "function"; | ||
var oe = Object.assign({}, o), se = typeof window == "object", ue = typeof importScripts == "function"; | ||
typeof process == "object" && typeof process.versions == "object" && process.versions.node; | ||
var E = ""; | ||
function vt(e) { | ||
function gt(e) { | ||
return o.locateFile ? o.locateFile(e, E) : E + e; | ||
} | ||
var Pe; | ||
(oe || se) && (se ? E = self.location.href : typeof document < "u" && document.currentScript && (E = document.currentScript.src), B && (E = B), E.indexOf("blob:") !== 0 ? E = E.substr(0, E.replace(/[?#].*/, "").lastIndexOf("/") + 1) : E = "", se && (Pe = (e) => { | ||
var Ce; | ||
(se || ue) && (ue ? E = self.location.href : typeof document < "u" && document.currentScript && (E = document.currentScript.src), N && (E = N), E.indexOf("blob:") !== 0 ? E = E.substr(0, E.replace(/[?#].*/, "").lastIndexOf("/") + 1) : E = "", ue && (Ce = (e) => { | ||
var t = new XMLHttpRequest(); | ||
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response); | ||
})), o.print || console.log.bind(console); | ||
var z = o.printErr || console.warn.bind(console); | ||
Object.assign(o, ae), ae = null, o.arguments && o.arguments, o.thisProgram && o.thisProgram, o.quit && o.quit; | ||
var q; | ||
o.wasmBinary && (q = o.wasmBinary), o.noExitRuntime, typeof WebAssembly != "object" && K("no native wasm support detected"); | ||
var ue, We = !1, I, P, N, fe, C, y, Ue, Ie; | ||
var G = o.printErr || console.warn.bind(console); | ||
Object.assign(o, oe), oe = null, o.arguments && o.arguments, o.thisProgram && o.thisProgram, o.quit && o.quit; | ||
var K; | ||
o.wasmBinary && (K = o.wasmBinary), o.noExitRuntime, typeof WebAssembly != "object" && J("no native wasm support detected"); | ||
var fe, Ue = !1, j, C, X, ce, $, y, We, Ie; | ||
function je() { | ||
var e = ue.buffer; | ||
o.HEAP8 = I = new Int8Array(e), o.HEAP16 = N = new Int16Array(e), o.HEAP32 = C = new Int32Array(e), o.HEAPU8 = P = new Uint8Array(e), o.HEAPU16 = fe = new Uint16Array(e), o.HEAPU32 = y = new Uint32Array(e), o.HEAPF32 = Ue = new Float32Array(e), o.HEAPF64 = Ie = new Float64Array(e); | ||
var e = fe.buffer; | ||
o.HEAP8 = j = new Int8Array(e), o.HEAP16 = X = new Int16Array(e), o.HEAP32 = $ = new Int32Array(e), o.HEAPU8 = C = new Uint8Array(e), o.HEAPU16 = ce = new Uint16Array(e), o.HEAPU32 = y = new Uint32Array(e), o.HEAPF32 = We = new Float32Array(e), o.HEAPF64 = Ie = new Float64Array(e); | ||
} | ||
var He, Me = [], xe = [], Ve = []; | ||
function gt() { | ||
var He, xe = [], Me = [], Ve = []; | ||
function yt() { | ||
if (o.preRun) | ||
for (typeof o.preRun == "function" && (o.preRun = [o.preRun]); o.preRun.length; ) | ||
mt(o.preRun.shift()); | ||
be(Me); | ||
wt(o.preRun.shift()); | ||
Te(xe); | ||
} | ||
function yt() { | ||
be(xe); | ||
function _t() { | ||
Te(Me); | ||
} | ||
function _t() { | ||
function mt() { | ||
if (o.postRun) | ||
for (typeof o.postRun == "function" && (o.postRun = [o.postRun]); o.postRun.length; ) | ||
Pt(o.postRun.shift()); | ||
be(Ve); | ||
bt(o.postRun.shift()); | ||
Te(Ve); | ||
} | ||
function mt(e) { | ||
Me.unshift(e); | ||
} | ||
function wt(e) { | ||
@@ -53,38 +50,41 @@ xe.unshift(e); | ||
function Pt(e) { | ||
Ve.unshift(e); | ||
Me.unshift(e); | ||
} | ||
var j = 0, G = null; | ||
function bt(e) { | ||
j++, o.monitorRunDependencies && o.monitorRunDependencies(j); | ||
Ve.unshift(e); | ||
} | ||
var H = 0, Q = null; | ||
function Ct(e) { | ||
H++, o.monitorRunDependencies && o.monitorRunDependencies(H); | ||
} | ||
function Tt(e) { | ||
if (j--, o.monitorRunDependencies && o.monitorRunDependencies(j), j == 0 && G) { | ||
var t = G; | ||
G = null, t(); | ||
if (H--, o.monitorRunDependencies && o.monitorRunDependencies(H), H == 0 && Q) { | ||
var t = Q; | ||
Q = null, t(); | ||
} | ||
} | ||
function K(e) { | ||
o.onAbort && o.onAbort(e), e = "Aborted(" + e + ")", z(e), We = !0, e += ". Build with -sASSERTIONS for more info."; | ||
function J(e) { | ||
o.onAbort && o.onAbort(e), e = "Aborted(" + e + ")", G(e), Ue = !0, e += ". Build with -sASSERTIONS for more info."; | ||
var t = new WebAssembly.RuntimeError(e); | ||
throw L(t), t; | ||
throw Z(t), t; | ||
} | ||
var Ct = "data:application/octet-stream;base64,"; | ||
var $t = "data:application/octet-stream;base64,"; | ||
function Be(e) { | ||
return e.startsWith(Ct); | ||
return e.startsWith($t); | ||
} | ||
var H; | ||
o.locateFile ? (H = "zxing_writer.wasm", Be(H) || (H = vt(H))) : H = new URL("/writer/zxing_writer.wasm", self.location).href; | ||
var x; | ||
o.locateFile ? (x = "zxing_writer.wasm", Be(x) || (x = gt(x))) : x = new URL("/writer/zxing_writer.wasm", self.location).href; | ||
function Le(e) { | ||
try { | ||
if (e == H && q) | ||
return new Uint8Array(q); | ||
if (Pe) | ||
return Pe(e); | ||
if (e == x && K) | ||
return new Uint8Array(K); | ||
if (Ce) | ||
return Ce(e); | ||
throw "both async and sync fetching of the wasm failed"; | ||
} catch (t) { | ||
K(t); | ||
J(t); | ||
} | ||
} | ||
function $t(e) { | ||
return !q && (oe || se) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(t) { | ||
function At(e) { | ||
return !K && (se || ue) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then(function(t) { | ||
if (!t.ok) | ||
@@ -100,3 +100,3 @@ throw "failed to load wasm binary file at '" + e + "'"; | ||
function Ne(e, t, r) { | ||
return $t(e).then(function(n) { | ||
return At(e).then(function(n) { | ||
return WebAssembly.instantiate(n, t); | ||
@@ -106,20 +106,20 @@ }).then(function(n) { | ||
}).then(r, function(n) { | ||
z("failed to asynchronously prepare wasm: " + n), K(n); | ||
G("failed to asynchronously prepare wasm: " + n), J(n); | ||
}); | ||
} | ||
function At(e, t, r, n) { | ||
function Rt(e, t, r, n) { | ||
return !e && typeof WebAssembly.instantiateStreaming == "function" && !Be(t) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then(function(i) { | ||
var a = WebAssembly.instantiateStreaming(i, r); | ||
return a.then(n, function(u) { | ||
return z("wasm streaming compile failed: " + u), z("falling back to ArrayBuffer instantiation"), Ne(t, r, n); | ||
return G("wasm streaming compile failed: " + u), G("falling back to ArrayBuffer instantiation"), Ne(t, r, n); | ||
}); | ||
}) : Ne(t, r, n); | ||
} | ||
function Rt() { | ||
function Ft() { | ||
var e = { a: en }; | ||
function t(n, i) { | ||
var a = n.exports; | ||
return o.asm = a, ue = o.asm.P, je(), He = o.asm.U, wt(o.asm.Q), Tt(), a; | ||
return o.asm = a, fe = o.asm.P, je(), He = o.asm.U, Pt(o.asm.Q), Tt(), a; | ||
} | ||
bt(); | ||
Ct(); | ||
function r(n) { | ||
@@ -132,35 +132,35 @@ t(n.instance); | ||
} catch (n) { | ||
z("Module.instantiateWasm callback failed with error: " + n), L(n); | ||
G("Module.instantiateWasm callback failed with error: " + n), Z(n); | ||
} | ||
return At(q, H, e, r).catch(L), {}; | ||
return Rt(K, x, e, r).catch(Z), {}; | ||
} | ||
function be(e) { | ||
function Te(e) { | ||
for (; e.length > 0; ) | ||
e.shift()(o); | ||
} | ||
var ce = []; | ||
function Ft(e) { | ||
var le = []; | ||
function Et(e) { | ||
e.add_ref(); | ||
} | ||
function Et(e) { | ||
var t = new Te(e); | ||
return t.get_caught() || t.set_caught(!0), t.set_rethrown(!1), ce.push(t), Ft(t), t.get_exception_ptr(); | ||
function kt(e) { | ||
var t = new $e(e); | ||
return t.get_caught() || t.set_caught(!0), t.set_rethrown(!1), le.push(t), Et(t), t.get_exception_ptr(); | ||
} | ||
var k = 0, le = []; | ||
var S = 0, de = []; | ||
function g(e) { | ||
var t = le[e]; | ||
return t || (e >= le.length && (le.length = e + 1), le[e] = t = He.get(e)), t; | ||
var t = de[e]; | ||
return t || (e >= de.length && (de.length = e + 1), de[e] = t = He.get(e)), t; | ||
} | ||
function kt(e) { | ||
function St(e) { | ||
if (e.release_ref() && !e.get_rethrown()) { | ||
var t = e.get_destructor(); | ||
t && g(t)(e.excPtr), ot(e.excPtr); | ||
t && g(t)(e.excPtr), ut(e.excPtr); | ||
} | ||
} | ||
function St() { | ||
function Ot() { | ||
_(0); | ||
var e = ce.pop(); | ||
kt(e), k = 0; | ||
var e = le.pop(); | ||
St(e), S = 0; | ||
} | ||
function Te(e) { | ||
function $e(e) { | ||
this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) { | ||
@@ -175,19 +175,19 @@ y[this.ptr + 4 >> 2] = t; | ||
}, this.set_refcount = function(t) { | ||
C[this.ptr >> 2] = t; | ||
$[this.ptr >> 2] = t; | ||
}, this.set_caught = function(t) { | ||
t = t ? 1 : 0, I[this.ptr + 12 >> 0] = t; | ||
t = t ? 1 : 0, j[this.ptr + 12 >> 0] = t; | ||
}, this.get_caught = function() { | ||
return I[this.ptr + 12 >> 0] != 0; | ||
return j[this.ptr + 12 >> 0] != 0; | ||
}, this.set_rethrown = function(t) { | ||
t = t ? 1 : 0, I[this.ptr + 13 >> 0] = t; | ||
t = t ? 1 : 0, j[this.ptr + 13 >> 0] = t; | ||
}, this.get_rethrown = function() { | ||
return I[this.ptr + 13 >> 0] != 0; | ||
return j[this.ptr + 13 >> 0] != 0; | ||
}, this.init = function(t, r) { | ||
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1); | ||
}, this.add_ref = function() { | ||
var t = C[this.ptr >> 2]; | ||
C[this.ptr >> 2] = t + 1; | ||
var t = $[this.ptr >> 2]; | ||
$[this.ptr >> 2] = t + 1; | ||
}, this.release_ref = function() { | ||
var t = C[this.ptr >> 2]; | ||
return C[this.ptr >> 2] = t - 1, t === 1; | ||
var t = $[this.ptr >> 2]; | ||
return $[this.ptr >> 2] = t - 1, t === 1; | ||
}, this.set_adjusted_ptr = function(t) { | ||
@@ -198,3 +198,3 @@ y[this.ptr + 16 >> 2] = t; | ||
}, this.get_exception_ptr = function() { | ||
var t = ft(this.get_type()); | ||
var t = lt(this.get_type()); | ||
if (t) | ||
@@ -206,14 +206,14 @@ return y[this.excPtr >> 2]; | ||
} | ||
function Ot(e) { | ||
throw k || (k = e), k; | ||
function Dt(e) { | ||
throw S || (S = e), S; | ||
} | ||
function Ce() { | ||
var e = k; | ||
function Ae() { | ||
var e = S; | ||
if (!e) | ||
return re(0), 0; | ||
var t = new Te(e); | ||
return ie(0), 0; | ||
var t = new $e(e); | ||
t.set_adjusted_ptr(e); | ||
var r = t.get_type(); | ||
if (!r) | ||
return re(0), e; | ||
return ie(0), e; | ||
for (var n = 0; n < arguments.length; n++) { | ||
@@ -224,21 +224,21 @@ var i = arguments[n]; | ||
var a = t.ptr + 16; | ||
if (ut(i, r, a)) | ||
return re(i), e; | ||
if (ct(i, r, a)) | ||
return ie(i), e; | ||
} | ||
return re(r), e; | ||
return ie(r), e; | ||
} | ||
var Dt = Ce, Wt = Ce, Ut = Ce; | ||
function It() { | ||
var e = ce.pop(); | ||
e || K("no exception to throw"); | ||
var Ut = Ae, Wt = Ae, It = Ae; | ||
function jt() { | ||
var e = le.pop(); | ||
e || J("no exception to throw"); | ||
var t = e.excPtr; | ||
throw e.get_rethrown() || (ce.push(e), e.set_rethrown(!0), e.set_caught(!1)), k = t, k; | ||
throw e.get_rethrown() || (le.push(e), e.set_rethrown(!0), e.set_caught(!1)), S = t, S; | ||
} | ||
function jt(e, t, r) { | ||
var n = new Te(e); | ||
throw n.init(t, r), k = e, k; | ||
function Ht(e, t, r) { | ||
var n = new $e(e); | ||
throw n.init(t, r), S = e, S; | ||
} | ||
function Ht(e, t, r, n, i) { | ||
function xt(e, t, r, n, i) { | ||
} | ||
function $e(e) { | ||
function Re(e) { | ||
switch (e) { | ||
@@ -263,9 +263,9 @@ case 1: | ||
var Ze = void 0; | ||
function b(e) { | ||
for (var t = "", r = e; P[r]; ) | ||
t += Ze[P[r++]]; | ||
function T(e) { | ||
for (var t = "", r = e; C[r]; ) | ||
t += Ze[C[r++]]; | ||
return t; | ||
} | ||
var Z = {}, M = {}, de = {}, xt = 48, Vt = 57; | ||
function Ae(e) { | ||
var z = {}, M = {}, pe = {}, Vt = 48, Bt = 57; | ||
function Xe(e) { | ||
if (e === void 0) | ||
@@ -275,6 +275,6 @@ return "_unknown"; | ||
var t = e.charCodeAt(0); | ||
return t >= xt && t <= Vt ? "_" + e : e; | ||
return t >= Vt && t <= Bt ? "_" + e : e; | ||
} | ||
function Re(e, t) { | ||
return e = Ae(e), { [e]: function() { | ||
function ze(e, t) { | ||
return e = Xe(e), { [e]: function() { | ||
return t.apply(this, arguments); | ||
@@ -284,3 +284,3 @@ } }[e]; | ||
function Fe(e, t) { | ||
var r = Re(t, function(n) { | ||
var r = ze(t, function(n) { | ||
this.name = t, this.message = n; | ||
@@ -295,28 +295,28 @@ var i = new Error(n).stack; | ||
} | ||
var Q = void 0; | ||
var Y = void 0; | ||
function d(e) { | ||
throw new Q(e); | ||
throw new Y(e); | ||
} | ||
var Xe = void 0; | ||
function pe(e) { | ||
throw new Xe(e); | ||
var qe = void 0; | ||
function he(e) { | ||
throw new qe(e); | ||
} | ||
function he(e, t, r) { | ||
function ve(e, t, r) { | ||
e.forEach(function(s) { | ||
de[s] = t; | ||
pe[s] = t; | ||
}); | ||
function n(s) { | ||
var c = r(s); | ||
c.length !== e.length && pe("Mismatched type converter count"); | ||
for (var f = 0; f < e.length; ++f) | ||
S(e[f], c[f]); | ||
var f = r(s); | ||
f.length !== e.length && he("Mismatched type converter count"); | ||
for (var c = 0; c < e.length; ++c) | ||
O(e[c], f[c]); | ||
} | ||
var i = new Array(t.length), a = [], u = 0; | ||
t.forEach((s, c) => { | ||
M.hasOwnProperty(s) ? i[c] = M[s] : (a.push(s), Z.hasOwnProperty(s) || (Z[s] = []), Z[s].push(() => { | ||
i[c] = M[s], ++u, u === a.length && n(i); | ||
t.forEach((s, f) => { | ||
M.hasOwnProperty(s) ? i[f] = M[s] : (a.push(s), z.hasOwnProperty(s) || (z[s] = []), z[s].push(() => { | ||
i[f] = M[s], ++u, u === a.length && n(i); | ||
})); | ||
}), a.length === 0 && n(i); | ||
} | ||
function S(e, t, r = {}) { | ||
function O(e, t, r = {}) { | ||
if (!("argPackAdvance" in t)) | ||
@@ -330,10 +330,10 @@ throw new TypeError("registerType registeredInstance requires argPackAdvance"); | ||
} | ||
if (M[e] = t, delete de[e], Z.hasOwnProperty(e)) { | ||
var i = Z[e]; | ||
delete Z[e], i.forEach((a) => a()); | ||
if (M[e] = t, delete pe[e], z.hasOwnProperty(e)) { | ||
var i = z[e]; | ||
delete z[e], i.forEach((a) => a()); | ||
} | ||
} | ||
function Bt(e, t, r, n, i) { | ||
var a = $e(r); | ||
t = b(t), S(e, { name: t, fromWireType: function(u) { | ||
function Lt(e, t, r, n, i) { | ||
var a = Re(r); | ||
t = T(t), O(e, { name: t, fromWireType: function(u) { | ||
return !!u; | ||
@@ -345,7 +345,7 @@ }, toWireType: function(u, s) { | ||
if (r === 1) | ||
s = I; | ||
s = j; | ||
else if (r === 2) | ||
s = N; | ||
s = X; | ||
else if (r === 4) | ||
s = C; | ||
s = $; | ||
else | ||
@@ -356,4 +356,4 @@ throw new TypeError("Unknown boolean type size: " + t); | ||
} | ||
function Lt(e) { | ||
if (!(this instanceof U) || !(e instanceof U)) | ||
function Nt(e) { | ||
if (!(this instanceof W) || !(e instanceof W)) | ||
return !1; | ||
@@ -366,3 +366,3 @@ for (var t = this.$$.ptrType.registeredClass, r = this.$$.ptr, n = e.$$.ptrType.registeredClass, i = e.$$.ptr; t.baseClass; ) | ||
} | ||
function Nt(e) { | ||
function Zt(e) { | ||
return { count: e.count, deleteScheduled: e.deleteScheduled, preservePointerOnDelete: e.preservePointerOnDelete, ptr: e.ptr, ptrType: e.ptrType, smartPtr: e.smartPtr, smartPtrType: e.smartPtrType }; | ||
@@ -377,13 +377,13 @@ } | ||
var ke = !1; | ||
function ze(e) { | ||
function Ge(e) { | ||
} | ||
function Zt(e) { | ||
function Xt(e) { | ||
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr); | ||
} | ||
function qe(e) { | ||
function Ke(e) { | ||
e.count.value -= 1; | ||
var t = e.count.value === 0; | ||
t && Zt(e); | ||
t && Xt(e); | ||
} | ||
function Ge(e, t, r) { | ||
function Qe(e, t, r) { | ||
if (t === r) | ||
@@ -393,31 +393,31 @@ return e; | ||
return null; | ||
var n = Ge(e, t, r.baseClass); | ||
var n = Qe(e, t, r.baseClass); | ||
return n === null ? null : r.downcast(n); | ||
} | ||
var Ke = {}; | ||
function Xt() { | ||
return Object.keys(ee).length; | ||
var Je = {}; | ||
function zt() { | ||
return Object.keys(re).length; | ||
} | ||
function zt() { | ||
function qt() { | ||
var e = []; | ||
for (var t in ee) | ||
ee.hasOwnProperty(t) && e.push(ee[t]); | ||
for (var t in re) | ||
re.hasOwnProperty(t) && e.push(re[t]); | ||
return e; | ||
} | ||
var J = []; | ||
var ee = []; | ||
function Se() { | ||
for (; J.length; ) { | ||
var e = J.pop(); | ||
for (; ee.length; ) { | ||
var e = ee.pop(); | ||
e.$$.deleteScheduled = !1, e.delete(); | ||
} | ||
} | ||
var Y = void 0; | ||
function qt(e) { | ||
Y = e, J.length && Y && Y(Se); | ||
var te = void 0; | ||
function Gt(e) { | ||
te = e, ee.length && te && te(Se); | ||
} | ||
function Gt() { | ||
o.getInheritedInstanceCount = Xt, o.getLiveInheritedInstances = zt, o.flushPendingDeletes = Se, o.setDelayFunction = qt; | ||
function Kt() { | ||
o.getInheritedInstanceCount = zt, o.getLiveInheritedInstances = qt, o.flushPendingDeletes = Se, o.setDelayFunction = Gt; | ||
} | ||
var ee = {}; | ||
function Kt(e, t) { | ||
var re = {}; | ||
function Qt(e, t) { | ||
for (t === void 0 && d("ptr should not be undefined"); e.baseClass; ) | ||
@@ -427,15 +427,15 @@ t = e.upcast(t), e = e.baseClass; | ||
} | ||
function Qt(e, t) { | ||
return t = Kt(e, t), ee[t]; | ||
function Jt(e, t) { | ||
return t = Qt(e, t), re[t]; | ||
} | ||
function ve(e, t) { | ||
(!t.ptrType || !t.ptr) && pe("makeClassHandle requires ptr and ptrType"); | ||
function ge(e, t) { | ||
(!t.ptrType || !t.ptr) && he("makeClassHandle requires ptr and ptrType"); | ||
var r = !!t.smartPtrType, n = !!t.smartPtr; | ||
return r !== n && pe("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, te(Object.create(e, { $$: { value: t } })); | ||
return r !== n && he("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, ne(Object.create(e, { $$: { value: t } })); | ||
} | ||
function Jt(e) { | ||
function Yt(e) { | ||
var t = this.getPointee(e); | ||
if (!t) | ||
return this.destructor(e), null; | ||
var r = Qt(this.registeredClass, t); | ||
var r = Jt(this.registeredClass, t); | ||
if (r !== void 0) { | ||
@@ -448,5 +448,5 @@ if (r.$$.count.value === 0) | ||
function i() { | ||
return this.isSmartPointer ? ve(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: e }) : ve(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
return this.isSmartPointer ? ge(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: e }) : ge(this.registeredClass.instancePrototype, { ptrType: this, ptr: e }); | ||
} | ||
var a = this.registeredClass.getActualType(t), u = Ke[a]; | ||
var a = this.registeredClass.getActualType(t), u = Je[a]; | ||
if (!u) | ||
@@ -456,9 +456,9 @@ return i.call(this); | ||
this.isConst ? s = u.constPointerType : s = u.pointerType; | ||
var c = Ge(t, this.registeredClass, s.registeredClass); | ||
return c === null ? i.call(this) : this.isSmartPointer ? ve(s.registeredClass.instancePrototype, { ptrType: s, ptr: c, smartPtrType: this, smartPtr: e }) : ve(s.registeredClass.instancePrototype, { ptrType: s, ptr: c }); | ||
var f = Qe(t, this.registeredClass, s.registeredClass); | ||
return f === null ? i.call(this) : this.isSmartPointer ? ge(s.registeredClass.instancePrototype, { ptrType: s, ptr: f, smartPtrType: this, smartPtr: e }) : ge(s.registeredClass.instancePrototype, { ptrType: s, ptr: f }); | ||
} | ||
function te(e) { | ||
return typeof FinalizationRegistry > "u" ? (te = (t) => t, e) : (ke = new FinalizationRegistry((t) => { | ||
qe(t.$$); | ||
}), te = (t) => { | ||
function ne(e) { | ||
return typeof FinalizationRegistry > "u" ? (ne = (t) => t, e) : (ke = new FinalizationRegistry((t) => { | ||
Ke(t.$$); | ||
}), ne = (t) => { | ||
var r = t.$$, n = !!r.smartPtr; | ||
@@ -470,25 +470,25 @@ if (n) { | ||
return t; | ||
}, ze = (t) => ke.unregister(t), te(e)); | ||
}, Ge = (t) => ke.unregister(t), ne(e)); | ||
} | ||
function Yt() { | ||
function er() { | ||
if (this.$$.ptr || Ee(this), this.$$.preservePointerOnDelete) | ||
return this.$$.count.value += 1, this; | ||
var e = te(Object.create(Object.getPrototypeOf(this), { $$: { value: Nt(this.$$) } })); | ||
var e = ne(Object.create(Object.getPrototypeOf(this), { $$: { value: Zt(this.$$) } })); | ||
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e; | ||
} | ||
function er() { | ||
this.$$.ptr || Ee(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && d("Object already scheduled for deletion"), ze(this), qe(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
} | ||
function tr() { | ||
return !this.$$.ptr; | ||
this.$$.ptr || Ee(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && d("Object already scheduled for deletion"), Ge(this), Ke(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0); | ||
} | ||
function rr() { | ||
return this.$$.ptr || Ee(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && d("Object already scheduled for deletion"), J.push(this), J.length === 1 && Y && Y(Se), this.$$.deleteScheduled = !0, this; | ||
return !this.$$.ptr; | ||
} | ||
function nr() { | ||
U.prototype.isAliasOf = Lt, U.prototype.clone = Yt, U.prototype.delete = er, U.prototype.isDeleted = tr, U.prototype.deleteLater = rr; | ||
return this.$$.ptr || Ee(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && d("Object already scheduled for deletion"), ee.push(this), ee.length === 1 && te && te(Se), this.$$.deleteScheduled = !0, this; | ||
} | ||
function U() { | ||
function ir() { | ||
W.prototype.isAliasOf = Nt, W.prototype.clone = er, W.prototype.delete = tr, W.prototype.isDeleted = rr, W.prototype.deleteLater = nr; | ||
} | ||
function ir(e, t, r) { | ||
function W() { | ||
} | ||
function ar(e, t, r) { | ||
if (e[t].overloadTable === void 0) { | ||
@@ -501,9 +501,9 @@ var n = e[t]; | ||
} | ||
function Qe(e, t, r) { | ||
o.hasOwnProperty(e) ? ((r === void 0 || o[e].overloadTable !== void 0 && o[e].overloadTable[r] !== void 0) && d("Cannot register public name '" + e + "' twice"), ir(o, e, e), o.hasOwnProperty(r) && d("Cannot register multiple overloads of a function with the same number of arguments (" + r + ")!"), o[e].overloadTable[r] = t) : (o[e] = t, r !== void 0 && (o[e].numArguments = r)); | ||
function Ye(e, t, r) { | ||
o.hasOwnProperty(e) ? ((r === void 0 || o[e].overloadTable !== void 0 && o[e].overloadTable[r] !== void 0) && d("Cannot register public name '" + e + "' twice"), ar(o, e, e), o.hasOwnProperty(r) && d("Cannot register multiple overloads of a function with the same number of arguments (" + r + ")!"), o[e].overloadTable[r] = t) : (o[e] = t, r !== void 0 && (o[e].numArguments = r)); | ||
} | ||
function ar(e, t, r, n, i, a, u, s) { | ||
function or(e, t, r, n, i, a, u, s) { | ||
this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = u, this.downcast = s, this.pureVirtualFunctions = []; | ||
} | ||
function ge(e, t, r) { | ||
function ye(e, t, r) { | ||
for (; t !== r; ) | ||
@@ -513,10 +513,10 @@ t.upcast || d("Expected null or instance of " + r.name + ", got an instance of " + t.name), e = t.upcast(e), t = t.baseClass; | ||
} | ||
function or(e, t) { | ||
function sr(e, t) { | ||
if (t === null) | ||
return this.isReference && d("null is not a valid " + this.name), 0; | ||
t.$$ || d('Cannot pass "' + Oe(t) + '" as a ' + this.name), t.$$.ptr || d("Cannot pass deleted object as a pointer of type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = ge(t.$$.ptr, r, this.registeredClass); | ||
var r = t.$$.ptrType.registeredClass, n = ye(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function sr(e, t) { | ||
function ur(e, t) { | ||
var r; | ||
@@ -527,3 +527,3 @@ if (t === null) | ||
var n = t.$$.ptrType.registeredClass; | ||
if (r = ge(t.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
if (r = ye(t.$$.ptr, n, this.registeredClass), this.isSmartPointer) | ||
switch (t.$$.smartPtr === void 0 && d("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) { | ||
@@ -541,3 +541,3 @@ case 0: | ||
var i = t.clone(); | ||
r = this.rawShare(r, me.toHandle(function() { | ||
r = this.rawShare(r, we.toHandle(function() { | ||
i.delete(); | ||
@@ -552,50 +552,50 @@ })), e !== null && e.push(this.rawDestructor, r); | ||
} | ||
function ur(e, t) { | ||
function fr(e, t) { | ||
if (t === null) | ||
return this.isReference && d("null is not a valid " + this.name), 0; | ||
t.$$ || d('Cannot pass "' + Oe(t) + '" as a ' + this.name), t.$$.ptr || d("Cannot pass deleted object as a pointer of type " + this.name), t.$$.ptrType.isConst && d("Cannot convert argument of type " + t.$$.ptrType.name + " to parameter type " + this.name); | ||
var r = t.$$.ptrType.registeredClass, n = ge(t.$$.ptr, r, this.registeredClass); | ||
var r = t.$$.ptrType.registeredClass, n = ye(t.$$.ptr, r, this.registeredClass); | ||
return n; | ||
} | ||
function ye(e) { | ||
return this.fromWireType(C[e >> 2]); | ||
function _e(e) { | ||
return this.fromWireType($[e >> 2]); | ||
} | ||
function fr(e) { | ||
function cr(e) { | ||
return this.rawGetPointee && (e = this.rawGetPointee(e)), e; | ||
} | ||
function cr(e) { | ||
function lr(e) { | ||
this.rawDestructor && this.rawDestructor(e); | ||
} | ||
function lr(e) { | ||
function dr(e) { | ||
e !== null && e.delete(); | ||
} | ||
function dr() { | ||
O.prototype.getPointee = fr, O.prototype.destructor = cr, O.prototype.argPackAdvance = 8, O.prototype.readValueFromPointer = ye, O.prototype.deleteObject = lr, O.prototype.fromWireType = Jt; | ||
function pr() { | ||
D.prototype.getPointee = cr, D.prototype.destructor = lr, D.prototype.argPackAdvance = 8, D.prototype.readValueFromPointer = _e, D.prototype.deleteObject = dr, D.prototype.fromWireType = Yt; | ||
} | ||
function O(e, t, r, n, i, a, u, s, c, f, l) { | ||
this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = c, this.rawShare = f, this.rawDestructor = l, !i && t.baseClass === void 0 ? n ? (this.toWireType = or, this.destructorFunction = null) : (this.toWireType = ur, this.destructorFunction = null) : this.toWireType = sr; | ||
function D(e, t, r, n, i, a, u, s, f, c, l) { | ||
this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = f, this.rawShare = c, this.rawDestructor = l, !i && t.baseClass === void 0 ? n ? (this.toWireType = sr, this.destructorFunction = null) : (this.toWireType = fr, this.destructorFunction = null) : this.toWireType = ur; | ||
} | ||
function Je(e, t, r) { | ||
o.hasOwnProperty(e) || pe("Replacing nonexistant public symbol"), o[e].overloadTable !== void 0 && r !== void 0 ? o[e].overloadTable[r] = t : (o[e] = t, o[e].argCount = r); | ||
function et(e, t, r) { | ||
o.hasOwnProperty(e) || he("Replacing nonexistant public symbol"), o[e].overloadTable !== void 0 && r !== void 0 ? o[e].overloadTable[r] = t : (o[e] = t, o[e].argCount = r); | ||
} | ||
function pr(e, t, r) { | ||
function hr(e, t, r) { | ||
var n = o["dynCall_" + e]; | ||
return r && r.length ? n.apply(null, [t].concat(r)) : n.call(null, t); | ||
} | ||
function hr(e, t, r) { | ||
function vr(e, t, r) { | ||
if (e.includes("j")) | ||
return pr(e, t, r); | ||
return hr(e, t, r); | ||
var n = g(t).apply(null, r); | ||
return n; | ||
} | ||
function vr(e, t) { | ||
function gr(e, t) { | ||
var r = []; | ||
return function() { | ||
return r.length = 0, Object.assign(r, arguments), hr(e, t, r); | ||
return r.length = 0, Object.assign(r, arguments), vr(e, t, r); | ||
}; | ||
} | ||
function x(e, t) { | ||
e = b(e); | ||
function V(e, t) { | ||
e = T(e); | ||
function r() { | ||
return e.includes("j") ? vr(e, t) : g(t); | ||
return e.includes("j") ? gr(e, t) : g(t); | ||
} | ||
@@ -605,13 +605,13 @@ var n = r(); | ||
} | ||
var Ye = void 0; | ||
function et(e) { | ||
var t = st(e), r = b(t); | ||
return D(t), r; | ||
var tt = void 0; | ||
function rt(e) { | ||
var t = ft(e), r = T(t); | ||
return U(t), r; | ||
} | ||
function _e(e, t) { | ||
function me(e, t) { | ||
var r = [], n = {}; | ||
function i(a) { | ||
if (!n[a] && !M[a]) { | ||
if (de[a]) { | ||
de[a].forEach(i); | ||
if (pe[a]) { | ||
pe[a].forEach(i); | ||
return; | ||
@@ -622,29 +622,29 @@ } | ||
} | ||
throw t.forEach(i), new Ye(e + ": " + r.map(et).join([", "])); | ||
throw t.forEach(i), new tt(e + ": " + r.map(rt).join([", "])); | ||
} | ||
function gr(e, t, r, n, i, a, u, s, c, f, l, p, h) { | ||
l = b(l), a = x(i, a), s && (s = x(u, s)), f && (f = x(c, f)), h = x(p, h); | ||
var v = Ae(l); | ||
Qe(v, function() { | ||
_e("Cannot construct " + l + " due to unbound types", [n]); | ||
}), he([e, t, r], n ? [n] : [], function(A) { | ||
A = A[0]; | ||
var T, R; | ||
n ? (T = A.registeredClass, R = T.instancePrototype) : R = U.prototype; | ||
var F = Re(v, function() { | ||
if (Object.getPrototypeOf(this) !== ne) | ||
throw new Q("Use 'new' to construct " + l); | ||
if (W.constructor_body === void 0) | ||
throw new Q(l + " has no accessible constructor"); | ||
var pt = W.constructor_body[arguments.length]; | ||
if (pt === void 0) | ||
throw new Q("Tried to invoke ctor of " + l + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(W.constructor_body).toString() + ") parameters instead!"); | ||
return pt.apply(this, arguments); | ||
}), ne = Object.create(R, { constructor: { value: F } }); | ||
F.prototype = ne; | ||
var W = new ar(l, F, ne, h, T, a, s, f), gn = new O(l, W, !0, !1, !1), lt = new O(l + "*", W, !1, !1, !1), dt = new O(l + " const*", W, !1, !0, !1); | ||
return Ke[e] = { pointerType: lt, constPointerType: dt }, Je(v, F), [gn, lt, dt]; | ||
function yr(e, t, r, n, i, a, u, s, f, c, l, p, h) { | ||
l = T(l), a = V(i, a), s && (s = V(u, s)), c && (c = V(f, c)), h = V(p, h); | ||
var v = Xe(l); | ||
Ye(v, function() { | ||
me("Cannot construct " + l + " due to unbound types", [n]); | ||
}), ve([e, t, r], n ? [n] : [], function(b) { | ||
b = b[0]; | ||
var R, P; | ||
n ? (R = b.registeredClass, P = R.instancePrototype) : P = W.prototype; | ||
var k = ze(v, function() { | ||
if (Object.getPrototypeOf(this) !== B) | ||
throw new Y("Use 'new' to construct " + l); | ||
if (F.constructor_body === void 0) | ||
throw new Y(l + " has no accessible constructor"); | ||
var ht = F.constructor_body[arguments.length]; | ||
if (ht === void 0) | ||
throw new Y("Tried to invoke ctor of " + l + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(F.constructor_body).toString() + ") parameters instead!"); | ||
return ht.apply(this, arguments); | ||
}), B = Object.create(P, { constructor: { value: k } }); | ||
k.prototype = B; | ||
var F = new or(l, k, B, h, R, a, s, c), I = new D(l, F, !0, !1, !1), be = new D(l + "*", F, !1, !1, !1), pt = new D(l + " const*", F, !1, !0, !1); | ||
return Je[e] = { pointerType: be, constPointerType: pt }, et(v, k), [I, be, pt]; | ||
}); | ||
} | ||
function tt(e) { | ||
function nt(e) { | ||
for (; e.length; ) { | ||
@@ -655,33 +655,33 @@ var t = e.pop(), r = e.pop(); | ||
} | ||
function rt(e, t, r) { | ||
return e instanceof Object || d(r + ' with invalid "this": ' + e), e instanceof t.registeredClass.constructor || d(r + ' incompatible with "this" of type ' + e.constructor.name), e.$$.ptr || d("cannot call emscripten binding method " + r + " on deleted object"), ge(e.$$.ptr, e.$$.ptrType.registeredClass, t.registeredClass); | ||
function it(e, t, r) { | ||
return e instanceof Object || d(r + ' with invalid "this": ' + e), e instanceof t.registeredClass.constructor || d(r + ' incompatible with "this" of type ' + e.constructor.name), e.$$.ptr || d("cannot call emscripten binding method " + r + " on deleted object"), ye(e.$$.ptr, e.$$.ptrType.registeredClass, t.registeredClass); | ||
} | ||
function yr(e, t, r, n, i, a, u, s, c, f) { | ||
t = b(t), i = x(n, i), he([], [e], function(l) { | ||
function _r(e, t, r, n, i, a, u, s, f, c) { | ||
t = T(t), i = V(n, i), ve([], [e], function(l) { | ||
l = l[0]; | ||
var p = l.name + "." + t, h = { get: function() { | ||
_e("Cannot access " + p + " due to unbound types", [r, u]); | ||
me("Cannot access " + p + " due to unbound types", [r, u]); | ||
}, enumerable: !0, configurable: !0 }; | ||
return c ? h.set = () => { | ||
_e("Cannot access " + p + " due to unbound types", [r, u]); | ||
return f ? h.set = () => { | ||
me("Cannot access " + p + " due to unbound types", [r, u]); | ||
} : h.set = (v) => { | ||
d(p + " is a read-only property"); | ||
}, Object.defineProperty(l.registeredClass.instancePrototype, t, h), he([], c ? [r, u] : [r], function(v) { | ||
var A = v[0], T = { get: function() { | ||
var F = rt(this, l, p + " getter"); | ||
return A.fromWireType(i(a, F)); | ||
}, Object.defineProperty(l.registeredClass.instancePrototype, t, h), ve([], f ? [r, u] : [r], function(v) { | ||
var b = v[0], R = { get: function() { | ||
var k = it(this, l, p + " getter"); | ||
return b.fromWireType(i(a, k)); | ||
}, enumerable: !0 }; | ||
if (c) { | ||
c = x(s, c); | ||
var R = v[1]; | ||
T.set = function(F) { | ||
var ne = rt(this, l, p + " setter"), W = []; | ||
c(f, ne, R.toWireType(W, F)), tt(W); | ||
if (f) { | ||
f = V(s, f); | ||
var P = v[1]; | ||
R.set = function(k) { | ||
var B = it(this, l, p + " setter"), F = []; | ||
f(c, B, P.toWireType(F, k)), nt(F); | ||
}; | ||
} | ||
return Object.defineProperty(l.registeredClass.instancePrototype, t, T), []; | ||
return Object.defineProperty(l.registeredClass.instancePrototype, t, R), []; | ||
}), []; | ||
}); | ||
} | ||
function _r() { | ||
function mr() { | ||
this.allocated = [void 0], this.freelist = [], this.get = function(e) { | ||
@@ -696,15 +696,15 @@ return this.allocated[e]; | ||
} | ||
var $ = new _r(); | ||
function nt(e) { | ||
e >= $.reserved && --$.get(e).refcount === 0 && $.free(e); | ||
var A = new mr(); | ||
function at(e) { | ||
e >= A.reserved && --A.get(e).refcount === 0 && A.free(e); | ||
} | ||
function mr() { | ||
for (var e = 0, t = $.reserved; t < $.allocated.length; ++t) | ||
$.allocated[t] !== void 0 && ++e; | ||
function wr() { | ||
for (var e = 0, t = A.reserved; t < A.allocated.length; ++t) | ||
A.allocated[t] !== void 0 && ++e; | ||
return e; | ||
} | ||
function wr() { | ||
$.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), $.reserved = $.allocated.length, o.count_emval_handles = mr; | ||
function Pr() { | ||
A.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), A.reserved = A.allocated.length, o.count_emval_handles = wr; | ||
} | ||
var me = { toValue: (e) => (e || d("Cannot use deleted val. handle = " + e), $.get(e).value), toHandle: (e) => { | ||
var we = { toValue: (e) => (e || d("Cannot use deleted val. handle = " + e), A.get(e).value), toHandle: (e) => { | ||
switch (e) { | ||
@@ -720,12 +720,12 @@ case void 0: | ||
default: | ||
return $.allocate({ refcount: 1, value: e }); | ||
return A.allocate({ refcount: 1, value: e }); | ||
} | ||
} }; | ||
function Pr(e, t) { | ||
t = b(t), S(e, { name: t, fromWireType: function(r) { | ||
var n = me.toValue(r); | ||
return nt(r), n; | ||
function br(e, t) { | ||
t = T(t), O(e, { name: t, fromWireType: function(r) { | ||
var n = we.toValue(r); | ||
return at(r), n; | ||
}, toWireType: function(r, n) { | ||
return me.toHandle(n); | ||
}, argPackAdvance: 8, readValueFromPointer: ye, destructorFunction: null }); | ||
return we.toHandle(n); | ||
}, argPackAdvance: 8, readValueFromPointer: _e, destructorFunction: null }); | ||
} | ||
@@ -738,7 +738,7 @@ function Oe(e) { | ||
} | ||
function br(e, t) { | ||
function Cr(e, t) { | ||
switch (t) { | ||
case 2: | ||
return function(r) { | ||
return this.fromWireType(Ue[r >> 2]); | ||
return this.fromWireType(We[r >> 2]); | ||
}; | ||
@@ -754,55 +754,38 @@ case 3: | ||
function Tr(e, t, r) { | ||
var n = $e(r); | ||
t = b(t), S(e, { name: t, fromWireType: function(i) { | ||
var n = Re(r); | ||
t = T(t), O(e, { name: t, fromWireType: function(i) { | ||
return i; | ||
}, toWireType: function(i, a) { | ||
return a; | ||
}, argPackAdvance: 8, readValueFromPointer: br(t, n), destructorFunction: null }); | ||
}, argPackAdvance: 8, readValueFromPointer: Cr(t, n), destructorFunction: null }); | ||
} | ||
function Cr(e, t) { | ||
if (!(e instanceof Function)) | ||
throw new TypeError("new_ called with constructor type " + typeof e + " which is not a function"); | ||
var r = Re(e.name || "unknownFunctionName", function() { | ||
}); | ||
r.prototype = e.prototype; | ||
var n = new r(), i = e.apply(n, t); | ||
return i instanceof Object ? i : n; | ||
} | ||
function $r(e, t, r, n, i, a) { | ||
var u = t.length; | ||
u < 2 && d("argTypes array size mismatch! Must at least get return value and 'this' types!"); | ||
for (var s = t[1] !== null && r !== null, c = !1, f = 1; f < t.length; ++f) | ||
if (t[f] !== null && t[f].destructorFunction === void 0) { | ||
c = !0; | ||
for (var s = t[1] !== null && r !== null, f = !1, c = 1; c < t.length; ++c) | ||
if (t[c] !== null && t[c].destructorFunction === void 0) { | ||
f = !0; | ||
break; | ||
} | ||
for (var l = t[0].name !== "void", p = "", h = "", f = 0; f < u - 2; ++f) | ||
p += (f !== 0 ? ", " : "") + "arg" + f, h += (f !== 0 ? ", " : "") + "arg" + f + "Wired"; | ||
var v = "return function " + Ae(e) + "(" + p + `) { | ||
if (arguments.length !== ` + (u - 2) + `) { | ||
throwBindingError('function ` + e + " called with ' + arguments.length + ' arguments, expected " + (u - 2) + ` args!'); | ||
} | ||
`; | ||
c && (v += `var destructors = []; | ||
`); | ||
var A = c ? "destructors" : "null", T = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"], R = [d, n, i, tt, t[0], t[1]]; | ||
s && (v += "var thisWired = classParam.toWireType(" + A + `, this); | ||
`); | ||
for (var f = 0; f < u - 2; ++f) | ||
v += "var arg" + f + "Wired = argType" + f + ".toWireType(" + A + ", arg" + f + "); // " + t[f + 2].name + ` | ||
`, T.push("argType" + f), R.push(t[f + 2]); | ||
if (s && (h = "thisWired" + (h.length > 0 ? ", " : "") + h), v += (l || a ? "var rv = " : "") + "invoker(fn" + (h.length > 0 ? ", " : "") + h + `); | ||
`, c) | ||
v += `runDestructors(destructors); | ||
`; | ||
else | ||
for (var f = s ? 1 : 2; f < t.length; ++f) { | ||
var F = f === 1 ? "thisWired" : "arg" + (f - 2) + "Wired"; | ||
t[f].destructorFunction !== null && (v += F + "_dtor(" + F + "); // " + t[f].name + ` | ||
`, T.push(F + "_dtor"), R.push(t[f].destructorFunction)); | ||
var l = t[0].name !== "void", p = u - 2, h = new Array(p), v = [], b = []; | ||
return function() { | ||
arguments.length !== p && d("function " + e + " called with " + arguments.length + " arguments, expected " + p + " args!"), b.length = 0; | ||
var R; | ||
v.length = s ? 2 : 1, v[0] = i, s && (R = t[1].toWireType(b, this), v[1] = R); | ||
for (var P = 0; P < p; ++P) | ||
h[P] = t[P + 2].toWireType(b, arguments[P]), v.push(h[P]); | ||
var k = n.apply(null, v); | ||
function B(F) { | ||
if (f) | ||
nt(b); | ||
else | ||
for (var I = s ? 1 : 2; I < t.length; I++) { | ||
var be = I === 1 ? R : h[I - 2]; | ||
t[I].destructorFunction !== null && t[I].destructorFunction(be); | ||
} | ||
if (l) | ||
return t[0].fromWireType(F); | ||
} | ||
return l && (v += `var ret = retType.fromWireType(rv); | ||
return ret; | ||
`), v += `} | ||
`, T.push(v), Cr(Function, T).apply(null, R); | ||
return B(k); | ||
}; | ||
} | ||
@@ -816,7 +799,7 @@ function Ar(e, t) { | ||
var s = Ar(t, r); | ||
e = b(e), i = x(n, i), Qe(e, function() { | ||
_e("Cannot call " + e + " due to unbound types", s); | ||
}, t - 1), he([], s, function(c) { | ||
var f = [c[0], null].concat(c.slice(1)); | ||
return Je(e, $r(e, f, null, i, a, u), t - 1), []; | ||
e = T(e), i = V(n, i), Ye(e, function() { | ||
me("Cannot call " + e + " due to unbound types", s); | ||
}, t - 1), ve([], s, function(f) { | ||
var c = [f[0], null].concat(f.slice(1)); | ||
return et(e, $r(e, c, null, i, a), t - 1), []; | ||
}); | ||
@@ -828,15 +811,15 @@ } | ||
return r ? function(i) { | ||
return I[i]; | ||
return j[i]; | ||
} : function(i) { | ||
return P[i]; | ||
return C[i]; | ||
}; | ||
case 1: | ||
return r ? function(i) { | ||
return N[i >> 1]; | ||
return X[i >> 1]; | ||
} : function(i) { | ||
return fe[i >> 1]; | ||
return ce[i >> 1]; | ||
}; | ||
case 2: | ||
return r ? function(i) { | ||
return C[i >> 2]; | ||
return $[i >> 2]; | ||
} : function(i) { | ||
@@ -850,4 +833,4 @@ return y[i >> 2]; | ||
function Er(e, t, r, n, i) { | ||
t = b(t); | ||
var a = $e(r), u = (p) => p; | ||
t = T(t); | ||
var a = Re(r), u = (p) => p; | ||
if (n === 0) { | ||
@@ -857,9 +840,9 @@ var s = 32 - 8 * r; | ||
} | ||
var c = t.includes("unsigned"), f = (p, h) => { | ||
var f = t.includes("unsigned"), c = (p, h) => { | ||
}, l; | ||
c ? l = function(p, h) { | ||
return f(h, this.name), h >>> 0; | ||
f ? l = function(p, h) { | ||
return c(h, this.name), h >>> 0; | ||
} : l = function(p, h) { | ||
return f(h, this.name), h; | ||
}, S(e, { name: t, fromWireType: u, toWireType: l, argPackAdvance: 8, readValueFromPointer: Fr(t, a, n !== 0), destructorFunction: null }); | ||
return c(h, this.name), h; | ||
}, O(e, { name: t, fromWireType: u, toWireType: l, argPackAdvance: 8, readValueFromPointer: Fr(t, a, n !== 0), destructorFunction: null }); | ||
} | ||
@@ -870,6 +853,6 @@ function kr(e, t, r) { | ||
u = u >> 2; | ||
var s = y, c = s[u], f = s[u + 1]; | ||
return new i(s.buffer, f, c); | ||
var s = y, f = s[u], c = s[u + 1]; | ||
return new i(s.buffer, c, f); | ||
} | ||
r = b(r), S(e, { name: r, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
r = T(r), O(e, { name: r, fromWireType: a, argPackAdvance: 8, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 }); | ||
} | ||
@@ -882,4 +865,4 @@ function Sr(e, t, r, n) { | ||
if (s >= 55296 && s <= 57343) { | ||
var c = e.charCodeAt(++u); | ||
s = 65536 + ((s & 1023) << 10) | c & 1023; | ||
var f = e.charCodeAt(++u); | ||
s = 65536 + ((s & 1023) << 10) | f & 1023; | ||
} | ||
@@ -907,3 +890,3 @@ if (s <= 127) { | ||
function Or(e, t, r) { | ||
return Sr(e, P, t, r); | ||
return Sr(e, C, t, r); | ||
} | ||
@@ -917,8 +900,8 @@ function Dr(e) { | ||
} | ||
var it = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function Wr(e, t, r) { | ||
var ot = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0; | ||
function Ur(e, t, r) { | ||
for (var n = t + r, i = t; e[i] && !(i >= n); ) | ||
++i; | ||
if (i - t > 16 && e.buffer && it) | ||
return it.decode(e.subarray(t, i)); | ||
if (i - t > 16 && e.buffer && ot) | ||
return ot.decode(e.subarray(t, i)); | ||
for (var a = ""; t < i; ) { | ||
@@ -935,8 +918,8 @@ var u = e[t++]; | ||
} | ||
var c = e[t++] & 63; | ||
if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | c : u = (u & 7) << 18 | s << 12 | c << 6 | e[t++] & 63, u < 65536) | ||
var f = e[t++] & 63; | ||
if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | f : u = (u & 7) << 18 | s << 12 | f << 6 | e[t++] & 63, u < 65536) | ||
a += String.fromCharCode(u); | ||
else { | ||
var f = u - 65536; | ||
a += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023); | ||
var c = u - 65536; | ||
a += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023); | ||
} | ||
@@ -946,24 +929,24 @@ } | ||
} | ||
function Ur(e, t) { | ||
return e ? Wr(P, e, t) : ""; | ||
function Wr(e, t) { | ||
return e ? Ur(C, e, t) : ""; | ||
} | ||
function Ir(e, t) { | ||
t = b(t); | ||
t = T(t); | ||
var r = t === "std::string"; | ||
S(e, { name: t, fromWireType: function(n) { | ||
O(e, { name: t, fromWireType: function(n) { | ||
var i = y[n >> 2], a = n + 4, u; | ||
if (r) | ||
for (var s = a, c = 0; c <= i; ++c) { | ||
var f = a + c; | ||
if (c == i || P[f] == 0) { | ||
var l = f - s, p = Ur(s, l); | ||
u === void 0 ? u = p : (u += String.fromCharCode(0), u += p), s = f + 1; | ||
for (var s = a, f = 0; f <= i; ++f) { | ||
var c = a + f; | ||
if (f == i || C[c] == 0) { | ||
var l = c - s, p = Wr(s, l); | ||
u === void 0 ? u = p : (u += String.fromCharCode(0), u += p), s = c + 1; | ||
} | ||
} | ||
else { | ||
for (var h = new Array(i), c = 0; c < i; ++c) | ||
h[c] = String.fromCharCode(P[a + c]); | ||
for (var h = new Array(i), f = 0; f < i; ++f) | ||
h[f] = String.fromCharCode(C[a + f]); | ||
u = h.join(""); | ||
} | ||
return D(n), u; | ||
return U(n), u; | ||
}, toWireType: function(n, i) { | ||
@@ -973,26 +956,26 @@ i instanceof ArrayBuffer && (i = new Uint8Array(i)); | ||
u || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int8Array || d("Cannot pass non-string to std::string"), r && u ? a = Dr(i) : a = i.length; | ||
var s = De(4 + a + 1), c = s + 4; | ||
var s = De(4 + a + 1), f = s + 4; | ||
if (y[s >> 2] = a, r && u) | ||
Or(i, c, a + 1); | ||
Or(i, f, a + 1); | ||
else if (u) | ||
for (var f = 0; f < a; ++f) { | ||
var l = i.charCodeAt(f); | ||
l > 255 && (D(c), d("String has UTF-16 code units that do not fit in 8 bits")), P[c + f] = l; | ||
for (var c = 0; c < a; ++c) { | ||
var l = i.charCodeAt(c); | ||
l > 255 && (U(f), d("String has UTF-16 code units that do not fit in 8 bits")), C[f + c] = l; | ||
} | ||
else | ||
for (var f = 0; f < a; ++f) | ||
P[c + f] = i[f]; | ||
return n !== null && n.push(D, s), s; | ||
}, argPackAdvance: 8, readValueFromPointer: ye, destructorFunction: function(n) { | ||
D(n); | ||
for (var c = 0; c < a; ++c) | ||
C[f + c] = i[c]; | ||
return n !== null && n.push(U, s), s; | ||
}, argPackAdvance: 8, readValueFromPointer: _e, destructorFunction: function(n) { | ||
U(n); | ||
} }); | ||
} | ||
var at = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
var st = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0; | ||
function jr(e, t) { | ||
for (var r = e, n = r >> 1, i = n + t / 2; !(n >= i) && fe[n]; ) | ||
for (var r = e, n = r >> 1, i = n + t / 2; !(n >= i) && ce[n]; ) | ||
++n; | ||
if (r = n << 1, r - e > 32 && at) | ||
return at.decode(P.subarray(e, r)); | ||
if (r = n << 1, r - e > 32 && st) | ||
return st.decode(C.subarray(e, r)); | ||
for (var a = "", u = 0; !(u >= t / 2); ++u) { | ||
var s = N[e + u * 2 >> 1]; | ||
var s = X[e + u * 2 >> 1]; | ||
if (s == 0) | ||
@@ -1010,12 +993,12 @@ break; | ||
var u = e.charCodeAt(a); | ||
N[t >> 1] = u, t += 2; | ||
X[t >> 1] = u, t += 2; | ||
} | ||
return N[t >> 1] = 0, t - n; | ||
return X[t >> 1] = 0, t - n; | ||
} | ||
function Mr(e) { | ||
function xr(e) { | ||
return e.length * 2; | ||
} | ||
function xr(e, t) { | ||
function Mr(e, t) { | ||
for (var r = 0, n = ""; !(r >= t / 4); ) { | ||
var i = C[e + r * 4 >> 2]; | ||
var i = $[e + r * 4 >> 2]; | ||
if (i == 0) | ||
@@ -1040,6 +1023,6 @@ break; | ||
} | ||
if (C[t >> 2] = u, t += 4, t + 4 > i) | ||
if ($[t >> 2] = u, t += 4, t + 4 > i) | ||
break; | ||
} | ||
return C[t >> 2] = 0, t - n; | ||
return $[t >> 2] = 0, t - n; | ||
} | ||
@@ -1054,23 +1037,23 @@ function Br(e) { | ||
function Lr(e, t, r) { | ||
r = b(r); | ||
r = T(r); | ||
var n, i, a, u, s; | ||
t === 2 ? (n = jr, i = Hr, u = Mr, a = () => fe, s = 1) : t === 4 && (n = xr, i = Vr, u = Br, a = () => y, s = 2), S(e, { name: r, fromWireType: function(c) { | ||
for (var f = y[c >> 2], l = a(), p, h = c + 4, v = 0; v <= f; ++v) { | ||
var A = c + 4 + v * t; | ||
if (v == f || l[A >> s] == 0) { | ||
var T = A - h, R = n(h, T); | ||
p === void 0 ? p = R : (p += String.fromCharCode(0), p += R), h = A + t; | ||
t === 2 ? (n = jr, i = Hr, u = xr, a = () => ce, s = 1) : t === 4 && (n = Mr, i = Vr, u = Br, a = () => y, s = 2), O(e, { name: r, fromWireType: function(f) { | ||
for (var c = y[f >> 2], l = a(), p, h = f + 4, v = 0; v <= c; ++v) { | ||
var b = f + 4 + v * t; | ||
if (v == c || l[b >> s] == 0) { | ||
var R = b - h, P = n(h, R); | ||
p === void 0 ? p = P : (p += String.fromCharCode(0), p += P), h = b + t; | ||
} | ||
} | ||
return D(c), p; | ||
}, toWireType: function(c, f) { | ||
typeof f != "string" && d("Cannot pass non-string to C++ string type " + r); | ||
var l = u(f), p = De(4 + l + t); | ||
return y[p >> 2] = l >> s, i(f, p + 4, l + t), c !== null && c.push(D, p), p; | ||
}, argPackAdvance: 8, readValueFromPointer: ye, destructorFunction: function(c) { | ||
D(c); | ||
return U(f), p; | ||
}, toWireType: function(f, c) { | ||
typeof c != "string" && d("Cannot pass non-string to C++ string type " + r); | ||
var l = u(c), p = De(4 + l + t); | ||
return y[p >> 2] = l >> s, i(c, p + 4, l + t), f !== null && f.push(U, p), p; | ||
}, argPackAdvance: 8, readValueFromPointer: _e, destructorFunction: function(f) { | ||
U(f); | ||
} }); | ||
} | ||
function Nr(e, t) { | ||
t = b(t), S(e, { isVoid: !0, name: t, argPackAdvance: 0, fromWireType: function() { | ||
t = T(t), O(e, { isVoid: !0, name: t, argPackAdvance: 0, fromWireType: function() { | ||
}, toWireType: function(r, n) { | ||
@@ -1080,7 +1063,7 @@ } }); | ||
function Zr(e) { | ||
e > 4 && ($.get(e).refcount += 1); | ||
e > 4 && (A.get(e).refcount += 1); | ||
} | ||
function Xr(e, t) { | ||
var r = M[e]; | ||
return r === void 0 && d(t + " has unknown type " + et(e)), r; | ||
return r === void 0 && d(t + " has unknown type " + rt(e)), r; | ||
} | ||
@@ -1090,9 +1073,9 @@ function zr(e, t) { | ||
var r = e.readValueFromPointer(t); | ||
return me.toHandle(r); | ||
return we.toHandle(r); | ||
} | ||
function qr() { | ||
K(""); | ||
J(""); | ||
} | ||
function Gr(e, t, r) { | ||
P.copyWithin(e, t, t + r); | ||
C.copyWithin(e, t, t + r); | ||
} | ||
@@ -1103,5 +1086,5 @@ function Kr() { | ||
function Qr(e) { | ||
var t = ue.buffer; | ||
var t = fe.buffer; | ||
try { | ||
return ue.grow(e - t.byteLength + 65535 >>> 16), je(), 1; | ||
return fe.grow(e - t.byteLength + 65535 >>> 16), je(), 1; | ||
} catch { | ||
@@ -1111,3 +1094,3 @@ } | ||
function Jr(e) { | ||
var t = P.length; | ||
var t = C.length; | ||
e = e >>> 0; | ||
@@ -1117,3 +1100,3 @@ var r = Kr(); | ||
return !1; | ||
let n = (c, f) => c + (f - c % f) % f; | ||
let n = (f, c) => f + (c - f % c) % c; | ||
for (var i = 1; i <= 4; i *= 2) { | ||
@@ -1131,13 +1114,13 @@ var a = t * (1 + 0.2 / i); | ||
} | ||
Mt(), Q = o.BindingError = Fe(Error, "BindingError"), Xe = o.InternalError = Fe(Error, "InternalError"), nr(), Gt(), dr(), Ye = o.UnboundTypeError = Fe(Error, "UnboundTypeError"), wr(); | ||
var en = { r: Et, u: St, a: Dt, m: Wt, t: Ut, I: It, l: jt, f: Ot, B: Ht, F: Bt, O: gr, z: yr, E: Pr, y: Tr, N: Rr, q: Er, p: kr, x: Ir, v: Lr, G: Nr, K: nt, L: Zr, M: zr, w: qr, D: Gr, C: Jr, s: hn, b: tn, c: on, i: ln, j: vn, h: dn, H: pn, k: sn, d: un, g: cn, e: rn, o: an, n: nn, J: fn, A: Yr }; | ||
Rt(); | ||
Mt(), Y = o.BindingError = Fe(Error, "BindingError"), qe = o.InternalError = Fe(Error, "InternalError"), ir(), Kt(), pr(), tt = o.UnboundTypeError = Fe(Error, "UnboundTypeError"), Pr(); | ||
var en = { r: kt, u: Ot, a: Ut, m: Wt, t: It, I: jt, l: Ht, f: Dt, B: xt, F: Lt, O: yr, z: _r, E: br, y: Tr, N: Rr, q: Er, p: kr, x: Ir, v: Lr, G: Nr, K: at, L: Zr, M: zr, w: qr, D: Gr, C: Jr, s: hn, b: tn, c: on, i: ln, j: vn, h: dn, H: pn, k: sn, d: un, g: cn, e: rn, o: an, n: nn, J: fn, A: Yr }; | ||
Ft(); | ||
var De = o._malloc = function() { | ||
return (De = o._malloc = o.asm.R).apply(null, arguments); | ||
}, D = o._free = function() { | ||
return (D = o._free = o.asm.S).apply(null, arguments); | ||
}, ot = function() { | ||
return (ot = o.asm.T).apply(null, arguments); | ||
}, st = o.___getTypeName = function() { | ||
return (st = o.___getTypeName = o.asm.V).apply(null, arguments); | ||
}, U = o._free = function() { | ||
return (U = o._free = o.asm.S).apply(null, arguments); | ||
}, ut = function() { | ||
return (ut = o.asm.T).apply(null, arguments); | ||
}, ft = o.___getTypeName = function() { | ||
return (ft = o.___getTypeName = o.asm.V).apply(null, arguments); | ||
}; | ||
@@ -1149,4 +1132,4 @@ o.__embind_initialize_bindings = function() { | ||
return (_ = o.asm.X).apply(null, arguments); | ||
}, re = function() { | ||
return (re = o.asm.Y).apply(null, arguments); | ||
}, ie = function() { | ||
return (ie = o.asm.Y).apply(null, arguments); | ||
}, m = function() { | ||
@@ -1156,6 +1139,6 @@ return (m = o.asm.Z).apply(null, arguments); | ||
return (w = o.asm._).apply(null, arguments); | ||
}, ut = function() { | ||
return (ut = o.asm.$).apply(null, arguments); | ||
}, ft = function() { | ||
return (ft = o.asm.aa).apply(null, arguments); | ||
}, ct = function() { | ||
return (ct = o.asm.$).apply(null, arguments); | ||
}, lt = function() { | ||
return (lt = o.asm.aa).apply(null, arguments); | ||
}; | ||
@@ -1232,8 +1215,8 @@ function tn(e, t) { | ||
} | ||
function fn(e, t, r, n, i, a, u, s, c) { | ||
var f = m(); | ||
function fn(e, t, r, n, i, a, u, s, f) { | ||
var c = m(); | ||
try { | ||
g(e)(t, r, n, i, a, u, s, c); | ||
g(e)(t, r, n, i, a, u, s, f); | ||
} catch (l) { | ||
if (w(f), l !== l + 0) | ||
if (w(c), l !== l + 0) | ||
throw l; | ||
@@ -1277,5 +1260,5 @@ _(1, 0); | ||
return g(e)(t, r, n, i, a, u); | ||
} catch (c) { | ||
if (w(s), c !== c + 0) | ||
throw c; | ||
} catch (f) { | ||
if (w(s), f !== f + 0) | ||
throw f; | ||
_(1, 0); | ||
@@ -1304,11 +1287,11 @@ } | ||
} | ||
var we; | ||
G = function e() { | ||
we || ct(), we || (G = e); | ||
var Pe; | ||
Q = function e() { | ||
Pe || dt(), Pe || (Q = e); | ||
}; | ||
function ct() { | ||
if (j > 0 || (gt(), j > 0)) | ||
function dt() { | ||
if (H > 0 || (yt(), H > 0)) | ||
return; | ||
function e() { | ||
we || (we = !0, o.calledRun = !0, !We && (yt(), ie(o), o.onRuntimeInitialized && o.onRuntimeInitialized(), _t())); | ||
Pe || (Pe = !0, o.calledRun = !0, !Ue && (_t(), ae(o), o.onRuntimeInitialized && o.onRuntimeInitialized(), mt())); | ||
} | ||
@@ -1324,27 +1307,27 @@ o.setStatus ? (o.setStatus("Running..."), setTimeout(function() { | ||
o.preInit.pop()(); | ||
return ct(), X.ready; | ||
return dt(), q.ready; | ||
}; | ||
})(); | ||
function wn(B) { | ||
return yn(ht, B); | ||
function mn(N) { | ||
return gn(vt, N); | ||
} | ||
async function Pn(B, { | ||
format: X = V.format, | ||
charset: o = V.charset, | ||
quietZone: ie = V.quietZone, | ||
width: L = V.width, | ||
height: ae = V.height, | ||
eccLevel: oe = V.eccLevel | ||
} = V) { | ||
return _n( | ||
B, | ||
async function wn(N, { | ||
format: q = L.format, | ||
charset: o = L.charset, | ||
quietZone: ae = L.quietZone, | ||
width: Z = L.width, | ||
height: oe = L.height, | ||
eccLevel: se = L.eccLevel | ||
} = L) { | ||
return yn( | ||
N, | ||
{ | ||
format: X, | ||
format: q, | ||
charset: o, | ||
quietZone: ie, | ||
width: L, | ||
height: ae, | ||
eccLevel: oe | ||
quietZone: ae, | ||
width: Z, | ||
height: oe, | ||
eccLevel: se | ||
}, | ||
ht | ||
vt | ||
); | ||
@@ -1354,9 +1337,9 @@ } | ||
Cn as ZXING_BARCODE_FORMAT_NAMES, | ||
$n as ZXING_CHARACTOR_SET_NAMES, | ||
An as defaultZXingReadOptions, | ||
V as defaultZXingWriteOptions, | ||
wn as getZXingModule, | ||
Rn as purgeZXingModule, | ||
Fn as setZXingModuleOverrides, | ||
Pn as writeBarcodeToImageFile | ||
Tn as ZXING_CHARACTOR_SET_NAMES, | ||
$n as defaultZXingReadOptions, | ||
L as defaultZXingWriteOptions, | ||
mn as getZXingModule, | ||
An as purgeZXingModule, | ||
Rn as setZXingModuleOverrides, | ||
wn as writeBarcodeToImageFile | ||
}; |
{ | ||
"name": "@sec-ant/zxing-wasm", | ||
"private": false, | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2871367
5138