barcode-detector 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- var Xe = (i) => {
2
- throw TypeError(i);
1
+ var Ae = (o) => {
2
+ throw TypeError(o);
3
3
  };
4
- var qe = (i, f, p) => f.has(i) || Xe("Cannot " + p);
5
- var Ze = (i, f, p) => (qe(i, f, "read from private field"), p ? p.call(i) : f.get(i)), Ye = (i, f, p) => f.has(i) ? Xe("Cannot add the same private member more than once") : f instanceof WeakSet ? f.add(i) : f.set(i, p), Qe = (i, f, p, T) => (qe(i, f, "write to private field"), T ? T.call(i, p) : f.set(i, p), p);
6
- const Lt = [
4
+ var Se = (o, f, c) => f.has(o) || Ae("Cannot " + c);
5
+ var Ie = (o, f, c) => (Se(o, f, "read from private field"), c ? c.call(o) : f.get(o)), De = (o, f, c) => f.has(o) ? Ae("Cannot add the same private member more than once") : f instanceof WeakSet ? f.add(o) : f.set(o, c), Me = (o, f, c, T) => (Se(o, f, "write to private field"), T ? T.call(o, c) : f.set(o, c), c);
6
+ const Dt = [
7
7
  ["Aztec", "M"],
8
8
  ["Codabar", "L"],
9
9
  ["Code39", "L"],
@@ -24,44 +24,44 @@ const Lt = [
24
24
  ["rMQRCode", "M"],
25
25
  ["DXFilmEdge", "L"],
26
26
  ["DataBarLimited", "L"]
27
- ], Ut = Lt.map(([i]) => i), Za = Ut.filter(
28
- (i, f) => Lt[f][1] === "L"
29
- ), Ya = Ut.filter(
30
- (i, f) => Lt[f][1] === "M"
27
+ ], Mt = Dt.map(([o]) => o), La = Mt.filter(
28
+ (o, f) => Dt[f][1] === "L"
29
+ ), Ba = Mt.filter(
30
+ (o, f) => Dt[f][1] === "M"
31
31
  );
32
- function re(i) {
33
- switch (i) {
32
+ function Yt(o) {
33
+ switch (o) {
34
34
  case "Linear-Codes":
35
- return Za.reduce((f, p) => f | re(p), 0);
35
+ return La.reduce((f, c) => f | Yt(c), 0);
36
36
  case "Matrix-Codes":
37
- return Ya.reduce((f, p) => f | re(p), 0);
37
+ return Ba.reduce((f, c) => f | Yt(c), 0);
38
38
  case "Any":
39
- return (1 << Lt.length) - 1;
39
+ return (1 << Dt.length) - 1;
40
40
  case "None":
41
41
  return 0;
42
42
  default:
43
- return 1 << Ut.indexOf(i);
43
+ return 1 << Mt.indexOf(o);
44
44
  }
45
45
  }
46
- function Qa(i) {
47
- if (i === 0)
46
+ function Wa(o) {
47
+ if (o === 0)
48
48
  return "None";
49
- const f = 31 - Math.clz32(i);
50
- return Ut[f];
49
+ const f = 31 - Math.clz32(o);
50
+ return Mt[f];
51
51
  }
52
- function Ja(i) {
53
- return i.reduce((f, p) => f | re(p), 0);
52
+ function Ua(o) {
53
+ return o.reduce((f, c) => f | Yt(c), 0);
54
54
  }
55
- const Ka = [
55
+ const Va = [
56
56
  "LocalAverage",
57
57
  "GlobalHistogram",
58
58
  "FixedThreshold",
59
59
  "BoolCast"
60
60
  ];
61
- function ti(i) {
62
- return Ka.indexOf(i);
61
+ function ka(o) {
62
+ return Va.indexOf(o);
63
63
  }
64
- const Je = [
64
+ const Fe = [
65
65
  "Unknown",
66
66
  "ASCII",
67
67
  "ISO8859_1",
@@ -101,10 +101,10 @@ const Je = [
101
101
  "UTF32LE",
102
102
  "BINARY"
103
103
  ];
104
- function ei(i) {
105
- return i === "UnicodeBig" ? Je.indexOf("UTF16BE") : Je.indexOf(i);
104
+ function Ha(o) {
105
+ return o === "UnicodeBig" ? Fe.indexOf("UTF16BE") : Fe.indexOf(o);
106
106
  }
107
- const ri = [
107
+ const Na = [
108
108
  "Text",
109
109
  "Binary",
110
110
  "Mixed",
@@ -112,18 +112,18 @@ const ri = [
112
112
  "ISO15434",
113
113
  "UnknownECI"
114
114
  ];
115
- function ni(i) {
116
- return ri[i];
115
+ function za(o) {
116
+ return Na[o];
117
117
  }
118
- const ai = ["Ignore", "Read", "Require"];
119
- function ii(i) {
120
- return ai.indexOf(i);
118
+ const Ga = ["Ignore", "Read", "Require"];
119
+ function Xa(o) {
120
+ return Ga.indexOf(o);
121
121
  }
122
- const oi = ["Plain", "ECI", "HRI", "Hex", "Escaped"];
123
- function si(i) {
124
- return oi.indexOf(i);
122
+ const qa = ["Plain", "ECI", "HRI", "Hex", "Escaped"];
123
+ function Ya(o) {
124
+ return qa.indexOf(o);
125
125
  }
126
- const Bt = {
126
+ const It = {
127
127
  formats: [],
128
128
  tryHarder: !0,
129
129
  tryRotate: !0,
@@ -142,1666 +142,1648 @@ const Bt = {
142
142
  textMode: "HRI",
143
143
  characterSet: "Unknown"
144
144
  };
145
- function Ke(i) {
145
+ function Re(o) {
146
146
  return {
147
- ...i,
148
- formats: Ja(i.formats),
149
- binarizer: ti(i.binarizer),
150
- eanAddOnSymbol: ii(i.eanAddOnSymbol),
151
- textMode: si(i.textMode),
152
- characterSet: ei(i.characterSet)
147
+ ...o,
148
+ formats: Ua(o.formats),
149
+ binarizer: ka(o.binarizer),
150
+ eanAddOnSymbol: Xa(o.eanAddOnSymbol),
151
+ textMode: Ya(o.textMode),
152
+ characterSet: Ha(o.characterSet)
153
153
  };
154
154
  }
155
- function ui(i) {
155
+ function Za(o) {
156
156
  return {
157
- ...i,
158
- format: Qa(i.format),
159
- contentType: ni(i.contentType),
160
- eccLevel: i.ecLevel
157
+ ...o,
158
+ format: Wa(o.format),
159
+ contentType: za(o.contentType),
160
+ eccLevel: o.ecLevel
161
161
  };
162
162
  }
163
- const Di = "2.0.1", Mi = "7be9048e8176fba4f6ffa3dcf528282c6b0151a9", ci = {
164
- locateFile: (i, f) => {
165
- const p = i.match(/_(.+?)\.wasm$/);
166
- return p ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.0.1/dist/${p[1]}/${i}` : f + i;
167
- }
168
- }, Rt = /* @__PURE__ */ new WeakMap();
169
- function li(i, f) {
170
- return Object.is(i, f) || Object.keys(i).length === Object.keys(f).length && Object.keys(i).every(
171
- (p) => Object.prototype.hasOwnProperty.call(f, p) && i[p] === f[p]
163
+ const $o = "2.1.1", bo = "559471ac8fe0d119db538bb43c0a58ce9e67fccf", Qa = {
164
+ locateFile: (o, f) => {
165
+ const c = o.match(/_(.+?)\.wasm$/);
166
+ return c ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.1/dist/${c[1]}/${o}` : f + o;
167
+ }
168
+ }, St = /* @__PURE__ */ new WeakMap();
169
+ function Ja(o, f) {
170
+ return Object.is(o, f) || Object.keys(o).length === Object.keys(f).length && Object.keys(o).every(
171
+ (c) => Object.prototype.hasOwnProperty.call(f, c) && o[c] === f[c]
172
172
  );
173
173
  }
174
- function er(i, {
174
+ function Le(o, {
175
175
  overrides: f,
176
- equalityFn: p = li,
176
+ equalityFn: c = Ja,
177
177
  fireImmediately: T = !1
178
178
  } = {}) {
179
- var c;
180
- const [O, x] = (c = Rt.get(i)) != null ? c : [ci], j = f != null ? f : O;
181
- let M;
179
+ var $;
180
+ const [x, D] = ($ = St.get(o)) != null ? $ : [Qa], j = f != null ? f : x;
181
+ let O;
182
182
  if (T) {
183
- if (x && (M = p(O, j)))
184
- return x;
185
- const L = i({
183
+ if (D && (O = c(x, j)))
184
+ return D;
185
+ const M = o({
186
186
  ...j
187
187
  });
188
- return Rt.set(i, [j, L]), L;
188
+ return St.set(o, [j, M]), M;
189
189
  }
190
- (M != null ? M : p(O, j)) || Rt.set(i, [j]);
190
+ (O != null ? O : c(x, j)) || St.set(o, [j]);
191
191
  }
192
- function fi(i) {
193
- Rt.delete(i);
192
+ function Ka(o) {
193
+ St.delete(o);
194
194
  }
195
- async function di(i, f, p = Bt) {
195
+ async function to(o, f, c = It) {
196
196
  const T = {
197
- ...Bt,
198
- ...p
199
- }, c = await er(i, {
197
+ ...It,
198
+ ...c
199
+ }, $ = await Le(o, {
200
200
  fireImmediately: !0
201
201
  });
202
- let O, x;
203
- if ("size" in f) {
204
- const { size: M } = f, L = new Uint8Array(await f.arrayBuffer());
205
- x = c._malloc(M), c.HEAPU8.set(L, x), O = c.readBarcodesFromImage(
206
- x,
207
- M,
208
- Ke(T)
209
- );
210
- } else {
202
+ let x, D;
203
+ if ("width" in f && "height" in f && "data" in f) {
211
204
  const {
212
- data: M,
213
- data: { byteLength: L },
214
- width: k,
215
- height: Z
205
+ data: O,
206
+ data: { byteLength: M },
207
+ width: F,
208
+ height: q
216
209
  } = f;
217
- x = c._malloc(L), c.HEAPU8.set(M, x), O = c.readBarcodesFromPixmap(
218
- x,
219
- k,
220
- Z,
221
- Ke(T)
210
+ D = $._malloc(M), $.HEAPU8.set(O, D), x = $.readBarcodesFromPixmap(
211
+ D,
212
+ F,
213
+ q,
214
+ Re(T)
215
+ );
216
+ } else {
217
+ let O, M;
218
+ if ("buffer" in f)
219
+ [O, M] = [f.byteLength, f];
220
+ else if ("byteLength" in f)
221
+ [O, M] = [f.byteLength, new Uint8Array(f)];
222
+ else if ("size" in f)
223
+ [O, M] = [f.size, new Uint8Array(await f.arrayBuffer())];
224
+ else
225
+ throw new TypeError("Invalid input type");
226
+ D = $._malloc(O), $.HEAPU8.set(M, D), x = $.readBarcodesFromImage(
227
+ D,
228
+ O,
229
+ Re(T)
222
230
  );
223
231
  }
224
- c._free(x);
232
+ $._free(D);
225
233
  const j = [];
226
- for (let M = 0; M < O.size(); ++M)
234
+ for (let O = 0; O < x.size(); ++O)
227
235
  j.push(
228
- ui(O.get(M))
236
+ Za(x.get(O))
229
237
  );
230
238
  return j;
231
239
  }
232
240
  ({
233
- ...Bt,
234
- formats: [...Bt.formats]
241
+ ...It,
242
+ formats: [...It.formats]
235
243
  });
236
- var ae = (() => {
237
- var i, f = typeof document < "u" && ((i = document.currentScript) == null ? void 0 : i.tagName.toUpperCase()) === "SCRIPT" ? document.currentScript.src : void 0;
238
- return function(p = {}) {
239
- var T, c = p, O, x, j = new Promise((t, e) => {
240
- O = t, x = e;
241
- }), M = typeof window == "object", L = typeof Bun < "u", k = typeof WorkerGlobalScope < "u";
242
- typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
243
- var Z = Object.assign({}, c), tt = "./this.program", R = "";
244
- function yt(t) {
245
- return c.locateFile ? c.locateFile(t, R) : R + t;
246
- }
247
- var it, ot;
248
- if (M || k || L) {
249
- var st;
250
- k ? R = self.location.href : typeof document < "u" && ((st = document.currentScript) === null || st === void 0 ? void 0 : st.tagName.toUpperCase()) === "SCRIPT" && (R = document.currentScript.src), f && (R = f), R.startsWith("blob:") ? R = "" : R = R.substr(0, R.replace(/[?#].*/, "").lastIndexOf("/") + 1), k && (ot = (t) => {
251
- var e = new XMLHttpRequest();
252
- return e.open("GET", t, !1), e.responseType = "arraybuffer", e.send(null), new Uint8Array(e.response);
253
- }), it = async (t) => {
254
- var e = await fetch(t, {
255
- credentials: "same-origin"
256
- });
257
- if (e.ok)
258
- return e.arrayBuffer();
259
- throw new Error(e.status + " : " + e.url);
260
- };
244
+ var Qt = async function(o = {}) {
245
+ var f, c = o, T, $, x = new Promise((e, t) => {
246
+ T = e, $ = t;
247
+ }), D = typeof window == "object", j = typeof Bun < "u", O = typeof WorkerGlobalScope < "u";
248
+ typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
249
+ var M = "./this.program", F = "";
250
+ function q(e) {
251
+ return c.locateFile ? c.locateFile(e, F) : F + e;
252
+ }
253
+ var rt, Y;
254
+ (D || O || j) && (O ? F = self.location.href : typeof document < "u" && document.currentScript && (F = document.currentScript.src), F.startsWith("blob:") ? F = "" : F = F.slice(0, F.replace(/[?#].*/, "").lastIndexOf("/") + 1), O && (Y = (e) => {
255
+ var t = new XMLHttpRequest();
256
+ return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
257
+ }), rt = async (e) => {
258
+ var t = await fetch(e, {
259
+ credentials: "same-origin"
260
+ });
261
+ if (t.ok)
262
+ return t.arrayBuffer();
263
+ throw new Error(t.status + " : " + t.url);
264
+ });
265
+ var st = console.log.bind(console), k = console.error.bind(console), Z, nt, Jt = !1, Q, B, ut, vt, at, P, Kt, te;
266
+ function ee() {
267
+ var e = nt.buffer;
268
+ Q = new Int8Array(e), ut = new Int16Array(e), c.HEAPU8 = B = new Uint8Array(e), vt = new Uint16Array(e), at = new Int32Array(e), P = new Uint32Array(e), Kt = new Float32Array(e), te = new Float64Array(e);
269
+ }
270
+ function qe() {
271
+ if (c.preRun)
272
+ for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length; )
273
+ sr(c.preRun.shift());
274
+ re(ae);
275
+ }
276
+ function Ye() {
277
+ E.ya();
278
+ }
279
+ function Ze() {
280
+ if (c.postRun)
281
+ for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length; )
282
+ ir(c.postRun.shift());
283
+ re(ne);
284
+ }
285
+ var J = 0, ct = null;
286
+ function Qe(e) {
287
+ var t;
288
+ J++, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, J);
289
+ }
290
+ function Je(e) {
291
+ var t;
292
+ if (J--, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, J), J == 0 && ct) {
293
+ var r = ct;
294
+ ct = null, r();
261
295
  }
262
- var dr = c.print || console.log.bind(console), et = c.printErr || console.error.bind(console);
263
- Object.assign(c, Z), Z = null, c.arguments && c.arguments, c.thisProgram && (tt = c.thisProgram);
264
- var vt = c.wasmBinary, mt, ie = !1, H, B, ut, gt, rt, _, oe, se;
265
- function ue() {
266
- var t = mt.buffer;
267
- c.HEAP8 = H = new Int8Array(t), c.HEAP16 = ut = new Int16Array(t), c.HEAPU8 = B = new Uint8Array(t), c.HEAPU16 = gt = new Uint16Array(t), c.HEAP32 = rt = new Int32Array(t), c.HEAPU32 = _ = new Uint32Array(t), c.HEAPF32 = oe = new Float32Array(t), c.HEAPF64 = se = new Float64Array(t);
268
- }
269
- var ce = [], le = [], fe = [];
270
- function hr() {
271
- if (c.preRun)
272
- for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length; )
273
- vr(c.preRun.shift());
274
- kt(ce);
275
- }
276
- function pr() {
277
- kt(le);
278
- }
279
- function yr() {
280
- if (c.postRun)
281
- for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length; )
282
- gr(c.postRun.shift());
283
- kt(fe);
284
- }
285
- function vr(t) {
286
- ce.unshift(t);
287
- }
288
- function mr(t) {
289
- le.unshift(t);
290
- }
291
- function gr(t) {
292
- fe.unshift(t);
293
- }
294
- var Y = 0, ct = null;
295
- function wr(t) {
296
- var e;
297
- Y++, (e = c.monitorRunDependencies) === null || e === void 0 || e.call(c, Y);
298
- }
299
- function $r(t) {
300
- var e;
301
- if (Y--, (e = c.monitorRunDependencies) === null || e === void 0 || e.call(c, Y), Y == 0 && ct) {
302
- var r = ct;
303
- ct = null, r();
296
+ }
297
+ function Ft(e) {
298
+ var t;
299
+ (t = c.onAbort) === null || t === void 0 || t.call(c, e), e = "Aborted(" + e + ")", k(e), Jt = !0, e += ". Build with -sASSERTIONS for more info.";
300
+ var r = new WebAssembly.RuntimeError(e);
301
+ throw $(r), r;
302
+ }
303
+ var yt;
304
+ function Ke() {
305
+ return c.locateFile ? q("zxing_reader.wasm") : new URL(
306
+ /* @vite-ignore */
307
+ "../../reader/zxing_reader.wasm",
308
+ import.meta.url
309
+ ).href;
310
+ }
311
+ function tr(e) {
312
+ if (e == yt && Z)
313
+ return new Uint8Array(Z);
314
+ if (Y)
315
+ return Y(e);
316
+ throw "both async and sync fetching of the wasm failed";
317
+ }
318
+ async function er(e) {
319
+ if (!Z)
320
+ try {
321
+ var t = await rt(e);
322
+ return new Uint8Array(t);
323
+ } catch {
304
324
  }
325
+ return tr(e);
326
+ }
327
+ async function rr(e, t) {
328
+ try {
329
+ var r = await er(e), n = await WebAssembly.instantiate(r, t);
330
+ return n;
331
+ } catch (a) {
332
+ k(`failed to asynchronously prepare wasm: ${a}`), Ft(a);
305
333
  }
306
- function Wt(t) {
307
- var e;
308
- (e = c.onAbort) === null || e === void 0 || e.call(c, t), t = "Aborted(" + t + ")", et(t), ie = !0, t += ". Build with -sASSERTIONS for more info.";
309
- var r = new WebAssembly.RuntimeError(t);
310
- throw x(r), r;
311
- }
312
- var br = "data:application/octet-stream;base64,", de = (t) => t.startsWith(br);
313
- function Cr() {
314
- var t = "zxing_reader.wasm";
315
- return de(t) ? t : yt(t);
316
- }
317
- var wt;
318
- function Tr(t) {
319
- if (t == wt && vt)
320
- return new Uint8Array(vt);
321
- if (ot)
322
- return ot(t);
323
- throw "both async and sync fetching of the wasm failed";
324
- }
325
- async function _r(t) {
326
- if (!vt)
327
- try {
328
- var e = await it(t);
329
- return new Uint8Array(e);
330
- } catch {
331
- }
332
- return Tr(t);
333
- }
334
- async function Pr(t, e) {
334
+ }
335
+ async function nr(e, t, r) {
336
+ if (!e && typeof WebAssembly.instantiateStreaming == "function")
335
337
  try {
336
- var r = await _r(t), n = await WebAssembly.instantiate(r, e);
337
- return n;
338
- } catch (a) {
339
- et(`failed to asynchronously prepare wasm: ${a}`), Wt(a);
338
+ var n = fetch(t, {
339
+ credentials: "same-origin"
340
+ }), a = await WebAssembly.instantiateStreaming(n, r);
341
+ return a;
342
+ } catch (i) {
343
+ k(`wasm streaming compile failed: ${i}`), k("falling back to ArrayBuffer instantiation");
340
344
  }
345
+ return rr(t, r);
346
+ }
347
+ function ar() {
348
+ return {
349
+ a: Hn
350
+ };
351
+ }
352
+ async function or() {
353
+ function e(i, u) {
354
+ return E = i.exports, nt = E.xa, ee(), pe = E.Ba, Je(), E;
355
+ }
356
+ Qe();
357
+ function t(i) {
358
+ return e(i.instance);
359
+ }
360
+ var r = ar();
361
+ if (c.instantiateWasm)
362
+ return new Promise((i, u) => {
363
+ c.instantiateWasm(r, (s, l) => {
364
+ i(e(s));
365
+ });
366
+ });
367
+ yt != null || (yt = Ke());
368
+ try {
369
+ var n = await nr(Z, yt, r), a = t(n);
370
+ return a;
371
+ } catch (i) {
372
+ return $(i), Promise.reject(i);
341
373
  }
342
- async function Er(t, e, r) {
343
- if (!t && typeof WebAssembly.instantiateStreaming == "function" && !de(e) && typeof fetch == "function")
344
- try {
345
- var n = fetch(e, {
346
- credentials: "same-origin"
347
- }), a = await WebAssembly.instantiateStreaming(n, r);
348
- return a;
349
- } catch (o) {
350
- et(`wasm streaming compile failed: ${o}`), et("falling back to ArrayBuffer instantiation");
351
- }
352
- return Pr(e, r);
374
+ }
375
+ var re = (e) => {
376
+ for (; e.length > 0; )
377
+ e.shift()(c);
378
+ }, ne = [], ir = (e) => ne.push(e), ae = [], sr = (e) => ae.push(e), y = (e) => Xn(e), m = () => qn(), mt = [], gt = 0, ur = (e) => {
379
+ var t = new Rt(e);
380
+ return t.get_caught() || (t.set_caught(!0), gt--), t.set_rethrown(!1), mt.push(t), Zn(e), zn(e);
381
+ }, H = 0, cr = () => {
382
+ v(0, 0);
383
+ var e = mt.pop();
384
+ Yn(e.excPtr), H = 0;
385
+ };
386
+ class Rt {
387
+ constructor(t) {
388
+ this.excPtr = t, this.ptr = t - 24;
353
389
  }
354
- function Or() {
355
- return {
356
- a: ha
357
- };
390
+ set_type(t) {
391
+ P[this.ptr + 4 >> 2] = t;
358
392
  }
359
- async function Ar() {
360
- var t;
361
- function e(o, u) {
362
- return E = o.exports, mt = E.xa, ue(), Ce = E.Ba, mr(E.ya), $r(), E;
363
- }
364
- wr();
365
- function r(o) {
366
- e(o.instance);
367
- }
368
- var n = Or();
369
- if (c.instantiateWasm)
370
- try {
371
- return c.instantiateWasm(n, e);
372
- } catch (o) {
373
- et(`Module.instantiateWasm callback failed with error: ${o}`), x(o);
374
- }
375
- (t = wt) !== null && t !== void 0 || (wt = Cr());
376
- try {
377
- var a = await Er(vt, wt, n);
378
- return r(a), a;
379
- } catch (o) {
380
- x(o);
381
- return;
382
- }
393
+ get_type() {
394
+ return P[this.ptr + 4 >> 2];
383
395
  }
384
- var kt = (t) => {
385
- for (; t.length > 0; )
386
- t.shift()(c);
387
- };
388
- c.noExitRuntime;
389
- var m = (t) => je(t), g = () => Re(), $t = [], bt = 0, Sr = (t) => {
390
- var e = new Ht(t);
391
- return e.get_caught() || (e.set_caught(!0), bt--), e.set_rethrown(!1), $t.push(e), Le(t), Fe(t);
392
- }, V = 0, xr = () => {
393
- v(0, 0);
394
- var t = $t.pop();
395
- Be(t.excPtr), V = 0;
396
- };
397
- class Ht {
398
- constructor(e) {
399
- this.excPtr = e, this.ptr = e - 24;
400
- }
401
- set_type(e) {
402
- _[this.ptr + 4 >> 2] = e;
403
- }
404
- get_type() {
405
- return _[this.ptr + 4 >> 2];
406
- }
407
- set_destructor(e) {
408
- _[this.ptr + 8 >> 2] = e;
409
- }
410
- get_destructor() {
411
- return _[this.ptr + 8 >> 2];
412
- }
413
- set_caught(e) {
414
- e = e ? 1 : 0, H[this.ptr + 12] = e;
415
- }
416
- get_caught() {
417
- return H[this.ptr + 12] != 0;
418
- }
419
- set_rethrown(e) {
420
- e = e ? 1 : 0, H[this.ptr + 13] = e;
421
- }
422
- get_rethrown() {
423
- return H[this.ptr + 13] != 0;
424
- }
425
- init(e, r) {
426
- this.set_adjusted_ptr(0), this.set_type(e), this.set_destructor(r);
427
- }
428
- set_adjusted_ptr(e) {
429
- _[this.ptr + 16 >> 2] = e;
430
- }
431
- get_adjusted_ptr() {
432
- return _[this.ptr + 16 >> 2];
433
- }
396
+ set_destructor(t) {
397
+ P[this.ptr + 8 >> 2] = t;
434
398
  }
435
- var Dr = (t) => {
436
- throw V || (V = t), V;
437
- }, Ct = (t) => Ie(t), Vt = (t) => {
438
- var e = V;
439
- if (!e)
440
- return Ct(0), 0;
441
- var r = new Ht(e);
442
- r.set_adjusted_ptr(e);
443
- var n = r.get_type();
444
- if (!n)
445
- return Ct(0), e;
446
- for (var a of t) {
447
- if (a === 0 || a === n)
448
- break;
449
- var o = r.ptr + 16;
450
- if (Ue(a, n, o))
451
- return Ct(a), e;
452
- }
453
- return Ct(n), e;
454
- }, Mr = () => Vt([]), Fr = (t) => Vt([t]), Ir = (t, e) => Vt([t, e]), jr = () => {
455
- var t = $t.pop();
456
- t || Wt("no exception to throw");
457
- var e = t.excPtr;
458
- throw t.get_rethrown() || ($t.push(t), t.set_rethrown(!0), t.set_caught(!1), bt++), V = e, V;
459
- }, Rr = (t, e, r) => {
460
- var n = new Ht(t);
461
- throw n.init(e, r), V = t, bt++, V;
462
- }, Br = () => bt, Lr = () => Wt(""), Tt = {}, Nt = (t) => {
463
- for (; t.length; ) {
464
- var e = t.pop(), r = t.pop();
465
- r(e);
466
- }
467
- };
468
- function lt(t) {
469
- return this.fromWireType(_[t >> 2]);
470
- }
471
- var nt = {}, Q = {}, _t = {}, he, Pt = (t) => {
472
- throw new he(t);
473
- }, J = (t, e, r) => {
474
- t.forEach((s) => _t[s] = e);
475
- function n(s) {
476
- var l = r(s);
477
- l.length !== t.length && Pt("Mismatched type converter count");
478
- for (var d = 0; d < t.length; ++d)
479
- W(t[d], l[d]);
480
- }
481
- var a = new Array(e.length), o = [], u = 0;
482
- e.forEach((s, l) => {
483
- Q.hasOwnProperty(s) ? a[l] = Q[s] : (o.push(s), nt.hasOwnProperty(s) || (nt[s] = []), nt[s].push(() => {
484
- a[l] = Q[s], ++u, u === o.length && n(a);
485
- }));
486
- }), o.length === 0 && n(a);
487
- }, Ur = (t) => {
488
- var e = Tt[t];
489
- delete Tt[t];
490
- var r = e.rawConstructor, n = e.rawDestructor, a = e.fields, o = a.map((u) => u.getterReturnType).concat(a.map((u) => u.setterArgumentType));
491
- J([t], o, (u) => {
492
- var s = {};
493
- return a.forEach((l, d) => {
494
- var h = l.fieldName, y = u[d], $ = l.getter, C = l.getterContext, P = u[d + a.length], D = l.setter, A = l.setterContext;
495
- s[h] = {
496
- read: (S) => y.fromWireType($(C, S)),
497
- write: (S, K) => {
498
- var I = [];
499
- D(A, S, P.toWireType(I, K)), Nt(I);
500
- }
501
- };
502
- }), [{
503
- name: e.name,
504
- fromWireType: (l) => {
505
- var d = {};
506
- for (var h in s)
507
- d[h] = s[h].read(l);
508
- return n(l), d;
509
- },
510
- toWireType: (l, d) => {
511
- for (var h in s)
512
- if (!(h in d))
513
- throw new TypeError(`Missing field: "${h}"`);
514
- var y = r();
515
- for (h in s)
516
- s[h].write(y, d[h]);
517
- return l !== null && l.push(n, y), y;
518
- },
519
- argPackAdvance: N,
520
- readValueFromPointer: lt,
521
- destructorFunction: n
522
- }];
523
- });
524
- }, Wr = (t, e, r, n, a) => {
525
- }, kr = () => {
526
- for (var t = new Array(256), e = 0; e < 256; ++e)
527
- t[e] = String.fromCharCode(e);
528
- pe = t;
529
- }, pe, F = (t) => {
530
- for (var e = "", r = t; B[r]; )
531
- e += pe[B[r++]];
532
- return e;
533
- }, at, b = (t) => {
534
- throw new at(t);
535
- };
536
- function Hr(t, e) {
537
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
538
- var n = e.name;
539
- if (t || b(`type "${n}" must have a positive integer typeid pointer`), Q.hasOwnProperty(t)) {
540
- if (r.ignoreDuplicateRegistrations)
541
- return;
542
- b(`Cannot register type '${n}' twice`);
543
- }
544
- if (Q[t] = e, delete _t[t], nt.hasOwnProperty(t)) {
545
- var a = nt[t];
546
- delete nt[t], a.forEach((o) => o());
547
- }
399
+ get_destructor() {
400
+ return P[this.ptr + 8 >> 2];
548
401
  }
549
- function W(t, e) {
550
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
551
- return Hr(t, e, r);
402
+ set_caught(t) {
403
+ t = t ? 1 : 0, Q[this.ptr + 12] = t;
552
404
  }
553
- var N = 8, Vr = (t, e, r, n) => {
554
- e = F(e), W(t, {
555
- name: e,
556
- fromWireType: function(a) {
557
- return !!a;
558
- },
559
- toWireType: function(a, o) {
560
- return o ? r : n;
561
- },
562
- argPackAdvance: N,
563
- readValueFromPointer: function(a) {
564
- return this.fromWireType(B[a]);
565
- },
566
- destructorFunction: null
567
- });
568
- }, Nr = (t) => ({
569
- count: t.count,
570
- deleteScheduled: t.deleteScheduled,
571
- preservePointerOnDelete: t.preservePointerOnDelete,
572
- ptr: t.ptr,
573
- ptrType: t.ptrType,
574
- smartPtr: t.smartPtr,
575
- smartPtrType: t.smartPtrType
576
- }), zt = (t) => {
577
- function e(r) {
578
- return r.$$.ptrType.registeredClass.name;
579
- }
580
- b(e(t) + " instance already deleted");
581
- }, Gt = !1, ye = (t) => {
582
- }, zr = (t) => {
583
- t.smartPtr ? t.smartPtrType.rawDestructor(t.smartPtr) : t.ptrType.registeredClass.rawDestructor(t.ptr);
584
- }, ve = (t) => {
585
- t.count.value -= 1;
586
- var e = t.count.value === 0;
587
- e && zr(t);
588
- }, me = (t, e, r) => {
589
- if (e === r)
590
- return t;
591
- if (r.baseClass === void 0)
592
- return null;
593
- var n = me(t, e, r.baseClass);
594
- return n === null ? null : r.downcast(n);
595
- }, ge = {}, Gr = {}, Xr = (t, e) => {
596
- for (e === void 0 && b("ptr should not be undefined"); t.baseClass; )
597
- e = t.upcast(e), t = t.baseClass;
598
- return e;
599
- }, qr = (t, e) => (e = Xr(t, e), Gr[e]), Et = (t, e) => {
600
- (!e.ptrType || !e.ptr) && Pt("makeClassHandle requires ptr and ptrType");
601
- var r = !!e.smartPtrType, n = !!e.smartPtr;
602
- return r !== n && Pt("Both smartPtrType and smartPtr must be specified"), e.count = {
603
- value: 1
604
- }, ft(Object.create(t, {
605
- $$: {
606
- value: e,
607
- writable: !0
608
- }
609
- }));
610
- };
611
- function Zr(t) {
612
- var e = this.getPointee(t);
613
- if (!e)
614
- return this.destructor(t), null;
615
- var r = qr(this.registeredClass, e);
616
- if (r !== void 0) {
617
- if (r.$$.count.value === 0)
618
- return r.$$.ptr = e, r.$$.smartPtr = t, r.clone();
619
- var n = r.clone();
620
- return this.destructor(t), n;
621
- }
622
- function a() {
623
- return this.isSmartPointer ? Et(this.registeredClass.instancePrototype, {
624
- ptrType: this.pointeeType,
625
- ptr: e,
626
- smartPtrType: this,
627
- smartPtr: t
628
- }) : Et(this.registeredClass.instancePrototype, {
629
- ptrType: this,
630
- ptr: t
631
- });
632
- }
633
- var o = this.registeredClass.getActualType(e), u = ge[o];
634
- if (!u)
635
- return a.call(this);
636
- var s;
637
- this.isConst ? s = u.constPointerType : s = u.pointerType;
638
- var l = me(e, this.registeredClass, s.registeredClass);
639
- return l === null ? a.call(this) : this.isSmartPointer ? Et(s.registeredClass.instancePrototype, {
640
- ptrType: s,
641
- ptr: l,
642
- smartPtrType: this,
643
- smartPtr: t
644
- }) : Et(s.registeredClass.instancePrototype, {
645
- ptrType: s,
646
- ptr: l
647
- });
405
+ get_caught() {
406
+ return Q[this.ptr + 12] != 0;
648
407
  }
649
- var ft = (t) => typeof FinalizationRegistry > "u" ? (ft = (e) => e, t) : (Gt = new FinalizationRegistry((e) => {
650
- ve(e.$$);
651
- }), ft = (e) => {
652
- var r = e.$$, n = !!r.smartPtr;
653
- if (n) {
654
- var a = {
655
- $$: r
656
- };
657
- Gt.register(e, a, e);
658
- }
659
- return e;
660
- }, ye = (e) => Gt.unregister(e), ft(t)), Yr = () => {
661
- Object.assign(Ot.prototype, {
662
- isAliasOf(t) {
663
- if (!(this instanceof Ot) || !(t instanceof Ot))
664
- return !1;
665
- var e = this.$$.ptrType.registeredClass, r = this.$$.ptr;
666
- t.$$ = t.$$;
667
- for (var n = t.$$.ptrType.registeredClass, a = t.$$.ptr; e.baseClass; )
668
- r = e.upcast(r), e = e.baseClass;
669
- for (; n.baseClass; )
670
- a = n.upcast(a), n = n.baseClass;
671
- return e === n && r === a;
672
- },
673
- clone() {
674
- if (this.$$.ptr || zt(this), this.$$.preservePointerOnDelete)
675
- return this.$$.count.value += 1, this;
676
- var t = ft(Object.create(Object.getPrototypeOf(this), {
677
- $$: {
678
- value: Nr(this.$$)
679
- }
680
- }));
681
- return t.$$.count.value += 1, t.$$.deleteScheduled = !1, t;
682
- },
683
- delete() {
684
- this.$$.ptr || zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && b("Object already scheduled for deletion"), ye(this), ve(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
685
- },
686
- isDeleted() {
687
- return !this.$$.ptr;
688
- },
689
- deleteLater() {
690
- return this.$$.ptr || zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && b("Object already scheduled for deletion"), this.$$.deleteScheduled = !0, this;
691
- }
692
- });
693
- };
694
- function Ot() {
695
- }
696
- var At = (t, e) => Object.defineProperty(e, "name", {
697
- value: t
698
- }), we = (t, e, r) => {
699
- if (t[e].overloadTable === void 0) {
700
- var n = t[e];
701
- t[e] = function() {
702
- for (var a = arguments.length, o = new Array(a), u = 0; u < a; u++)
703
- o[u] = arguments[u];
704
- return t[e].overloadTable.hasOwnProperty(o.length) || b(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${t[e].overloadTable})!`), t[e].overloadTable[o.length].apply(this, o);
705
- }, t[e].overloadTable = [], t[e].overloadTable[n.argCount] = n;
706
- }
707
- }, $e = (t, e, r) => {
708
- c.hasOwnProperty(t) ? ((r === void 0 || c[t].overloadTable !== void 0 && c[t].overloadTable[r] !== void 0) && b(`Cannot register public name '${t}' twice`), we(c, t, t), c[t].overloadTable.hasOwnProperty(r) && b(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), c[t].overloadTable[r] = e) : (c[t] = e, c[t].argCount = r);
709
- }, Qr = 48, Jr = 57, Kr = (t) => {
710
- t = t.replace(/[^a-zA-Z0-9_]/g, "$");
711
- var e = t.charCodeAt(0);
712
- return e >= Qr && e <= Jr ? `_${t}` : t;
713
- };
714
- function tn(t, e, r, n, a, o, u, s) {
715
- this.name = t, this.constructor = e, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = o, this.upcast = u, this.downcast = s, this.pureVirtualFunctions = [];
408
+ set_rethrown(t) {
409
+ t = t ? 1 : 0, Q[this.ptr + 13] = t;
716
410
  }
717
- var Xt = (t, e, r) => {
718
- for (; e !== r; )
719
- e.upcast || b(`Expected null or instance of ${r.name}, got an instance of ${e.name}`), t = e.upcast(t), e = e.baseClass;
720
- return t;
721
- };
722
- function en(t, e) {
723
- if (e === null)
724
- return this.isReference && b(`null is not a valid ${this.name}`), 0;
725
- e.$$ || b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`);
726
- var r = e.$$.ptrType.registeredClass, n = Xt(e.$$.ptr, r, this.registeredClass);
727
- return n;
411
+ get_rethrown() {
412
+ return Q[this.ptr + 13] != 0;
728
413
  }
729
- function rn(t, e) {
730
- var r;
731
- if (e === null)
732
- return this.isReference && b(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), t !== null && t.push(this.rawDestructor, r), r) : 0;
733
- (!e || !e.$$) && b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && e.$$.ptrType.isConst && b(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
734
- var n = e.$$.ptrType.registeredClass;
735
- if (r = Xt(e.$$.ptr, n, this.registeredClass), this.isSmartPointer)
736
- switch (e.$$.smartPtr === void 0 && b("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
737
- case 0:
738
- e.$$.smartPtrType === this ? r = e.$$.smartPtr : b(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
739
- break;
740
- case 1:
741
- r = e.$$.smartPtr;
742
- break;
743
- case 2:
744
- if (e.$$.smartPtrType === this)
745
- r = e.$$.smartPtr;
746
- else {
747
- var a = e.clone();
748
- r = this.rawShare(r, G.toHandle(() => a.delete())), t !== null && t.push(this.rawDestructor, r);
749
- }
750
- break;
751
- default:
752
- b("Unsupporting sharing policy");
753
- }
754
- return r;
414
+ init(t, r) {
415
+ this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r);
755
416
  }
756
- function nn(t, e) {
757
- if (e === null)
758
- return this.isReference && b(`null is not a valid ${this.name}`), 0;
759
- e.$$ || b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`), e.$$.ptrType.isConst && b(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);
760
- var r = e.$$.ptrType.registeredClass, n = Xt(e.$$.ptr, r, this.registeredClass);
761
- return n;
417
+ set_adjusted_ptr(t) {
418
+ P[this.ptr + 16 >> 2] = t;
419
+ }
420
+ get_adjusted_ptr() {
421
+ return P[this.ptr + 16 >> 2];
422
+ }
423
+ }
424
+ var wt = (e) => Gn(e), jt = (e) => {
425
+ var t = H;
426
+ if (!t)
427
+ return wt(0), 0;
428
+ var r = new Rt(t);
429
+ r.set_adjusted_ptr(t);
430
+ var n = r.get_type();
431
+ if (!n)
432
+ return wt(0), t;
433
+ for (var a of e) {
434
+ if (a === 0 || a === n)
435
+ break;
436
+ var i = r.ptr + 16;
437
+ if (Qn(a, n, i))
438
+ return wt(a), t;
439
+ }
440
+ return wt(n), t;
441
+ }, lr = () => jt([]), fr = (e) => jt([e]), dr = (e, t) => jt([e, t]), hr = () => {
442
+ var e = mt.pop();
443
+ e || Ft("no exception to throw");
444
+ var t = e.excPtr;
445
+ throw e.get_rethrown() || (mt.push(e), e.set_rethrown(!0), e.set_caught(!1), gt++), H = t, H;
446
+ }, pr = (e, t, r) => {
447
+ var n = new Rt(e);
448
+ throw n.init(t, r), H = e, gt++, H;
449
+ }, vr = () => gt, yr = (e) => {
450
+ throw H || (H = e), H;
451
+ }, mr = () => Ft(""), $t = {}, Lt = (e) => {
452
+ for (; e.length; ) {
453
+ var t = e.pop(), r = e.pop();
454
+ r(t);
762
455
  }
763
- var an = () => {
764
- Object.assign(St.prototype, {
765
- getPointee(t) {
766
- return this.rawGetPointee && (t = this.rawGetPointee(t)), t;
456
+ };
457
+ function lt(e) {
458
+ return this.fromWireType(P[e >> 2]);
459
+ }
460
+ var ot = {}, K = {}, bt = {}, gr = c.InternalError = class extends Error {
461
+ constructor(e) {
462
+ super(e), this.name = "InternalError";
463
+ }
464
+ }, Ct = (e) => {
465
+ throw new gr(e);
466
+ }, tt = (e, t, r) => {
467
+ e.forEach((s) => bt[s] = t);
468
+ function n(s) {
469
+ var l = r(s);
470
+ l.length !== e.length && Ct("Mismatched type converter count");
471
+ for (var d = 0; d < e.length; ++d)
472
+ V(e[d], l[d]);
473
+ }
474
+ var a = new Array(t.length), i = [], u = 0;
475
+ t.forEach((s, l) => {
476
+ K.hasOwnProperty(s) ? a[l] = K[s] : (i.push(s), ot.hasOwnProperty(s) || (ot[s] = []), ot[s].push(() => {
477
+ a[l] = K[s], ++u, u === i.length && n(a);
478
+ }));
479
+ }), i.length === 0 && n(a);
480
+ }, wr = (e) => {
481
+ var t = $t[e];
482
+ delete $t[e];
483
+ var r = t.rawConstructor, n = t.rawDestructor, a = t.fields, i = a.map((u) => u.getterReturnType).concat(a.map((u) => u.setterArgumentType));
484
+ tt([e], i, (u) => {
485
+ var s = {};
486
+ return a.forEach((l, d) => {
487
+ var h = l.fieldName, p = u[d], w = u[d].optional, b = l.getter, _ = l.getterContext, S = u[d + a.length], A = l.setter, I = l.setterContext;
488
+ s[h] = {
489
+ read: (X) => p.fromWireType(b(_, X)),
490
+ write: (X, L) => {
491
+ var W = [];
492
+ A(I, X, S.toWireType(W, L)), Lt(W);
493
+ },
494
+ optional: w
495
+ };
496
+ }), [{
497
+ name: t.name,
498
+ fromWireType: (l) => {
499
+ var d = {};
500
+ for (var h in s)
501
+ d[h] = s[h].read(l);
502
+ return n(l), d;
767
503
  },
768
- destructor(t) {
769
- var e;
770
- (e = this.rawDestructor) === null || e === void 0 || e.call(this, t);
504
+ toWireType: (l, d) => {
505
+ for (var h in s)
506
+ if (!(h in d) && !s[h].optional)
507
+ throw new TypeError(`Missing field: "${h}"`);
508
+ var p = r();
509
+ for (h in s)
510
+ s[h].write(p, d[h]);
511
+ return l !== null && l.push(n, p), p;
771
512
  },
772
513
  argPackAdvance: N,
773
514
  readValueFromPointer: lt,
774
- fromWireType: Zr
775
- });
776
- };
777
- function St(t, e, r, n, a, o, u, s, l, d, h) {
778
- this.name = t, this.registeredClass = e, this.isReference = r, this.isConst = n, this.isSmartPointer = a, this.pointeeType = o, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = l, this.rawShare = d, this.rawDestructor = h, !a && e.baseClass === void 0 ? n ? (this.toWireType = en, this.destructorFunction = null) : (this.toWireType = nn, this.destructorFunction = null) : this.toWireType = rn;
779
- }
780
- var be = (t, e, r) => {
781
- c.hasOwnProperty(t) || Pt("Replacing nonexistent public symbol"), c[t].overloadTable !== void 0 && r !== void 0 ? c[t].overloadTable[r] = e : (c[t] = e, c[t].argCount = r);
782
- }, on = (t, e, r) => {
783
- t = t.replace(/p/g, "i");
784
- var n = c["dynCall_" + t];
785
- return n(e, ...r);
786
- }, xt = [], Ce, w = (t) => {
787
- var e = xt[t];
788
- return e || (t >= xt.length && (xt.length = t + 1), xt[t] = e = Ce.get(t)), e;
789
- }, sn = function(t, e) {
790
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
791
- if (t.includes("j"))
792
- return on(t, e, r);
793
- var n = w(e)(...r);
794
- return n;
795
- }, un = (t, e) => function() {
796
- for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
797
- n[a] = arguments[a];
798
- return sn(t, e, n);
799
- }, U = (t, e) => {
800
- t = F(t);
801
- function r() {
802
- return t.includes("j") ? un(t, e) : w(e);
803
- }
804
- var n = r();
805
- return typeof n != "function" && b(`unknown function pointer with signature ${t}: ${e}`), n;
806
- }, cn = (t, e) => {
807
- var r = At(e, function(n) {
808
- this.name = e, this.message = n;
809
- var a = new Error(n).stack;
810
- a !== void 0 && (this.stack = this.toString() + `
811
- ` + a.replace(/^Error(:[^\n]*)?\n/, ""));
812
- });
813
- return r.prototype = Object.create(t.prototype), r.prototype.constructor = r, r.prototype.toString = function() {
814
- return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
815
- }, r;
816
- }, Te, _e = (t) => {
817
- var e = Me(t), r = F(e);
818
- return X(e), r;
819
- }, Dt = (t, e) => {
820
- var r = [], n = {};
821
- function a(o) {
822
- if (!n[o] && !Q[o]) {
823
- if (_t[o]) {
824
- _t[o].forEach(a);
825
- return;
826
- }
827
- r.push(o), n[o] = !0;
828
- }
829
- }
830
- throw e.forEach(a), new Te(`${t}: ` + r.map(_e).join([", "]));
831
- }, ln = (t, e, r, n, a, o, u, s, l, d, h, y, $) => {
832
- h = F(h), o = U(a, o), s && (s = U(u, s)), d && (d = U(l, d)), $ = U(y, $);
833
- var C = Kr(h);
834
- $e(C, function() {
835
- Dt(`Cannot construct ${h} due to unbound types`, [n]);
836
- }), J([t, e, r], n ? [n] : [], (P) => {
837
- P = P[0];
838
- var D, A;
839
- n ? (D = P.registeredClass, A = D.instancePrototype) : A = Ot.prototype;
840
- var S = At(h, function() {
841
- if (Object.getPrototypeOf(this) !== K)
842
- throw new at("Use 'new' to construct " + h);
843
- if (I.constructor_body === void 0)
844
- throw new at(h + " has no accessible constructor");
845
- for (var ze = arguments.length, It = new Array(ze), jt = 0; jt < ze; jt++)
846
- It[jt] = arguments[jt];
847
- var Ge = I.constructor_body[It.length];
848
- if (Ge === void 0)
849
- throw new at(`Tried to invoke ctor of ${h} with invalid number of parameters (${It.length}) - expected (${Object.keys(I.constructor_body).toString()}) parameters instead!`);
850
- return Ge.apply(this, It);
851
- }), K = Object.create(A, {
852
- constructor: {
853
- value: S
854
- }
855
- });
856
- S.prototype = K;
857
- var I = new tn(h, S, K, $, D, o, s, d);
858
- if (I.baseClass) {
859
- var q, Ft;
860
- (Ft = (q = I.baseClass).__derivedClasses) !== null && Ft !== void 0 || (q.__derivedClasses = []), I.baseClass.__derivedClasses.push(I);
861
- }
862
- var qa = new St(h, I, !0, !1, !1), Ve = new St(h + "*", I, !1, !1, !1), Ne = new St(h + " const*", I, !1, !0, !1);
863
- return ge[t] = {
864
- pointerType: Ve,
865
- constPointerType: Ne
866
- }, be(C, S), [qa, Ve, Ne];
867
- });
868
- }, qt = (t, e) => {
869
- for (var r = [], n = 0; n < t; n++)
870
- r.push(_[e + n * 4 >> 2]);
871
- return r;
872
- };
873
- function fn(t) {
874
- for (var e = 1; e < t.length; ++e)
875
- if (t[e] !== null && t[e].destructorFunction === void 0)
876
- return !0;
877
- return !1;
515
+ destructorFunction: n
516
+ }];
517
+ });
518
+ }, $r = (e, t, r, n, a) => {
519
+ }, br = () => {
520
+ for (var e = new Array(256), t = 0; t < 256; ++t)
521
+ e[t] = String.fromCharCode(t);
522
+ oe = e;
523
+ }, oe, R = (e) => {
524
+ for (var t = "", r = e; B[r]; )
525
+ t += oe[B[r++]];
526
+ return t;
527
+ }, ft = c.BindingError = class extends Error {
528
+ constructor(e) {
529
+ super(e), this.name = "BindingError";
530
+ }
531
+ }, C = (e) => {
532
+ throw new ft(e);
533
+ };
534
+ function Cr(e, t) {
535
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
536
+ var n = t.name;
537
+ if (e || C(`type "${n}" must have a positive integer typeid pointer`), K.hasOwnProperty(e)) {
538
+ if (r.ignoreDuplicateRegistrations)
539
+ return;
540
+ C(`Cannot register type '${n}' twice`);
878
541
  }
879
- function Zt(t, e, r, n, a, o) {
880
- var u = e.length;
881
- u < 2 && b("argTypes array size mismatch! Must at least get return value and 'this' types!");
882
- var s = e[1] !== null && r !== null, l = fn(e), d = e[0].name !== "void", h = u - 2, y = new Array(h), $ = [], C = [], P = function() {
883
- C.length = 0;
884
- var D;
885
- $.length = s ? 2 : 1, $[0] = a, s && (D = e[1].toWireType(C, this), $[1] = D);
886
- for (var A = 0; A < h; ++A)
887
- y[A] = e[A + 2].toWireType(C, A < 0 || arguments.length <= A ? void 0 : arguments[A]), $.push(y[A]);
888
- var S = n(...$);
889
- function K(I) {
890
- if (l)
891
- Nt(C);
892
- else
893
- for (var q = s ? 1 : 2; q < e.length; q++) {
894
- var Ft = q === 1 ? D : y[q - 2];
895
- e[q].destructorFunction !== null && e[q].destructorFunction(Ft);
896
- }
897
- if (d)
898
- return e[0].fromWireType(I);
899
- }
900
- return K(S);
901
- };
902
- return At(t, P);
903
- }
904
- var dn = (t, e, r, n, a, o) => {
905
- var u = qt(e, r);
906
- a = U(n, a), J([], [t], (s) => {
907
- s = s[0];
908
- var l = `constructor ${s.name}`;
909
- if (s.registeredClass.constructor_body === void 0 && (s.registeredClass.constructor_body = []), s.registeredClass.constructor_body[e - 1] !== void 0)
910
- throw new at(`Cannot register multiple constructors with identical number of parameters (${e - 1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
911
- return s.registeredClass.constructor_body[e - 1] = () => {
912
- Dt(`Cannot construct ${s.name} due to unbound types`, u);
913
- }, J([], u, (d) => (d.splice(1, 0, null), s.registeredClass.constructor_body[e - 1] = Zt(l, d, null, a, o), [])), [];
914
- });
915
- }, Pe = (t) => {
916
- t = t.trim();
917
- const e = t.indexOf("(");
918
- return e !== -1 ? t.substr(0, e) : t;
919
- }, hn = (t, e, r, n, a, o, u, s, l, d) => {
920
- var h = qt(r, n);
921
- e = F(e), e = Pe(e), o = U(a, o), J([], [t], (y) => {
922
- y = y[0];
923
- var $ = `${y.name}.${e}`;
924
- e.startsWith("@@") && (e = Symbol[e.substring(2)]), s && y.registeredClass.pureVirtualFunctions.push(e);
925
- function C() {
926
- Dt(`Cannot call ${$} due to unbound types`, h);
927
- }
928
- var P = y.registeredClass.instancePrototype, D = P[e];
929
- return D === void 0 || D.overloadTable === void 0 && D.className !== y.name && D.argCount === r - 2 ? (C.argCount = r - 2, C.className = y.name, P[e] = C) : (we(P, e, $), P[e].overloadTable[r - 2] = C), J([], h, (A) => {
930
- var S = Zt($, A, y, o, u);
931
- return P[e].overloadTable === void 0 ? (S.argCount = r - 2, P[e] = S) : P[e].overloadTable[r - 2] = S, [];
932
- }), [];
933
- });
934
- }, Yt = [], z = [], Qt = (t) => {
935
- t > 9 && --z[t + 1] === 0 && (z[t] = void 0, Yt.push(t));
936
- }, pn = () => z.length / 2 - 5 - Yt.length, yn = () => {
937
- z.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = pn;
938
- }, G = {
939
- toValue: (t) => (t || b("Cannot use deleted val. handle = " + t), z[t]),
940
- toHandle: (t) => {
941
- switch (t) {
942
- case void 0:
943
- return 2;
944
- case null:
945
- return 4;
946
- case !0:
947
- return 6;
948
- case !1:
949
- return 8;
950
- default: {
951
- const e = Yt.pop() || z.length;
952
- return z[e] = t, z[e + 1] = 1, e;
953
- }
954
- }
955
- }
956
- }, Ee = {
957
- name: "emscripten::val",
958
- fromWireType: (t) => {
959
- var e = G.toValue(t);
960
- return Qt(t), e;
542
+ if (K[e] = t, delete bt[e], ot.hasOwnProperty(e)) {
543
+ var a = ot[e];
544
+ delete ot[e], a.forEach((i) => i());
545
+ }
546
+ }
547
+ function V(e, t) {
548
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
549
+ return Cr(e, t, r);
550
+ }
551
+ var N = 8, Tr = (e, t, r, n) => {
552
+ t = R(t), V(e, {
553
+ name: t,
554
+ fromWireType: function(a) {
555
+ return !!a;
556
+ },
557
+ toWireType: function(a, i) {
558
+ return i ? r : n;
961
559
  },
962
- toWireType: (t, e) => G.toHandle(e),
963
560
  argPackAdvance: N,
964
- readValueFromPointer: lt,
561
+ readValueFromPointer: function(a) {
562
+ return this.fromWireType(B[a]);
563
+ },
965
564
  destructorFunction: null
966
- }, vn = (t) => W(t, Ee), Jt = (t) => {
967
- if (t === null)
968
- return "null";
969
- var e = typeof t;
970
- return e === "object" || e === "array" || e === "function" ? t.toString() : "" + t;
971
- }, mn = (t, e) => {
972
- switch (e) {
973
- case 4:
974
- return function(r) {
975
- return this.fromWireType(oe[r >> 2]);
976
- };
977
- case 8:
978
- return function(r) {
979
- return this.fromWireType(se[r >> 3]);
980
- };
981
- default:
982
- throw new TypeError(`invalid float width (${e}): ${t}`);
565
+ });
566
+ }, Pr = (e) => ({
567
+ count: e.count,
568
+ deleteScheduled: e.deleteScheduled,
569
+ preservePointerOnDelete: e.preservePointerOnDelete,
570
+ ptr: e.ptr,
571
+ ptrType: e.ptrType,
572
+ smartPtr: e.smartPtr,
573
+ smartPtrType: e.smartPtrType
574
+ }), Bt = (e) => {
575
+ function t(r) {
576
+ return r.$$.ptrType.registeredClass.name;
577
+ }
578
+ C(t(e) + " instance already deleted");
579
+ }, Wt = !1, ie = (e) => {
580
+ }, Er = (e) => {
581
+ e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
582
+ }, se = (e) => {
583
+ e.count.value -= 1;
584
+ var t = e.count.value === 0;
585
+ t && Er(e);
586
+ }, dt = (e) => typeof FinalizationRegistry > "u" ? (dt = (t) => t, e) : (Wt = new FinalizationRegistry((t) => {
587
+ se(t.$$);
588
+ }), dt = (t) => {
589
+ var r = t.$$, n = !!r.smartPtr;
590
+ if (n) {
591
+ var a = {
592
+ $$: r
593
+ };
594
+ Wt.register(t, a, t);
595
+ }
596
+ return t;
597
+ }, ie = (t) => Wt.unregister(t), dt(e)), _r = () => {
598
+ let e = Tt.prototype;
599
+ Object.assign(e, {
600
+ isAliasOf(r) {
601
+ if (!(this instanceof Tt) || !(r instanceof Tt))
602
+ return !1;
603
+ var n = this.$$.ptrType.registeredClass, a = this.$$.ptr;
604
+ r.$$ = r.$$;
605
+ for (var i = r.$$.ptrType.registeredClass, u = r.$$.ptr; n.baseClass; )
606
+ a = n.upcast(a), n = n.baseClass;
607
+ for (; i.baseClass; )
608
+ u = i.upcast(u), i = i.baseClass;
609
+ return n === i && a === u;
610
+ },
611
+ clone() {
612
+ if (this.$$.ptr || Bt(this), this.$$.preservePointerOnDelete)
613
+ return this.$$.count.value += 1, this;
614
+ var r = dt(Object.create(Object.getPrototypeOf(this), {
615
+ $$: {
616
+ value: Pr(this.$$)
617
+ }
618
+ }));
619
+ return r.$$.count.value += 1, r.$$.deleteScheduled = !1, r;
620
+ },
621
+ delete() {
622
+ this.$$.ptr || Bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && C("Object already scheduled for deletion"), ie(this), se(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
623
+ },
624
+ isDeleted() {
625
+ return !this.$$.ptr;
626
+ },
627
+ deleteLater() {
628
+ return this.$$.ptr || Bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && C("Object already scheduled for deletion"), this.$$.deleteScheduled = !0, this;
983
629
  }
984
- }, gn = (t, e, r) => {
985
- e = F(e), W(t, {
986
- name: e,
987
- fromWireType: (n) => n,
988
- toWireType: (n, a) => a,
989
- argPackAdvance: N,
990
- readValueFromPointer: mn(e, r),
991
- destructorFunction: null
992
- });
993
- }, wn = (t, e, r, n, a, o, u, s) => {
994
- var l = qt(e, r);
995
- t = F(t), t = Pe(t), a = U(n, a), $e(t, function() {
996
- Dt(`Cannot call ${t} due to unbound types`, l);
997
- }, e - 1), J([], l, (d) => {
998
- var h = [d[0], null].concat(d.slice(1));
999
- return be(t, Zt(t, h, null, a, o), e - 1), [];
1000
- });
1001
- }, $n = (t, e, r) => {
1002
- switch (e) {
630
+ });
631
+ const t = Symbol.dispose;
632
+ t && (e[t] = e.delete);
633
+ };
634
+ function Tt() {
635
+ }
636
+ var Ut = (e, t) => Object.defineProperty(t, "name", {
637
+ value: e
638
+ }), ue = {}, ce = (e, t, r) => {
639
+ if (e[t].overloadTable === void 0) {
640
+ var n = e[t];
641
+ e[t] = function() {
642
+ for (var a = arguments.length, i = new Array(a), u = 0; u < a; u++)
643
+ i[u] = arguments[u];
644
+ return e[t].overloadTable.hasOwnProperty(i.length) || C(`Function '${r}' called with an invalid number of arguments (${i.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[i.length].apply(this, i);
645
+ }, e[t].overloadTable = [], e[t].overloadTable[n.argCount] = n;
646
+ }
647
+ }, le = (e, t, r) => {
648
+ c.hasOwnProperty(e) ? ((r === void 0 || c[e].overloadTable !== void 0 && c[e].overloadTable[r] !== void 0) && C(`Cannot register public name '${e}' twice`), ce(c, e, e), c[e].overloadTable.hasOwnProperty(r) && C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), c[e].overloadTable[r] = t) : (c[e] = t, c[e].argCount = r);
649
+ }, Or = 48, xr = 57, Ar = (e) => {
650
+ e = e.replace(/[^a-zA-Z0-9_]/g, "$");
651
+ var t = e.charCodeAt(0);
652
+ return t >= Or && t <= xr ? `_${e}` : e;
653
+ };
654
+ function Sr(e, t, r, n, a, i, u, s) {
655
+ this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = i, this.upcast = u, this.downcast = s, this.pureVirtualFunctions = [];
656
+ }
657
+ var Vt = (e, t, r) => {
658
+ for (; t !== r; )
659
+ t.upcast || C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
660
+ return e;
661
+ };
662
+ function Ir(e, t) {
663
+ if (t === null)
664
+ return this.isReference && C(`null is not a valid ${this.name}`), 0;
665
+ t.$$ || C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`);
666
+ var r = t.$$.ptrType.registeredClass, n = Vt(t.$$.ptr, r, this.registeredClass);
667
+ return n;
668
+ }
669
+ function Dr(e, t) {
670
+ var r;
671
+ if (t === null)
672
+ return this.isReference && C(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0;
673
+ (!t || !t.$$) && C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && C(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
674
+ var n = t.$$.ptrType.registeredClass;
675
+ if (r = Vt(t.$$.ptr, n, this.registeredClass), this.isSmartPointer)
676
+ switch (t.$$.smartPtr === void 0 && C("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
677
+ case 0:
678
+ t.$$.smartPtrType === this ? r = t.$$.smartPtr : C(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
679
+ break;
1003
680
  case 1:
1004
- return r ? (n) => H[n] : (n) => B[n];
681
+ r = t.$$.smartPtr;
682
+ break;
1005
683
  case 2:
1006
- return r ? (n) => ut[n >> 1] : (n) => gt[n >> 1];
1007
- case 4:
1008
- return r ? (n) => rt[n >> 2] : (n) => _[n >> 2];
684
+ if (t.$$.smartPtrType === this)
685
+ r = t.$$.smartPtr;
686
+ else {
687
+ var a = t.clone();
688
+ r = this.rawShare(r, G.toHandle(() => a.delete())), e !== null && e.push(this.rawDestructor, r);
689
+ }
690
+ break;
1009
691
  default:
1010
- throw new TypeError(`invalid integer width (${e}): ${t}`);
1011
- }
1012
- }, bn = (t, e, r, n, a) => {
1013
- e = F(e);
1014
- var o = (h) => h;
1015
- if (n === 0) {
1016
- var u = 32 - 8 * r;
1017
- o = (h) => h << u >>> u;
1018
- }
1019
- var s = e.includes("unsigned"), l = (h, y) => {
1020
- }, d;
1021
- s ? d = function(h, y) {
1022
- return l(y, this.name), y >>> 0;
1023
- } : d = function(h, y) {
1024
- return l(y, this.name), y;
1025
- }, W(t, {
1026
- name: e,
1027
- fromWireType: o,
1028
- toWireType: d,
1029
- argPackAdvance: N,
1030
- readValueFromPointer: $n(e, r, n !== 0),
1031
- destructorFunction: null
1032
- });
1033
- }, Cn = (t, e, r) => {
1034
- var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], a = n[e];
1035
- function o(u) {
1036
- var s = _[u >> 2], l = _[u + 4 >> 2];
1037
- return new a(H.buffer, l, s);
1038
- }
1039
- r = F(r), W(t, {
1040
- name: r,
1041
- fromWireType: o,
1042
- argPackAdvance: N,
1043
- readValueFromPointer: o
1044
- }, {
1045
- ignoreDuplicateRegistrations: !0
1046
- });
1047
- }, Tn = Object.assign({
1048
- optional: !0
1049
- }, Ee), _n = (t, e) => {
1050
- W(t, Tn);
1051
- }, Pn = (t, e, r, n) => {
1052
- if (!(n > 0)) return 0;
1053
- for (var a = r, o = r + n - 1, u = 0; u < t.length; ++u) {
1054
- var s = t.charCodeAt(u);
1055
- if (s >= 55296 && s <= 57343) {
1056
- var l = t.charCodeAt(++u);
1057
- s = 65536 + ((s & 1023) << 10) | l & 1023;
1058
- }
1059
- if (s <= 127) {
1060
- if (r >= o) break;
1061
- e[r++] = s;
1062
- } else if (s <= 2047) {
1063
- if (r + 1 >= o) break;
1064
- e[r++] = 192 | s >> 6, e[r++] = 128 | s & 63;
1065
- } else if (s <= 65535) {
1066
- if (r + 2 >= o) break;
1067
- e[r++] = 224 | s >> 12, e[r++] = 128 | s >> 6 & 63, e[r++] = 128 | s & 63;
1068
- } else {
1069
- if (r + 3 >= o) break;
1070
- e[r++] = 240 | s >> 18, e[r++] = 128 | s >> 12 & 63, e[r++] = 128 | s >> 6 & 63, e[r++] = 128 | s & 63;
1071
- }
1072
- }
1073
- return e[r] = 0, r - a;
1074
- }, dt = (t, e, r) => Pn(t, B, e, r), En = (t) => {
1075
- for (var e = 0, r = 0; r < t.length; ++r) {
1076
- var n = t.charCodeAt(r);
1077
- n <= 127 ? e++ : n <= 2047 ? e += 2 : n >= 55296 && n <= 57343 ? (e += 4, ++r) : e += 3;
692
+ C("Unsupporting sharing policy");
1078
693
  }
694
+ return r;
695
+ }
696
+ function Mr(e, t) {
697
+ if (t === null)
698
+ return this.isReference && C(`null is not a valid ${this.name}`), 0;
699
+ t.$$ || C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
700
+ var r = t.$$.ptrType.registeredClass, n = Vt(t.$$.ptr, r, this.registeredClass);
701
+ return n;
702
+ }
703
+ var fe = (e, t, r) => {
704
+ if (t === r)
1079
705
  return e;
1080
- }, Oe = typeof TextDecoder < "u" ? new TextDecoder() : void 0, Ae = function(t) {
1081
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : NaN;
1082
- for (var n = e + r, a = e; t[a] && !(a >= n); ) ++a;
1083
- if (a - e > 16 && t.buffer && Oe)
1084
- return Oe.decode(t.subarray(e, a));
1085
- for (var o = ""; e < a; ) {
1086
- var u = t[e++];
1087
- if (!(u & 128)) {
1088
- o += String.fromCharCode(u);
1089
- continue;
1090
- }
1091
- var s = t[e++] & 63;
1092
- if ((u & 224) == 192) {
1093
- o += String.fromCharCode((u & 31) << 6 | s);
1094
- continue;
1095
- }
1096
- var l = t[e++] & 63;
1097
- if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | l : u = (u & 7) << 18 | s << 12 | l << 6 | t[e++] & 63, u < 65536)
1098
- o += String.fromCharCode(u);
1099
- else {
1100
- var d = u - 65536;
1101
- o += String.fromCharCode(55296 | d >> 10, 56320 | d & 1023);
706
+ if (r.baseClass === void 0)
707
+ return null;
708
+ var n = fe(e, t, r.baseClass);
709
+ return n === null ? null : r.downcast(n);
710
+ }, Fr = {}, Rr = (e, t) => {
711
+ for (t === void 0 && C("ptr should not be undefined"); e.baseClass; )
712
+ t = e.upcast(t), e = e.baseClass;
713
+ return t;
714
+ }, jr = (e, t) => (t = Rr(e, t), Fr[t]), Pt = (e, t) => {
715
+ (!t.ptrType || !t.ptr) && Ct("makeClassHandle requires ptr and ptrType");
716
+ var r = !!t.smartPtrType, n = !!t.smartPtr;
717
+ return r !== n && Ct("Both smartPtrType and smartPtr must be specified"), t.count = {
718
+ value: 1
719
+ }, dt(Object.create(e, {
720
+ $$: {
721
+ value: t,
722
+ writable: !0
723
+ }
724
+ }));
725
+ };
726
+ function Lr(e) {
727
+ var t = this.getPointee(e);
728
+ if (!t)
729
+ return this.destructor(e), null;
730
+ var r = jr(this.registeredClass, t);
731
+ if (r !== void 0) {
732
+ if (r.$$.count.value === 0)
733
+ return r.$$.ptr = t, r.$$.smartPtr = e, r.clone();
734
+ var n = r.clone();
735
+ return this.destructor(e), n;
736
+ }
737
+ function a() {
738
+ return this.isSmartPointer ? Pt(this.registeredClass.instancePrototype, {
739
+ ptrType: this.pointeeType,
740
+ ptr: t,
741
+ smartPtrType: this,
742
+ smartPtr: e
743
+ }) : Pt(this.registeredClass.instancePrototype, {
744
+ ptrType: this,
745
+ ptr: e
746
+ });
747
+ }
748
+ var i = this.registeredClass.getActualType(t), u = ue[i];
749
+ if (!u)
750
+ return a.call(this);
751
+ var s;
752
+ this.isConst ? s = u.constPointerType : s = u.pointerType;
753
+ var l = fe(t, this.registeredClass, s.registeredClass);
754
+ return l === null ? a.call(this) : this.isSmartPointer ? Pt(s.registeredClass.instancePrototype, {
755
+ ptrType: s,
756
+ ptr: l,
757
+ smartPtrType: this,
758
+ smartPtr: e
759
+ }) : Pt(s.registeredClass.instancePrototype, {
760
+ ptrType: s,
761
+ ptr: l
762
+ });
763
+ }
764
+ var Br = () => {
765
+ Object.assign(Et.prototype, {
766
+ getPointee(e) {
767
+ return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
768
+ },
769
+ destructor(e) {
770
+ var t;
771
+ (t = this.rawDestructor) === null || t === void 0 || t.call(this, e);
772
+ },
773
+ argPackAdvance: N,
774
+ readValueFromPointer: lt,
775
+ fromWireType: Lr
776
+ });
777
+ };
778
+ function Et(e, t, r, n, a, i, u, s, l, d, h) {
779
+ this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = a, this.pointeeType = i, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = l, this.rawShare = d, this.rawDestructor = h, !a && t.baseClass === void 0 ? n ? (this.toWireType = Ir, this.destructorFunction = null) : (this.toWireType = Mr, this.destructorFunction = null) : this.toWireType = Dr;
780
+ }
781
+ var de = (e, t, r) => {
782
+ c.hasOwnProperty(e) || Ct("Replacing nonexistent public symbol"), c[e].overloadTable !== void 0 && r !== void 0 ? c[e].overloadTable[r] = t : (c[e] = t, c[e].argCount = r);
783
+ }, he = [], pe, g = (e) => {
784
+ var t = he[e];
785
+ return t || (he[e] = t = pe.get(e)), t;
786
+ }, Wr = function(e, t) {
787
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
788
+ if (e.includes("j"))
789
+ return dynCallLegacy(e, t, r);
790
+ var n = g(t), a = n(...r);
791
+ return a;
792
+ }, Ur = function(e, t) {
793
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
794
+ return function() {
795
+ for (var n = arguments.length, a = new Array(n), i = 0; i < n; i++)
796
+ a[i] = arguments[i];
797
+ return Wr(e, t, a, r);
798
+ };
799
+ }, U = function(e, t) {
800
+ e = R(e);
801
+ function r() {
802
+ if (e.includes("j"))
803
+ return Ur(e, t);
804
+ var a = g(t);
805
+ return a;
806
+ }
807
+ var n = r();
808
+ return typeof n != "function" && C(`unknown function pointer with signature ${e}: ${t}`), n;
809
+ };
810
+ class Vr extends Error {
811
+ }
812
+ var ve = (e) => {
813
+ var t = Nn(e), r = R(t);
814
+ return et(t), r;
815
+ }, _t = (e, t) => {
816
+ var r = [], n = {};
817
+ function a(i) {
818
+ if (!n[i] && !K[i]) {
819
+ if (bt[i]) {
820
+ bt[i].forEach(a);
821
+ return;
1102
822
  }
1103
- }
1104
- return o;
1105
- }, On = (t, e) => t ? Ae(B, t, e) : "", An = (t, e) => {
1106
- e = F(e), W(t, {
1107
- name: e,
1108
- fromWireType(r) {
1109
- for (var n = _[r >> 2], a = r + 4, o, s, u = a, s = 0; s <= n; ++s) {
1110
- var l = a + s;
1111
- if (s == n || B[l] == 0) {
1112
- var d = l - u, h = On(u, d);
1113
- o === void 0 ? o = h : (o += "\0", o += h), u = l + 1;
1114
- }
1115
- }
1116
- return X(r), o;
1117
- },
1118
- toWireType(r, n) {
1119
- n instanceof ArrayBuffer && (n = new Uint8Array(n));
1120
- var a, o = typeof n == "string";
1121
- o || n instanceof Uint8Array || n instanceof Uint8ClampedArray || n instanceof Int8Array || b("Cannot pass non-string to std::string"), o ? a = En(n) : a = n.length;
1122
- var u = ee(4 + a + 1), s = u + 4;
1123
- if (_[u >> 2] = a, o)
1124
- dt(n, s, a + 1);
1125
- else if (o)
1126
- for (var l = 0; l < a; ++l) {
1127
- var d = n.charCodeAt(l);
1128
- d > 255 && (X(s), b("String has UTF-16 code units that do not fit in 8 bits")), B[s + l] = d;
1129
- }
1130
- else
1131
- for (var l = 0; l < a; ++l)
1132
- B[s + l] = n[l];
1133
- return r !== null && r.push(X, u), u;
1134
- },
1135
- argPackAdvance: N,
1136
- readValueFromPointer: lt,
1137
- destructorFunction(r) {
1138
- X(r);
823
+ r.push(i), n[i] = !0;
824
+ }
825
+ }
826
+ throw t.forEach(a), new Vr(`${e}: ` + r.map(ve).join([", "]));
827
+ }, kr = (e, t, r, n, a, i, u, s, l, d, h, p, w) => {
828
+ h = R(h), i = U(a, i), s && (s = U(u, s)), d && (d = U(l, d)), w = U(p, w);
829
+ var b = Ar(h);
830
+ le(b, function() {
831
+ _t(`Cannot construct ${h} due to unbound types`, [n]);
832
+ }), tt([e, t, r], n ? [n] : [], (_) => {
833
+ _ = _[0];
834
+ var S, A;
835
+ n ? (S = _.registeredClass, A = S.instancePrototype) : A = Tt.prototype;
836
+ var I = Ut(h, function() {
837
+ if (Object.getPrototypeOf(this) !== X)
838
+ throw new ft(`Use 'new' to construct ${h}`);
839
+ if (L.constructor_body === void 0)
840
+ throw new ft(`${h} has no accessible constructor`);
841
+ for (var Oe = arguments.length, xt = new Array(Oe), At = 0; At < Oe; At++)
842
+ xt[At] = arguments[At];
843
+ var xe = L.constructor_body[xt.length];
844
+ if (xe === void 0)
845
+ throw new ft(`Tried to invoke ctor of ${h} with invalid number of parameters (${xt.length}) - expected (${Object.keys(L.constructor_body).toString()}) parameters instead!`);
846
+ return xe.apply(this, xt);
847
+ }), X = Object.create(A, {
848
+ constructor: {
849
+ value: I
1139
850
  }
1140
851
  });
1141
- }, Se = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Sn = (t, e) => {
1142
- for (var r = t, n = r >> 1, a = n + e / 2; !(n >= a) && gt[n]; ) ++n;
1143
- if (r = n << 1, r - t > 32 && Se) return Se.decode(B.subarray(t, r));
1144
- for (var o = "", u = 0; !(u >= e / 2); ++u) {
1145
- var s = ut[t + u * 2 >> 1];
1146
- if (s == 0) break;
1147
- o += String.fromCharCode(s);
1148
- }
1149
- return o;
1150
- }, xn = (t, e, r) => {
1151
- var n;
1152
- if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 2) return 0;
1153
- r -= 2;
1154
- for (var a = e, o = r < t.length * 2 ? r / 2 : t.length, u = 0; u < o; ++u) {
1155
- var s = t.charCodeAt(u);
1156
- ut[e >> 1] = s, e += 2;
1157
- }
1158
- return ut[e >> 1] = 0, e - a;
1159
- }, Dn = (t) => t.length * 2, Mn = (t, e) => {
1160
- for (var r = 0, n = ""; !(r >= e / 4); ) {
1161
- var a = rt[t + r * 4 >> 2];
1162
- if (a == 0) break;
1163
- if (++r, a >= 65536) {
1164
- var o = a - 65536;
1165
- n += String.fromCharCode(55296 | o >> 10, 56320 | o & 1023);
1166
- } else
1167
- n += String.fromCharCode(a);
852
+ I.prototype = X;
853
+ var L = new Sr(h, I, X, w, S, i, s, d);
854
+ if (L.baseClass) {
855
+ var W, Ot;
856
+ (Ot = (W = L.baseClass).__derivedClasses) !== null && Ot !== void 0 || (W.__derivedClasses = []), L.baseClass.__derivedClasses.push(L);
857
+ }
858
+ var ja = new Et(h, L, !0, !1, !1), Ee = new Et(h + "*", L, !1, !1, !1), _e = new Et(h + " const*", L, !1, !0, !1);
859
+ return ue[e] = {
860
+ pointerType: Ee,
861
+ constPointerType: _e
862
+ }, de(b, I), [ja, Ee, _e];
863
+ });
864
+ }, kt = (e, t) => {
865
+ for (var r = [], n = 0; n < e; n++)
866
+ r.push(P[t + n * 4 >> 2]);
867
+ return r;
868
+ };
869
+ function Hr(e) {
870
+ for (var t = 1; t < e.length; ++t)
871
+ if (e[t] !== null && e[t].destructorFunction === void 0)
872
+ return !0;
873
+ return !1;
874
+ }
875
+ function Ht(e, t, r, n, a, i) {
876
+ var u = t.length;
877
+ u < 2 && C("argTypes array size mismatch! Must at least get return value and 'this' types!");
878
+ var s = t[1] !== null && r !== null, l = Hr(t), d = t[0].name !== "void", h = u - 2, p = new Array(h), w = [], b = [], _ = function() {
879
+ b.length = 0;
880
+ var S;
881
+ w.length = s ? 2 : 1, w[0] = a, s && (S = t[1].toWireType(b, this), w[1] = S);
882
+ for (var A = 0; A < h; ++A)
883
+ p[A] = t[A + 2].toWireType(b, A < 0 || arguments.length <= A ? void 0 : arguments[A]), w.push(p[A]);
884
+ var I = n(...w);
885
+ function X(L) {
886
+ if (l)
887
+ Lt(b);
888
+ else
889
+ for (var W = s ? 1 : 2; W < t.length; W++) {
890
+ var Ot = W === 1 ? S : p[W - 2];
891
+ t[W].destructorFunction !== null && t[W].destructorFunction(Ot);
892
+ }
893
+ if (d)
894
+ return t[0].fromWireType(L);
1168
895
  }
1169
- return n;
1170
- }, Fn = (t, e, r) => {
1171
- var n;
1172
- if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 4) return 0;
1173
- for (var a = e, o = a + r - 4, u = 0; u < t.length; ++u) {
1174
- var s = t.charCodeAt(u);
1175
- if (s >= 55296 && s <= 57343) {
1176
- var l = t.charCodeAt(++u);
1177
- s = 65536 + ((s & 1023) << 10) | l & 1023;
896
+ return X(I);
897
+ };
898
+ return Ut(e, _);
899
+ }
900
+ var Nr = (e, t, r, n, a, i) => {
901
+ var u = kt(t, r);
902
+ a = U(n, a), tt([], [e], (s) => {
903
+ s = s[0];
904
+ var l = `constructor ${s.name}`;
905
+ if (s.registeredClass.constructor_body === void 0 && (s.registeredClass.constructor_body = []), s.registeredClass.constructor_body[t - 1] !== void 0)
906
+ throw new ft(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
907
+ return s.registeredClass.constructor_body[t - 1] = () => {
908
+ _t(`Cannot construct ${s.name} due to unbound types`, u);
909
+ }, tt([], u, (d) => (d.splice(1, 0, null), s.registeredClass.constructor_body[t - 1] = Ht(l, d, null, a, i), [])), [];
910
+ });
911
+ }, ye = (e) => {
912
+ e = e.trim();
913
+ const t = e.indexOf("(");
914
+ return t === -1 ? e : e.slice(0, t);
915
+ }, zr = (e, t, r, n, a, i, u, s, l, d) => {
916
+ var h = kt(r, n);
917
+ t = R(t), t = ye(t), i = U(a, i), tt([], [e], (p) => {
918
+ p = p[0];
919
+ var w = `${p.name}.${t}`;
920
+ t.startsWith("@@") && (t = Symbol[t.substring(2)]), s && p.registeredClass.pureVirtualFunctions.push(t);
921
+ function b() {
922
+ _t(`Cannot call ${w} due to unbound types`, h);
923
+ }
924
+ var _ = p.registeredClass.instancePrototype, S = _[t];
925
+ return S === void 0 || S.overloadTable === void 0 && S.className !== p.name && S.argCount === r - 2 ? (b.argCount = r - 2, b.className = p.name, _[t] = b) : (ce(_, t, w), _[t].overloadTable[r - 2] = b), tt([], h, (A) => {
926
+ var I = Ht(w, A, p, i, u);
927
+ return _[t].overloadTable === void 0 ? (I.argCount = r - 2, _[t] = I) : _[t].overloadTable[r - 2] = I, [];
928
+ }), [];
929
+ });
930
+ }, Nt = [], z = [], zt = (e) => {
931
+ e > 9 && --z[e + 1] === 0 && (z[e] = void 0, Nt.push(e));
932
+ }, Gr = () => z.length / 2 - 5 - Nt.length, Xr = () => {
933
+ z.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = Gr;
934
+ }, G = {
935
+ toValue: (e) => (e || C(`Cannot use deleted val. handle = ${e}`), z[e]),
936
+ toHandle: (e) => {
937
+ switch (e) {
938
+ case void 0:
939
+ return 2;
940
+ case null:
941
+ return 4;
942
+ case !0:
943
+ return 6;
944
+ case !1:
945
+ return 8;
946
+ default: {
947
+ const t = Nt.pop() || z.length;
948
+ return z[t] = e, z[t + 1] = 1, t;
1178
949
  }
1179
- if (rt[e >> 2] = s, e += 4, e + 4 > o) break;
1180
950
  }
1181
- return rt[e >> 2] = 0, e - a;
1182
- }, In = (t) => {
1183
- for (var e = 0, r = 0; r < t.length; ++r) {
1184
- var n = t.charCodeAt(r);
1185
- n >= 55296 && n <= 57343 && ++r, e += 4;
951
+ }
952
+ }, me = {
953
+ name: "emscripten::val",
954
+ fromWireType: (e) => {
955
+ var t = G.toValue(e);
956
+ return zt(e), t;
957
+ },
958
+ toWireType: (e, t) => G.toHandle(t),
959
+ argPackAdvance: N,
960
+ readValueFromPointer: lt,
961
+ destructorFunction: null
962
+ }, qr = (e) => V(e, me), Yr = (e, t) => {
963
+ switch (t) {
964
+ case 4:
965
+ return function(r) {
966
+ return this.fromWireType(Kt[r >> 2]);
967
+ };
968
+ case 8:
969
+ return function(r) {
970
+ return this.fromWireType(te[r >> 3]);
971
+ };
972
+ default:
973
+ throw new TypeError(`invalid float width (${t}): ${e}`);
974
+ }
975
+ }, Zr = (e, t, r) => {
976
+ t = R(t), V(e, {
977
+ name: t,
978
+ fromWireType: (n) => n,
979
+ toWireType: (n, a) => a,
980
+ argPackAdvance: N,
981
+ readValueFromPointer: Yr(t, r),
982
+ destructorFunction: null
983
+ });
984
+ }, Qr = (e, t, r, n, a, i, u, s) => {
985
+ var l = kt(t, r);
986
+ e = R(e), e = ye(e), a = U(n, a), le(e, function() {
987
+ _t(`Cannot call ${e} due to unbound types`, l);
988
+ }, t - 1), tt([], l, (d) => {
989
+ var h = [d[0], null].concat(d.slice(1));
990
+ return de(e, Ht(e, h, null, a, i), t - 1), [];
991
+ });
992
+ }, Jr = (e, t, r) => {
993
+ switch (t) {
994
+ case 1:
995
+ return r ? (n) => Q[n] : (n) => B[n];
996
+ case 2:
997
+ return r ? (n) => ut[n >> 1] : (n) => vt[n >> 1];
998
+ case 4:
999
+ return r ? (n) => at[n >> 2] : (n) => P[n >> 2];
1000
+ default:
1001
+ throw new TypeError(`invalid integer width (${t}): ${e}`);
1002
+ }
1003
+ }, Kr = (e, t, r, n, a) => {
1004
+ t = R(t);
1005
+ var i = (h) => h;
1006
+ if (n === 0) {
1007
+ var u = 32 - 8 * r;
1008
+ i = (h) => h << u >>> u;
1009
+ }
1010
+ var s = t.includes("unsigned"), l = (h, p) => {
1011
+ }, d;
1012
+ s ? d = function(h, p) {
1013
+ return l(p, this.name), p >>> 0;
1014
+ } : d = function(h, p) {
1015
+ return l(p, this.name), p;
1016
+ }, V(e, {
1017
+ name: t,
1018
+ fromWireType: i,
1019
+ toWireType: d,
1020
+ argPackAdvance: N,
1021
+ readValueFromPointer: Jr(t, r, n !== 0),
1022
+ destructorFunction: null
1023
+ });
1024
+ }, tn = (e, t, r) => {
1025
+ var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], a = n[t];
1026
+ function i(u) {
1027
+ var s = P[u >> 2], l = P[u + 4 >> 2];
1028
+ return new a(Q.buffer, l, s);
1029
+ }
1030
+ r = R(r), V(e, {
1031
+ name: r,
1032
+ fromWireType: i,
1033
+ argPackAdvance: N,
1034
+ readValueFromPointer: i
1035
+ }, {
1036
+ ignoreDuplicateRegistrations: !0
1037
+ });
1038
+ }, en = Object.assign({
1039
+ optional: !0
1040
+ }, me), rn = (e, t) => {
1041
+ V(e, en);
1042
+ }, nn = (e, t, r, n) => {
1043
+ if (!(n > 0)) return 0;
1044
+ for (var a = r, i = r + n - 1, u = 0; u < e.length; ++u) {
1045
+ var s = e.charCodeAt(u);
1046
+ if (s >= 55296 && s <= 57343) {
1047
+ var l = e.charCodeAt(++u);
1048
+ s = 65536 + ((s & 1023) << 10) | l & 1023;
1049
+ }
1050
+ if (s <= 127) {
1051
+ if (r >= i) break;
1052
+ t[r++] = s;
1053
+ } else if (s <= 2047) {
1054
+ if (r + 1 >= i) break;
1055
+ t[r++] = 192 | s >> 6, t[r++] = 128 | s & 63;
1056
+ } else if (s <= 65535) {
1057
+ if (r + 2 >= i) break;
1058
+ t[r++] = 224 | s >> 12, t[r++] = 128 | s >> 6 & 63, t[r++] = 128 | s & 63;
1059
+ } else {
1060
+ if (r + 3 >= i) break;
1061
+ t[r++] = 240 | s >> 18, t[r++] = 128 | s >> 12 & 63, t[r++] = 128 | s >> 6 & 63, t[r++] = 128 | s & 63;
1062
+ }
1063
+ }
1064
+ return t[r] = 0, r - a;
1065
+ }, it = (e, t, r) => nn(e, B, t, r), ge = (e) => {
1066
+ for (var t = 0, r = 0; r < e.length; ++r) {
1067
+ var n = e.charCodeAt(r);
1068
+ n <= 127 ? t++ : n <= 2047 ? t += 2 : n >= 55296 && n <= 57343 ? (t += 4, ++r) : t += 3;
1069
+ }
1070
+ return t;
1071
+ }, we = typeof TextDecoder < "u" ? new TextDecoder() : void 0, $e = function(e) {
1072
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : NaN;
1073
+ for (var n = t + r, a = t; e[a] && !(a >= n); ) ++a;
1074
+ if (a - t > 16 && e.buffer && we)
1075
+ return we.decode(e.subarray(t, a));
1076
+ for (var i = ""; t < a; ) {
1077
+ var u = e[t++];
1078
+ if (!(u & 128)) {
1079
+ i += String.fromCharCode(u);
1080
+ continue;
1081
+ }
1082
+ var s = e[t++] & 63;
1083
+ if ((u & 224) == 192) {
1084
+ i += String.fromCharCode((u & 31) << 6 | s);
1085
+ continue;
1086
+ }
1087
+ var l = e[t++] & 63;
1088
+ if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | l : u = (u & 7) << 18 | s << 12 | l << 6 | e[t++] & 63, u < 65536)
1089
+ i += String.fromCharCode(u);
1090
+ else {
1091
+ var d = u - 65536;
1092
+ i += String.fromCharCode(55296 | d >> 10, 56320 | d & 1023);
1186
1093
  }
1187
- return e;
1188
- }, jn = (t, e, r) => {
1189
- r = F(r);
1190
- var n, a, o, u;
1191
- e === 2 ? (n = Sn, a = xn, u = Dn, o = (s) => gt[s >> 1]) : e === 4 && (n = Mn, a = Fn, u = In, o = (s) => _[s >> 2]), W(t, {
1192
- name: r,
1193
- fromWireType: (s) => {
1194
- for (var l = _[s >> 2], d, h = s + 4, y = 0; y <= l; ++y) {
1195
- var $ = s + 4 + y * e;
1196
- if (y == l || o($) == 0) {
1197
- var C = $ - h, P = n(h, C);
1198
- d === void 0 ? d = P : (d += "\0", d += P), h = $ + e;
1199
- }
1094
+ }
1095
+ return i;
1096
+ }, an = (e, t) => e ? $e(B, e, t) : "", on = (e, t) => {
1097
+ t = R(t), V(e, {
1098
+ name: t,
1099
+ fromWireType(r) {
1100
+ for (var n = P[r >> 2], a = r + 4, i, s, u = a, s = 0; s <= n; ++s) {
1101
+ var l = a + s;
1102
+ if (s == n || B[l] == 0) {
1103
+ var d = l - u, h = an(u, d);
1104
+ i === void 0 ? i = h : (i += "\0", i += h), u = l + 1;
1200
1105
  }
1201
- return X(s), d;
1202
- },
1203
- toWireType: (s, l) => {
1204
- typeof l != "string" && b(`Cannot pass non-string to C++ string type ${r}`);
1205
- var d = u(l), h = ee(4 + d + e);
1206
- return _[h >> 2] = d / e, a(l, h + 4, d + e), s !== null && s.push(X, h), h;
1207
- },
1208
- argPackAdvance: N,
1209
- readValueFromPointer: lt,
1210
- destructorFunction(s) {
1211
- X(s);
1212
1106
  }
1213
- });
1214
- }, Rn = (t, e, r, n, a, o) => {
1215
- Tt[t] = {
1216
- name: F(e),
1217
- rawConstructor: U(r, n),
1218
- rawDestructor: U(a, o),
1219
- fields: []
1220
- };
1221
- }, Bn = (t, e, r, n, a, o, u, s, l, d) => {
1222
- Tt[t].fields.push({
1223
- fieldName: F(e),
1224
- getterReturnType: r,
1225
- getter: U(n, a),
1226
- getterContext: o,
1227
- setterArgumentType: u,
1228
- setter: U(s, l),
1229
- setterContext: d
1230
- });
1231
- }, Ln = (t, e) => {
1232
- e = F(e), W(t, {
1233
- isVoid: !0,
1234
- name: e,
1235
- argPackAdvance: 0,
1236
- fromWireType: () => {
1237
- },
1238
- toWireType: (r, n) => {
1239
- }
1240
- });
1241
- }, Un = (t, e, r) => B.copyWithin(t, e, e + r), Kt = [], Wn = (t, e, r, n) => (t = Kt[t], e = G.toValue(e), t(null, e, r, n)), kn = {}, Hn = (t) => {
1242
- var e = kn[t];
1243
- return e === void 0 ? F(t) : e;
1244
- }, xe = () => {
1245
- if (typeof globalThis == "object")
1246
- return globalThis;
1247
- function t(e) {
1248
- e.$$$embind_global$$$ = e;
1249
- var r = typeof $$$embind_global$$$ == "object" && e.$$$embind_global$$$ == e;
1250
- return r || delete e.$$$embind_global$$$, r;
1107
+ return et(r), i;
1108
+ },
1109
+ toWireType(r, n) {
1110
+ n instanceof ArrayBuffer && (n = new Uint8Array(n));
1111
+ var a, i = typeof n == "string";
1112
+ i || ArrayBuffer.isView(n) && n.BYTES_PER_ELEMENT == 1 || C("Cannot pass non-string to std::string"), i ? a = ge(n) : a = n.length;
1113
+ var u = Pe(4 + a + 1), s = u + 4;
1114
+ return P[u >> 2] = a, i ? it(n, s, a + 1) : B.set(n, s), r !== null && r.push(et, u), u;
1115
+ },
1116
+ argPackAdvance: N,
1117
+ readValueFromPointer: lt,
1118
+ destructorFunction(r) {
1119
+ et(r);
1251
1120
  }
1252
- if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && t(global) ? $$$embind_global$$$ = global : typeof self == "object" && t(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
1253
- return $$$embind_global$$$;
1254
- throw Error("unable to get global object.");
1255
- }, Vn = (t) => t === 0 ? G.toHandle(xe()) : (t = Hn(t), G.toHandle(xe()[t])), Nn = (t) => {
1256
- var e = Kt.length;
1257
- return Kt.push(t), e;
1258
- }, De = (t, e) => {
1259
- var r = Q[t];
1260
- return r === void 0 && b(`${e} has unknown type ${_e(t)}`), r;
1261
- }, zn = (t, e) => {
1262
- for (var r = new Array(t), n = 0; n < t; ++n)
1263
- r[n] = De(_[e + n * 4 >> 2], "parameter " + n);
1264
- return r;
1265
- }, Gn = Reflect.construct, Xn = (t, e, r) => {
1266
- var n = [], a = t.toWireType(n, r);
1267
- return n.length && (_[e >> 2] = G.toHandle(n)), a;
1268
- }, qn = (t, e, r) => {
1269
- var n = zn(t, e), a = n.shift();
1270
- t--;
1271
- var o = new Array(t), u = (l, d, h, y) => {
1272
- for (var $ = 0, C = 0; C < t; ++C)
1273
- o[C] = n[C].readValueFromPointer(y + $), $ += n[C].argPackAdvance;
1274
- var P = r === 1 ? Gn(d, o) : d.apply(l, o);
1275
- return Xn(a, h, P);
1276
- }, s = `methodCaller<(${n.map((l) => l.name).join(", ")}) => ${a.name}>`;
1277
- return Nn(At(s, u));
1278
- }, Zn = (t) => {
1279
- t > 9 && (z[t + 1] += 1);
1280
- }, Yn = (t) => {
1281
- var e = G.toValue(t);
1282
- Nt(e), Qt(t);
1283
- }, Qn = (t, e) => {
1284
- t = De(t, "_emval_take_value");
1285
- var r = t.readValueFromPointer(e);
1286
- return G.toHandle(r);
1287
- }, Jn = (t, e, r, n) => {
1288
- var a = (/* @__PURE__ */ new Date()).getFullYear(), o = new Date(a, 0, 1), u = new Date(a, 6, 1), s = o.getTimezoneOffset(), l = u.getTimezoneOffset(), d = Math.max(s, l);
1289
- _[t >> 2] = d * 60, rt[e >> 2] = +(s != l);
1290
- var h = (C) => {
1291
- var P = C >= 0 ? "-" : "+", D = Math.abs(C), A = String(Math.floor(D / 60)).padStart(2, "0"), S = String(D % 60).padStart(2, "0");
1292
- return `UTC${P}${A}${S}`;
1293
- }, y = h(s), $ = h(l);
1294
- l < s ? (dt(y, r, 17), dt($, n, 17)) : (dt(y, n, 17), dt($, r, 17));
1295
- }, Kn = () => 2147483648, ta = (t, e) => Math.ceil(t / e) * e, ea = (t) => {
1296
- var e = mt.buffer, r = (t - e.byteLength + 65535) / 65536 | 0;
1297
- try {
1298
- return mt.grow(r), ue(), 1;
1299
- } catch {
1121
+ });
1122
+ }, be = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, sn = (e, t) => {
1123
+ for (var r = e, n = r >> 1, a = n + t / 2; !(n >= a) && vt[n]; ) ++n;
1124
+ if (r = n << 1, r - e > 32 && be) return be.decode(B.subarray(e, r));
1125
+ for (var i = "", u = 0; !(u >= t / 2); ++u) {
1126
+ var s = ut[e + u * 2 >> 1];
1127
+ if (s == 0) break;
1128
+ i += String.fromCharCode(s);
1129
+ }
1130
+ return i;
1131
+ }, un = (e, t, r) => {
1132
+ if (r != null || (r = 2147483647), r < 2) return 0;
1133
+ r -= 2;
1134
+ for (var n = t, a = r < e.length * 2 ? r / 2 : e.length, i = 0; i < a; ++i) {
1135
+ var u = e.charCodeAt(i);
1136
+ ut[t >> 1] = u, t += 2;
1137
+ }
1138
+ return ut[t >> 1] = 0, t - n;
1139
+ }, cn = (e) => e.length * 2, ln = (e, t) => {
1140
+ for (var r = 0, n = ""; !(r >= t / 4); ) {
1141
+ var a = at[e + r * 4 >> 2];
1142
+ if (a == 0) break;
1143
+ if (++r, a >= 65536) {
1144
+ var i = a - 65536;
1145
+ n += String.fromCharCode(55296 | i >> 10, 56320 | i & 1023);
1146
+ } else
1147
+ n += String.fromCharCode(a);
1148
+ }
1149
+ return n;
1150
+ }, fn = (e, t, r) => {
1151
+ if (r != null || (r = 2147483647), r < 4) return 0;
1152
+ for (var n = t, a = n + r - 4, i = 0; i < e.length; ++i) {
1153
+ var u = e.charCodeAt(i);
1154
+ if (u >= 55296 && u <= 57343) {
1155
+ var s = e.charCodeAt(++i);
1156
+ u = 65536 + ((u & 1023) << 10) | s & 1023;
1157
+ }
1158
+ if (at[t >> 2] = u, t += 4, t + 4 > a) break;
1159
+ }
1160
+ return at[t >> 2] = 0, t - n;
1161
+ }, dn = (e) => {
1162
+ for (var t = 0, r = 0; r < e.length; ++r) {
1163
+ var n = e.charCodeAt(r);
1164
+ n >= 55296 && n <= 57343 && ++r, t += 4;
1165
+ }
1166
+ return t;
1167
+ }, hn = (e, t, r) => {
1168
+ r = R(r);
1169
+ var n, a, i, u;
1170
+ t === 2 ? (n = sn, a = un, u = cn, i = (s) => vt[s >> 1]) : t === 4 && (n = ln, a = fn, u = dn, i = (s) => P[s >> 2]), V(e, {
1171
+ name: r,
1172
+ fromWireType: (s) => {
1173
+ for (var l = P[s >> 2], d, h = s + 4, p = 0; p <= l; ++p) {
1174
+ var w = s + 4 + p * t;
1175
+ if (p == l || i(w) == 0) {
1176
+ var b = w - h, _ = n(h, b);
1177
+ d === void 0 ? d = _ : (d += "\0", d += _), h = w + t;
1178
+ }
1179
+ }
1180
+ return et(s), d;
1181
+ },
1182
+ toWireType: (s, l) => {
1183
+ typeof l != "string" && C(`Cannot pass non-string to C++ string type ${r}`);
1184
+ var d = u(l), h = Pe(4 + d + t);
1185
+ return P[h >> 2] = d / t, a(l, h + 4, d + t), s !== null && s.push(et, h), h;
1186
+ },
1187
+ argPackAdvance: N,
1188
+ readValueFromPointer: lt,
1189
+ destructorFunction(s) {
1190
+ et(s);
1300
1191
  }
1301
- }, ra = (t) => {
1302
- var e = B.length;
1303
- t >>>= 0;
1304
- var r = Kn();
1305
- if (t > r)
1306
- return !1;
1307
- for (var n = 1; n <= 4; n *= 2) {
1308
- var a = e * (1 + 0.2 / n);
1309
- a = Math.min(a, t + 100663296);
1310
- var o = Math.min(r, ta(Math.max(t, a), 65536)), u = ea(o);
1311
- if (u)
1312
- return !0;
1192
+ });
1193
+ }, pn = (e, t, r, n, a, i) => {
1194
+ $t[e] = {
1195
+ name: R(t),
1196
+ rawConstructor: U(r, n),
1197
+ rawDestructor: U(a, i),
1198
+ fields: []
1199
+ };
1200
+ }, vn = (e, t, r, n, a, i, u, s, l, d) => {
1201
+ $t[e].fields.push({
1202
+ fieldName: R(t),
1203
+ getterReturnType: r,
1204
+ getter: U(n, a),
1205
+ getterContext: i,
1206
+ setterArgumentType: u,
1207
+ setter: U(s, l),
1208
+ setterContext: d
1209
+ });
1210
+ }, yn = (e, t) => {
1211
+ t = R(t), V(e, {
1212
+ isVoid: !0,
1213
+ name: t,
1214
+ argPackAdvance: 0,
1215
+ fromWireType: () => {
1216
+ },
1217
+ toWireType: (r, n) => {
1313
1218
  }
1219
+ });
1220
+ }, Gt = [], mn = (e, t, r, n) => (e = Gt[e], t = G.toValue(t), e(null, t, r, n)), gn = {}, wn = (e) => {
1221
+ var t = gn[e];
1222
+ return t === void 0 ? R(e) : t;
1223
+ }, Ce = () => {
1224
+ if (typeof globalThis == "object")
1225
+ return globalThis;
1226
+ function e(t) {
1227
+ t.$$$embind_global$$$ = t;
1228
+ var r = typeof $$$embind_global$$$ == "object" && t.$$$embind_global$$$ == t;
1229
+ return r || delete t.$$$embind_global$$$, r;
1230
+ }
1231
+ if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && e(global) ? $$$embind_global$$$ = global : typeof self == "object" && e(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
1232
+ return $$$embind_global$$$;
1233
+ throw Error("unable to get global object.");
1234
+ }, $n = (e) => e === 0 ? G.toHandle(Ce()) : (e = wn(e), G.toHandle(Ce()[e])), bn = (e) => {
1235
+ var t = Gt.length;
1236
+ return Gt.push(e), t;
1237
+ }, Te = (e, t) => {
1238
+ var r = K[e];
1239
+ return r === void 0 && C(`${t} has unknown type ${ve(e)}`), r;
1240
+ }, Cn = (e, t) => {
1241
+ for (var r = new Array(e), n = 0; n < e; ++n)
1242
+ r[n] = Te(P[t + n * 4 >> 2], `parameter ${n}`);
1243
+ return r;
1244
+ }, Tn = (e, t, r) => {
1245
+ var n = [], a = e.toWireType(n, r);
1246
+ return n.length && (P[t >> 2] = G.toHandle(n)), a;
1247
+ }, Pn = Reflect.construct, En = (e, t, r) => {
1248
+ var n = Cn(e, t), a = n.shift();
1249
+ e--;
1250
+ var i = new Array(e), u = (l, d, h, p) => {
1251
+ for (var w = 0, b = 0; b < e; ++b)
1252
+ i[b] = n[b].readValueFromPointer(p + w), w += n[b].argPackAdvance;
1253
+ var _ = r === 1 ? Pn(d, i) : d.apply(l, i);
1254
+ return Tn(a, h, _);
1255
+ }, s = `methodCaller<(${n.map((l) => l.name).join(", ")}) => ${a.name}>`;
1256
+ return bn(Ut(s, u));
1257
+ }, _n = (e) => {
1258
+ e > 9 && (z[e + 1] += 1);
1259
+ }, On = (e) => {
1260
+ var t = G.toValue(e);
1261
+ Lt(t), zt(e);
1262
+ }, xn = (e, t) => {
1263
+ e = Te(e, "_emval_take_value");
1264
+ var r = e.readValueFromPointer(t);
1265
+ return G.toHandle(r);
1266
+ }, An = (e, t, r, n) => {
1267
+ var a = (/* @__PURE__ */ new Date()).getFullYear(), i = new Date(a, 0, 1), u = new Date(a, 6, 1), s = i.getTimezoneOffset(), l = u.getTimezoneOffset(), d = Math.max(s, l);
1268
+ P[e >> 2] = d * 60, at[t >> 2] = +(s != l);
1269
+ var h = (b) => {
1270
+ var _ = b >= 0 ? "-" : "+", S = Math.abs(b), A = String(Math.floor(S / 60)).padStart(2, "0"), I = String(S % 60).padStart(2, "0");
1271
+ return `UTC${_}${A}${I}`;
1272
+ }, p = h(s), w = h(l);
1273
+ l < s ? (it(p, r, 17), it(w, n, 17)) : (it(p, n, 17), it(w, r, 17));
1274
+ }, Sn = () => 2147483648, In = (e, t) => Math.ceil(e / t) * t, Dn = (e) => {
1275
+ var t = nt.buffer, r = (e - t.byteLength + 65535) / 65536 | 0;
1276
+ try {
1277
+ return nt.grow(r), ee(), 1;
1278
+ } catch {
1279
+ }
1280
+ }, Mn = (e) => {
1281
+ var t = B.length;
1282
+ e >>>= 0;
1283
+ var r = Sn();
1284
+ if (e > r)
1314
1285
  return !1;
1315
- }, te = {}, na = () => tt || "./this.program", ht = () => {
1316
- if (!ht.strings) {
1317
- var t = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", e = {
1318
- USER: "web_user",
1319
- LOGNAME: "web_user",
1320
- PATH: "/",
1321
- PWD: "/",
1322
- HOME: "/home/web_user",
1323
- LANG: t,
1324
- _: na()
1325
- };
1326
- for (var r in te)
1327
- te[r] === void 0 ? delete e[r] : e[r] = te[r];
1328
- var n = [];
1329
- for (var r in e)
1330
- n.push(`${r}=${e[r]}`);
1331
- ht.strings = n;
1332
- }
1333
- return ht.strings;
1334
- }, aa = (t, e) => {
1335
- for (var r = 0; r < t.length; ++r)
1336
- H[e++] = t.charCodeAt(r);
1337
- H[e] = 0;
1338
- }, ia = (t, e) => {
1339
- var r = 0;
1340
- return ht().forEach((n, a) => {
1341
- var o = e + r;
1342
- _[t + a * 4 >> 2] = o, aa(n, o), r += n.length + 1;
1343
- }), 0;
1344
- }, oa = (t, e) => {
1345
- var r = ht();
1346
- _[t >> 2] = r.length;
1347
- var n = 0;
1348
- return r.forEach((a) => n += a.length + 1), _[e >> 2] = n, 0;
1349
- }, sa = (t) => 52;
1350
- function ua(t, e, r, n, a) {
1351
- return 70;
1352
- }
1353
- var ca = [null, [], []], la = (t, e) => {
1354
- var r = ca[t];
1355
- e === 0 || e === 10 ? ((t === 1 ? dr : et)(Ae(r)), r.length = 0) : r.push(e);
1356
- }, fa = (t, e, r, n) => {
1357
- for (var a = 0, o = 0; o < r; o++) {
1358
- var u = _[e >> 2], s = _[e + 4 >> 2];
1359
- e += 8;
1360
- for (var l = 0; l < s; l++)
1361
- la(t, B[u + l]);
1362
- a += s;
1363
- }
1364
- return _[n >> 2] = a, 0;
1365
- }, da = (t) => t;
1366
- he = c.InternalError = class extends Error {
1367
- constructor(t) {
1368
- super(t), this.name = "InternalError";
1369
- }
1370
- }, kr(), at = c.BindingError = class extends Error {
1371
- constructor(t) {
1372
- super(t), this.name = "BindingError";
1373
- }
1374
- }, Yr(), an(), Te = c.UnboundTypeError = cn(Error, "UnboundTypeError"), yn();
1375
- var ha = {
1376
- s: Sr,
1377
- w: xr,
1378
- a: Mr,
1379
- j: Fr,
1380
- l: Ir,
1381
- M: jr,
1382
- p: Rr,
1383
- ca: Br,
1384
- d: Dr,
1385
- Z: Lr,
1386
- sa: Ur,
1387
- Y: Wr,
1388
- na: Vr,
1389
- qa: ln,
1390
- pa: dn,
1391
- D: hn,
1392
- la: vn,
1393
- Q: gn,
1394
- R: wn,
1395
- x: bn,
1396
- t: Cn,
1397
- ra: _n,
1398
- ma: An,
1399
- N: jn,
1400
- J: Rn,
1401
- ta: Bn,
1402
- oa: Ln,
1403
- fa: Un,
1404
- U: Wn,
1405
- ua: Qt,
1406
- wa: Vn,
1407
- _: qn,
1408
- S: Zn,
1409
- va: Yn,
1410
- ka: Qn,
1411
- $: Jn,
1412
- da: ra,
1413
- aa: ia,
1414
- ba: oa,
1415
- ea: sa,
1416
- W: ua,
1417
- P: fa,
1418
- H: Ia,
1419
- B: Ra,
1420
- T: wa,
1421
- O: Va,
1422
- q: xa,
1423
- b: ya,
1424
- C: Fa,
1425
- ha: La,
1426
- c: ma,
1427
- ga: Ua,
1428
- h: ga,
1429
- i: _a,
1430
- r: Pa,
1431
- L: Ma,
1432
- v: Oa,
1433
- G: ka,
1434
- I: Da,
1435
- z: Ba,
1436
- F: Na,
1437
- X: Ga,
1438
- V: Xa,
1439
- k: ba,
1440
- f: $a,
1441
- e: va,
1442
- g: pa,
1443
- K: Ha,
1444
- m: Ta,
1445
- ia: ja,
1446
- o: Ea,
1447
- u: Aa,
1448
- ja: Sa,
1449
- A: Wa,
1450
- n: Ca,
1451
- E: za,
1452
- y: da
1453
- }, E;
1454
- Ar();
1455
- var Me = (t) => (Me = E.za)(t), X = c._free = (t) => (X = c._free = E.Aa)(t), ee = c._malloc = (t) => (ee = c._malloc = E.Ca)(t), Fe = (t) => (Fe = E.Da)(t), v = (t, e) => (v = E.Ea)(t, e), Ie = (t) => (Ie = E.Fa)(t), je = (t) => (je = E.Ga)(t), Re = () => (Re = E.Ha)(), Be = (t) => (Be = E.Ia)(t), Le = (t) => (Le = E.Ja)(t), Ue = (t, e, r) => (Ue = E.Ka)(t, e, r);
1456
- c.dynCall_viijii = (t, e, r, n, a, o, u) => (c.dynCall_viijii = E.La)(t, e, r, n, a, o, u);
1457
- var We = c.dynCall_jiii = (t, e, r, n) => (We = c.dynCall_jiii = E.Ma)(t, e, r, n);
1458
- c.dynCall_jiji = (t, e, r, n, a) => (c.dynCall_jiji = E.Na)(t, e, r, n, a);
1459
- var ke = c.dynCall_jiiii = (t, e, r, n, a) => (ke = c.dynCall_jiiii = E.Oa)(t, e, r, n, a);
1460
- c.dynCall_iiiiij = (t, e, r, n, a, o, u) => (c.dynCall_iiiiij = E.Pa)(t, e, r, n, a, o, u), c.dynCall_iiiiijj = (t, e, r, n, a, o, u, s, l) => (c.dynCall_iiiiijj = E.Qa)(t, e, r, n, a, o, u, s, l), c.dynCall_iiiiiijj = (t, e, r, n, a, o, u, s, l, d) => (c.dynCall_iiiiiijj = E.Ra)(t, e, r, n, a, o, u, s, l, d);
1461
- function pa(t, e, r, n) {
1462
- var a = g();
1463
- try {
1464
- w(t)(e, r, n);
1465
- } catch (o) {
1466
- if (m(a), o !== o + 0) throw o;
1467
- v(1, 0);
1468
- }
1286
+ for (var n = 1; n <= 4; n *= 2) {
1287
+ var a = t * (1 + 0.2 / n);
1288
+ a = Math.min(a, e + 100663296);
1289
+ var i = Math.min(r, In(Math.max(e, a), 65536)), u = Dn(i);
1290
+ if (u)
1291
+ return !0;
1469
1292
  }
1470
- function ya(t, e) {
1471
- var r = g();
1472
- try {
1473
- return w(t)(e);
1474
- } catch (n) {
1475
- if (m(r), n !== n + 0) throw n;
1476
- v(1, 0);
1477
- }
1293
+ return !1;
1294
+ }, Xt = {}, Fn = () => M || "./this.program", ht = () => {
1295
+ if (!ht.strings) {
1296
+ var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = {
1297
+ USER: "web_user",
1298
+ LOGNAME: "web_user",
1299
+ PATH: "/",
1300
+ PWD: "/",
1301
+ HOME: "/home/web_user",
1302
+ LANG: e,
1303
+ _: Fn()
1304
+ };
1305
+ for (var r in Xt)
1306
+ Xt[r] === void 0 ? delete t[r] : t[r] = Xt[r];
1307
+ var n = [];
1308
+ for (var r in t)
1309
+ n.push(`${r}=${t[r]}`);
1310
+ ht.strings = n;
1311
+ }
1312
+ return ht.strings;
1313
+ }, Rn = (e, t) => {
1314
+ var r = 0, n = 0;
1315
+ for (var a of ht()) {
1316
+ var i = t + r;
1317
+ P[e + n >> 2] = i, r += it(a, i, 1 / 0) + 1, n += 4;
1318
+ }
1319
+ return 0;
1320
+ }, jn = (e, t) => {
1321
+ var r = ht();
1322
+ P[e >> 2] = r.length;
1323
+ var n = 0;
1324
+ for (var a of r)
1325
+ n += ge(a) + 1;
1326
+ return P[t >> 2] = n, 0;
1327
+ }, Ln = (e) => 52;
1328
+ function Bn(e, t, r, n, a) {
1329
+ return 70;
1330
+ }
1331
+ var Wn = [null, [], []], Un = (e, t) => {
1332
+ var r = Wn[e];
1333
+ t === 0 || t === 10 ? ((e === 1 ? st : k)($e(r)), r.length = 0) : r.push(t);
1334
+ }, Vn = (e, t, r, n) => {
1335
+ for (var a = 0, i = 0; i < r; i++) {
1336
+ var u = P[t >> 2], s = P[t + 4 >> 2];
1337
+ t += 8;
1338
+ for (var l = 0; l < s; l++)
1339
+ Un(e, B[u + l]);
1340
+ a += s;
1341
+ }
1342
+ return P[n >> 2] = a, 0;
1343
+ }, kn = (e) => e;
1344
+ br(), _r(), Br(), Xr(), c.noExitRuntime && c.noExitRuntime, c.print && (st = c.print), c.printErr && (k = c.printErr), c.wasmBinary && (Z = c.wasmBinary), c.arguments && c.arguments, c.thisProgram && (M = c.thisProgram);
1345
+ var Hn = {
1346
+ s: ur,
1347
+ w: cr,
1348
+ a: lr,
1349
+ j: fr,
1350
+ m: dr,
1351
+ N: hr,
1352
+ p: pr,
1353
+ da: vr,
1354
+ d: yr,
1355
+ _: mr,
1356
+ sa: wr,
1357
+ Z: $r,
1358
+ na: Tr,
1359
+ qa: kr,
1360
+ pa: Nr,
1361
+ F: zr,
1362
+ la: qr,
1363
+ R: Zr,
1364
+ S: Qr,
1365
+ y: Kr,
1366
+ t: tn,
1367
+ ra: rn,
1368
+ ma: on,
1369
+ O: hn,
1370
+ K: pn,
1371
+ ta: vn,
1372
+ oa: yn,
1373
+ V: mn,
1374
+ ua: zt,
1375
+ wa: $n,
1376
+ $: En,
1377
+ T: _n,
1378
+ va: On,
1379
+ ka: xn,
1380
+ aa: An,
1381
+ ea: Mn,
1382
+ ba: Rn,
1383
+ ca: jn,
1384
+ fa: Ln,
1385
+ X: Bn,
1386
+ Q: Vn,
1387
+ I: ba,
1388
+ C: Ta,
1389
+ U: oa,
1390
+ P: Sa,
1391
+ q: ma,
1392
+ b: ea,
1393
+ D: $a,
1394
+ ia: Ea,
1395
+ c: na,
1396
+ ha: _a,
1397
+ h: aa,
1398
+ i: la,
1399
+ r: da,
1400
+ M: wa,
1401
+ v: pa,
1402
+ E: ya,
1403
+ J: ga,
1404
+ A: Pa,
1405
+ H: Ia,
1406
+ W: Fa,
1407
+ k: sa,
1408
+ f: ia,
1409
+ e: ra,
1410
+ g: ta,
1411
+ L: Aa,
1412
+ l: ca,
1413
+ ja: Ca,
1414
+ o: ha,
1415
+ x: fa,
1416
+ u: va,
1417
+ ga: xa,
1418
+ B: Oa,
1419
+ n: ua,
1420
+ G: Da,
1421
+ Y: Ma,
1422
+ z: kn
1423
+ }, E = await or();
1424
+ E.ya;
1425
+ var Nn = E.za, et = c._free = E.Aa, Pe = c._malloc = E.Ca, zn = E.Da, v = E.Ea, Gn = E.Fa, Xn = E.Ga, qn = E.Ha, Yn = E.Ia, Zn = E.Ja, Qn = E.Ka;
1426
+ c.dynCall_viijii = E.La;
1427
+ var Jn = c.dynCall_vij = E.Ma;
1428
+ c.dynCall_jiji = E.Na;
1429
+ var Kn = c.dynCall_jiiii = E.Oa;
1430
+ c.dynCall_iiiiij = E.Pa, c.dynCall_iiiiijj = E.Qa, c.dynCall_iiiiiijj = E.Ra;
1431
+ function ta(e, t, r, n) {
1432
+ var a = m();
1433
+ try {
1434
+ g(e)(t, r, n);
1435
+ } catch (i) {
1436
+ if (y(a), i !== i + 0) throw i;
1437
+ v(1, 0);
1478
1438
  }
1479
- function va(t, e, r) {
1480
- var n = g();
1481
- try {
1482
- w(t)(e, r);
1483
- } catch (a) {
1484
- if (m(n), a !== a + 0) throw a;
1485
- v(1, 0);
1486
- }
1439
+ }
1440
+ function ea(e, t) {
1441
+ var r = m();
1442
+ try {
1443
+ return g(e)(t);
1444
+ } catch (n) {
1445
+ if (y(r), n !== n + 0) throw n;
1446
+ v(1, 0);
1487
1447
  }
1488
- function ma(t, e, r) {
1489
- var n = g();
1490
- try {
1491
- return w(t)(e, r);
1492
- } catch (a) {
1493
- if (m(n), a !== a + 0) throw a;
1494
- v(1, 0);
1495
- }
1448
+ }
1449
+ function ra(e, t, r) {
1450
+ var n = m();
1451
+ try {
1452
+ g(e)(t, r);
1453
+ } catch (a) {
1454
+ if (y(n), a !== a + 0) throw a;
1455
+ v(1, 0);
1496
1456
  }
1497
- function ga(t, e, r, n) {
1498
- var a = g();
1499
- try {
1500
- return w(t)(e, r, n);
1501
- } catch (o) {
1502
- if (m(a), o !== o + 0) throw o;
1503
- v(1, 0);
1504
- }
1457
+ }
1458
+ function na(e, t, r) {
1459
+ var n = m();
1460
+ try {
1461
+ return g(e)(t, r);
1462
+ } catch (a) {
1463
+ if (y(n), a !== a + 0) throw a;
1464
+ v(1, 0);
1505
1465
  }
1506
- function wa(t, e, r, n, a) {
1507
- var o = g();
1508
- try {
1509
- return w(t)(e, r, n, a);
1510
- } catch (u) {
1511
- if (m(o), u !== u + 0) throw u;
1512
- v(1, 0);
1513
- }
1466
+ }
1467
+ function aa(e, t, r, n) {
1468
+ var a = m();
1469
+ try {
1470
+ return g(e)(t, r, n);
1471
+ } catch (i) {
1472
+ if (y(a), i !== i + 0) throw i;
1473
+ v(1, 0);
1514
1474
  }
1515
- function $a(t, e) {
1516
- var r = g();
1517
- try {
1518
- w(t)(e);
1519
- } catch (n) {
1520
- if (m(r), n !== n + 0) throw n;
1521
- v(1, 0);
1522
- }
1475
+ }
1476
+ function oa(e, t, r, n, a) {
1477
+ var i = m();
1478
+ try {
1479
+ return g(e)(t, r, n, a);
1480
+ } catch (u) {
1481
+ if (y(i), u !== u + 0) throw u;
1482
+ v(1, 0);
1523
1483
  }
1524
- function ba(t) {
1525
- var e = g();
1526
- try {
1527
- w(t)();
1528
- } catch (r) {
1529
- if (m(e), r !== r + 0) throw r;
1530
- v(1, 0);
1531
- }
1484
+ }
1485
+ function ia(e, t) {
1486
+ var r = m();
1487
+ try {
1488
+ g(e)(t);
1489
+ } catch (n) {
1490
+ if (y(r), n !== n + 0) throw n;
1491
+ v(1, 0);
1532
1492
  }
1533
- function Ca(t, e, r, n, a, o, u, s, l, d, h) {
1534
- var y = g();
1535
- try {
1536
- w(t)(e, r, n, a, o, u, s, l, d, h);
1537
- } catch ($) {
1538
- if (m(y), $ !== $ + 0) throw $;
1539
- v(1, 0);
1540
- }
1493
+ }
1494
+ function sa(e) {
1495
+ var t = m();
1496
+ try {
1497
+ g(e)();
1498
+ } catch (r) {
1499
+ if (y(t), r !== r + 0) throw r;
1500
+ v(1, 0);
1541
1501
  }
1542
- function Ta(t, e, r, n, a) {
1543
- var o = g();
1544
- try {
1545
- w(t)(e, r, n, a);
1546
- } catch (u) {
1547
- if (m(o), u !== u + 0) throw u;
1548
- v(1, 0);
1549
- }
1502
+ }
1503
+ function ua(e, t, r, n, a, i, u, s, l, d, h) {
1504
+ var p = m();
1505
+ try {
1506
+ g(e)(t, r, n, a, i, u, s, l, d, h);
1507
+ } catch (w) {
1508
+ if (y(p), w !== w + 0) throw w;
1509
+ v(1, 0);
1550
1510
  }
1551
- function _a(t, e, r, n, a) {
1552
- var o = g();
1553
- try {
1554
- return w(t)(e, r, n, a);
1555
- } catch (u) {
1556
- if (m(o), u !== u + 0) throw u;
1557
- v(1, 0);
1558
- }
1511
+ }
1512
+ function ca(e, t, r, n, a) {
1513
+ var i = m();
1514
+ try {
1515
+ g(e)(t, r, n, a);
1516
+ } catch (u) {
1517
+ if (y(i), u !== u + 0) throw u;
1518
+ v(1, 0);
1559
1519
  }
1560
- function Pa(t, e, r, n, a, o) {
1561
- var u = g();
1562
- try {
1563
- return w(t)(e, r, n, a, o);
1564
- } catch (s) {
1565
- if (m(u), s !== s + 0) throw s;
1566
- v(1, 0);
1567
- }
1520
+ }
1521
+ function la(e, t, r, n, a) {
1522
+ var i = m();
1523
+ try {
1524
+ return g(e)(t, r, n, a);
1525
+ } catch (u) {
1526
+ if (y(i), u !== u + 0) throw u;
1527
+ v(1, 0);
1568
1528
  }
1569
- function Ea(t, e, r, n, a, o) {
1570
- var u = g();
1571
- try {
1572
- w(t)(e, r, n, a, o);
1573
- } catch (s) {
1574
- if (m(u), s !== s + 0) throw s;
1575
- v(1, 0);
1576
- }
1529
+ }
1530
+ function fa(e, t, r, n, a, i, u) {
1531
+ var s = m();
1532
+ try {
1533
+ g(e)(t, r, n, a, i, u);
1534
+ } catch (l) {
1535
+ if (y(s), l !== l + 0) throw l;
1536
+ v(1, 0);
1577
1537
  }
1578
- function Oa(t, e, r, n, a, o, u) {
1579
- var s = g();
1580
- try {
1581
- return w(t)(e, r, n, a, o, u);
1582
- } catch (l) {
1583
- if (m(s), l !== l + 0) throw l;
1584
- v(1, 0);
1585
- }
1538
+ }
1539
+ function da(e, t, r, n, a, i) {
1540
+ var u = m();
1541
+ try {
1542
+ return g(e)(t, r, n, a, i);
1543
+ } catch (s) {
1544
+ if (y(u), s !== s + 0) throw s;
1545
+ v(1, 0);
1586
1546
  }
1587
- function Aa(t, e, r, n, a, o, u, s) {
1588
- var l = g();
1589
- try {
1590
- w(t)(e, r, n, a, o, u, s);
1591
- } catch (d) {
1592
- if (m(l), d !== d + 0) throw d;
1593
- v(1, 0);
1594
- }
1547
+ }
1548
+ function ha(e, t, r, n, a, i) {
1549
+ var u = m();
1550
+ try {
1551
+ g(e)(t, r, n, a, i);
1552
+ } catch (s) {
1553
+ if (y(u), s !== s + 0) throw s;
1554
+ v(1, 0);
1595
1555
  }
1596
- function Sa(t, e, r, n, a, o, u, s, l) {
1597
- var d = g();
1598
- try {
1599
- w(t)(e, r, n, a, o, u, s, l);
1600
- } catch (h) {
1601
- if (m(d), h !== h + 0) throw h;
1602
- v(1, 0);
1603
- }
1556
+ }
1557
+ function pa(e, t, r, n, a, i, u) {
1558
+ var s = m();
1559
+ try {
1560
+ return g(e)(t, r, n, a, i, u);
1561
+ } catch (l) {
1562
+ if (y(s), l !== l + 0) throw l;
1563
+ v(1, 0);
1604
1564
  }
1605
- function xa(t) {
1606
- var e = g();
1607
- try {
1608
- return w(t)();
1609
- } catch (r) {
1610
- if (m(e), r !== r + 0) throw r;
1611
- v(1, 0);
1612
- }
1565
+ }
1566
+ function va(e, t, r, n, a, i, u, s) {
1567
+ var l = m();
1568
+ try {
1569
+ g(e)(t, r, n, a, i, u, s);
1570
+ } catch (d) {
1571
+ if (y(l), d !== d + 0) throw d;
1572
+ v(1, 0);
1613
1573
  }
1614
- function Da(t, e, r, n, a, o, u, s, l) {
1615
- var d = g();
1616
- try {
1617
- return w(t)(e, r, n, a, o, u, s, l);
1618
- } catch (h) {
1619
- if (m(d), h !== h + 0) throw h;
1620
- v(1, 0);
1621
- }
1574
+ }
1575
+ function ya(e, t, r, n, a, i, u, s) {
1576
+ var l = m();
1577
+ try {
1578
+ return g(e)(t, r, n, a, i, u, s);
1579
+ } catch (d) {
1580
+ if (y(l), d !== d + 0) throw d;
1581
+ v(1, 0);
1622
1582
  }
1623
- function Ma(t, e, r, n, a, o, u) {
1624
- var s = g();
1625
- try {
1626
- return w(t)(e, r, n, a, o, u);
1627
- } catch (l) {
1628
- if (m(s), l !== l + 0) throw l;
1629
- v(1, 0);
1630
- }
1583
+ }
1584
+ function ma(e) {
1585
+ var t = m();
1586
+ try {
1587
+ return g(e)();
1588
+ } catch (r) {
1589
+ if (y(t), r !== r + 0) throw r;
1590
+ v(1, 0);
1631
1591
  }
1632
- function Fa(t, e, r, n) {
1633
- var a = g();
1634
- try {
1635
- return w(t)(e, r, n);
1636
- } catch (o) {
1637
- if (m(a), o !== o + 0) throw o;
1638
- v(1, 0);
1639
- }
1592
+ }
1593
+ function ga(e, t, r, n, a, i, u, s, l) {
1594
+ var d = m();
1595
+ try {
1596
+ return g(e)(t, r, n, a, i, u, s, l);
1597
+ } catch (h) {
1598
+ if (y(d), h !== h + 0) throw h;
1599
+ v(1, 0);
1640
1600
  }
1641
- function Ia(t, e, r, n) {
1642
- var a = g();
1643
- try {
1644
- return w(t)(e, r, n);
1645
- } catch (o) {
1646
- if (m(a), o !== o + 0) throw o;
1647
- v(1, 0);
1648
- }
1601
+ }
1602
+ function wa(e, t, r, n, a, i, u) {
1603
+ var s = m();
1604
+ try {
1605
+ return g(e)(t, r, n, a, i, u);
1606
+ } catch (l) {
1607
+ if (y(s), l !== l + 0) throw l;
1608
+ v(1, 0);
1649
1609
  }
1650
- function ja(t, e, r, n, a, o, u, s) {
1651
- var l = g();
1652
- try {
1653
- w(t)(e, r, n, a, o, u, s);
1654
- } catch (d) {
1655
- if (m(l), d !== d + 0) throw d;
1656
- v(1, 0);
1657
- }
1610
+ }
1611
+ function $a(e, t, r, n) {
1612
+ var a = m();
1613
+ try {
1614
+ return g(e)(t, r, n);
1615
+ } catch (i) {
1616
+ if (y(a), i !== i + 0) throw i;
1617
+ v(1, 0);
1658
1618
  }
1659
- function Ra(t, e, r, n, a, o) {
1660
- var u = g();
1661
- try {
1662
- return w(t)(e, r, n, a, o);
1663
- } catch (s) {
1664
- if (m(u), s !== s + 0) throw s;
1665
- v(1, 0);
1666
- }
1619
+ }
1620
+ function ba(e, t, r, n) {
1621
+ var a = m();
1622
+ try {
1623
+ return g(e)(t, r, n);
1624
+ } catch (i) {
1625
+ if (y(a), i !== i + 0) throw i;
1626
+ v(1, 0);
1667
1627
  }
1668
- function Ba(t, e, r, n, a, o, u, s, l, d) {
1669
- var h = g();
1670
- try {
1671
- return w(t)(e, r, n, a, o, u, s, l, d);
1672
- } catch (y) {
1673
- if (m(h), y !== y + 0) throw y;
1674
- v(1, 0);
1675
- }
1628
+ }
1629
+ function Ca(e, t, r, n, a, i, u, s) {
1630
+ var l = m();
1631
+ try {
1632
+ g(e)(t, r, n, a, i, u, s);
1633
+ } catch (d) {
1634
+ if (y(l), d !== d + 0) throw d;
1635
+ v(1, 0);
1676
1636
  }
1677
- function La(t, e, r) {
1678
- var n = g();
1679
- try {
1680
- return w(t)(e, r);
1681
- } catch (a) {
1682
- if (m(n), a !== a + 0) throw a;
1683
- v(1, 0);
1684
- }
1637
+ }
1638
+ function Ta(e, t, r, n, a, i) {
1639
+ var u = m();
1640
+ try {
1641
+ return g(e)(t, r, n, a, i);
1642
+ } catch (s) {
1643
+ if (y(u), s !== s + 0) throw s;
1644
+ v(1, 0);
1685
1645
  }
1686
- function Ua(t, e, r, n, a) {
1687
- var o = g();
1688
- try {
1689
- return w(t)(e, r, n, a);
1690
- } catch (u) {
1691
- if (m(o), u !== u + 0) throw u;
1692
- v(1, 0);
1693
- }
1646
+ }
1647
+ function Pa(e, t, r, n, a, i, u, s, l, d) {
1648
+ var h = m();
1649
+ try {
1650
+ return g(e)(t, r, n, a, i, u, s, l, d);
1651
+ } catch (p) {
1652
+ if (y(h), p !== p + 0) throw p;
1653
+ v(1, 0);
1694
1654
  }
1695
- function Wa(t, e, r, n, a, o, u, s, l, d) {
1696
- var h = g();
1697
- try {
1698
- w(t)(e, r, n, a, o, u, s, l, d);
1699
- } catch (y) {
1700
- if (m(h), y !== y + 0) throw y;
1701
- v(1, 0);
1702
- }
1655
+ }
1656
+ function Ea(e, t, r) {
1657
+ var n = m();
1658
+ try {
1659
+ return g(e)(t, r);
1660
+ } catch (a) {
1661
+ if (y(n), a !== a + 0) throw a;
1662
+ v(1, 0);
1703
1663
  }
1704
- function ka(t, e, r, n, a, o, u, s) {
1705
- var l = g();
1706
- try {
1707
- return w(t)(e, r, n, a, o, u, s);
1708
- } catch (d) {
1709
- if (m(l), d !== d + 0) throw d;
1710
- v(1, 0);
1711
- }
1664
+ }
1665
+ function _a(e, t, r, n, a) {
1666
+ var i = m();
1667
+ try {
1668
+ return g(e)(t, r, n, a);
1669
+ } catch (u) {
1670
+ if (y(i), u !== u + 0) throw u;
1671
+ v(1, 0);
1712
1672
  }
1713
- function Ha(t, e, r, n, a, o, u) {
1714
- var s = g();
1715
- try {
1716
- w(t)(e, r, n, a, o, u);
1717
- } catch (l) {
1718
- if (m(s), l !== l + 0) throw l;
1719
- v(1, 0);
1720
- }
1673
+ }
1674
+ function Oa(e, t, r, n, a, i, u, s, l, d) {
1675
+ var h = m();
1676
+ try {
1677
+ g(e)(t, r, n, a, i, u, s, l, d);
1678
+ } catch (p) {
1679
+ if (y(h), p !== p + 0) throw p;
1680
+ v(1, 0);
1721
1681
  }
1722
- function Va(t, e, r, n) {
1723
- var a = g();
1724
- try {
1725
- return w(t)(e, r, n);
1726
- } catch (o) {
1727
- if (m(a), o !== o + 0) throw o;
1728
- v(1, 0);
1729
- }
1682
+ }
1683
+ function xa(e, t, r, n, a, i, u, s, l) {
1684
+ var d = m();
1685
+ try {
1686
+ g(e)(t, r, n, a, i, u, s, l);
1687
+ } catch (h) {
1688
+ if (y(d), h !== h + 0) throw h;
1689
+ v(1, 0);
1730
1690
  }
1731
- function Na(t, e, r, n, a, o, u, s, l, d, h, y) {
1732
- var $ = g();
1733
- try {
1734
- return w(t)(e, r, n, a, o, u, s, l, d, h, y);
1735
- } catch (C) {
1736
- if (m($), C !== C + 0) throw C;
1737
- v(1, 0);
1738
- }
1691
+ }
1692
+ function Aa(e, t, r, n, a, i, u) {
1693
+ var s = m();
1694
+ try {
1695
+ g(e)(t, r, n, a, i, u);
1696
+ } catch (l) {
1697
+ if (y(s), l !== l + 0) throw l;
1698
+ v(1, 0);
1739
1699
  }
1740
- function za(t, e, r, n, a, o, u, s, l, d, h, y, $, C, P, D) {
1741
- var A = g();
1742
- try {
1743
- w(t)(e, r, n, a, o, u, s, l, d, h, y, $, C, P, D);
1744
- } catch (S) {
1745
- if (m(A), S !== S + 0) throw S;
1746
- v(1, 0);
1747
- }
1700
+ }
1701
+ function Sa(e, t, r, n) {
1702
+ var a = m();
1703
+ try {
1704
+ return g(e)(t, r, n);
1705
+ } catch (i) {
1706
+ if (y(a), i !== i + 0) throw i;
1707
+ v(1, 0);
1748
1708
  }
1749
- function Ga(t, e, r, n) {
1750
- var a = g();
1751
- try {
1752
- return We(t, e, r, n);
1753
- } catch (o) {
1754
- if (m(a), o !== o + 0) throw o;
1755
- v(1, 0);
1756
- }
1709
+ }
1710
+ function Ia(e, t, r, n, a, i, u, s, l, d, h, p) {
1711
+ var w = m();
1712
+ try {
1713
+ return g(e)(t, r, n, a, i, u, s, l, d, h, p);
1714
+ } catch (b) {
1715
+ if (y(w), b !== b + 0) throw b;
1716
+ v(1, 0);
1757
1717
  }
1758
- function Xa(t, e, r, n, a) {
1759
- var o = g();
1760
- try {
1761
- return ke(t, e, r, n, a);
1762
- } catch (u) {
1763
- if (m(o), u !== u + 0) throw u;
1764
- v(1, 0);
1765
- }
1718
+ }
1719
+ function Da(e, t, r, n, a, i, u, s, l, d, h, p, w, b, _, S) {
1720
+ var A = m();
1721
+ try {
1722
+ g(e)(t, r, n, a, i, u, s, l, d, h, p, w, b, _, S);
1723
+ } catch (I) {
1724
+ if (y(A), I !== I + 0) throw I;
1725
+ v(1, 0);
1766
1726
  }
1767
- var Mt;
1768
- ct = function t() {
1769
- Mt || He(), Mt || (ct = t);
1770
- };
1771
- function He() {
1772
- if (Y > 0 || (hr(), Y > 0))
1773
- return;
1774
- function t() {
1775
- var e;
1776
- Mt || (Mt = !0, c.calledRun = !0, !ie && (pr(), O(c), (e = c.onRuntimeInitialized) === null || e === void 0 || e.call(c), yr()));
1777
- }
1778
- c.setStatus ? (c.setStatus("Running..."), setTimeout(() => {
1779
- setTimeout(() => c.setStatus(""), 1), t();
1780
- }, 1)) : t();
1727
+ }
1728
+ function Ma(e, t, r, n) {
1729
+ var a = m();
1730
+ try {
1731
+ Jn(e, t, r, n);
1732
+ } catch (i) {
1733
+ if (y(a), i !== i + 0) throw i;
1734
+ v(1, 0);
1781
1735
  }
1736
+ }
1737
+ function Fa(e, t, r, n, a) {
1738
+ var i = m();
1739
+ try {
1740
+ return Kn(e, t, r, n, a);
1741
+ } catch (u) {
1742
+ if (y(i), u !== u + 0) throw u;
1743
+ v(1, 0);
1744
+ }
1745
+ }
1746
+ function qt() {
1747
+ if (J > 0) {
1748
+ ct = qt;
1749
+ return;
1750
+ }
1751
+ if (qe(), J > 0) {
1752
+ ct = qt;
1753
+ return;
1754
+ }
1755
+ function e() {
1756
+ var t;
1757
+ c.calledRun = !0, !Jt && (Ye(), T(c), (t = c.onRuntimeInitialized) === null || t === void 0 || t.call(c), Ze());
1758
+ }
1759
+ c.setStatus ? (c.setStatus("Running..."), setTimeout(() => {
1760
+ setTimeout(() => c.setStatus(""), 1), e();
1761
+ }, 1)) : e();
1762
+ }
1763
+ function Ra() {
1782
1764
  if (c.preInit)
1783
1765
  for (typeof c.preInit == "function" && (c.preInit = [c.preInit]); c.preInit.length > 0; )
1784
- c.preInit.pop()();
1785
- return He(), T = j, T;
1786
- };
1787
- })();
1788
- function rr(i) {
1789
- return er(ae, i);
1766
+ c.preInit.shift()();
1767
+ }
1768
+ return Ra(), qt(), f = x, f;
1769
+ };
1770
+ function Be(o) {
1771
+ return Le(Qt, o);
1790
1772
  }
1791
- function Fi() {
1792
- return fi(ae);
1773
+ function Co() {
1774
+ return Ka(Qt);
1793
1775
  }
1794
- function Ii(i) {
1795
- rr({
1796
- overrides: i,
1776
+ function To(o) {
1777
+ Be({
1778
+ overrides: o,
1797
1779
  equalityFn: Object.is,
1798
1780
  fireImmediately: !1
1799
1781
  });
1800
1782
  }
1801
- async function hi(i, f) {
1802
- return di(ae, i, f);
1783
+ async function eo(o, f) {
1784
+ return to(Qt, o, f);
1803
1785
  }
1804
- const ji = "fd885aab6c1040e991da4bdf2c3849d27b3c238c437a29c8d30efbe68e509bb1", nr = [
1786
+ const Po = "d19de7bfefeb04bb38eb7a8fab3aa3a08c34f6ec502775d379e1d6da71f9865e", We = [
1805
1787
  ["aztec", "Aztec"],
1806
1788
  ["code_128", "Code128"],
1807
1789
  ["code_39", "Code39"],
@@ -1825,180 +1807,180 @@ const ji = "fd885aab6c1040e991da4bdf2c3849d27b3c238c437a29c8d30efbe68e509bb1", n
1825
1807
  ["linear_codes", "Linear-Codes"],
1826
1808
  ["matrix_codes", "Matrix-Codes"],
1827
1809
  ["any", "Any"]
1828
- ], pi = [...nr, ["unknown"]].map((i) => i[0]), ne = new Map(
1829
- nr
1810
+ ], ro = [...We, ["unknown"]].map((o) => o[0]), Zt = new Map(
1811
+ We
1830
1812
  );
1831
- function yi(i) {
1832
- for (const [f, p] of ne)
1833
- if (i === p)
1813
+ function no(o) {
1814
+ for (const [f, c] of Zt)
1815
+ if (o === c)
1834
1816
  return f;
1835
1817
  return "unknown";
1836
1818
  }
1837
- function vi(i) {
1838
- if (ar(i))
1819
+ function ao(o) {
1820
+ if (Ue(o))
1839
1821
  return {
1840
- width: i.naturalWidth,
1841
- height: i.naturalHeight
1822
+ width: o.naturalWidth,
1823
+ height: o.naturalHeight
1842
1824
  };
1843
- if (ir(i))
1825
+ if (Ve(o))
1844
1826
  return {
1845
- width: i.width.baseVal.value,
1846
- height: i.height.baseVal.value
1827
+ width: o.width.baseVal.value,
1828
+ height: o.height.baseVal.value
1847
1829
  };
1848
- if (or(i))
1830
+ if (ke(o))
1849
1831
  return {
1850
- width: i.videoWidth,
1851
- height: i.videoHeight
1832
+ width: o.videoWidth,
1833
+ height: o.videoHeight
1852
1834
  };
1853
- if (ur(i))
1835
+ if (Ne(o))
1854
1836
  return {
1855
- width: i.width,
1856
- height: i.height
1837
+ width: o.width,
1838
+ height: o.height
1857
1839
  };
1858
- if (lr(i))
1840
+ if (Ge(o))
1859
1841
  return {
1860
- width: i.displayWidth,
1861
- height: i.displayHeight
1842
+ width: o.displayWidth,
1843
+ height: o.displayHeight
1862
1844
  };
1863
- if (sr(i))
1845
+ if (He(o))
1864
1846
  return {
1865
- width: i.width,
1866
- height: i.height
1847
+ width: o.width,
1848
+ height: o.height
1867
1849
  };
1868
- if (cr(i))
1850
+ if (ze(o))
1869
1851
  return {
1870
- width: i.width,
1871
- height: i.height
1852
+ width: o.width,
1853
+ height: o.height
1872
1854
  };
1873
1855
  throw new TypeError(
1874
1856
  "The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
1875
1857
  );
1876
1858
  }
1877
- function ar(i) {
1878
- var f, p;
1859
+ function Ue(o) {
1860
+ var f, c;
1879
1861
  try {
1880
- return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLImageElement);
1862
+ return o instanceof ((c = (f = o == null ? void 0 : o.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : c.HTMLImageElement);
1881
1863
  } catch {
1882
1864
  return !1;
1883
1865
  }
1884
1866
  }
1885
- function ir(i) {
1886
- var f, p;
1867
+ function Ve(o) {
1868
+ var f, c;
1887
1869
  try {
1888
- return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.SVGImageElement);
1870
+ return o instanceof ((c = (f = o == null ? void 0 : o.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : c.SVGImageElement);
1889
1871
  } catch {
1890
1872
  return !1;
1891
1873
  }
1892
1874
  }
1893
- function or(i) {
1894
- var f, p;
1875
+ function ke(o) {
1876
+ var f, c;
1895
1877
  try {
1896
- return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLVideoElement);
1878
+ return o instanceof ((c = (f = o == null ? void 0 : o.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : c.HTMLVideoElement);
1897
1879
  } catch {
1898
1880
  return !1;
1899
1881
  }
1900
1882
  }
1901
- function sr(i) {
1902
- var f, p;
1883
+ function He(o) {
1884
+ var f, c;
1903
1885
  try {
1904
- return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLCanvasElement);
1886
+ return o instanceof ((c = (f = o == null ? void 0 : o.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : c.HTMLCanvasElement);
1905
1887
  } catch {
1906
1888
  return !1;
1907
1889
  }
1908
1890
  }
1909
- function ur(i) {
1891
+ function Ne(o) {
1910
1892
  try {
1911
- return i instanceof ImageBitmap || Object.prototype.toString.call(i) === "[object ImageBitmap]";
1893
+ return o instanceof ImageBitmap || Object.prototype.toString.call(o) === "[object ImageBitmap]";
1912
1894
  } catch {
1913
1895
  return !1;
1914
1896
  }
1915
1897
  }
1916
- function cr(i) {
1898
+ function ze(o) {
1917
1899
  try {
1918
- return i instanceof OffscreenCanvas || Object.prototype.toString.call(i) === "[object OffscreenCanvas]";
1900
+ return o instanceof OffscreenCanvas || Object.prototype.toString.call(o) === "[object OffscreenCanvas]";
1919
1901
  } catch {
1920
1902
  return !1;
1921
1903
  }
1922
1904
  }
1923
- function lr(i) {
1905
+ function Ge(o) {
1924
1906
  try {
1925
- return i instanceof VideoFrame || Object.prototype.toString.call(i) === "[object VideoFrame]";
1907
+ return o instanceof VideoFrame || Object.prototype.toString.call(o) === "[object VideoFrame]";
1926
1908
  } catch {
1927
1909
  return !1;
1928
1910
  }
1929
1911
  }
1930
- function mi(i) {
1912
+ function oo(o) {
1931
1913
  try {
1932
- return i instanceof Blob || Object.prototype.toString.call(i) === "[object Blob]";
1914
+ return o instanceof Blob || Object.prototype.toString.call(o) === "[object Blob]";
1933
1915
  } catch {
1934
1916
  return !1;
1935
1917
  }
1936
1918
  }
1937
- function gi(i) {
1919
+ function io(o) {
1938
1920
  try {
1939
- return i instanceof ImageData || Object.prototype.toString.call(i) === "[object ImageData]";
1921
+ return o instanceof ImageData || Object.prototype.toString.call(o) === "[object ImageData]";
1940
1922
  } catch {
1941
1923
  return !1;
1942
1924
  }
1943
1925
  }
1944
- function wi(i, f) {
1926
+ function so(o, f) {
1945
1927
  try {
1946
- const p = new OffscreenCanvas(i, f);
1947
- if (p.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
1948
- return p;
1928
+ const c = new OffscreenCanvas(o, f);
1929
+ if (c.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
1930
+ return c;
1949
1931
  throw void 0;
1950
1932
  } catch {
1951
- const p = document.createElement("canvas");
1952
- return p.width = i, p.height = f, p;
1933
+ const c = document.createElement("canvas");
1934
+ return c.width = o, c.height = f, c;
1953
1935
  }
1954
1936
  }
1955
- async function fr(i) {
1956
- if (ar(i) && !await Ti(i))
1937
+ async function Xe(o) {
1938
+ if (Ue(o) && !await fo(o))
1957
1939
  throw new DOMException(
1958
1940
  "Failed to load or decode HTMLImageElement.",
1959
1941
  "InvalidStateError"
1960
1942
  );
1961
- if (ir(i) && !await _i(i))
1943
+ if (Ve(o) && !await ho(o))
1962
1944
  throw new DOMException(
1963
1945
  "Failed to load or decode SVGImageElement.",
1964
1946
  "InvalidStateError"
1965
1947
  );
1966
- if (lr(i) && Pi(i))
1948
+ if (Ge(o) && po(o))
1967
1949
  throw new DOMException("VideoFrame is closed.", "InvalidStateError");
1968
- if (or(i) && (i.readyState === 0 || i.readyState === 1))
1950
+ if (ke(o) && (o.readyState === 0 || o.readyState === 1))
1969
1951
  throw new DOMException("Invalid element or state.", "InvalidStateError");
1970
- if (ur(i) && Oi(i))
1952
+ if (Ne(o) && yo(o))
1971
1953
  throw new DOMException(
1972
1954
  "The image source is detached.",
1973
1955
  "InvalidStateError"
1974
1956
  );
1975
- const { width: f, height: p } = vi(i);
1976
- if (f === 0 || p === 0)
1957
+ const { width: f, height: c } = ao(o);
1958
+ if (f === 0 || c === 0)
1977
1959
  return null;
1978
- const c = wi(f, p).getContext("2d");
1979
- c.drawImage(i, 0, 0);
1960
+ const $ = so(f, c).getContext("2d");
1961
+ $.drawImage(o, 0, 0);
1980
1962
  try {
1981
- return c.getImageData(0, 0, f, p);
1963
+ return $.getImageData(0, 0, f, c);
1982
1964
  } catch {
1983
1965
  throw new DOMException("Source would taint origin.", "SecurityError");
1984
1966
  }
1985
1967
  }
1986
- async function $i(i) {
1968
+ async function uo(o) {
1987
1969
  let f;
1988
1970
  try {
1989
- f = await createImageBitmap(i);
1971
+ f = await createImageBitmap(o);
1990
1972
  } catch {
1991
1973
  try {
1992
1974
  if (globalThis.Image) {
1993
1975
  f = new Image();
1994
- let c = "";
1976
+ let $ = "";
1995
1977
  try {
1996
- c = URL.createObjectURL(i), f.src = c, await f.decode();
1978
+ $ = URL.createObjectURL(o), f.src = $, await f.decode();
1997
1979
  } finally {
1998
- URL.revokeObjectURL(c);
1980
+ URL.revokeObjectURL($);
1999
1981
  }
2000
1982
  } else
2001
- return i;
1983
+ return o;
2002
1984
  } catch {
2003
1985
  throw new DOMException(
2004
1986
  "Failed to load or decode Blob.",
@@ -2006,151 +1988,151 @@ async function $i(i) {
2006
1988
  );
2007
1989
  }
2008
1990
  }
2009
- return await fr(f);
1991
+ return await Xe(f);
2010
1992
  }
2011
- function bi(i) {
2012
- const { width: f, height: p } = i;
2013
- if (f === 0 || p === 0)
1993
+ function co(o) {
1994
+ const { width: f, height: c } = o;
1995
+ if (f === 0 || c === 0)
2014
1996
  return null;
2015
- const T = i.getContext("2d");
1997
+ const T = o.getContext("2d");
2016
1998
  try {
2017
- return T.getImageData(0, 0, f, p);
1999
+ return T.getImageData(0, 0, f, c);
2018
2000
  } catch {
2019
2001
  throw new DOMException("Source would taint origin.", "SecurityError");
2020
2002
  }
2021
2003
  }
2022
- async function Ci(i) {
2023
- if (mi(i))
2024
- return await $i(i);
2025
- if (gi(i)) {
2026
- if (Ei(i))
2004
+ async function lo(o) {
2005
+ if (oo(o))
2006
+ return await uo(o);
2007
+ if (io(o)) {
2008
+ if (vo(o))
2027
2009
  throw new DOMException(
2028
2010
  "The image data has been detached.",
2029
2011
  "InvalidStateError"
2030
2012
  );
2031
- return i;
2013
+ return o;
2032
2014
  }
2033
- return sr(i) || cr(i) ? bi(i) : await fr(i);
2015
+ return He(o) || ze(o) ? co(o) : await Xe(o);
2034
2016
  }
2035
- async function Ti(i) {
2017
+ async function fo(o) {
2036
2018
  try {
2037
- return await i.decode(), !0;
2019
+ return await o.decode(), !0;
2038
2020
  } catch {
2039
2021
  return !1;
2040
2022
  }
2041
2023
  }
2042
- async function _i(i) {
2024
+ async function ho(o) {
2043
2025
  var f;
2044
2026
  try {
2045
- return await ((f = i.decode) == null ? void 0 : f.call(i)), !0;
2027
+ return await ((f = o.decode) == null ? void 0 : f.call(o)), !0;
2046
2028
  } catch {
2047
2029
  return !1;
2048
2030
  }
2049
2031
  }
2050
- function Pi(i) {
2051
- return i.format === null;
2032
+ function po(o) {
2033
+ return o.format === null;
2052
2034
  }
2053
- function Ei(i) {
2054
- return i.data.buffer.byteLength === 0;
2035
+ function vo(o) {
2036
+ return o.data.buffer.byteLength === 0;
2055
2037
  }
2056
- function Oi(i) {
2057
- return i.width === 0 && i.height === 0;
2038
+ function yo(o) {
2039
+ return o.width === 0 && o.height === 0;
2058
2040
  }
2059
- function tr(i, f) {
2060
- return Ai(i) ? new DOMException(`${f}: ${i.message}`, i.name) : Si(i) ? new i.constructor(`${f}: ${i.message}`) : new Error(`${f}: ${i}`);
2041
+ function je(o, f) {
2042
+ return mo(o) ? new DOMException(`${f}: ${o.message}`, o.name) : go(o) ? new o.constructor(`${f}: ${o.message}`) : new Error(`${f}: ${o}`);
2061
2043
  }
2062
- function Ai(i) {
2063
- return i instanceof DOMException || Object.prototype.toString.call(i) === "[object DOMException]";
2044
+ function mo(o) {
2045
+ return o instanceof DOMException || Object.prototype.toString.call(o) === "[object DOMException]";
2064
2046
  }
2065
- function Si(i) {
2066
- return i instanceof Error || Object.prototype.toString.call(i) === "[object Error]";
2047
+ function go(o) {
2048
+ return o instanceof Error || Object.prototype.toString.call(o) === "[object Error]";
2067
2049
  }
2068
2050
  var pt;
2069
- class Ri {
2051
+ class Eo {
2070
2052
  constructor(f = {}) {
2071
- Ye(this, pt);
2072
- var p;
2053
+ De(this, pt);
2054
+ var c;
2073
2055
  try {
2074
- const T = (p = f == null ? void 0 : f.formats) == null ? void 0 : p.filter(
2075
- (c) => c !== "unknown"
2056
+ const T = (c = f == null ? void 0 : f.formats) == null ? void 0 : c.filter(
2057
+ ($) => $ !== "unknown"
2076
2058
  );
2077
2059
  if ((T == null ? void 0 : T.length) === 0)
2078
2060
  throw new TypeError("Hint option provided, but is empty.");
2079
- for (const c of T != null ? T : [])
2080
- if (!ne.has(c))
2061
+ for (const $ of T != null ? T : [])
2062
+ if (!Zt.has($))
2081
2063
  throw new TypeError(
2082
- `Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${c}' is not a valid enum value of type BarcodeFormat.`
2064
+ `Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`
2083
2065
  );
2084
- Qe(this, pt, T != null ? T : []), rr({ fireImmediately: !0 }).catch(() => {
2066
+ Me(this, pt, T != null ? T : []), Be({ fireImmediately: !0 }).catch(() => {
2085
2067
  });
2086
2068
  } catch (T) {
2087
- throw tr(
2069
+ throw je(
2088
2070
  T,
2089
2071
  "Failed to construct 'BarcodeDetector'"
2090
2072
  );
2091
2073
  }
2092
2074
  }
2093
2075
  static async getSupportedFormats() {
2094
- return pi.filter((f) => f !== "unknown");
2076
+ return ro.filter((f) => f !== "unknown");
2095
2077
  }
2096
2078
  async detect(f) {
2097
2079
  try {
2098
- const p = await Ci(f);
2099
- if (p === null)
2080
+ const c = await lo(f);
2081
+ if (c === null)
2100
2082
  return [];
2101
2083
  let T;
2102
- const c = {
2084
+ const $ = {
2103
2085
  tryCode39ExtendedMode: !1,
2104
2086
  textMode: "Plain",
2105
- formats: Ze(this, pt).map((O) => ne.get(O))
2087
+ formats: Ie(this, pt).map((x) => Zt.get(x))
2106
2088
  };
2107
2089
  try {
2108
- T = await hi(p, c);
2109
- } catch (O) {
2110
- throw console.error(O), new DOMException(
2090
+ T = await eo(c, $);
2091
+ } catch (x) {
2092
+ throw console.error(x), new DOMException(
2111
2093
  "Barcode detection service unavailable.",
2112
2094
  "NotSupportedError"
2113
2095
  );
2114
2096
  }
2115
- return T.map((O) => {
2097
+ return T.map((x) => {
2116
2098
  const {
2117
- topLeft: { x, y: j },
2118
- topRight: { x: M, y: L },
2119
- bottomLeft: { x: k, y: Z },
2120
- bottomRight: { x: tt, y: R }
2121
- } = O.position, yt = Math.min(x, M, k, tt), it = Math.min(j, L, Z, R), ot = Math.max(x, M, k, tt), st = Math.max(j, L, Z, R);
2099
+ topLeft: { x: D, y: j },
2100
+ topRight: { x: O, y: M },
2101
+ bottomLeft: { x: F, y: q },
2102
+ bottomRight: { x: rt, y: Y }
2103
+ } = x.position, st = Math.min(D, O, F, rt), k = Math.min(j, M, q, Y), Z = Math.max(D, O, F, rt), nt = Math.max(j, M, q, Y);
2122
2104
  return {
2123
2105
  boundingBox: new DOMRectReadOnly(
2124
- yt,
2125
- it,
2126
- ot - yt,
2127
- st - it
2106
+ st,
2107
+ k,
2108
+ Z - st,
2109
+ nt - k
2128
2110
  ),
2129
- rawValue: O.text,
2130
- format: yi(O.format),
2111
+ rawValue: x.text,
2112
+ format: no(x.format),
2131
2113
  cornerPoints: [
2132
2114
  {
2133
- x,
2115
+ x: D,
2134
2116
  y: j
2135
2117
  },
2136
2118
  {
2137
- x: M,
2138
- y: L
2119
+ x: O,
2120
+ y: M
2139
2121
  },
2140
2122
  {
2141
- x: tt,
2142
- y: R
2123
+ x: rt,
2124
+ y: Y
2143
2125
  },
2144
2126
  {
2145
- x: k,
2146
- y: Z
2127
+ x: F,
2128
+ y: q
2147
2129
  }
2148
2130
  ]
2149
2131
  };
2150
2132
  });
2151
- } catch (p) {
2152
- throw tr(
2153
- p,
2133
+ } catch (c) {
2134
+ throw je(
2135
+ c,
2154
2136
  "Failed to execute 'detect' on 'BarcodeDetector'"
2155
2137
  );
2156
2138
  }
@@ -2158,11 +2140,11 @@ class Ri {
2158
2140
  }
2159
2141
  pt = new WeakMap();
2160
2142
  export {
2161
- Ri as BarcodeDetector,
2162
- Mi as ZXING_CPP_COMMIT,
2163
- ji as ZXING_WASM_SHA256,
2164
- Di as ZXING_WASM_VERSION,
2165
- rr as prepareZXingModule,
2166
- Fi as purgeZXingModule,
2167
- Ii as setZXingModuleOverrides
2143
+ Eo as BarcodeDetector,
2144
+ bo as ZXING_CPP_COMMIT,
2145
+ Po as ZXING_WASM_SHA256,
2146
+ $o as ZXING_WASM_VERSION,
2147
+ Be as prepareZXingModule,
2148
+ Co as purgeZXingModule,
2149
+ To as setZXingModuleOverrides
2168
2150
  };