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