nano-scan 0.0.1 → 0.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.
package/dist/esm/index.js CHANGED
@@ -47,7 +47,7 @@ const M = [
47
47
  function x(e) {
48
48
  return M.indexOf(e);
49
49
  }
50
- const h = [
50
+ const y = [
51
51
  "Unknown",
52
52
  "ASCII",
53
53
  "ISO8859_1",
@@ -85,7 +85,7 @@ const h = [
85
85
  "BINARY"
86
86
  ];
87
87
  function B(e) {
88
- return e === "UnicodeBig" ? h.indexOf("UTF16BE") : h.indexOf(e);
88
+ return e === "UnicodeBig" ? y.indexOf("UTF16BE") : y.indexOf(e);
89
89
  }
90
90
  const F = [
91
91
  "Text",
@@ -145,7 +145,15 @@ function I(e) {
145
145
  characterSet: B(e.characterSet)
146
146
  };
147
147
  }
148
- const y = {
148
+ function P(e) {
149
+ return {
150
+ ...e,
151
+ format: w(e.format),
152
+ contentType: T(e.contentType),
153
+ eccLevel: e.ecLevel
154
+ };
155
+ }
156
+ const h = {
149
157
  format: "QRCode",
150
158
  readerInit: !1,
151
159
  forceSquareDataMatrix: !1,
@@ -154,22 +162,15 @@ const y = {
154
162
  sizeHint: 0,
155
163
  rotate: 0,
156
164
  withHRT: !1,
157
- withQuietZones: !0
165
+ withQuietZones: !0,
166
+ options: ""
158
167
  };
159
- function z(e) {
160
- return {
161
- ...e,
162
- format: w(e.format),
163
- contentType: T(e.contentType),
164
- eccLevel: e.ecLevel
165
- };
166
- }
167
- const H = "2.1.2", N = "a1516b34167cff504bf3c83698ea841e13a8f7f1", W = { locateFile: (e, t) => {
168
+ const H = "2.2.0", N = "0a3797f698b339c1c01c487a7a43f1368610f503", W = { locateFile: (e, t) => {
168
169
  const r = e.match(/_(.+?)\.wasm$/);
169
- return r ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.2/dist/${r[1]}/${e}` : t + e;
170
+ return r ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.0/dist/${r[1]}/${e}` : t + e;
170
171
  } }, f = /* @__PURE__ */ new WeakMap();
171
172
  function D(e, t) {
172
- return Object.is(e, t) || Object.keys(e).length === Object.keys(t).length && Object.keys(e).every((r) => Object.prototype.hasOwnProperty.call(t, r) && e[r] === t[r]);
173
+ return Object.is(e, t) || Object.keys(e).length === Object.keys(t).length && Object.keys(e).every((r) => Object.hasOwn(t, r) && e[r] === t[r]);
173
174
  }
174
175
  function S(e, { overrides: t, equalityFn: r = D, fireImmediately: d = !1 } = {}) {
175
176
  var a;
@@ -201,135 +202,140 @@ async function Z(e, t, r = u) {
201
202
  }
202
203
  o._free(n);
203
204
  const i = [];
204
- for (let a = 0; a < s.size(); ++a) i.push(z(s.get(a)));
205
+ for (let a = 0; a < s.size(); ++a) i.push(P(s.get(a)));
205
206
  return i;
206
207
  }
207
208
  const j = {
208
209
  ...u,
209
210
  formats: [...u.formats]
210
- }, G = { ...y };
211
+ }, G = { ...h };
211
212
 
212
213
  //#endregion
213
214
  //#region node_modules/zxing-wasm/dist/es/reader/index.js
214
215
  var Mr = async function(F$1 = {}) {
215
- var V, c = F$1, xr, yr, $e = new Promise((e, r) => {
216
+ var x$1, gr, l$1 = F$1, xr, yr, we = new Promise((e, r) => {
216
217
  xr = e, yr = r;
217
- }), be = typeof window == "object", we = typeof Bun < "u", mr = typeof WorkerGlobalScope < "u";
218
- typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type;
219
- var Ir = "./this.program", j$1 = "";
220
- function Ce(e) {
221
- return c.locateFile ? c.locateFile(e, j$1) : j$1 + e;
218
+ }), Ce = typeof window == "object", Pe = typeof Bun < "u", Ir = typeof WorkerGlobalScope < "u";
219
+ typeof process == "object" && !((gr = process.versions) === null || gr === void 0) && gr.node && process.type;
220
+ var Ur = "./this.program", Te, mr = "";
221
+ function Ae(e) {
222
+ return l$1.locateFile ? l$1.locateFile(e, mr) : mr + e;
222
223
  }
223
224
  var Vr, $r;
224
- (be || mr || we) && (mr ? j$1 = self.location.href : typeof document < "u" && document.currentScript && (j$1 = document.currentScript.src), j$1.startsWith("blob:") ? j$1 = "" : j$1 = j$1.slice(0, j$1.replace(/[?#].*/, "").lastIndexOf("/") + 1), mr && ($r = (e) => {
225
- var r = new XMLHttpRequest();
226
- return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);
227
- }), Vr = async (e) => {
228
- var r = await fetch(e, { credentials: "same-origin" });
229
- if (r.ok) return r.arrayBuffer();
230
- throw new Error(r.status + " : " + r.url);
231
- });
232
- var Ur = console.log.bind(console), z$1 = console.error.bind(console), Y, ir, Hr = !1, U$1, E$1, K, ar, G$1, $, Br, Nr;
233
- function Zr() {
234
- var e = ir.buffer;
235
- U$1 = new Int8Array(e), K = new Int16Array(e), c.HEAPU8 = E$1 = new Uint8Array(e), ar = new Uint16Array(e), G$1 = new Int32Array(e), $ = new Uint32Array(e), Br = new Float32Array(e), Nr = new Float64Array(e);
225
+ if (Ce || Ir || Pe) {
226
+ try {
227
+ mr = new URL(".", Te).href;
228
+ } catch {}
229
+ Ir && ($r = (e) => {
230
+ var r = new XMLHttpRequest();
231
+ return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);
232
+ }), Vr = async (e) => {
233
+ var r = await fetch(e, { credentials: "same-origin" });
234
+ if (r.ok) return r.arrayBuffer();
235
+ throw new Error(r.status + " : " + r.url);
236
+ };
237
+ }
238
+ var Hr = console.log.bind(console), Z$1 = console.error.bind(console), Y, nr, Br = !1, I$1, E$1, ir, z, L$1, $, Nr, Zr;
239
+ function zr() {
240
+ var e = nr.buffer;
241
+ I$1 = new Int8Array(e), ir = new Int16Array(e), l$1.HEAPU8 = E$1 = new Uint8Array(e), z = new Uint16Array(e), L$1 = new Int32Array(e), $ = new Uint32Array(e), Nr = new Float32Array(e), Zr = new Float64Array(e);
236
242
  }
237
- function Pe() {
238
- if (c.preRun) for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length;) xe(c.preRun.shift());
239
- zr(Lr);
243
+ function Re() {
244
+ if (l$1.preRun) for (typeof l$1.preRun == "function" && (l$1.preRun = [l$1.preRun]); l$1.preRun.length;) Ve(l$1.preRun.shift());
245
+ Lr(Xr);
240
246
  }
241
- function Te() {
247
+ function Fe() {
242
248
  b$1.ya();
243
249
  }
244
- function Ae() {
245
- if (c.postRun) for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length;) Me(c.postRun.shift());
246
- zr(Gr);
250
+ function ke() {
251
+ if (l$1.postRun) for (typeof l$1.postRun == "function" && (l$1.postRun = [l$1.postRun]); l$1.postRun.length;) Ue(l$1.postRun.shift());
252
+ Lr(Gr);
247
253
  }
248
- var H$1 = 0, J = null;
249
- function Re(e) {
254
+ var U$1 = 0, K = null;
255
+ function Ee(e) {
250
256
  var r;
251
- H$1++, (r = c.monitorRunDependencies) === null || r === void 0 || r.call(c, H$1);
257
+ U$1++, (r = l$1.monitorRunDependencies) === null || r === void 0 || r.call(l$1, U$1);
252
258
  }
253
- function Fe(e) {
259
+ function Se(e) {
254
260
  var r;
255
- if (H$1--, (r = c.monitorRunDependencies) === null || r === void 0 || r.call(c, H$1), H$1 == 0 && J) {
256
- var t = J;
257
- J = null, t();
261
+ if (U$1--, (r = l$1.monitorRunDependencies) === null || r === void 0 || r.call(l$1, U$1), U$1 == 0 && K) {
262
+ var t = K;
263
+ K = null, t();
258
264
  }
259
265
  }
260
266
  function br(e) {
261
267
  var r;
262
- (r = c.onAbort) === null || r === void 0 || r.call(c, e), e = "Aborted(" + e + ")", z$1(e), Hr = !0, e += ". Build with -sASSERTIONS for more info.";
268
+ (r = l$1.onAbort) === null || r === void 0 || r.call(l$1, e), e = "Aborted(" + e + ")", Z$1(e), Br = !0, e += ". Build with -sASSERTIONS for more info.";
263
269
  var t = new WebAssembly.RuntimeError(e);
264
270
  throw yr(t), t;
265
271
  }
266
- var L$1;
267
- function Ee() {
268
- return Ce("zxing_reader.wasm");
272
+ var G$1;
273
+ function je() {
274
+ return Ae("zxing_reader.wasm");
269
275
  }
270
- function ke(e) {
271
- if (e == L$1 && Y) return new Uint8Array(Y);
276
+ function Oe(e) {
277
+ if (e == G$1 && Y) return new Uint8Array(Y);
272
278
  if ($r) return $r(e);
273
279
  throw "both async and sync fetching of the wasm failed";
274
280
  }
275
- async function Se(e) {
281
+ async function De(e) {
276
282
  if (!Y) try {
277
283
  var r = await Vr(e);
278
284
  return new Uint8Array(r);
279
285
  } catch {}
280
- return ke(e);
286
+ return Oe(e);
281
287
  }
282
- async function Oe(e, r) {
288
+ async function We(e, r) {
283
289
  try {
284
- var t = await Se(e), n = await WebAssembly.instantiate(t, r);
290
+ var t = await De(e), n = await WebAssembly.instantiate(t, r);
285
291
  return n;
286
292
  } catch (i) {
287
- z$1(`failed to asynchronously prepare wasm: ${i}`), br(i);
293
+ Z$1(`failed to asynchronously prepare wasm: ${i}`), br(i);
288
294
  }
289
295
  }
290
- async function je(e, r, t) {
296
+ async function Me(e, r, t) {
291
297
  if (!e && typeof WebAssembly.instantiateStreaming == "function") try {
292
298
  var n = fetch(r, { credentials: "same-origin" }), i = await WebAssembly.instantiateStreaming(n, t);
293
299
  return i;
294
300
  } catch (a) {
295
- z$1(`wasm streaming compile failed: ${a}`), z$1("falling back to ArrayBuffer instantiation");
301
+ Z$1(`wasm streaming compile failed: ${a}`), Z$1("falling back to ArrayBuffer instantiation");
296
302
  }
297
- return Oe(r, t);
303
+ return We(r, t);
298
304
  }
299
- function De() {
300
- return { a: mn };
305
+ function xe() {
306
+ return { a: $n };
301
307
  }
302
- async function We() {
308
+ async function Ie() {
303
309
  function e(a, s) {
304
- return b$1 = a.exports, ir = b$1.xa, Zr(), ne = b$1.Ba, Fe(), b$1;
310
+ return b$1 = a.exports, nr = b$1.xa, zr(), ie = b$1.Ba, Se(), b$1;
305
311
  }
306
- Re();
312
+ Ee();
307
313
  function r(a) {
308
314
  return e(a.instance);
309
315
  }
310
- var t = De();
311
- if (c.instantiateWasm) return new Promise((a, s) => {
312
- c.instantiateWasm(t, (o, u$1) => {
316
+ var t = xe();
317
+ if (l$1.instantiateWasm) return new Promise((a, s) => {
318
+ l$1.instantiateWasm(t, (o, u$1) => {
313
319
  a(e(o));
314
320
  });
315
321
  });
316
- L$1 ??= Ee();
322
+ G$1 ??= je();
317
323
  try {
318
- var n = await je(Y, L$1, t), i = r(n);
324
+ var n = await Me(Y, G$1, t), i = r(n);
319
325
  return i;
320
326
  } catch (a) {
321
327
  return yr(a), Promise.reject(a);
322
328
  }
323
329
  }
324
- var zr = (e) => {
325
- for (; e.length > 0;) e.shift()(c);
326
- }, Gr = [], Me = (e) => Gr.push(e), Lr = [], xe = (e) => Lr.push(e), p$1 = (e) => Cn(e), h$1 = () => Pn(), or = [], sr = 0, Ie = (e) => {
330
+ var Lr = (e) => {
331
+ for (; e.length > 0;) e.shift()(l$1);
332
+ }, Gr = [], Ue = (e) => Gr.push(e), Xr = [], Ve = (e) => Xr.push(e), p$1 = (e) => Pn(e), h$1 = () => Tn(), ar = [], or = 0, He = (e) => {
327
333
  var r = new wr(e);
328
- return r.get_caught() || (r.set_caught(!0), sr--), r.set_rethrown(!1), or.push(r), An(e), bn(e);
329
- }, D$1 = 0, Ve = () => {
334
+ return r.get_caught() || (r.set_caught(!0), or--), r.set_rethrown(!1), ar.push(r), Rn(e), wn(e);
335
+ }, O$1 = 0, Be = () => {
330
336
  d(0, 0);
331
- var e = or.pop();
332
- Tn(e.excPtr), D$1 = 0;
337
+ var e = ar.pop();
338
+ An(e.excPtr), O$1 = 0;
333
339
  };
334
340
  class wr {
335
341
  constructor(r) {
@@ -348,16 +354,16 @@ var Mr = async function(F$1 = {}) {
348
354
  return $[this.ptr + 8 >> 2];
349
355
  }
350
356
  set_caught(r) {
351
- r = r ? 1 : 0, U$1[this.ptr + 12] = r;
357
+ r = r ? 1 : 0, I$1[this.ptr + 12] = r;
352
358
  }
353
359
  get_caught() {
354
- return U$1[this.ptr + 12] != 0;
360
+ return I$1[this.ptr + 12] != 0;
355
361
  }
356
362
  set_rethrown(r) {
357
- r = r ? 1 : 0, U$1[this.ptr + 13] = r;
363
+ r = r ? 1 : 0, I$1[this.ptr + 13] = r;
358
364
  }
359
365
  get_rethrown() {
360
- return U$1[this.ptr + 13] != 0;
366
+ return I$1[this.ptr + 13] != 0;
361
367
  }
362
368
  init(r, t) {
363
369
  this.set_adjusted_ptr(0), this.set_type(r), this.set_destructor(t);
@@ -369,70 +375,70 @@ var Mr = async function(F$1 = {}) {
369
375
  return $[this.ptr + 16 >> 2];
370
376
  }
371
377
  }
372
- var ur = (e) => wn(e), Cr = (e) => {
373
- var r = D$1;
374
- if (!r) return ur(0), 0;
378
+ var sr = (e) => Cn(e), Cr = (e) => {
379
+ var r = O$1;
380
+ if (!r) return sr(0), 0;
375
381
  var t = new wr(r);
376
382
  t.set_adjusted_ptr(r);
377
383
  var n = t.get_type();
378
- if (!n) return ur(0), r;
384
+ if (!n) return sr(0), r;
379
385
  for (var i of e) {
380
386
  if (i === 0 || i === n) break;
381
387
  var a = t.ptr + 16;
382
- if (Rn(i, n, a)) return ur(i), r;
388
+ if (Fn(i, n, a)) return sr(i), r;
383
389
  }
384
- return ur(n), r;
385
- }, Ue = () => Cr([]), He = (e) => Cr([e]), Be = (e, r) => Cr([e, r]), Ne = () => {
386
- var e = or.pop();
390
+ return sr(n), r;
391
+ }, Ne = () => Cr([]), Ze = (e) => Cr([e]), ze = (e, r) => Cr([e, r]), Le = () => {
392
+ var e = ar.pop();
387
393
  e || br("no exception to throw");
388
394
  var r = e.excPtr;
389
- throw e.get_rethrown() || (or.push(e), e.set_rethrown(!0), e.set_caught(!1), sr++), D$1 = r, D$1;
390
- }, Ze = (e, r, t) => {
395
+ throw e.get_rethrown() || (ar.push(e), e.set_rethrown(!0), e.set_caught(!1), or++), O$1 = r, O$1;
396
+ }, Ge = (e, r, t) => {
391
397
  var n = new wr(e);
392
- throw n.init(r, t), D$1 = e, sr++, D$1;
393
- }, ze = () => sr, Ge = (e) => {
394
- throw D$1 || (D$1 = e), D$1;
395
- }, Le = () => br(""), fr = {}, Pr = (e) => {
398
+ throw n.init(r, t), O$1 = e, or++, O$1;
399
+ }, Xe = () => or, qe = (e) => {
400
+ throw O$1 || (O$1 = e), O$1;
401
+ }, Ye = () => br(""), ur = {}, Pr = (e) => {
396
402
  for (; e.length;) {
397
403
  var r = e.pop(), t = e.pop();
398
404
  t(r);
399
405
  }
400
406
  };
401
- function Q(e) {
407
+ function J(e) {
402
408
  return this.fromWireType($[e >> 2]);
403
409
  }
404
- var X = {}, B$1 = {}, lr = {}, Xe = c.InternalError = class extends Error {
410
+ var X = {}, V = {}, fr = {}, Ke = class extends Error {
405
411
  constructor(r) {
406
412
  super(r), this.name = "InternalError";
407
413
  }
408
- }, cr = (e) => {
409
- throw new Xe(e);
410
- }, N$1 = (e, r, t) => {
411
- e.forEach((o) => lr[o] = r);
414
+ }, lr = (e) => {
415
+ throw new Ke(e);
416
+ }, H$1 = (e, r, t) => {
417
+ e.forEach((o) => fr[o] = r);
412
418
  function n(o) {
413
419
  var u$1 = t(o);
414
- u$1.length !== e.length && cr("Mismatched type converter count");
415
- for (var f$1 = 0; f$1 < e.length; ++f$1) O$1(e[f$1], u$1[f$1]);
420
+ u$1.length !== e.length && lr("Mismatched type converter count");
421
+ for (var f$1 = 0; f$1 < e.length; ++f$1) j$1(e[f$1], u$1[f$1]);
416
422
  }
417
423
  var i = new Array(r.length), a = [], s = 0;
418
424
  r.forEach((o, u$1) => {
419
- B$1.hasOwnProperty(o) ? i[u$1] = B$1[o] : (a.push(o), X.hasOwnProperty(o) || (X[o] = []), X[o].push(() => {
420
- i[u$1] = B$1[o], ++s, s === a.length && n(i);
425
+ V.hasOwnProperty(o) ? i[u$1] = V[o] : (a.push(o), X.hasOwnProperty(o) || (X[o] = []), X[o].push(() => {
426
+ i[u$1] = V[o], ++s, s === a.length && n(i);
421
427
  }));
422
428
  }), a.length === 0 && n(i);
423
- }, qe = (e) => {
424
- var r = fr[e];
425
- delete fr[e];
429
+ }, Je = (e) => {
430
+ var r = ur[e];
431
+ delete ur[e];
426
432
  var t = r.rawConstructor, n = r.rawDestructor, i = r.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType));
427
- N$1([e], a, (s) => {
433
+ H$1([e], a, (s) => {
428
434
  var o = {};
429
435
  return i.forEach((u$1, f$1) => {
430
- var l$1 = u$1.fieldName, v = s[f$1], g = s[f$1].optional, y$1 = u$1.getter, w$1 = u$1.getterContext, P = s[f$1 + i.length], C = u$1.setter, T$1 = u$1.setterContext;
431
- o[l$1] = {
432
- read: (I$1) => v.fromWireType(y$1(w$1, I$1)),
433
- write: (I$1, R$1) => {
436
+ var c = u$1.fieldName, v$1 = s[f$1], g = s[f$1].optional, y$1 = u$1.getter, w$1 = u$1.getterContext, P$1 = s[f$1 + i.length], C = u$1.setter, T$1 = u$1.setterContext;
437
+ o[c] = {
438
+ read: (M$1) => v$1.fromWireType(y$1(w$1, M$1)),
439
+ write: (M$1, R$1) => {
434
440
  var k = [];
435
- C(T$1, I$1, P.toWireType(k, R$1)), Pr(k);
441
+ C(T$1, M$1, P$1.toWireType(k, R$1)), Pr(k);
436
442
  },
437
443
  optional: g
438
444
  };
@@ -440,51 +446,51 @@ var Mr = async function(F$1 = {}) {
440
446
  name: r.name,
441
447
  fromWireType: (u$1) => {
442
448
  var f$1 = {};
443
- for (var l$1 in o) f$1[l$1] = o[l$1].read(u$1);
449
+ for (var c in o) f$1[c] = o[c].read(u$1);
444
450
  return n(u$1), f$1;
445
451
  },
446
452
  toWireType: (u$1, f$1) => {
447
- for (var l$1 in o) if (!(l$1 in f$1) && !o[l$1].optional) throw new TypeError(`Missing field: "${l$1}"`);
448
- var v = t();
449
- for (l$1 in o) o[l$1].write(v, f$1[l$1]);
450
- return u$1 !== null && u$1.push(n, v), v;
453
+ for (var c in o) if (!(c in f$1) && !o[c].optional) throw new TypeError(`Missing field: "${c}"`);
454
+ var v$1 = t();
455
+ for (c in o) o[c].write(v$1, f$1[c]);
456
+ return u$1 !== null && u$1.push(n, v$1), v$1;
451
457
  },
452
- argPackAdvance: W$1,
453
- readValueFromPointer: Q,
458
+ argPackAdvance: D$1,
459
+ readValueFromPointer: J,
454
460
  destructorFunction: n
455
461
  }];
456
462
  });
457
- }, Ye = (e, r, t, n, i) => {}, Ke = () => {
463
+ }, Qe = (e, r, t, n, i) => {}, rt = () => {
458
464
  for (var e = new Array(256), r = 0; r < 256; ++r) e[r] = String.fromCharCode(r);
459
- Xr = e;
460
- }, Xr, A$1 = (e) => {
461
- for (var r = "", t = e; E$1[t];) r += Xr[E$1[t++]];
465
+ qr = e;
466
+ }, qr, A$1 = (e) => {
467
+ for (var r = "", t = e; E$1[t];) r += qr[E$1[t++]];
462
468
  return r;
463
- }, rr = c.BindingError = class extends Error {
469
+ }, Q = class extends Error {
464
470
  constructor(r) {
465
471
  super(r), this.name = "BindingError";
466
472
  }
467
473
  }, m$1 = (e) => {
468
- throw new rr(e);
474
+ throw new Q(e);
469
475
  };
470
- function Je(e, r) {
476
+ function et(e, r) {
471
477
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
472
478
  var n = r.name;
473
- if (e || m$1(`type "${n}" must have a positive integer typeid pointer`), B$1.hasOwnProperty(e)) {
479
+ if (e || m$1(`type "${n}" must have a positive integer typeid pointer`), V.hasOwnProperty(e)) {
474
480
  if (t.ignoreDuplicateRegistrations) return;
475
481
  m$1(`Cannot register type '${n}' twice`);
476
482
  }
477
- if (B$1[e] = r, delete lr[e], X.hasOwnProperty(e)) {
483
+ if (V[e] = r, delete fr[e], X.hasOwnProperty(e)) {
478
484
  var i = X[e];
479
485
  delete X[e], i.forEach((a) => a());
480
486
  }
481
487
  }
482
- function O$1(e, r) {
488
+ function j$1(e, r) {
483
489
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
484
- return Je(e, r, t);
490
+ return et(e, r, t);
485
491
  }
486
- var W$1 = 8, Qe = (e, r, t, n) => {
487
- r = A$1(r), O$1(e, {
492
+ var D$1 = 8, tt = (e, r, t, n) => {
493
+ r = A$1(r), j$1(e, {
488
494
  name: r,
489
495
  fromWireType: function(i) {
490
496
  return !!i;
@@ -492,13 +498,13 @@ var Mr = async function(F$1 = {}) {
492
498
  toWireType: function(i, a) {
493
499
  return a ? t : n;
494
500
  },
495
- argPackAdvance: W$1,
501
+ argPackAdvance: D$1,
496
502
  readValueFromPointer: function(i) {
497
503
  return this.fromWireType(E$1[i]);
498
504
  },
499
505
  destructorFunction: null
500
506
  });
501
- }, rt = (e) => ({
507
+ }, nt = (e) => ({
502
508
  count: e.count,
503
509
  deleteScheduled: e.deleteScheduled,
504
510
  preservePointerOnDelete: e.preservePointerOnDelete,
@@ -511,26 +517,26 @@ var Mr = async function(F$1 = {}) {
511
517
  return t.$$.ptrType.registeredClass.name;
512
518
  }
513
519
  m$1(r(e) + " instance already deleted");
514
- }, Ar = !1, qr = (e) => {}, et = (e) => {
520
+ }, Ar = !1, Yr = (e) => {}, it = (e) => {
515
521
  e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
516
- }, Yr = (e) => {
522
+ }, Kr = (e) => {
517
523
  e.count.value -= 1;
518
524
  var r = e.count.value === 0;
519
- r && et(e);
520
- }, er = (e) => typeof FinalizationRegistry > "u" ? (er = (r) => r, e) : (Ar = new FinalizationRegistry((r) => {
521
- Yr(r.$$);
522
- }), er = (r) => {
525
+ r && it(e);
526
+ }, rr = (e) => typeof FinalizationRegistry > "u" ? (rr = (r) => r, e) : (Ar = new FinalizationRegistry((r) => {
527
+ Kr(r.$$);
528
+ }), rr = (r) => {
523
529
  var t = r.$$, n = !!t.smartPtr;
524
530
  if (n) {
525
531
  var i = { $$: t };
526
532
  Ar.register(r, i, r);
527
533
  }
528
534
  return r;
529
- }, qr = (r) => Ar.unregister(r), er(e)), tt = () => {
530
- let e = vr.prototype;
535
+ }, Yr = (r) => Ar.unregister(r), rr(e)), at = () => {
536
+ let e = cr.prototype;
531
537
  Object.assign(e, {
532
538
  isAliasOf(t) {
533
- if (!(this instanceof vr) || !(t instanceof vr)) return !1;
539
+ if (!(this instanceof cr) || !(t instanceof cr)) return !1;
534
540
  var n = this.$$.ptrType.registeredClass, i = this.$$.ptr;
535
541
  t.$$ = t.$$;
536
542
  for (var a = t.$$.ptrType.registeredClass, s = t.$$.ptr; n.baseClass;) i = n.upcast(i), n = n.baseClass;
@@ -539,11 +545,11 @@ var Mr = async function(F$1 = {}) {
539
545
  },
540
546
  clone() {
541
547
  if (this.$$.ptr || Tr(this), this.$$.preservePointerOnDelete) return this.$$.count.value += 1, this;
542
- var t = er(Object.create(Object.getPrototypeOf(this), { $$: { value: rt(this.$$) } }));
548
+ var t = rr(Object.create(Object.getPrototypeOf(this), { $$: { value: nt(this.$$) } }));
543
549
  return t.$$.count.value += 1, t.$$.deleteScheduled = !1, t;
544
550
  },
545
551
  delete() {
546
- this.$$.ptr || Tr(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m$1("Object already scheduled for deletion"), qr(this), Yr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
552
+ this.$$.ptr || Tr(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m$1("Object already scheduled for deletion"), Yr(this), Kr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
547
553
  },
548
554
  isDeleted() {
549
555
  return !this.$$.ptr;
@@ -555,8 +561,8 @@ var Mr = async function(F$1 = {}) {
555
561
  const r = Symbol.dispose;
556
562
  r && (e[r] = e.delete);
557
563
  };
558
- function vr() {}
559
- var Rr = (e, r) => Object.defineProperty(r, "name", { value: e }), Kr = {}, Jr = (e, r, t) => {
564
+ function cr() {}
565
+ var Rr = (e, r) => Object.defineProperty(r, "name", { value: e }), Jr = {}, Qr = (e, r, t) => {
560
566
  if (e[r].overloadTable === void 0) {
561
567
  var n = e[r];
562
568
  e[r] = function() {
@@ -564,30 +570,34 @@ var Mr = async function(F$1 = {}) {
564
570
  return e[r].overloadTable.hasOwnProperty(a.length) || m$1(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${e[r].overloadTable})!`), e[r].overloadTable[a.length].apply(this, a);
565
571
  }, e[r].overloadTable = [], e[r].overloadTable[n.argCount] = n;
566
572
  }
567
- }, Qr = (e, r, t) => {
568
- c.hasOwnProperty(e) ? ((t === void 0 || c[e].overloadTable !== void 0 && c[e].overloadTable[t] !== void 0) && m$1(`Cannot register public name '${e}' twice`), Jr(c, e, e), c[e].overloadTable.hasOwnProperty(t) && m$1(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`), c[e].overloadTable[t] = r) : (c[e] = r, c[e].argCount = t);
569
- }, nt = 48, it = 57, at = (e) => {
573
+ }, re = (e, r, t) => {
574
+ l$1.hasOwnProperty(e) ? ((t === void 0 || l$1[e].overloadTable !== void 0 && l$1[e].overloadTable[t] !== void 0) && m$1(`Cannot register public name '${e}' twice`), Qr(l$1, e, e), l$1[e].overloadTable.hasOwnProperty(t) && m$1(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`), l$1[e].overloadTable[t] = r) : (l$1[e] = r, l$1[e].argCount = t);
575
+ }, ot = 48, st = 57, ut = (e) => {
570
576
  e = e.replace(/[^a-zA-Z0-9_]/g, "$");
571
577
  var r = e.charCodeAt(0);
572
- return r >= nt && r <= it ? `_${e}` : e;
578
+ return r >= ot && r <= st ? `_${e}` : e;
573
579
  };
574
- function ot(e, r, t, n, i, a, s, o) {
580
+ function ft(e, r, t, n, i, a, s, o) {
575
581
  this.name = e, this.constructor = r, this.instancePrototype = t, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = [];
576
582
  }
577
583
  var Fr = (e, r, t) => {
578
584
  for (; r !== t;) r.upcast || m$1(`Expected null or instance of ${t.name}, got an instance of ${r.name}`), e = r.upcast(e), r = r.baseClass;
579
585
  return e;
586
+ }, kr = (e) => {
587
+ if (e === null) return "null";
588
+ var r = typeof e;
589
+ return r === "object" || r === "array" || r === "function" ? e.toString() : "" + e;
580
590
  };
581
- function st(e, r) {
591
+ function lt(e, r) {
582
592
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), 0;
583
- r.$$ || m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`);
593
+ r.$$ || m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`);
584
594
  var t = r.$$.ptrType.registeredClass, n = Fr(r.$$.ptr, t, this.registeredClass);
585
595
  return n;
586
596
  }
587
- function ut(e, r) {
597
+ function ct(e, r) {
588
598
  var t;
589
599
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), this.isSmartPointer ? (t = this.rawConstructor(), e !== null && e.push(this.rawDestructor, t), t) : 0;
590
- (!r || !r.$$) && m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name} to parameter type ${this.name}`);
600
+ (!r || !r.$$) && m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name} to parameter type ${this.name}`);
591
601
  var n = r.$$.ptrType.registeredClass;
592
602
  if (t = Fr(r.$$.ptr, n, this.registeredClass), this.isSmartPointer) switch (r.$$.smartPtr === void 0 && m$1("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
593
603
  case 0:
@@ -600,72 +610,72 @@ var Mr = async function(F$1 = {}) {
600
610
  if (r.$$.smartPtrType === this) t = r.$$.smartPtr;
601
611
  else {
602
612
  var i = r.clone();
603
- t = this.rawShare(t, x$1.toHandle(() => i.delete())), e !== null && e.push(this.rawDestructor, t);
613
+ t = this.rawShare(t, W$1.toHandle(() => i.delete())), e !== null && e.push(this.rawDestructor, t);
604
614
  }
605
615
  break;
606
616
  default: m$1("Unsupporting sharing policy");
607
617
  }
608
618
  return t;
609
619
  }
610
- function ft(e, r) {
620
+ function vt(e, r) {
611
621
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), 0;
612
- r.$$ || m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);
622
+ r.$$ || m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);
613
623
  var t = r.$$.ptrType.registeredClass, n = Fr(r.$$.ptr, t, this.registeredClass);
614
624
  return n;
615
625
  }
616
- var re = (e, r, t) => {
626
+ var ee = (e, r, t) => {
617
627
  if (r === t) return e;
618
628
  if (t.baseClass === void 0) return null;
619
- var n = re(e, r, t.baseClass);
629
+ var n = ee(e, r, t.baseClass);
620
630
  return n === null ? null : t.downcast(n);
621
- }, lt = {}, ct = (e, r) => {
631
+ }, dt = {}, pt = (e, r) => {
622
632
  for (r === void 0 && m$1("ptr should not be undefined"); e.baseClass;) r = e.upcast(r), e = e.baseClass;
623
633
  return r;
624
- }, vt = (e, r) => (r = ct(e, r), lt[r]), dr = (e, r) => {
625
- (!r.ptrType || !r.ptr) && cr("makeClassHandle requires ptr and ptrType");
634
+ }, ht = (e, r) => (r = pt(e, r), dt[r]), vr = (e, r) => {
635
+ (!r.ptrType || !r.ptr) && lr("makeClassHandle requires ptr and ptrType");
626
636
  var t = !!r.smartPtrType, n = !!r.smartPtr;
627
- return t !== n && cr("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, er(Object.create(e, { $$: {
637
+ return t !== n && lr("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, rr(Object.create(e, { $$: {
628
638
  value: r,
629
639
  writable: !0
630
640
  } }));
631
641
  };
632
- function dt(e) {
642
+ function _t(e) {
633
643
  var r = this.getPointee(e);
634
644
  if (!r) return this.destructor(e), null;
635
- var t = vt(this.registeredClass, r);
645
+ var t = ht(this.registeredClass, r);
636
646
  if (t !== void 0) {
637
647
  if (t.$$.count.value === 0) return t.$$.ptr = r, t.$$.smartPtr = e, t.clone();
638
648
  var n = t.clone();
639
649
  return this.destructor(e), n;
640
650
  }
641
651
  function i() {
642
- return this.isSmartPointer ? dr(this.registeredClass.instancePrototype, {
652
+ return this.isSmartPointer ? vr(this.registeredClass.instancePrototype, {
643
653
  ptrType: this.pointeeType,
644
654
  ptr: r,
645
655
  smartPtrType: this,
646
656
  smartPtr: e
647
- }) : dr(this.registeredClass.instancePrototype, {
657
+ }) : vr(this.registeredClass.instancePrototype, {
648
658
  ptrType: this,
649
659
  ptr: e
650
660
  });
651
661
  }
652
- var a = this.registeredClass.getActualType(r), s = Kr[a];
662
+ var a = this.registeredClass.getActualType(r), s = Jr[a];
653
663
  if (!s) return i.call(this);
654
664
  var o;
655
665
  this.isConst ? o = s.constPointerType : o = s.pointerType;
656
- var u$1 = re(r, this.registeredClass, o.registeredClass);
657
- return u$1 === null ? i.call(this) : this.isSmartPointer ? dr(o.registeredClass.instancePrototype, {
666
+ var u$1 = ee(r, this.registeredClass, o.registeredClass);
667
+ return u$1 === null ? i.call(this) : this.isSmartPointer ? vr(o.registeredClass.instancePrototype, {
658
668
  ptrType: o,
659
669
  ptr: u$1,
660
670
  smartPtrType: this,
661
671
  smartPtr: e
662
- }) : dr(o.registeredClass.instancePrototype, {
672
+ }) : vr(o.registeredClass.instancePrototype, {
663
673
  ptrType: o,
664
674
  ptr: u$1
665
675
  });
666
676
  }
667
- var pt = () => {
668
- Object.assign(pr.prototype, {
677
+ var gt = () => {
678
+ Object.assign(dr.prototype, {
669
679
  getPointee(e) {
670
680
  return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
671
681
  },
@@ -673,157 +683,169 @@ var Mr = async function(F$1 = {}) {
673
683
  var r;
674
684
  (r = this.rawDestructor) === null || r === void 0 || r.call(this, e);
675
685
  },
676
- argPackAdvance: W$1,
677
- readValueFromPointer: Q,
678
- fromWireType: dt
686
+ argPackAdvance: D$1,
687
+ readValueFromPointer: J,
688
+ fromWireType: _t
679
689
  });
680
690
  };
681
- function pr(e, r, t, n, i, a, s, o, u$1, f$1, l$1) {
682
- this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = u$1, this.rawShare = f$1, this.rawDestructor = l$1, !i && r.baseClass === void 0 ? n ? (this.toWireType = st, this.destructorFunction = null) : (this.toWireType = ft, this.destructorFunction = null) : this.toWireType = ut;
683
- }
684
- var ee = (e, r, t) => {
685
- c.hasOwnProperty(e) || cr("Replacing nonexistent public symbol"), c[e].overloadTable !== void 0 && t !== void 0 ? c[e].overloadTable[t] = r : (c[e] = r, c[e].argCount = t);
686
- }, te = [], ne, _ = (e) => {
687
- var r = te[e];
688
- return r || (te[e] = r = ne.get(e)), r;
689
- }, ht = function(e, r) {
691
+ function dr(e, r, t, n, i, a, s, o, u$1, f$1, c) {
692
+ this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = u$1, this.rawShare = f$1, this.rawDestructor = c, !i && r.baseClass === void 0 ? n ? (this.toWireType = lt, this.destructorFunction = null) : (this.toWireType = vt, this.destructorFunction = null) : this.toWireType = ct;
693
+ }
694
+ var te = (e, r, t) => {
695
+ l$1.hasOwnProperty(e) || lr("Replacing nonexistent public symbol"), l$1[e].overloadTable !== void 0 && t !== void 0 ? l$1[e].overloadTable[t] = r : (l$1[e] = r, l$1[e].argCount = t);
696
+ }, ne = [], ie, _ = (e) => {
697
+ var r = ne[e];
698
+ return r || (ne[e] = r = ie.get(e)), r;
699
+ }, yt = function(e, r) {
690
700
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
691
701
  if (e.includes("j")) return dynCallLegacy(e, r, t);
692
702
  var n = _(r), i = n(...t);
703
+ function a(s) {
704
+ return s;
705
+ }
693
706
  return i;
694
- }, _t = function(e, r) {
707
+ }, mt = function(e, r) {
695
708
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
696
709
  return function() {
697
710
  for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++) i[a] = arguments[a];
698
- return ht(e, r, i, t);
711
+ return yt(e, r, i, t);
699
712
  };
700
713
  }, S$1 = function(e, r) {
701
714
  e = A$1(e);
702
715
  function t() {
703
- if (e.includes("j")) return _t(e, r);
716
+ if (e.includes("j")) return mt(e, r);
704
717
  var i = _(r);
705
718
  return i;
706
719
  }
707
720
  var n = t();
708
721
  return typeof n != "function" && m$1(`unknown function pointer with signature ${e}: ${r}`), n;
709
722
  };
710
- class gt extends Error {}
711
- var ie = (e) => {
712
- var r = $n(e), t = A$1(r);
713
- return Z$1(r), t;
714
- }, hr = (e, r) => {
723
+ class $t extends Error {}
724
+ var ae = (e) => {
725
+ var r = bn(e), t = A$1(r);
726
+ return N$1(r), t;
727
+ }, pr = (e, r) => {
715
728
  var t = [], n = {};
716
729
  function i(a) {
717
- if (!n[a] && !B$1[a]) {
718
- if (lr[a]) {
719
- lr[a].forEach(i);
730
+ if (!n[a] && !V[a]) {
731
+ if (fr[a]) {
732
+ fr[a].forEach(i);
720
733
  return;
721
734
  }
722
735
  t.push(a), n[a] = !0;
723
736
  }
724
737
  }
725
- throw r.forEach(i), new gt(`${e}: ` + t.map(ie).join([", "]));
726
- }, yt = (e, r, t, n, i, a, s, o, u$1, f$1, l$1, v, g) => {
727
- l$1 = A$1(l$1), a = S$1(i, a), o && (o = S$1(s, o)), f$1 && (f$1 = S$1(u$1, f$1)), g = S$1(v, g);
728
- var y$1 = at(l$1);
729
- Qr(y$1, function() {
730
- hr(`Cannot construct ${l$1} due to unbound types`, [n]);
731
- }), N$1([
738
+ throw r.forEach(i), new $t(`${e}: ` + t.map(ae).join([", "]));
739
+ }, bt = (e, r, t, n, i, a, s, o, u$1, f$1, c, v$1, g) => {
740
+ c = A$1(c), a = S$1(i, a), o && (o = S$1(s, o)), f$1 && (f$1 = S$1(u$1, f$1)), g = S$1(v$1, g);
741
+ var y$1 = ut(c);
742
+ re(y$1, function() {
743
+ pr(`Cannot construct ${c} due to unbound types`, [n]);
744
+ }), H$1([
732
745
  e,
733
746
  r,
734
747
  t
735
748
  ], n ? [n] : [], (w$1) => {
736
749
  w$1 = w$1[0];
737
- var P, C;
738
- n ? (P = w$1.registeredClass, C = P.instancePrototype) : C = vr.prototype;
739
- var T$1 = Rr(l$1, function() {
740
- if (Object.getPrototypeOf(this) !== I$1) throw new rr(`Use 'new' to construct ${l$1}`);
741
- if (R$1.constructor_body === void 0) throw new rr(`${l$1} has no accessible constructor`);
742
- for (var _e = arguments.length, _r = new Array(_e), gr = 0; gr < _e; gr++) _r[gr] = arguments[gr];
743
- var ge = R$1.constructor_body[_r.length];
744
- if (ge === void 0) throw new rr(`Tried to invoke ctor of ${l$1} with invalid number of parameters (${_r.length}) - expected (${Object.keys(R$1.constructor_body).toString()}) parameters instead!`);
745
- return ge.apply(this, _r);
746
- }), I$1 = Object.create(C, { constructor: { value: T$1 } });
747
- T$1.prototype = I$1;
748
- var R$1 = new ot(l$1, T$1, I$1, g, P, a, o, f$1);
750
+ var P$1, C;
751
+ n ? (P$1 = w$1.registeredClass, C = P$1.instancePrototype) : C = cr.prototype;
752
+ var T$1 = Rr(c, function() {
753
+ if (Object.getPrototypeOf(this) !== M$1) throw new Q(`Use 'new' to construct ${c}`);
754
+ if (R$1.constructor_body === void 0) throw new Q(`${c} has no accessible constructor`);
755
+ for (var ye = arguments.length, hr = new Array(ye), _r = 0; _r < ye; _r++) hr[_r] = arguments[_r];
756
+ var me = R$1.constructor_body[hr.length];
757
+ if (me === void 0) throw new Q(`Tried to invoke ctor of ${c} with invalid number of parameters (${hr.length}) - expected (${Object.keys(R$1.constructor_body).toString()}) parameters instead!`);
758
+ return me.apply(this, hr);
759
+ }), M$1 = Object.create(C, { constructor: { value: T$1 } });
760
+ T$1.prototype = M$1;
761
+ var R$1 = new ft(c, T$1, M$1, g, P$1, a, o, f$1);
749
762
  if (R$1.baseClass) {
750
- var k, nr;
751
- (nr = (k = R$1.baseClass).__derivedClasses) !== null && nr !== void 0 || (k.__derivedClasses = []), R$1.baseClass.__derivedClasses.push(R$1);
763
+ var k, tr;
764
+ (tr = (k = R$1.baseClass).__derivedClasses) !== null && tr !== void 0 || (k.__derivedClasses = []), R$1.baseClass.__derivedClasses.push(R$1);
752
765
  }
753
- var vi = new pr(l$1, R$1, !0, !1, !1), pe = new pr(l$1 + "*", R$1, !1, !1, !1), he = new pr(l$1 + " const*", R$1, !1, !0, !1);
754
- return Kr[e] = {
755
- pointerType: pe,
756
- constPointerType: he
757
- }, ee(y$1, T$1), [
758
- vi,
759
- pe,
760
- he
766
+ var di = new dr(c, R$1, !0, !1, !1), _e = new dr(c + "*", R$1, !1, !1, !1), ge = new dr(c + " const*", R$1, !1, !0, !1);
767
+ return Jr[e] = {
768
+ pointerType: _e,
769
+ constPointerType: ge
770
+ }, te(y$1, T$1), [
771
+ di,
772
+ _e,
773
+ ge
761
774
  ];
762
775
  });
763
776
  }, Er = (e, r) => {
764
777
  for (var t = [], n = 0; n < e; n++) t.push($[r + n * 4 >> 2]);
765
778
  return t;
766
779
  };
767
- function mt(e) {
780
+ function wt(e) {
768
781
  for (var r = 1; r < e.length; ++r) if (e[r] !== null && e[r].destructorFunction === void 0) return !0;
769
782
  return !1;
770
783
  }
771
- function kr(e, r, t, n, i, a) {
784
+ function Sr(e, r, t, n, i, a) {
772
785
  var s = r.length;
773
786
  s < 2 && m$1("argTypes array size mismatch! Must at least get return value and 'this' types!");
774
- var o = r[1] !== null && t !== null, u$1 = mt(r), f$1 = r[0].name !== "void", l$1 = s - 2, v = new Array(l$1), g = [], y$1 = [], w$1 = function() {
787
+ var o = r[1] !== null && t !== null, u$1 = wt(r), f$1 = r[0].name !== "void", c = s - 2, v$1 = new Array(c), g = [], y$1 = [], w$1 = function() {
775
788
  y$1.length = 0;
776
- var P;
777
- g.length = o ? 2 : 1, g[0] = i, o && (P = r[1].toWireType(y$1, this), g[1] = P);
778
- for (var C = 0; C < l$1; ++C) v[C] = r[C + 2].toWireType(y$1, C < 0 || arguments.length <= C ? void 0 : arguments[C]), g.push(v[C]);
789
+ var P$1;
790
+ g.length = o ? 2 : 1, g[0] = i, o && (P$1 = r[1].toWireType(y$1, this), g[1] = P$1);
791
+ for (var C = 0; C < c; ++C) v$1[C] = r[C + 2].toWireType(y$1, C < 0 || arguments.length <= C ? void 0 : arguments[C]), g.push(v$1[C]);
779
792
  var T$1 = n(...g);
780
- function I$1(R$1) {
793
+ function M$1(R$1) {
781
794
  if (u$1) Pr(y$1);
782
795
  else for (var k = o ? 1 : 2; k < r.length; k++) {
783
- var nr = k === 1 ? P : v[k - 2];
784
- r[k].destructorFunction !== null && r[k].destructorFunction(nr);
796
+ var tr = k === 1 ? P$1 : v$1[k - 2];
797
+ r[k].destructorFunction !== null && r[k].destructorFunction(tr);
785
798
  }
786
799
  if (f$1) return r[0].fromWireType(R$1);
787
800
  }
788
- return I$1(T$1);
801
+ return M$1(T$1);
789
802
  };
790
803
  return Rr(e, w$1);
791
804
  }
792
- var $t = (e, r, t, n, i, a) => {
805
+ var Ct = (e, r, t, n, i, a) => {
793
806
  var s = Er(r, t);
794
- i = S$1(n, i), N$1([], [e], (o) => {
807
+ i = S$1(n, i), H$1([], [e], (o) => {
795
808
  o = o[0];
796
809
  var u$1 = `constructor ${o.name}`;
797
- if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) throw new rr(`Cannot register multiple constructors with identical number of parameters (${r - 1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
810
+ if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) throw new Q(`Cannot register multiple constructors with identical number of parameters (${r - 1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
798
811
  return o.registeredClass.constructor_body[r - 1] = () => {
799
- hr(`Cannot construct ${o.name} due to unbound types`, s);
800
- }, N$1([], s, (f$1) => (f$1.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = kr(u$1, f$1, null, i, a), [])), [];
812
+ pr(`Cannot construct ${o.name} due to unbound types`, s);
813
+ }, H$1([], s, (f$1) => (f$1.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = Sr(u$1, f$1, null, i, a), [])), [];
801
814
  });
802
- }, ae = (e) => {
815
+ }, oe = (e) => {
803
816
  e = e.trim();
804
817
  const r = e.indexOf("(");
805
818
  return r === -1 ? e : e.slice(0, r);
806
- }, bt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
807
- var l$1 = Er(t, n);
808
- r = A$1(r), r = ae(r), a = S$1(i, a), N$1([], [e], (v) => {
809
- v = v[0];
810
- var g = `${v.name}.${r}`;
811
- r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && v.registeredClass.pureVirtualFunctions.push(r);
819
+ }, Pt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
820
+ var c = Er(t, n);
821
+ r = A$1(r), r = oe(r), a = S$1(i, a), H$1([], [e], (v$1) => {
822
+ v$1 = v$1[0];
823
+ var g = `${v$1.name}.${r}`;
824
+ r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && v$1.registeredClass.pureVirtualFunctions.push(r);
812
825
  function y$1() {
813
- hr(`Cannot call ${g} due to unbound types`, l$1);
826
+ pr(`Cannot call ${g} due to unbound types`, c);
814
827
  }
815
- var w$1 = v.registeredClass.instancePrototype, P = w$1[r];
816
- return P === void 0 || P.overloadTable === void 0 && P.className !== v.name && P.argCount === t - 2 ? (y$1.argCount = t - 2, y$1.className = v.name, w$1[r] = y$1) : (Jr(w$1, r, g), w$1[r].overloadTable[t - 2] = y$1), N$1([], l$1, (C) => {
817
- var T$1 = kr(g, C, v, a, s);
828
+ var w$1 = v$1.registeredClass.instancePrototype, P$1 = w$1[r];
829
+ return P$1 === void 0 || P$1.overloadTable === void 0 && P$1.className !== v$1.name && P$1.argCount === t - 2 ? (y$1.argCount = t - 2, y$1.className = v$1.name, w$1[r] = y$1) : (Qr(w$1, r, g), w$1[r].overloadTable[t - 2] = y$1), H$1([], c, (C) => {
830
+ var T$1 = Sr(g, C, v$1, a, s);
818
831
  return w$1[r].overloadTable === void 0 ? (T$1.argCount = t - 2, w$1[r] = T$1) : w$1[r].overloadTable[t - 2] = T$1, [];
819
832
  }), [];
820
833
  });
821
- }, Sr = [], M$1 = [], Or = (e) => {
822
- e > 9 && --M$1[e + 1] === 0 && (M$1[e] = void 0, Sr.push(e));
823
- }, wt = () => M$1.length / 2 - 5 - Sr.length, Ct = () => {
824
- M$1.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = wt;
825
- }, x$1 = {
826
- toValue: (e) => (e || m$1(`Cannot use deleted val. handle = ${e}`), M$1[e]),
834
+ }, se = [], B$1 = [
835
+ 0,
836
+ 1,
837
+ ,
838
+ 1,
839
+ null,
840
+ 1,
841
+ !0,
842
+ 1,
843
+ !1,
844
+ 1
845
+ ], jr = (e) => {
846
+ e > 9 && --B$1[e + 1] === 0 && (B$1[e] = void 0, se.push(e));
847
+ }, W$1 = {
848
+ toValue: (e) => (e || m$1(`Cannot use deleted val. handle = ${e}`), B$1[e]),
827
849
  toHandle: (e) => {
828
850
  switch (e) {
829
851
  case void 0: return 2;
@@ -831,76 +853,72 @@ var Mr = async function(F$1 = {}) {
831
853
  case !0: return 6;
832
854
  case !1: return 8;
833
855
  default: {
834
- const r = Sr.pop() || M$1.length;
835
- return M$1[r] = e, M$1[r + 1] = 1, r;
856
+ const r = se.pop() || B$1.length;
857
+ return B$1[r] = e, B$1[r + 1] = 1, r;
836
858
  }
837
859
  }
838
860
  }
839
- }, oe = {
861
+ }, ue = {
840
862
  name: "emscripten::val",
841
863
  fromWireType: (e) => {
842
- var r = x$1.toValue(e);
843
- return Or(e), r;
864
+ var r = W$1.toValue(e);
865
+ return jr(e), r;
844
866
  },
845
- toWireType: (e, r) => x$1.toHandle(r),
846
- argPackAdvance: W$1,
847
- readValueFromPointer: Q,
867
+ toWireType: (e, r) => W$1.toHandle(r),
868
+ argPackAdvance: D$1,
869
+ readValueFromPointer: J,
848
870
  destructorFunction: null
849
- }, Pt = (e) => O$1(e, oe), Tt = (e, r) => {
871
+ }, Tt = (e) => j$1(e, ue), At = (e, r) => {
850
872
  switch (r) {
851
873
  case 4: return function(t) {
852
- return this.fromWireType(Br[t >> 2]);
874
+ return this.fromWireType(Nr[t >> 2]);
853
875
  };
854
876
  case 8: return function(t) {
855
- return this.fromWireType(Nr[t >> 3]);
877
+ return this.fromWireType(Zr[t >> 3]);
856
878
  };
857
879
  default: throw new TypeError(`invalid float width (${r}): ${e}`);
858
880
  }
859
- }, At = (e, r, t) => {
860
- r = A$1(r), O$1(e, {
881
+ }, Rt = (e, r, t) => {
882
+ r = A$1(r), j$1(e, {
861
883
  name: r,
862
884
  fromWireType: (n) => n,
863
885
  toWireType: (n, i) => i,
864
- argPackAdvance: W$1,
865
- readValueFromPointer: Tt(r, t),
886
+ argPackAdvance: D$1,
887
+ readValueFromPointer: At(r, t),
866
888
  destructorFunction: null
867
889
  });
868
- }, Rt = (e, r, t, n, i, a, s, o) => {
890
+ }, Ft = (e, r, t, n, i, a, s, o) => {
869
891
  var u$1 = Er(r, t);
870
- e = A$1(e), e = ae(e), i = S$1(n, i), Qr(e, function() {
871
- hr(`Cannot call ${e} due to unbound types`, u$1);
872
- }, r - 1), N$1([], u$1, (f$1) => {
873
- var l$1 = [f$1[0], null].concat(f$1.slice(1));
874
- return ee(e, kr(e, l$1, null, i, a), r - 1), [];
892
+ e = A$1(e), e = oe(e), i = S$1(n, i), re(e, function() {
893
+ pr(`Cannot call ${e} due to unbound types`, u$1);
894
+ }, r - 1), H$1([], u$1, (f$1) => {
895
+ var c = [f$1[0], null].concat(f$1.slice(1));
896
+ return te(e, Sr(e, c, null, i, a), r - 1), [];
875
897
  });
876
- }, Ft = (e, r, t) => {
898
+ }, kt = (e, r, t) => {
877
899
  switch (r) {
878
- case 1: return t ? (n) => U$1[n] : (n) => E$1[n];
879
- case 2: return t ? (n) => K[n >> 1] : (n) => ar[n >> 1];
880
- case 4: return t ? (n) => G$1[n >> 2] : (n) => $[n >> 2];
900
+ case 1: return t ? (n) => I$1[n] : (n) => E$1[n];
901
+ case 2: return t ? (n) => ir[n >> 1] : (n) => z[n >> 1];
902
+ case 4: return t ? (n) => L$1[n >> 2] : (n) => $[n >> 2];
881
903
  default: throw new TypeError(`invalid integer width (${r}): ${e}`);
882
904
  }
883
905
  }, Et = (e, r, t, n, i) => {
884
906
  r = A$1(r);
885
- var a = (l$1) => l$1;
886
- if (n === 0) {
887
- var s = 32 - 8 * t;
888
- a = (l$1) => l$1 << s >>> s;
889
- }
890
- var o = r.includes("unsigned"), u$1 = (l$1, v) => {}, f$1;
891
- o ? f$1 = function(l$1, v) {
892
- return u$1(v, this.name), v >>> 0;
893
- } : f$1 = function(l$1, v) {
894
- return u$1(v, this.name), v;
895
- }, O$1(e, {
907
+ const a = n === 0;
908
+ let s = (u$1) => u$1;
909
+ if (a) {
910
+ var o = 32 - 8 * t;
911
+ s = (u$1) => u$1 << o >>> o, i = s(i);
912
+ }
913
+ j$1(e, {
896
914
  name: r,
897
- fromWireType: a,
898
- toWireType: f$1,
899
- argPackAdvance: W$1,
900
- readValueFromPointer: Ft(r, t, n !== 0),
915
+ fromWireType: s,
916
+ toWireType: (u$1, f$1) => f$1,
917
+ argPackAdvance: D$1,
918
+ readValueFromPointer: kt(r, t, n !== 0),
901
919
  destructorFunction: null
902
920
  });
903
- }, kt = (e, r, t) => {
921
+ }, St = (e, r, t) => {
904
922
  var n = [
905
923
  Int8Array,
906
924
  Uint8Array,
@@ -913,17 +931,17 @@ var Mr = async function(F$1 = {}) {
913
931
  ], i = n[r];
914
932
  function a(s) {
915
933
  var o = $[s >> 2], u$1 = $[s + 4 >> 2];
916
- return new i(U$1.buffer, u$1, o);
934
+ return new i(I$1.buffer, u$1, o);
917
935
  }
918
- t = A$1(t), O$1(e, {
936
+ t = A$1(t), j$1(e, {
919
937
  name: t,
920
938
  fromWireType: a,
921
- argPackAdvance: W$1,
939
+ argPackAdvance: D$1,
922
940
  readValueFromPointer: a
923
941
  }, { ignoreDuplicateRegistrations: !0 });
924
- }, St = Object.assign({ optional: !0 }, oe), Ot = (e, r) => {
925
- O$1(e, St);
926
- }, jt = (e, r, t, n) => {
942
+ }, jt = Object.assign({ optional: !0 }, ue), Ot = (e, r) => {
943
+ j$1(e, jt);
944
+ }, Dt = (e, r, t, n) => {
927
945
  if (!(n > 0)) return 0;
928
946
  for (var i = t, a = t + n - 1, s = 0; s < e.length; ++s) {
929
947
  var o = e.charCodeAt(s);
@@ -946,16 +964,16 @@ var Mr = async function(F$1 = {}) {
946
964
  }
947
965
  }
948
966
  return r[t] = 0, t - i;
949
- }, q = (e, r, t) => jt(e, E$1, r, t), se = (e) => {
967
+ }, q = (e, r, t) => Dt(e, E$1, r, t), fe = (e) => {
950
968
  for (var r = 0, t = 0; t < e.length; ++t) {
951
969
  var n = e.charCodeAt(t);
952
970
  n <= 127 ? r++ : n <= 2047 ? r += 2 : n >= 55296 && n <= 57343 ? (r += 4, ++t) : r += 3;
953
971
  }
954
972
  return r;
955
- }, ue = typeof TextDecoder < "u" ? new TextDecoder() : void 0, fe = function(e) {
973
+ }, le = typeof TextDecoder < "u" ? new TextDecoder() : void 0, ce = function(e) {
956
974
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : NaN;
957
975
  for (var n = r + t, i = r; e[i] && !(i >= n);) ++i;
958
- if (i - r > 16 && e.buffer && ue) return ue.decode(e.subarray(r, i));
976
+ if (i - r > 16 && e.buffer && le) return le.decode(e.subarray(r, i));
959
977
  for (var a = ""; r < i;) {
960
978
  var s = e[r++];
961
979
  if (!(s & 128)) {
@@ -975,52 +993,52 @@ var Mr = async function(F$1 = {}) {
975
993
  }
976
994
  }
977
995
  return a;
978
- }, Dt = (e, r) => e ? fe(E$1, e, r) : "", Wt = (e, r) => {
979
- r = A$1(r), O$1(e, {
996
+ }, Wt = (e, r) => e ? ce(E$1, e, r) : "", Mt = (e, r) => {
997
+ r = A$1(r), j$1(e, {
980
998
  name: r,
981
999
  fromWireType(t) {
982
1000
  for (var n = $[t >> 2], i = t + 4, a, s, o = i, s = 0; s <= n; ++s) {
983
1001
  var u$1 = i + s;
984
1002
  if (s == n || E$1[u$1] == 0) {
985
- var f$1 = u$1 - o, l$1 = Dt(o, f$1);
986
- a === void 0 ? a = l$1 : (a += "\0", a += l$1), o = u$1 + 1;
1003
+ var f$1 = u$1 - o, c = Wt(o, f$1);
1004
+ a === void 0 ? a = c : (a += "\0", a += c), o = u$1 + 1;
987
1005
  }
988
1006
  }
989
- return Z$1(t), a;
1007
+ return N$1(t), a;
990
1008
  },
991
1009
  toWireType(t, n) {
992
1010
  n instanceof ArrayBuffer && (n = new Uint8Array(n));
993
1011
  var i, a = typeof n == "string";
994
- a || ArrayBuffer.isView(n) && n.BYTES_PER_ELEMENT == 1 || m$1("Cannot pass non-string to std::string"), a ? i = se(n) : i = n.length;
995
- var s = de(4 + i + 1), o = s + 4;
996
- return $[s >> 2] = i, a ? q(n, o, i + 1) : E$1.set(n, o), t !== null && t.push(Z$1, s), s;
1012
+ a || ArrayBuffer.isView(n) && n.BYTES_PER_ELEMENT == 1 || m$1("Cannot pass non-string to std::string"), a ? i = fe(n) : i = n.length;
1013
+ var s = he(4 + i + 1), o = s + 4;
1014
+ return $[s >> 2] = i, a ? q(n, o, i + 1) : E$1.set(n, o), t !== null && t.push(N$1, s), s;
997
1015
  },
998
- argPackAdvance: W$1,
999
- readValueFromPointer: Q,
1016
+ argPackAdvance: D$1,
1017
+ readValueFromPointer: J,
1000
1018
  destructorFunction(t) {
1001
- Z$1(t);
1019
+ N$1(t);
1002
1020
  }
1003
1021
  });
1004
- }, le = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Mt = (e, r) => {
1005
- for (var t = e, n = t >> 1, i = n + r / 2; !(n >= i) && ar[n];) ++n;
1006
- if (t = n << 1, t - e > 32 && le) return le.decode(E$1.subarray(e, t));
1007
- for (var a = "", s = 0; !(s >= r / 2); ++s) {
1008
- var o = K[e + s * 2 >> 1];
1022
+ }, ve = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, xt = (e, r) => {
1023
+ for (var t = e >> 1, n = t + r / 2, i = t; !(i >= n) && z[i];) ++i;
1024
+ if (i - t > 16 && ve) return ve.decode(z.subarray(t, i));
1025
+ for (var a = "", s = t; !(s >= n); ++s) {
1026
+ var o = z[s];
1009
1027
  if (o == 0) break;
1010
1028
  a += String.fromCharCode(o);
1011
1029
  }
1012
1030
  return a;
1013
- }, xt = (e, r, t) => {
1031
+ }, It = (e, r, t) => {
1014
1032
  if (t ??= 2147483647, t < 2) return 0;
1015
1033
  t -= 2;
1016
1034
  for (var n = r, i = t < e.length * 2 ? t / 2 : e.length, a = 0; a < i; ++a) {
1017
1035
  var s = e.charCodeAt(a);
1018
- K[r >> 1] = s, r += 2;
1036
+ ir[r >> 1] = s, r += 2;
1019
1037
  }
1020
- return K[r >> 1] = 0, r - n;
1021
- }, It = (e) => e.length * 2, Vt = (e, r) => {
1038
+ return ir[r >> 1] = 0, r - n;
1039
+ }, Ut = (e) => e.length * 2, Vt = (e, r) => {
1022
1040
  for (var t = 0, n = ""; !(t >= r / 4);) {
1023
- var i = G$1[e + t * 4 >> 2];
1041
+ var i = L$1[e + t * 4 >> 2];
1024
1042
  if (i == 0) break;
1025
1043
  if (++t, i >= 65536) {
1026
1044
  var a = i - 65536;
@@ -1028,7 +1046,7 @@ var Mr = async function(F$1 = {}) {
1028
1046
  } else n += String.fromCharCode(i);
1029
1047
  }
1030
1048
  return n;
1031
- }, Ut = (e, r, t) => {
1049
+ }, Ht = (e, r, t) => {
1032
1050
  if (t ??= 2147483647, t < 4) return 0;
1033
1051
  for (var n = r, i = n + t - 4, a = 0; a < e.length; ++a) {
1034
1052
  var s = e.charCodeAt(a);
@@ -1036,50 +1054,50 @@ var Mr = async function(F$1 = {}) {
1036
1054
  var o = e.charCodeAt(++a);
1037
1055
  s = 65536 + ((s & 1023) << 10) | o & 1023;
1038
1056
  }
1039
- if (G$1[r >> 2] = s, r += 4, r + 4 > i) break;
1057
+ if (L$1[r >> 2] = s, r += 4, r + 4 > i) break;
1040
1058
  }
1041
- return G$1[r >> 2] = 0, r - n;
1042
- }, Ht = (e) => {
1059
+ return L$1[r >> 2] = 0, r - n;
1060
+ }, Bt = (e) => {
1043
1061
  for (var r = 0, t = 0; t < e.length; ++t) {
1044
1062
  var n = e.charCodeAt(t);
1045
1063
  n >= 55296 && n <= 57343 && ++t, r += 4;
1046
1064
  }
1047
1065
  return r;
1048
- }, Bt = (e, r, t) => {
1066
+ }, Nt = (e, r, t) => {
1049
1067
  t = A$1(t);
1050
1068
  var n, i, a, s;
1051
- r === 2 ? (n = Mt, i = xt, s = It, a = (o) => ar[o >> 1]) : r === 4 && (n = Vt, i = Ut, s = Ht, a = (o) => $[o >> 2]), O$1(e, {
1069
+ r === 2 ? (n = xt, i = It, s = Ut, a = (o) => z[o >> 1]) : r === 4 && (n = Vt, i = Ht, s = Bt, a = (o) => $[o >> 2]), j$1(e, {
1052
1070
  name: t,
1053
1071
  fromWireType: (o) => {
1054
- for (var u$1 = $[o >> 2], f$1, l$1 = o + 4, v = 0; v <= u$1; ++v) {
1055
- var g = o + 4 + v * r;
1056
- if (v == u$1 || a(g) == 0) {
1057
- var y$1 = g - l$1, w$1 = n(l$1, y$1);
1058
- f$1 === void 0 ? f$1 = w$1 : (f$1 += "\0", f$1 += w$1), l$1 = g + r;
1072
+ for (var u$1 = $[o >> 2], f$1, c = o + 4, v$1 = 0; v$1 <= u$1; ++v$1) {
1073
+ var g = o + 4 + v$1 * r;
1074
+ if (v$1 == u$1 || a(g) == 0) {
1075
+ var y$1 = g - c, w$1 = n(c, y$1);
1076
+ f$1 === void 0 ? f$1 = w$1 : (f$1 += "\0", f$1 += w$1), c = g + r;
1059
1077
  }
1060
1078
  }
1061
- return Z$1(o), f$1;
1079
+ return N$1(o), f$1;
1062
1080
  },
1063
1081
  toWireType: (o, u$1) => {
1064
1082
  typeof u$1 != "string" && m$1(`Cannot pass non-string to C++ string type ${t}`);
1065
- var f$1 = s(u$1), l$1 = de(4 + f$1 + r);
1066
- return $[l$1 >> 2] = f$1 / r, i(u$1, l$1 + 4, f$1 + r), o !== null && o.push(Z$1, l$1), l$1;
1083
+ var f$1 = s(u$1), c = he(4 + f$1 + r);
1084
+ return $[c >> 2] = f$1 / r, i(u$1, c + 4, f$1 + r), o !== null && o.push(N$1, c), c;
1067
1085
  },
1068
- argPackAdvance: W$1,
1069
- readValueFromPointer: Q,
1086
+ argPackAdvance: D$1,
1087
+ readValueFromPointer: J,
1070
1088
  destructorFunction(o) {
1071
- Z$1(o);
1089
+ N$1(o);
1072
1090
  }
1073
1091
  });
1074
- }, Nt = (e, r, t, n, i, a) => {
1075
- fr[e] = {
1092
+ }, Zt = (e, r, t, n, i, a) => {
1093
+ ur[e] = {
1076
1094
  name: A$1(r),
1077
1095
  rawConstructor: S$1(t, n),
1078
1096
  rawDestructor: S$1(i, a),
1079
1097
  fields: []
1080
1098
  };
1081
- }, Zt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
1082
- fr[e].fields.push({
1099
+ }, zt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
1100
+ ur[e].fields.push({
1083
1101
  fieldName: A$1(r),
1084
1102
  getterReturnType: t,
1085
1103
  getter: S$1(n, i),
@@ -1088,18 +1106,18 @@ var Mr = async function(F$1 = {}) {
1088
1106
  setter: S$1(o, u$1),
1089
1107
  setterContext: f$1
1090
1108
  });
1091
- }, zt = (e, r) => {
1092
- r = A$1(r), O$1(e, {
1109
+ }, Lt = (e, r) => {
1110
+ r = A$1(r), j$1(e, {
1093
1111
  isVoid: !0,
1094
1112
  name: r,
1095
1113
  argPackAdvance: 0,
1096
1114
  fromWireType: () => {},
1097
1115
  toWireType: (t, n) => {}
1098
1116
  });
1099
- }, jr = [], Gt = (e, r, t, n) => (e = jr[e], r = x$1.toValue(r), e(null, r, t, n)), Lt = {}, Xt = (e) => {
1100
- var r = Lt[e];
1117
+ }, Or = [], Gt = (e, r, t, n) => (e = Or[e], r = W$1.toValue(r), e(null, r, t, n)), Xt = {}, qt = (e) => {
1118
+ var r = Xt[e];
1101
1119
  return r === void 0 ? A$1(e) : r;
1102
- }, ce = () => {
1120
+ }, de = () => {
1103
1121
  if (typeof globalThis == "object") return globalThis;
1104
1122
  function e(r) {
1105
1123
  r.$$$embind_global$$$ = r;
@@ -1108,63 +1126,63 @@ var Mr = async function(F$1 = {}) {
1108
1126
  }
1109
1127
  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")) return $$$embind_global$$$;
1110
1128
  throw Error("unable to get global object.");
1111
- }, qt = (e) => e === 0 ? x$1.toHandle(ce()) : (e = Xt(e), x$1.toHandle(ce()[e])), Yt = (e) => {
1112
- var r = jr.length;
1113
- return jr.push(e), r;
1114
- }, ve = (e, r) => {
1115
- var t = B$1[e];
1116
- return t === void 0 && m$1(`${r} has unknown type ${ie(e)}`), t;
1117
- }, Kt = (e, r) => {
1118
- for (var t = new Array(e), n = 0; n < e; ++n) t[n] = ve($[r + n * 4 >> 2], `parameter ${n}`);
1129
+ }, Yt = (e) => e === 0 ? W$1.toHandle(de()) : (e = qt(e), W$1.toHandle(de()[e])), Kt = (e) => {
1130
+ var r = Or.length;
1131
+ return Or.push(e), r;
1132
+ }, pe = (e, r) => {
1133
+ var t = V[e];
1134
+ return t === void 0 && m$1(`${r} has unknown type ${ae(e)}`), t;
1135
+ }, Jt = (e, r) => {
1136
+ for (var t = new Array(e), n = 0; n < e; ++n) t[n] = pe($[r + n * 4 >> 2], `parameter ${n}`);
1119
1137
  return t;
1120
- }, Jt = (e, r, t) => {
1138
+ }, Qt = (e, r, t) => {
1121
1139
  var n = [], i = e.toWireType(n, t);
1122
- return n.length && ($[r >> 2] = x$1.toHandle(n)), i;
1123
- }, Qt = Reflect.construct, rn = (e, r, t) => {
1124
- var n = Kt(e, r), i = n.shift();
1140
+ return n.length && ($[r >> 2] = W$1.toHandle(n)), i;
1141
+ }, rn = Reflect.construct, en = (e, r, t) => {
1142
+ var n = Jt(e, r), i = n.shift();
1125
1143
  e--;
1126
- var a = new Array(e), s = (u$1, f$1, l$1, v) => {
1127
- for (var g = 0, y$1 = 0; y$1 < e; ++y$1) a[y$1] = n[y$1].readValueFromPointer(v + g), g += n[y$1].argPackAdvance;
1128
- var w$1 = t === 1 ? Qt(f$1, a) : f$1.apply(u$1, a);
1129
- return Jt(i, l$1, w$1);
1144
+ var a = new Array(e), s = (u$1, f$1, c, v$1) => {
1145
+ for (var g = 0, y$1 = 0; y$1 < e; ++y$1) a[y$1] = n[y$1].readValueFromPointer(v$1 + g), g += n[y$1].argPackAdvance;
1146
+ var w$1 = t === 1 ? rn(f$1, a) : f$1.apply(u$1, a);
1147
+ return Qt(i, c, w$1);
1130
1148
  }, o = `methodCaller<(${n.map((u$1) => u$1.name).join(", ")}) => ${i.name}>`;
1131
- return Yt(Rr(o, s));
1132
- }, en = (e) => {
1133
- e > 9 && (M$1[e + 1] += 1);
1149
+ return Kt(Rr(o, s));
1134
1150
  }, tn = (e) => {
1135
- var r = x$1.toValue(e);
1136
- Pr(r), Or(e);
1137
- }, nn = (e, r) => {
1138
- e = ve(e, "_emval_take_value");
1151
+ e > 9 && (B$1[e + 1] += 1);
1152
+ }, nn = (e) => {
1153
+ var r = W$1.toValue(e);
1154
+ Pr(r), jr(e);
1155
+ }, an = (e, r) => {
1156
+ e = pe(e, "_emval_take_value");
1139
1157
  var t = e.readValueFromPointer(r);
1140
- return x$1.toHandle(t);
1141
- }, an = (e, r, t, n) => {
1158
+ return W$1.toHandle(t);
1159
+ }, on = (e, r, t, n) => {
1142
1160
  var i = (/* @__PURE__ */ new Date()).getFullYear(), a = new Date(i, 0, 1), s = new Date(i, 6, 1), o = a.getTimezoneOffset(), u$1 = s.getTimezoneOffset(), f$1 = Math.max(o, u$1);
1143
- $[e >> 2] = f$1 * 60, G$1[r >> 2] = +(o != u$1);
1144
- var l$1 = (y$1) => {
1145
- var w$1 = y$1 >= 0 ? "-" : "+", P = Math.abs(y$1), C = String(Math.floor(P / 60)).padStart(2, "0"), T$1 = String(P % 60).padStart(2, "0");
1161
+ $[e >> 2] = f$1 * 60, L$1[r >> 2] = +(o != u$1);
1162
+ var c = (y$1) => {
1163
+ var w$1 = y$1 >= 0 ? "-" : "+", P$1 = Math.abs(y$1), C = String(Math.floor(P$1 / 60)).padStart(2, "0"), T$1 = String(P$1 % 60).padStart(2, "0");
1146
1164
  return `UTC${w$1}${C}${T$1}`;
1147
- }, v = l$1(o), g = l$1(u$1);
1148
- u$1 < o ? (q(v, t, 17), q(g, n, 17)) : (q(v, n, 17), q(g, t, 17));
1149
- }, on = () => 2147483648, sn = (e, r) => Math.ceil(e / r) * r, un = (e) => {
1150
- var r = ir.buffer, t = (e - r.byteLength + 65535) / 65536 | 0;
1165
+ }, v$1 = c(o), g = c(u$1);
1166
+ u$1 < o ? (q(v$1, t, 17), q(g, n, 17)) : (q(v$1, n, 17), q(g, t, 17));
1167
+ }, sn = () => 2147483648, un = (e, r) => Math.ceil(e / r) * r, fn = (e) => {
1168
+ var r = nr.buffer, t = (e - r.byteLength + 65535) / 65536 | 0;
1151
1169
  try {
1152
- return ir.grow(t), Zr(), 1;
1170
+ return nr.grow(t), zr(), 1;
1153
1171
  } catch {}
1154
- }, fn = (e) => {
1172
+ }, ln = (e) => {
1155
1173
  var r = E$1.length;
1156
1174
  e >>>= 0;
1157
- var t = on();
1175
+ var t = sn();
1158
1176
  if (e > t) return !1;
1159
1177
  for (var n = 1; n <= 4; n *= 2) {
1160
1178
  var i = r * (1 + .2 / n);
1161
1179
  i = Math.min(i, e + 100663296);
1162
- var a = Math.min(t, sn(Math.max(e, i), 65536)), s = un(a);
1180
+ var a = Math.min(t, un(Math.max(e, i), 65536)), s = fn(a);
1163
1181
  if (s) return !0;
1164
1182
  }
1165
1183
  return !1;
1166
- }, Dr = {}, ln = () => Ir || "./this.program", tr = () => {
1167
- if (!tr.strings) {
1184
+ }, Dr = {}, cn = () => Ur || "./this.program", er = () => {
1185
+ if (!er.strings) {
1168
1186
  var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", r = {
1169
1187
  USER: "web_user",
1170
1188
  LOGNAME: "web_user",
@@ -1172,198 +1190,198 @@ var Mr = async function(F$1 = {}) {
1172
1190
  PWD: "/",
1173
1191
  HOME: "/home/web_user",
1174
1192
  LANG: e,
1175
- _: ln()
1193
+ _: cn()
1176
1194
  };
1177
1195
  for (var t in Dr) Dr[t] === void 0 ? delete r[t] : r[t] = Dr[t];
1178
1196
  var n = [];
1179
1197
  for (var t in r) n.push(`${t}=${r[t]}`);
1180
- tr.strings = n;
1198
+ er.strings = n;
1181
1199
  }
1182
- return tr.strings;
1183
- }, cn = (e, r) => {
1200
+ return er.strings;
1201
+ }, vn = (e, r) => {
1184
1202
  var t = 0, n = 0;
1185
- for (var i of tr()) {
1203
+ for (var i of er()) {
1186
1204
  var a = r + t;
1187
1205
  $[e + n >> 2] = a, t += q(i, a, Infinity) + 1, n += 4;
1188
1206
  }
1189
1207
  return 0;
1190
- }, vn = (e, r) => {
1191
- var t = tr();
1208
+ }, dn = (e, r) => {
1209
+ var t = er();
1192
1210
  $[e >> 2] = t.length;
1193
1211
  var n = 0;
1194
- for (var i of t) n += se(i) + 1;
1212
+ for (var i of t) n += fe(i) + 1;
1195
1213
  return $[r >> 2] = n, 0;
1196
- }, dn = (e) => 52;
1197
- function pn(e, r, t, n, i) {
1214
+ }, pn = (e) => 52;
1215
+ function hn(e, r, t, n, i) {
1198
1216
  return 70;
1199
1217
  }
1200
- var hn = [
1218
+ var _n = [
1201
1219
  null,
1202
1220
  [],
1203
1221
  []
1204
- ], _n = (e, r) => {
1205
- var t = hn[e];
1206
- r === 0 || r === 10 ? ((e === 1 ? Ur : z$1)(fe(t)), t.length = 0) : t.push(r);
1207
- }, gn = (e, r, t, n) => {
1222
+ ], gn = (e, r) => {
1223
+ var t = _n[e];
1224
+ r === 0 || r === 10 ? ((e === 1 ? Hr : Z$1)(ce(t)), t.length = 0) : t.push(r);
1225
+ }, yn = (e, r, t, n) => {
1208
1226
  for (var i = 0, a = 0; a < t; a++) {
1209
1227
  var s = $[r >> 2], o = $[r + 4 >> 2];
1210
1228
  r += 8;
1211
- for (var u$1 = 0; u$1 < o; u$1++) _n(e, E$1[s + u$1]);
1229
+ for (var u$1 = 0; u$1 < o; u$1++) gn(e, E$1[s + u$1]);
1212
1230
  i += o;
1213
1231
  }
1214
1232
  return $[n >> 2] = i, 0;
1215
- }, yn = (e) => e;
1216
- Ke(), tt(), pt(), Ct(), c.noExitRuntime && c.noExitRuntime, c.print && (Ur = c.print), c.printErr && (z$1 = c.printErr), c.wasmBinary && (Y = c.wasmBinary), c.arguments && c.arguments, c.thisProgram && (Ir = c.thisProgram);
1217
- var mn = {
1218
- s: Ie,
1219
- w: Ve,
1220
- a: Ue,
1221
- j: He,
1222
- m: Be,
1223
- N: Ne,
1224
- p: Ze,
1225
- da: ze,
1226
- d: Ge,
1227
- _: Le,
1228
- sa: qe,
1229
- Z: Ye,
1230
- na: Qe,
1231
- qa: yt,
1232
- pa: $t,
1233
- F: bt,
1234
- la: Pt,
1235
- R: At,
1236
- S: Rt,
1237
- y: Et,
1238
- t: kt,
1239
- ra: Ot,
1240
- ma: Wt,
1241
- O: Bt,
1242
- K: Nt,
1243
- ta: Zt,
1244
- oa: zt,
1245
- V: Gt,
1246
- ua: Or,
1247
- wa: qt,
1248
- $: rn,
1249
- T: en,
1250
- va: tn,
1251
- ka: nn,
1252
- aa: an,
1253
- ea: fn,
1254
- ba: cn,
1255
- ca: vn,
1233
+ }, mn = (e) => e;
1234
+ rt(), at(), gt(), l$1.noExitRuntime && l$1.noExitRuntime, l$1.print && (Hr = l$1.print), l$1.printErr && (Z$1 = l$1.printErr), l$1.wasmBinary && (Y = l$1.wasmBinary), l$1.arguments && l$1.arguments, l$1.thisProgram && (Ur = l$1.thisProgram);
1235
+ var $n = {
1236
+ s: He,
1237
+ w: Be,
1238
+ a: Ne,
1239
+ j: Ze,
1240
+ m: ze,
1241
+ P: Le,
1242
+ p: Ge,
1243
+ ga: Xe,
1244
+ d: qe,
1245
+ ba: Ye,
1246
+ ua: Je,
1247
+ aa: Qe,
1248
+ pa: tt,
1249
+ sa: bt,
1250
+ ra: Ct,
1251
+ H: Pt,
1252
+ na: Tt,
1253
+ V: Rt,
1254
+ W: Ft,
1255
+ x: Et,
1256
+ t: St,
1257
+ ta: Ot,
1258
+ oa: Mt,
1259
+ Q: Nt,
1260
+ I: Zt,
1261
+ va: zt,
1262
+ qa: Lt,
1263
+ da: Gt,
1264
+ wa: jr,
1265
+ D: Yt,
1266
+ ma: en,
1267
+ X: tn,
1268
+ Y: nn,
1269
+ U: an,
1270
+ ca: on,
1271
+ ha: ln,
1272
+ ea: vn,
1256
1273
  fa: dn,
1257
- X: pn,
1258
- Q: gn,
1259
- I: Kn,
1260
- C: Qn,
1261
- U: Wn,
1262
- P: oi,
1263
- q: Ln,
1264
- b: Sn,
1265
- D: Yn,
1266
- ia: ei,
1267
- c: jn,
1268
- ha: ti,
1269
- h: Dn,
1270
- i: Un,
1271
- r: Bn,
1272
- M: qn,
1273
- v: Zn,
1274
- E: Gn,
1275
- J: Xn,
1276
- A: ri,
1277
- H: si,
1278
- W: li,
1279
- k: xn,
1280
- f: Mn,
1281
- e: On,
1282
- g: kn,
1283
- L: ai,
1274
+ ia: pn,
1275
+ _: hn,
1276
+ S: yn,
1277
+ K: ri,
1278
+ C: ti,
1279
+ M: On,
1280
+ R: ui,
1281
+ q: Yn,
1282
+ b: Mn,
1283
+ E: Qn,
1284
+ ka: ii,
1285
+ c: xn,
1286
+ ja: ai,
1287
+ h: jn,
1288
+ i: Hn,
1289
+ r: zn,
1290
+ O: Jn,
1291
+ v: Gn,
1292
+ F: qn,
1293
+ L: Kn,
1294
+ z: ni,
1295
+ J: fi,
1296
+ $: li,
1297
+ Z: ci,
1298
+ k: In,
1299
+ f: Sn,
1300
+ e: Wn,
1301
+ g: Dn,
1302
+ N: si,
1284
1303
  l: Vn,
1285
- ja: Jn,
1286
- o: Nn,
1287
- x: Hn,
1288
- u: zn,
1289
- ga: ii,
1290
- B: ni,
1291
- n: In,
1292
- G: ui,
1293
- Y: fi,
1294
- z: yn
1295
- }, b$1 = await We();
1304
+ la: ei,
1305
+ o: Ln,
1306
+ B: Bn,
1307
+ u: Xn,
1308
+ T: Zn,
1309
+ A: oi,
1310
+ n: Un,
1311
+ G: Nn,
1312
+ y: mn
1313
+ }, b$1 = await Ie();
1296
1314
  b$1.ya;
1297
- var $n = b$1.za, Z$1 = c._free = b$1.Aa, de = c._malloc = b$1.Ca, bn = b$1.Da, d = b$1.Ea, wn = b$1.Fa, Cn = b$1.Ga, Pn = b$1.Ha, Tn = b$1.Ia, An = b$1.Ja, Rn = b$1.Ka;
1298
- c.dynCall_viijii = b$1.La;
1299
- var Fn = c.dynCall_vij = b$1.Ma;
1300
- c.dynCall_jiji = b$1.Na;
1301
- var En = c.dynCall_jiiii = b$1.Oa;
1302
- c.dynCall_iiiiij = b$1.Pa, c.dynCall_iiiiijj = b$1.Qa, c.dynCall_iiiiiijj = b$1.Ra;
1303
- function kn(e, r, t, n) {
1304
- var i = h$1();
1305
- try {
1306
- _(e)(r, t, n);
1307
- } catch (a) {
1308
- if (p$1(i), a !== a + 0) throw a;
1309
- d(1, 0);
1310
- }
1311
- }
1315
+ var bn = b$1.za, N$1 = l$1._free = b$1.Aa, he = l$1._malloc = b$1.Ca, wn = b$1.Da, d = b$1.Ea, Cn = b$1.Fa, Pn = b$1.Ga, Tn = b$1.Ha, An = b$1.Ia, Rn = b$1.Ja, Fn = b$1.Ka;
1316
+ l$1.dynCall_viijii = b$1.La;
1317
+ var kn = l$1.dynCall_iiijj = b$1.Ma;
1318
+ l$1.dynCall_jiji = b$1.Na;
1319
+ var En = l$1.dynCall_jiiii = b$1.Oa;
1320
+ l$1.dynCall_iiiiij = b$1.Pa, l$1.dynCall_iiiiijj = b$1.Qa, l$1.dynCall_iiiiiijj = b$1.Ra;
1312
1321
  function Sn(e, r) {
1313
1322
  var t = h$1();
1314
1323
  try {
1315
- return _(e)(r);
1324
+ _(e)(r);
1316
1325
  } catch (n) {
1317
1326
  if (p$1(t), n !== n + 0) throw n;
1318
1327
  d(1, 0);
1319
1328
  }
1320
1329
  }
1321
- function On(e, r, t) {
1322
- var n = h$1();
1330
+ function jn(e, r, t, n) {
1331
+ var i = h$1();
1323
1332
  try {
1324
- _(e)(r, t);
1325
- } catch (i) {
1326
- if (p$1(n), i !== i + 0) throw i;
1333
+ return _(e)(r, t, n);
1334
+ } catch (a) {
1335
+ if (p$1(i), a !== a + 0) throw a;
1327
1336
  d(1, 0);
1328
1337
  }
1329
1338
  }
1330
- function jn(e, r, t) {
1331
- var n = h$1();
1339
+ function On(e, r, t, n, i) {
1340
+ var a = h$1();
1332
1341
  try {
1333
- return _(e)(r, t);
1334
- } catch (i) {
1335
- if (p$1(n), i !== i + 0) throw i;
1342
+ return _(e)(r, t, n, i);
1343
+ } catch (s) {
1344
+ if (p$1(a), s !== s + 0) throw s;
1336
1345
  d(1, 0);
1337
1346
  }
1338
1347
  }
1339
1348
  function Dn(e, r, t, n) {
1340
1349
  var i = h$1();
1341
1350
  try {
1342
- return _(e)(r, t, n);
1351
+ _(e)(r, t, n);
1343
1352
  } catch (a) {
1344
1353
  if (p$1(i), a !== a + 0) throw a;
1345
1354
  d(1, 0);
1346
1355
  }
1347
1356
  }
1348
- function Wn(e, r, t, n, i) {
1349
- var a = h$1();
1357
+ function Wn(e, r, t) {
1358
+ var n = h$1();
1350
1359
  try {
1351
- return _(e)(r, t, n, i);
1352
- } catch (s) {
1353
- if (p$1(a), s !== s + 0) throw s;
1360
+ _(e)(r, t);
1361
+ } catch (i) {
1362
+ if (p$1(n), i !== i + 0) throw i;
1354
1363
  d(1, 0);
1355
1364
  }
1356
1365
  }
1357
1366
  function Mn(e, r) {
1358
1367
  var t = h$1();
1359
1368
  try {
1360
- _(e)(r);
1369
+ return _(e)(r);
1361
1370
  } catch (n) {
1362
1371
  if (p$1(t), n !== n + 0) throw n;
1363
1372
  d(1, 0);
1364
1373
  }
1365
1374
  }
1366
- function xn(e) {
1375
+ function xn(e, r, t) {
1376
+ var n = h$1();
1377
+ try {
1378
+ return _(e)(r, t);
1379
+ } catch (i) {
1380
+ if (p$1(n), i !== i + 0) throw i;
1381
+ d(1, 0);
1382
+ }
1383
+ }
1384
+ function In(e) {
1367
1385
  var r = h$1();
1368
1386
  try {
1369
1387
  _(e)();
@@ -1372,12 +1390,12 @@ var Mr = async function(F$1 = {}) {
1372
1390
  d(1, 0);
1373
1391
  }
1374
1392
  }
1375
- function In(e, r, t, n, i, a, s, o, u$1, f$1, l$1) {
1376
- var v = h$1();
1393
+ function Un(e, r, t, n, i, a, s, o, u$1, f$1, c) {
1394
+ var v$1 = h$1();
1377
1395
  try {
1378
- _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1);
1396
+ _(e)(r, t, n, i, a, s, o, u$1, f$1, c);
1379
1397
  } catch (g) {
1380
- if (p$1(v), g !== g + 0) throw g;
1398
+ if (p$1(v$1), g !== g + 0) throw g;
1381
1399
  d(1, 0);
1382
1400
  }
1383
1401
  }
@@ -1390,7 +1408,7 @@ var Mr = async function(F$1 = {}) {
1390
1408
  d(1, 0);
1391
1409
  }
1392
1410
  }
1393
- function Un(e, r, t, n, i) {
1411
+ function Hn(e, r, t, n, i) {
1394
1412
  var a = h$1();
1395
1413
  try {
1396
1414
  return _(e)(r, t, n, i);
@@ -1399,7 +1417,7 @@ var Mr = async function(F$1 = {}) {
1399
1417
  d(1, 0);
1400
1418
  }
1401
1419
  }
1402
- function Hn(e, r, t, n, i, a, s) {
1420
+ function Bn(e, r, t, n, i, a, s) {
1403
1421
  var o = h$1();
1404
1422
  try {
1405
1423
  _(e)(r, t, n, i, a, s);
@@ -1408,7 +1426,25 @@ var Mr = async function(F$1 = {}) {
1408
1426
  d(1, 0);
1409
1427
  }
1410
1428
  }
1411
- function Bn(e, r, t, n, i, a) {
1429
+ function Nn(e, r, t, n, i, a, s, o, u$1, f$1, c, v$1, g, y$1, w$1, P$1) {
1430
+ var C = h$1();
1431
+ try {
1432
+ _(e)(r, t, n, i, a, s, o, u$1, f$1, c, v$1, g, y$1, w$1, P$1);
1433
+ } catch (T$1) {
1434
+ if (p$1(C), T$1 !== T$1 + 0) throw T$1;
1435
+ d(1, 0);
1436
+ }
1437
+ }
1438
+ function Zn(e, r, t, n, i, a, s, o, u$1) {
1439
+ var f$1 = h$1();
1440
+ try {
1441
+ _(e)(r, t, n, i, a, s, o, u$1);
1442
+ } catch (c) {
1443
+ if (p$1(f$1), c !== c + 0) throw c;
1444
+ d(1, 0);
1445
+ }
1446
+ }
1447
+ function zn(e, r, t, n, i, a) {
1412
1448
  var s = h$1();
1413
1449
  try {
1414
1450
  return _(e)(r, t, n, i, a);
@@ -1417,7 +1453,7 @@ var Mr = async function(F$1 = {}) {
1417
1453
  d(1, 0);
1418
1454
  }
1419
1455
  }
1420
- function Nn(e, r, t, n, i, a) {
1456
+ function Ln(e, r, t, n, i, a) {
1421
1457
  var s = h$1();
1422
1458
  try {
1423
1459
  _(e)(r, t, n, i, a);
@@ -1426,7 +1462,7 @@ var Mr = async function(F$1 = {}) {
1426
1462
  d(1, 0);
1427
1463
  }
1428
1464
  }
1429
- function Zn(e, r, t, n, i, a, s) {
1465
+ function Gn(e, r, t, n, i, a, s) {
1430
1466
  var o = h$1();
1431
1467
  try {
1432
1468
  return _(e)(r, t, n, i, a, s);
@@ -1435,7 +1471,7 @@ var Mr = async function(F$1 = {}) {
1435
1471
  d(1, 0);
1436
1472
  }
1437
1473
  }
1438
- function zn(e, r, t, n, i, a, s, o) {
1474
+ function Xn(e, r, t, n, i, a, s, o) {
1439
1475
  var u$1 = h$1();
1440
1476
  try {
1441
1477
  _(e)(r, t, n, i, a, s, o);
@@ -1444,7 +1480,7 @@ var Mr = async function(F$1 = {}) {
1444
1480
  d(1, 0);
1445
1481
  }
1446
1482
  }
1447
- function Gn(e, r, t, n, i, a, s, o) {
1483
+ function qn(e, r, t, n, i, a, s, o) {
1448
1484
  var u$1 = h$1();
1449
1485
  try {
1450
1486
  return _(e)(r, t, n, i, a, s, o);
@@ -1453,7 +1489,7 @@ var Mr = async function(F$1 = {}) {
1453
1489
  d(1, 0);
1454
1490
  }
1455
1491
  }
1456
- function Ln(e) {
1492
+ function Yn(e) {
1457
1493
  var r = h$1();
1458
1494
  try {
1459
1495
  return _(e)();
@@ -1462,16 +1498,16 @@ var Mr = async function(F$1 = {}) {
1462
1498
  d(1, 0);
1463
1499
  }
1464
1500
  }
1465
- function Xn(e, r, t, n, i, a, s, o, u$1) {
1501
+ function Kn(e, r, t, n, i, a, s, o, u$1) {
1466
1502
  var f$1 = h$1();
1467
1503
  try {
1468
1504
  return _(e)(r, t, n, i, a, s, o, u$1);
1469
- } catch (l$1) {
1470
- if (p$1(f$1), l$1 !== l$1 + 0) throw l$1;
1505
+ } catch (c) {
1506
+ if (p$1(f$1), c !== c + 0) throw c;
1471
1507
  d(1, 0);
1472
1508
  }
1473
1509
  }
1474
- function qn(e, r, t, n, i, a, s) {
1510
+ function Jn(e, r, t, n, i, a, s) {
1475
1511
  var o = h$1();
1476
1512
  try {
1477
1513
  return _(e)(r, t, n, i, a, s);
@@ -1480,7 +1516,7 @@ var Mr = async function(F$1 = {}) {
1480
1516
  d(1, 0);
1481
1517
  }
1482
1518
  }
1483
- function Yn(e, r, t, n) {
1519
+ function Qn(e, r, t, n) {
1484
1520
  var i = h$1();
1485
1521
  try {
1486
1522
  return _(e)(r, t, n);
@@ -1489,7 +1525,7 @@ var Mr = async function(F$1 = {}) {
1489
1525
  d(1, 0);
1490
1526
  }
1491
1527
  }
1492
- function Kn(e, r, t, n) {
1528
+ function ri(e, r, t, n) {
1493
1529
  var i = h$1();
1494
1530
  try {
1495
1531
  return _(e)(r, t, n);
@@ -1498,7 +1534,7 @@ var Mr = async function(F$1 = {}) {
1498
1534
  d(1, 0);
1499
1535
  }
1500
1536
  }
1501
- function Jn(e, r, t, n, i, a, s, o) {
1537
+ function ei(e, r, t, n, i, a, s, o) {
1502
1538
  var u$1 = h$1();
1503
1539
  try {
1504
1540
  _(e)(r, t, n, i, a, s, o);
@@ -1507,7 +1543,7 @@ var Mr = async function(F$1 = {}) {
1507
1543
  d(1, 0);
1508
1544
  }
1509
1545
  }
1510
- function Qn(e, r, t, n, i, a) {
1546
+ function ti(e, r, t, n, i, a) {
1511
1547
  var s = h$1();
1512
1548
  try {
1513
1549
  return _(e)(r, t, n, i, a);
@@ -1516,16 +1552,16 @@ var Mr = async function(F$1 = {}) {
1516
1552
  d(1, 0);
1517
1553
  }
1518
1554
  }
1519
- function ri(e, r, t, n, i, a, s, o, u$1, f$1) {
1520
- var l$1 = h$1();
1555
+ function ni(e, r, t, n, i, a, s, o, u$1, f$1) {
1556
+ var c = h$1();
1521
1557
  try {
1522
1558
  return _(e)(r, t, n, i, a, s, o, u$1, f$1);
1523
- } catch (v) {
1524
- if (p$1(l$1), v !== v + 0) throw v;
1559
+ } catch (v$1) {
1560
+ if (p$1(c), v$1 !== v$1 + 0) throw v$1;
1525
1561
  d(1, 0);
1526
1562
  }
1527
1563
  }
1528
- function ei(e, r, t) {
1564
+ function ii(e, r, t) {
1529
1565
  var n = h$1();
1530
1566
  try {
1531
1567
  return _(e)(r, t);
@@ -1534,7 +1570,7 @@ var Mr = async function(F$1 = {}) {
1534
1570
  d(1, 0);
1535
1571
  }
1536
1572
  }
1537
- function ti(e, r, t, n, i) {
1573
+ function ai(e, r, t, n, i) {
1538
1574
  var a = h$1();
1539
1575
  try {
1540
1576
  return _(e)(r, t, n, i);
@@ -1543,25 +1579,16 @@ var Mr = async function(F$1 = {}) {
1543
1579
  d(1, 0);
1544
1580
  }
1545
1581
  }
1546
- function ni(e, r, t, n, i, a, s, o, u$1, f$1) {
1547
- var l$1 = h$1();
1582
+ function oi(e, r, t, n, i, a, s, o, u$1, f$1) {
1583
+ var c = h$1();
1548
1584
  try {
1549
1585
  _(e)(r, t, n, i, a, s, o, u$1, f$1);
1550
- } catch (v) {
1551
- if (p$1(l$1), v !== v + 0) throw v;
1552
- d(1, 0);
1553
- }
1554
- }
1555
- function ii(e, r, t, n, i, a, s, o, u$1) {
1556
- var f$1 = h$1();
1557
- try {
1558
- _(e)(r, t, n, i, a, s, o, u$1);
1559
- } catch (l$1) {
1560
- if (p$1(f$1), l$1 !== l$1 + 0) throw l$1;
1586
+ } catch (v$1) {
1587
+ if (p$1(c), v$1 !== v$1 + 0) throw v$1;
1561
1588
  d(1, 0);
1562
1589
  }
1563
1590
  }
1564
- function ai(e, r, t, n, i, a, s) {
1591
+ function si(e, r, t, n, i, a, s) {
1565
1592
  var o = h$1();
1566
1593
  try {
1567
1594
  _(e)(r, t, n, i, a, s);
@@ -1570,7 +1597,7 @@ var Mr = async function(F$1 = {}) {
1570
1597
  d(1, 0);
1571
1598
  }
1572
1599
  }
1573
- function oi(e, r, t, n) {
1600
+ function ui(e, r, t, n) {
1574
1601
  var i = h$1();
1575
1602
  try {
1576
1603
  return _(e)(r, t, n);
@@ -1579,34 +1606,25 @@ var Mr = async function(F$1 = {}) {
1579
1606
  d(1, 0);
1580
1607
  }
1581
1608
  }
1582
- function si(e, r, t, n, i, a, s, o, u$1, f$1, l$1, v) {
1609
+ function fi(e, r, t, n, i, a, s, o, u$1, f$1, c, v$1) {
1583
1610
  var g = h$1();
1584
1611
  try {
1585
- return _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1, v);
1612
+ return _(e)(r, t, n, i, a, s, o, u$1, f$1, c, v$1);
1586
1613
  } catch (y$1) {
1587
1614
  if (p$1(g), y$1 !== y$1 + 0) throw y$1;
1588
1615
  d(1, 0);
1589
1616
  }
1590
1617
  }
1591
- function ui(e, r, t, n, i, a, s, o, u$1, f$1, l$1, v, g, y$1, w$1, P) {
1592
- var C = h$1();
1593
- try {
1594
- _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1, v, g, y$1, w$1, P);
1595
- } catch (T$1) {
1596
- if (p$1(C), T$1 !== T$1 + 0) throw T$1;
1597
- d(1, 0);
1598
- }
1599
- }
1600
- function fi(e, r, t, n) {
1601
- var i = h$1();
1618
+ function li(e, r, t, n, i, a, s) {
1619
+ var o = h$1();
1602
1620
  try {
1603
- Fn(e, r, t, n);
1604
- } catch (a) {
1605
- if (p$1(i), a !== a + 0) throw a;
1621
+ return kn(e, r, t, n, i, a, s);
1622
+ } catch (u$1) {
1623
+ if (p$1(o), u$1 !== u$1 + 0) throw u$1;
1606
1624
  d(1, 0);
1607
1625
  }
1608
1626
  }
1609
- function li(e, r, t, n, i) {
1627
+ function ci(e, r, t, n, i) {
1610
1628
  var a = h$1();
1611
1629
  try {
1612
1630
  return En(e, r, t, n, i);
@@ -1616,32 +1634,32 @@ var Mr = async function(F$1 = {}) {
1616
1634
  }
1617
1635
  }
1618
1636
  function Wr() {
1619
- if (H$1 > 0) {
1620
- J = Wr;
1637
+ if (U$1 > 0) {
1638
+ K = Wr;
1621
1639
  return;
1622
1640
  }
1623
- if (Pe(), H$1 > 0) {
1624
- J = Wr;
1641
+ if (Re(), U$1 > 0) {
1642
+ K = Wr;
1625
1643
  return;
1626
1644
  }
1627
1645
  function e() {
1628
1646
  var r;
1629
- c.calledRun = !0, !Hr && (Te(), xr(c), (r = c.onRuntimeInitialized) === null || r === void 0 || r.call(c), Ae());
1647
+ l$1.calledRun = !0, !Br && (Fe(), xr(l$1), (r = l$1.onRuntimeInitialized) === null || r === void 0 || r.call(l$1), ke());
1630
1648
  }
1631
- c.setStatus ? (c.setStatus("Running..."), setTimeout(() => {
1632
- setTimeout(() => c.setStatus(""), 1), e();
1649
+ l$1.setStatus ? (l$1.setStatus("Running..."), setTimeout(() => {
1650
+ setTimeout(() => l$1.setStatus(""), 1), e();
1633
1651
  }, 1)) : e();
1634
1652
  }
1635
- function ci() {
1636
- if (c.preInit) for (typeof c.preInit == "function" && (c.preInit = [c.preInit]); c.preInit.length > 0;) c.preInit.shift()();
1653
+ function vi() {
1654
+ if (l$1.preInit) for (typeof l$1.preInit == "function" && (l$1.preInit = [l$1.preInit]); l$1.preInit.length > 0;) l$1.preInit.shift()();
1637
1655
  }
1638
- return ci(), Wr(), V = $e, V;
1656
+ return vi(), Wr(), x$1 = we, x$1;
1639
1657
  };
1640
- function ye(F$1) {
1658
+ function $e(F$1) {
1641
1659
  return S(Mr, F$1);
1642
1660
  }
1643
- async function me(F$1, V) {
1644
- return Z(Mr, F$1, V);
1661
+ async function be(F$1, x$1) {
1662
+ return Z(Mr, F$1, x$1);
1645
1663
  }
1646
1664
 
1647
1665
  //#endregion
@@ -1671,6 +1689,11 @@ async function applyVideoZoom(video, zoom) {
1671
1689
  const constraints = { advanced: [{ zoom }] };
1672
1690
  await track.applyConstraints(constraints);
1673
1691
  }
1692
+ async function applyVideoTorch(video, torch) {
1693
+ const track = video.srcObject.getVideoTracks()[0];
1694
+ const constraints = { advanced: [{ torch }] };
1695
+ await track.applyConstraints(constraints);
1696
+ }
1674
1697
  function closeStream(stream) {
1675
1698
  if (stream) {
1676
1699
  const tracks = stream.getTracks();
@@ -1722,7 +1745,7 @@ async function closeCamera(video) {
1722
1745
  async function scanCanvas(ctx, readerOptions) {
1723
1746
  if (!ctx) throw new Error("Canvas context not found");
1724
1747
  const imageData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height);
1725
- const imageDataReadResults = await me(imageData, readerOptions);
1748
+ const imageDataReadResults = await be(imageData, readerOptions);
1726
1749
  return imageDataReadResults[0];
1727
1750
  }
1728
1751
  function drawTargetRectangle(ctx, position) {
@@ -1851,7 +1874,7 @@ var NanoScan = class {
1851
1874
  this.offscreenCanvasNode.style.width = `100%`;
1852
1875
  if (this.options.zxingWASMUrl) {
1853
1876
  const wasm_url = this.options.zxingWASMUrl;
1854
- ye({ overrides: { locateFile: (path, prefix) => {
1877
+ $e({ overrides: { locateFile: (path, prefix) => {
1855
1878
  if (path.endsWith(".wasm")) return wasm_url;
1856
1879
  return prefix + path;
1857
1880
  } } });
@@ -1933,6 +1956,9 @@ var NanoScan = class {
1933
1956
  }
1934
1957
  this.zoom = _zoom;
1935
1958
  }
1959
+ toggleTorch(bool) {
1960
+ applyVideoTorch(this.videoNode, bool);
1961
+ }
1936
1962
  };
1937
1963
 
1938
1964
  //#endregion