barcode-detector 2.0.4 → 2.1.0
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/README.md +5 -7
- package/dist/cjs/BarcodeDetector.d.ts +2 -2
- package/dist/cjs/pure.js +5 -3
- package/dist/es/BarcodeDetector.d.ts +2 -2
- package/dist/es/pure.js +2568 -1293
- package/dist/iife/index.js +5 -3
- package/dist/iife/pure.js +5 -3
- package/dist/iife/side-effects.js +5 -3
- package/package.json +6 -6
package/dist/es/pure.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var aa = (d, g, u) => {
|
|
2
|
+
if (!g.has(d))
|
|
3
|
+
throw TypeError("Cannot " + u);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var Kn = (d, g, u) => (aa(d, g, "read from private field"), u ? u.call(d) : g.get(d)), oa = (d, g, u) => {
|
|
6
|
+
if (g.has(d))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
const
|
|
8
|
+
g instanceof WeakSet ? g.add(d) : g.set(d, u);
|
|
9
|
+
}, ia = (d, g, u, x) => (aa(d, g, "write to private field"), x ? x.call(d, u) : g.set(d, u), u);
|
|
10
|
+
const sa = [
|
|
11
11
|
"aztec",
|
|
12
12
|
"code_128",
|
|
13
13
|
"code_39",
|
|
@@ -23,267 +23,226 @@ const Xe = [
|
|
|
23
23
|
"upc_e",
|
|
24
24
|
"unknown"
|
|
25
25
|
];
|
|
26
|
-
function
|
|
27
|
-
if (
|
|
26
|
+
function Ca(d) {
|
|
27
|
+
if (da(d))
|
|
28
28
|
return {
|
|
29
|
-
width:
|
|
30
|
-
height:
|
|
29
|
+
width: d.naturalWidth,
|
|
30
|
+
height: d.naturalHeight
|
|
31
31
|
};
|
|
32
|
-
if (
|
|
32
|
+
if (ha(d))
|
|
33
33
|
return {
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
34
|
+
width: d.width.baseVal.value,
|
|
35
|
+
height: d.height.baseVal.value
|
|
36
36
|
};
|
|
37
|
-
if (
|
|
37
|
+
if (fa(d))
|
|
38
38
|
return {
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
39
|
+
width: d.videoWidth,
|
|
40
|
+
height: d.videoHeight
|
|
41
41
|
};
|
|
42
|
-
if (
|
|
42
|
+
if (ma(d))
|
|
43
43
|
return {
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
44
|
+
width: d.width,
|
|
45
|
+
height: d.height
|
|
46
46
|
};
|
|
47
|
-
if (
|
|
47
|
+
if (va(d))
|
|
48
48
|
return {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
49
|
+
width: d.displayWidth,
|
|
50
|
+
height: d.displayHeight
|
|
51
51
|
};
|
|
52
|
-
if (
|
|
52
|
+
if (pa(d))
|
|
53
53
|
return {
|
|
54
|
-
width:
|
|
55
|
-
height:
|
|
54
|
+
width: d.width,
|
|
55
|
+
height: d.height
|
|
56
56
|
};
|
|
57
|
-
if (
|
|
57
|
+
if (ya(d))
|
|
58
58
|
return {
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
59
|
+
width: d.width,
|
|
60
|
+
height: d.height
|
|
61
61
|
};
|
|
62
62
|
throw new TypeError(
|
|
63
63
|
"The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function da(d) {
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return d instanceof HTMLImageElement;
|
|
69
69
|
} catch {
|
|
70
70
|
return !1;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ha(d) {
|
|
74
74
|
try {
|
|
75
|
-
return
|
|
75
|
+
return d instanceof SVGImageElement;
|
|
76
76
|
} catch {
|
|
77
77
|
return !1;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function fa(d) {
|
|
81
81
|
try {
|
|
82
|
-
return
|
|
82
|
+
return d instanceof HTMLVideoElement;
|
|
83
83
|
} catch {
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function pa(d) {
|
|
88
88
|
try {
|
|
89
|
-
return
|
|
89
|
+
return d instanceof HTMLCanvasElement;
|
|
90
90
|
} catch {
|
|
91
91
|
return !1;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ma(d) {
|
|
95
95
|
try {
|
|
96
|
-
return
|
|
96
|
+
return d instanceof ImageBitmap;
|
|
97
97
|
} catch {
|
|
98
98
|
return !1;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ya(d) {
|
|
102
102
|
try {
|
|
103
|
-
return
|
|
103
|
+
return d instanceof OffscreenCanvas;
|
|
104
104
|
} catch {
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function va(d) {
|
|
109
109
|
try {
|
|
110
|
-
return
|
|
110
|
+
return d instanceof VideoFrame;
|
|
111
111
|
} catch {
|
|
112
112
|
return !1;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function ga(d) {
|
|
116
116
|
try {
|
|
117
|
-
return
|
|
117
|
+
return d instanceof Blob;
|
|
118
118
|
} catch {
|
|
119
119
|
return !1;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function _a(d) {
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return d instanceof ImageData;
|
|
125
125
|
} catch {
|
|
126
126
|
return !1;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ta(d, g) {
|
|
130
130
|
try {
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
133
|
-
return
|
|
131
|
+
const u = new OffscreenCanvas(d, g);
|
|
132
|
+
if (u.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
|
|
133
|
+
return u;
|
|
134
134
|
throw void 0;
|
|
135
135
|
} catch {
|
|
136
|
-
const
|
|
137
|
-
return
|
|
136
|
+
const u = document.createElement("canvas");
|
|
137
|
+
return u.width = d, u.height = g, u;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
async function
|
|
141
|
-
if (
|
|
140
|
+
async function $a(d) {
|
|
141
|
+
if (da(d) && !await Oa(d))
|
|
142
142
|
throw new DOMException(
|
|
143
143
|
"Failed to load or decode HTMLImageElement.",
|
|
144
144
|
"InvalidStateError"
|
|
145
145
|
);
|
|
146
|
-
if (
|
|
146
|
+
if (ha(d) && !await Sa(d))
|
|
147
147
|
throw new DOMException(
|
|
148
148
|
"Failed to load or decode SVGImageElement.",
|
|
149
149
|
"InvalidStateError"
|
|
150
150
|
);
|
|
151
|
-
if (
|
|
151
|
+
if (va(d) && Fa(d))
|
|
152
152
|
throw new DOMException("VideoFrame is closed.", "InvalidStateError");
|
|
153
|
-
if (
|
|
153
|
+
if (fa(d) && (d.readyState === 0 || d.readyState === 1))
|
|
154
154
|
throw new DOMException("Invalid element or state.", "InvalidStateError");
|
|
155
|
-
if (
|
|
155
|
+
if (ma(d) && ja(d))
|
|
156
156
|
throw new DOMException(
|
|
157
157
|
"The image source is detached.",
|
|
158
158
|
"InvalidStateError"
|
|
159
159
|
);
|
|
160
|
-
const { width:
|
|
161
|
-
if (
|
|
160
|
+
const { width: g, height: u } = Ca(d);
|
|
161
|
+
if (g === 0 || u === 0)
|
|
162
162
|
return null;
|
|
163
|
-
const
|
|
164
|
-
|
|
163
|
+
const C = Ta(g, u).getContext("2d");
|
|
164
|
+
C.drawImage(d, 0, 0);
|
|
165
165
|
try {
|
|
166
|
-
return
|
|
166
|
+
return C.getImageData(0, 0, g, u);
|
|
167
167
|
} catch {
|
|
168
168
|
throw new DOMException("Source would taint origin.", "SecurityError");
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
172
|
-
let
|
|
171
|
+
async function Pa(d) {
|
|
172
|
+
let g;
|
|
173
173
|
try {
|
|
174
174
|
if (createImageBitmap)
|
|
175
|
-
|
|
175
|
+
g = await createImageBitmap(d);
|
|
176
176
|
else if (Image) {
|
|
177
|
-
|
|
178
|
-
let
|
|
177
|
+
g = new Image();
|
|
178
|
+
let x = "";
|
|
179
179
|
try {
|
|
180
|
-
|
|
180
|
+
x = URL.createObjectURL(d), g.src = x, await g.decode();
|
|
181
181
|
} finally {
|
|
182
|
-
URL.revokeObjectURL(
|
|
182
|
+
URL.revokeObjectURL(x);
|
|
183
183
|
}
|
|
184
184
|
} else
|
|
185
|
-
return
|
|
185
|
+
return d;
|
|
186
186
|
} catch {
|
|
187
187
|
throw new DOMException(
|
|
188
188
|
"Failed to load or decode Blob.",
|
|
189
189
|
"InvalidStateError"
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
return await
|
|
192
|
+
return await $a(g);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
const { width:
|
|
196
|
-
if (
|
|
194
|
+
function Aa(d) {
|
|
195
|
+
const { width: g, height: u } = d;
|
|
196
|
+
if (g === 0 || u === 0)
|
|
197
197
|
return null;
|
|
198
|
-
const
|
|
198
|
+
const x = d.getContext("2d");
|
|
199
199
|
try {
|
|
200
|
-
return
|
|
200
|
+
return x.getImageData(0, 0, g, u);
|
|
201
201
|
} catch {
|
|
202
202
|
throw new DOMException("Source would taint origin.", "SecurityError");
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
206
|
-
if (
|
|
207
|
-
return await
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
205
|
+
async function Ea(d) {
|
|
206
|
+
if (ga(d))
|
|
207
|
+
return await Pa(d);
|
|
208
|
+
if (_a(d)) {
|
|
209
|
+
if (Da(d))
|
|
210
210
|
throw new DOMException(
|
|
211
211
|
"The image data has been detached.",
|
|
212
212
|
"InvalidStateError"
|
|
213
213
|
);
|
|
214
|
-
return
|
|
214
|
+
return d;
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return pa(d) || ya(d) ? Aa(d) : await $a(d);
|
|
217
217
|
}
|
|
218
|
-
async function
|
|
218
|
+
async function Oa(d) {
|
|
219
219
|
try {
|
|
220
|
-
return await
|
|
220
|
+
return await d.decode(), !0;
|
|
221
221
|
} catch {
|
|
222
222
|
return !1;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
async function
|
|
226
|
-
var
|
|
225
|
+
async function Sa(d) {
|
|
226
|
+
var g;
|
|
227
227
|
try {
|
|
228
|
-
return await ((
|
|
228
|
+
return await ((g = d.decode) == null ? void 0 : g.call(d)), !0;
|
|
229
229
|
} catch {
|
|
230
230
|
return !1;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return
|
|
235
|
-
}
|
|
236
|
-
function La(c) {
|
|
237
|
-
return c.data.buffer.byteLength === 0;
|
|
233
|
+
function Fa(d) {
|
|
234
|
+
return d.format === null;
|
|
238
235
|
}
|
|
239
|
-
function
|
|
240
|
-
return
|
|
236
|
+
function Da(d) {
|
|
237
|
+
return d.data.buffer.byteLength === 0;
|
|
241
238
|
}
|
|
242
|
-
function
|
|
243
|
-
return
|
|
244
|
-
}
|
|
245
|
-
const Je = (c) => {
|
|
246
|
-
let p;
|
|
247
|
-
const i = /* @__PURE__ */ new Set(), v = (O, Y) => {
|
|
248
|
-
const j = typeof O == "function" ? O(p) : O;
|
|
249
|
-
if (!Object.is(j, p)) {
|
|
250
|
-
const F = p;
|
|
251
|
-
p = (Y != null ? Y : typeof j != "object") ? j : Object.assign({}, p, j), i.forEach((V) => V(p, F));
|
|
252
|
-
}
|
|
253
|
-
}, w = () => p, $ = { setState: v, getState: w, subscribe: (O) => (i.add(O), () => i.delete(O)), destroy: () => {
|
|
254
|
-
i.clear();
|
|
255
|
-
} };
|
|
256
|
-
return p = c(v, w, $), $;
|
|
257
|
-
}, Ya = (c) => c ? Je(c) : Je, Na = {
|
|
258
|
-
locateFile: (c, p) => {
|
|
259
|
-
var i;
|
|
260
|
-
const v = (i = c.match(/_(.+?)\.wasm$/)) == null ? void 0 : i[1];
|
|
261
|
-
return v ? `https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.6/dist/${v}/${c}` : p + c;
|
|
262
|
-
}
|
|
263
|
-
}, st = Ya()(() => ({
|
|
264
|
-
zxingModuleWeakMap: /* @__PURE__ */ new WeakMap(),
|
|
265
|
-
zxingModuleOverrides: Na
|
|
266
|
-
}));
|
|
267
|
-
function to(c) {
|
|
268
|
-
st.setState({
|
|
269
|
-
zxingModuleOverrides: c
|
|
270
|
-
});
|
|
239
|
+
function ja(d) {
|
|
240
|
+
return d.width === 0 && d.height === 0;
|
|
271
241
|
}
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
-
c
|
|
275
|
-
);
|
|
276
|
-
if (v && Object.is(p, st.getState().zxingModuleOverrides))
|
|
277
|
-
return v;
|
|
278
|
-
{
|
|
279
|
-
st.setState({
|
|
280
|
-
zxingModuleOverrides: p
|
|
281
|
-
});
|
|
282
|
-
const w = c(p);
|
|
283
|
-
return i.set(c, w), w;
|
|
284
|
-
}
|
|
242
|
+
function ua(d, g) {
|
|
243
|
+
return d instanceof DOMException ? new DOMException(`${g}: ${d.message}`, d.name) : d instanceof Error ? new d.constructor(`${g}: ${d.message}`) : new Error(`${g}: ${d}`);
|
|
285
244
|
}
|
|
286
|
-
const
|
|
245
|
+
const ca = [
|
|
287
246
|
"Aztec",
|
|
288
247
|
"Codabar",
|
|
289
248
|
"Code128",
|
|
@@ -304,519 +263,1946 @@ const Qe = [
|
|
|
304
263
|
"QRCode",
|
|
305
264
|
"UPC-A",
|
|
306
265
|
"UPC-E"
|
|
307
|
-
]
|
|
308
|
-
|
|
266
|
+
];
|
|
267
|
+
function xa(d) {
|
|
268
|
+
return d.join("|");
|
|
269
|
+
}
|
|
270
|
+
function Wa(d) {
|
|
271
|
+
const g = la(d);
|
|
272
|
+
let u = 0, x = ca.length - 1;
|
|
273
|
+
for (; u <= x; ) {
|
|
274
|
+
const C = Math.floor((u + x) / 2), W = ca[C], J = la(W);
|
|
275
|
+
if (J === g)
|
|
276
|
+
return W;
|
|
277
|
+
J < g ? u = C + 1 : x = C - 1;
|
|
278
|
+
}
|
|
279
|
+
return "None";
|
|
280
|
+
}
|
|
281
|
+
function la(d) {
|
|
282
|
+
return d.toLowerCase().replace(/_-\[\]/g, "");
|
|
283
|
+
}
|
|
284
|
+
function Ma(d, g) {
|
|
285
|
+
return d.Binarizer[g];
|
|
286
|
+
}
|
|
287
|
+
function Ra(d, g) {
|
|
288
|
+
return d.CharacterSet[g];
|
|
289
|
+
}
|
|
290
|
+
const Ia = [
|
|
291
|
+
"Text",
|
|
292
|
+
"Binary",
|
|
293
|
+
"Mixed",
|
|
294
|
+
"GS1",
|
|
295
|
+
"ISO15434",
|
|
296
|
+
"UnknownECI"
|
|
297
|
+
];
|
|
298
|
+
function ka(d) {
|
|
299
|
+
return Ia[d.value];
|
|
300
|
+
}
|
|
301
|
+
function Ha(d, g) {
|
|
302
|
+
return d.EanAddOnSymbol[g];
|
|
303
|
+
}
|
|
304
|
+
function Ua(d, g) {
|
|
305
|
+
return d.TextMode[g];
|
|
306
|
+
}
|
|
307
|
+
const He = {
|
|
309
308
|
formats: [],
|
|
310
|
-
|
|
309
|
+
tryHarder: !0,
|
|
310
|
+
tryRotate: !0,
|
|
311
|
+
tryInvert: !0,
|
|
312
|
+
tryDownscale: !0,
|
|
313
|
+
binarizer: "LocalAverage",
|
|
314
|
+
isPure: !1,
|
|
315
|
+
downscaleFactor: 3,
|
|
316
|
+
downscaleThreshold: 500,
|
|
317
|
+
minLineCount: 2,
|
|
318
|
+
maxNumberOfSymbols: 255,
|
|
319
|
+
tryCode39ExtendedMode: !1,
|
|
320
|
+
validateCode39CheckSum: !1,
|
|
321
|
+
validateITFCheckSum: !1,
|
|
322
|
+
returnCodabarStartEnd: !1,
|
|
323
|
+
returnErrors: !1,
|
|
324
|
+
eanAddOnSymbol: "Read",
|
|
325
|
+
textMode: "Plain",
|
|
326
|
+
characterSet: "Unknown"
|
|
311
327
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
328
|
+
function wa(d, g) {
|
|
329
|
+
return {
|
|
330
|
+
...g,
|
|
331
|
+
formats: xa(g.formats),
|
|
332
|
+
binarizer: Ma(d, g.binarizer),
|
|
333
|
+
eanAddOnSymbol: Ha(
|
|
334
|
+
d,
|
|
335
|
+
g.eanAddOnSymbol
|
|
336
|
+
),
|
|
337
|
+
textMode: Ua(d, g.textMode),
|
|
338
|
+
characterSet: Ra(
|
|
339
|
+
d,
|
|
340
|
+
g.characterSet
|
|
341
|
+
)
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function ba(d) {
|
|
345
|
+
return {
|
|
346
|
+
...d,
|
|
347
|
+
format: Wa(d.format),
|
|
348
|
+
eccLevel: d.eccLevel,
|
|
349
|
+
contentType: ka(d.contentType)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
const Va = {
|
|
353
|
+
locateFile: (d, g) => {
|
|
354
|
+
const u = d.match(/_(.+?)\.wasm$/);
|
|
355
|
+
return u ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0-rc.3/dist/${u[1]}/${d}` : g + d;
|
|
337
356
|
}
|
|
338
|
-
|
|
357
|
+
};
|
|
358
|
+
let ta = /* @__PURE__ */ new WeakMap();
|
|
359
|
+
function ra(d, g) {
|
|
360
|
+
var u;
|
|
361
|
+
const x = ta.get(d);
|
|
362
|
+
if (x != null && x.modulePromise && (g === void 0 || Object.is(g, x.moduleOverrides)))
|
|
363
|
+
return x.modulePromise;
|
|
364
|
+
const C = (u = g != null ? g : x == null ? void 0 : x.moduleOverrides) != null ? u : Va, W = d({ ...C });
|
|
365
|
+
return ta.set(d, {
|
|
366
|
+
moduleOverrides: C,
|
|
367
|
+
modulePromise: W
|
|
368
|
+
}), W;
|
|
369
|
+
}
|
|
370
|
+
function Ba(d, g) {
|
|
371
|
+
ta.set(d, {
|
|
372
|
+
moduleOverrides: g
|
|
373
|
+
});
|
|
339
374
|
}
|
|
340
|
-
async function
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
} =
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
width: Y,
|
|
351
|
-
height: j,
|
|
352
|
-
data: { byteLength: F }
|
|
353
|
-
} = c, V = $._malloc(F);
|
|
354
|
-
$.HEAPU8.set(O, V);
|
|
355
|
-
const L = $.readBarcodesFromPixmap(
|
|
356
|
-
V,
|
|
357
|
-
Y,
|
|
358
|
-
j,
|
|
359
|
-
p,
|
|
360
|
-
ur(i),
|
|
361
|
-
v
|
|
375
|
+
async function Ya(d, g, u = He) {
|
|
376
|
+
const x = {
|
|
377
|
+
...He,
|
|
378
|
+
...u
|
|
379
|
+
}, C = await ra(d), { size: W } = g, J = new Uint8Array(await g.arrayBuffer()), Z = C._malloc(W);
|
|
380
|
+
C.HEAPU8.set(J, Z);
|
|
381
|
+
const q = C.readBarcodesFromImage(
|
|
382
|
+
Z,
|
|
383
|
+
W,
|
|
384
|
+
wa(C, x)
|
|
362
385
|
);
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
for (let
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
return U;
|
|
386
|
+
C._free(Z);
|
|
387
|
+
const I = [];
|
|
388
|
+
for (let rt = 0; rt < q.size(); ++rt)
|
|
389
|
+
I.push(
|
|
390
|
+
ba(q.get(rt))
|
|
391
|
+
);
|
|
392
|
+
return I;
|
|
373
393
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
394
|
+
async function La(d, g, u = He) {
|
|
395
|
+
const x = {
|
|
396
|
+
...He,
|
|
397
|
+
...u
|
|
398
|
+
}, C = await ra(d), {
|
|
399
|
+
data: W,
|
|
400
|
+
width: J,
|
|
401
|
+
height: Z,
|
|
402
|
+
data: { byteLength: q }
|
|
403
|
+
} = g, I = C._malloc(q);
|
|
404
|
+
C.HEAPU8.set(W, I);
|
|
405
|
+
const rt = C.readBarcodesFromPixmap(
|
|
406
|
+
I,
|
|
407
|
+
J,
|
|
408
|
+
Z,
|
|
409
|
+
wa(C, x)
|
|
410
|
+
);
|
|
411
|
+
C._free(I);
|
|
412
|
+
const nt = [];
|
|
413
|
+
for (let z = 0; z < rt.size(); ++z)
|
|
414
|
+
nt.push(
|
|
415
|
+
ba(rt.get(z))
|
|
416
|
+
);
|
|
417
|
+
return nt;
|
|
376
418
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
419
|
+
var na = (() => {
|
|
420
|
+
var d = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
421
|
+
return function(g = {}) {
|
|
422
|
+
var u = g, x, C;
|
|
423
|
+
u.ready = new Promise((n, t) => {
|
|
424
|
+
x = n, C = t;
|
|
425
|
+
});
|
|
426
|
+
var W = Object.assign({}, u), J = "./this.program", Z = typeof window == "object", q = typeof importScripts == "function";
|
|
427
|
+
typeof process == "object" && typeof process.versions == "object" && process.versions.node;
|
|
428
|
+
var I = "";
|
|
429
|
+
function rt(n) {
|
|
430
|
+
return u.locateFile ? u.locateFile(n, I) : I + n;
|
|
431
|
+
}
|
|
432
|
+
var nt;
|
|
433
|
+
(Z || q) && (q ? I = self.location.href : typeof document < "u" && document.currentScript && (I = document.currentScript.src), d && (I = d), I.indexOf("blob:") !== 0 ? I = I.substr(0, I.replace(/[?#].*/, "").lastIndexOf("/") + 1) : I = "", q && (nt = (n) => {
|
|
434
|
+
var t = new XMLHttpRequest();
|
|
435
|
+
return t.open("GET", n, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
|
|
436
|
+
})), u.print || console.log.bind(console);
|
|
437
|
+
var z = u.printErr || console.error.bind(console);
|
|
438
|
+
Object.assign(u, W), W = null, u.arguments && u.arguments, u.thisProgram && (J = u.thisProgram), u.quit && u.quit;
|
|
439
|
+
var Q;
|
|
440
|
+
u.wasmBinary && (Q = u.wasmBinary), typeof WebAssembly != "object" && ht("no native wasm support detected");
|
|
441
|
+
var ut, Ft = !1;
|
|
442
|
+
function Zt(n, t) {
|
|
443
|
+
n || ht(t);
|
|
444
|
+
}
|
|
445
|
+
var U, k, at, lt, R, _, Qt, Kt;
|
|
446
|
+
function te() {
|
|
447
|
+
var n = ut.buffer;
|
|
448
|
+
u.HEAP8 = U = new Int8Array(n), u.HEAP16 = at = new Int16Array(n), u.HEAPU8 = k = new Uint8Array(n), u.HEAPU16 = lt = new Uint16Array(n), u.HEAP32 = R = new Int32Array(n), u.HEAPU32 = _ = new Uint32Array(n), u.HEAPF32 = Qt = new Float32Array(n), u.HEAPF64 = Kt = new Float64Array(n);
|
|
449
|
+
}
|
|
450
|
+
var ee = [], re = [], ne = [];
|
|
451
|
+
function Ue() {
|
|
452
|
+
if (u.preRun)
|
|
453
|
+
for (typeof u.preRun == "function" && (u.preRun = [u.preRun]); u.preRun.length; )
|
|
454
|
+
Ye(u.preRun.shift());
|
|
455
|
+
Dt(ee);
|
|
456
|
+
}
|
|
457
|
+
function Ve() {
|
|
458
|
+
Dt(re);
|
|
459
|
+
}
|
|
460
|
+
function Be() {
|
|
461
|
+
if (u.postRun)
|
|
462
|
+
for (typeof u.postRun == "function" && (u.postRun = [u.postRun]); u.postRun.length; )
|
|
463
|
+
ze(u.postRun.shift());
|
|
464
|
+
Dt(ne);
|
|
465
|
+
}
|
|
466
|
+
function Ye(n) {
|
|
467
|
+
ee.unshift(n);
|
|
468
|
+
}
|
|
469
|
+
function Le(n) {
|
|
470
|
+
re.unshift(n);
|
|
471
|
+
}
|
|
472
|
+
function ze(n) {
|
|
473
|
+
ne.unshift(n);
|
|
474
|
+
}
|
|
475
|
+
var K = 0, dt = null;
|
|
476
|
+
function Ne(n) {
|
|
477
|
+
K++, u.monitorRunDependencies && u.monitorRunDependencies(K);
|
|
478
|
+
}
|
|
479
|
+
function Ge(n) {
|
|
480
|
+
if (K--, u.monitorRunDependencies && u.monitorRunDependencies(K), K == 0 && dt) {
|
|
481
|
+
var t = dt;
|
|
482
|
+
dt = null, t();
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function ht(n) {
|
|
486
|
+
u.onAbort && u.onAbort(n), n = "Aborted(" + n + ")", z(n), Ft = !0, n += ". Build with -sASSERTIONS for more info.";
|
|
487
|
+
var t = new WebAssembly.RuntimeError(n);
|
|
488
|
+
throw C(t), t;
|
|
489
|
+
}
|
|
490
|
+
var qe = "data:application/octet-stream;base64,", ae = (n) => n.startsWith(qe), ot;
|
|
491
|
+
ot = "zxing_reader.wasm", ae(ot) || (ot = rt(ot));
|
|
492
|
+
function oe(n) {
|
|
493
|
+
if (n == ot && Q)
|
|
494
|
+
return new Uint8Array(Q);
|
|
495
|
+
if (nt)
|
|
496
|
+
return nt(n);
|
|
497
|
+
throw "both async and sync fetching of the wasm failed";
|
|
498
|
+
}
|
|
499
|
+
function Xe(n) {
|
|
500
|
+
return !Q && (Z || q) && typeof fetch == "function" ? fetch(n, { credentials: "same-origin" }).then((t) => {
|
|
501
|
+
if (!t.ok)
|
|
502
|
+
throw "failed to load wasm binary file at '" + n + "'";
|
|
503
|
+
return t.arrayBuffer();
|
|
504
|
+
}).catch(() => oe(n)) : Promise.resolve().then(() => oe(n));
|
|
505
|
+
}
|
|
506
|
+
function ie(n, t, e) {
|
|
507
|
+
return Xe(n).then((r) => WebAssembly.instantiate(r, t)).then((r) => r).then(e, (r) => {
|
|
508
|
+
z(`failed to asynchronously prepare wasm: ${r}`), ht(r);
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function Je(n, t, e, r) {
|
|
512
|
+
return !n && typeof WebAssembly.instantiateStreaming == "function" && !ae(t) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then((a) => {
|
|
513
|
+
var o = WebAssembly.instantiateStreaming(a, e);
|
|
514
|
+
return o.then(r, function(i) {
|
|
515
|
+
return z(`wasm streaming compile failed: ${i}`), z("falling back to ArrayBuffer instantiation"), ie(t, e, r);
|
|
516
|
+
});
|
|
517
|
+
}) : ie(t, e, r);
|
|
518
|
+
}
|
|
519
|
+
function Ze() {
|
|
520
|
+
var n = { a: jn };
|
|
521
|
+
function t(r, a) {
|
|
522
|
+
return P = r.exports, ut = P.fa, te(), ge = P.ja, Le(P.ga), Ge(), P;
|
|
523
|
+
}
|
|
524
|
+
Ne();
|
|
525
|
+
function e(r) {
|
|
526
|
+
t(r.instance);
|
|
527
|
+
}
|
|
528
|
+
if (u.instantiateWasm)
|
|
529
|
+
try {
|
|
530
|
+
return u.instantiateWasm(n, t);
|
|
531
|
+
} catch (r) {
|
|
532
|
+
z(`Module.instantiateWasm callback failed with error: ${r}`), C(r);
|
|
533
|
+
}
|
|
534
|
+
return Je(Q, ot, n, e).catch(C), {};
|
|
535
|
+
}
|
|
536
|
+
var Dt = (n) => {
|
|
537
|
+
for (; n.length > 0; )
|
|
538
|
+
n.shift()(u);
|
|
539
|
+
};
|
|
540
|
+
u.noExitRuntime;
|
|
541
|
+
var $t = [], wt = 0, Qe = (n) => {
|
|
542
|
+
var t = new jt(n);
|
|
543
|
+
return t.get_caught() || (t.set_caught(!0), wt--), t.set_rethrown(!1), $t.push(t), We(t.excPtr), t.get_exception_ptr();
|
|
544
|
+
}, N = 0, Ke = () => {
|
|
545
|
+
T(0, 0);
|
|
546
|
+
var n = $t.pop();
|
|
547
|
+
xe(n.excPtr), N = 0;
|
|
548
|
+
};
|
|
549
|
+
function jt(n) {
|
|
550
|
+
this.excPtr = n, this.ptr = n - 24, this.set_type = function(t) {
|
|
551
|
+
_[this.ptr + 4 >> 2] = t;
|
|
552
|
+
}, this.get_type = function() {
|
|
553
|
+
return _[this.ptr + 4 >> 2];
|
|
554
|
+
}, this.set_destructor = function(t) {
|
|
555
|
+
_[this.ptr + 8 >> 2] = t;
|
|
556
|
+
}, this.get_destructor = function() {
|
|
557
|
+
return _[this.ptr + 8 >> 2];
|
|
558
|
+
}, this.set_caught = function(t) {
|
|
559
|
+
t = t ? 1 : 0, U[this.ptr + 12 >> 0] = t;
|
|
560
|
+
}, this.get_caught = function() {
|
|
561
|
+
return U[this.ptr + 12 >> 0] != 0;
|
|
562
|
+
}, this.set_rethrown = function(t) {
|
|
563
|
+
t = t ? 1 : 0, U[this.ptr + 13 >> 0] = t;
|
|
564
|
+
}, this.get_rethrown = function() {
|
|
565
|
+
return U[this.ptr + 13 >> 0] != 0;
|
|
566
|
+
}, this.init = function(t, e) {
|
|
567
|
+
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(e);
|
|
568
|
+
}, this.set_adjusted_ptr = function(t) {
|
|
569
|
+
_[this.ptr + 16 >> 2] = t;
|
|
570
|
+
}, this.get_adjusted_ptr = function() {
|
|
571
|
+
return _[this.ptr + 16 >> 2];
|
|
572
|
+
}, this.get_exception_ptr = function() {
|
|
573
|
+
var t = Re(this.get_type());
|
|
574
|
+
if (t)
|
|
575
|
+
return _[this.excPtr >> 2];
|
|
576
|
+
var e = this.get_adjusted_ptr();
|
|
577
|
+
return e !== 0 ? e : this.excPtr;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
var tr = (n) => {
|
|
581
|
+
throw N || (N = n), N;
|
|
582
|
+
}, xt = (n) => {
|
|
583
|
+
var t = N;
|
|
584
|
+
if (!t)
|
|
585
|
+
return gt(0), 0;
|
|
586
|
+
var e = new jt(t);
|
|
587
|
+
e.set_adjusted_ptr(t);
|
|
588
|
+
var r = e.get_type();
|
|
589
|
+
if (!r)
|
|
590
|
+
return gt(0), t;
|
|
591
|
+
for (var a in n) {
|
|
592
|
+
var o = n[a];
|
|
593
|
+
if (o === 0 || o === r)
|
|
594
|
+
break;
|
|
595
|
+
var i = e.ptr + 16;
|
|
596
|
+
if (Me(o, r, i))
|
|
597
|
+
return gt(o), t;
|
|
598
|
+
}
|
|
599
|
+
return gt(r), t;
|
|
600
|
+
}, er = () => xt([]), rr = (n) => xt([n]), nr = (n, t) => xt([n, t]), ar = () => {
|
|
601
|
+
var n = $t.pop();
|
|
602
|
+
n || ht("no exception to throw");
|
|
603
|
+
var t = n.excPtr;
|
|
604
|
+
throw n.get_rethrown() || ($t.push(n), n.set_rethrown(!0), n.set_caught(!1), wt++), N = t, N;
|
|
605
|
+
}, or = (n, t, e) => {
|
|
606
|
+
var r = new jt(n);
|
|
607
|
+
throw r.init(t, e), N = n, wt++, N;
|
|
608
|
+
}, ir = () => wt, bt = {}, se = (n) => {
|
|
609
|
+
for (; n.length; ) {
|
|
610
|
+
var t = n.pop(), e = n.pop();
|
|
611
|
+
e(t);
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
function Wt(n) {
|
|
615
|
+
return this.fromWireType(R[n >> 2]);
|
|
616
|
+
}
|
|
617
|
+
var it = {}, tt = {}, Ct = {}, ue, _t = (n) => {
|
|
618
|
+
throw new ue(n);
|
|
619
|
+
}, et = (n, t, e) => {
|
|
620
|
+
n.forEach(function(s) {
|
|
621
|
+
Ct[s] = t;
|
|
622
|
+
});
|
|
623
|
+
function r(s) {
|
|
624
|
+
var c = e(s);
|
|
625
|
+
c.length !== n.length && _t("Mismatched type converter count");
|
|
626
|
+
for (var l = 0; l < n.length; ++l)
|
|
627
|
+
Y(n[l], c[l]);
|
|
628
|
+
}
|
|
629
|
+
var a = new Array(t.length), o = [], i = 0;
|
|
630
|
+
t.forEach((s, c) => {
|
|
631
|
+
tt.hasOwnProperty(s) ? a[c] = tt[s] : (o.push(s), it.hasOwnProperty(s) || (it[s] = []), it[s].push(() => {
|
|
632
|
+
a[c] = tt[s], ++i, i === o.length && r(a);
|
|
633
|
+
}));
|
|
634
|
+
}), o.length === 0 && r(a);
|
|
635
|
+
}, sr = (n) => {
|
|
636
|
+
var t = bt[n];
|
|
637
|
+
delete bt[n];
|
|
638
|
+
var e = t.rawConstructor, r = t.rawDestructor, a = t.fields, o = a.map((i) => i.getterReturnType).concat(a.map((i) => i.setterArgumentType));
|
|
639
|
+
et([n], o, (i) => {
|
|
640
|
+
var s = {};
|
|
641
|
+
return a.forEach((c, l) => {
|
|
642
|
+
var f = c.fieldName, m = i[l], y = c.getter, $ = c.getterContext, b = i[l + a.length], S = c.setter, F = c.setterContext;
|
|
643
|
+
s[f] = { read: (D) => m.fromWireType(y($, D)), write: (D, p) => {
|
|
644
|
+
var h = [];
|
|
645
|
+
S(F, D, b.toWireType(h, p)), se(h);
|
|
646
|
+
} };
|
|
647
|
+
}), [{ name: t.name, fromWireType: (c) => {
|
|
648
|
+
var l = {};
|
|
649
|
+
for (var f in s)
|
|
650
|
+
l[f] = s[f].read(c);
|
|
651
|
+
return r(c), l;
|
|
652
|
+
}, toWireType: (c, l) => {
|
|
653
|
+
for (var f in s)
|
|
654
|
+
if (!(f in l))
|
|
655
|
+
throw new TypeError(`Missing field: "${f}"`);
|
|
656
|
+
var m = e();
|
|
657
|
+
for (f in s)
|
|
658
|
+
s[f].write(m, l[f]);
|
|
659
|
+
return c !== null && c.push(r, m), m;
|
|
660
|
+
}, argPackAdvance: L, readValueFromPointer: Wt, destructorFunction: r }];
|
|
661
|
+
});
|
|
662
|
+
}, ur = (n, t, e, r, a) => {
|
|
663
|
+
}, cr = () => {
|
|
664
|
+
for (var n = new Array(256), t = 0; t < 256; ++t)
|
|
665
|
+
n[t] = String.fromCharCode(t);
|
|
666
|
+
ce = n;
|
|
667
|
+
}, ce, M = (n) => {
|
|
668
|
+
for (var t = "", e = n; k[e]; )
|
|
669
|
+
t += ce[k[e++]];
|
|
670
|
+
return t;
|
|
671
|
+
}, st, w = (n) => {
|
|
672
|
+
throw new st(n);
|
|
673
|
+
};
|
|
674
|
+
function lr(n, t, e = {}) {
|
|
675
|
+
var r = t.name;
|
|
676
|
+
if (n || w(`type "${r}" must have a positive integer typeid pointer`), tt.hasOwnProperty(n)) {
|
|
677
|
+
if (e.ignoreDuplicateRegistrations)
|
|
678
|
+
return;
|
|
679
|
+
w(`Cannot register type '${r}' twice`);
|
|
680
|
+
}
|
|
681
|
+
if (tt[n] = t, delete Ct[n], it.hasOwnProperty(n)) {
|
|
682
|
+
var a = it[n];
|
|
683
|
+
delete it[n], a.forEach((o) => o());
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function Y(n, t, e = {}) {
|
|
687
|
+
if (!("argPackAdvance" in t))
|
|
688
|
+
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
689
|
+
return lr(n, t, e);
|
|
690
|
+
}
|
|
691
|
+
var L = 8, dr = (n, t, e, r) => {
|
|
692
|
+
t = M(t), Y(n, { name: t, fromWireType: function(a) {
|
|
693
|
+
return !!a;
|
|
694
|
+
}, toWireType: function(a, o) {
|
|
695
|
+
return o ? e : r;
|
|
696
|
+
}, argPackAdvance: L, readValueFromPointer: function(a) {
|
|
697
|
+
return this.fromWireType(k[a]);
|
|
698
|
+
}, destructorFunction: null });
|
|
699
|
+
}, hr = (n) => ({ count: n.count, deleteScheduled: n.deleteScheduled, preservePointerOnDelete: n.preservePointerOnDelete, ptr: n.ptr, ptrType: n.ptrType, smartPtr: n.smartPtr, smartPtrType: n.smartPtrType }), Mt = (n) => {
|
|
700
|
+
function t(e) {
|
|
701
|
+
return e.$$.ptrType.registeredClass.name;
|
|
702
|
+
}
|
|
703
|
+
w(t(n) + " instance already deleted");
|
|
704
|
+
}, Rt = !1, le = (n) => {
|
|
705
|
+
}, fr = (n) => {
|
|
706
|
+
n.smartPtr ? n.smartPtrType.rawDestructor(n.smartPtr) : n.ptrType.registeredClass.rawDestructor(n.ptr);
|
|
707
|
+
}, de = (n) => {
|
|
708
|
+
n.count.value -= 1;
|
|
709
|
+
var t = n.count.value === 0;
|
|
710
|
+
t && fr(n);
|
|
711
|
+
}, he = (n, t, e) => {
|
|
712
|
+
if (t === e)
|
|
713
|
+
return n;
|
|
714
|
+
if (e.baseClass === void 0)
|
|
715
|
+
return null;
|
|
716
|
+
var r = he(n, t, e.baseClass);
|
|
717
|
+
return r === null ? null : e.downcast(r);
|
|
718
|
+
}, fe = {}, pr = () => Object.keys(mt).length, mr = () => {
|
|
719
|
+
var n = [];
|
|
720
|
+
for (var t in mt)
|
|
721
|
+
mt.hasOwnProperty(t) && n.push(mt[t]);
|
|
722
|
+
return n;
|
|
723
|
+
}, ft = [], It = () => {
|
|
724
|
+
for (; ft.length; ) {
|
|
725
|
+
var n = ft.pop();
|
|
726
|
+
n.$$.deleteScheduled = !1, n.delete();
|
|
727
|
+
}
|
|
728
|
+
}, pt, yr = (n) => {
|
|
729
|
+
pt = n, ft.length && pt && pt(It);
|
|
730
|
+
}, vr = () => {
|
|
731
|
+
u.getInheritedInstanceCount = pr, u.getLiveInheritedInstances = mr, u.flushPendingDeletes = It, u.setDelayFunction = yr;
|
|
732
|
+
}, mt = {}, gr = (n, t) => {
|
|
733
|
+
for (t === void 0 && w("ptr should not be undefined"); n.baseClass; )
|
|
734
|
+
t = n.upcast(t), n = n.baseClass;
|
|
735
|
+
return t;
|
|
736
|
+
}, $r = (n, t) => (t = gr(n, t), mt[t]), Tt = (n, t) => {
|
|
737
|
+
(!t.ptrType || !t.ptr) && _t("makeClassHandle requires ptr and ptrType");
|
|
738
|
+
var e = !!t.smartPtrType, r = !!t.smartPtr;
|
|
739
|
+
return e !== r && _t("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, yt(Object.create(n, { $$: { value: t } }));
|
|
740
|
+
};
|
|
741
|
+
function wr(n) {
|
|
742
|
+
var t = this.getPointee(n);
|
|
743
|
+
if (!t)
|
|
744
|
+
return this.destructor(n), null;
|
|
745
|
+
var e = $r(this.registeredClass, t);
|
|
746
|
+
if (e !== void 0) {
|
|
747
|
+
if (e.$$.count.value === 0)
|
|
748
|
+
return e.$$.ptr = t, e.$$.smartPtr = n, e.clone();
|
|
749
|
+
var r = e.clone();
|
|
750
|
+
return this.destructor(n), r;
|
|
751
|
+
}
|
|
752
|
+
function a() {
|
|
753
|
+
return this.isSmartPointer ? Tt(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: n }) : Tt(this.registeredClass.instancePrototype, { ptrType: this, ptr: n });
|
|
754
|
+
}
|
|
755
|
+
var o = this.registeredClass.getActualType(t), i = fe[o];
|
|
756
|
+
if (!i)
|
|
757
|
+
return a.call(this);
|
|
758
|
+
var s;
|
|
759
|
+
this.isConst ? s = i.constPointerType : s = i.pointerType;
|
|
760
|
+
var c = he(t, this.registeredClass, s.registeredClass);
|
|
761
|
+
return c === null ? a.call(this) : this.isSmartPointer ? Tt(s.registeredClass.instancePrototype, { ptrType: s, ptr: c, smartPtrType: this, smartPtr: n }) : Tt(s.registeredClass.instancePrototype, { ptrType: s, ptr: c });
|
|
762
|
+
}
|
|
763
|
+
var yt = (n) => typeof FinalizationRegistry > "u" ? (yt = (t) => t, n) : (Rt = new FinalizationRegistry((t) => {
|
|
764
|
+
de(t.$$);
|
|
765
|
+
}), yt = (t) => {
|
|
766
|
+
var e = t.$$, r = !!e.smartPtr;
|
|
767
|
+
if (r) {
|
|
768
|
+
var a = { $$: e };
|
|
769
|
+
Rt.register(t, a, t);
|
|
770
|
+
}
|
|
771
|
+
return t;
|
|
772
|
+
}, le = (t) => Rt.unregister(t), yt(n)), br = () => {
|
|
773
|
+
Object.assign(Pt.prototype, { isAliasOf(n) {
|
|
774
|
+
if (!(this instanceof Pt) || !(n instanceof Pt))
|
|
775
|
+
return !1;
|
|
776
|
+
var t = this.$$.ptrType.registeredClass, e = this.$$.ptr;
|
|
777
|
+
n.$$ = n.$$;
|
|
778
|
+
for (var r = n.$$.ptrType.registeredClass, a = n.$$.ptr; t.baseClass; )
|
|
779
|
+
e = t.upcast(e), t = t.baseClass;
|
|
780
|
+
for (; r.baseClass; )
|
|
781
|
+
a = r.upcast(a), r = r.baseClass;
|
|
782
|
+
return t === r && e === a;
|
|
783
|
+
}, clone() {
|
|
784
|
+
if (this.$$.ptr || Mt(this), this.$$.preservePointerOnDelete)
|
|
785
|
+
return this.$$.count.value += 1, this;
|
|
786
|
+
var n = yt(Object.create(Object.getPrototypeOf(this), { $$: { value: hr(this.$$) } }));
|
|
787
|
+
return n.$$.count.value += 1, n.$$.deleteScheduled = !1, n;
|
|
788
|
+
}, delete() {
|
|
789
|
+
this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), le(this), de(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
790
|
+
}, isDeleted() {
|
|
791
|
+
return !this.$$.ptr;
|
|
792
|
+
}, deleteLater() {
|
|
793
|
+
return this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), ft.push(this), ft.length === 1 && pt && pt(It), this.$$.deleteScheduled = !0, this;
|
|
794
|
+
} });
|
|
795
|
+
};
|
|
796
|
+
function Pt() {
|
|
797
|
+
}
|
|
798
|
+
var Cr = 48, _r = 57, pe = (n) => {
|
|
799
|
+
if (n === void 0)
|
|
800
|
+
return "_unknown";
|
|
801
|
+
n = n.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
802
|
+
var t = n.charCodeAt(0);
|
|
803
|
+
return t >= Cr && t <= _r ? `_${n}` : n;
|
|
804
|
+
};
|
|
805
|
+
function kt(n, t) {
|
|
806
|
+
return n = pe(n), { [n]: function() {
|
|
807
|
+
return t.apply(this, arguments);
|
|
808
|
+
} }[n];
|
|
809
|
+
}
|
|
810
|
+
var me = (n, t, e) => {
|
|
811
|
+
if (n[t].overloadTable === void 0) {
|
|
812
|
+
var r = n[t];
|
|
813
|
+
n[t] = function() {
|
|
814
|
+
return n[t].overloadTable.hasOwnProperty(arguments.length) || w(`Function '${e}' called with an invalid number of arguments (${arguments.length}) - expects one of (${n[t].overloadTable})!`), n[t].overloadTable[arguments.length].apply(this, arguments);
|
|
815
|
+
}, n[t].overloadTable = [], n[t].overloadTable[r.argCount] = r;
|
|
816
|
+
}
|
|
817
|
+
}, Ht = (n, t, e) => {
|
|
818
|
+
u.hasOwnProperty(n) ? ((e === void 0 || u[n].overloadTable !== void 0 && u[n].overloadTable[e] !== void 0) && w(`Cannot register public name '${n}' twice`), me(u, n, n), u.hasOwnProperty(e) && w(`Cannot register multiple overloads of a function with the same number of arguments (${e})!`), u[n].overloadTable[e] = t) : (u[n] = t, e !== void 0 && (u[n].numArguments = e));
|
|
819
|
+
};
|
|
820
|
+
function Tr(n, t, e, r, a, o, i, s) {
|
|
821
|
+
this.name = n, this.constructor = t, this.instancePrototype = e, this.rawDestructor = r, this.baseClass = a, this.getActualType = o, this.upcast = i, this.downcast = s, this.pureVirtualFunctions = [];
|
|
822
|
+
}
|
|
823
|
+
var Ut = (n, t, e) => {
|
|
824
|
+
for (; t !== e; )
|
|
825
|
+
t.upcast || w(`Expected null or instance of ${e.name}, got an instance of ${t.name}`), n = t.upcast(n), t = t.baseClass;
|
|
826
|
+
return n;
|
|
827
|
+
};
|
|
828
|
+
function Pr(n, t) {
|
|
829
|
+
if (t === null)
|
|
830
|
+
return this.isReference && w(`null is not a valid ${this.name}`), 0;
|
|
831
|
+
t.$$ || w(`Cannot pass "${Lt(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
832
|
+
var e = t.$$.ptrType.registeredClass, r = Ut(t.$$.ptr, e, this.registeredClass);
|
|
833
|
+
return r;
|
|
834
|
+
}
|
|
835
|
+
function Ar(n, t) {
|
|
836
|
+
var e;
|
|
837
|
+
if (t === null)
|
|
838
|
+
return this.isReference && w(`null is not a valid ${this.name}`), this.isSmartPointer ? (e = this.rawConstructor(), n !== null && n.push(this.rawDestructor, e), e) : 0;
|
|
839
|
+
t.$$ || w(`Cannot pass "${Lt(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && w(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
840
|
+
var r = t.$$.ptrType.registeredClass;
|
|
841
|
+
if (e = Ut(t.$$.ptr, r, this.registeredClass), this.isSmartPointer)
|
|
842
|
+
switch (t.$$.smartPtr === void 0 && w("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
843
|
+
case 0:
|
|
844
|
+
t.$$.smartPtrType === this ? e = t.$$.smartPtr : w(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
845
|
+
break;
|
|
846
|
+
case 1:
|
|
847
|
+
e = t.$$.smartPtr;
|
|
848
|
+
break;
|
|
849
|
+
case 2:
|
|
850
|
+
if (t.$$.smartPtrType === this)
|
|
851
|
+
e = t.$$.smartPtr;
|
|
852
|
+
else {
|
|
853
|
+
var a = t.clone();
|
|
854
|
+
e = this.rawShare(e, X.toHandle(() => a.delete())), n !== null && n.push(this.rawDestructor, e);
|
|
855
|
+
}
|
|
856
|
+
break;
|
|
857
|
+
default:
|
|
858
|
+
w("Unsupporting sharing policy");
|
|
859
|
+
}
|
|
860
|
+
return e;
|
|
861
|
+
}
|
|
862
|
+
function Er(n, t) {
|
|
863
|
+
if (t === null)
|
|
864
|
+
return this.isReference && w(`null is not a valid ${this.name}`), 0;
|
|
865
|
+
t.$$ || w(`Cannot pass "${Lt(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && w(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
866
|
+
var e = t.$$.ptrType.registeredClass, r = Ut(t.$$.ptr, e, this.registeredClass);
|
|
867
|
+
return r;
|
|
868
|
+
}
|
|
869
|
+
function ye(n) {
|
|
870
|
+
return this.fromWireType(_[n >> 2]);
|
|
871
|
+
}
|
|
872
|
+
var Or = () => {
|
|
873
|
+
Object.assign(At.prototype, { getPointee(n) {
|
|
874
|
+
return this.rawGetPointee && (n = this.rawGetPointee(n)), n;
|
|
875
|
+
}, destructor(n) {
|
|
876
|
+
this.rawDestructor && this.rawDestructor(n);
|
|
877
|
+
}, argPackAdvance: L, readValueFromPointer: ye, deleteObject(n) {
|
|
878
|
+
n !== null && n.delete();
|
|
879
|
+
}, fromWireType: wr });
|
|
880
|
+
};
|
|
881
|
+
function At(n, t, e, r, a, o, i, s, c, l, f) {
|
|
882
|
+
this.name = n, this.registeredClass = t, this.isReference = e, this.isConst = r, this.isSmartPointer = a, this.pointeeType = o, this.sharingPolicy = i, this.rawGetPointee = s, this.rawConstructor = c, this.rawShare = l, this.rawDestructor = f, !a && t.baseClass === void 0 ? r ? (this.toWireType = Pr, this.destructorFunction = null) : (this.toWireType = Er, this.destructorFunction = null) : this.toWireType = Ar;
|
|
883
|
+
}
|
|
884
|
+
var ve = (n, t, e) => {
|
|
885
|
+
u.hasOwnProperty(n) || _t("Replacing nonexistant public symbol"), u[n].overloadTable !== void 0 && e !== void 0 ? u[n].overloadTable[e] = t : (u[n] = t, u[n].argCount = e);
|
|
886
|
+
}, Sr = (n, t, e) => {
|
|
887
|
+
var r = u["dynCall_" + n];
|
|
888
|
+
return e && e.length ? r.apply(null, [t].concat(e)) : r.call(null, t);
|
|
889
|
+
}, Et = [], ge, A = (n) => {
|
|
890
|
+
var t = Et[n];
|
|
891
|
+
return t || (n >= Et.length && (Et.length = n + 1), Et[n] = t = ge.get(n)), t;
|
|
892
|
+
}, Fr = (n, t, e) => {
|
|
893
|
+
if (n.includes("j"))
|
|
894
|
+
return Sr(n, t, e);
|
|
895
|
+
var r = A(t).apply(null, e);
|
|
896
|
+
return r;
|
|
897
|
+
}, Dr = (n, t) => {
|
|
898
|
+
var e = [];
|
|
899
|
+
return function() {
|
|
900
|
+
return e.length = 0, Object.assign(e, arguments), Fr(n, t, e);
|
|
901
|
+
};
|
|
902
|
+
}, B = (n, t) => {
|
|
903
|
+
n = M(n);
|
|
904
|
+
function e() {
|
|
905
|
+
return n.includes("j") ? Dr(n, t) : A(t);
|
|
906
|
+
}
|
|
907
|
+
var r = e();
|
|
908
|
+
return typeof r != "function" && w(`unknown function pointer with signature ${n}: ${t}`), r;
|
|
909
|
+
}, jr = (n, t) => {
|
|
910
|
+
var e = kt(t, function(r) {
|
|
911
|
+
this.name = t, this.message = r;
|
|
912
|
+
var a = new Error(r).stack;
|
|
913
|
+
a !== void 0 && (this.stack = this.toString() + `
|
|
914
|
+
` + a.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
915
|
+
});
|
|
916
|
+
return e.prototype = Object.create(n.prototype), e.prototype.constructor = e, e.prototype.toString = function() {
|
|
917
|
+
return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
|
|
918
|
+
}, e;
|
|
919
|
+
}, $e, we = (n) => {
|
|
920
|
+
var t = je(n), e = M(t);
|
|
921
|
+
return G(t), e;
|
|
922
|
+
}, Ot = (n, t) => {
|
|
923
|
+
var e = [], r = {};
|
|
924
|
+
function a(o) {
|
|
925
|
+
if (!r[o] && !tt[o]) {
|
|
926
|
+
if (Ct[o]) {
|
|
927
|
+
Ct[o].forEach(a);
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
e.push(o), r[o] = !0;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
throw t.forEach(a), new $e(`${n}: ` + e.map(we).join([", "]));
|
|
934
|
+
}, xr = (n, t, e, r, a, o, i, s, c, l, f, m, y) => {
|
|
935
|
+
f = M(f), o = B(a, o), s && (s = B(i, s)), l && (l = B(c, l)), y = B(m, y);
|
|
936
|
+
var $ = pe(f);
|
|
937
|
+
Ht($, function() {
|
|
938
|
+
Ot(`Cannot construct ${f} due to unbound types`, [r]);
|
|
939
|
+
}), et([n, t, e], r ? [r] : [], function(b) {
|
|
940
|
+
b = b[0];
|
|
941
|
+
var S, F;
|
|
942
|
+
r ? (S = b.registeredClass, F = S.instancePrototype) : F = Pt.prototype;
|
|
943
|
+
var D = kt($, function() {
|
|
944
|
+
if (Object.getPrototypeOf(this) !== p)
|
|
945
|
+
throw new st("Use 'new' to construct " + f);
|
|
946
|
+
if (h.constructor_body === void 0)
|
|
947
|
+
throw new st(f + " has no accessible constructor");
|
|
948
|
+
var ct = h.constructor_body[arguments.length];
|
|
949
|
+
if (ct === void 0)
|
|
950
|
+
throw new st(`Tried to invoke ctor of ${f} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);
|
|
951
|
+
return ct.apply(this, arguments);
|
|
952
|
+
}), p = Object.create(F, { constructor: { value: D } });
|
|
953
|
+
D.prototype = p;
|
|
954
|
+
var h = new Tr(f, D, p, y, S, o, s, l);
|
|
955
|
+
h.baseClass && (h.baseClass.__derivedClasses === void 0 && (h.baseClass.__derivedClasses = []), h.baseClass.__derivedClasses.push(h));
|
|
956
|
+
var v = new At(f, h, !0, !1, !1), j = new At(f + "*", h, !1, !1, !1), H = new At(f + " const*", h, !1, !0, !1);
|
|
957
|
+
return fe[n] = { pointerType: j, constPointerType: H }, ve($, D), [v, j, H];
|
|
958
|
+
});
|
|
959
|
+
}, Vt = (n, t) => {
|
|
960
|
+
for (var e = [], r = 0; r < n; r++)
|
|
961
|
+
e.push(_[t + r * 4 >> 2]);
|
|
962
|
+
return e;
|
|
963
|
+
};
|
|
964
|
+
function Bt(n, t, e, r, a, o) {
|
|
965
|
+
var i = t.length;
|
|
966
|
+
i < 2 && w("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
967
|
+
for (var s = t[1] !== null && e !== null, c = !1, l = 1; l < t.length; ++l)
|
|
968
|
+
if (t[l] !== null && t[l].destructorFunction === void 0) {
|
|
969
|
+
c = !0;
|
|
970
|
+
break;
|
|
971
|
+
}
|
|
972
|
+
var f = t[0].name !== "void", m = i - 2, y = new Array(m), $ = [], b = [];
|
|
973
|
+
return function() {
|
|
974
|
+
arguments.length !== m && w(`function ${n} called with ${arguments.length} arguments, expected ${m}`), b.length = 0;
|
|
975
|
+
var S;
|
|
976
|
+
$.length = s ? 2 : 1, $[0] = a, s && (S = t[1].toWireType(b, this), $[1] = S);
|
|
977
|
+
for (var F = 0; F < m; ++F)
|
|
978
|
+
y[F] = t[F + 2].toWireType(b, arguments[F]), $.push(y[F]);
|
|
979
|
+
var D = r.apply(null, $);
|
|
980
|
+
function p(h) {
|
|
981
|
+
if (c)
|
|
982
|
+
se(b);
|
|
983
|
+
else
|
|
984
|
+
for (var v = s ? 1 : 2; v < t.length; v++) {
|
|
985
|
+
var j = v === 1 ? S : y[v - 2];
|
|
986
|
+
t[v].destructorFunction !== null && t[v].destructorFunction(j);
|
|
987
|
+
}
|
|
988
|
+
if (f)
|
|
989
|
+
return t[0].fromWireType(h);
|
|
990
|
+
}
|
|
991
|
+
return p(D);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
var Wr = (n, t, e, r, a, o) => {
|
|
995
|
+
var i = Vt(t, e);
|
|
996
|
+
a = B(r, a), et([], [n], function(s) {
|
|
997
|
+
s = s[0];
|
|
998
|
+
var c = `constructor ${s.name}`;
|
|
999
|
+
if (s.registeredClass.constructor_body === void 0 && (s.registeredClass.constructor_body = []), s.registeredClass.constructor_body[t - 1] !== void 0)
|
|
1000
|
+
throw new st(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1001
|
+
return s.registeredClass.constructor_body[t - 1] = () => {
|
|
1002
|
+
Ot(`Cannot construct ${s.name} due to unbound types`, i);
|
|
1003
|
+
}, et([], i, (l) => (l.splice(1, 0, null), s.registeredClass.constructor_body[t - 1] = Bt(c, l, null, a, o), [])), [];
|
|
1004
|
+
});
|
|
1005
|
+
}, be = (n) => {
|
|
1006
|
+
n = n.trim();
|
|
1007
|
+
const t = n.indexOf("(");
|
|
1008
|
+
return t !== -1 ? (Zt(n[n.length - 1] == ")", "Parentheses for argument names should match."), n.substr(0, t)) : n;
|
|
1009
|
+
}, Mr = (n, t, e, r, a, o, i, s, c) => {
|
|
1010
|
+
var l = Vt(e, r);
|
|
1011
|
+
t = M(t), t = be(t), o = B(a, o), et([], [n], function(f) {
|
|
1012
|
+
f = f[0];
|
|
1013
|
+
var m = `${f.name}.${t}`;
|
|
1014
|
+
t.startsWith("@@") && (t = Symbol[t.substring(2)]), s && f.registeredClass.pureVirtualFunctions.push(t);
|
|
1015
|
+
function y() {
|
|
1016
|
+
Ot(`Cannot call ${m} due to unbound types`, l);
|
|
1017
|
+
}
|
|
1018
|
+
var $ = f.registeredClass.instancePrototype, b = $[t];
|
|
1019
|
+
return b === void 0 || b.overloadTable === void 0 && b.className !== f.name && b.argCount === e - 2 ? (y.argCount = e - 2, y.className = f.name, $[t] = y) : (me($, t, m), $[t].overloadTable[e - 2] = y), et([], l, function(S) {
|
|
1020
|
+
var F = Bt(m, S, f, o, i);
|
|
1021
|
+
return $[t].overloadTable === void 0 ? (F.argCount = e - 2, $[t] = F) : $[t].overloadTable[e - 2] = F, [];
|
|
1022
|
+
}), [];
|
|
1023
|
+
});
|
|
1024
|
+
};
|
|
1025
|
+
function Rr() {
|
|
1026
|
+
Object.assign(Ce.prototype, { get(n) {
|
|
1027
|
+
return this.allocated[n];
|
|
1028
|
+
}, has(n) {
|
|
1029
|
+
return this.allocated[n] !== void 0;
|
|
1030
|
+
}, allocate(n) {
|
|
1031
|
+
var t = this.freelist.pop() || this.allocated.length;
|
|
1032
|
+
return this.allocated[t] = n, t;
|
|
1033
|
+
}, free(n) {
|
|
1034
|
+
this.allocated[n] = void 0, this.freelist.push(n);
|
|
1035
|
+
} });
|
|
1036
|
+
}
|
|
1037
|
+
function Ce() {
|
|
1038
|
+
this.allocated = [void 0], this.freelist = [];
|
|
1039
|
+
}
|
|
1040
|
+
var V = new Ce(), _e = (n) => {
|
|
1041
|
+
n >= V.reserved && --V.get(n).refcount === 0 && V.free(n);
|
|
1042
|
+
}, Ir = () => {
|
|
1043
|
+
for (var n = 0, t = V.reserved; t < V.allocated.length; ++t)
|
|
1044
|
+
V.allocated[t] !== void 0 && ++n;
|
|
1045
|
+
return n;
|
|
1046
|
+
}, kr = () => {
|
|
1047
|
+
V.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), V.reserved = V.allocated.length, u.count_emval_handles = Ir;
|
|
1048
|
+
}, X = { toValue: (n) => (n || w("Cannot use deleted val. handle = " + n), V.get(n).value), toHandle: (n) => {
|
|
1049
|
+
switch (n) {
|
|
1050
|
+
case void 0:
|
|
1051
|
+
return 1;
|
|
1052
|
+
case null:
|
|
1053
|
+
return 2;
|
|
1054
|
+
case !0:
|
|
1055
|
+
return 3;
|
|
1056
|
+
case !1:
|
|
1057
|
+
return 4;
|
|
1058
|
+
default:
|
|
1059
|
+
return V.allocate({ refcount: 1, value: n });
|
|
1060
|
+
}
|
|
1061
|
+
} }, Hr = (n, t) => {
|
|
1062
|
+
t = M(t), Y(n, { name: t, fromWireType: (e) => {
|
|
1063
|
+
var r = X.toValue(e);
|
|
1064
|
+
return _e(e), r;
|
|
1065
|
+
}, toWireType: (e, r) => X.toHandle(r), argPackAdvance: L, readValueFromPointer: Wt, destructorFunction: null });
|
|
1066
|
+
}, Ur = (n, t, e) => {
|
|
1067
|
+
switch (t) {
|
|
1068
|
+
case 1:
|
|
1069
|
+
return e ? function(r) {
|
|
1070
|
+
return this.fromWireType(U[r >> 0]);
|
|
1071
|
+
} : function(r) {
|
|
1072
|
+
return this.fromWireType(k[r >> 0]);
|
|
1073
|
+
};
|
|
1074
|
+
case 2:
|
|
1075
|
+
return e ? function(r) {
|
|
1076
|
+
return this.fromWireType(at[r >> 1]);
|
|
1077
|
+
} : function(r) {
|
|
1078
|
+
return this.fromWireType(lt[r >> 1]);
|
|
1079
|
+
};
|
|
1080
|
+
case 4:
|
|
1081
|
+
return e ? function(r) {
|
|
1082
|
+
return this.fromWireType(R[r >> 2]);
|
|
1083
|
+
} : function(r) {
|
|
1084
|
+
return this.fromWireType(_[r >> 2]);
|
|
1085
|
+
};
|
|
1086
|
+
default:
|
|
1087
|
+
throw new TypeError(`invalid integer width (${t}): ${n}`);
|
|
1088
|
+
}
|
|
1089
|
+
}, Vr = (n, t, e, r) => {
|
|
1090
|
+
t = M(t);
|
|
1091
|
+
function a() {
|
|
1092
|
+
}
|
|
1093
|
+
a.values = {}, Y(n, { name: t, constructor: a, fromWireType: function(o) {
|
|
1094
|
+
return this.constructor.values[o];
|
|
1095
|
+
}, toWireType: (o, i) => i.value, argPackAdvance: L, readValueFromPointer: Ur(t, e, r), destructorFunction: null }), Ht(t, a);
|
|
1096
|
+
}, Yt = (n, t) => {
|
|
1097
|
+
var e = tt[n];
|
|
1098
|
+
return e === void 0 && w(t + " has unknown type " + we(n)), e;
|
|
1099
|
+
}, Br = (n, t, e) => {
|
|
1100
|
+
var r = Yt(n, "enum");
|
|
1101
|
+
t = M(t);
|
|
1102
|
+
var a = r.constructor, o = Object.create(r.constructor.prototype, { value: { value: e }, constructor: { value: kt(`${r.name}_${t}`, function() {
|
|
1103
|
+
}) } });
|
|
1104
|
+
a.values[e] = o, a[t] = o;
|
|
1105
|
+
}, Lt = (n) => {
|
|
1106
|
+
if (n === null)
|
|
1107
|
+
return "null";
|
|
1108
|
+
var t = typeof n;
|
|
1109
|
+
return t === "object" || t === "array" || t === "function" ? n.toString() : "" + n;
|
|
1110
|
+
}, Yr = (n, t) => {
|
|
1111
|
+
switch (t) {
|
|
1112
|
+
case 4:
|
|
1113
|
+
return function(e) {
|
|
1114
|
+
return this.fromWireType(Qt[e >> 2]);
|
|
1115
|
+
};
|
|
1116
|
+
case 8:
|
|
1117
|
+
return function(e) {
|
|
1118
|
+
return this.fromWireType(Kt[e >> 3]);
|
|
1119
|
+
};
|
|
1120
|
+
default:
|
|
1121
|
+
throw new TypeError(`invalid float width (${t}): ${n}`);
|
|
1122
|
+
}
|
|
1123
|
+
}, Lr = (n, t, e) => {
|
|
1124
|
+
t = M(t), Y(n, { name: t, fromWireType: (r) => r, toWireType: (r, a) => a, argPackAdvance: L, readValueFromPointer: Yr(t, e), destructorFunction: null });
|
|
1125
|
+
}, zr = (n, t, e, r, a, o, i) => {
|
|
1126
|
+
var s = Vt(t, e);
|
|
1127
|
+
n = M(n), n = be(n), a = B(r, a), Ht(n, function() {
|
|
1128
|
+
Ot(`Cannot call ${n} due to unbound types`, s);
|
|
1129
|
+
}, t - 1), et([], s, function(c) {
|
|
1130
|
+
var l = [c[0], null].concat(c.slice(1));
|
|
1131
|
+
return ve(n, Bt(n, l, null, a, o), t - 1), [];
|
|
1132
|
+
});
|
|
1133
|
+
}, Nr = (n, t, e) => {
|
|
1134
|
+
switch (t) {
|
|
1135
|
+
case 1:
|
|
1136
|
+
return e ? (r) => U[r >> 0] : (r) => k[r >> 0];
|
|
1137
|
+
case 2:
|
|
1138
|
+
return e ? (r) => at[r >> 1] : (r) => lt[r >> 1];
|
|
1139
|
+
case 4:
|
|
1140
|
+
return e ? (r) => R[r >> 2] : (r) => _[r >> 2];
|
|
1141
|
+
default:
|
|
1142
|
+
throw new TypeError(`invalid integer width (${t}): ${n}`);
|
|
1143
|
+
}
|
|
1144
|
+
}, Gr = (n, t, e, r, a) => {
|
|
1145
|
+
t = M(t);
|
|
1146
|
+
var o = (f) => f;
|
|
1147
|
+
if (r === 0) {
|
|
1148
|
+
var i = 32 - 8 * e;
|
|
1149
|
+
o = (f) => f << i >>> i;
|
|
1150
|
+
}
|
|
1151
|
+
var s = t.includes("unsigned"), c = (f, m) => {
|
|
1152
|
+
}, l;
|
|
1153
|
+
s ? l = function(f, m) {
|
|
1154
|
+
return c(m, this.name), m >>> 0;
|
|
1155
|
+
} : l = function(f, m) {
|
|
1156
|
+
return c(m, this.name), m;
|
|
1157
|
+
}, Y(n, { name: t, fromWireType: o, toWireType: l, argPackAdvance: L, readValueFromPointer: Nr(t, e, r !== 0), destructorFunction: null });
|
|
1158
|
+
}, qr = (n, t, e) => {
|
|
1159
|
+
var r = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], a = r[t];
|
|
1160
|
+
function o(i) {
|
|
1161
|
+
var s = _[i >> 2], c = _[i + 4 >> 2];
|
|
1162
|
+
return new a(U.buffer, c, s);
|
|
1163
|
+
}
|
|
1164
|
+
e = M(e), Y(n, { name: e, fromWireType: o, argPackAdvance: L, readValueFromPointer: o }, { ignoreDuplicateRegistrations: !0 });
|
|
1165
|
+
}, Te = (n, t, e, r) => {
|
|
1166
|
+
if (!(r > 0))
|
|
1167
|
+
return 0;
|
|
1168
|
+
for (var a = e, o = e + r - 1, i = 0; i < n.length; ++i) {
|
|
1169
|
+
var s = n.charCodeAt(i);
|
|
1170
|
+
if (s >= 55296 && s <= 57343) {
|
|
1171
|
+
var c = n.charCodeAt(++i);
|
|
1172
|
+
s = 65536 + ((s & 1023) << 10) | c & 1023;
|
|
1173
|
+
}
|
|
1174
|
+
if (s <= 127) {
|
|
1175
|
+
if (e >= o)
|
|
1176
|
+
break;
|
|
1177
|
+
t[e++] = s;
|
|
1178
|
+
} else if (s <= 2047) {
|
|
1179
|
+
if (e + 1 >= o)
|
|
1180
|
+
break;
|
|
1181
|
+
t[e++] = 192 | s >> 6, t[e++] = 128 | s & 63;
|
|
1182
|
+
} else if (s <= 65535) {
|
|
1183
|
+
if (e + 2 >= o)
|
|
1184
|
+
break;
|
|
1185
|
+
t[e++] = 224 | s >> 12, t[e++] = 128 | s >> 6 & 63, t[e++] = 128 | s & 63;
|
|
1186
|
+
} else {
|
|
1187
|
+
if (e + 3 >= o)
|
|
1188
|
+
break;
|
|
1189
|
+
t[e++] = 240 | s >> 18, t[e++] = 128 | s >> 12 & 63, t[e++] = 128 | s >> 6 & 63, t[e++] = 128 | s & 63;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
return t[e] = 0, e - a;
|
|
1193
|
+
}, Xr = (n, t, e) => Te(n, k, t, e), Pe = (n) => {
|
|
1194
|
+
for (var t = 0, e = 0; e < n.length; ++e) {
|
|
1195
|
+
var r = n.charCodeAt(e);
|
|
1196
|
+
r <= 127 ? t++ : r <= 2047 ? t += 2 : r >= 55296 && r <= 57343 ? (t += 4, ++e) : t += 3;
|
|
1197
|
+
}
|
|
1198
|
+
return t;
|
|
1199
|
+
}, Ae = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Jr = (n, t, e) => {
|
|
1200
|
+
for (var r = t + e, a = t; n[a] && !(a >= r); )
|
|
1201
|
+
++a;
|
|
1202
|
+
if (a - t > 16 && n.buffer && Ae)
|
|
1203
|
+
return Ae.decode(n.subarray(t, a));
|
|
1204
|
+
for (var o = ""; t < a; ) {
|
|
1205
|
+
var i = n[t++];
|
|
1206
|
+
if (!(i & 128)) {
|
|
1207
|
+
o += String.fromCharCode(i);
|
|
1208
|
+
continue;
|
|
1209
|
+
}
|
|
1210
|
+
var s = n[t++] & 63;
|
|
1211
|
+
if ((i & 224) == 192) {
|
|
1212
|
+
o += String.fromCharCode((i & 31) << 6 | s);
|
|
1213
|
+
continue;
|
|
1214
|
+
}
|
|
1215
|
+
var c = n[t++] & 63;
|
|
1216
|
+
if ((i & 240) == 224 ? i = (i & 15) << 12 | s << 6 | c : i = (i & 7) << 18 | s << 12 | c << 6 | n[t++] & 63, i < 65536)
|
|
1217
|
+
o += String.fromCharCode(i);
|
|
1218
|
+
else {
|
|
1219
|
+
var l = i - 65536;
|
|
1220
|
+
o += String.fromCharCode(55296 | l >> 10, 56320 | l & 1023);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
return o;
|
|
1224
|
+
}, zt = (n, t) => n ? Jr(k, n, t) : "", Zr = (n, t) => {
|
|
1225
|
+
t = M(t);
|
|
1226
|
+
var e = t === "std::string";
|
|
1227
|
+
Y(n, { name: t, fromWireType(r) {
|
|
1228
|
+
var a = _[r >> 2], o = r + 4, i;
|
|
1229
|
+
if (e)
|
|
1230
|
+
for (var s = o, c = 0; c <= a; ++c) {
|
|
1231
|
+
var l = o + c;
|
|
1232
|
+
if (c == a || k[l] == 0) {
|
|
1233
|
+
var f = l - s, m = zt(s, f);
|
|
1234
|
+
i === void 0 ? i = m : (i += String.fromCharCode(0), i += m), s = l + 1;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
else {
|
|
1238
|
+
for (var y = new Array(a), c = 0; c < a; ++c)
|
|
1239
|
+
y[c] = String.fromCharCode(k[o + c]);
|
|
1240
|
+
i = y.join("");
|
|
1241
|
+
}
|
|
1242
|
+
return G(r), i;
|
|
1243
|
+
}, toWireType(r, a) {
|
|
1244
|
+
a instanceof ArrayBuffer && (a = new Uint8Array(a));
|
|
1245
|
+
var o, i = typeof a == "string";
|
|
1246
|
+
i || a instanceof Uint8Array || a instanceof Uint8ClampedArray || a instanceof Int8Array || w("Cannot pass non-string to std::string"), e && i ? o = Pe(a) : o = a.length;
|
|
1247
|
+
var s = Gt(4 + o + 1), c = s + 4;
|
|
1248
|
+
if (_[s >> 2] = o, e && i)
|
|
1249
|
+
Xr(a, c, o + 1);
|
|
1250
|
+
else if (i)
|
|
1251
|
+
for (var l = 0; l < o; ++l) {
|
|
1252
|
+
var f = a.charCodeAt(l);
|
|
1253
|
+
f > 255 && (G(c), w("String has UTF-16 code units that do not fit in 8 bits")), k[c + l] = f;
|
|
1254
|
+
}
|
|
1255
|
+
else
|
|
1256
|
+
for (var l = 0; l < o; ++l)
|
|
1257
|
+
k[c + l] = a[l];
|
|
1258
|
+
return r !== null && r.push(G, s), s;
|
|
1259
|
+
}, argPackAdvance: L, readValueFromPointer: ye, destructorFunction(r) {
|
|
1260
|
+
G(r);
|
|
1261
|
+
} });
|
|
1262
|
+
}, Ee = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Qr = (n, t) => {
|
|
1263
|
+
for (var e = n, r = e >> 1, a = r + t / 2; !(r >= a) && lt[r]; )
|
|
1264
|
+
++r;
|
|
1265
|
+
if (e = r << 1, e - n > 32 && Ee)
|
|
1266
|
+
return Ee.decode(k.subarray(n, e));
|
|
1267
|
+
for (var o = "", i = 0; !(i >= t / 2); ++i) {
|
|
1268
|
+
var s = at[n + i * 2 >> 1];
|
|
1269
|
+
if (s == 0)
|
|
1270
|
+
break;
|
|
1271
|
+
o += String.fromCharCode(s);
|
|
1272
|
+
}
|
|
1273
|
+
return o;
|
|
1274
|
+
}, Kr = (n, t, e) => {
|
|
1275
|
+
if (e === void 0 && (e = 2147483647), e < 2)
|
|
1276
|
+
return 0;
|
|
1277
|
+
e -= 2;
|
|
1278
|
+
for (var r = t, a = e < n.length * 2 ? e / 2 : n.length, o = 0; o < a; ++o) {
|
|
1279
|
+
var i = n.charCodeAt(o);
|
|
1280
|
+
at[t >> 1] = i, t += 2;
|
|
1281
|
+
}
|
|
1282
|
+
return at[t >> 1] = 0, t - r;
|
|
1283
|
+
}, tn = (n) => n.length * 2, en = (n, t) => {
|
|
1284
|
+
for (var e = 0, r = ""; !(e >= t / 4); ) {
|
|
1285
|
+
var a = R[n + e * 4 >> 2];
|
|
1286
|
+
if (a == 0)
|
|
1287
|
+
break;
|
|
1288
|
+
if (++e, a >= 65536) {
|
|
1289
|
+
var o = a - 65536;
|
|
1290
|
+
r += String.fromCharCode(55296 | o >> 10, 56320 | o & 1023);
|
|
1291
|
+
} else
|
|
1292
|
+
r += String.fromCharCode(a);
|
|
1293
|
+
}
|
|
1294
|
+
return r;
|
|
1295
|
+
}, rn = (n, t, e) => {
|
|
1296
|
+
if (e === void 0 && (e = 2147483647), e < 4)
|
|
1297
|
+
return 0;
|
|
1298
|
+
for (var r = t, a = r + e - 4, o = 0; o < n.length; ++o) {
|
|
1299
|
+
var i = n.charCodeAt(o);
|
|
1300
|
+
if (i >= 55296 && i <= 57343) {
|
|
1301
|
+
var s = n.charCodeAt(++o);
|
|
1302
|
+
i = 65536 + ((i & 1023) << 10) | s & 1023;
|
|
1303
|
+
}
|
|
1304
|
+
if (R[t >> 2] = i, t += 4, t + 4 > a)
|
|
1305
|
+
break;
|
|
1306
|
+
}
|
|
1307
|
+
return R[t >> 2] = 0, t - r;
|
|
1308
|
+
}, nn = (n) => {
|
|
1309
|
+
for (var t = 0, e = 0; e < n.length; ++e) {
|
|
1310
|
+
var r = n.charCodeAt(e);
|
|
1311
|
+
r >= 55296 && r <= 57343 && ++e, t += 4;
|
|
1312
|
+
}
|
|
1313
|
+
return t;
|
|
1314
|
+
}, an = (n, t, e) => {
|
|
1315
|
+
e = M(e);
|
|
1316
|
+
var r, a, o, i, s;
|
|
1317
|
+
t === 2 ? (r = Qr, a = Kr, i = tn, o = () => lt, s = 1) : t === 4 && (r = en, a = rn, i = nn, o = () => _, s = 2), Y(n, { name: e, fromWireType: (c) => {
|
|
1318
|
+
for (var l = _[c >> 2], f = o(), m, y = c + 4, $ = 0; $ <= l; ++$) {
|
|
1319
|
+
var b = c + 4 + $ * t;
|
|
1320
|
+
if ($ == l || f[b >> s] == 0) {
|
|
1321
|
+
var S = b - y, F = r(y, S);
|
|
1322
|
+
m === void 0 ? m = F : (m += String.fromCharCode(0), m += F), y = b + t;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
return G(c), m;
|
|
1326
|
+
}, toWireType: (c, l) => {
|
|
1327
|
+
typeof l != "string" && w(`Cannot pass non-string to C++ string type ${e}`);
|
|
1328
|
+
var f = i(l), m = Gt(4 + f + t);
|
|
1329
|
+
return _[m >> 2] = f >> s, a(l, m + 4, f + t), c !== null && c.push(G, m), m;
|
|
1330
|
+
}, argPackAdvance: L, readValueFromPointer: Wt, destructorFunction(c) {
|
|
1331
|
+
G(c);
|
|
1332
|
+
} });
|
|
1333
|
+
}, on = (n, t, e, r, a, o) => {
|
|
1334
|
+
bt[n] = { name: M(t), rawConstructor: B(e, r), rawDestructor: B(a, o), fields: [] };
|
|
1335
|
+
}, sn = (n, t, e, r, a, o, i, s, c, l) => {
|
|
1336
|
+
bt[n].fields.push({ fieldName: M(t), getterReturnType: e, getter: B(r, a), getterContext: o, setterArgumentType: i, setter: B(s, c), setterContext: l });
|
|
1337
|
+
}, un = (n, t) => {
|
|
1338
|
+
t = M(t), Y(n, { isVoid: !0, name: t, argPackAdvance: 0, fromWireType: () => {
|
|
1339
|
+
}, toWireType: (e, r) => {
|
|
1340
|
+
} });
|
|
1341
|
+
}, cn = {}, ln = (n) => {
|
|
1342
|
+
var t = cn[n];
|
|
1343
|
+
return t === void 0 ? M(n) : t;
|
|
1344
|
+
}, Oe = () => {
|
|
1345
|
+
if (typeof globalThis == "object")
|
|
1346
|
+
return globalThis;
|
|
1347
|
+
function n(t) {
|
|
1348
|
+
t.$$$embind_global$$$ = t;
|
|
1349
|
+
var e = typeof $$$embind_global$$$ == "object" && t.$$$embind_global$$$ == t;
|
|
1350
|
+
return e || delete t.$$$embind_global$$$, e;
|
|
1351
|
+
}
|
|
1352
|
+
if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && n(global) ? $$$embind_global$$$ = global : typeof self == "object" && n(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
|
|
1353
|
+
return $$$embind_global$$$;
|
|
1354
|
+
throw Error("unable to get global object.");
|
|
1355
|
+
}, dn = (n) => n === 0 ? X.toHandle(Oe()) : (n = ln(n), X.toHandle(Oe()[n])), hn = (n) => {
|
|
1356
|
+
n > 4 && (V.get(n).refcount += 1);
|
|
1357
|
+
}, fn = (n) => {
|
|
1358
|
+
var t = new Array(n + 1);
|
|
1359
|
+
return function(e, r, a) {
|
|
1360
|
+
t[0] = e;
|
|
1361
|
+
for (var o = 0; o < n; ++o) {
|
|
1362
|
+
var i = Yt(_[r + o * 4 >> 2], "parameter " + o);
|
|
1363
|
+
t[o + 1] = i.readValueFromPointer(a), a += i.argPackAdvance;
|
|
1364
|
+
}
|
|
1365
|
+
var s = new (e.bind.apply(e, t))();
|
|
1366
|
+
return X.toHandle(s);
|
|
1367
|
+
};
|
|
1368
|
+
}, Se = {}, pn = (n, t, e, r) => {
|
|
1369
|
+
n = X.toValue(n);
|
|
1370
|
+
var a = Se[t];
|
|
1371
|
+
return a || (a = fn(t), Se[t] = a), a(n, e, r);
|
|
1372
|
+
}, mn = (n, t) => {
|
|
1373
|
+
n = Yt(n, "_emval_take_value");
|
|
1374
|
+
var e = n.readValueFromPointer(t);
|
|
1375
|
+
return X.toHandle(e);
|
|
1376
|
+
}, yn = () => {
|
|
1377
|
+
ht("");
|
|
1378
|
+
}, vn = (n, t, e) => k.copyWithin(n, t, t + e), gn = () => 2147483648, $n = (n) => {
|
|
1379
|
+
var t = ut.buffer, e = (n - t.byteLength + 65535) / 65536;
|
|
1380
|
+
try {
|
|
1381
|
+
return ut.grow(e), te(), 1;
|
|
1382
|
+
} catch {
|
|
1383
|
+
}
|
|
1384
|
+
}, wn = (n) => {
|
|
1385
|
+
var t = k.length;
|
|
1386
|
+
n >>>= 0;
|
|
1387
|
+
var e = gn();
|
|
1388
|
+
if (n > e)
|
|
1389
|
+
return !1;
|
|
1390
|
+
for (var r = (c, l) => c + (l - c % l) % l, a = 1; a <= 4; a *= 2) {
|
|
1391
|
+
var o = t * (1 + 0.2 / a);
|
|
1392
|
+
o = Math.min(o, n + 100663296);
|
|
1393
|
+
var i = Math.min(e, r(Math.max(n, o), 65536)), s = $n(i);
|
|
1394
|
+
if (s)
|
|
1395
|
+
return !0;
|
|
1396
|
+
}
|
|
1397
|
+
return !1;
|
|
1398
|
+
}, Nt = {}, bn = () => J || "./this.program", vt = () => {
|
|
1399
|
+
if (!vt.strings) {
|
|
1400
|
+
var n = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: n, _: bn() };
|
|
1401
|
+
for (var e in Nt)
|
|
1402
|
+
Nt[e] === void 0 ? delete t[e] : t[e] = Nt[e];
|
|
1403
|
+
var r = [];
|
|
1404
|
+
for (var e in t)
|
|
1405
|
+
r.push(`${e}=${t[e]}`);
|
|
1406
|
+
vt.strings = r;
|
|
1407
|
+
}
|
|
1408
|
+
return vt.strings;
|
|
1409
|
+
}, Cn = (n, t) => {
|
|
1410
|
+
for (var e = 0; e < n.length; ++e)
|
|
1411
|
+
U[t++ >> 0] = n.charCodeAt(e);
|
|
1412
|
+
U[t >> 0] = 0;
|
|
1413
|
+
}, _n = (n, t) => {
|
|
1414
|
+
var e = 0;
|
|
1415
|
+
return vt().forEach((r, a) => {
|
|
1416
|
+
var o = t + e;
|
|
1417
|
+
_[n + a * 4 >> 2] = o, Cn(r, o), e += r.length + 1;
|
|
1418
|
+
}), 0;
|
|
1419
|
+
}, Tn = (n, t) => {
|
|
1420
|
+
var e = vt();
|
|
1421
|
+
_[n >> 2] = e.length;
|
|
1422
|
+
var r = 0;
|
|
1423
|
+
return e.forEach((a) => r += a.length + 1), _[t >> 2] = r, 0;
|
|
1424
|
+
}, Pn = (n) => n, St = (n) => n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0), An = (n, t) => {
|
|
1425
|
+
for (var e = 0, r = 0; r <= t; e += n[r++])
|
|
1426
|
+
;
|
|
1427
|
+
return e;
|
|
1428
|
+
}, Fe = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], De = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], En = (n, t) => {
|
|
1429
|
+
for (var e = new Date(n.getTime()); t > 0; ) {
|
|
1430
|
+
var r = St(e.getFullYear()), a = e.getMonth(), o = (r ? Fe : De)[a];
|
|
1431
|
+
if (t > o - e.getDate())
|
|
1432
|
+
t -= o - e.getDate() + 1, e.setDate(1), a < 11 ? e.setMonth(a + 1) : (e.setMonth(0), e.setFullYear(e.getFullYear() + 1));
|
|
1433
|
+
else
|
|
1434
|
+
return e.setDate(e.getDate() + t), e;
|
|
1435
|
+
}
|
|
1436
|
+
return e;
|
|
1437
|
+
};
|
|
1438
|
+
function On(n, t, e) {
|
|
1439
|
+
var r = e > 0 ? e : Pe(n) + 1, a = new Array(r), o = Te(n, a, 0, a.length);
|
|
1440
|
+
return t && (a.length = o), a;
|
|
1441
|
+
}
|
|
1442
|
+
var Sn = (n, t) => {
|
|
1443
|
+
U.set(n, t);
|
|
1444
|
+
}, Fn = (n, t, e, r) => {
|
|
1445
|
+
var a = _[r + 40 >> 2], o = { tm_sec: R[r >> 2], tm_min: R[r + 4 >> 2], tm_hour: R[r + 8 >> 2], tm_mday: R[r + 12 >> 2], tm_mon: R[r + 16 >> 2], tm_year: R[r + 20 >> 2], tm_wday: R[r + 24 >> 2], tm_yday: R[r + 28 >> 2], tm_isdst: R[r + 32 >> 2], tm_gmtoff: R[r + 36 >> 2], tm_zone: a ? zt(a) : "" }, i = zt(e), s = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" };
|
|
1446
|
+
for (var c in s)
|
|
1447
|
+
i = i.replace(new RegExp(c, "g"), s[c]);
|
|
1448
|
+
var l = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], f = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
1449
|
+
function m(p, h, v) {
|
|
1450
|
+
for (var j = typeof p == "number" ? p.toString() : p || ""; j.length < h; )
|
|
1451
|
+
j = v[0] + j;
|
|
1452
|
+
return j;
|
|
1453
|
+
}
|
|
1454
|
+
function y(p, h) {
|
|
1455
|
+
return m(p, h, "0");
|
|
1456
|
+
}
|
|
1457
|
+
function $(p, h) {
|
|
1458
|
+
function v(H) {
|
|
1459
|
+
return H < 0 ? -1 : H > 0 ? 1 : 0;
|
|
1460
|
+
}
|
|
1461
|
+
var j;
|
|
1462
|
+
return (j = v(p.getFullYear() - h.getFullYear())) === 0 && (j = v(p.getMonth() - h.getMonth())) === 0 && (j = v(p.getDate() - h.getDate())), j;
|
|
1463
|
+
}
|
|
1464
|
+
function b(p) {
|
|
1465
|
+
switch (p.getDay()) {
|
|
1466
|
+
case 0:
|
|
1467
|
+
return new Date(p.getFullYear() - 1, 11, 29);
|
|
1468
|
+
case 1:
|
|
1469
|
+
return p;
|
|
1470
|
+
case 2:
|
|
1471
|
+
return new Date(p.getFullYear(), 0, 3);
|
|
1472
|
+
case 3:
|
|
1473
|
+
return new Date(p.getFullYear(), 0, 2);
|
|
1474
|
+
case 4:
|
|
1475
|
+
return new Date(p.getFullYear(), 0, 1);
|
|
1476
|
+
case 5:
|
|
1477
|
+
return new Date(p.getFullYear() - 1, 11, 31);
|
|
1478
|
+
case 6:
|
|
1479
|
+
return new Date(p.getFullYear() - 1, 11, 30);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
function S(p) {
|
|
1483
|
+
var h = En(new Date(p.tm_year + 1900, 0, 1), p.tm_yday), v = new Date(h.getFullYear(), 0, 4), j = new Date(h.getFullYear() + 1, 0, 4), H = b(v), ct = b(j);
|
|
1484
|
+
return $(H, h) <= 0 ? $(ct, h) <= 0 ? h.getFullYear() + 1 : h.getFullYear() : h.getFullYear() - 1;
|
|
1485
|
+
}
|
|
1486
|
+
var F = { "%a": (p) => l[p.tm_wday].substring(0, 3), "%A": (p) => l[p.tm_wday], "%b": (p) => f[p.tm_mon].substring(0, 3), "%B": (p) => f[p.tm_mon], "%C": (p) => {
|
|
1487
|
+
var h = p.tm_year + 1900;
|
|
1488
|
+
return y(h / 100 | 0, 2);
|
|
1489
|
+
}, "%d": (p) => y(p.tm_mday, 2), "%e": (p) => m(p.tm_mday, 2, " "), "%g": (p) => S(p).toString().substring(2), "%G": (p) => S(p), "%H": (p) => y(p.tm_hour, 2), "%I": (p) => {
|
|
1490
|
+
var h = p.tm_hour;
|
|
1491
|
+
return h == 0 ? h = 12 : h > 12 && (h -= 12), y(h, 2);
|
|
1492
|
+
}, "%j": (p) => y(p.tm_mday + An(St(p.tm_year + 1900) ? Fe : De, p.tm_mon - 1), 3), "%m": (p) => y(p.tm_mon + 1, 2), "%M": (p) => y(p.tm_min, 2), "%n": () => `
|
|
1493
|
+
`, "%p": (p) => p.tm_hour >= 0 && p.tm_hour < 12 ? "AM" : "PM", "%S": (p) => y(p.tm_sec, 2), "%t": () => " ", "%u": (p) => p.tm_wday || 7, "%U": (p) => {
|
|
1494
|
+
var h = p.tm_yday + 7 - p.tm_wday;
|
|
1495
|
+
return y(Math.floor(h / 7), 2);
|
|
1496
|
+
}, "%V": (p) => {
|
|
1497
|
+
var h = Math.floor((p.tm_yday + 7 - (p.tm_wday + 6) % 7) / 7);
|
|
1498
|
+
if ((p.tm_wday + 371 - p.tm_yday - 2) % 7 <= 2 && h++, h) {
|
|
1499
|
+
if (h == 53) {
|
|
1500
|
+
var v = (p.tm_wday + 371 - p.tm_yday) % 7;
|
|
1501
|
+
v != 4 && (v != 3 || !St(p.tm_year)) && (h = 1);
|
|
1502
|
+
}
|
|
1503
|
+
} else {
|
|
1504
|
+
h = 52;
|
|
1505
|
+
var j = (p.tm_wday + 7 - p.tm_yday - 1) % 7;
|
|
1506
|
+
(j == 4 || j == 5 && St(p.tm_year % 400 - 1)) && h++;
|
|
1507
|
+
}
|
|
1508
|
+
return y(h, 2);
|
|
1509
|
+
}, "%w": (p) => p.tm_wday, "%W": (p) => {
|
|
1510
|
+
var h = p.tm_yday + 7 - (p.tm_wday + 6) % 7;
|
|
1511
|
+
return y(Math.floor(h / 7), 2);
|
|
1512
|
+
}, "%y": (p) => (p.tm_year + 1900).toString().substring(2), "%Y": (p) => p.tm_year + 1900, "%z": (p) => {
|
|
1513
|
+
var h = p.tm_gmtoff, v = h >= 0;
|
|
1514
|
+
return h = Math.abs(h) / 60, h = h / 60 * 100 + h % 60, (v ? "+" : "-") + ("0000" + h).slice(-4);
|
|
1515
|
+
}, "%Z": (p) => p.tm_zone, "%%": () => "%" };
|
|
1516
|
+
i = i.replace(/%%/g, "\0\0");
|
|
1517
|
+
for (var c in F)
|
|
1518
|
+
i.includes(c) && (i = i.replace(new RegExp(c, "g"), F[c](o)));
|
|
1519
|
+
i = i.replace(/\0\0/g, "%");
|
|
1520
|
+
var D = On(i, !1);
|
|
1521
|
+
return D.length > t ? 0 : (Sn(D, n), D.length - 1);
|
|
1522
|
+
}, Dn = (n, t, e, r, a) => Fn(n, t, e, r);
|
|
1523
|
+
ue = u.InternalError = class extends Error {
|
|
1524
|
+
constructor(n) {
|
|
1525
|
+
super(n), this.name = "InternalError";
|
|
1526
|
+
}
|
|
1527
|
+
}, cr(), st = u.BindingError = class extends Error {
|
|
1528
|
+
constructor(n) {
|
|
1529
|
+
super(n), this.name = "BindingError";
|
|
1530
|
+
}
|
|
1531
|
+
}, br(), vr(), Or(), $e = u.UnboundTypeError = jr(Error, "UnboundTypeError"), Rr(), kr();
|
|
1532
|
+
var jn = { s: Qe, v: Ke, b: er, g: rr, q: nr, I: ar, f: or, T: ir, d: tr, ba: sr, P: ur, Y: dr, aa: xr, $: Wr, w: Mr, X: Hr, x: Vr, h: Br, K: Lr, L: zr, t: Gr, n: qr, J: Zr, C: an, A: on, ca: sn, Z: un, ea: _e, da: dn, M: hn, V: pn, _: mn, B: yn, W: vn, U: wn, R: _n, S: Tn, D: Gn, E: Nn, m: qn, a: xn, e: In, o: Un, k: Rn, G: Ln, u: Bn, F: zn, z: Jn, O: Qn, l: kn, j: Hn, c: Mn, p: Wn, H: Yn, r: Xn, i: Vn, y: Zn, N: Pn, Q: Dn }, P = Ze(), G = u._free = (n) => (G = u._free = P.ha)(n), Gt = u._malloc = (n) => (Gt = u._malloc = P.ia)(n), je = (n) => (je = P.ka)(n);
|
|
1533
|
+
u.__embind_initialize_bindings = () => (u.__embind_initialize_bindings = P.la)();
|
|
1534
|
+
var T = (n, t) => (T = P.ma)(n, t), gt = (n) => (gt = P.na)(n), E = () => (E = P.oa)(), O = (n) => (O = P.pa)(n), xe = (n) => (xe = P.qa)(n), We = (n) => (We = P.ra)(n), Me = (n, t, e) => (Me = P.sa)(n, t, e), Re = (n) => (Re = P.ta)(n);
|
|
1535
|
+
u.dynCall_viijii = (n, t, e, r, a, o, i) => (u.dynCall_viijii = P.ua)(n, t, e, r, a, o, i);
|
|
1536
|
+
var Ie = u.dynCall_jiiii = (n, t, e, r, a) => (Ie = u.dynCall_jiiii = P.va)(n, t, e, r, a);
|
|
1537
|
+
u.dynCall_iiiiij = (n, t, e, r, a, o, i) => (u.dynCall_iiiiij = P.wa)(n, t, e, r, a, o, i), u.dynCall_iiiiijj = (n, t, e, r, a, o, i, s, c) => (u.dynCall_iiiiijj = P.xa)(n, t, e, r, a, o, i, s, c), u.dynCall_iiiiiijj = (n, t, e, r, a, o, i, s, c, l) => (u.dynCall_iiiiiijj = P.ya)(n, t, e, r, a, o, i, s, c, l);
|
|
1538
|
+
function xn(n, t) {
|
|
1539
|
+
var e = E();
|
|
1540
|
+
try {
|
|
1541
|
+
return A(n)(t);
|
|
1542
|
+
} catch (r) {
|
|
1543
|
+
if (O(e), r !== r + 0)
|
|
1544
|
+
throw r;
|
|
1545
|
+
T(1, 0);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
function Wn(n, t, e, r) {
|
|
1549
|
+
var a = E();
|
|
1550
|
+
try {
|
|
1551
|
+
A(n)(t, e, r);
|
|
1552
|
+
} catch (o) {
|
|
1553
|
+
if (O(a), o !== o + 0)
|
|
1554
|
+
throw o;
|
|
1555
|
+
T(1, 0);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
function Mn(n, t, e) {
|
|
1559
|
+
var r = E();
|
|
1560
|
+
try {
|
|
1561
|
+
A(n)(t, e);
|
|
1562
|
+
} catch (a) {
|
|
1563
|
+
if (O(r), a !== a + 0)
|
|
1564
|
+
throw a;
|
|
1565
|
+
T(1, 0);
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
function Rn(n, t, e, r, a) {
|
|
1569
|
+
var o = E();
|
|
1570
|
+
try {
|
|
1571
|
+
return A(n)(t, e, r, a);
|
|
1572
|
+
} catch (i) {
|
|
1573
|
+
if (O(o), i !== i + 0)
|
|
1574
|
+
throw i;
|
|
1575
|
+
T(1, 0);
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
function In(n, t, e) {
|
|
1579
|
+
var r = E();
|
|
1580
|
+
try {
|
|
1581
|
+
return A(n)(t, e);
|
|
1582
|
+
} catch (a) {
|
|
1583
|
+
if (O(r), a !== a + 0)
|
|
1584
|
+
throw a;
|
|
1585
|
+
T(1, 0);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
function kn(n) {
|
|
1589
|
+
var t = E();
|
|
1590
|
+
try {
|
|
1591
|
+
A(n)();
|
|
1592
|
+
} catch (e) {
|
|
1593
|
+
if (O(t), e !== e + 0)
|
|
1594
|
+
throw e;
|
|
1595
|
+
T(1, 0);
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
function Hn(n, t) {
|
|
1599
|
+
var e = E();
|
|
1600
|
+
try {
|
|
1601
|
+
A(n)(t);
|
|
1602
|
+
} catch (r) {
|
|
1603
|
+
if (O(e), r !== r + 0)
|
|
1604
|
+
throw r;
|
|
1605
|
+
T(1, 0);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
function Un(n, t, e, r) {
|
|
1609
|
+
var a = E();
|
|
1610
|
+
try {
|
|
1611
|
+
return A(n)(t, e, r);
|
|
1612
|
+
} catch (o) {
|
|
1613
|
+
if (O(a), o !== o + 0)
|
|
1614
|
+
throw o;
|
|
1615
|
+
T(1, 0);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
function Vn(n, t, e, r, a, o, i, s, c, l, f) {
|
|
1619
|
+
var m = E();
|
|
1620
|
+
try {
|
|
1621
|
+
A(n)(t, e, r, a, o, i, s, c, l, f);
|
|
1622
|
+
} catch (y) {
|
|
1623
|
+
if (O(m), y !== y + 0)
|
|
1624
|
+
throw y;
|
|
1625
|
+
T(1, 0);
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
function Bn(n, t, e, r, a, o, i) {
|
|
1629
|
+
var s = E();
|
|
1630
|
+
try {
|
|
1631
|
+
return A(n)(t, e, r, a, o, i);
|
|
1632
|
+
} catch (c) {
|
|
1633
|
+
if (O(s), c !== c + 0)
|
|
1634
|
+
throw c;
|
|
1635
|
+
T(1, 0);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
function Yn(n, t, e, r, a) {
|
|
1639
|
+
var o = E();
|
|
1640
|
+
try {
|
|
1641
|
+
A(n)(t, e, r, a);
|
|
1642
|
+
} catch (i) {
|
|
1643
|
+
if (O(o), i !== i + 0)
|
|
1644
|
+
throw i;
|
|
1645
|
+
T(1, 0);
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
function Ln(n, t, e, r, a, o) {
|
|
1649
|
+
var i = E();
|
|
1650
|
+
try {
|
|
1651
|
+
return A(n)(t, e, r, a, o);
|
|
1652
|
+
} catch (s) {
|
|
1653
|
+
if (O(i), s !== s + 0)
|
|
1654
|
+
throw s;
|
|
1655
|
+
T(1, 0);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
function zn(n, t, e, r, a, o, i, s) {
|
|
1659
|
+
var c = E();
|
|
1660
|
+
try {
|
|
1661
|
+
return A(n)(t, e, r, a, o, i, s);
|
|
1662
|
+
} catch (l) {
|
|
1663
|
+
if (O(c), l !== l + 0)
|
|
1664
|
+
throw l;
|
|
1665
|
+
T(1, 0);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
function Nn(n, t, e, r) {
|
|
1669
|
+
var a = E();
|
|
1670
|
+
try {
|
|
1671
|
+
return A(n)(t, e, r);
|
|
1672
|
+
} catch (o) {
|
|
1673
|
+
if (O(a), o !== o + 0)
|
|
1674
|
+
throw o;
|
|
1675
|
+
T(1, 0);
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
function Gn(n, t, e, r) {
|
|
1679
|
+
var a = E();
|
|
1680
|
+
try {
|
|
1681
|
+
return A(n)(t, e, r);
|
|
1682
|
+
} catch (o) {
|
|
1683
|
+
if (O(a), o !== o + 0)
|
|
1684
|
+
throw o;
|
|
1685
|
+
T(1, 0);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
function qn(n) {
|
|
1689
|
+
var t = E();
|
|
1690
|
+
try {
|
|
1691
|
+
return A(n)();
|
|
1692
|
+
} catch (e) {
|
|
1693
|
+
if (O(t), e !== e + 0)
|
|
1694
|
+
throw e;
|
|
1695
|
+
T(1, 0);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
function Xn(n, t, e, r, a, o, i, s) {
|
|
1699
|
+
var c = E();
|
|
1700
|
+
try {
|
|
1701
|
+
A(n)(t, e, r, a, o, i, s);
|
|
1702
|
+
} catch (l) {
|
|
1703
|
+
if (O(c), l !== l + 0)
|
|
1704
|
+
throw l;
|
|
1705
|
+
T(1, 0);
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
function Jn(n, t, e, r, a, o, i, s, c, l, f, m) {
|
|
1709
|
+
var y = E();
|
|
1710
|
+
try {
|
|
1711
|
+
return A(n)(t, e, r, a, o, i, s, c, l, f, m);
|
|
1712
|
+
} catch ($) {
|
|
1713
|
+
if (O(y), $ !== $ + 0)
|
|
1714
|
+
throw $;
|
|
1715
|
+
T(1, 0);
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
function Zn(n, t, e, r, a, o, i, s, c, l, f, m, y, $, b, S) {
|
|
1719
|
+
var F = E();
|
|
1720
|
+
try {
|
|
1721
|
+
A(n)(t, e, r, a, o, i, s, c, l, f, m, y, $, b, S);
|
|
1722
|
+
} catch (D) {
|
|
1723
|
+
if (O(F), D !== D + 0)
|
|
1724
|
+
throw D;
|
|
1725
|
+
T(1, 0);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
function Qn(n, t, e, r, a) {
|
|
1729
|
+
var o = E();
|
|
1730
|
+
try {
|
|
1731
|
+
return Ie(n, t, e, r, a);
|
|
1732
|
+
} catch (i) {
|
|
1733
|
+
if (O(o), i !== i + 0)
|
|
1734
|
+
throw i;
|
|
1735
|
+
T(1, 0);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
var Xt;
|
|
1739
|
+
dt = function n() {
|
|
1740
|
+
Xt || qt(), Xt || (dt = n);
|
|
1741
|
+
};
|
|
1742
|
+
function qt() {
|
|
1743
|
+
if (K > 0 || (Ue(), K > 0))
|
|
1744
|
+
return;
|
|
1745
|
+
function n() {
|
|
1746
|
+
Xt || (Xt = !0, u.calledRun = !0, !Ft && (Ve(), x(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), Be()));
|
|
1747
|
+
}
|
|
1748
|
+
u.setStatus ? (u.setStatus("Running..."), setTimeout(function() {
|
|
1749
|
+
setTimeout(function() {
|
|
1750
|
+
u.setStatus("");
|
|
1751
|
+
}, 1), n();
|
|
1752
|
+
}, 1)) : n();
|
|
1753
|
+
}
|
|
1754
|
+
if (u.preInit)
|
|
1755
|
+
for (typeof u.preInit == "function" && (u.preInit = [u.preInit]); u.preInit.length > 0; )
|
|
1756
|
+
u.preInit.pop()();
|
|
1757
|
+
return qt(), g.ready;
|
|
1758
|
+
};
|
|
1759
|
+
})();
|
|
1760
|
+
function za(d) {
|
|
1761
|
+
return ra(
|
|
1762
|
+
na,
|
|
1763
|
+
d
|
|
1764
|
+
);
|
|
387
1765
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
1766
|
+
async function Na(d, g) {
|
|
1767
|
+
return Ya(
|
|
1768
|
+
na,
|
|
1769
|
+
d,
|
|
1770
|
+
g
|
|
1771
|
+
);
|
|
1772
|
+
}
|
|
1773
|
+
async function Ga(d, g) {
|
|
1774
|
+
return La(
|
|
1775
|
+
na,
|
|
1776
|
+
d,
|
|
1777
|
+
g
|
|
1778
|
+
);
|
|
390
1779
|
}
|
|
391
|
-
var
|
|
392
|
-
var
|
|
393
|
-
return function(
|
|
394
|
-
var
|
|
395
|
-
|
|
396
|
-
|
|
1780
|
+
var qa = (() => {
|
|
1781
|
+
var d = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
1782
|
+
return function(g = {}) {
|
|
1783
|
+
var u = g, x, C;
|
|
1784
|
+
u.ready = new Promise((t, e) => {
|
|
1785
|
+
x = t, C = e;
|
|
397
1786
|
});
|
|
398
|
-
var
|
|
1787
|
+
var W = Object.assign({}, u), J = "./this.program", Z = typeof window == "object", q = typeof importScripts == "function";
|
|
399
1788
|
typeof process == "object" && typeof process.versions == "object" && process.versions.node;
|
|
400
|
-
var
|
|
401
|
-
function
|
|
402
|
-
return
|
|
1789
|
+
var I = "";
|
|
1790
|
+
function rt(t) {
|
|
1791
|
+
return u.locateFile ? u.locateFile(t, I) : I + t;
|
|
403
1792
|
}
|
|
404
|
-
var
|
|
405
|
-
(
|
|
1793
|
+
var nt;
|
|
1794
|
+
(Z || q) && (q ? I = self.location.href : typeof document < "u" && document.currentScript && (I = document.currentScript.src), d && (I = d), I.indexOf("blob:") !== 0 ? I = I.substr(0, I.replace(/[?#].*/, "").lastIndexOf("/") + 1) : I = "", q && (nt = (t) => {
|
|
406
1795
|
var e = new XMLHttpRequest();
|
|
407
1796
|
return e.open("GET", t, !1), e.responseType = "arraybuffer", e.send(null), new Uint8Array(e.response);
|
|
408
|
-
})),
|
|
409
|
-
var
|
|
410
|
-
Object.assign(
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
var
|
|
414
|
-
function
|
|
415
|
-
t ||
|
|
416
|
-
}
|
|
417
|
-
var
|
|
418
|
-
function
|
|
419
|
-
var t =
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
var
|
|
423
|
-
function
|
|
424
|
-
if (
|
|
425
|
-
for (typeof
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
function
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
for (typeof
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
438
|
-
function
|
|
1797
|
+
})), u.print || console.log.bind(console);
|
|
1798
|
+
var z = u.printErr || console.error.bind(console);
|
|
1799
|
+
Object.assign(u, W), W = null, u.arguments && u.arguments, u.thisProgram && (J = u.thisProgram), u.quit && u.quit;
|
|
1800
|
+
var Q;
|
|
1801
|
+
u.wasmBinary && (Q = u.wasmBinary), typeof WebAssembly != "object" && ht("no native wasm support detected");
|
|
1802
|
+
var ut, Ft = !1;
|
|
1803
|
+
function Zt(t, e) {
|
|
1804
|
+
t || ht(e);
|
|
1805
|
+
}
|
|
1806
|
+
var U, k, at, lt, R, _, Qt, Kt;
|
|
1807
|
+
function te() {
|
|
1808
|
+
var t = ut.buffer;
|
|
1809
|
+
u.HEAP8 = U = new Int8Array(t), u.HEAP16 = at = new Int16Array(t), u.HEAPU8 = k = new Uint8Array(t), u.HEAPU16 = lt = new Uint16Array(t), u.HEAP32 = R = new Int32Array(t), u.HEAPU32 = _ = new Uint32Array(t), u.HEAPF32 = Qt = new Float32Array(t), u.HEAPF64 = Kt = new Float64Array(t);
|
|
1810
|
+
}
|
|
1811
|
+
var ee = [], re = [], ne = [];
|
|
1812
|
+
function Ue() {
|
|
1813
|
+
if (u.preRun)
|
|
1814
|
+
for (typeof u.preRun == "function" && (u.preRun = [u.preRun]); u.preRun.length; )
|
|
1815
|
+
Ye(u.preRun.shift());
|
|
1816
|
+
Dt(ee);
|
|
1817
|
+
}
|
|
1818
|
+
function Ve() {
|
|
1819
|
+
Dt(re);
|
|
1820
|
+
}
|
|
1821
|
+
function Be() {
|
|
1822
|
+
if (u.postRun)
|
|
1823
|
+
for (typeof u.postRun == "function" && (u.postRun = [u.postRun]); u.postRun.length; )
|
|
1824
|
+
ze(u.postRun.shift());
|
|
1825
|
+
Dt(ne);
|
|
1826
|
+
}
|
|
1827
|
+
function Ye(t) {
|
|
1828
|
+
ee.unshift(t);
|
|
1829
|
+
}
|
|
1830
|
+
function Le(t) {
|
|
1831
|
+
re.unshift(t);
|
|
1832
|
+
}
|
|
1833
|
+
function ze(t) {
|
|
439
1834
|
ne.unshift(t);
|
|
440
1835
|
}
|
|
441
|
-
|
|
442
|
-
|
|
1836
|
+
var K = 0, dt = null;
|
|
1837
|
+
function Ne(t) {
|
|
1838
|
+
K++, u.monitorRunDependencies && u.monitorRunDependencies(K);
|
|
443
1839
|
}
|
|
444
|
-
function
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
function yr(t) {
|
|
449
|
-
rt++, i.monitorRunDependencies && i.monitorRunDependencies(rt);
|
|
450
|
-
}
|
|
451
|
-
function vr(t) {
|
|
452
|
-
if (rt--, i.monitorRunDependencies && i.monitorRunDependencies(rt), rt == 0 && ht) {
|
|
453
|
-
var e = ht;
|
|
454
|
-
ht = null, e();
|
|
1840
|
+
function Ge(t) {
|
|
1841
|
+
if (K--, u.monitorRunDependencies && u.monitorRunDependencies(K), K == 0 && dt) {
|
|
1842
|
+
var e = dt;
|
|
1843
|
+
dt = null, e();
|
|
455
1844
|
}
|
|
456
1845
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
1846
|
+
function ht(t) {
|
|
1847
|
+
u.onAbort && u.onAbort(t), t = "Aborted(" + t + ")", z(t), Ft = !0, t += ". Build with -sASSERTIONS for more info.";
|
|
459
1848
|
var e = new WebAssembly.RuntimeError(t);
|
|
460
|
-
throw
|
|
461
|
-
}
|
|
462
|
-
var
|
|
463
|
-
|
|
464
|
-
function
|
|
465
|
-
if (t ==
|
|
466
|
-
return new Uint8Array(
|
|
467
|
-
if (
|
|
468
|
-
return
|
|
1849
|
+
throw C(e), e;
|
|
1850
|
+
}
|
|
1851
|
+
var qe = "data:application/octet-stream;base64,", ae = (t) => t.startsWith(qe), ot;
|
|
1852
|
+
ot = "zxing_full.wasm", ae(ot) || (ot = rt(ot));
|
|
1853
|
+
function oe(t) {
|
|
1854
|
+
if (t == ot && Q)
|
|
1855
|
+
return new Uint8Array(Q);
|
|
1856
|
+
if (nt)
|
|
1857
|
+
return nt(t);
|
|
469
1858
|
throw "both async and sync fetching of the wasm failed";
|
|
470
1859
|
}
|
|
471
|
-
function
|
|
472
|
-
return !
|
|
1860
|
+
function Xe(t) {
|
|
1861
|
+
return !Q && (Z || q) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then((e) => {
|
|
473
1862
|
if (!e.ok)
|
|
474
1863
|
throw "failed to load wasm binary file at '" + t + "'";
|
|
475
1864
|
return e.arrayBuffer();
|
|
476
|
-
}).catch(() =>
|
|
1865
|
+
}).catch(() => oe(t)) : Promise.resolve().then(() => oe(t));
|
|
477
1866
|
}
|
|
478
|
-
function
|
|
479
|
-
return
|
|
480
|
-
|
|
1867
|
+
function ie(t, e, r) {
|
|
1868
|
+
return Xe(t).then((a) => WebAssembly.instantiate(a, e)).then((a) => a).then(r, (a) => {
|
|
1869
|
+
z(`failed to asynchronously prepare wasm: ${a}`), ht(a);
|
|
481
1870
|
});
|
|
482
1871
|
}
|
|
483
|
-
function
|
|
484
|
-
return !t && typeof WebAssembly.instantiateStreaming == "function" && !
|
|
485
|
-
var
|
|
486
|
-
return
|
|
487
|
-
return
|
|
1872
|
+
function Je(t, e, r, a) {
|
|
1873
|
+
return !t && typeof WebAssembly.instantiateStreaming == "function" && !ae(e) && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then((o) => {
|
|
1874
|
+
var i = WebAssembly.instantiateStreaming(o, r);
|
|
1875
|
+
return i.then(a, function(s) {
|
|
1876
|
+
return z(`wasm streaming compile failed: ${s}`), z("falling back to ArrayBuffer instantiation"), ie(e, r, a);
|
|
488
1877
|
});
|
|
489
|
-
}) :
|
|
1878
|
+
}) : ie(e, r, a);
|
|
490
1879
|
}
|
|
491
|
-
function
|
|
492
|
-
var t = { a:
|
|
493
|
-
function e(
|
|
494
|
-
return
|
|
1880
|
+
function Ze() {
|
|
1881
|
+
var t = { a: jn };
|
|
1882
|
+
function e(a, o) {
|
|
1883
|
+
return P = a.exports, ut = P.ga, te(), ge = P.ka, Le(P.ha), Ge(), P;
|
|
495
1884
|
}
|
|
496
|
-
|
|
497
|
-
function r(
|
|
498
|
-
e(
|
|
1885
|
+
Ne();
|
|
1886
|
+
function r(a) {
|
|
1887
|
+
e(a.instance);
|
|
499
1888
|
}
|
|
500
|
-
if (
|
|
1889
|
+
if (u.instantiateWasm)
|
|
501
1890
|
try {
|
|
502
|
-
return
|
|
503
|
-
} catch (
|
|
504
|
-
|
|
1891
|
+
return u.instantiateWasm(t, e);
|
|
1892
|
+
} catch (a) {
|
|
1893
|
+
z(`Module.instantiateWasm callback failed with error: ${a}`), C(a);
|
|
505
1894
|
}
|
|
506
|
-
return
|
|
1895
|
+
return Je(Q, ot, t, r).catch(C), {};
|
|
507
1896
|
}
|
|
508
|
-
var
|
|
1897
|
+
var Dt = (t) => {
|
|
509
1898
|
for (; t.length > 0; )
|
|
510
|
-
t.shift()(
|
|
1899
|
+
t.shift()(u);
|
|
511
1900
|
};
|
|
512
|
-
|
|
513
|
-
var
|
|
514
|
-
var e = new
|
|
515
|
-
return e.get_caught() || (e.set_caught(!0),
|
|
516
|
-
},
|
|
517
|
-
|
|
518
|
-
var t =
|
|
519
|
-
|
|
1901
|
+
u.noExitRuntime;
|
|
1902
|
+
var $t = [], wt = 0, Qe = (t) => {
|
|
1903
|
+
var e = new jt(t);
|
|
1904
|
+
return e.get_caught() || (e.set_caught(!0), wt--), e.set_rethrown(!1), $t.push(e), We(e.excPtr), e.get_exception_ptr();
|
|
1905
|
+
}, N = 0, Ke = () => {
|
|
1906
|
+
T(0, 0);
|
|
1907
|
+
var t = $t.pop();
|
|
1908
|
+
xe(t.excPtr), N = 0;
|
|
520
1909
|
};
|
|
521
|
-
function
|
|
1910
|
+
function jt(t) {
|
|
522
1911
|
this.excPtr = t, this.ptr = t - 24, this.set_type = function(e) {
|
|
523
|
-
|
|
1912
|
+
_[this.ptr + 4 >> 2] = e;
|
|
524
1913
|
}, this.get_type = function() {
|
|
525
|
-
return
|
|
1914
|
+
return _[this.ptr + 4 >> 2];
|
|
526
1915
|
}, this.set_destructor = function(e) {
|
|
527
|
-
|
|
1916
|
+
_[this.ptr + 8 >> 2] = e;
|
|
528
1917
|
}, this.get_destructor = function() {
|
|
529
|
-
return
|
|
1918
|
+
return _[this.ptr + 8 >> 2];
|
|
530
1919
|
}, this.set_caught = function(e) {
|
|
531
|
-
e = e ? 1 : 0,
|
|
1920
|
+
e = e ? 1 : 0, U[this.ptr + 12 >> 0] = e;
|
|
532
1921
|
}, this.get_caught = function() {
|
|
533
|
-
return
|
|
1922
|
+
return U[this.ptr + 12 >> 0] != 0;
|
|
534
1923
|
}, this.set_rethrown = function(e) {
|
|
535
|
-
e = e ? 1 : 0,
|
|
1924
|
+
e = e ? 1 : 0, U[this.ptr + 13 >> 0] = e;
|
|
536
1925
|
}, this.get_rethrown = function() {
|
|
537
|
-
return
|
|
1926
|
+
return U[this.ptr + 13 >> 0] != 0;
|
|
538
1927
|
}, this.init = function(e, r) {
|
|
539
1928
|
this.set_adjusted_ptr(0), this.set_type(e), this.set_destructor(r);
|
|
540
1929
|
}, this.set_adjusted_ptr = function(e) {
|
|
541
|
-
|
|
1930
|
+
_[this.ptr + 16 >> 2] = e;
|
|
542
1931
|
}, this.get_adjusted_ptr = function() {
|
|
543
|
-
return
|
|
1932
|
+
return _[this.ptr + 16 >> 2];
|
|
544
1933
|
}, this.get_exception_ptr = function() {
|
|
545
|
-
var e =
|
|
1934
|
+
var e = Re(this.get_type());
|
|
546
1935
|
if (e)
|
|
547
|
-
return
|
|
1936
|
+
return _[this.excPtr >> 2];
|
|
548
1937
|
var r = this.get_adjusted_ptr();
|
|
549
1938
|
return r !== 0 ? r : this.excPtr;
|
|
550
1939
|
};
|
|
551
1940
|
}
|
|
552
|
-
var
|
|
553
|
-
throw
|
|
554
|
-
},
|
|
555
|
-
var e =
|
|
1941
|
+
var tr = (t) => {
|
|
1942
|
+
throw N || (N = t), N;
|
|
1943
|
+
}, xt = (t) => {
|
|
1944
|
+
var e = N;
|
|
556
1945
|
if (!e)
|
|
557
|
-
return
|
|
558
|
-
var r = new
|
|
1946
|
+
return gt(0), 0;
|
|
1947
|
+
var r = new jt(e);
|
|
559
1948
|
r.set_adjusted_ptr(e);
|
|
560
|
-
var
|
|
561
|
-
if (!
|
|
562
|
-
return
|
|
563
|
-
for (var
|
|
564
|
-
var
|
|
565
|
-
if (
|
|
1949
|
+
var a = r.get_type();
|
|
1950
|
+
if (!a)
|
|
1951
|
+
return gt(0), e;
|
|
1952
|
+
for (var o in t) {
|
|
1953
|
+
var i = t[o];
|
|
1954
|
+
if (i === 0 || i === a)
|
|
566
1955
|
break;
|
|
567
1956
|
var s = r.ptr + 16;
|
|
568
|
-
if (
|
|
569
|
-
return
|
|
1957
|
+
if (Me(i, a, s))
|
|
1958
|
+
return gt(i), e;
|
|
570
1959
|
}
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
var
|
|
574
|
-
|
|
575
|
-
}, Dr = () => {
|
|
576
|
-
var t = Ct.pop();
|
|
577
|
-
t || pt("no exception to throw");
|
|
1960
|
+
return gt(a), e;
|
|
1961
|
+
}, er = () => xt([]), rr = (t) => xt([t]), nr = (t, e) => xt([t, e]), ar = () => {
|
|
1962
|
+
var t = $t.pop();
|
|
1963
|
+
t || ht("no exception to throw");
|
|
578
1964
|
var e = t.excPtr;
|
|
579
|
-
throw t.get_rethrown() || (
|
|
580
|
-
},
|
|
581
|
-
var
|
|
582
|
-
throw
|
|
583
|
-
},
|
|
1965
|
+
throw t.get_rethrown() || ($t.push(t), t.set_rethrown(!0), t.set_caught(!1), wt++), N = e, N;
|
|
1966
|
+
}, or = (t, e, r) => {
|
|
1967
|
+
var a = new jt(t);
|
|
1968
|
+
throw a.init(e, r), N = t, wt++, N;
|
|
1969
|
+
}, ir = () => wt, bt = {}, se = (t) => {
|
|
584
1970
|
for (; t.length; ) {
|
|
585
1971
|
var e = t.pop(), r = t.pop();
|
|
586
1972
|
r(e);
|
|
587
1973
|
}
|
|
588
1974
|
};
|
|
589
|
-
function
|
|
590
|
-
return this.fromWireType(
|
|
591
|
-
}
|
|
592
|
-
var
|
|
593
|
-
throw new
|
|
594
|
-
},
|
|
595
|
-
t.forEach(function(
|
|
596
|
-
|
|
1975
|
+
function Wt(t) {
|
|
1976
|
+
return this.fromWireType(R[t >> 2]);
|
|
1977
|
+
}
|
|
1978
|
+
var it = {}, tt = {}, Ct = {}, ue, _t = (t) => {
|
|
1979
|
+
throw new ue(t);
|
|
1980
|
+
}, et = (t, e, r) => {
|
|
1981
|
+
t.forEach(function(c) {
|
|
1982
|
+
Ct[c] = e;
|
|
597
1983
|
});
|
|
598
|
-
function
|
|
599
|
-
var l = r(
|
|
600
|
-
l.length !== t.length &&
|
|
1984
|
+
function a(c) {
|
|
1985
|
+
var l = r(c);
|
|
1986
|
+
l.length !== t.length && _t("Mismatched type converter count");
|
|
601
1987
|
for (var f = 0; f < t.length; ++f)
|
|
602
|
-
|
|
1988
|
+
Y(t[f], l[f]);
|
|
603
1989
|
}
|
|
604
|
-
var
|
|
605
|
-
e.forEach((
|
|
606
|
-
|
|
607
|
-
|
|
1990
|
+
var o = new Array(e.length), i = [], s = 0;
|
|
1991
|
+
e.forEach((c, l) => {
|
|
1992
|
+
tt.hasOwnProperty(c) ? o[l] = tt[c] : (i.push(c), it.hasOwnProperty(c) || (it[c] = []), it[c].push(() => {
|
|
1993
|
+
o[l] = tt[c], ++s, s === i.length && a(o);
|
|
608
1994
|
}));
|
|
609
|
-
}),
|
|
610
|
-
},
|
|
611
|
-
var e =
|
|
612
|
-
delete
|
|
613
|
-
var r = e.rawConstructor,
|
|
614
|
-
|
|
615
|
-
var
|
|
616
|
-
return
|
|
617
|
-
var
|
|
618
|
-
|
|
619
|
-
var
|
|
620
|
-
|
|
1995
|
+
}), i.length === 0 && a(o);
|
|
1996
|
+
}, sr = (t) => {
|
|
1997
|
+
var e = bt[t];
|
|
1998
|
+
delete bt[t];
|
|
1999
|
+
var r = e.rawConstructor, a = e.rawDestructor, o = e.fields, i = o.map((s) => s.getterReturnType).concat(o.map((s) => s.setterArgumentType));
|
|
2000
|
+
et([t], i, (s) => {
|
|
2001
|
+
var c = {};
|
|
2002
|
+
return o.forEach((l, f) => {
|
|
2003
|
+
var m = l.fieldName, y = s[f], $ = l.getter, b = l.getterContext, S = s[f + o.length], F = l.setter, D = l.setterContext;
|
|
2004
|
+
c[m] = { read: (p) => y.fromWireType($(b, p)), write: (p, h) => {
|
|
2005
|
+
var v = [];
|
|
2006
|
+
F(D, p, S.toWireType(v, h)), se(v);
|
|
621
2007
|
} };
|
|
622
2008
|
}), [{ name: e.name, fromWireType: (l) => {
|
|
623
2009
|
var f = {};
|
|
624
|
-
for (var
|
|
625
|
-
f[
|
|
626
|
-
return
|
|
2010
|
+
for (var m in c)
|
|
2011
|
+
f[m] = c[m].read(l);
|
|
2012
|
+
return a(l), f;
|
|
627
2013
|
}, toWireType: (l, f) => {
|
|
628
|
-
for (var
|
|
629
|
-
if (!(
|
|
630
|
-
throw new TypeError(`Missing field: "${
|
|
2014
|
+
for (var m in c)
|
|
2015
|
+
if (!(m in f))
|
|
2016
|
+
throw new TypeError(`Missing field: "${m}"`);
|
|
631
2017
|
var y = r();
|
|
632
|
-
for (
|
|
633
|
-
|
|
634
|
-
return l !== null && l.push(
|
|
635
|
-
}, argPackAdvance:
|
|
2018
|
+
for (m in c)
|
|
2019
|
+
c[m].write(y, f[m]);
|
|
2020
|
+
return l !== null && l.push(a, y), y;
|
|
2021
|
+
}, argPackAdvance: L, readValueFromPointer: Wt, destructorFunction: a }];
|
|
636
2022
|
});
|
|
637
|
-
},
|
|
638
|
-
},
|
|
2023
|
+
}, ur = (t, e, r, a, o) => {
|
|
2024
|
+
}, cr = () => {
|
|
639
2025
|
for (var t = new Array(256), e = 0; e < 256; ++e)
|
|
640
2026
|
t[e] = String.fromCharCode(e);
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
for (var e = "", r = t;
|
|
644
|
-
e +=
|
|
2027
|
+
ce = t;
|
|
2028
|
+
}, ce, M = (t) => {
|
|
2029
|
+
for (var e = "", r = t; k[r]; )
|
|
2030
|
+
e += ce[k[r++]];
|
|
645
2031
|
return e;
|
|
646
|
-
},
|
|
647
|
-
throw new
|
|
2032
|
+
}, st, w = (t) => {
|
|
2033
|
+
throw new st(t);
|
|
648
2034
|
};
|
|
649
|
-
function
|
|
650
|
-
var
|
|
651
|
-
if (t ||
|
|
2035
|
+
function lr(t, e, r = {}) {
|
|
2036
|
+
var a = e.name;
|
|
2037
|
+
if (t || w(`type "${a}" must have a positive integer typeid pointer`), tt.hasOwnProperty(t)) {
|
|
652
2038
|
if (r.ignoreDuplicateRegistrations)
|
|
653
2039
|
return;
|
|
654
|
-
|
|
2040
|
+
w(`Cannot register type '${a}' twice`);
|
|
655
2041
|
}
|
|
656
|
-
if (
|
|
657
|
-
var
|
|
658
|
-
delete
|
|
2042
|
+
if (tt[t] = e, delete Ct[t], it.hasOwnProperty(t)) {
|
|
2043
|
+
var o = it[t];
|
|
2044
|
+
delete it[t], o.forEach((i) => i());
|
|
659
2045
|
}
|
|
660
2046
|
}
|
|
661
|
-
function
|
|
2047
|
+
function Y(t, e, r = {}) {
|
|
662
2048
|
if (!("argPackAdvance" in e))
|
|
663
2049
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
664
|
-
return
|
|
665
|
-
}
|
|
666
|
-
var
|
|
667
|
-
e =
|
|
668
|
-
return !!
|
|
669
|
-
}, toWireType: function(
|
|
670
|
-
return
|
|
671
|
-
}, argPackAdvance:
|
|
672
|
-
return this.fromWireType(
|
|
2050
|
+
return lr(t, e, r);
|
|
2051
|
+
}
|
|
2052
|
+
var L = 8, dr = (t, e, r, a) => {
|
|
2053
|
+
e = M(e), Y(t, { name: e, fromWireType: function(o) {
|
|
2054
|
+
return !!o;
|
|
2055
|
+
}, toWireType: function(o, i) {
|
|
2056
|
+
return i ? r : a;
|
|
2057
|
+
}, argPackAdvance: L, readValueFromPointer: function(o) {
|
|
2058
|
+
return this.fromWireType(k[o]);
|
|
673
2059
|
}, destructorFunction: null });
|
|
674
|
-
},
|
|
2060
|
+
}, hr = (t) => ({ count: t.count, deleteScheduled: t.deleteScheduled, preservePointerOnDelete: t.preservePointerOnDelete, ptr: t.ptr, ptrType: t.ptrType, smartPtr: t.smartPtr, smartPtrType: t.smartPtrType }), Mt = (t) => {
|
|
675
2061
|
function e(r) {
|
|
676
2062
|
return r.$$.ptrType.registeredClass.name;
|
|
677
2063
|
}
|
|
678
|
-
|
|
679
|
-
},
|
|
680
|
-
},
|
|
2064
|
+
w(e(t) + " instance already deleted");
|
|
2065
|
+
}, Rt = !1, le = (t) => {
|
|
2066
|
+
}, fr = (t) => {
|
|
681
2067
|
t.smartPtr ? t.smartPtrType.rawDestructor(t.smartPtr) : t.ptrType.registeredClass.rawDestructor(t.ptr);
|
|
682
|
-
},
|
|
2068
|
+
}, de = (t) => {
|
|
683
2069
|
t.count.value -= 1;
|
|
684
2070
|
var e = t.count.value === 0;
|
|
685
|
-
e &&
|
|
686
|
-
},
|
|
2071
|
+
e && fr(t);
|
|
2072
|
+
}, he = (t, e, r) => {
|
|
687
2073
|
if (e === r)
|
|
688
2074
|
return t;
|
|
689
2075
|
if (r.baseClass === void 0)
|
|
690
2076
|
return null;
|
|
691
|
-
var
|
|
692
|
-
return
|
|
693
|
-
},
|
|
2077
|
+
var a = he(t, e, r.baseClass);
|
|
2078
|
+
return a === null ? null : r.downcast(a);
|
|
2079
|
+
}, fe = {}, pr = () => Object.keys(mt).length, mr = () => {
|
|
694
2080
|
var t = [];
|
|
695
|
-
for (var e in
|
|
696
|
-
|
|
2081
|
+
for (var e in mt)
|
|
2082
|
+
mt.hasOwnProperty(e) && t.push(mt[e]);
|
|
697
2083
|
return t;
|
|
698
|
-
},
|
|
699
|
-
for (;
|
|
700
|
-
var t =
|
|
2084
|
+
}, ft = [], It = () => {
|
|
2085
|
+
for (; ft.length; ) {
|
|
2086
|
+
var t = ft.pop();
|
|
701
2087
|
t.$$.deleteScheduled = !1, t.delete();
|
|
702
2088
|
}
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
},
|
|
706
|
-
|
|
707
|
-
},
|
|
708
|
-
for (e === void 0 &&
|
|
2089
|
+
}, pt, yr = (t) => {
|
|
2090
|
+
pt = t, ft.length && pt && pt(It);
|
|
2091
|
+
}, vr = () => {
|
|
2092
|
+
u.getInheritedInstanceCount = pr, u.getLiveInheritedInstances = mr, u.flushPendingDeletes = It, u.setDelayFunction = yr;
|
|
2093
|
+
}, mt = {}, gr = (t, e) => {
|
|
2094
|
+
for (e === void 0 && w("ptr should not be undefined"); t.baseClass; )
|
|
709
2095
|
e = t.upcast(e), t = t.baseClass;
|
|
710
2096
|
return e;
|
|
711
|
-
},
|
|
712
|
-
(!e.ptrType || !e.ptr) &&
|
|
713
|
-
var r = !!e.smartPtrType,
|
|
714
|
-
return r !==
|
|
2097
|
+
}, $r = (t, e) => (e = gr(t, e), mt[e]), Tt = (t, e) => {
|
|
2098
|
+
(!e.ptrType || !e.ptr) && _t("makeClassHandle requires ptr and ptrType");
|
|
2099
|
+
var r = !!e.smartPtrType, a = !!e.smartPtr;
|
|
2100
|
+
return r !== a && _t("Both smartPtrType and smartPtr must be specified"), e.count = { value: 1 }, yt(Object.create(t, { $$: { value: e } }));
|
|
715
2101
|
};
|
|
716
|
-
function
|
|
2102
|
+
function wr(t) {
|
|
717
2103
|
var e = this.getPointee(t);
|
|
718
2104
|
if (!e)
|
|
719
2105
|
return this.destructor(t), null;
|
|
720
|
-
var r =
|
|
2106
|
+
var r = $r(this.registeredClass, e);
|
|
721
2107
|
if (r !== void 0) {
|
|
722
2108
|
if (r.$$.count.value === 0)
|
|
723
2109
|
return r.$$.ptr = e, r.$$.smartPtr = t, r.clone();
|
|
724
|
-
var
|
|
725
|
-
return this.destructor(t),
|
|
2110
|
+
var a = r.clone();
|
|
2111
|
+
return this.destructor(t), a;
|
|
726
2112
|
}
|
|
727
|
-
function
|
|
728
|
-
return this.isSmartPointer ?
|
|
2113
|
+
function o() {
|
|
2114
|
+
return this.isSmartPointer ? Tt(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: e, smartPtrType: this, smartPtr: t }) : Tt(this.registeredClass.instancePrototype, { ptrType: this, ptr: t });
|
|
729
2115
|
}
|
|
730
|
-
var
|
|
2116
|
+
var i = this.registeredClass.getActualType(e), s = fe[i];
|
|
731
2117
|
if (!s)
|
|
732
|
-
return
|
|
733
|
-
var
|
|
734
|
-
this.isConst ?
|
|
735
|
-
var l =
|
|
736
|
-
return l === null ?
|
|
737
|
-
}
|
|
738
|
-
var
|
|
739
|
-
|
|
740
|
-
}),
|
|
741
|
-
var r = e.$$,
|
|
742
|
-
if (
|
|
743
|
-
var
|
|
744
|
-
|
|
2118
|
+
return o.call(this);
|
|
2119
|
+
var c;
|
|
2120
|
+
this.isConst ? c = s.constPointerType : c = s.pointerType;
|
|
2121
|
+
var l = he(e, this.registeredClass, c.registeredClass);
|
|
2122
|
+
return l === null ? o.call(this) : this.isSmartPointer ? Tt(c.registeredClass.instancePrototype, { ptrType: c, ptr: l, smartPtrType: this, smartPtr: t }) : Tt(c.registeredClass.instancePrototype, { ptrType: c, ptr: l });
|
|
2123
|
+
}
|
|
2124
|
+
var yt = (t) => typeof FinalizationRegistry > "u" ? (yt = (e) => e, t) : (Rt = new FinalizationRegistry((e) => {
|
|
2125
|
+
de(e.$$);
|
|
2126
|
+
}), yt = (e) => {
|
|
2127
|
+
var r = e.$$, a = !!r.smartPtr;
|
|
2128
|
+
if (a) {
|
|
2129
|
+
var o = { $$: r };
|
|
2130
|
+
Rt.register(e, o, e);
|
|
745
2131
|
}
|
|
746
2132
|
return e;
|
|
747
|
-
},
|
|
748
|
-
Object.assign(
|
|
749
|
-
if (!(this instanceof
|
|
2133
|
+
}, le = (e) => Rt.unregister(e), yt(t)), br = () => {
|
|
2134
|
+
Object.assign(Pt.prototype, { isAliasOf(t) {
|
|
2135
|
+
if (!(this instanceof Pt) || !(t instanceof Pt))
|
|
750
2136
|
return !1;
|
|
751
2137
|
var e = this.$$.ptrType.registeredClass, r = this.$$.ptr;
|
|
752
2138
|
t.$$ = t.$$;
|
|
753
|
-
for (var
|
|
2139
|
+
for (var a = t.$$.ptrType.registeredClass, o = t.$$.ptr; e.baseClass; )
|
|
754
2140
|
r = e.upcast(r), e = e.baseClass;
|
|
755
|
-
for (;
|
|
756
|
-
|
|
757
|
-
return e ===
|
|
2141
|
+
for (; a.baseClass; )
|
|
2142
|
+
o = a.upcast(o), a = a.baseClass;
|
|
2143
|
+
return e === a && r === o;
|
|
758
2144
|
}, clone() {
|
|
759
|
-
if (this.$$.ptr ||
|
|
2145
|
+
if (this.$$.ptr || Mt(this), this.$$.preservePointerOnDelete)
|
|
760
2146
|
return this.$$.count.value += 1, this;
|
|
761
|
-
var t =
|
|
2147
|
+
var t = yt(Object.create(Object.getPrototypeOf(this), { $$: { value: hr(this.$$) } }));
|
|
762
2148
|
return t.$$.count.value += 1, t.$$.deleteScheduled = !1, t;
|
|
763
2149
|
}, delete() {
|
|
764
|
-
this.$$.ptr ||
|
|
2150
|
+
this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), le(this), de(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
765
2151
|
}, isDeleted() {
|
|
766
2152
|
return !this.$$.ptr;
|
|
767
2153
|
}, deleteLater() {
|
|
768
|
-
return this.$$.ptr ||
|
|
2154
|
+
return this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), ft.push(this), ft.length === 1 && pt && pt(It), this.$$.deleteScheduled = !0, this;
|
|
769
2155
|
} });
|
|
770
2156
|
};
|
|
771
|
-
function
|
|
2157
|
+
function Pt() {
|
|
772
2158
|
}
|
|
773
|
-
var
|
|
2159
|
+
var Cr = 48, _r = 57, pe = (t) => {
|
|
774
2160
|
if (t === void 0)
|
|
775
2161
|
return "_unknown";
|
|
776
2162
|
t = t.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
777
2163
|
var e = t.charCodeAt(0);
|
|
778
|
-
return e >=
|
|
2164
|
+
return e >= Cr && e <= _r ? `_${t}` : t;
|
|
779
2165
|
};
|
|
780
|
-
function
|
|
781
|
-
return t =
|
|
2166
|
+
function kt(t, e) {
|
|
2167
|
+
return t = pe(t), { [t]: function() {
|
|
782
2168
|
return e.apply(this, arguments);
|
|
783
2169
|
} }[t];
|
|
784
2170
|
}
|
|
785
|
-
var
|
|
2171
|
+
var me = (t, e, r) => {
|
|
786
2172
|
if (t[e].overloadTable === void 0) {
|
|
787
|
-
var
|
|
2173
|
+
var a = t[e];
|
|
788
2174
|
t[e] = function() {
|
|
789
|
-
return t[e].overloadTable.hasOwnProperty(arguments.length) ||
|
|
790
|
-
}, t[e].overloadTable = [], t[e].overloadTable[
|
|
2175
|
+
return t[e].overloadTable.hasOwnProperty(arguments.length) || w(`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);
|
|
2176
|
+
}, t[e].overloadTable = [], t[e].overloadTable[a.argCount] = a;
|
|
791
2177
|
}
|
|
792
|
-
},
|
|
793
|
-
|
|
2178
|
+
}, Ht = (t, e, r) => {
|
|
2179
|
+
u.hasOwnProperty(t) ? ((r === void 0 || u[t].overloadTable !== void 0 && u[t].overloadTable[r] !== void 0) && w(`Cannot register public name '${t}' twice`), me(u, t, t), u.hasOwnProperty(r) && w(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), u[t].overloadTable[r] = e) : (u[t] = e, r !== void 0 && (u[t].numArguments = r));
|
|
794
2180
|
};
|
|
795
|
-
function
|
|
796
|
-
this.name = t, this.constructor = e, this.instancePrototype = r, this.rawDestructor =
|
|
2181
|
+
function Tr(t, e, r, a, o, i, s, c) {
|
|
2182
|
+
this.name = t, this.constructor = e, this.instancePrototype = r, this.rawDestructor = a, this.baseClass = o, this.getActualType = i, this.upcast = s, this.downcast = c, this.pureVirtualFunctions = [];
|
|
797
2183
|
}
|
|
798
|
-
var
|
|
2184
|
+
var Ut = (t, e, r) => {
|
|
799
2185
|
for (; e !== r; )
|
|
800
|
-
e.upcast ||
|
|
2186
|
+
e.upcast || w(`Expected null or instance of ${r.name}, got an instance of ${e.name}`), t = e.upcast(t), e = e.baseClass;
|
|
801
2187
|
return t;
|
|
802
2188
|
};
|
|
803
|
-
function
|
|
2189
|
+
function Pr(t, e) {
|
|
804
2190
|
if (e === null)
|
|
805
|
-
return this.isReference &&
|
|
806
|
-
e.$$ ||
|
|
807
|
-
var r = e.$$.ptrType.registeredClass,
|
|
808
|
-
return
|
|
2191
|
+
return this.isReference && w(`null is not a valid ${this.name}`), 0;
|
|
2192
|
+
e.$$ || w(`Cannot pass "${Lt(e)}" as a ${this.name}`), e.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
2193
|
+
var r = e.$$.ptrType.registeredClass, a = Ut(e.$$.ptr, r, this.registeredClass);
|
|
2194
|
+
return a;
|
|
809
2195
|
}
|
|
810
|
-
function
|
|
2196
|
+
function Ar(t, e) {
|
|
811
2197
|
var r;
|
|
812
2198
|
if (e === null)
|
|
813
|
-
return this.isReference &&
|
|
814
|
-
e.$$ ||
|
|
815
|
-
var
|
|
816
|
-
if (r =
|
|
817
|
-
switch (e.$$.smartPtr === void 0 &&
|
|
2199
|
+
return this.isReference && w(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), t !== null && t.push(this.rawDestructor, r), r) : 0;
|
|
2200
|
+
e.$$ || w(`Cannot pass "${Lt(e)}" as a ${this.name}`), e.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && e.$$.ptrType.isConst && w(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
2201
|
+
var a = e.$$.ptrType.registeredClass;
|
|
2202
|
+
if (r = Ut(e.$$.ptr, a, this.registeredClass), this.isSmartPointer)
|
|
2203
|
+
switch (e.$$.smartPtr === void 0 && w("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
818
2204
|
case 0:
|
|
819
|
-
e.$$.smartPtrType === this ? r = e.$$.smartPtr :
|
|
2205
|
+
e.$$.smartPtrType === this ? r = e.$$.smartPtr : w(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
820
2206
|
break;
|
|
821
2207
|
case 1:
|
|
822
2208
|
r = e.$$.smartPtr;
|
|
@@ -825,180 +2211,180 @@ var Kt = (() => {
|
|
|
825
2211
|
if (e.$$.smartPtrType === this)
|
|
826
2212
|
r = e.$$.smartPtr;
|
|
827
2213
|
else {
|
|
828
|
-
var
|
|
829
|
-
r = this.rawShare(r,
|
|
2214
|
+
var o = e.clone();
|
|
2215
|
+
r = this.rawShare(r, X.toHandle(() => o.delete())), t !== null && t.push(this.rawDestructor, r);
|
|
830
2216
|
}
|
|
831
2217
|
break;
|
|
832
2218
|
default:
|
|
833
|
-
|
|
2219
|
+
w("Unsupporting sharing policy");
|
|
834
2220
|
}
|
|
835
2221
|
return r;
|
|
836
2222
|
}
|
|
837
|
-
function
|
|
2223
|
+
function Er(t, e) {
|
|
838
2224
|
if (e === null)
|
|
839
|
-
return this.isReference &&
|
|
840
|
-
e.$$ ||
|
|
841
|
-
var r = e.$$.ptrType.registeredClass,
|
|
842
|
-
return
|
|
2225
|
+
return this.isReference && w(`null is not a valid ${this.name}`), 0;
|
|
2226
|
+
e.$$ || w(`Cannot pass "${Lt(e)}" as a ${this.name}`), e.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), e.$$.ptrType.isConst && w(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
2227
|
+
var r = e.$$.ptrType.registeredClass, a = Ut(e.$$.ptr, r, this.registeredClass);
|
|
2228
|
+
return a;
|
|
843
2229
|
}
|
|
844
|
-
function
|
|
845
|
-
return this.fromWireType(
|
|
2230
|
+
function ye(t) {
|
|
2231
|
+
return this.fromWireType(_[t >> 2]);
|
|
846
2232
|
}
|
|
847
|
-
var
|
|
848
|
-
Object.assign(
|
|
2233
|
+
var Or = () => {
|
|
2234
|
+
Object.assign(At.prototype, { getPointee(t) {
|
|
849
2235
|
return this.rawGetPointee && (t = this.rawGetPointee(t)), t;
|
|
850
2236
|
}, destructor(t) {
|
|
851
2237
|
this.rawDestructor && this.rawDestructor(t);
|
|
852
|
-
}, argPackAdvance:
|
|
2238
|
+
}, argPackAdvance: L, readValueFromPointer: ye, deleteObject(t) {
|
|
853
2239
|
t !== null && t.delete();
|
|
854
|
-
}, fromWireType:
|
|
2240
|
+
}, fromWireType: wr });
|
|
855
2241
|
};
|
|
856
|
-
function
|
|
857
|
-
this.name = t, this.registeredClass = e, this.isReference = r, this.isConst =
|
|
858
|
-
}
|
|
859
|
-
var
|
|
860
|
-
|
|
861
|
-
},
|
|
862
|
-
var
|
|
863
|
-
return r && r.length ?
|
|
864
|
-
},
|
|
865
|
-
var e =
|
|
866
|
-
return e || (t >=
|
|
867
|
-
},
|
|
2242
|
+
function At(t, e, r, a, o, i, s, c, l, f, m) {
|
|
2243
|
+
this.name = t, this.registeredClass = e, this.isReference = r, this.isConst = a, this.isSmartPointer = o, this.pointeeType = i, this.sharingPolicy = s, this.rawGetPointee = c, this.rawConstructor = l, this.rawShare = f, this.rawDestructor = m, !o && e.baseClass === void 0 ? a ? (this.toWireType = Pr, this.destructorFunction = null) : (this.toWireType = Er, this.destructorFunction = null) : this.toWireType = Ar;
|
|
2244
|
+
}
|
|
2245
|
+
var ve = (t, e, r) => {
|
|
2246
|
+
u.hasOwnProperty(t) || _t("Replacing nonexistant public symbol"), u[t].overloadTable !== void 0 && r !== void 0 ? u[t].overloadTable[r] = e : (u[t] = e, u[t].argCount = r);
|
|
2247
|
+
}, Sr = (t, e, r) => {
|
|
2248
|
+
var a = u["dynCall_" + t];
|
|
2249
|
+
return r && r.length ? a.apply(null, [e].concat(r)) : a.call(null, e);
|
|
2250
|
+
}, Et = [], ge, A = (t) => {
|
|
2251
|
+
var e = Et[t];
|
|
2252
|
+
return e || (t >= Et.length && (Et.length = t + 1), Et[t] = e = ge.get(t)), e;
|
|
2253
|
+
}, Fr = (t, e, r) => {
|
|
868
2254
|
if (t.includes("j"))
|
|
869
|
-
return
|
|
870
|
-
var
|
|
871
|
-
return
|
|
872
|
-
},
|
|
2255
|
+
return Sr(t, e, r);
|
|
2256
|
+
var a = A(e).apply(null, r);
|
|
2257
|
+
return a;
|
|
2258
|
+
}, Dr = (t, e) => {
|
|
873
2259
|
var r = [];
|
|
874
2260
|
return function() {
|
|
875
|
-
return r.length = 0, Object.assign(r, arguments),
|
|
2261
|
+
return r.length = 0, Object.assign(r, arguments), Fr(t, e, r);
|
|
876
2262
|
};
|
|
877
|
-
},
|
|
878
|
-
t =
|
|
2263
|
+
}, B = (t, e) => {
|
|
2264
|
+
t = M(t);
|
|
879
2265
|
function r() {
|
|
880
|
-
return t.includes("j") ?
|
|
881
|
-
}
|
|
882
|
-
var
|
|
883
|
-
return typeof
|
|
884
|
-
},
|
|
885
|
-
var r =
|
|
886
|
-
this.name = e, this.message =
|
|
887
|
-
var
|
|
888
|
-
|
|
889
|
-
` +
|
|
2266
|
+
return t.includes("j") ? Dr(t, e) : A(e);
|
|
2267
|
+
}
|
|
2268
|
+
var a = r();
|
|
2269
|
+
return typeof a != "function" && w(`unknown function pointer with signature ${t}: ${e}`), a;
|
|
2270
|
+
}, jr = (t, e) => {
|
|
2271
|
+
var r = kt(e, function(a) {
|
|
2272
|
+
this.name = e, this.message = a;
|
|
2273
|
+
var o = new Error(a).stack;
|
|
2274
|
+
o !== void 0 && (this.stack = this.toString() + `
|
|
2275
|
+
` + o.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
890
2276
|
});
|
|
891
2277
|
return r.prototype = Object.create(t.prototype), r.prototype.constructor = r, r.prototype.toString = function() {
|
|
892
2278
|
return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
|
|
893
2279
|
}, r;
|
|
894
|
-
},
|
|
895
|
-
var e =
|
|
896
|
-
return
|
|
897
|
-
},
|
|
898
|
-
var r = [],
|
|
899
|
-
function
|
|
900
|
-
if (!
|
|
901
|
-
if (
|
|
902
|
-
|
|
2280
|
+
}, $e, we = (t) => {
|
|
2281
|
+
var e = je(t), r = M(e);
|
|
2282
|
+
return G(e), r;
|
|
2283
|
+
}, Ot = (t, e) => {
|
|
2284
|
+
var r = [], a = {};
|
|
2285
|
+
function o(i) {
|
|
2286
|
+
if (!a[i] && !tt[i]) {
|
|
2287
|
+
if (Ct[i]) {
|
|
2288
|
+
Ct[i].forEach(o);
|
|
903
2289
|
return;
|
|
904
2290
|
}
|
|
905
|
-
r.push(
|
|
2291
|
+
r.push(i), a[i] = !0;
|
|
906
2292
|
}
|
|
907
2293
|
}
|
|
908
|
-
throw e.forEach(
|
|
909
|
-
},
|
|
910
|
-
|
|
911
|
-
var
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}),
|
|
915
|
-
|
|
916
|
-
var
|
|
917
|
-
|
|
918
|
-
var
|
|
919
|
-
if (Object.getPrototypeOf(this) !==
|
|
920
|
-
throw new
|
|
921
|
-
if (
|
|
922
|
-
throw new
|
|
923
|
-
var
|
|
924
|
-
if (
|
|
925
|
-
throw new
|
|
926
|
-
return
|
|
927
|
-
}),
|
|
928
|
-
|
|
929
|
-
var
|
|
930
|
-
|
|
931
|
-
var
|
|
932
|
-
return
|
|
2294
|
+
throw e.forEach(o), new $e(`${t}: ` + r.map(we).join([", "]));
|
|
2295
|
+
}, xr = (t, e, r, a, o, i, s, c, l, f, m, y, $) => {
|
|
2296
|
+
m = M(m), i = B(o, i), c && (c = B(s, c)), f && (f = B(l, f)), $ = B(y, $);
|
|
2297
|
+
var b = pe(m);
|
|
2298
|
+
Ht(b, function() {
|
|
2299
|
+
Ot(`Cannot construct ${m} due to unbound types`, [a]);
|
|
2300
|
+
}), et([t, e, r], a ? [a] : [], function(S) {
|
|
2301
|
+
S = S[0];
|
|
2302
|
+
var F, D;
|
|
2303
|
+
a ? (F = S.registeredClass, D = F.instancePrototype) : D = Pt.prototype;
|
|
2304
|
+
var p = kt(b, function() {
|
|
2305
|
+
if (Object.getPrototypeOf(this) !== h)
|
|
2306
|
+
throw new st("Use 'new' to construct " + m);
|
|
2307
|
+
if (v.constructor_body === void 0)
|
|
2308
|
+
throw new st(m + " has no accessible constructor");
|
|
2309
|
+
var ke = v.constructor_body[arguments.length];
|
|
2310
|
+
if (ke === void 0)
|
|
2311
|
+
throw new st(`Tried to invoke ctor of ${m} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(v.constructor_body).toString()}) parameters instead!`);
|
|
2312
|
+
return ke.apply(this, arguments);
|
|
2313
|
+
}), h = Object.create(D, { constructor: { value: p } });
|
|
2314
|
+
p.prototype = h;
|
|
2315
|
+
var v = new Tr(m, p, h, $, F, i, c, f);
|
|
2316
|
+
v.baseClass && (v.baseClass.__derivedClasses === void 0 && (v.baseClass.__derivedClasses = []), v.baseClass.__derivedClasses.push(v));
|
|
2317
|
+
var j = new At(m, v, !0, !1, !1), H = new At(m + "*", v, !1, !1, !1), ct = new At(m + " const*", v, !1, !0, !1);
|
|
2318
|
+
return fe[t] = { pointerType: H, constPointerType: ct }, ve(b, p), [j, H, ct];
|
|
933
2319
|
});
|
|
934
|
-
},
|
|
935
|
-
for (var r = [],
|
|
936
|
-
r.push(
|
|
2320
|
+
}, Vt = (t, e) => {
|
|
2321
|
+
for (var r = [], a = 0; a < t; a++)
|
|
2322
|
+
r.push(_[e + a * 4 >> 2]);
|
|
937
2323
|
return r;
|
|
938
2324
|
};
|
|
939
|
-
function
|
|
2325
|
+
function Bt(t, e, r, a, o, i) {
|
|
940
2326
|
var s = e.length;
|
|
941
|
-
s < 2 &&
|
|
942
|
-
for (var
|
|
2327
|
+
s < 2 && w("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2328
|
+
for (var c = e[1] !== null && r !== null, l = !1, f = 1; f < e.length; ++f)
|
|
943
2329
|
if (e[f] !== null && e[f].destructorFunction === void 0) {
|
|
944
2330
|
l = !0;
|
|
945
2331
|
break;
|
|
946
2332
|
}
|
|
947
|
-
var
|
|
2333
|
+
var m = e[0].name !== "void", y = s - 2, $ = new Array(y), b = [], S = [];
|
|
948
2334
|
return function() {
|
|
949
|
-
arguments.length !== y &&
|
|
950
|
-
var
|
|
951
|
-
|
|
952
|
-
for (var
|
|
953
|
-
|
|
954
|
-
var
|
|
955
|
-
function
|
|
2335
|
+
arguments.length !== y && w(`function ${t} called with ${arguments.length} arguments, expected ${y}`), S.length = 0;
|
|
2336
|
+
var F;
|
|
2337
|
+
b.length = c ? 2 : 1, b[0] = o, c && (F = e[1].toWireType(S, this), b[1] = F);
|
|
2338
|
+
for (var D = 0; D < y; ++D)
|
|
2339
|
+
$[D] = e[D + 2].toWireType(S, arguments[D]), b.push($[D]);
|
|
2340
|
+
var p = a.apply(null, b);
|
|
2341
|
+
function h(v) {
|
|
956
2342
|
if (l)
|
|
957
|
-
|
|
2343
|
+
se(S);
|
|
958
2344
|
else
|
|
959
|
-
for (var
|
|
960
|
-
var
|
|
961
|
-
e[
|
|
2345
|
+
for (var j = c ? 1 : 2; j < e.length; j++) {
|
|
2346
|
+
var H = j === 1 ? F : $[j - 2];
|
|
2347
|
+
e[j].destructorFunction !== null && e[j].destructorFunction(H);
|
|
962
2348
|
}
|
|
963
|
-
if (
|
|
964
|
-
return e[0].fromWireType(
|
|
2349
|
+
if (m)
|
|
2350
|
+
return e[0].fromWireType(v);
|
|
965
2351
|
}
|
|
966
|
-
return
|
|
2352
|
+
return h(p);
|
|
967
2353
|
};
|
|
968
2354
|
}
|
|
969
|
-
var
|
|
970
|
-
var s =
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
var l = `constructor ${
|
|
974
|
-
if (
|
|
975
|
-
throw new
|
|
976
|
-
return
|
|
977
|
-
|
|
978
|
-
},
|
|
2355
|
+
var Wr = (t, e, r, a, o, i) => {
|
|
2356
|
+
var s = Vt(e, r);
|
|
2357
|
+
o = B(a, o), et([], [t], function(c) {
|
|
2358
|
+
c = c[0];
|
|
2359
|
+
var l = `constructor ${c.name}`;
|
|
2360
|
+
if (c.registeredClass.constructor_body === void 0 && (c.registeredClass.constructor_body = []), c.registeredClass.constructor_body[e - 1] !== void 0)
|
|
2361
|
+
throw new st(`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!`);
|
|
2362
|
+
return c.registeredClass.constructor_body[e - 1] = () => {
|
|
2363
|
+
Ot(`Cannot construct ${c.name} due to unbound types`, s);
|
|
2364
|
+
}, et([], s, (f) => (f.splice(1, 0, null), c.registeredClass.constructor_body[e - 1] = Bt(l, f, null, o, i), [])), [];
|
|
979
2365
|
});
|
|
980
|
-
},
|
|
2366
|
+
}, be = (t) => {
|
|
981
2367
|
t = t.trim();
|
|
982
2368
|
const e = t.indexOf("(");
|
|
983
|
-
return e !== -1 ? (
|
|
984
|
-
},
|
|
985
|
-
var f =
|
|
986
|
-
e =
|
|
987
|
-
|
|
988
|
-
var y = `${
|
|
989
|
-
e.startsWith("@@") && (e = Symbol[e.substring(2)]),
|
|
990
|
-
function
|
|
991
|
-
|
|
2369
|
+
return e !== -1 ? (Zt(t[t.length - 1] == ")", "Parentheses for argument names should match."), t.substr(0, e)) : t;
|
|
2370
|
+
}, Mr = (t, e, r, a, o, i, s, c, l) => {
|
|
2371
|
+
var f = Vt(r, a);
|
|
2372
|
+
e = M(e), e = be(e), i = B(o, i), et([], [t], function(m) {
|
|
2373
|
+
m = m[0];
|
|
2374
|
+
var y = `${m.name}.${e}`;
|
|
2375
|
+
e.startsWith("@@") && (e = Symbol[e.substring(2)]), c && m.registeredClass.pureVirtualFunctions.push(e);
|
|
2376
|
+
function $() {
|
|
2377
|
+
Ot(`Cannot call ${y} due to unbound types`, f);
|
|
992
2378
|
}
|
|
993
|
-
var
|
|
994
|
-
return
|
|
995
|
-
var
|
|
996
|
-
return
|
|
2379
|
+
var b = m.registeredClass.instancePrototype, S = b[e];
|
|
2380
|
+
return S === void 0 || S.overloadTable === void 0 && S.className !== m.name && S.argCount === r - 2 ? ($.argCount = r - 2, $.className = m.name, b[e] = $) : (me(b, e, y), b[e].overloadTable[r - 2] = $), et([], f, function(F) {
|
|
2381
|
+
var D = Bt(y, F, m, i, s);
|
|
2382
|
+
return b[e].overloadTable === void 0 ? (D.argCount = r - 2, b[e] = D) : b[e].overloadTable[r - 2] = D, [];
|
|
997
2383
|
}), [];
|
|
998
2384
|
});
|
|
999
2385
|
};
|
|
1000
|
-
function
|
|
1001
|
-
Object.assign(
|
|
2386
|
+
function Rr() {
|
|
2387
|
+
Object.assign(Ce.prototype, { get(t) {
|
|
1002
2388
|
return this.allocated[t];
|
|
1003
2389
|
}, has(t) {
|
|
1004
2390
|
return this.allocated[t] !== void 0;
|
|
@@ -1009,18 +2395,18 @@ var Kt = (() => {
|
|
|
1009
2395
|
this.allocated[t] = void 0, this.freelist.push(t);
|
|
1010
2396
|
} });
|
|
1011
2397
|
}
|
|
1012
|
-
function
|
|
2398
|
+
function Ce() {
|
|
1013
2399
|
this.allocated = [void 0], this.freelist = [];
|
|
1014
2400
|
}
|
|
1015
|
-
var
|
|
1016
|
-
t >=
|
|
1017
|
-
},
|
|
1018
|
-
for (var t = 0, e =
|
|
1019
|
-
|
|
2401
|
+
var V = new Ce(), _e = (t) => {
|
|
2402
|
+
t >= V.reserved && --V.get(t).refcount === 0 && V.free(t);
|
|
2403
|
+
}, Ir = () => {
|
|
2404
|
+
for (var t = 0, e = V.reserved; e < V.allocated.length; ++e)
|
|
2405
|
+
V.allocated[e] !== void 0 && ++t;
|
|
1020
2406
|
return t;
|
|
1021
|
-
},
|
|
1022
|
-
|
|
1023
|
-
},
|
|
2407
|
+
}, kr = () => {
|
|
2408
|
+
V.allocated.push({ value: void 0 }, { value: null }, { value: !0 }, { value: !1 }), V.reserved = V.allocated.length, u.count_emval_handles = Ir;
|
|
2409
|
+
}, X = { toValue: (t) => (t || w("Cannot use deleted val. handle = " + t), V.get(t).value), toHandle: (t) => {
|
|
1024
2410
|
switch (t) {
|
|
1025
2411
|
case void 0:
|
|
1026
2412
|
return 1;
|
|
@@ -1031,253 +2417,292 @@ var Kt = (() => {
|
|
|
1031
2417
|
case !1:
|
|
1032
2418
|
return 4;
|
|
1033
2419
|
default:
|
|
1034
|
-
return
|
|
1035
|
-
}
|
|
1036
|
-
} },
|
|
1037
|
-
e =
|
|
1038
|
-
var
|
|
1039
|
-
return
|
|
1040
|
-
}, toWireType: (r,
|
|
1041
|
-
},
|
|
2420
|
+
return V.allocate({ refcount: 1, value: t });
|
|
2421
|
+
}
|
|
2422
|
+
} }, Hr = (t, e) => {
|
|
2423
|
+
e = M(e), Y(t, { name: e, fromWireType: (r) => {
|
|
2424
|
+
var a = X.toValue(r);
|
|
2425
|
+
return _e(r), a;
|
|
2426
|
+
}, toWireType: (r, a) => X.toHandle(a), argPackAdvance: L, readValueFromPointer: Wt, destructorFunction: null });
|
|
2427
|
+
}, Ur = (t, e, r) => {
|
|
2428
|
+
switch (e) {
|
|
2429
|
+
case 1:
|
|
2430
|
+
return r ? function(a) {
|
|
2431
|
+
return this.fromWireType(U[a >> 0]);
|
|
2432
|
+
} : function(a) {
|
|
2433
|
+
return this.fromWireType(k[a >> 0]);
|
|
2434
|
+
};
|
|
2435
|
+
case 2:
|
|
2436
|
+
return r ? function(a) {
|
|
2437
|
+
return this.fromWireType(at[a >> 1]);
|
|
2438
|
+
} : function(a) {
|
|
2439
|
+
return this.fromWireType(lt[a >> 1]);
|
|
2440
|
+
};
|
|
2441
|
+
case 4:
|
|
2442
|
+
return r ? function(a) {
|
|
2443
|
+
return this.fromWireType(R[a >> 2]);
|
|
2444
|
+
} : function(a) {
|
|
2445
|
+
return this.fromWireType(_[a >> 2]);
|
|
2446
|
+
};
|
|
2447
|
+
default:
|
|
2448
|
+
throw new TypeError(`invalid integer width (${e}): ${t}`);
|
|
2449
|
+
}
|
|
2450
|
+
}, Vr = (t, e, r, a) => {
|
|
2451
|
+
e = M(e);
|
|
2452
|
+
function o() {
|
|
2453
|
+
}
|
|
2454
|
+
o.values = {}, Y(t, { name: e, constructor: o, fromWireType: function(i) {
|
|
2455
|
+
return this.constructor.values[i];
|
|
2456
|
+
}, toWireType: (i, s) => s.value, argPackAdvance: L, readValueFromPointer: Ur(e, r, a), destructorFunction: null }), Ht(e, o);
|
|
2457
|
+
}, Yt = (t, e) => {
|
|
2458
|
+
var r = tt[t];
|
|
2459
|
+
return r === void 0 && w(e + " has unknown type " + we(t)), r;
|
|
2460
|
+
}, Br = (t, e, r) => {
|
|
2461
|
+
var a = Yt(t, "enum");
|
|
2462
|
+
e = M(e);
|
|
2463
|
+
var o = a.constructor, i = Object.create(a.constructor.prototype, { value: { value: r }, constructor: { value: kt(`${a.name}_${e}`, function() {
|
|
2464
|
+
}) } });
|
|
2465
|
+
o.values[r] = i, o[e] = i;
|
|
2466
|
+
}, Lt = (t) => {
|
|
1042
2467
|
if (t === null)
|
|
1043
2468
|
return "null";
|
|
1044
2469
|
var e = typeof t;
|
|
1045
2470
|
return e === "object" || e === "array" || e === "function" ? t.toString() : "" + t;
|
|
1046
|
-
},
|
|
2471
|
+
}, Yr = (t, e) => {
|
|
1047
2472
|
switch (e) {
|
|
1048
2473
|
case 4:
|
|
1049
2474
|
return function(r) {
|
|
1050
|
-
return this.fromWireType(
|
|
2475
|
+
return this.fromWireType(Qt[r >> 2]);
|
|
1051
2476
|
};
|
|
1052
2477
|
case 8:
|
|
1053
2478
|
return function(r) {
|
|
1054
|
-
return this.fromWireType(
|
|
2479
|
+
return this.fromWireType(Kt[r >> 3]);
|
|
1055
2480
|
};
|
|
1056
2481
|
default:
|
|
1057
2482
|
throw new TypeError(`invalid float width (${e}): ${t}`);
|
|
1058
2483
|
}
|
|
1059
|
-
},
|
|
1060
|
-
e =
|
|
1061
|
-
},
|
|
1062
|
-
var
|
|
1063
|
-
t =
|
|
1064
|
-
|
|
1065
|
-
}, e - 1),
|
|
2484
|
+
}, Lr = (t, e, r) => {
|
|
2485
|
+
e = M(e), Y(t, { name: e, fromWireType: (a) => a, toWireType: (a, o) => o, argPackAdvance: L, readValueFromPointer: Yr(e, r), destructorFunction: null });
|
|
2486
|
+
}, zr = (t, e, r, a, o, i, s) => {
|
|
2487
|
+
var c = Vt(e, r);
|
|
2488
|
+
t = M(t), t = be(t), o = B(a, o), Ht(t, function() {
|
|
2489
|
+
Ot(`Cannot call ${t} due to unbound types`, c);
|
|
2490
|
+
}, e - 1), et([], c, function(l) {
|
|
1066
2491
|
var f = [l[0], null].concat(l.slice(1));
|
|
1067
|
-
return
|
|
2492
|
+
return ve(t, Bt(t, f, null, o, i), e - 1), [];
|
|
1068
2493
|
});
|
|
1069
|
-
},
|
|
2494
|
+
}, Nr = (t, e, r) => {
|
|
1070
2495
|
switch (e) {
|
|
1071
2496
|
case 1:
|
|
1072
|
-
return r ? (
|
|
2497
|
+
return r ? (a) => U[a >> 0] : (a) => k[a >> 0];
|
|
1073
2498
|
case 2:
|
|
1074
|
-
return r ? (
|
|
2499
|
+
return r ? (a) => at[a >> 1] : (a) => lt[a >> 1];
|
|
1075
2500
|
case 4:
|
|
1076
|
-
return r ? (
|
|
2501
|
+
return r ? (a) => R[a >> 2] : (a) => _[a >> 2];
|
|
1077
2502
|
default:
|
|
1078
2503
|
throw new TypeError(`invalid integer width (${e}): ${t}`);
|
|
1079
2504
|
}
|
|
1080
|
-
},
|
|
1081
|
-
e =
|
|
1082
|
-
var
|
|
1083
|
-
if (
|
|
2505
|
+
}, Gr = (t, e, r, a, o) => {
|
|
2506
|
+
e = M(e);
|
|
2507
|
+
var i = (m) => m;
|
|
2508
|
+
if (a === 0) {
|
|
1084
2509
|
var s = 32 - 8 * r;
|
|
1085
|
-
|
|
2510
|
+
i = (m) => m << s >>> s;
|
|
1086
2511
|
}
|
|
1087
|
-
var
|
|
2512
|
+
var c = e.includes("unsigned"), l = (m, y) => {
|
|
1088
2513
|
}, f;
|
|
1089
|
-
|
|
2514
|
+
c ? f = function(m, y) {
|
|
1090
2515
|
return l(y, this.name), y >>> 0;
|
|
1091
|
-
} : f = function(
|
|
2516
|
+
} : f = function(m, y) {
|
|
1092
2517
|
return l(y, this.name), y;
|
|
1093
|
-
},
|
|
1094
|
-
},
|
|
1095
|
-
var
|
|
1096
|
-
function
|
|
1097
|
-
var
|
|
1098
|
-
return new
|
|
1099
|
-
}
|
|
1100
|
-
r =
|
|
1101
|
-
},
|
|
1102
|
-
if (!(
|
|
2518
|
+
}, Y(t, { name: e, fromWireType: i, toWireType: f, argPackAdvance: L, readValueFromPointer: Nr(e, r, a !== 0), destructorFunction: null });
|
|
2519
|
+
}, qr = (t, e, r) => {
|
|
2520
|
+
var a = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], o = a[e];
|
|
2521
|
+
function i(s) {
|
|
2522
|
+
var c = _[s >> 2], l = _[s + 4 >> 2];
|
|
2523
|
+
return new o(U.buffer, l, c);
|
|
2524
|
+
}
|
|
2525
|
+
r = M(r), Y(t, { name: r, fromWireType: i, argPackAdvance: L, readValueFromPointer: i }, { ignoreDuplicateRegistrations: !0 });
|
|
2526
|
+
}, Te = (t, e, r, a) => {
|
|
2527
|
+
if (!(a > 0))
|
|
1103
2528
|
return 0;
|
|
1104
|
-
for (var
|
|
1105
|
-
var
|
|
1106
|
-
if (
|
|
2529
|
+
for (var o = r, i = r + a - 1, s = 0; s < t.length; ++s) {
|
|
2530
|
+
var c = t.charCodeAt(s);
|
|
2531
|
+
if (c >= 55296 && c <= 57343) {
|
|
1107
2532
|
var l = t.charCodeAt(++s);
|
|
1108
|
-
|
|
2533
|
+
c = 65536 + ((c & 1023) << 10) | l & 1023;
|
|
1109
2534
|
}
|
|
1110
|
-
if (
|
|
1111
|
-
if (r >=
|
|
2535
|
+
if (c <= 127) {
|
|
2536
|
+
if (r >= i)
|
|
1112
2537
|
break;
|
|
1113
|
-
e[r++] =
|
|
1114
|
-
} else if (
|
|
1115
|
-
if (r + 1 >=
|
|
2538
|
+
e[r++] = c;
|
|
2539
|
+
} else if (c <= 2047) {
|
|
2540
|
+
if (r + 1 >= i)
|
|
1116
2541
|
break;
|
|
1117
|
-
e[r++] = 192 |
|
|
1118
|
-
} else if (
|
|
1119
|
-
if (r + 2 >=
|
|
2542
|
+
e[r++] = 192 | c >> 6, e[r++] = 128 | c & 63;
|
|
2543
|
+
} else if (c <= 65535) {
|
|
2544
|
+
if (r + 2 >= i)
|
|
1120
2545
|
break;
|
|
1121
|
-
e[r++] = 224 |
|
|
2546
|
+
e[r++] = 224 | c >> 12, e[r++] = 128 | c >> 6 & 63, e[r++] = 128 | c & 63;
|
|
1122
2547
|
} else {
|
|
1123
|
-
if (r + 3 >=
|
|
2548
|
+
if (r + 3 >= i)
|
|
1124
2549
|
break;
|
|
1125
|
-
e[r++] = 240 |
|
|
2550
|
+
e[r++] = 240 | c >> 18, e[r++] = 128 | c >> 12 & 63, e[r++] = 128 | c >> 6 & 63, e[r++] = 128 | c & 63;
|
|
1126
2551
|
}
|
|
1127
2552
|
}
|
|
1128
|
-
return e[r] = 0, r -
|
|
1129
|
-
},
|
|
2553
|
+
return e[r] = 0, r - o;
|
|
2554
|
+
}, Xr = (t, e, r) => Te(t, k, e, r), Pe = (t) => {
|
|
1130
2555
|
for (var e = 0, r = 0; r < t.length; ++r) {
|
|
1131
|
-
var
|
|
1132
|
-
|
|
2556
|
+
var a = t.charCodeAt(r);
|
|
2557
|
+
a <= 127 ? e++ : a <= 2047 ? e += 2 : a >= 55296 && a <= 57343 ? (e += 4, ++r) : e += 3;
|
|
1133
2558
|
}
|
|
1134
2559
|
return e;
|
|
1135
|
-
},
|
|
1136
|
-
for (var
|
|
1137
|
-
++
|
|
1138
|
-
if (
|
|
1139
|
-
return
|
|
1140
|
-
for (var
|
|
2560
|
+
}, Ae = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Jr = (t, e, r) => {
|
|
2561
|
+
for (var a = e + r, o = e; t[o] && !(o >= a); )
|
|
2562
|
+
++o;
|
|
2563
|
+
if (o - e > 16 && t.buffer && Ae)
|
|
2564
|
+
return Ae.decode(t.subarray(e, o));
|
|
2565
|
+
for (var i = ""; e < o; ) {
|
|
1141
2566
|
var s = t[e++];
|
|
1142
2567
|
if (!(s & 128)) {
|
|
1143
|
-
|
|
2568
|
+
i += String.fromCharCode(s);
|
|
1144
2569
|
continue;
|
|
1145
2570
|
}
|
|
1146
|
-
var
|
|
2571
|
+
var c = t[e++] & 63;
|
|
1147
2572
|
if ((s & 224) == 192) {
|
|
1148
|
-
|
|
2573
|
+
i += String.fromCharCode((s & 31) << 6 | c);
|
|
1149
2574
|
continue;
|
|
1150
2575
|
}
|
|
1151
2576
|
var l = t[e++] & 63;
|
|
1152
|
-
if ((s & 240) == 224 ? s = (s & 15) << 12 |
|
|
1153
|
-
|
|
2577
|
+
if ((s & 240) == 224 ? s = (s & 15) << 12 | c << 6 | l : s = (s & 7) << 18 | c << 12 | l << 6 | t[e++] & 63, s < 65536)
|
|
2578
|
+
i += String.fromCharCode(s);
|
|
1154
2579
|
else {
|
|
1155
2580
|
var f = s - 65536;
|
|
1156
|
-
|
|
2581
|
+
i += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023);
|
|
1157
2582
|
}
|
|
1158
2583
|
}
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
1161
|
-
e =
|
|
2584
|
+
return i;
|
|
2585
|
+
}, zt = (t, e) => t ? Jr(k, t, e) : "", Zr = (t, e) => {
|
|
2586
|
+
e = M(e);
|
|
1162
2587
|
var r = e === "std::string";
|
|
1163
|
-
|
|
1164
|
-
var
|
|
2588
|
+
Y(t, { name: e, fromWireType(a) {
|
|
2589
|
+
var o = _[a >> 2], i = a + 4, s;
|
|
1165
2590
|
if (r)
|
|
1166
|
-
for (var
|
|
1167
|
-
var f =
|
|
1168
|
-
if (l ==
|
|
1169
|
-
var
|
|
1170
|
-
s === void 0 ? s = y : (s += String.fromCharCode(0), s += y),
|
|
2591
|
+
for (var c = i, l = 0; l <= o; ++l) {
|
|
2592
|
+
var f = i + l;
|
|
2593
|
+
if (l == o || k[f] == 0) {
|
|
2594
|
+
var m = f - c, y = zt(c, m);
|
|
2595
|
+
s === void 0 ? s = y : (s += String.fromCharCode(0), s += y), c = f + 1;
|
|
1171
2596
|
}
|
|
1172
2597
|
}
|
|
1173
2598
|
else {
|
|
1174
|
-
for (var
|
|
1175
|
-
|
|
1176
|
-
s =
|
|
2599
|
+
for (var $ = new Array(o), l = 0; l < o; ++l)
|
|
2600
|
+
$[l] = String.fromCharCode(k[i + l]);
|
|
2601
|
+
s = $.join("");
|
|
1177
2602
|
}
|
|
1178
|
-
return
|
|
1179
|
-
}, toWireType(
|
|
1180
|
-
|
|
1181
|
-
var
|
|
1182
|
-
s ||
|
|
1183
|
-
var
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
2603
|
+
return G(a), s;
|
|
2604
|
+
}, toWireType(a, o) {
|
|
2605
|
+
o instanceof ArrayBuffer && (o = new Uint8Array(o));
|
|
2606
|
+
var i, s = typeof o == "string";
|
|
2607
|
+
s || o instanceof Uint8Array || o instanceof Uint8ClampedArray || o instanceof Int8Array || w("Cannot pass non-string to std::string"), r && s ? i = Pe(o) : i = o.length;
|
|
2608
|
+
var c = Gt(4 + i + 1), l = c + 4;
|
|
2609
|
+
if (_[c >> 2] = i, r && s)
|
|
2610
|
+
Xr(o, l, i + 1);
|
|
1186
2611
|
else if (s)
|
|
1187
|
-
for (var f = 0; f <
|
|
1188
|
-
var
|
|
1189
|
-
|
|
2612
|
+
for (var f = 0; f < i; ++f) {
|
|
2613
|
+
var m = o.charCodeAt(f);
|
|
2614
|
+
m > 255 && (G(l), w("String has UTF-16 code units that do not fit in 8 bits")), k[l + f] = m;
|
|
1190
2615
|
}
|
|
1191
2616
|
else
|
|
1192
|
-
for (var f = 0; f <
|
|
1193
|
-
|
|
1194
|
-
return
|
|
1195
|
-
}, argPackAdvance:
|
|
1196
|
-
|
|
2617
|
+
for (var f = 0; f < i; ++f)
|
|
2618
|
+
k[l + f] = o[f];
|
|
2619
|
+
return a !== null && a.push(G, c), c;
|
|
2620
|
+
}, argPackAdvance: L, readValueFromPointer: ye, destructorFunction(a) {
|
|
2621
|
+
G(a);
|
|
1197
2622
|
} });
|
|
1198
|
-
},
|
|
1199
|
-
for (var r = t,
|
|
1200
|
-
++
|
|
1201
|
-
if (r =
|
|
1202
|
-
return
|
|
1203
|
-
for (var
|
|
1204
|
-
var
|
|
1205
|
-
if (
|
|
2623
|
+
}, Ee = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Qr = (t, e) => {
|
|
2624
|
+
for (var r = t, a = r >> 1, o = a + e / 2; !(a >= o) && lt[a]; )
|
|
2625
|
+
++a;
|
|
2626
|
+
if (r = a << 1, r - t > 32 && Ee)
|
|
2627
|
+
return Ee.decode(k.subarray(t, r));
|
|
2628
|
+
for (var i = "", s = 0; !(s >= e / 2); ++s) {
|
|
2629
|
+
var c = at[t + s * 2 >> 1];
|
|
2630
|
+
if (c == 0)
|
|
1206
2631
|
break;
|
|
1207
|
-
|
|
2632
|
+
i += String.fromCharCode(c);
|
|
1208
2633
|
}
|
|
1209
|
-
return
|
|
1210
|
-
},
|
|
2634
|
+
return i;
|
|
2635
|
+
}, Kr = (t, e, r) => {
|
|
1211
2636
|
if (r === void 0 && (r = 2147483647), r < 2)
|
|
1212
2637
|
return 0;
|
|
1213
2638
|
r -= 2;
|
|
1214
|
-
for (var
|
|
1215
|
-
var s = t.charCodeAt(
|
|
1216
|
-
|
|
1217
|
-
}
|
|
1218
|
-
return
|
|
1219
|
-
},
|
|
1220
|
-
for (var r = 0,
|
|
1221
|
-
var
|
|
1222
|
-
if (
|
|
2639
|
+
for (var a = e, o = r < t.length * 2 ? r / 2 : t.length, i = 0; i < o; ++i) {
|
|
2640
|
+
var s = t.charCodeAt(i);
|
|
2641
|
+
at[e >> 1] = s, e += 2;
|
|
2642
|
+
}
|
|
2643
|
+
return at[e >> 1] = 0, e - a;
|
|
2644
|
+
}, tn = (t) => t.length * 2, en = (t, e) => {
|
|
2645
|
+
for (var r = 0, a = ""; !(r >= e / 4); ) {
|
|
2646
|
+
var o = R[t + r * 4 >> 2];
|
|
2647
|
+
if (o == 0)
|
|
1223
2648
|
break;
|
|
1224
|
-
if (++r,
|
|
1225
|
-
var
|
|
1226
|
-
|
|
2649
|
+
if (++r, o >= 65536) {
|
|
2650
|
+
var i = o - 65536;
|
|
2651
|
+
a += String.fromCharCode(55296 | i >> 10, 56320 | i & 1023);
|
|
1227
2652
|
} else
|
|
1228
|
-
|
|
2653
|
+
a += String.fromCharCode(o);
|
|
1229
2654
|
}
|
|
1230
|
-
return
|
|
1231
|
-
},
|
|
2655
|
+
return a;
|
|
2656
|
+
}, rn = (t, e, r) => {
|
|
1232
2657
|
if (r === void 0 && (r = 2147483647), r < 4)
|
|
1233
2658
|
return 0;
|
|
1234
|
-
for (var
|
|
1235
|
-
var s = t.charCodeAt(
|
|
2659
|
+
for (var a = e, o = a + r - 4, i = 0; i < t.length; ++i) {
|
|
2660
|
+
var s = t.charCodeAt(i);
|
|
1236
2661
|
if (s >= 55296 && s <= 57343) {
|
|
1237
|
-
var
|
|
1238
|
-
s = 65536 + ((s & 1023) << 10) |
|
|
2662
|
+
var c = t.charCodeAt(++i);
|
|
2663
|
+
s = 65536 + ((s & 1023) << 10) | c & 1023;
|
|
1239
2664
|
}
|
|
1240
|
-
if (
|
|
2665
|
+
if (R[e >> 2] = s, e += 4, e + 4 > o)
|
|
1241
2666
|
break;
|
|
1242
2667
|
}
|
|
1243
|
-
return
|
|
1244
|
-
},
|
|
2668
|
+
return R[e >> 2] = 0, e - a;
|
|
2669
|
+
}, nn = (t) => {
|
|
1245
2670
|
for (var e = 0, r = 0; r < t.length; ++r) {
|
|
1246
|
-
var
|
|
1247
|
-
|
|
2671
|
+
var a = t.charCodeAt(r);
|
|
2672
|
+
a >= 55296 && a <= 57343 && ++r, e += 4;
|
|
1248
2673
|
}
|
|
1249
2674
|
return e;
|
|
1250
|
-
},
|
|
1251
|
-
r =
|
|
1252
|
-
var
|
|
1253
|
-
e === 2 ? (
|
|
1254
|
-
for (var f =
|
|
1255
|
-
var
|
|
1256
|
-
if (
|
|
1257
|
-
var
|
|
1258
|
-
y === void 0 ? y =
|
|
2675
|
+
}, an = (t, e, r) => {
|
|
2676
|
+
r = M(r);
|
|
2677
|
+
var a, o, i, s, c;
|
|
2678
|
+
e === 2 ? (a = Qr, o = Kr, s = tn, i = () => lt, c = 1) : e === 4 && (a = en, o = rn, s = nn, i = () => _, c = 2), Y(t, { name: r, fromWireType: (l) => {
|
|
2679
|
+
for (var f = _[l >> 2], m = i(), y, $ = l + 4, b = 0; b <= f; ++b) {
|
|
2680
|
+
var S = l + 4 + b * e;
|
|
2681
|
+
if (b == f || m[S >> c] == 0) {
|
|
2682
|
+
var F = S - $, D = a($, F);
|
|
2683
|
+
y === void 0 ? y = D : (y += String.fromCharCode(0), y += D), $ = S + e;
|
|
1259
2684
|
}
|
|
1260
2685
|
}
|
|
1261
|
-
return
|
|
2686
|
+
return G(l), y;
|
|
1262
2687
|
}, toWireType: (l, f) => {
|
|
1263
|
-
typeof f != "string" &&
|
|
1264
|
-
var
|
|
1265
|
-
return
|
|
1266
|
-
}, argPackAdvance:
|
|
1267
|
-
|
|
2688
|
+
typeof f != "string" && w(`Cannot pass non-string to C++ string type ${r}`);
|
|
2689
|
+
var m = s(f), y = Gt(4 + m + e);
|
|
2690
|
+
return _[y >> 2] = m >> c, o(f, y + 4, m + e), l !== null && l.push(G, y), y;
|
|
2691
|
+
}, argPackAdvance: L, readValueFromPointer: Wt, destructorFunction(l) {
|
|
2692
|
+
G(l);
|
|
1268
2693
|
} });
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1271
|
-
},
|
|
1272
|
-
|
|
1273
|
-
},
|
|
1274
|
-
e =
|
|
1275
|
-
}, toWireType: (r,
|
|
2694
|
+
}, on = (t, e, r, a, o, i) => {
|
|
2695
|
+
bt[t] = { name: M(e), rawConstructor: B(r, a), rawDestructor: B(o, i), fields: [] };
|
|
2696
|
+
}, sn = (t, e, r, a, o, i, s, c, l, f) => {
|
|
2697
|
+
bt[t].fields.push({ fieldName: M(e), getterReturnType: r, getter: B(a, o), getterContext: i, setterArgumentType: s, setter: B(c, l), setterContext: f });
|
|
2698
|
+
}, un = (t, e) => {
|
|
2699
|
+
e = M(e), Y(t, { isVoid: !0, name: e, argPackAdvance: 0, fromWireType: () => {
|
|
2700
|
+
}, toWireType: (r, a) => {
|
|
1276
2701
|
} });
|
|
1277
|
-
},
|
|
1278
|
-
var e =
|
|
1279
|
-
return e === void 0 ?
|
|
1280
|
-
},
|
|
2702
|
+
}, cn = {}, ln = (t) => {
|
|
2703
|
+
var e = cn[t];
|
|
2704
|
+
return e === void 0 ? M(t) : e;
|
|
2705
|
+
}, Oe = () => {
|
|
1281
2706
|
if (typeof globalThis == "object")
|
|
1282
2707
|
return globalThis;
|
|
1283
2708
|
function t(e) {
|
|
@@ -1288,578 +2713,428 @@ var Kt = (() => {
|
|
|
1288
2713
|
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"))
|
|
1289
2714
|
return $$$embind_global$$$;
|
|
1290
2715
|
throw Error("unable to get global object.");
|
|
1291
|
-
},
|
|
1292
|
-
t > 4 && (
|
|
1293
|
-
},
|
|
1294
|
-
var r = at[t];
|
|
1295
|
-
return r === void 0 && E(e + " has unknown type " + Te(t)), r;
|
|
1296
|
-
}, In = (t) => {
|
|
2716
|
+
}, dn = (t) => t === 0 ? X.toHandle(Oe()) : (t = ln(t), X.toHandle(Oe()[t])), hn = (t) => {
|
|
2717
|
+
t > 4 && (V.get(t).refcount += 1);
|
|
2718
|
+
}, fn = (t) => {
|
|
1297
2719
|
var e = new Array(t + 1);
|
|
1298
|
-
return function(r,
|
|
2720
|
+
return function(r, a, o) {
|
|
1299
2721
|
e[0] = r;
|
|
1300
|
-
for (var
|
|
1301
|
-
var s =
|
|
1302
|
-
e[
|
|
2722
|
+
for (var i = 0; i < t; ++i) {
|
|
2723
|
+
var s = Yt(_[a + i * 4 >> 2], "parameter " + i);
|
|
2724
|
+
e[i + 1] = s.readValueFromPointer(o), o += s.argPackAdvance;
|
|
1303
2725
|
}
|
|
1304
|
-
var
|
|
1305
|
-
return
|
|
2726
|
+
var c = new (r.bind.apply(r, e))();
|
|
2727
|
+
return X.toHandle(c);
|
|
1306
2728
|
};
|
|
1307
|
-
},
|
|
1308
|
-
t =
|
|
1309
|
-
var
|
|
1310
|
-
return
|
|
1311
|
-
},
|
|
1312
|
-
t =
|
|
2729
|
+
}, Se = {}, pn = (t, e, r, a) => {
|
|
2730
|
+
t = X.toValue(t);
|
|
2731
|
+
var o = Se[e];
|
|
2732
|
+
return o || (o = fn(e), Se[e] = o), o(t, r, a);
|
|
2733
|
+
}, mn = (t, e) => {
|
|
2734
|
+
t = Yt(t, "_emval_take_value");
|
|
1313
2735
|
var r = t.readValueFromPointer(e);
|
|
1314
|
-
return
|
|
1315
|
-
},
|
|
1316
|
-
|
|
1317
|
-
},
|
|
1318
|
-
var e =
|
|
2736
|
+
return X.toHandle(r);
|
|
2737
|
+
}, yn = () => {
|
|
2738
|
+
ht("");
|
|
2739
|
+
}, vn = (t, e, r) => k.copyWithin(t, e, e + r), gn = () => 2147483648, $n = (t) => {
|
|
2740
|
+
var e = ut.buffer, r = (t - e.byteLength + 65535) / 65536;
|
|
1319
2741
|
try {
|
|
1320
|
-
return
|
|
2742
|
+
return ut.grow(r), te(), 1;
|
|
1321
2743
|
} catch {
|
|
1322
2744
|
}
|
|
1323
|
-
},
|
|
1324
|
-
var e =
|
|
2745
|
+
}, wn = (t) => {
|
|
2746
|
+
var e = k.length;
|
|
1325
2747
|
t >>>= 0;
|
|
1326
|
-
var r =
|
|
2748
|
+
var r = gn();
|
|
1327
2749
|
if (t > r)
|
|
1328
2750
|
return !1;
|
|
1329
|
-
for (var
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1332
|
-
var s = Math.min(r,
|
|
1333
|
-
if (
|
|
2751
|
+
for (var a = (l, f) => l + (f - l % f) % f, o = 1; o <= 4; o *= 2) {
|
|
2752
|
+
var i = e * (1 + 0.2 / o);
|
|
2753
|
+
i = Math.min(i, t + 100663296);
|
|
2754
|
+
var s = Math.min(r, a(Math.max(t, i), 65536)), c = $n(s);
|
|
2755
|
+
if (c)
|
|
1334
2756
|
return !0;
|
|
1335
2757
|
}
|
|
1336
2758
|
return !1;
|
|
1337
|
-
},
|
|
1338
|
-
if (!
|
|
1339
|
-
var t = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", e = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: t, _:
|
|
1340
|
-
for (var r in
|
|
1341
|
-
|
|
1342
|
-
var
|
|
2759
|
+
}, Nt = {}, bn = () => J || "./this.program", vt = () => {
|
|
2760
|
+
if (!vt.strings) {
|
|
2761
|
+
var t = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", e = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: t, _: bn() };
|
|
2762
|
+
for (var r in Nt)
|
|
2763
|
+
Nt[r] === void 0 ? delete e[r] : e[r] = Nt[r];
|
|
2764
|
+
var a = [];
|
|
1343
2765
|
for (var r in e)
|
|
1344
|
-
|
|
1345
|
-
|
|
2766
|
+
a.push(`${r}=${e[r]}`);
|
|
2767
|
+
vt.strings = a;
|
|
1346
2768
|
}
|
|
1347
|
-
return
|
|
1348
|
-
},
|
|
2769
|
+
return vt.strings;
|
|
2770
|
+
}, Cn = (t, e) => {
|
|
1349
2771
|
for (var r = 0; r < t.length; ++r)
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
},
|
|
2772
|
+
U[e++ >> 0] = t.charCodeAt(r);
|
|
2773
|
+
U[e >> 0] = 0;
|
|
2774
|
+
}, _n = (t, e) => {
|
|
1353
2775
|
var r = 0;
|
|
1354
|
-
return
|
|
1355
|
-
var
|
|
1356
|
-
|
|
2776
|
+
return vt().forEach((a, o) => {
|
|
2777
|
+
var i = e + r;
|
|
2778
|
+
_[t + o * 4 >> 2] = i, Cn(a, i), r += a.length + 1;
|
|
1357
2779
|
}), 0;
|
|
1358
|
-
},
|
|
1359
|
-
var r =
|
|
1360
|
-
|
|
1361
|
-
var
|
|
1362
|
-
return r.forEach((
|
|
1363
|
-
},
|
|
1364
|
-
for (var r = 0,
|
|
2780
|
+
}, Tn = (t, e) => {
|
|
2781
|
+
var r = vt();
|
|
2782
|
+
_[t >> 2] = r.length;
|
|
2783
|
+
var a = 0;
|
|
2784
|
+
return r.forEach((o) => a += o.length + 1), _[e >> 2] = a, 0;
|
|
2785
|
+
}, Pn = (t) => t, St = (t) => t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0), An = (t, e) => {
|
|
2786
|
+
for (var r = 0, a = 0; a <= e; r += t[a++])
|
|
1365
2787
|
;
|
|
1366
2788
|
return r;
|
|
1367
|
-
},
|
|
2789
|
+
}, Fe = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], De = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], En = (t, e) => {
|
|
1368
2790
|
for (var r = new Date(t.getTime()); e > 0; ) {
|
|
1369
|
-
var
|
|
1370
|
-
if (e >
|
|
1371
|
-
e -=
|
|
2791
|
+
var a = St(r.getFullYear()), o = r.getMonth(), i = (a ? Fe : De)[o];
|
|
2792
|
+
if (e > i - r.getDate())
|
|
2793
|
+
e -= i - r.getDate() + 1, r.setDate(1), o < 11 ? r.setMonth(o + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() + 1));
|
|
1372
2794
|
else
|
|
1373
2795
|
return r.setDate(r.getDate() + e), r;
|
|
1374
2796
|
}
|
|
1375
2797
|
return r;
|
|
1376
2798
|
};
|
|
1377
|
-
function
|
|
1378
|
-
var
|
|
1379
|
-
return e && (
|
|
1380
|
-
}
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
},
|
|
1384
|
-
var
|
|
1385
|
-
for (var l in
|
|
1386
|
-
s = s.replace(new RegExp(l, "g"),
|
|
1387
|
-
var f = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
1388
|
-
function y(
|
|
1389
|
-
for (var
|
|
1390
|
-
|
|
1391
|
-
return
|
|
1392
|
-
}
|
|
1393
|
-
function
|
|
1394
|
-
return y(
|
|
1395
|
-
}
|
|
1396
|
-
function
|
|
1397
|
-
function
|
|
1398
|
-
return
|
|
2799
|
+
function On(t, e, r) {
|
|
2800
|
+
var a = r > 0 ? r : Pe(t) + 1, o = new Array(a), i = Te(t, o, 0, o.length);
|
|
2801
|
+
return e && (o.length = i), o;
|
|
2802
|
+
}
|
|
2803
|
+
var Sn = (t, e) => {
|
|
2804
|
+
U.set(t, e);
|
|
2805
|
+
}, Fn = (t, e, r, a) => {
|
|
2806
|
+
var o = _[a + 40 >> 2], i = { tm_sec: R[a >> 2], tm_min: R[a + 4 >> 2], tm_hour: R[a + 8 >> 2], tm_mday: R[a + 12 >> 2], tm_mon: R[a + 16 >> 2], tm_year: R[a + 20 >> 2], tm_wday: R[a + 24 >> 2], tm_yday: R[a + 28 >> 2], tm_isdst: R[a + 32 >> 2], tm_gmtoff: R[a + 36 >> 2], tm_zone: o ? zt(o) : "" }, s = zt(r), c = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" };
|
|
2807
|
+
for (var l in c)
|
|
2808
|
+
s = s.replace(new RegExp(l, "g"), c[l]);
|
|
2809
|
+
var f = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], m = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
2810
|
+
function y(h, v, j) {
|
|
2811
|
+
for (var H = typeof h == "number" ? h.toString() : h || ""; H.length < v; )
|
|
2812
|
+
H = j[0] + H;
|
|
2813
|
+
return H;
|
|
2814
|
+
}
|
|
2815
|
+
function $(h, v) {
|
|
2816
|
+
return y(h, v, "0");
|
|
2817
|
+
}
|
|
2818
|
+
function b(h, v) {
|
|
2819
|
+
function j(ct) {
|
|
2820
|
+
return ct < 0 ? -1 : ct > 0 ? 1 : 0;
|
|
1399
2821
|
}
|
|
1400
|
-
var
|
|
1401
|
-
return (
|
|
2822
|
+
var H;
|
|
2823
|
+
return (H = j(h.getFullYear() - v.getFullYear())) === 0 && (H = j(h.getMonth() - v.getMonth())) === 0 && (H = j(h.getDate() - v.getDate())), H;
|
|
1402
2824
|
}
|
|
1403
|
-
function
|
|
1404
|
-
switch (
|
|
2825
|
+
function S(h) {
|
|
2826
|
+
switch (h.getDay()) {
|
|
1405
2827
|
case 0:
|
|
1406
|
-
return new Date(
|
|
2828
|
+
return new Date(h.getFullYear() - 1, 11, 29);
|
|
1407
2829
|
case 1:
|
|
1408
|
-
return
|
|
2830
|
+
return h;
|
|
1409
2831
|
case 2:
|
|
1410
|
-
return new Date(
|
|
2832
|
+
return new Date(h.getFullYear(), 0, 3);
|
|
1411
2833
|
case 3:
|
|
1412
|
-
return new Date(
|
|
2834
|
+
return new Date(h.getFullYear(), 0, 2);
|
|
1413
2835
|
case 4:
|
|
1414
|
-
return new Date(
|
|
2836
|
+
return new Date(h.getFullYear(), 0, 1);
|
|
1415
2837
|
case 5:
|
|
1416
|
-
return new Date(
|
|
2838
|
+
return new Date(h.getFullYear() - 1, 11, 31);
|
|
1417
2839
|
case 6:
|
|
1418
|
-
return new Date(
|
|
2840
|
+
return new Date(h.getFullYear() - 1, 11, 30);
|
|
1419
2841
|
}
|
|
1420
2842
|
}
|
|
1421
|
-
function
|
|
1422
|
-
var
|
|
1423
|
-
return
|
|
1424
|
-
}
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1427
|
-
return
|
|
1428
|
-
}, "%d": (
|
|
1429
|
-
var
|
|
1430
|
-
return
|
|
1431
|
-
}, "%j": (
|
|
1432
|
-
`, "%p": (
|
|
1433
|
-
var
|
|
1434
|
-
return
|
|
1435
|
-
}, "%V": (
|
|
1436
|
-
var
|
|
1437
|
-
if ((
|
|
1438
|
-
if (
|
|
1439
|
-
var
|
|
1440
|
-
|
|
2843
|
+
function F(h) {
|
|
2844
|
+
var v = En(new Date(h.tm_year + 1900, 0, 1), h.tm_yday), j = new Date(v.getFullYear(), 0, 4), H = new Date(v.getFullYear() + 1, 0, 4), ct = S(j), ke = S(H);
|
|
2845
|
+
return b(ct, v) <= 0 ? b(ke, v) <= 0 ? v.getFullYear() + 1 : v.getFullYear() : v.getFullYear() - 1;
|
|
2846
|
+
}
|
|
2847
|
+
var D = { "%a": (h) => f[h.tm_wday].substring(0, 3), "%A": (h) => f[h.tm_wday], "%b": (h) => m[h.tm_mon].substring(0, 3), "%B": (h) => m[h.tm_mon], "%C": (h) => {
|
|
2848
|
+
var v = h.tm_year + 1900;
|
|
2849
|
+
return $(v / 100 | 0, 2);
|
|
2850
|
+
}, "%d": (h) => $(h.tm_mday, 2), "%e": (h) => y(h.tm_mday, 2, " "), "%g": (h) => F(h).toString().substring(2), "%G": (h) => F(h), "%H": (h) => $(h.tm_hour, 2), "%I": (h) => {
|
|
2851
|
+
var v = h.tm_hour;
|
|
2852
|
+
return v == 0 ? v = 12 : v > 12 && (v -= 12), $(v, 2);
|
|
2853
|
+
}, "%j": (h) => $(h.tm_mday + An(St(h.tm_year + 1900) ? Fe : De, h.tm_mon - 1), 3), "%m": (h) => $(h.tm_mon + 1, 2), "%M": (h) => $(h.tm_min, 2), "%n": () => `
|
|
2854
|
+
`, "%p": (h) => h.tm_hour >= 0 && h.tm_hour < 12 ? "AM" : "PM", "%S": (h) => $(h.tm_sec, 2), "%t": () => " ", "%u": (h) => h.tm_wday || 7, "%U": (h) => {
|
|
2855
|
+
var v = h.tm_yday + 7 - h.tm_wday;
|
|
2856
|
+
return $(Math.floor(v / 7), 2);
|
|
2857
|
+
}, "%V": (h) => {
|
|
2858
|
+
var v = Math.floor((h.tm_yday + 7 - (h.tm_wday + 6) % 7) / 7);
|
|
2859
|
+
if ((h.tm_wday + 371 - h.tm_yday - 2) % 7 <= 2 && v++, v) {
|
|
2860
|
+
if (v == 53) {
|
|
2861
|
+
var j = (h.tm_wday + 371 - h.tm_yday) % 7;
|
|
2862
|
+
j != 4 && (j != 3 || !St(h.tm_year)) && (v = 1);
|
|
1441
2863
|
}
|
|
1442
2864
|
} else {
|
|
1443
|
-
|
|
1444
|
-
var
|
|
1445
|
-
(
|
|
2865
|
+
v = 52;
|
|
2866
|
+
var H = (h.tm_wday + 7 - h.tm_yday - 1) % 7;
|
|
2867
|
+
(H == 4 || H == 5 && St(h.tm_year % 400 - 1)) && v++;
|
|
1446
2868
|
}
|
|
1447
|
-
return
|
|
1448
|
-
}, "%w": (
|
|
1449
|
-
var
|
|
1450
|
-
return
|
|
1451
|
-
}, "%y": (
|
|
1452
|
-
var
|
|
1453
|
-
return
|
|
1454
|
-
}, "%Z": (
|
|
2869
|
+
return $(v, 2);
|
|
2870
|
+
}, "%w": (h) => h.tm_wday, "%W": (h) => {
|
|
2871
|
+
var v = h.tm_yday + 7 - (h.tm_wday + 6) % 7;
|
|
2872
|
+
return $(Math.floor(v / 7), 2);
|
|
2873
|
+
}, "%y": (h) => (h.tm_year + 1900).toString().substring(2), "%Y": (h) => h.tm_year + 1900, "%z": (h) => {
|
|
2874
|
+
var v = h.tm_gmtoff, j = v >= 0;
|
|
2875
|
+
return v = Math.abs(v) / 60, v = v / 60 * 100 + v % 60, (j ? "+" : "-") + ("0000" + v).slice(-4);
|
|
2876
|
+
}, "%Z": (h) => h.tm_zone, "%%": () => "%" };
|
|
1455
2877
|
s = s.replace(/%%/g, "\0\0");
|
|
1456
|
-
for (var l in
|
|
1457
|
-
s.includes(l) && (s = s.replace(new RegExp(l, "g"),
|
|
2878
|
+
for (var l in D)
|
|
2879
|
+
s.includes(l) && (s = s.replace(new RegExp(l, "g"), D[l](i)));
|
|
1458
2880
|
s = s.replace(/\0\0/g, "%");
|
|
1459
|
-
var
|
|
1460
|
-
return
|
|
1461
|
-
},
|
|
1462
|
-
|
|
2881
|
+
var p = On(s, !1);
|
|
2882
|
+
return p.length > e ? 0 : (Sn(p, t), p.length - 1);
|
|
2883
|
+
}, Dn = (t, e, r, a, o) => Fn(t, e, r, a);
|
|
2884
|
+
ue = u.InternalError = class extends Error {
|
|
1463
2885
|
constructor(t) {
|
|
1464
2886
|
super(t), this.name = "InternalError";
|
|
1465
2887
|
}
|
|
1466
|
-
},
|
|
2888
|
+
}, cr(), st = u.BindingError = class extends Error {
|
|
1467
2889
|
constructor(t) {
|
|
1468
2890
|
super(t), this.name = "BindingError";
|
|
1469
2891
|
}
|
|
1470
|
-
},
|
|
1471
|
-
var
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
|
|
1475
|
-
var
|
|
1476
|
-
|
|
1477
|
-
function
|
|
1478
|
-
var r =
|
|
1479
|
-
try {
|
|
1480
|
-
return T(t)(e);
|
|
1481
|
-
} catch (n) {
|
|
1482
|
-
if (_(r), n !== n + 0)
|
|
1483
|
-
throw n;
|
|
1484
|
-
b(1, 0);
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
function ra(t, e, r, n) {
|
|
1488
|
-
var a = C();
|
|
2892
|
+
}, br(), vr(), Or(), $e = u.UnboundTypeError = jr(Error, "UnboundTypeError"), Rr(), kr();
|
|
2893
|
+
var jn = { s: Qe, v: Ke, b: er, g: rr, m: nr, K: ar, e: or, T: ir, d: tr, ba: sr, P: ur, Y: dr, aa: xr, $: Wr, x: Mr, X: Hr, y: Vr, j: Br, M: Lr, D: zr, t: Gr, p: qr, L: Zr, C: an, w: on, ca: sn, Z: un, fa: _e, da: dn, N: hn, W: pn, _: mn, B: yn, V: vn, U: wn, R: _n, S: Tn, G: qn, H: Gn, n: Xn, a: xn, f: In, q: Un, k: Rn, J: zn, u: Ln, I: Nn, A: Zn, O: Xt, l: kn, i: Hn, c: Mn, o: Wn, E: Bn, ea: Vn, r: Jn, h: Yn, z: Qn, F: Pn, Q: Dn }, P = Ze(), G = u._free = (t) => (G = u._free = P.ia)(t), Gt = u._malloc = (t) => (Gt = u._malloc = P.ja)(t), je = (t) => (je = P.la)(t);
|
|
2894
|
+
u.__embind_initialize_bindings = () => (u.__embind_initialize_bindings = P.ma)();
|
|
2895
|
+
var T = (t, e) => (T = P.na)(t, e), gt = (t) => (gt = P.oa)(t), E = () => (E = P.pa)(), O = (t) => (O = P.qa)(t), xe = (t) => (xe = P.ra)(t), We = (t) => (We = P.sa)(t), Me = (t, e, r) => (Me = P.ta)(t, e, r), Re = (t) => (Re = P.ua)(t);
|
|
2896
|
+
u.dynCall_viijii = (t, e, r, a, o, i, s) => (u.dynCall_viijii = P.va)(t, e, r, a, o, i, s);
|
|
2897
|
+
var Ie = u.dynCall_jiiii = (t, e, r, a, o) => (Ie = u.dynCall_jiiii = P.wa)(t, e, r, a, o);
|
|
2898
|
+
u.dynCall_iiiiij = (t, e, r, a, o, i, s) => (u.dynCall_iiiiij = P.xa)(t, e, r, a, o, i, s), u.dynCall_iiiiijj = (t, e, r, a, o, i, s, c, l) => (u.dynCall_iiiiijj = P.ya)(t, e, r, a, o, i, s, c, l), u.dynCall_iiiiiijj = (t, e, r, a, o, i, s, c, l, f) => (u.dynCall_iiiiiijj = P.za)(t, e, r, a, o, i, s, c, l, f);
|
|
2899
|
+
function xn(t, e) {
|
|
2900
|
+
var r = E();
|
|
1489
2901
|
try {
|
|
1490
|
-
|
|
1491
|
-
} catch (o) {
|
|
1492
|
-
if (_(a), o !== o + 0)
|
|
1493
|
-
throw o;
|
|
1494
|
-
b(1, 0);
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
function na(t, e, r) {
|
|
1498
|
-
var n = C();
|
|
1499
|
-
try {
|
|
1500
|
-
T(t)(e, r);
|
|
2902
|
+
return A(t)(e);
|
|
1501
2903
|
} catch (a) {
|
|
1502
|
-
if (
|
|
2904
|
+
if (O(r), a !== a + 0)
|
|
1503
2905
|
throw a;
|
|
1504
|
-
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
function aa(t, e, r, n, a) {
|
|
1508
|
-
var o = C();
|
|
1509
|
-
try {
|
|
1510
|
-
return T(t)(e, r, n, a);
|
|
1511
|
-
} catch (s) {
|
|
1512
|
-
if (_(o), s !== s + 0)
|
|
1513
|
-
throw s;
|
|
1514
|
-
b(1, 0);
|
|
2906
|
+
T(1, 0);
|
|
1515
2907
|
}
|
|
1516
2908
|
}
|
|
1517
|
-
function
|
|
1518
|
-
var
|
|
2909
|
+
function Wn(t, e, r, a) {
|
|
2910
|
+
var o = E();
|
|
1519
2911
|
try {
|
|
1520
|
-
|
|
1521
|
-
} catch (
|
|
1522
|
-
if (
|
|
1523
|
-
throw
|
|
1524
|
-
|
|
2912
|
+
A(t)(e, r, a);
|
|
2913
|
+
} catch (i) {
|
|
2914
|
+
if (O(o), i !== i + 0)
|
|
2915
|
+
throw i;
|
|
2916
|
+
T(1, 0);
|
|
1525
2917
|
}
|
|
1526
2918
|
}
|
|
1527
|
-
function
|
|
1528
|
-
var
|
|
2919
|
+
function Mn(t, e, r) {
|
|
2920
|
+
var a = E();
|
|
1529
2921
|
try {
|
|
1530
|
-
|
|
1531
|
-
} catch (
|
|
1532
|
-
if (
|
|
1533
|
-
throw
|
|
1534
|
-
|
|
2922
|
+
A(t)(e, r);
|
|
2923
|
+
} catch (o) {
|
|
2924
|
+
if (O(a), o !== o + 0)
|
|
2925
|
+
throw o;
|
|
2926
|
+
T(1, 0);
|
|
1535
2927
|
}
|
|
1536
2928
|
}
|
|
1537
|
-
function
|
|
1538
|
-
var
|
|
2929
|
+
function Rn(t, e, r, a, o) {
|
|
2930
|
+
var i = E();
|
|
1539
2931
|
try {
|
|
1540
|
-
|
|
1541
|
-
} catch (
|
|
1542
|
-
if (
|
|
1543
|
-
throw
|
|
1544
|
-
|
|
2932
|
+
return A(t)(e, r, a, o);
|
|
2933
|
+
} catch (s) {
|
|
2934
|
+
if (O(i), s !== s + 0)
|
|
2935
|
+
throw s;
|
|
2936
|
+
T(1, 0);
|
|
1545
2937
|
}
|
|
1546
2938
|
}
|
|
1547
|
-
function
|
|
1548
|
-
var a =
|
|
2939
|
+
function In(t, e, r) {
|
|
2940
|
+
var a = E();
|
|
1549
2941
|
try {
|
|
1550
|
-
return
|
|
2942
|
+
return A(t)(e, r);
|
|
1551
2943
|
} catch (o) {
|
|
1552
|
-
if (
|
|
2944
|
+
if (O(a), o !== o + 0)
|
|
1553
2945
|
throw o;
|
|
1554
|
-
|
|
2946
|
+
T(1, 0);
|
|
1555
2947
|
}
|
|
1556
2948
|
}
|
|
1557
|
-
function
|
|
1558
|
-
var
|
|
2949
|
+
function kn(t) {
|
|
2950
|
+
var e = E();
|
|
1559
2951
|
try {
|
|
1560
|
-
|
|
1561
|
-
} catch (
|
|
1562
|
-
if (
|
|
1563
|
-
throw
|
|
1564
|
-
|
|
2952
|
+
A(t)();
|
|
2953
|
+
} catch (r) {
|
|
2954
|
+
if (O(e), r !== r + 0)
|
|
2955
|
+
throw r;
|
|
2956
|
+
T(1, 0);
|
|
1565
2957
|
}
|
|
1566
2958
|
}
|
|
1567
|
-
function
|
|
1568
|
-
var
|
|
2959
|
+
function Hn(t, e) {
|
|
2960
|
+
var r = E();
|
|
1569
2961
|
try {
|
|
1570
|
-
|
|
1571
|
-
} catch (
|
|
1572
|
-
if (
|
|
1573
|
-
throw
|
|
1574
|
-
|
|
2962
|
+
A(t)(e);
|
|
2963
|
+
} catch (a) {
|
|
2964
|
+
if (O(r), a !== a + 0)
|
|
2965
|
+
throw a;
|
|
2966
|
+
T(1, 0);
|
|
1575
2967
|
}
|
|
1576
2968
|
}
|
|
1577
|
-
function
|
|
1578
|
-
var
|
|
2969
|
+
function Un(t, e, r, a) {
|
|
2970
|
+
var o = E();
|
|
1579
2971
|
try {
|
|
1580
|
-
|
|
1581
|
-
} catch (
|
|
1582
|
-
if (
|
|
1583
|
-
throw
|
|
1584
|
-
|
|
2972
|
+
return A(t)(e, r, a);
|
|
2973
|
+
} catch (i) {
|
|
2974
|
+
if (O(o), i !== i + 0)
|
|
2975
|
+
throw i;
|
|
2976
|
+
T(1, 0);
|
|
1585
2977
|
}
|
|
1586
2978
|
}
|
|
1587
|
-
function
|
|
1588
|
-
var
|
|
2979
|
+
function Vn(t, e, r, a, o, i) {
|
|
2980
|
+
var s = E();
|
|
1589
2981
|
try {
|
|
1590
|
-
|
|
1591
|
-
} catch (
|
|
1592
|
-
if (
|
|
1593
|
-
throw
|
|
1594
|
-
|
|
2982
|
+
A(t)(e, r, a, o, i);
|
|
2983
|
+
} catch (c) {
|
|
2984
|
+
if (O(s), c !== c + 0)
|
|
2985
|
+
throw c;
|
|
2986
|
+
T(1, 0);
|
|
1595
2987
|
}
|
|
1596
2988
|
}
|
|
1597
|
-
function
|
|
1598
|
-
var
|
|
2989
|
+
function Bn(t, e, r, a, o) {
|
|
2990
|
+
var i = E();
|
|
1599
2991
|
try {
|
|
1600
|
-
|
|
2992
|
+
A(t)(e, r, a, o);
|
|
1601
2993
|
} catch (s) {
|
|
1602
|
-
if (
|
|
2994
|
+
if (O(i), s !== s + 0)
|
|
1603
2995
|
throw s;
|
|
1604
|
-
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
function pa(t, e, r, n, a, o, s) {
|
|
1608
|
-
var u = C();
|
|
1609
|
-
try {
|
|
1610
|
-
return T(t)(e, r, n, a, o, s);
|
|
1611
|
-
} catch (l) {
|
|
1612
|
-
if (_(u), l !== l + 0)
|
|
1613
|
-
throw l;
|
|
1614
|
-
b(1, 0);
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
function ma(t, e, r, n, a, o, s, u, l) {
|
|
1618
|
-
var f = C();
|
|
1619
|
-
try {
|
|
1620
|
-
T(t)(e, r, n, a, o, s, u, l);
|
|
1621
|
-
} catch (h) {
|
|
1622
|
-
if (_(f), h !== h + 0)
|
|
1623
|
-
throw h;
|
|
1624
|
-
b(1, 0);
|
|
2996
|
+
T(1, 0);
|
|
1625
2997
|
}
|
|
1626
2998
|
}
|
|
1627
|
-
function
|
|
1628
|
-
var
|
|
2999
|
+
function Yn(t, e, r, a, o, i, s, c, l, f, m) {
|
|
3000
|
+
var y = E();
|
|
1629
3001
|
try {
|
|
1630
|
-
|
|
1631
|
-
} catch (
|
|
1632
|
-
if (
|
|
1633
|
-
throw
|
|
1634
|
-
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
function va(t, e, r, n) {
|
|
1638
|
-
var a = C();
|
|
1639
|
-
try {
|
|
1640
|
-
return T(t)(e, r, n);
|
|
1641
|
-
} catch (o) {
|
|
1642
|
-
if (_(a), o !== o + 0)
|
|
1643
|
-
throw o;
|
|
1644
|
-
b(1, 0);
|
|
3002
|
+
A(t)(e, r, a, o, i, s, c, l, f, m);
|
|
3003
|
+
} catch ($) {
|
|
3004
|
+
if (O(y), $ !== $ + 0)
|
|
3005
|
+
throw $;
|
|
3006
|
+
T(1, 0);
|
|
1645
3007
|
}
|
|
1646
3008
|
}
|
|
1647
|
-
function
|
|
1648
|
-
var
|
|
3009
|
+
function Ln(t, e, r, a, o, i, s) {
|
|
3010
|
+
var c = E();
|
|
1649
3011
|
try {
|
|
1650
|
-
return
|
|
3012
|
+
return A(t)(e, r, a, o, i, s);
|
|
1651
3013
|
} catch (l) {
|
|
1652
|
-
if (
|
|
3014
|
+
if (O(c), l !== l + 0)
|
|
1653
3015
|
throw l;
|
|
1654
|
-
|
|
3016
|
+
T(1, 0);
|
|
1655
3017
|
}
|
|
1656
3018
|
}
|
|
1657
|
-
function
|
|
1658
|
-
var
|
|
3019
|
+
function zn(t, e, r, a, o, i) {
|
|
3020
|
+
var s = E();
|
|
1659
3021
|
try {
|
|
1660
|
-
return
|
|
1661
|
-
} catch (
|
|
1662
|
-
if (
|
|
1663
|
-
throw
|
|
1664
|
-
|
|
3022
|
+
return A(t)(e, r, a, o, i);
|
|
3023
|
+
} catch (c) {
|
|
3024
|
+
if (O(s), c !== c + 0)
|
|
3025
|
+
throw c;
|
|
3026
|
+
T(1, 0);
|
|
1665
3027
|
}
|
|
1666
3028
|
}
|
|
1667
|
-
function
|
|
1668
|
-
var l =
|
|
3029
|
+
function Nn(t, e, r, a, o, i, s, c) {
|
|
3030
|
+
var l = E();
|
|
1669
3031
|
try {
|
|
1670
|
-
|
|
3032
|
+
return A(t)(e, r, a, o, i, s, c);
|
|
1671
3033
|
} catch (f) {
|
|
1672
|
-
if (
|
|
3034
|
+
if (O(l), f !== f + 0)
|
|
1673
3035
|
throw f;
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
function ba(t, e, r, n, a, o) {
|
|
1678
|
-
var s = C();
|
|
1679
|
-
try {
|
|
1680
|
-
return T(t)(e, r, n, a, o);
|
|
1681
|
-
} catch (u) {
|
|
1682
|
-
if (_(s), u !== u + 0)
|
|
1683
|
-
throw u;
|
|
1684
|
-
b(1, 0);
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
function Ca(t, e, r, n, a, o) {
|
|
1688
|
-
var s = C();
|
|
1689
|
-
try {
|
|
1690
|
-
return T(t)(e, r, n, a, o);
|
|
1691
|
-
} catch (u) {
|
|
1692
|
-
if (_(s), u !== u + 0)
|
|
1693
|
-
throw u;
|
|
1694
|
-
b(1, 0);
|
|
3036
|
+
T(1, 0);
|
|
1695
3037
|
}
|
|
1696
3038
|
}
|
|
1697
|
-
function
|
|
1698
|
-
var
|
|
3039
|
+
function Gn(t, e, r, a) {
|
|
3040
|
+
var o = E();
|
|
1699
3041
|
try {
|
|
1700
|
-
return
|
|
1701
|
-
} catch (
|
|
1702
|
-
if (
|
|
1703
|
-
throw
|
|
1704
|
-
|
|
3042
|
+
return A(t)(e, r, a);
|
|
3043
|
+
} catch (i) {
|
|
3044
|
+
if (O(o), i !== i + 0)
|
|
3045
|
+
throw i;
|
|
3046
|
+
T(1, 0);
|
|
1705
3047
|
}
|
|
1706
3048
|
}
|
|
1707
|
-
function
|
|
1708
|
-
var
|
|
3049
|
+
function qn(t, e, r, a) {
|
|
3050
|
+
var o = E();
|
|
1709
3051
|
try {
|
|
1710
|
-
return
|
|
1711
|
-
} catch (
|
|
1712
|
-
if (
|
|
1713
|
-
throw
|
|
1714
|
-
|
|
3052
|
+
return A(t)(e, r, a);
|
|
3053
|
+
} catch (i) {
|
|
3054
|
+
if (O(o), i !== i + 0)
|
|
3055
|
+
throw i;
|
|
3056
|
+
T(1, 0);
|
|
1715
3057
|
}
|
|
1716
3058
|
}
|
|
1717
|
-
function
|
|
1718
|
-
var
|
|
3059
|
+
function Xn(t) {
|
|
3060
|
+
var e = E();
|
|
1719
3061
|
try {
|
|
1720
|
-
|
|
1721
|
-
} catch (
|
|
1722
|
-
if (
|
|
1723
|
-
throw
|
|
1724
|
-
|
|
3062
|
+
return A(t)();
|
|
3063
|
+
} catch (r) {
|
|
3064
|
+
if (O(e), r !== r + 0)
|
|
3065
|
+
throw r;
|
|
3066
|
+
T(1, 0);
|
|
1725
3067
|
}
|
|
1726
3068
|
}
|
|
1727
|
-
function
|
|
1728
|
-
var l =
|
|
3069
|
+
function Jn(t, e, r, a, o, i, s, c) {
|
|
3070
|
+
var l = E();
|
|
1729
3071
|
try {
|
|
1730
|
-
|
|
3072
|
+
A(t)(e, r, a, o, i, s, c);
|
|
1731
3073
|
} catch (f) {
|
|
1732
|
-
if (
|
|
3074
|
+
if (O(l), f !== f + 0)
|
|
1733
3075
|
throw f;
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
function xa(t, e, r, n, a, o, s, u, l) {
|
|
1738
|
-
var f = C();
|
|
1739
|
-
try {
|
|
1740
|
-
return T(t)(e, r, n, a, o, s, u, l);
|
|
1741
|
-
} catch (h) {
|
|
1742
|
-
if (_(f), h !== h + 0)
|
|
1743
|
-
throw h;
|
|
1744
|
-
b(1, 0);
|
|
3076
|
+
T(1, 0);
|
|
1745
3077
|
}
|
|
1746
3078
|
}
|
|
1747
|
-
function
|
|
1748
|
-
var
|
|
3079
|
+
function Zn(t, e, r, a, o, i, s, c, l, f, m, y) {
|
|
3080
|
+
var $ = E();
|
|
1749
3081
|
try {
|
|
1750
|
-
|
|
1751
|
-
} catch (
|
|
1752
|
-
if (
|
|
1753
|
-
throw
|
|
1754
|
-
|
|
3082
|
+
return A(t)(e, r, a, o, i, s, c, l, f, m, y);
|
|
3083
|
+
} catch (b) {
|
|
3084
|
+
if (O($), b !== b + 0)
|
|
3085
|
+
throw b;
|
|
3086
|
+
T(1, 0);
|
|
1755
3087
|
}
|
|
1756
3088
|
}
|
|
1757
|
-
function
|
|
1758
|
-
var
|
|
3089
|
+
function Qn(t, e, r, a, o, i, s, c, l, f, m, y, $, b, S, F) {
|
|
3090
|
+
var D = E();
|
|
1759
3091
|
try {
|
|
1760
|
-
|
|
1761
|
-
} catch (
|
|
1762
|
-
if (
|
|
1763
|
-
throw
|
|
1764
|
-
|
|
3092
|
+
A(t)(e, r, a, o, i, s, c, l, f, m, y, $, b, S, F);
|
|
3093
|
+
} catch (p) {
|
|
3094
|
+
if (O(D), p !== p + 0)
|
|
3095
|
+
throw p;
|
|
3096
|
+
T(1, 0);
|
|
1765
3097
|
}
|
|
1766
3098
|
}
|
|
1767
|
-
function
|
|
1768
|
-
var
|
|
3099
|
+
function Xt(t, e, r, a, o) {
|
|
3100
|
+
var i = E();
|
|
1769
3101
|
try {
|
|
1770
|
-
return
|
|
1771
|
-
} catch (P) {
|
|
1772
|
-
if (_(g), P !== P + 0)
|
|
1773
|
-
throw P;
|
|
1774
|
-
b(1, 0);
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
function Oa(t, e, r, n, a, o, s, u, l, f, h, y, g, P, x, H) {
|
|
1778
|
-
var A = C();
|
|
1779
|
-
try {
|
|
1780
|
-
T(t)(e, r, n, a, o, s, u, l, f, h, y, g, P, x, H);
|
|
1781
|
-
} catch (R) {
|
|
1782
|
-
if (_(A), R !== R + 0)
|
|
1783
|
-
throw R;
|
|
1784
|
-
b(1, 0);
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
function Fa(t, e, r, n) {
|
|
1788
|
-
var a = C();
|
|
1789
|
-
try {
|
|
1790
|
-
return Ve(t, e, r, n);
|
|
1791
|
-
} catch (o) {
|
|
1792
|
-
if (_(a), o !== o + 0)
|
|
1793
|
-
throw o;
|
|
1794
|
-
b(1, 0);
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
function Ma(t, e, r, n, a) {
|
|
1798
|
-
var o = C();
|
|
1799
|
-
try {
|
|
1800
|
-
return Le(t, e, r, n, a);
|
|
3102
|
+
return Ie(t, e, r, a, o);
|
|
1801
3103
|
} catch (s) {
|
|
1802
|
-
if (
|
|
3104
|
+
if (O(i), s !== s + 0)
|
|
1803
3105
|
throw s;
|
|
1804
|
-
|
|
3106
|
+
T(1, 0);
|
|
1805
3107
|
}
|
|
1806
3108
|
}
|
|
1807
|
-
var
|
|
1808
|
-
|
|
1809
|
-
|
|
3109
|
+
var qt;
|
|
3110
|
+
dt = function t() {
|
|
3111
|
+
qt || n(), qt || (dt = t);
|
|
1810
3112
|
};
|
|
1811
|
-
function
|
|
1812
|
-
if (
|
|
3113
|
+
function n() {
|
|
3114
|
+
if (K > 0 || (Ue(), K > 0))
|
|
1813
3115
|
return;
|
|
1814
3116
|
function t() {
|
|
1815
|
-
|
|
3117
|
+
qt || (qt = !0, u.calledRun = !0, !Ft && (Ve(), x(u), u.onRuntimeInitialized && u.onRuntimeInitialized(), Be()));
|
|
1816
3118
|
}
|
|
1817
|
-
|
|
3119
|
+
u.setStatus ? (u.setStatus("Running..."), setTimeout(function() {
|
|
1818
3120
|
setTimeout(function() {
|
|
1819
|
-
|
|
3121
|
+
u.setStatus("");
|
|
1820
3122
|
}, 1), t();
|
|
1821
3123
|
}, 1)) : t();
|
|
1822
3124
|
}
|
|
1823
|
-
if (
|
|
1824
|
-
for (typeof
|
|
1825
|
-
|
|
1826
|
-
return
|
|
3125
|
+
if (u.preInit)
|
|
3126
|
+
for (typeof u.preInit == "function" && (u.preInit = [u.preInit]); u.preInit.length > 0; )
|
|
3127
|
+
u.preInit.pop()();
|
|
3128
|
+
return n(), g.ready;
|
|
1827
3129
|
};
|
|
1828
3130
|
})();
|
|
1829
|
-
function
|
|
1830
|
-
return
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
tryHarder: p = B.tryHarder,
|
|
1834
|
-
formats: i = B.formats,
|
|
1835
|
-
maxSymbols: v = B.maxSymbols
|
|
1836
|
-
} = B) {
|
|
1837
|
-
return Ga(
|
|
1838
|
-
c,
|
|
1839
|
-
{
|
|
1840
|
-
tryHarder: p,
|
|
1841
|
-
formats: i,
|
|
1842
|
-
maxSymbols: v
|
|
1843
|
-
},
|
|
1844
|
-
Kt
|
|
3131
|
+
function Za(d) {
|
|
3132
|
+
return Ba(
|
|
3133
|
+
qa,
|
|
3134
|
+
d
|
|
1845
3135
|
);
|
|
1846
3136
|
}
|
|
1847
|
-
|
|
1848
|
-
tryHarder: p = B.tryHarder,
|
|
1849
|
-
formats: i = B.formats,
|
|
1850
|
-
maxSymbols: v = B.maxSymbols
|
|
1851
|
-
} = B) {
|
|
1852
|
-
return Xa(
|
|
1853
|
-
c,
|
|
1854
|
-
{
|
|
1855
|
-
tryHarder: p,
|
|
1856
|
-
formats: i,
|
|
1857
|
-
maxSymbols: v
|
|
1858
|
-
},
|
|
1859
|
-
Kt
|
|
1860
|
-
);
|
|
1861
|
-
}
|
|
1862
|
-
const Qt = /* @__PURE__ */ new Map([
|
|
3137
|
+
const ea = /* @__PURE__ */ new Map([
|
|
1863
3138
|
["aztec", "Aztec"],
|
|
1864
3139
|
["code_128", "Code128"],
|
|
1865
3140
|
["code_39", "Code39"],
|
|
@@ -1874,118 +3149,118 @@ const Qt = /* @__PURE__ */ new Map([
|
|
|
1874
3149
|
["upc_a", "UPC-A"],
|
|
1875
3150
|
["upc_e", "UPC-E"]
|
|
1876
3151
|
]);
|
|
1877
|
-
function
|
|
1878
|
-
for (const [
|
|
1879
|
-
if (
|
|
1880
|
-
return
|
|
3152
|
+
function Xa(d) {
|
|
3153
|
+
for (const [g, u] of ea)
|
|
3154
|
+
if (d === u)
|
|
3155
|
+
return g;
|
|
1881
3156
|
return "unknown";
|
|
1882
3157
|
}
|
|
1883
|
-
var
|
|
1884
|
-
class
|
|
1885
|
-
constructor(
|
|
1886
|
-
var
|
|
3158
|
+
var Jt;
|
|
3159
|
+
class Qa extends EventTarget {
|
|
3160
|
+
constructor(u = {}) {
|
|
3161
|
+
var x;
|
|
1887
3162
|
super();
|
|
1888
|
-
|
|
3163
|
+
oa(this, Jt, void 0);
|
|
1889
3164
|
try {
|
|
1890
|
-
const
|
|
1891
|
-
(
|
|
3165
|
+
const C = (x = u == null ? void 0 : u.formats) == null ? void 0 : x.filter(
|
|
3166
|
+
(W) => W !== "unknown"
|
|
1892
3167
|
);
|
|
1893
|
-
if ((
|
|
3168
|
+
if ((C == null ? void 0 : C.length) === 0)
|
|
1894
3169
|
throw new TypeError("Hint option provided, but is empty.");
|
|
1895
|
-
|
|
1896
|
-
if (!
|
|
3170
|
+
C == null || C.forEach((W) => {
|
|
3171
|
+
if (!sa.includes(W))
|
|
1897
3172
|
throw new TypeError(
|
|
1898
|
-
`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${
|
|
3173
|
+
`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${W}' is not a valid enum value of type BarcodeFormat.`
|
|
1899
3174
|
);
|
|
1900
|
-
}),
|
|
3175
|
+
}), ia(this, Jt, C != null ? C : []), za().then((W) => {
|
|
1901
3176
|
this.dispatchEvent(
|
|
1902
3177
|
new CustomEvent("load", {
|
|
1903
|
-
detail:
|
|
3178
|
+
detail: W
|
|
1904
3179
|
})
|
|
1905
3180
|
);
|
|
1906
|
-
}).catch((
|
|
1907
|
-
this.dispatchEvent(new CustomEvent("error", { detail:
|
|
3181
|
+
}).catch((W) => {
|
|
3182
|
+
this.dispatchEvent(new CustomEvent("error", { detail: W }));
|
|
1908
3183
|
});
|
|
1909
|
-
} catch (
|
|
1910
|
-
throw
|
|
1911
|
-
|
|
3184
|
+
} catch (C) {
|
|
3185
|
+
throw ua(
|
|
3186
|
+
C,
|
|
1912
3187
|
"Failed to construct 'BarcodeDetector'"
|
|
1913
3188
|
);
|
|
1914
3189
|
}
|
|
1915
3190
|
}
|
|
1916
3191
|
static async getSupportedFormats() {
|
|
1917
|
-
return
|
|
3192
|
+
return sa.filter((u) => u !== "unknown");
|
|
1918
3193
|
}
|
|
1919
|
-
async detect(
|
|
3194
|
+
async detect(u) {
|
|
1920
3195
|
try {
|
|
1921
|
-
const
|
|
1922
|
-
if (
|
|
3196
|
+
const x = await Ea(u);
|
|
3197
|
+
if (x === null)
|
|
1923
3198
|
return [];
|
|
1924
|
-
let
|
|
3199
|
+
let C;
|
|
1925
3200
|
try {
|
|
1926
|
-
|
|
3201
|
+
ga(x) ? C = await Na(x, {
|
|
1927
3202
|
tryHarder: !0,
|
|
1928
|
-
formats:
|
|
1929
|
-
(
|
|
3203
|
+
formats: Kn(this, Jt).map(
|
|
3204
|
+
(W) => ea.get(W)
|
|
1930
3205
|
)
|
|
1931
|
-
}) :
|
|
3206
|
+
}) : C = await Ga(x, {
|
|
1932
3207
|
tryHarder: !0,
|
|
1933
|
-
formats:
|
|
1934
|
-
(
|
|
3208
|
+
formats: Kn(this, Jt).map(
|
|
3209
|
+
(W) => ea.get(W)
|
|
1935
3210
|
)
|
|
1936
3211
|
});
|
|
1937
|
-
} catch (
|
|
1938
|
-
throw console.error(
|
|
3212
|
+
} catch (W) {
|
|
3213
|
+
throw console.error(W), new DOMException(
|
|
1939
3214
|
"Barcode detection service unavailable.",
|
|
1940
3215
|
"NotSupportedError"
|
|
1941
3216
|
);
|
|
1942
3217
|
}
|
|
1943
|
-
return
|
|
3218
|
+
return C.map((W) => {
|
|
1944
3219
|
const {
|
|
1945
|
-
topLeft: { x:
|
|
1946
|
-
topRight: { x:
|
|
1947
|
-
bottomLeft: { x:
|
|
1948
|
-
bottomRight: { x:
|
|
1949
|
-
} =
|
|
3220
|
+
topLeft: { x: J, y: Z },
|
|
3221
|
+
topRight: { x: q, y: I },
|
|
3222
|
+
bottomLeft: { x: rt, y: nt },
|
|
3223
|
+
bottomRight: { x: z, y: Q }
|
|
3224
|
+
} = W.position, ut = Math.min(J, q, rt, z), Ft = Math.min(Z, I, nt, Q), Zt = Math.max(J, q, rt, z), U = Math.max(Z, I, nt, Q);
|
|
1950
3225
|
return {
|
|
1951
3226
|
boundingBox: new DOMRectReadOnly(
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
3227
|
+
ut,
|
|
3228
|
+
Ft,
|
|
3229
|
+
Zt - ut,
|
|
3230
|
+
U - Ft
|
|
1956
3231
|
),
|
|
1957
|
-
rawValue:
|
|
1958
|
-
format:
|
|
3232
|
+
rawValue: W.text,
|
|
3233
|
+
format: Xa(W.format),
|
|
1959
3234
|
cornerPoints: [
|
|
1960
3235
|
{
|
|
1961
|
-
x:
|
|
1962
|
-
y:
|
|
3236
|
+
x: J,
|
|
3237
|
+
y: Z
|
|
1963
3238
|
},
|
|
1964
3239
|
{
|
|
1965
|
-
x:
|
|
1966
|
-
y:
|
|
3240
|
+
x: q,
|
|
3241
|
+
y: I
|
|
1967
3242
|
},
|
|
1968
3243
|
{
|
|
1969
|
-
x:
|
|
1970
|
-
y:
|
|
3244
|
+
x: z,
|
|
3245
|
+
y: Q
|
|
1971
3246
|
},
|
|
1972
3247
|
{
|
|
1973
|
-
x:
|
|
1974
|
-
y:
|
|
3248
|
+
x: rt,
|
|
3249
|
+
y: nt
|
|
1975
3250
|
}
|
|
1976
3251
|
]
|
|
1977
3252
|
};
|
|
1978
3253
|
});
|
|
1979
|
-
} catch (
|
|
1980
|
-
throw
|
|
1981
|
-
|
|
3254
|
+
} catch (x) {
|
|
3255
|
+
throw ua(
|
|
3256
|
+
x,
|
|
1982
3257
|
"Failed to execute 'detect' on 'BarcodeDetector'"
|
|
1983
3258
|
);
|
|
1984
3259
|
}
|
|
1985
3260
|
}
|
|
1986
3261
|
}
|
|
1987
|
-
|
|
3262
|
+
Jt = new WeakMap();
|
|
1988
3263
|
export {
|
|
1989
|
-
|
|
1990
|
-
|
|
3264
|
+
Qa as BarcodeDetector,
|
|
3265
|
+
Za as setZXingModuleOverrides
|
|
1991
3266
|
};
|