barcode-detector 2.2.3 → 2.2.4

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