@simprints/simface-sdk 0.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 +256 -0
- package/dist/simface-sdk.js +4761 -0
- package/dist/simface-sdk.umd.cjs +155 -0
- package/package.json +61 -0
|
@@ -0,0 +1,4761 @@
|
|
|
1
|
+
class uo {
|
|
2
|
+
constructor(t) {
|
|
3
|
+
this.apiUrl = t.apiUrl.replace(/\/$/, ""), this.projectId = t.projectId, this.apiKey = t.apiKey;
|
|
4
|
+
}
|
|
5
|
+
async validateAPIKey() {
|
|
6
|
+
const t = await fetch(`${this.apiUrl}/api/v1/auth/validate`, {
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: { "Content-Type": "application/json" },
|
|
9
|
+
body: JSON.stringify({
|
|
10
|
+
projectId: this.projectId,
|
|
11
|
+
apiKey: this.apiKey
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
if (!t.ok) {
|
|
15
|
+
const r = await t.json();
|
|
16
|
+
throw new Error(r.error || "API key validation failed");
|
|
17
|
+
}
|
|
18
|
+
return t.json();
|
|
19
|
+
}
|
|
20
|
+
async enroll(t, r) {
|
|
21
|
+
const n = new FormData();
|
|
22
|
+
n.append("projectId", this.projectId), n.append("apiKey", this.apiKey), n.append("clientId", t), n.append("image", r, "face.jpg");
|
|
23
|
+
const s = await fetch(`${this.apiUrl}/api/v1/enroll`, {
|
|
24
|
+
method: "POST",
|
|
25
|
+
body: n
|
|
26
|
+
});
|
|
27
|
+
if (s.status === 409)
|
|
28
|
+
return { success: !1, clientId: t, alreadyEnrolled: !0, message: "User already enrolled" };
|
|
29
|
+
if (!s.ok) {
|
|
30
|
+
const i = await s.json();
|
|
31
|
+
throw new Error(i.error || "Enrollment failed");
|
|
32
|
+
}
|
|
33
|
+
return s.json();
|
|
34
|
+
}
|
|
35
|
+
async verify(t, r) {
|
|
36
|
+
const n = new FormData();
|
|
37
|
+
n.append("projectId", this.projectId), n.append("apiKey", this.apiKey), n.append("clientId", t), n.append("image", r, "face.jpg");
|
|
38
|
+
const s = await fetch(`${this.apiUrl}/api/v1/verify`, {
|
|
39
|
+
method: "POST",
|
|
40
|
+
body: n
|
|
41
|
+
});
|
|
42
|
+
if (s.status === 404)
|
|
43
|
+
return { match: !1, score: 0, threshold: 0, notEnrolled: !0, message: "User not enrolled" };
|
|
44
|
+
if (!s.ok) {
|
|
45
|
+
const i = await s.json();
|
|
46
|
+
throw new Error(i.error || "Verification failed");
|
|
47
|
+
}
|
|
48
|
+
return s.json();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const A2 = "2147483647";
|
|
52
|
+
async function lo() {
|
|
53
|
+
var e;
|
|
54
|
+
if (S2())
|
|
55
|
+
return k2();
|
|
56
|
+
if (!((e = navigator.mediaDevices) != null && e.getUserMedia))
|
|
57
|
+
throw new Error("In-browser camera capture is not supported in this browser.");
|
|
58
|
+
return E2();
|
|
59
|
+
}
|
|
60
|
+
async function E2() {
|
|
61
|
+
let e;
|
|
62
|
+
try {
|
|
63
|
+
e = await navigator.mediaDevices.getUserMedia({
|
|
64
|
+
video: { facingMode: { ideal: "user" } },
|
|
65
|
+
audio: !1
|
|
66
|
+
});
|
|
67
|
+
} catch (n) {
|
|
68
|
+
throw new Error(P2(n));
|
|
69
|
+
}
|
|
70
|
+
let t = !1;
|
|
71
|
+
const r = () => {
|
|
72
|
+
t || (t = !0, e.getTracks().forEach((n) => n.stop()));
|
|
73
|
+
};
|
|
74
|
+
return new Promise((n, s) => {
|
|
75
|
+
let i = !1, o = null, a = null;
|
|
76
|
+
const c = () => {
|
|
77
|
+
a && window.removeEventListener("keydown", a), r(), o == null || o.remove();
|
|
78
|
+
}, u = (h, l) => {
|
|
79
|
+
if (!i) {
|
|
80
|
+
if (i = !0, c(), l) {
|
|
81
|
+
s(l);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
n(h);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
try {
|
|
88
|
+
o = document.createElement("div"), o.setAttribute("data-simface-camera-overlay", "true"), o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true"), Qe(o, {
|
|
89
|
+
position: "fixed",
|
|
90
|
+
inset: "0",
|
|
91
|
+
zIndex: A2,
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
padding: "24px",
|
|
96
|
+
background: "rgba(15, 23, 42, 0.82)"
|
|
97
|
+
});
|
|
98
|
+
const h = document.createElement("div");
|
|
99
|
+
Qe(h, {
|
|
100
|
+
width: "min(100%, 520px)",
|
|
101
|
+
display: "flex",
|
|
102
|
+
flexDirection: "column",
|
|
103
|
+
gap: "16px",
|
|
104
|
+
padding: "20px",
|
|
105
|
+
borderRadius: "18px",
|
|
106
|
+
background: "#020617",
|
|
107
|
+
color: "#e2e8f0",
|
|
108
|
+
boxShadow: "0 24px 60px rgba(15, 23, 42, 0.35)"
|
|
109
|
+
});
|
|
110
|
+
const l = document.createElement("h2");
|
|
111
|
+
l.textContent = "Capture a face photo", Qe(l, {
|
|
112
|
+
margin: "0",
|
|
113
|
+
fontSize: "1.25rem",
|
|
114
|
+
fontWeight: "700"
|
|
115
|
+
});
|
|
116
|
+
const g = document.createElement("p");
|
|
117
|
+
g.textContent = "Allow camera access, then position your face and take a photo.", Qe(g, {
|
|
118
|
+
margin: "0",
|
|
119
|
+
color: "#cbd5e1",
|
|
120
|
+
fontSize: "0.95rem",
|
|
121
|
+
lineHeight: "1.5"
|
|
122
|
+
});
|
|
123
|
+
const _ = document.createElement("video");
|
|
124
|
+
_.autoplay = !0, _.muted = !0, _.playsInline = !0, _.srcObject = e, Qe(_, {
|
|
125
|
+
width: "100%",
|
|
126
|
+
minHeight: "280px",
|
|
127
|
+
borderRadius: "14px",
|
|
128
|
+
background: "#000",
|
|
129
|
+
objectFit: "cover"
|
|
130
|
+
});
|
|
131
|
+
const k = document.createElement("div");
|
|
132
|
+
Qe(k, {
|
|
133
|
+
display: "flex",
|
|
134
|
+
flexWrap: "wrap",
|
|
135
|
+
gap: "12px",
|
|
136
|
+
justifyContent: "flex-end"
|
|
137
|
+
});
|
|
138
|
+
const Ye = Ks("Cancel", "secondary");
|
|
139
|
+
Ye.dataset.simfaceAction = "cancel";
|
|
140
|
+
const fe = Ks("Take photo", "primary");
|
|
141
|
+
fe.dataset.simfaceAction = "capture", fe.disabled = !0, k.append(Ye, fe), h.append(l, g, _, k), o.append(h), document.body.appendChild(o), a = (Y) => {
|
|
142
|
+
Y.key === "Escape" && u(null);
|
|
143
|
+
}, Ye.addEventListener("click", () => u(null)), window.addEventListener("keydown", a), fe.addEventListener("click", async () => {
|
|
144
|
+
try {
|
|
145
|
+
const Y = await L2(_);
|
|
146
|
+
u(Y);
|
|
147
|
+
} catch (Y) {
|
|
148
|
+
u(null, Y instanceof Error ? Y : new Error("Failed to capture an image."));
|
|
149
|
+
}
|
|
150
|
+
}), T2(_).then(() => {
|
|
151
|
+
fe.disabled = !1;
|
|
152
|
+
}).catch((Y) => {
|
|
153
|
+
u(null, Y instanceof Error ? Y : new Error("Failed to start the camera preview."));
|
|
154
|
+
});
|
|
155
|
+
} catch (h) {
|
|
156
|
+
u(null, h instanceof Error ? h : new Error("Failed to open the camera capture UI."));
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function k2() {
|
|
161
|
+
return new Promise((e) => {
|
|
162
|
+
const t = document.createElement("input");
|
|
163
|
+
t.type = "file", t.accept = "image/*", t.capture = "user", t.style.display = "none", t.addEventListener("change", () => {
|
|
164
|
+
var i;
|
|
165
|
+
const s = ((i = t.files) == null ? void 0 : i[0]) ?? null;
|
|
166
|
+
n(), e(s);
|
|
167
|
+
});
|
|
168
|
+
const r = () => {
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
var s;
|
|
171
|
+
(s = t.files) != null && s.length || (n(), e(null));
|
|
172
|
+
}, 500);
|
|
173
|
+
};
|
|
174
|
+
window.addEventListener("focus", r, { once: !0 });
|
|
175
|
+
function n() {
|
|
176
|
+
window.removeEventListener("focus", r), t.remove();
|
|
177
|
+
}
|
|
178
|
+
document.body.appendChild(t), t.click();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function S2() {
|
|
182
|
+
return /WhatsApp/i.test(navigator.userAgent);
|
|
183
|
+
}
|
|
184
|
+
async function T2(e) {
|
|
185
|
+
if (e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) {
|
|
186
|
+
await e.play();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
await new Promise((t, r) => {
|
|
190
|
+
const n = () => {
|
|
191
|
+
i(), t();
|
|
192
|
+
}, s = () => {
|
|
193
|
+
i(), r(new Error("Failed to start the camera preview."));
|
|
194
|
+
}, i = () => {
|
|
195
|
+
e.removeEventListener("loadedmetadata", n), e.removeEventListener("error", s);
|
|
196
|
+
};
|
|
197
|
+
e.addEventListener("loadedmetadata", n, { once: !0 }), e.addEventListener("error", s, { once: !0 });
|
|
198
|
+
}), await e.play();
|
|
199
|
+
}
|
|
200
|
+
function L2(e) {
|
|
201
|
+
if (!e.videoWidth || !e.videoHeight)
|
|
202
|
+
return Promise.reject(new Error("Camera preview is not ready yet."));
|
|
203
|
+
const t = document.createElement("canvas");
|
|
204
|
+
t.width = e.videoWidth, t.height = e.videoHeight;
|
|
205
|
+
const r = t.getContext("2d");
|
|
206
|
+
return r ? (r.drawImage(e, 0, 0, t.width, t.height), new Promise((n, s) => {
|
|
207
|
+
t.toBlob((i) => {
|
|
208
|
+
if (!i) {
|
|
209
|
+
s(new Error("Failed to capture an image."));
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
n(i);
|
|
213
|
+
}, "image/jpeg", 0.92);
|
|
214
|
+
})) : Promise.reject(new Error("Failed to initialize camera capture."));
|
|
215
|
+
}
|
|
216
|
+
function Ks(e, t) {
|
|
217
|
+
const r = document.createElement("button");
|
|
218
|
+
return r.type = "button", r.textContent = e, Qe(r, {
|
|
219
|
+
border: "none",
|
|
220
|
+
borderRadius: "999px",
|
|
221
|
+
padding: "12px 18px",
|
|
222
|
+
font: '600 15px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
223
|
+
cursor: "pointer",
|
|
224
|
+
color: t === "primary" ? "#fff" : "#0f172a",
|
|
225
|
+
background: t === "primary" ? "#2563eb" : "#e2e8f0"
|
|
226
|
+
}), r;
|
|
227
|
+
}
|
|
228
|
+
function Qe(e, t) {
|
|
229
|
+
Object.assign(e.style, t);
|
|
230
|
+
}
|
|
231
|
+
function P2(e) {
|
|
232
|
+
if (e instanceof DOMException)
|
|
233
|
+
switch (e.name) {
|
|
234
|
+
case "NotAllowedError":
|
|
235
|
+
case "SecurityError":
|
|
236
|
+
return "Camera access was denied. Allow camera access and try again.";
|
|
237
|
+
case "NotFoundError":
|
|
238
|
+
return "No camera was found on this device.";
|
|
239
|
+
case "NotReadableError":
|
|
240
|
+
return "The camera is already in use by another application.";
|
|
241
|
+
default:
|
|
242
|
+
return e.message || "Failed to access the camera.";
|
|
243
|
+
}
|
|
244
|
+
return e instanceof Error ? e.message : "Failed to access the camera.";
|
|
245
|
+
}
|
|
246
|
+
function fo(e) {
|
|
247
|
+
return new Promise((t, r) => {
|
|
248
|
+
const n = URL.createObjectURL(e), s = new Image();
|
|
249
|
+
s.onload = () => {
|
|
250
|
+
URL.revokeObjectURL(n), t(s);
|
|
251
|
+
}, s.onerror = () => {
|
|
252
|
+
URL.revokeObjectURL(n), r(new Error("Failed to load captured image"));
|
|
253
|
+
}, s.src = n;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function x2(e) {
|
|
257
|
+
return new Promise((t, r) => {
|
|
258
|
+
const n = new FileReader();
|
|
259
|
+
n.onload = () => t(n.result), n.onerror = () => r(new Error("Failed to read image")), n.readAsDataURL(e);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
var Et = typeof self < "u" ? self : {};
|
|
263
|
+
function ar(e, t) {
|
|
264
|
+
e: {
|
|
265
|
+
for (var r = ["CLOSURE_FLAGS"], n = Et, s = 0; s < r.length; s++) if ((n = n[r[s]]) == null) {
|
|
266
|
+
r = null;
|
|
267
|
+
break e;
|
|
268
|
+
}
|
|
269
|
+
r = n;
|
|
270
|
+
}
|
|
271
|
+
return (e = r && r[e]) != null ? e : t;
|
|
272
|
+
}
|
|
273
|
+
function Je() {
|
|
274
|
+
throw Error("Invalid UTF8");
|
|
275
|
+
}
|
|
276
|
+
function qs(e, t) {
|
|
277
|
+
return t = String.fromCharCode.apply(null, t), e == null ? t : e + t;
|
|
278
|
+
}
|
|
279
|
+
let kr, pn;
|
|
280
|
+
const C2 = typeof TextDecoder < "u";
|
|
281
|
+
let $2;
|
|
282
|
+
const M2 = typeof TextEncoder < "u";
|
|
283
|
+
function po(e) {
|
|
284
|
+
if (M2) e = ($2 || ($2 = new TextEncoder())).encode(e);
|
|
285
|
+
else {
|
|
286
|
+
let r = 0;
|
|
287
|
+
const n = new Uint8Array(3 * e.length);
|
|
288
|
+
for (let s = 0; s < e.length; s++) {
|
|
289
|
+
var t = e.charCodeAt(s);
|
|
290
|
+
if (t < 128) n[r++] = t;
|
|
291
|
+
else {
|
|
292
|
+
if (t < 2048) n[r++] = t >> 6 | 192;
|
|
293
|
+
else {
|
|
294
|
+
if (t >= 55296 && t <= 57343) {
|
|
295
|
+
if (t <= 56319 && s < e.length) {
|
|
296
|
+
const i = e.charCodeAt(++s);
|
|
297
|
+
if (i >= 56320 && i <= 57343) {
|
|
298
|
+
t = 1024 * (t - 55296) + i - 56320 + 65536, n[r++] = t >> 18 | 240, n[r++] = t >> 12 & 63 | 128, n[r++] = t >> 6 & 63 | 128, n[r++] = 63 & t | 128;
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
s--;
|
|
302
|
+
}
|
|
303
|
+
t = 65533;
|
|
304
|
+
}
|
|
305
|
+
n[r++] = t >> 12 | 224, n[r++] = t >> 6 & 63 | 128;
|
|
306
|
+
}
|
|
307
|
+
n[r++] = 63 & t | 128;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
e = r === n.length ? n : n.subarray(0, r);
|
|
311
|
+
}
|
|
312
|
+
return e;
|
|
313
|
+
}
|
|
314
|
+
function go(e) {
|
|
315
|
+
Et.setTimeout((() => {
|
|
316
|
+
throw e;
|
|
317
|
+
}), 0);
|
|
318
|
+
}
|
|
319
|
+
var Ln, O2 = ar(610401301, !1), Xs = ar(748402147, !0), Wn = ar(824648567, !0), Kn = ar(824656860, ar(1, !0));
|
|
320
|
+
function Ys() {
|
|
321
|
+
var e = Et.navigator;
|
|
322
|
+
return e && (e = e.userAgent) ? e : "";
|
|
323
|
+
}
|
|
324
|
+
const Js = Et.navigator;
|
|
325
|
+
function jr(e) {
|
|
326
|
+
return jr[" "](e), e;
|
|
327
|
+
}
|
|
328
|
+
Ln = Js && Js.userAgentData || null, jr[" "] = function() {
|
|
329
|
+
};
|
|
330
|
+
const mo = {};
|
|
331
|
+
let Qt = null;
|
|
332
|
+
function F2(e) {
|
|
333
|
+
const t = e.length;
|
|
334
|
+
let r = 3 * t / 4;
|
|
335
|
+
r % 3 ? r = Math.floor(r) : "=.".indexOf(e[t - 1]) != -1 && (r = "=.".indexOf(e[t - 2]) != -1 ? r - 2 : r - 1);
|
|
336
|
+
const n = new Uint8Array(r);
|
|
337
|
+
let s = 0;
|
|
338
|
+
return (function(i, o) {
|
|
339
|
+
function a(u) {
|
|
340
|
+
for (; c < i.length; ) {
|
|
341
|
+
const h = i.charAt(c++), l = Qt[h];
|
|
342
|
+
if (l != null) return l;
|
|
343
|
+
if (!/^[\s\xa0]*$/.test(h)) throw Error("Unknown base64 encoding at char: " + h);
|
|
344
|
+
}
|
|
345
|
+
return u;
|
|
346
|
+
}
|
|
347
|
+
yo();
|
|
348
|
+
let c = 0;
|
|
349
|
+
for (; ; ) {
|
|
350
|
+
const u = a(-1), h = a(0), l = a(64), g = a(64);
|
|
351
|
+
if (g === 64 && u === -1) break;
|
|
352
|
+
o(u << 2 | h >> 4), l != 64 && (o(h << 4 & 240 | l >> 2), g != 64 && o(l << 6 & 192 | g));
|
|
353
|
+
}
|
|
354
|
+
})(e, (function(i) {
|
|
355
|
+
n[s++] = i;
|
|
356
|
+
})), s !== r ? n.subarray(0, s) : n;
|
|
357
|
+
}
|
|
358
|
+
function yo() {
|
|
359
|
+
if (!Qt) {
|
|
360
|
+
Qt = {};
|
|
361
|
+
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), t = ["+/=", "+/", "-_=", "-_.", "-_"];
|
|
362
|
+
for (let r = 0; r < 5; r++) {
|
|
363
|
+
const n = e.concat(t[r].split(""));
|
|
364
|
+
mo[r] = n;
|
|
365
|
+
for (let s = 0; s < n.length; s++) {
|
|
366
|
+
const i = n[s];
|
|
367
|
+
Qt[i] === void 0 && (Qt[i] = s);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
var I2 = typeof Uint8Array < "u", _o = !(!(O2 && Ln && Ln.brands.length > 0) && (Ys().indexOf("Trident") != -1 || Ys().indexOf("MSIE") != -1)) && typeof btoa == "function";
|
|
373
|
+
const Zs = /[-_.]/g, R2 = { "-": "+", _: "/", ".": "=" };
|
|
374
|
+
function N2(e) {
|
|
375
|
+
return R2[e] || "";
|
|
376
|
+
}
|
|
377
|
+
function vo(e) {
|
|
378
|
+
if (!_o) return F2(e);
|
|
379
|
+
e = Zs.test(e) ? e.replace(Zs, N2) : e, e = atob(e);
|
|
380
|
+
const t = new Uint8Array(e.length);
|
|
381
|
+
for (let r = 0; r < e.length; r++) t[r] = e.charCodeAt(r);
|
|
382
|
+
return t;
|
|
383
|
+
}
|
|
384
|
+
function qn(e) {
|
|
385
|
+
return I2 && e != null && e instanceof Uint8Array;
|
|
386
|
+
}
|
|
387
|
+
var kt = {};
|
|
388
|
+
function ut() {
|
|
389
|
+
return U2 || (U2 = new Le(null, kt));
|
|
390
|
+
}
|
|
391
|
+
function Xn(e) {
|
|
392
|
+
bo(kt);
|
|
393
|
+
var t = e.g;
|
|
394
|
+
return (t = t == null || qn(t) ? t : typeof t == "string" ? vo(t) : null) == null ? t : e.g = t;
|
|
395
|
+
}
|
|
396
|
+
var Le = class {
|
|
397
|
+
h() {
|
|
398
|
+
return new Uint8Array(Xn(this) || 0);
|
|
399
|
+
}
|
|
400
|
+
constructor(t, r) {
|
|
401
|
+
if (bo(r), this.g = t, t != null && t.length === 0) throw Error("ByteString should be constructed with non-empty values");
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
let U2, B2;
|
|
405
|
+
function bo(e) {
|
|
406
|
+
if (e !== kt) throw Error("illegal external caller");
|
|
407
|
+
}
|
|
408
|
+
function wo(e, t) {
|
|
409
|
+
e.__closure__error__context__984382 || (e.__closure__error__context__984382 = {}), e.__closure__error__context__984382.severity = t;
|
|
410
|
+
}
|
|
411
|
+
function Pn(e) {
|
|
412
|
+
return wo(e = Error(e), "warning"), e;
|
|
413
|
+
}
|
|
414
|
+
function St(e, t) {
|
|
415
|
+
if (e != null) {
|
|
416
|
+
var r = B2 ?? (B2 = {}), n = r[e] || 0;
|
|
417
|
+
n >= t || (r[e] = n + 1, wo(e = Error(), "incident"), go(e));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function Nt() {
|
|
421
|
+
return typeof BigInt == "function";
|
|
422
|
+
}
|
|
423
|
+
var Ut = typeof Symbol == "function" && typeof Symbol() == "symbol";
|
|
424
|
+
function Pe(e, t, r = !1) {
|
|
425
|
+
return typeof Symbol == "function" && typeof Symbol() == "symbol" ? r && Symbol.for && e ? Symbol.for(e) : e != null ? Symbol(e) : Symbol() : t;
|
|
426
|
+
}
|
|
427
|
+
var D2 = Pe("jas", void 0, !0), Qs = Pe(void 0, "0di"), Yt = Pe(void 0, "1oa"), ie = Pe(void 0, Symbol()), j2 = Pe(void 0, "0ub"), V2 = Pe(void 0, "0ubs"), xn = Pe(void 0, "0ubsb"), G2 = Pe(void 0, "0actk"), Tt = Pe("m_m", "Pa", !0), ei = Pe();
|
|
428
|
+
const Ao = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Eo = Object.defineProperties, f = Ut ? D2 : "Ga";
|
|
429
|
+
var pt;
|
|
430
|
+
const ti = [];
|
|
431
|
+
function gr(e, t) {
|
|
432
|
+
Ut || f in e || Eo(e, Ao), e[f] |= t;
|
|
433
|
+
}
|
|
434
|
+
function V(e, t) {
|
|
435
|
+
Ut || f in e || Eo(e, Ao), e[f] = t;
|
|
436
|
+
}
|
|
437
|
+
function mr(e) {
|
|
438
|
+
return gr(e, 34), e;
|
|
439
|
+
}
|
|
440
|
+
function cr(e) {
|
|
441
|
+
return gr(e, 8192), e;
|
|
442
|
+
}
|
|
443
|
+
V(ti, 7), pt = Object.freeze(ti);
|
|
444
|
+
var Lt = {};
|
|
445
|
+
function ae(e, t) {
|
|
446
|
+
return t === void 0 ? e.h !== lt && !!(2 & (0 | e.v[f])) : !!(2 & t) && e.h !== lt;
|
|
447
|
+
}
|
|
448
|
+
const lt = {};
|
|
449
|
+
function Yn(e, t) {
|
|
450
|
+
if (e != null) {
|
|
451
|
+
if (typeof e == "string") e = e ? new Le(e, kt) : ut();
|
|
452
|
+
else if (e.constructor !== Le) if (qn(e)) e = e.length ? new Le(new Uint8Array(e), kt) : ut();
|
|
453
|
+
else {
|
|
454
|
+
if (!t) throw Error();
|
|
455
|
+
e = void 0;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return e;
|
|
459
|
+
}
|
|
460
|
+
class ri {
|
|
461
|
+
constructor(t, r, n) {
|
|
462
|
+
this.g = t, this.h = r, this.l = n;
|
|
463
|
+
}
|
|
464
|
+
next() {
|
|
465
|
+
const t = this.g.next();
|
|
466
|
+
return t.done || (t.value = this.h.call(this.l, t.value)), t;
|
|
467
|
+
}
|
|
468
|
+
[Symbol.iterator]() {
|
|
469
|
+
return this;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
var H2 = Object.freeze({});
|
|
473
|
+
function ko(e, t, r) {
|
|
474
|
+
const n = 128 & t ? 0 : -1, s = e.length;
|
|
475
|
+
var i;
|
|
476
|
+
(i = !!s) && (i = (i = e[s - 1]) != null && typeof i == "object" && i.constructor === Object);
|
|
477
|
+
const o = s + (i ? -1 : 0);
|
|
478
|
+
for (t = 128 & t ? 1 : 0; t < o; t++) r(t - n, e[t]);
|
|
479
|
+
if (i) {
|
|
480
|
+
e = e[s - 1];
|
|
481
|
+
for (const a in e) !isNaN(a) && r(+a, e[a]);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
var So = {};
|
|
485
|
+
function Bt(e) {
|
|
486
|
+
return 128 & e ? So : void 0;
|
|
487
|
+
}
|
|
488
|
+
function Vr(e) {
|
|
489
|
+
return e.Na = !0, e;
|
|
490
|
+
}
|
|
491
|
+
var z2 = Vr(((e) => typeof e == "number")), ni = Vr(((e) => typeof e == "string")), W2 = Vr(((e) => typeof e == "boolean")), Gr = typeof Et.BigInt == "function" && typeof Et.BigInt(0) == "bigint";
|
|
492
|
+
function oe(e) {
|
|
493
|
+
var t = e;
|
|
494
|
+
if (ni(t)) {
|
|
495
|
+
if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t)) throw Error(String(t));
|
|
496
|
+
} else if (z2(t) && !Number.isSafeInteger(t)) throw Error(String(t));
|
|
497
|
+
return Gr ? BigInt(e) : e = W2(e) ? e ? "1" : "0" : ni(e) ? e.trim() || "0" : String(e);
|
|
498
|
+
}
|
|
499
|
+
var Cn = Vr(((e) => Gr ? e >= q2 && e <= Y2 : e[0] === "-" ? si(e, K2) : si(e, X2)));
|
|
500
|
+
const K2 = Number.MIN_SAFE_INTEGER.toString(), q2 = Gr ? BigInt(Number.MIN_SAFE_INTEGER) : void 0, X2 = Number.MAX_SAFE_INTEGER.toString(), Y2 = Gr ? BigInt(Number.MAX_SAFE_INTEGER) : void 0;
|
|
501
|
+
function si(e, t) {
|
|
502
|
+
if (e.length > t.length) return !1;
|
|
503
|
+
if (e.length < t.length || e === t) return !0;
|
|
504
|
+
for (let r = 0; r < e.length; r++) {
|
|
505
|
+
const n = e[r], s = t[r];
|
|
506
|
+
if (n > s) return !1;
|
|
507
|
+
if (n < s) return !0;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
const J2 = typeof Uint8Array.prototype.slice == "function";
|
|
511
|
+
let Z2, C = 0, N = 0;
|
|
512
|
+
function ii(e) {
|
|
513
|
+
const t = e >>> 0;
|
|
514
|
+
C = t, N = (e - t) / 4294967296 >>> 0;
|
|
515
|
+
}
|
|
516
|
+
function Pt(e) {
|
|
517
|
+
if (e < 0) {
|
|
518
|
+
ii(-e);
|
|
519
|
+
const [t, r] = es(C, N);
|
|
520
|
+
C = t >>> 0, N = r >>> 0;
|
|
521
|
+
} else ii(e);
|
|
522
|
+
}
|
|
523
|
+
function Jn(e) {
|
|
524
|
+
const t = Z2 || (Z2 = new DataView(new ArrayBuffer(8)));
|
|
525
|
+
t.setFloat32(0, +e, !0), N = 0, C = t.getUint32(0, !0);
|
|
526
|
+
}
|
|
527
|
+
function $n(e, t) {
|
|
528
|
+
const r = 4294967296 * t + (e >>> 0);
|
|
529
|
+
return Number.isSafeInteger(r) ? r : hr(e, t);
|
|
530
|
+
}
|
|
531
|
+
function Q2(e, t) {
|
|
532
|
+
return oe(Nt() ? BigInt.asUintN(64, (BigInt(t >>> 0) << BigInt(32)) + BigInt(e >>> 0)) : hr(e, t));
|
|
533
|
+
}
|
|
534
|
+
function Zn(e, t) {
|
|
535
|
+
const r = 2147483648 & t;
|
|
536
|
+
return r && (t = ~t >>> 0, (e = 1 + ~e >>> 0) == 0 && (t = t + 1 >>> 0)), typeof (e = $n(e, t)) == "number" ? r ? -e : e : r ? "-" + e : e;
|
|
537
|
+
}
|
|
538
|
+
function To(e, t) {
|
|
539
|
+
return Nt() ? oe(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(t)) << BigInt(32)) + BigInt.asUintN(32, BigInt(e)))) : oe(Qn(e, t));
|
|
540
|
+
}
|
|
541
|
+
function hr(e, t) {
|
|
542
|
+
if (e >>>= 0, (t >>>= 0) <= 2097151) var r = "" + (4294967296 * t + e);
|
|
543
|
+
else Nt() ? r = "" + (BigInt(t) << BigInt(32) | BigInt(e)) : (e = (16777215 & e) + 6777216 * (r = 16777215 & (e >>> 24 | t << 8)) + 6710656 * (t = t >> 16 & 65535), r += 8147497 * t, t *= 2, e >= 1e7 && (r += e / 1e7 >>> 0, e %= 1e7), r >= 1e7 && (t += r / 1e7 >>> 0, r %= 1e7), r = t + oi(r) + oi(e));
|
|
544
|
+
return r;
|
|
545
|
+
}
|
|
546
|
+
function oi(e) {
|
|
547
|
+
return e = String(e), "0000000".slice(e.length) + e;
|
|
548
|
+
}
|
|
549
|
+
function Qn(e, t) {
|
|
550
|
+
if (2147483648 & t) if (Nt()) e = "" + (BigInt(0 | t) << BigInt(32) | BigInt(e >>> 0));
|
|
551
|
+
else {
|
|
552
|
+
const [r, n] = es(e, t);
|
|
553
|
+
e = "-" + hr(r, n);
|
|
554
|
+
}
|
|
555
|
+
else e = hr(e, t);
|
|
556
|
+
return e;
|
|
557
|
+
}
|
|
558
|
+
function Hr(e) {
|
|
559
|
+
if (e.length < 16) Pt(Number(e));
|
|
560
|
+
else if (Nt()) e = BigInt(e), C = Number(e & BigInt(4294967295)) >>> 0, N = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
561
|
+
else {
|
|
562
|
+
const t = +(e[0] === "-");
|
|
563
|
+
N = C = 0;
|
|
564
|
+
const r = e.length;
|
|
565
|
+
for (let n = t, s = (r - t) % 6 + t; s <= r; n = s, s += 6) {
|
|
566
|
+
const i = Number(e.slice(n, s));
|
|
567
|
+
N *= 1e6, C = 1e6 * C + i, C >= 4294967296 && (N += Math.trunc(C / 4294967296), N >>>= 0, C >>>= 0);
|
|
568
|
+
}
|
|
569
|
+
if (t) {
|
|
570
|
+
const [n, s] = es(C, N);
|
|
571
|
+
C = n, N = s;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function es(e, t) {
|
|
576
|
+
return t = ~t, e ? e = 1 + ~e : t += 1, [e, t];
|
|
577
|
+
}
|
|
578
|
+
function ve(e) {
|
|
579
|
+
return Array.prototype.slice.call(e);
|
|
580
|
+
}
|
|
581
|
+
const yr = typeof BigInt == "function" ? BigInt.asIntN : void 0, e1 = typeof BigInt == "function" ? BigInt.asUintN : void 0, dt = Number.isSafeInteger, zr = Number.isFinite, xt = Math.trunc, t1 = oe(0);
|
|
582
|
+
function er(e) {
|
|
583
|
+
if (e != null && typeof e != "number") throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);
|
|
584
|
+
return e;
|
|
585
|
+
}
|
|
586
|
+
function Te(e) {
|
|
587
|
+
return e == null || typeof e == "number" ? e : e === "NaN" || e === "Infinity" || e === "-Infinity" ? Number(e) : void 0;
|
|
588
|
+
}
|
|
589
|
+
function ur(e) {
|
|
590
|
+
if (e != null && typeof e != "boolean") {
|
|
591
|
+
var t = typeof e;
|
|
592
|
+
throw Error(`Expected boolean but got ${t != "object" ? t : e ? Array.isArray(e) ? "array" : t : "null"}: ${e}`);
|
|
593
|
+
}
|
|
594
|
+
return e;
|
|
595
|
+
}
|
|
596
|
+
function Lo(e) {
|
|
597
|
+
return e == null || typeof e == "boolean" ? e : typeof e == "number" ? !!e : void 0;
|
|
598
|
+
}
|
|
599
|
+
const r1 = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
|
|
600
|
+
function _r(e) {
|
|
601
|
+
switch (typeof e) {
|
|
602
|
+
case "bigint":
|
|
603
|
+
return !0;
|
|
604
|
+
case "number":
|
|
605
|
+
return zr(e);
|
|
606
|
+
case "string":
|
|
607
|
+
return r1.test(e);
|
|
608
|
+
default:
|
|
609
|
+
return !1;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
function Dt(e) {
|
|
613
|
+
if (e == null) return e;
|
|
614
|
+
if (typeof e == "string" && e) e = +e;
|
|
615
|
+
else if (typeof e != "number") return;
|
|
616
|
+
return zr(e) ? 0 | e : void 0;
|
|
617
|
+
}
|
|
618
|
+
function Po(e) {
|
|
619
|
+
if (e == null) return e;
|
|
620
|
+
if (typeof e == "string" && e) e = +e;
|
|
621
|
+
else if (typeof e != "number") return;
|
|
622
|
+
return zr(e) ? e >>> 0 : void 0;
|
|
623
|
+
}
|
|
624
|
+
function xo(e) {
|
|
625
|
+
const t = e.length;
|
|
626
|
+
return (e[0] === "-" ? t < 20 || t === 20 && e <= "-9223372036854775808" : t < 19 || t === 19 && e <= "9223372036854775807") ? e : (Hr(e), Qn(C, N));
|
|
627
|
+
}
|
|
628
|
+
function ts(e) {
|
|
629
|
+
return e = xt(e), dt(e) || (Pt(e), e = Zn(C, N)), e;
|
|
630
|
+
}
|
|
631
|
+
function Co(e) {
|
|
632
|
+
var t = xt(Number(e));
|
|
633
|
+
return dt(t) ? String(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), xo(e));
|
|
634
|
+
}
|
|
635
|
+
function $o(e) {
|
|
636
|
+
var t = xt(Number(e));
|
|
637
|
+
return dt(t) ? oe(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), Nt() ? oe(yr(64, BigInt(e))) : oe(xo(e)));
|
|
638
|
+
}
|
|
639
|
+
function Mo(e) {
|
|
640
|
+
return dt(e) ? e = oe(ts(e)) : (e = xt(e), dt(e) ? e = String(e) : (Pt(e), e = Qn(C, N)), e = oe(e)), e;
|
|
641
|
+
}
|
|
642
|
+
function n1(e) {
|
|
643
|
+
return e == null ? e : typeof e == "bigint" ? (Cn(e) ? e = Number(e) : (e = yr(64, e), e = Cn(e) ? Number(e) : String(e)), e) : _r(e) ? typeof e == "number" ? ts(e) : Co(e) : void 0;
|
|
644
|
+
}
|
|
645
|
+
function Mr(e) {
|
|
646
|
+
const t = typeof e;
|
|
647
|
+
return e == null ? e : t === "bigint" ? oe(yr(64, e)) : _r(e) ? t === "string" ? $o(e) : Mo(e) : void 0;
|
|
648
|
+
}
|
|
649
|
+
function Oo(e) {
|
|
650
|
+
if (typeof e != "string") throw Error();
|
|
651
|
+
return e;
|
|
652
|
+
}
|
|
653
|
+
function vr(e) {
|
|
654
|
+
if (e != null && typeof e != "string") throw Error();
|
|
655
|
+
return e;
|
|
656
|
+
}
|
|
657
|
+
function q(e) {
|
|
658
|
+
return e == null || typeof e == "string" ? e : void 0;
|
|
659
|
+
}
|
|
660
|
+
function rs(e, t, r, n) {
|
|
661
|
+
return e != null && e[Tt] === Lt ? e : Array.isArray(e) ? ((n = (r = 0 | e[f]) | 32 & n | 2 & n) !== r && V(e, n), new t(e)) : (r ? 2 & n ? ((e = t[Qs]) || (mr((e = new t()).v), e = t[Qs] = e), t = e) : t = new t() : t = void 0, t);
|
|
662
|
+
}
|
|
663
|
+
function s1(e, t, r) {
|
|
664
|
+
if (t) e: {
|
|
665
|
+
if (!_r(t = e)) throw Pn("int64");
|
|
666
|
+
switch (typeof t) {
|
|
667
|
+
case "string":
|
|
668
|
+
t = $o(t);
|
|
669
|
+
break e;
|
|
670
|
+
case "bigint":
|
|
671
|
+
t = oe(yr(64, t));
|
|
672
|
+
break e;
|
|
673
|
+
default:
|
|
674
|
+
t = Mo(t);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
else t = Mr(e);
|
|
678
|
+
return (e = t) == null ? r ? t1 : void 0 : e;
|
|
679
|
+
}
|
|
680
|
+
const i1 = {};
|
|
681
|
+
let o1 = (function() {
|
|
682
|
+
try {
|
|
683
|
+
return jr(new class extends Map {
|
|
684
|
+
constructor() {
|
|
685
|
+
super();
|
|
686
|
+
}
|
|
687
|
+
}()), !1;
|
|
688
|
+
} catch {
|
|
689
|
+
return !0;
|
|
690
|
+
}
|
|
691
|
+
})();
|
|
692
|
+
class gn {
|
|
693
|
+
constructor() {
|
|
694
|
+
this.g = /* @__PURE__ */ new Map();
|
|
695
|
+
}
|
|
696
|
+
get(t) {
|
|
697
|
+
return this.g.get(t);
|
|
698
|
+
}
|
|
699
|
+
set(t, r) {
|
|
700
|
+
return this.g.set(t, r), this.size = this.g.size, this;
|
|
701
|
+
}
|
|
702
|
+
delete(t) {
|
|
703
|
+
return t = this.g.delete(t), this.size = this.g.size, t;
|
|
704
|
+
}
|
|
705
|
+
clear() {
|
|
706
|
+
this.g.clear(), this.size = this.g.size;
|
|
707
|
+
}
|
|
708
|
+
has(t) {
|
|
709
|
+
return this.g.has(t);
|
|
710
|
+
}
|
|
711
|
+
entries() {
|
|
712
|
+
return this.g.entries();
|
|
713
|
+
}
|
|
714
|
+
keys() {
|
|
715
|
+
return this.g.keys();
|
|
716
|
+
}
|
|
717
|
+
values() {
|
|
718
|
+
return this.g.values();
|
|
719
|
+
}
|
|
720
|
+
forEach(t, r) {
|
|
721
|
+
return this.g.forEach(t, r);
|
|
722
|
+
}
|
|
723
|
+
[Symbol.iterator]() {
|
|
724
|
+
return this.entries();
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
const a1 = o1 ? (Object.setPrototypeOf(gn.prototype, Map.prototype), Object.defineProperties(gn.prototype, { size: { value: 0, configurable: !0, enumerable: !0, writable: !0 } }), gn) : class extends Map {
|
|
728
|
+
constructor() {
|
|
729
|
+
super();
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
function ai(e) {
|
|
733
|
+
return e;
|
|
734
|
+
}
|
|
735
|
+
function mn(e) {
|
|
736
|
+
if (2 & e.J) throw Error("Cannot mutate an immutable Map");
|
|
737
|
+
}
|
|
738
|
+
var Fe = class extends a1 {
|
|
739
|
+
constructor(e, t, r = ai, n = ai) {
|
|
740
|
+
super(), this.J = 0 | e[f], this.K = t, this.S = r, this.fa = this.K ? c1 : n;
|
|
741
|
+
for (let s = 0; s < e.length; s++) {
|
|
742
|
+
const i = e[s], o = r(i[0], !1, !0);
|
|
743
|
+
let a = i[1];
|
|
744
|
+
t ? a === void 0 && (a = null) : a = n(i[1], !1, !0, void 0, void 0, this.J), super.set(o, a);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
V(e) {
|
|
748
|
+
return cr(Array.from(super.entries(), e));
|
|
749
|
+
}
|
|
750
|
+
clear() {
|
|
751
|
+
mn(this), super.clear();
|
|
752
|
+
}
|
|
753
|
+
delete(e) {
|
|
754
|
+
return mn(this), super.delete(this.S(e, !0, !1));
|
|
755
|
+
}
|
|
756
|
+
entries() {
|
|
757
|
+
if (this.K) {
|
|
758
|
+
var e = super.keys();
|
|
759
|
+
e = new ri(e, h1, this);
|
|
760
|
+
} else e = super.entries();
|
|
761
|
+
return e;
|
|
762
|
+
}
|
|
763
|
+
values() {
|
|
764
|
+
if (this.K) {
|
|
765
|
+
var e = super.keys();
|
|
766
|
+
e = new ri(e, Fe.prototype.get, this);
|
|
767
|
+
} else e = super.values();
|
|
768
|
+
return e;
|
|
769
|
+
}
|
|
770
|
+
forEach(e, t) {
|
|
771
|
+
this.K ? super.forEach(((r, n, s) => {
|
|
772
|
+
e.call(t, s.get(n), n, s);
|
|
773
|
+
})) : super.forEach(e, t);
|
|
774
|
+
}
|
|
775
|
+
set(e, t) {
|
|
776
|
+
return mn(this), (e = this.S(e, !0, !1)) == null ? this : t == null ? (super.delete(e), this) : super.set(e, this.fa(t, !0, !0, this.K, !1, this.J));
|
|
777
|
+
}
|
|
778
|
+
Ma(e) {
|
|
779
|
+
const t = this.S(e[0], !1, !0);
|
|
780
|
+
e = e[1], e = this.K ? e === void 0 ? null : e : this.fa(e, !1, !0, void 0, !1, this.J), super.set(t, e);
|
|
781
|
+
}
|
|
782
|
+
has(e) {
|
|
783
|
+
return super.has(this.S(e, !1, !1));
|
|
784
|
+
}
|
|
785
|
+
get(e) {
|
|
786
|
+
e = this.S(e, !1, !1);
|
|
787
|
+
const t = super.get(e);
|
|
788
|
+
if (t !== void 0) {
|
|
789
|
+
var r = this.K;
|
|
790
|
+
return r ? ((r = this.fa(t, !1, !0, r, this.ra, this.J)) !== t && super.set(e, r), r) : t;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
[Symbol.iterator]() {
|
|
794
|
+
return this.entries();
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
function c1(e, t, r, n, s, i) {
|
|
798
|
+
return e = rs(e, n, r, i), s && (e = ss(e)), e;
|
|
799
|
+
}
|
|
800
|
+
function h1(e) {
|
|
801
|
+
return [e, this.get(e)];
|
|
802
|
+
}
|
|
803
|
+
let u1;
|
|
804
|
+
function ci() {
|
|
805
|
+
return u1 || (u1 = new Fe(mr([]), void 0, void 0, void 0, i1));
|
|
806
|
+
}
|
|
807
|
+
function Wr(e) {
|
|
808
|
+
return ie ? e[ie] : void 0;
|
|
809
|
+
}
|
|
810
|
+
function Or(e, t) {
|
|
811
|
+
for (const r in e) !isNaN(r) && t(e, +r, e[r]);
|
|
812
|
+
}
|
|
813
|
+
Fe.prototype.toJSON = void 0;
|
|
814
|
+
var Mn = class {
|
|
815
|
+
};
|
|
816
|
+
const l1 = { Ka: !0 };
|
|
817
|
+
function d1(e, t) {
|
|
818
|
+
t < 100 || St(V2, 1);
|
|
819
|
+
}
|
|
820
|
+
function Kr(e, t, r, n) {
|
|
821
|
+
const s = n !== void 0;
|
|
822
|
+
n = !!n;
|
|
823
|
+
var i, o = ie;
|
|
824
|
+
!s && Ut && o && (i = e[o]) && Or(i, d1), o = [];
|
|
825
|
+
var a = e.length;
|
|
826
|
+
let c;
|
|
827
|
+
i = 4294967295;
|
|
828
|
+
let u = !1;
|
|
829
|
+
const h = !!(64 & t), l = h ? 128 & t ? 0 : -1 : void 0;
|
|
830
|
+
1 & t || (c = a && e[a - 1], c != null && typeof c == "object" && c.constructor === Object ? i = --a : c = void 0, !h || 128 & t || s || (u = !0, i = i - l + l)), t = void 0;
|
|
831
|
+
for (var g = 0; g < a; g++) {
|
|
832
|
+
let _ = e[g];
|
|
833
|
+
if (_ != null && (_ = r(_, n)) != null) if (h && g >= i) {
|
|
834
|
+
const k = g - l;
|
|
835
|
+
(t ?? (t = {}))[k] = _;
|
|
836
|
+
} else o[g] = _;
|
|
837
|
+
}
|
|
838
|
+
if (c) for (let _ in c) {
|
|
839
|
+
if ((a = c[_]) == null || (a = r(a, n)) == null) continue;
|
|
840
|
+
let k;
|
|
841
|
+
g = +_, h && !Number.isNaN(g) && (k = g + l) < i ? o[k] = a : (t ?? (t = {}))[_] = a;
|
|
842
|
+
}
|
|
843
|
+
return t && (u ? o.push(t) : o[i] = t), s && ie && (e = Wr(e)) && e instanceof Mn && (o[ie] = (function(_) {
|
|
844
|
+
const k = new Mn();
|
|
845
|
+
return Or(_, ((Ye, fe, Y) => {
|
|
846
|
+
k[fe] = ve(Y);
|
|
847
|
+
})), k.da = _.da, k;
|
|
848
|
+
})(e)), o;
|
|
849
|
+
}
|
|
850
|
+
function f1(e) {
|
|
851
|
+
return e[0] = lr(e[0]), e[1] = lr(e[1]), e;
|
|
852
|
+
}
|
|
853
|
+
function lr(e) {
|
|
854
|
+
switch (typeof e) {
|
|
855
|
+
case "number":
|
|
856
|
+
return Number.isFinite(e) ? e : "" + e;
|
|
857
|
+
case "bigint":
|
|
858
|
+
return Cn(e) ? Number(e) : "" + e;
|
|
859
|
+
case "boolean":
|
|
860
|
+
return e ? 1 : 0;
|
|
861
|
+
case "object":
|
|
862
|
+
if (Array.isArray(e)) {
|
|
863
|
+
var t = 0 | e[f];
|
|
864
|
+
return e.length === 0 && 1 & t ? void 0 : Kr(e, t, lr);
|
|
865
|
+
}
|
|
866
|
+
if (e != null && e[Tt] === Lt) return Fo(e);
|
|
867
|
+
if (e instanceof Le) {
|
|
868
|
+
if ((t = e.g) == null) e = "";
|
|
869
|
+
else if (typeof t == "string") e = t;
|
|
870
|
+
else {
|
|
871
|
+
if (_o) {
|
|
872
|
+
for (var r = "", n = 0, s = t.length - 10240; n < s; ) r += String.fromCharCode.apply(null, t.subarray(n, n += 10240));
|
|
873
|
+
r += String.fromCharCode.apply(null, n ? t.subarray(n) : t), t = btoa(r);
|
|
874
|
+
} else {
|
|
875
|
+
r === void 0 && (r = 0), yo(), r = mo[r], n = Array(Math.floor(t.length / 3)), s = r[64] || "";
|
|
876
|
+
let u = 0, h = 0;
|
|
877
|
+
for (; u < t.length - 2; u += 3) {
|
|
878
|
+
var i = t[u], o = t[u + 1], a = t[u + 2], c = r[i >> 2];
|
|
879
|
+
i = r[(3 & i) << 4 | o >> 4], o = r[(15 & o) << 2 | a >> 6], a = r[63 & a], n[h++] = c + i + o + a;
|
|
880
|
+
}
|
|
881
|
+
switch (c = 0, a = s, t.length - u) {
|
|
882
|
+
case 2:
|
|
883
|
+
a = r[(15 & (c = t[u + 1])) << 2] || s;
|
|
884
|
+
case 1:
|
|
885
|
+
t = t[u], n[h] = r[t >> 2] + r[(3 & t) << 4 | c >> 4] + a + s;
|
|
886
|
+
}
|
|
887
|
+
t = n.join("");
|
|
888
|
+
}
|
|
889
|
+
e = e.g = t;
|
|
890
|
+
}
|
|
891
|
+
return e;
|
|
892
|
+
}
|
|
893
|
+
return e instanceof Fe ? e = e.size !== 0 ? e.V(f1) : void 0 : void 0;
|
|
894
|
+
}
|
|
895
|
+
return e;
|
|
896
|
+
}
|
|
897
|
+
function Fo(e) {
|
|
898
|
+
return Kr(e = e.v, 0 | e[f], lr);
|
|
899
|
+
}
|
|
900
|
+
let p1, g1;
|
|
901
|
+
function st(e, t) {
|
|
902
|
+
return Io(e, t[0], t[1]);
|
|
903
|
+
}
|
|
904
|
+
function Io(e, t, r, n = 0) {
|
|
905
|
+
if (e == null) {
|
|
906
|
+
var s = 32;
|
|
907
|
+
r ? (e = [r], s |= 128) : e = [], t && (s = -16760833 & s | (1023 & t) << 14);
|
|
908
|
+
} else {
|
|
909
|
+
if (!Array.isArray(e)) throw Error("narr");
|
|
910
|
+
if (s = 0 | e[f], Xs && 1 & s) throw Error("rfarr");
|
|
911
|
+
if (2048 & s && !(2 & s) && (function() {
|
|
912
|
+
if (Xs) throw Error("carr");
|
|
913
|
+
St(G2, 5);
|
|
914
|
+
})(), 256 & s) throw Error("farr");
|
|
915
|
+
if (64 & s) return (s | n) !== s && V(e, s | n), e;
|
|
916
|
+
if (r && (s |= 128, r !== e[0])) throw Error("mid");
|
|
917
|
+
e: {
|
|
918
|
+
s |= 64;
|
|
919
|
+
var i = (r = e).length;
|
|
920
|
+
if (i) {
|
|
921
|
+
var o = i - 1;
|
|
922
|
+
const c = r[o];
|
|
923
|
+
if (c != null && typeof c == "object" && c.constructor === Object) {
|
|
924
|
+
if ((o -= t = 128 & s ? 0 : -1) >= 1024) throw Error("pvtlmt");
|
|
925
|
+
for (var a in c) (i = +a) < o && (r[i + t] = c[a], delete c[a]);
|
|
926
|
+
s = -16760833 & s | (1023 & o) << 14;
|
|
927
|
+
break e;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
if (t) {
|
|
931
|
+
if ((a = Math.max(t, i - (128 & s ? 0 : -1))) > 1024) throw Error("spvt");
|
|
932
|
+
s = -16760833 & s | (1023 & a) << 14;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
return V(e, 64 | s | n), e;
|
|
937
|
+
}
|
|
938
|
+
function m1(e, t) {
|
|
939
|
+
if (typeof e != "object") return e;
|
|
940
|
+
if (Array.isArray(e)) {
|
|
941
|
+
var r = 0 | e[f];
|
|
942
|
+
return e.length === 0 && 1 & r ? void 0 : hi(e, r, t);
|
|
943
|
+
}
|
|
944
|
+
if (e != null && e[Tt] === Lt) return ui(e);
|
|
945
|
+
if (e instanceof Fe) {
|
|
946
|
+
if (2 & (t = e.J)) return e;
|
|
947
|
+
if (!e.size) return;
|
|
948
|
+
if (r = mr(e.V()), e.K) for (e = 0; e < r.length; e++) {
|
|
949
|
+
const n = r[e];
|
|
950
|
+
let s = n[1];
|
|
951
|
+
s = s == null || typeof s != "object" ? void 0 : s != null && s[Tt] === Lt ? ui(s) : Array.isArray(s) ? hi(s, 0 | s[f], !!(32 & t)) : void 0, n[1] = s;
|
|
952
|
+
}
|
|
953
|
+
return r;
|
|
954
|
+
}
|
|
955
|
+
return e instanceof Le ? e : void 0;
|
|
956
|
+
}
|
|
957
|
+
function hi(e, t, r) {
|
|
958
|
+
return 2 & t || (!r || 4096 & t || 16 & t ? e = jt(e, t, !1, r && !(16 & t)) : (gr(e, 34), 4 & t && Object.freeze(e))), e;
|
|
959
|
+
}
|
|
960
|
+
function ns(e, t, r) {
|
|
961
|
+
return e = new e.constructor(t), r && (e.h = lt), e.m = lt, e;
|
|
962
|
+
}
|
|
963
|
+
function ui(e) {
|
|
964
|
+
const t = e.v, r = 0 | t[f];
|
|
965
|
+
return ae(e, r) ? e : is(e, t, r) ? ns(e, t) : jt(t, r);
|
|
966
|
+
}
|
|
967
|
+
function jt(e, t, r, n) {
|
|
968
|
+
return n ?? (n = !!(34 & t)), e = Kr(e, t, m1, n), n = 32, r && (n |= 2), V(e, t = 16769217 & t | n), e;
|
|
969
|
+
}
|
|
970
|
+
function ss(e) {
|
|
971
|
+
const t = e.v, r = 0 | t[f];
|
|
972
|
+
return ae(e, r) ? is(e, t, r) ? ns(e, t, !0) : new e.constructor(jt(t, r, !1)) : e;
|
|
973
|
+
}
|
|
974
|
+
function Vt(e) {
|
|
975
|
+
if (e.h !== lt) return !1;
|
|
976
|
+
var t = e.v;
|
|
977
|
+
return gr(t = jt(t, 0 | t[f]), 2048), e.v = t, e.h = void 0, e.m = void 0, !0;
|
|
978
|
+
}
|
|
979
|
+
function Gt(e) {
|
|
980
|
+
if (!Vt(e) && ae(e, 0 | e.v[f])) throw Error();
|
|
981
|
+
}
|
|
982
|
+
function gt(e, t) {
|
|
983
|
+
t === void 0 && (t = 0 | e[f]), 32 & t && !(4096 & t) && V(e, 4096 | t);
|
|
984
|
+
}
|
|
985
|
+
function is(e, t, r) {
|
|
986
|
+
return !!(2 & r) || !(!(32 & r) || 4096 & r) && (V(t, 2 | r), e.h = lt, !0);
|
|
987
|
+
}
|
|
988
|
+
const y1 = oe(0), Be = {};
|
|
989
|
+
function P(e, t, r, n, s) {
|
|
990
|
+
if ((t = Ie(e.v, t, r, s)) !== null || n && e.m !== lt) return t;
|
|
991
|
+
}
|
|
992
|
+
function Ie(e, t, r, n) {
|
|
993
|
+
if (t === -1) return null;
|
|
994
|
+
const s = t + (r ? 0 : -1), i = e.length - 1;
|
|
995
|
+
let o, a;
|
|
996
|
+
if (!(i < 1 + (r ? 0 : -1))) {
|
|
997
|
+
if (s >= i) if (o = e[i], o != null && typeof o == "object" && o.constructor === Object) r = o[t], a = !0;
|
|
998
|
+
else {
|
|
999
|
+
if (s !== i) return;
|
|
1000
|
+
r = o;
|
|
1001
|
+
}
|
|
1002
|
+
else r = e[s];
|
|
1003
|
+
if (n && r != null) {
|
|
1004
|
+
if ((n = n(r)) == null) return n;
|
|
1005
|
+
if (!Object.is(n, r)) return a ? o[t] = n : e[s] = n, n;
|
|
1006
|
+
}
|
|
1007
|
+
return r;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
function S(e, t, r, n) {
|
|
1011
|
+
Gt(e), D(e = e.v, 0 | e[f], t, r, n);
|
|
1012
|
+
}
|
|
1013
|
+
function D(e, t, r, n, s) {
|
|
1014
|
+
const i = r + (s ? 0 : -1);
|
|
1015
|
+
var o = e.length - 1;
|
|
1016
|
+
if (o >= 1 + (s ? 0 : -1) && i >= o) {
|
|
1017
|
+
const a = e[o];
|
|
1018
|
+
if (a != null && typeof a == "object" && a.constructor === Object) return a[r] = n, t;
|
|
1019
|
+
}
|
|
1020
|
+
return i <= o ? (e[i] = n, t) : (n !== void 0 && (r >= (o = (t ?? (t = 0 | e[f])) >> 14 & 1023 || 536870912) ? n != null && (e[o + (s ? 0 : -1)] = { [r]: n }) : e[i] = n), t);
|
|
1021
|
+
}
|
|
1022
|
+
function tt() {
|
|
1023
|
+
return H2 === void 0 ? 2 : 4;
|
|
1024
|
+
}
|
|
1025
|
+
function rt(e, t, r, n, s) {
|
|
1026
|
+
let i = e.v, o = 0 | i[f];
|
|
1027
|
+
n = ae(e, o) ? 1 : n, s = !!s || n === 3, n === 2 && Vt(e) && (i = e.v, o = 0 | i[f]);
|
|
1028
|
+
let a = (e = os(i, t)) === pt ? 7 : 0 | e[f], c = as(a, o);
|
|
1029
|
+
var u = !(4 & c);
|
|
1030
|
+
if (u) {
|
|
1031
|
+
4 & c && (e = ve(e), a = 0, c = ot(c, o), o = D(i, o, t, e));
|
|
1032
|
+
let h = 0, l = 0;
|
|
1033
|
+
for (; h < e.length; h++) {
|
|
1034
|
+
const g = r(e[h]);
|
|
1035
|
+
g != null && (e[l++] = g);
|
|
1036
|
+
}
|
|
1037
|
+
l < h && (e.length = l), r = -513 & (4 | c), c = r &= -1025, c &= -4097;
|
|
1038
|
+
}
|
|
1039
|
+
return c !== a && (V(e, c), 2 & c && Object.freeze(e)), Ro(e, c, i, o, t, n, u, s);
|
|
1040
|
+
}
|
|
1041
|
+
function Ro(e, t, r, n, s, i, o, a) {
|
|
1042
|
+
let c = t;
|
|
1043
|
+
return i === 1 || i === 4 && (2 & t || !(16 & t) && 32 & n) ? it(t) || ((t |= !e.length || o && !(4096 & t) || 32 & n && !(4096 & t || 16 & t) ? 2 : 256) !== c && V(e, t), Object.freeze(e)) : (i === 2 && it(t) && (e = ve(e), c = 0, t = ot(t, n), n = D(r, n, s, e)), it(t) || (a || (t |= 16), t !== c && V(e, t))), 2 & t || !(4096 & t || 16 & t) || gt(r, n), e;
|
|
1044
|
+
}
|
|
1045
|
+
function os(e, t, r) {
|
|
1046
|
+
return e = Ie(e, t, r), Array.isArray(e) ? e : pt;
|
|
1047
|
+
}
|
|
1048
|
+
function as(e, t) {
|
|
1049
|
+
return 2 & t && (e |= 2), 1 | e;
|
|
1050
|
+
}
|
|
1051
|
+
function it(e) {
|
|
1052
|
+
return !!(2 & e) && !!(4 & e) || !!(256 & e);
|
|
1053
|
+
}
|
|
1054
|
+
function No(e) {
|
|
1055
|
+
return Yn(e, !0);
|
|
1056
|
+
}
|
|
1057
|
+
function Uo(e) {
|
|
1058
|
+
e = ve(e);
|
|
1059
|
+
for (let t = 0; t < e.length; t++) {
|
|
1060
|
+
const r = e[t] = ve(e[t]);
|
|
1061
|
+
Array.isArray(r[1]) && (r[1] = mr(r[1]));
|
|
1062
|
+
}
|
|
1063
|
+
return cr(e);
|
|
1064
|
+
}
|
|
1065
|
+
function je(e, t, r, n) {
|
|
1066
|
+
Gt(e), D(e = e.v, 0 | e[f], t, (n === "0" ? Number(r) === 0 : r === n) ? void 0 : r);
|
|
1067
|
+
}
|
|
1068
|
+
function Ht(e, t, r) {
|
|
1069
|
+
if (2 & t) throw Error();
|
|
1070
|
+
const n = Bt(t);
|
|
1071
|
+
let s = os(e, r, n), i = s === pt ? 7 : 0 | s[f], o = as(i, t);
|
|
1072
|
+
return (2 & o || it(o) || 16 & o) && (o === i || it(o) || V(s, o), s = ve(s), i = 0, o = ot(o, t), D(e, t, r, s, n)), o &= -13, o !== i && V(s, o), s;
|
|
1073
|
+
}
|
|
1074
|
+
function yn(e, t) {
|
|
1075
|
+
var r = Ca;
|
|
1076
|
+
return hs(cs(e = e.v), e, void 0, r) === t ? t : -1;
|
|
1077
|
+
}
|
|
1078
|
+
function cs(e) {
|
|
1079
|
+
if (Ut) return e[Yt] ?? (e[Yt] = /* @__PURE__ */ new Map());
|
|
1080
|
+
if (Yt in e) return e[Yt];
|
|
1081
|
+
const t = /* @__PURE__ */ new Map();
|
|
1082
|
+
return Object.defineProperty(e, Yt, { value: t }), t;
|
|
1083
|
+
}
|
|
1084
|
+
function Bo(e, t, r, n, s) {
|
|
1085
|
+
const i = cs(e), o = hs(i, e, t, r, s);
|
|
1086
|
+
return o !== n && (o && (t = D(e, t, o, void 0, s)), i.set(r, n)), t;
|
|
1087
|
+
}
|
|
1088
|
+
function hs(e, t, r, n, s) {
|
|
1089
|
+
let i = e.get(n);
|
|
1090
|
+
if (i != null) return i;
|
|
1091
|
+
i = 0;
|
|
1092
|
+
for (let o = 0; o < n.length; o++) {
|
|
1093
|
+
const a = n[o];
|
|
1094
|
+
Ie(t, a, s) != null && (i !== 0 && (r = D(t, r, i, void 0, s)), i = a);
|
|
1095
|
+
}
|
|
1096
|
+
return e.set(n, i), i;
|
|
1097
|
+
}
|
|
1098
|
+
function us(e, t, r) {
|
|
1099
|
+
let n = 0 | e[f];
|
|
1100
|
+
const s = Bt(n), i = Ie(e, r, s);
|
|
1101
|
+
let o;
|
|
1102
|
+
if (i != null && i[Tt] === Lt) {
|
|
1103
|
+
if (!ae(i)) return Vt(i), i.v;
|
|
1104
|
+
o = i.v;
|
|
1105
|
+
} else Array.isArray(i) && (o = i);
|
|
1106
|
+
if (o) {
|
|
1107
|
+
const a = 0 | o[f];
|
|
1108
|
+
2 & a && (o = jt(o, a));
|
|
1109
|
+
}
|
|
1110
|
+
return o = st(o, t), o !== i && D(e, n, r, o, s), o;
|
|
1111
|
+
}
|
|
1112
|
+
function Do(e, t, r, n, s) {
|
|
1113
|
+
let i = !1;
|
|
1114
|
+
if ((n = Ie(e, n, s, ((o) => {
|
|
1115
|
+
const a = rs(o, r, !1, t);
|
|
1116
|
+
return i = a !== o && a != null, a;
|
|
1117
|
+
}))) != null) return i && !ae(n) && gt(e, t), n;
|
|
1118
|
+
}
|
|
1119
|
+
function A(e, t, r, n) {
|
|
1120
|
+
let s = e.v, i = 0 | s[f];
|
|
1121
|
+
if ((t = Do(s, i, t, r, n)) == null) return t;
|
|
1122
|
+
if (i = 0 | s[f], !ae(e, i)) {
|
|
1123
|
+
const o = ss(t);
|
|
1124
|
+
o !== t && (Vt(e) && (s = e.v, i = 0 | s[f]), i = D(s, i, r, t = o, n), gt(s, i));
|
|
1125
|
+
}
|
|
1126
|
+
return t;
|
|
1127
|
+
}
|
|
1128
|
+
function jo(e, t, r, n, s, i, o, a) {
|
|
1129
|
+
var c = ae(e, r);
|
|
1130
|
+
i = c ? 1 : i, o = !!o || i === 3, c = a && !c, (i === 2 || c) && Vt(e) && (r = 0 | (t = e.v)[f]);
|
|
1131
|
+
var u = (e = os(t, s)) === pt ? 7 : 0 | e[f], h = as(u, r);
|
|
1132
|
+
if (a = !(4 & h)) {
|
|
1133
|
+
var l = e, g = r;
|
|
1134
|
+
const _ = !!(2 & h);
|
|
1135
|
+
_ && (g |= 2);
|
|
1136
|
+
let k = !_, Ye = !0, fe = 0, Y = 0;
|
|
1137
|
+
for (; fe < l.length; fe++) {
|
|
1138
|
+
const fn = rs(l[fe], n, !1, g);
|
|
1139
|
+
if (fn instanceof n) {
|
|
1140
|
+
if (!_) {
|
|
1141
|
+
const Ws = ae(fn);
|
|
1142
|
+
k && (k = !Ws), Ye && (Ye = Ws);
|
|
1143
|
+
}
|
|
1144
|
+
l[Y++] = fn;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
Y < fe && (l.length = Y), h |= 4, h = Ye ? -4097 & h : 4096 | h, h = k ? 8 | h : -9 & h;
|
|
1148
|
+
}
|
|
1149
|
+
if (h !== u && (V(e, h), 2 & h && Object.freeze(e)), c && !(8 & h || !e.length && (i === 1 || i === 4 && (2 & h || !(16 & h) && 32 & r)))) {
|
|
1150
|
+
for (it(h) && (e = ve(e), h = ot(h, r), r = D(t, r, s, e)), n = e, c = h, u = 0; u < n.length; u++) (l = n[u]) !== (h = ss(l)) && (n[u] = h);
|
|
1151
|
+
c |= 8, V(e, h = c = n.length ? 4096 | c : -4097 & c);
|
|
1152
|
+
}
|
|
1153
|
+
return Ro(e, h, t, r, s, i, a, o);
|
|
1154
|
+
}
|
|
1155
|
+
function Re(e, t, r) {
|
|
1156
|
+
const n = e.v;
|
|
1157
|
+
return jo(e, n, 0 | n[f], t, r, tt(), !1, !0);
|
|
1158
|
+
}
|
|
1159
|
+
function Vo(e) {
|
|
1160
|
+
return e == null && (e = void 0), e;
|
|
1161
|
+
}
|
|
1162
|
+
function v(e, t, r, n, s) {
|
|
1163
|
+
return S(e, r, n = Vo(n), s), n && !ae(n) && gt(e.v), e;
|
|
1164
|
+
}
|
|
1165
|
+
function tr(e, t, r, n) {
|
|
1166
|
+
e: {
|
|
1167
|
+
var s = n = Vo(n);
|
|
1168
|
+
Gt(e);
|
|
1169
|
+
const i = e.v;
|
|
1170
|
+
let o = 0 | i[f];
|
|
1171
|
+
if (s == null) {
|
|
1172
|
+
const a = cs(i);
|
|
1173
|
+
if (hs(a, i, o, r) !== t) break e;
|
|
1174
|
+
a.set(r, 0);
|
|
1175
|
+
} else o = Bo(i, o, r, t);
|
|
1176
|
+
D(i, o, t, s);
|
|
1177
|
+
}
|
|
1178
|
+
n && !ae(n) && gt(e.v);
|
|
1179
|
+
}
|
|
1180
|
+
function ot(e, t) {
|
|
1181
|
+
return -273 & (2 & t ? 2 | e : -3 & e);
|
|
1182
|
+
}
|
|
1183
|
+
function ls(e, t, r, n) {
|
|
1184
|
+
var s = n;
|
|
1185
|
+
Gt(e), e = jo(e, n = e.v, 0 | n[f], r, t, 2, !0), s = s ?? new r(), e.push(s), t = r = e === pt ? 7 : 0 | e[f], (s = ae(s)) ? (r &= -9, e.length === 1 && (r &= -4097)) : r |= 4096, r !== t && V(e, r), s || gt(n);
|
|
1186
|
+
}
|
|
1187
|
+
function me(e, t, r) {
|
|
1188
|
+
return Dt(P(e, t, void 0, r));
|
|
1189
|
+
}
|
|
1190
|
+
function Go(e) {
|
|
1191
|
+
return (Kn ? P(e, 2, void 0, void 0, Mr) : Mr(P(e, 2))) ?? y1;
|
|
1192
|
+
}
|
|
1193
|
+
function I(e, t) {
|
|
1194
|
+
return P(e, t, void 0, void 0, Te) ?? 0;
|
|
1195
|
+
}
|
|
1196
|
+
function Ne(e, t, r) {
|
|
1197
|
+
if (r != null) {
|
|
1198
|
+
if (typeof r != "number" || !zr(r)) throw Pn("int32");
|
|
1199
|
+
r |= 0;
|
|
1200
|
+
}
|
|
1201
|
+
S(e, t, r);
|
|
1202
|
+
}
|
|
1203
|
+
function y(e, t, r) {
|
|
1204
|
+
S(e, t, er(r));
|
|
1205
|
+
}
|
|
1206
|
+
function ce(e, t, r) {
|
|
1207
|
+
je(e, t, vr(r), "");
|
|
1208
|
+
}
|
|
1209
|
+
function Fr(e, t, r) {
|
|
1210
|
+
{
|
|
1211
|
+
Gt(e);
|
|
1212
|
+
const o = e.v;
|
|
1213
|
+
let a = 0 | o[f];
|
|
1214
|
+
if (r == null) D(o, a, t);
|
|
1215
|
+
else {
|
|
1216
|
+
var n = e = r === pt ? 7 : 0 | r[f], s = it(e), i = s || Object.isFrozen(r);
|
|
1217
|
+
for (s || (e = 0), i || (r = ve(r), n = 0, e = ot(e, a), i = !1), e |= 5, e |= (4 & e ? 512 & e ? 512 : 1024 & e ? 1024 : 0 : void 0) ?? (Kn ? 1024 : 0), s = 0; s < r.length; s++) {
|
|
1218
|
+
const c = r[s], u = Oo(c);
|
|
1219
|
+
Object.is(c, u) || (i && (r = ve(r), n = 0, e = ot(e, a), i = !1), r[s] = u);
|
|
1220
|
+
}
|
|
1221
|
+
e !== n && (i && (r = ve(r), e = ot(e, a)), V(r, e)), D(o, a, t, r);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
function qr(e, t, r) {
|
|
1226
|
+
Gt(e), rt(e, t, q, 2, !0).push(Oo(r));
|
|
1227
|
+
}
|
|
1228
|
+
var yt = class {
|
|
1229
|
+
constructor(e, t, r) {
|
|
1230
|
+
if (this.buffer = e, r && !t) throw Error();
|
|
1231
|
+
this.g = t;
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
function ds(e, t) {
|
|
1235
|
+
if (typeof e == "string") return new yt(vo(e), t);
|
|
1236
|
+
if (Array.isArray(e)) return new yt(new Uint8Array(e), t);
|
|
1237
|
+
if (e.constructor === Uint8Array) return new yt(e, !1);
|
|
1238
|
+
if (e.constructor === ArrayBuffer) return e = new Uint8Array(e), new yt(e, !1);
|
|
1239
|
+
if (e.constructor === Le) return t = Xn(e) || new Uint8Array(0), new yt(t, !0, e);
|
|
1240
|
+
if (e instanceof Uint8Array) return e = e.constructor === Uint8Array ? e : new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new yt(e, !1);
|
|
1241
|
+
throw Error();
|
|
1242
|
+
}
|
|
1243
|
+
function Ct(e, t) {
|
|
1244
|
+
let r, n = 0, s = 0, i = 0;
|
|
1245
|
+
const o = e.h;
|
|
1246
|
+
let a = e.g;
|
|
1247
|
+
do
|
|
1248
|
+
r = o[a++], n |= (127 & r) << i, i += 7;
|
|
1249
|
+
while (i < 32 && 128 & r);
|
|
1250
|
+
if (i > 32) for (s |= (127 & r) >> 4, i = 3; i < 32 && 128 & r; i += 7) r = o[a++], s |= (127 & r) << i;
|
|
1251
|
+
if (at(e, a), !(128 & r)) return t(n >>> 0, s >>> 0);
|
|
1252
|
+
throw Error();
|
|
1253
|
+
}
|
|
1254
|
+
function fs(e) {
|
|
1255
|
+
let t = 0, r = e.g;
|
|
1256
|
+
const n = r + 10, s = e.h;
|
|
1257
|
+
for (; r < n; ) {
|
|
1258
|
+
const i = s[r++];
|
|
1259
|
+
if (t |= i, (128 & i) == 0) return at(e, r), !!(127 & t);
|
|
1260
|
+
}
|
|
1261
|
+
throw Error();
|
|
1262
|
+
}
|
|
1263
|
+
function We(e) {
|
|
1264
|
+
const t = e.h;
|
|
1265
|
+
let r = e.g, n = t[r++], s = 127 & n;
|
|
1266
|
+
if (128 & n && (n = t[r++], s |= (127 & n) << 7, 128 & n && (n = t[r++], s |= (127 & n) << 14, 128 & n && (n = t[r++], s |= (127 & n) << 21, 128 & n && (n = t[r++], s |= n << 28, 128 & n && 128 & t[r++] && 128 & t[r++] && 128 & t[r++] && 128 & t[r++] && 128 & t[r++]))))) throw Error();
|
|
1267
|
+
return at(e, r), s;
|
|
1268
|
+
}
|
|
1269
|
+
function Ue(e) {
|
|
1270
|
+
return We(e) >>> 0;
|
|
1271
|
+
}
|
|
1272
|
+
function Ir(e) {
|
|
1273
|
+
var t = e.h;
|
|
1274
|
+
const r = e.g;
|
|
1275
|
+
var n = t[r], s = t[r + 1];
|
|
1276
|
+
const i = t[r + 2];
|
|
1277
|
+
return t = t[r + 3], at(e, e.g + 4), e = 2 * ((s = (n << 0 | s << 8 | i << 16 | t << 24) >>> 0) >> 31) + 1, n = s >>> 23 & 255, s &= 8388607, n == 255 ? s ? NaN : e * (1 / 0) : n == 0 ? 1401298464324817e-60 * e * s : e * Math.pow(2, n - 150) * (s + 8388608);
|
|
1278
|
+
}
|
|
1279
|
+
function _1(e) {
|
|
1280
|
+
return We(e);
|
|
1281
|
+
}
|
|
1282
|
+
function at(e, t) {
|
|
1283
|
+
if (e.g = t, t > e.l) throw Error();
|
|
1284
|
+
}
|
|
1285
|
+
function Ho(e, t) {
|
|
1286
|
+
if (t < 0) throw Error();
|
|
1287
|
+
const r = e.g;
|
|
1288
|
+
if ((t = r + t) > e.l) throw Error();
|
|
1289
|
+
return e.g = t, r;
|
|
1290
|
+
}
|
|
1291
|
+
function zo(e, t) {
|
|
1292
|
+
if (t == 0) return ut();
|
|
1293
|
+
var r = Ho(e, t);
|
|
1294
|
+
return e.Y && e.j ? r = e.h.subarray(r, r + t) : (e = e.h, r = r === (t = r + t) ? new Uint8Array(0) : J2 ? e.slice(r, t) : new Uint8Array(e.subarray(r, t))), r.length == 0 ? ut() : new Le(r, kt);
|
|
1295
|
+
}
|
|
1296
|
+
var li = [];
|
|
1297
|
+
function Wo(e, t, r, n) {
|
|
1298
|
+
if (Rr.length) {
|
|
1299
|
+
const s = Rr.pop();
|
|
1300
|
+
return s.o(n), s.g.init(e, t, r, n), s;
|
|
1301
|
+
}
|
|
1302
|
+
return new v1(e, t, r, n);
|
|
1303
|
+
}
|
|
1304
|
+
function Ko(e) {
|
|
1305
|
+
e.g.clear(), e.l = -1, e.h = -1, Rr.length < 100 && Rr.push(e);
|
|
1306
|
+
}
|
|
1307
|
+
function qo(e) {
|
|
1308
|
+
var t = e.g;
|
|
1309
|
+
if (t.g == t.l) return !1;
|
|
1310
|
+
e.m = e.g.g;
|
|
1311
|
+
var r = Ue(e.g);
|
|
1312
|
+
if (t = r >>> 3, !((r &= 7) >= 0 && r <= 5) || t < 1) throw Error();
|
|
1313
|
+
return e.l = t, e.h = r, !0;
|
|
1314
|
+
}
|
|
1315
|
+
function xr(e) {
|
|
1316
|
+
switch (e.h) {
|
|
1317
|
+
case 0:
|
|
1318
|
+
e.h != 0 ? xr(e) : fs(e.g);
|
|
1319
|
+
break;
|
|
1320
|
+
case 1:
|
|
1321
|
+
at(e = e.g, e.g + 8);
|
|
1322
|
+
break;
|
|
1323
|
+
case 2:
|
|
1324
|
+
if (e.h != 2) xr(e);
|
|
1325
|
+
else {
|
|
1326
|
+
var t = Ue(e.g);
|
|
1327
|
+
at(e = e.g, e.g + t);
|
|
1328
|
+
}
|
|
1329
|
+
break;
|
|
1330
|
+
case 5:
|
|
1331
|
+
at(e = e.g, e.g + 4);
|
|
1332
|
+
break;
|
|
1333
|
+
case 3:
|
|
1334
|
+
for (t = e.l; ; ) {
|
|
1335
|
+
if (!qo(e)) throw Error();
|
|
1336
|
+
if (e.h == 4) {
|
|
1337
|
+
if (e.l != t) throw Error();
|
|
1338
|
+
break;
|
|
1339
|
+
}
|
|
1340
|
+
xr(e);
|
|
1341
|
+
}
|
|
1342
|
+
break;
|
|
1343
|
+
default:
|
|
1344
|
+
throw Error();
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
function br(e, t, r) {
|
|
1348
|
+
const n = e.g.l;
|
|
1349
|
+
var s = Ue(e.g);
|
|
1350
|
+
let i = (s = e.g.g + s) - n;
|
|
1351
|
+
if (i <= 0 && (e.g.l = s, r(t, e, void 0, void 0, void 0), i = s - e.g.g), i) throw Error();
|
|
1352
|
+
return e.g.g = s, e.g.l = n, t;
|
|
1353
|
+
}
|
|
1354
|
+
function ps(e) {
|
|
1355
|
+
var t = Ue(e.g), r = Ho(e = e.g, t);
|
|
1356
|
+
if (e = e.h, C2) {
|
|
1357
|
+
var n, s = e;
|
|
1358
|
+
(n = pn) || (n = pn = new TextDecoder("utf-8", { fatal: !0 })), t = r + t, s = r === 0 && t === s.length ? s : s.subarray(r, t);
|
|
1359
|
+
try {
|
|
1360
|
+
var i = n.decode(s);
|
|
1361
|
+
} catch (a) {
|
|
1362
|
+
if (kr === void 0) {
|
|
1363
|
+
try {
|
|
1364
|
+
n.decode(new Uint8Array([128]));
|
|
1365
|
+
} catch {
|
|
1366
|
+
}
|
|
1367
|
+
try {
|
|
1368
|
+
n.decode(new Uint8Array([97])), kr = !0;
|
|
1369
|
+
} catch {
|
|
1370
|
+
kr = !1;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
throw !kr && (pn = void 0), a;
|
|
1374
|
+
}
|
|
1375
|
+
} else {
|
|
1376
|
+
t = (i = r) + t, r = [];
|
|
1377
|
+
let a, c = null;
|
|
1378
|
+
for (; i < t; ) {
|
|
1379
|
+
var o = e[i++];
|
|
1380
|
+
o < 128 ? r.push(o) : o < 224 ? i >= t ? Je() : (a = e[i++], o < 194 || (192 & a) != 128 ? (i--, Je()) : r.push((31 & o) << 6 | 63 & a)) : o < 240 ? i >= t - 1 ? Je() : (a = e[i++], (192 & a) != 128 || o === 224 && a < 160 || o === 237 && a >= 160 || (192 & (n = e[i++])) != 128 ? (i--, Je()) : r.push((15 & o) << 12 | (63 & a) << 6 | 63 & n)) : o <= 244 ? i >= t - 2 ? Je() : (a = e[i++], (192 & a) != 128 || a - 144 + (o << 28) >> 30 != 0 || (192 & (n = e[i++])) != 128 || (192 & (s = e[i++])) != 128 ? (i--, Je()) : (o = (7 & o) << 18 | (63 & a) << 12 | (63 & n) << 6 | 63 & s, o -= 65536, r.push(55296 + (o >> 10 & 1023), 56320 + (1023 & o)))) : Je(), r.length >= 8192 && (c = qs(c, r), r.length = 0);
|
|
1381
|
+
}
|
|
1382
|
+
i = qs(c, r);
|
|
1383
|
+
}
|
|
1384
|
+
return i;
|
|
1385
|
+
}
|
|
1386
|
+
function Xo(e) {
|
|
1387
|
+
const t = Ue(e.g);
|
|
1388
|
+
return zo(e.g, t);
|
|
1389
|
+
}
|
|
1390
|
+
function Xr(e, t, r) {
|
|
1391
|
+
var n = Ue(e.g);
|
|
1392
|
+
for (n = e.g.g + n; e.g.g < n; ) r.push(t(e.g));
|
|
1393
|
+
}
|
|
1394
|
+
var v1 = class {
|
|
1395
|
+
constructor(e, t, r, n) {
|
|
1396
|
+
if (li.length) {
|
|
1397
|
+
const s = li.pop();
|
|
1398
|
+
s.init(e, t, r, n), e = s;
|
|
1399
|
+
} else e = new class {
|
|
1400
|
+
constructor(s, i, o, a) {
|
|
1401
|
+
this.h = null, this.j = !1, this.g = this.l = this.m = 0, this.init(s, i, o, a);
|
|
1402
|
+
}
|
|
1403
|
+
init(s, i, o, { Y: a = !1, ea: c = !1 } = {}) {
|
|
1404
|
+
this.Y = a, this.ea = c, s && (s = ds(s, this.ea), this.h = s.buffer, this.j = s.g, this.m = i || 0, this.l = o !== void 0 ? this.m + o : this.h.length, this.g = this.m);
|
|
1405
|
+
}
|
|
1406
|
+
clear() {
|
|
1407
|
+
this.h = null, this.j = !1, this.g = this.l = this.m = 0, this.Y = !1;
|
|
1408
|
+
}
|
|
1409
|
+
}(e, t, r, n);
|
|
1410
|
+
this.g = e, this.m = this.g.g, this.h = this.l = -1, this.o(n);
|
|
1411
|
+
}
|
|
1412
|
+
o({ ha: e = !1 } = {}) {
|
|
1413
|
+
this.ha = e;
|
|
1414
|
+
}
|
|
1415
|
+
}, Rr = [];
|
|
1416
|
+
function di(e) {
|
|
1417
|
+
return e ? /^\d+$/.test(e) ? (Hr(e), new On(C, N)) : null : b1 || (b1 = new On(0, 0));
|
|
1418
|
+
}
|
|
1419
|
+
var On = class {
|
|
1420
|
+
constructor(e, t) {
|
|
1421
|
+
this.h = e >>> 0, this.g = t >>> 0;
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
let b1;
|
|
1425
|
+
function fi(e) {
|
|
1426
|
+
return e ? /^-?\d+$/.test(e) ? (Hr(e), new Fn(C, N)) : null : w1 || (w1 = new Fn(0, 0));
|
|
1427
|
+
}
|
|
1428
|
+
var Fn = class {
|
|
1429
|
+
constructor(e, t) {
|
|
1430
|
+
this.h = e >>> 0, this.g = t >>> 0;
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
let w1;
|
|
1434
|
+
function wt(e, t, r) {
|
|
1435
|
+
for (; r > 0 || t > 127; ) e.g.push(127 & t | 128), t = (t >>> 7 | r << 25) >>> 0, r >>>= 7;
|
|
1436
|
+
e.g.push(t);
|
|
1437
|
+
}
|
|
1438
|
+
function zt(e, t) {
|
|
1439
|
+
for (; t > 127; ) e.g.push(127 & t | 128), t >>>= 7;
|
|
1440
|
+
e.g.push(t);
|
|
1441
|
+
}
|
|
1442
|
+
function Yr(e, t) {
|
|
1443
|
+
if (t >= 0) zt(e, t);
|
|
1444
|
+
else {
|
|
1445
|
+
for (let r = 0; r < 9; r++) e.g.push(127 & t | 128), t >>= 7;
|
|
1446
|
+
e.g.push(1);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function gs(e) {
|
|
1450
|
+
var t = C;
|
|
1451
|
+
e.g.push(t >>> 0 & 255), e.g.push(t >>> 8 & 255), e.g.push(t >>> 16 & 255), e.g.push(t >>> 24 & 255);
|
|
1452
|
+
}
|
|
1453
|
+
function $t(e, t) {
|
|
1454
|
+
t.length !== 0 && (e.l.push(t), e.h += t.length);
|
|
1455
|
+
}
|
|
1456
|
+
function ye(e, t, r) {
|
|
1457
|
+
zt(e.g, 8 * t + r);
|
|
1458
|
+
}
|
|
1459
|
+
function ms(e, t) {
|
|
1460
|
+
return ye(e, t, 2), t = e.g.end(), $t(e, t), t.push(e.h), t;
|
|
1461
|
+
}
|
|
1462
|
+
function ys(e, t) {
|
|
1463
|
+
var r = t.pop();
|
|
1464
|
+
for (r = e.h + e.g.length() - r; r > 127; ) t.push(127 & r | 128), r >>>= 7, e.h++;
|
|
1465
|
+
t.push(r), e.h++;
|
|
1466
|
+
}
|
|
1467
|
+
function Jr(e, t, r) {
|
|
1468
|
+
ye(e, t, 2), zt(e.g, r.length), $t(e, e.g.end()), $t(e, r);
|
|
1469
|
+
}
|
|
1470
|
+
function Nr(e, t, r, n) {
|
|
1471
|
+
r != null && (t = ms(e, t), n(r, e), ys(e, t));
|
|
1472
|
+
}
|
|
1473
|
+
function xe() {
|
|
1474
|
+
const e = class {
|
|
1475
|
+
constructor() {
|
|
1476
|
+
throw Error();
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
return Object.setPrototypeOf(e, e.prototype), e;
|
|
1480
|
+
}
|
|
1481
|
+
var _s = xe(), Yo = xe(), vs = xe(), bs = xe(), Jo = xe(), Zo = xe(), A1 = xe(), Zr = xe(), Qo = xe(), ea = xe();
|
|
1482
|
+
function Ce(e, t, r) {
|
|
1483
|
+
var n = e.v;
|
|
1484
|
+
ie && ie in n && (n = n[ie]) && delete n[t.g], t.h ? t.j(e, t.h, t.g, r, t.l) : t.j(e, t.g, r, t.l);
|
|
1485
|
+
}
|
|
1486
|
+
var p = class {
|
|
1487
|
+
constructor(e, t) {
|
|
1488
|
+
this.v = Io(e, t, void 0, 2048);
|
|
1489
|
+
}
|
|
1490
|
+
toJSON() {
|
|
1491
|
+
return Fo(this);
|
|
1492
|
+
}
|
|
1493
|
+
j() {
|
|
1494
|
+
var s;
|
|
1495
|
+
var e = sc, t = this.v, r = e.g, n = ie;
|
|
1496
|
+
if (Ut && n && ((s = t[n]) == null ? void 0 : s[r]) != null && St(j2, 3), t = e.g, ei && ie && ei === void 0 && (n = (r = this.v)[ie]) && (n = n.da)) try {
|
|
1497
|
+
n(r, t, l1);
|
|
1498
|
+
} catch (i) {
|
|
1499
|
+
go(i);
|
|
1500
|
+
}
|
|
1501
|
+
return e.h ? e.m(this, e.h, e.g, e.l) : e.m(this, e.g, e.defaultValue, e.l);
|
|
1502
|
+
}
|
|
1503
|
+
clone() {
|
|
1504
|
+
const e = this.v, t = 0 | e[f];
|
|
1505
|
+
return is(this, e, t) ? ns(this, e, !0) : new this.constructor(jt(e, t, !1));
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
p.prototype[Tt] = Lt, p.prototype.toString = function() {
|
|
1509
|
+
return this.v.toString();
|
|
1510
|
+
};
|
|
1511
|
+
var Wt = class {
|
|
1512
|
+
constructor(e, t, r) {
|
|
1513
|
+
this.g = e, this.h = t, e = _s, this.l = !!e && r === e || !1;
|
|
1514
|
+
}
|
|
1515
|
+
};
|
|
1516
|
+
function Qr(e, t) {
|
|
1517
|
+
return new Wt(e, t, _s);
|
|
1518
|
+
}
|
|
1519
|
+
function ta(e, t, r, n, s) {
|
|
1520
|
+
Nr(e, r, ia(t, n), s);
|
|
1521
|
+
}
|
|
1522
|
+
const E1 = Qr((function(e, t, r, n, s) {
|
|
1523
|
+
return e.h === 2 && (br(e, us(t, n, r), s), !0);
|
|
1524
|
+
}), ta), k1 = Qr((function(e, t, r, n, s) {
|
|
1525
|
+
return e.h === 2 && (br(e, us(t, n, r), s), !0);
|
|
1526
|
+
}), ta);
|
|
1527
|
+
var en = Symbol(), tn = Symbol(), In = Symbol(), pi = Symbol(), gi = Symbol();
|
|
1528
|
+
let ra, na;
|
|
1529
|
+
function mt(e, t, r, n) {
|
|
1530
|
+
var s = n[e];
|
|
1531
|
+
if (s) return s;
|
|
1532
|
+
(s = {}).qa = n, s.T = (function(l) {
|
|
1533
|
+
switch (typeof l) {
|
|
1534
|
+
case "boolean":
|
|
1535
|
+
return p1 || (p1 = [0, void 0, !0]);
|
|
1536
|
+
case "number":
|
|
1537
|
+
return l > 0 ? void 0 : l === 0 ? g1 || (g1 = [0, void 0]) : [-l, void 0];
|
|
1538
|
+
case "string":
|
|
1539
|
+
return [0, l];
|
|
1540
|
+
case "object":
|
|
1541
|
+
return l;
|
|
1542
|
+
}
|
|
1543
|
+
})(n[0]);
|
|
1544
|
+
var i = n[1];
|
|
1545
|
+
let o = 1;
|
|
1546
|
+
i && i.constructor === Object && (s.ba = i, typeof (i = n[++o]) == "function" && (s.ma = !0, ra ?? (ra = i), na ?? (na = n[o + 1]), i = n[o += 2]));
|
|
1547
|
+
const a = {};
|
|
1548
|
+
for (; i && Array.isArray(i) && i.length && typeof i[0] == "number" && i[0] > 0; ) {
|
|
1549
|
+
for (var c = 0; c < i.length; c++) a[i[c]] = i;
|
|
1550
|
+
i = n[++o];
|
|
1551
|
+
}
|
|
1552
|
+
for (c = 1; i !== void 0; ) {
|
|
1553
|
+
let l;
|
|
1554
|
+
typeof i == "number" && (c += i, i = n[++o]);
|
|
1555
|
+
var u = void 0;
|
|
1556
|
+
if (i instanceof Wt ? l = i : (l = E1, o--), l == null ? void 0 : l.l) {
|
|
1557
|
+
i = n[++o], u = n;
|
|
1558
|
+
var h = o;
|
|
1559
|
+
typeof i == "function" && (i = i(), u[h] = i), u = i;
|
|
1560
|
+
}
|
|
1561
|
+
for (h = c + 1, typeof (i = n[++o]) == "number" && i < 0 && (h -= i, i = n[++o]); c < h; c++) {
|
|
1562
|
+
const g = a[c];
|
|
1563
|
+
u ? r(s, c, l, u, g) : t(s, c, l, g);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
return n[e] = s;
|
|
1567
|
+
}
|
|
1568
|
+
function sa(e) {
|
|
1569
|
+
return Array.isArray(e) ? e[0] instanceof Wt ? e : [k1, e] : [e, void 0];
|
|
1570
|
+
}
|
|
1571
|
+
function ia(e, t) {
|
|
1572
|
+
return e instanceof p ? e.v : Array.isArray(e) ? st(e, t) : void 0;
|
|
1573
|
+
}
|
|
1574
|
+
function ws(e, t, r, n) {
|
|
1575
|
+
const s = r.g;
|
|
1576
|
+
e[t] = n ? (i, o, a) => s(i, o, a, n) : s;
|
|
1577
|
+
}
|
|
1578
|
+
function As(e, t, r, n, s) {
|
|
1579
|
+
const i = r.g;
|
|
1580
|
+
let o, a;
|
|
1581
|
+
e[t] = (c, u, h) => i(c, u, h, a || (a = mt(tn, ws, As, n).T), o || (o = Es(n)), s);
|
|
1582
|
+
}
|
|
1583
|
+
function Es(e) {
|
|
1584
|
+
let t = e[In];
|
|
1585
|
+
if (t != null) return t;
|
|
1586
|
+
const r = mt(tn, ws, As, e);
|
|
1587
|
+
return t = r.ma ? (n, s) => ra(n, s, r) : (n, s) => {
|
|
1588
|
+
for (; qo(s) && s.h != 4; ) {
|
|
1589
|
+
var i = s.l, o = r[i];
|
|
1590
|
+
if (o == null) {
|
|
1591
|
+
var a = r.ba;
|
|
1592
|
+
a && (a = a[i]) && (a = T1(a)) != null && (o = r[i] = a);
|
|
1593
|
+
}
|
|
1594
|
+
if (o == null || !o(s, n, i)) {
|
|
1595
|
+
if (o = (a = s).m, xr(a), a.ha) var c = void 0;
|
|
1596
|
+
else c = a.g.g - o, a.g.g = o, c = zo(a.g, c);
|
|
1597
|
+
o = void 0, a = n, c && ((o = a[ie] ?? (a[ie] = new Mn()))[i] ?? (o[i] = [])).push(c);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
return (n = Wr(n)) && (n.da = r.qa[gi]), !0;
|
|
1601
|
+
}, e[In] = t, e[gi] = S1.bind(e), t;
|
|
1602
|
+
}
|
|
1603
|
+
function S1(e, t, r, n) {
|
|
1604
|
+
var s = this[tn];
|
|
1605
|
+
const i = this[In], o = st(void 0, s.T), a = Wr(e);
|
|
1606
|
+
if (a) {
|
|
1607
|
+
var c = !1, u = s.ba;
|
|
1608
|
+
if (u) {
|
|
1609
|
+
if (s = (h, l, g) => {
|
|
1610
|
+
if (g.length !== 0) if (u[l]) for (const _ of g) {
|
|
1611
|
+
h = Wo(_);
|
|
1612
|
+
try {
|
|
1613
|
+
c = !0, i(o, h);
|
|
1614
|
+
} finally {
|
|
1615
|
+
Ko(h);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
else n == null || n(e, l, g);
|
|
1619
|
+
}, t == null) Or(a, s);
|
|
1620
|
+
else if (a != null) {
|
|
1621
|
+
const h = a[t];
|
|
1622
|
+
h && s(a, t, h);
|
|
1623
|
+
}
|
|
1624
|
+
if (c) {
|
|
1625
|
+
let h = 0 | e[f];
|
|
1626
|
+
if (2 & h && 2048 & h && !(r != null && r.Ka)) throw Error();
|
|
1627
|
+
const l = Bt(h), g = (_, k) => {
|
|
1628
|
+
if (Ie(e, _, l) != null) {
|
|
1629
|
+
if ((r == null ? void 0 : r.Qa) === 1) return;
|
|
1630
|
+
throw Error();
|
|
1631
|
+
}
|
|
1632
|
+
k != null && (h = D(e, h, _, k, l)), delete a[_];
|
|
1633
|
+
};
|
|
1634
|
+
t == null ? ko(o, 0 | o[f], ((_, k) => {
|
|
1635
|
+
g(_, k);
|
|
1636
|
+
})) : g(t, Ie(o, t, l));
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
function T1(e) {
|
|
1642
|
+
const t = (e = sa(e))[0].g;
|
|
1643
|
+
if (e = e[1]) {
|
|
1644
|
+
const r = Es(e), n = mt(tn, ws, As, e).T;
|
|
1645
|
+
return (s, i, o) => t(s, i, o, n, r);
|
|
1646
|
+
}
|
|
1647
|
+
return t;
|
|
1648
|
+
}
|
|
1649
|
+
function rn(e, t, r) {
|
|
1650
|
+
e[t] = r.h;
|
|
1651
|
+
}
|
|
1652
|
+
function nn(e, t, r, n) {
|
|
1653
|
+
let s, i;
|
|
1654
|
+
const o = r.h;
|
|
1655
|
+
e[t] = (a, c, u) => o(a, c, u, i || (i = mt(en, rn, nn, n).T), s || (s = oa(n)));
|
|
1656
|
+
}
|
|
1657
|
+
function oa(e) {
|
|
1658
|
+
let t = e[pi];
|
|
1659
|
+
if (!t) {
|
|
1660
|
+
const r = mt(en, rn, nn, e);
|
|
1661
|
+
t = (n, s) => aa(n, s, r), e[pi] = t;
|
|
1662
|
+
}
|
|
1663
|
+
return t;
|
|
1664
|
+
}
|
|
1665
|
+
function aa(e, t, r) {
|
|
1666
|
+
ko(e, 0 | e[f], ((n, s) => {
|
|
1667
|
+
if (s != null) {
|
|
1668
|
+
var i = (function(o, a) {
|
|
1669
|
+
var c = o[a];
|
|
1670
|
+
if (c) return c;
|
|
1671
|
+
if ((c = o.ba) && (c = c[a])) {
|
|
1672
|
+
var u = (c = sa(c))[0].h;
|
|
1673
|
+
if (c = c[1]) {
|
|
1674
|
+
const h = oa(c), l = mt(en, rn, nn, c).T;
|
|
1675
|
+
c = o.ma ? na(l, h) : (g, _, k) => u(g, _, k, l, h);
|
|
1676
|
+
} else c = u;
|
|
1677
|
+
return o[a] = c;
|
|
1678
|
+
}
|
|
1679
|
+
})(r, n);
|
|
1680
|
+
i ? i(t, s, n) : n < 500 || St(xn, 3);
|
|
1681
|
+
}
|
|
1682
|
+
})), (e = Wr(e)) && Or(e, ((n, s, i) => {
|
|
1683
|
+
for ($t(t, t.g.end()), n = 0; n < i.length; n++) $t(t, Xn(i[n]) || new Uint8Array(0));
|
|
1684
|
+
}));
|
|
1685
|
+
}
|
|
1686
|
+
const L1 = oe(0);
|
|
1687
|
+
function Kt(e, t) {
|
|
1688
|
+
if (Array.isArray(t)) {
|
|
1689
|
+
var r = 0 | t[f];
|
|
1690
|
+
if (4 & r) return t;
|
|
1691
|
+
for (var n = 0, s = 0; n < t.length; n++) {
|
|
1692
|
+
const i = e(t[n]);
|
|
1693
|
+
i != null && (t[s++] = i);
|
|
1694
|
+
}
|
|
1695
|
+
return s < n && (t.length = s), (e = -1537 & (5 | r)) !== r && V(t, e), 2 & e && Object.freeze(t), t;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
function J(e, t, r) {
|
|
1699
|
+
return new Wt(e, t, r);
|
|
1700
|
+
}
|
|
1701
|
+
function qt(e, t, r) {
|
|
1702
|
+
return new Wt(e, t, r);
|
|
1703
|
+
}
|
|
1704
|
+
function K(e, t, r) {
|
|
1705
|
+
D(e, 0 | e[f], t, r, Bt(0 | e[f]));
|
|
1706
|
+
}
|
|
1707
|
+
var P1 = Qr((function(e, t, r, n, s) {
|
|
1708
|
+
if (e.h !== 2) return !1;
|
|
1709
|
+
if (e = ve(e = br(e, st([void 0, void 0], n), s)), s = Bt(n = 0 | t[f]), 2 & n) throw Error();
|
|
1710
|
+
let i = Ie(t, r, s);
|
|
1711
|
+
if (i instanceof Fe) (2 & i.J) != 0 ? (i = i.V(), i.push(e), D(t, n, r, i, s)) : i.Ma(e);
|
|
1712
|
+
else if (Array.isArray(i)) {
|
|
1713
|
+
var o = 0 | i[f];
|
|
1714
|
+
8192 & o || V(i, o |= 8192), 2 & o && (i = Uo(i), D(t, n, r, i, s)), i.push(e);
|
|
1715
|
+
} else D(t, n, r, cr([e]), s);
|
|
1716
|
+
return !0;
|
|
1717
|
+
}), (function(e, t, r, n, s) {
|
|
1718
|
+
if (t instanceof Fe) t.forEach(((i, o) => {
|
|
1719
|
+
Nr(e, r, st([o, i], n), s);
|
|
1720
|
+
}));
|
|
1721
|
+
else if (Array.isArray(t)) {
|
|
1722
|
+
for (let i = 0; i < t.length; i++) {
|
|
1723
|
+
const o = t[i];
|
|
1724
|
+
Array.isArray(o) && Nr(e, r, st(o, n), s);
|
|
1725
|
+
}
|
|
1726
|
+
cr(t);
|
|
1727
|
+
}
|
|
1728
|
+
}));
|
|
1729
|
+
function ca(e, t, r) {
|
|
1730
|
+
(t = Te(t)) != null && (ye(e, r, 5), e = e.g, Jn(t), gs(e));
|
|
1731
|
+
}
|
|
1732
|
+
function ha(e, t, r) {
|
|
1733
|
+
if (t = (function(n) {
|
|
1734
|
+
if (n == null) return n;
|
|
1735
|
+
const s = typeof n;
|
|
1736
|
+
if (s === "bigint") return String(yr(64, n));
|
|
1737
|
+
if (_r(n)) {
|
|
1738
|
+
if (s === "string") return Co(n);
|
|
1739
|
+
if (s === "number") return ts(n);
|
|
1740
|
+
}
|
|
1741
|
+
})(t), t != null && (typeof t == "string" && fi(t), t != null))
|
|
1742
|
+
switch (ye(e, r, 0), typeof t) {
|
|
1743
|
+
case "number":
|
|
1744
|
+
e = e.g, Pt(t), wt(e, C, N);
|
|
1745
|
+
break;
|
|
1746
|
+
case "bigint":
|
|
1747
|
+
r = BigInt.asUintN(64, t), r = new Fn(Number(r & BigInt(4294967295)), Number(r >> BigInt(32))), wt(e.g, r.h, r.g);
|
|
1748
|
+
break;
|
|
1749
|
+
default:
|
|
1750
|
+
r = fi(t), wt(e.g, r.h, r.g);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
function ua(e, t, r) {
|
|
1754
|
+
(t = Dt(t)) != null && t != null && (ye(e, r, 0), Yr(e.g, t));
|
|
1755
|
+
}
|
|
1756
|
+
function la(e, t, r) {
|
|
1757
|
+
(t = Lo(t)) != null && (ye(e, r, 0), e.g.g.push(t ? 1 : 0));
|
|
1758
|
+
}
|
|
1759
|
+
function da(e, t, r) {
|
|
1760
|
+
(t = q(t)) != null && Jr(e, r, po(t));
|
|
1761
|
+
}
|
|
1762
|
+
function fa(e, t, r, n, s) {
|
|
1763
|
+
Nr(e, r, ia(t, n), s);
|
|
1764
|
+
}
|
|
1765
|
+
function pa(e, t, r) {
|
|
1766
|
+
(t = t == null || typeof t == "string" || t instanceof Le ? t : void 0) != null && Jr(e, r, ds(t, !0).buffer);
|
|
1767
|
+
}
|
|
1768
|
+
function ga(e, t, r) {
|
|
1769
|
+
return (e.h === 5 || e.h === 2) && (t = Ht(t, 0 | t[f], r), e.h == 2 ? Xr(e, Ir, t) : t.push(Ir(e.g)), !0);
|
|
1770
|
+
}
|
|
1771
|
+
var U = J((function(e, t, r) {
|
|
1772
|
+
return e.h === 5 && (K(t, r, Ir(e.g)), !0);
|
|
1773
|
+
}), ca, Zr), x1 = qt(ga, (function(e, t, r) {
|
|
1774
|
+
if ((t = Kt(Te, t)) != null) for (let o = 0; o < t.length; o++) {
|
|
1775
|
+
var n = e, s = r, i = t[o];
|
|
1776
|
+
i != null && (ye(n, s, 5), n = n.g, Jn(i), gs(n));
|
|
1777
|
+
}
|
|
1778
|
+
}), Zr), ks = qt(ga, (function(e, t, r) {
|
|
1779
|
+
if ((t = Kt(Te, t)) != null && t.length) {
|
|
1780
|
+
ye(e, r, 2), zt(e.g, 4 * t.length);
|
|
1781
|
+
for (let n = 0; n < t.length; n++) r = e.g, Jn(t[n]), gs(r);
|
|
1782
|
+
}
|
|
1783
|
+
}), Zr), C1 = J((function(e, t, r) {
|
|
1784
|
+
return e.h === 5 && (K(t, r, (e = Ir(e.g)) === 0 ? void 0 : e), !0);
|
|
1785
|
+
}), ca, Zr), Ke = J((function(e, t, r) {
|
|
1786
|
+
return Wn ? (e.h !== 0 ? e = !1 : (K(t, r, Ct(e.g, To)), e = !0), e) : e.h === 0 && (K(t, r, Ct(e.g, Zn)), !0);
|
|
1787
|
+
}), ha, Zo), _n = J((function(e, t, r) {
|
|
1788
|
+
return Wn ? (e.h !== 0 ? t = !1 : (K(t, r, (e = Ct(e.g, To)) === L1 ? void 0 : e), t = !0), t) : e.h === 0 && (K(t, r, (e = Ct(e.g, Zn)) === 0 ? void 0 : e), !0);
|
|
1789
|
+
}), ha, Zo), $1 = J((function(e, t, r) {
|
|
1790
|
+
return Wn ? (e.h !== 0 ? e = !1 : (K(t, r, Ct(e.g, Q2)), e = !0), e) : e.h === 0 && (K(t, r, Ct(e.g, $n)), !0);
|
|
1791
|
+
}), (function(e, t, r) {
|
|
1792
|
+
if (t = (function(n) {
|
|
1793
|
+
if (n == null) return n;
|
|
1794
|
+
var s = typeof n;
|
|
1795
|
+
if (s === "bigint") return String(e1(64, n));
|
|
1796
|
+
if (_r(n)) {
|
|
1797
|
+
if (s === "string") return s = xt(Number(n)), dt(s) && s >= 0 ? n = String(s) : ((s = n.indexOf(".")) !== -1 && (n = n.substring(0, s)), (s = n[0] !== "-" && ((s = n.length) < 20 || s === 20 && n <= "18446744073709551615")) || (Hr(n), n = hr(C, N))), n;
|
|
1798
|
+
if (s === "number") return (n = xt(n)) >= 0 && dt(n) || (Pt(n), n = $n(C, N)), n;
|
|
1799
|
+
}
|
|
1800
|
+
})(t), t != null && (typeof t == "string" && di(t), t != null))
|
|
1801
|
+
switch (ye(e, r, 0), typeof t) {
|
|
1802
|
+
case "number":
|
|
1803
|
+
e = e.g, Pt(t), wt(e, C, N);
|
|
1804
|
+
break;
|
|
1805
|
+
case "bigint":
|
|
1806
|
+
r = BigInt.asUintN(64, t), r = new On(Number(r & BigInt(4294967295)), Number(r >> BigInt(32))), wt(e.g, r.h, r.g);
|
|
1807
|
+
break;
|
|
1808
|
+
default:
|
|
1809
|
+
r = di(t), wt(e.g, r.h, r.g);
|
|
1810
|
+
}
|
|
1811
|
+
}), A1), W = J((function(e, t, r) {
|
|
1812
|
+
return e.h === 0 && (K(t, r, We(e.g)), !0);
|
|
1813
|
+
}), ua, bs), wr = qt((function(e, t, r) {
|
|
1814
|
+
return (e.h === 0 || e.h === 2) && (t = Ht(t, 0 | t[f], r), e.h == 2 ? Xr(e, We, t) : t.push(We(e.g)), !0);
|
|
1815
|
+
}), (function(e, t, r) {
|
|
1816
|
+
if ((t = Kt(Dt, t)) != null && t.length) {
|
|
1817
|
+
r = ms(e, r);
|
|
1818
|
+
for (let n = 0; n < t.length; n++) Yr(e.g, t[n]);
|
|
1819
|
+
ys(e, r);
|
|
1820
|
+
}
|
|
1821
|
+
}), bs), bt = J((function(e, t, r) {
|
|
1822
|
+
return e.h === 0 && (K(t, r, (e = We(e.g)) === 0 ? void 0 : e), !0);
|
|
1823
|
+
}), ua, bs), R = J((function(e, t, r) {
|
|
1824
|
+
return e.h === 0 && (K(t, r, fs(e.g)), !0);
|
|
1825
|
+
}), la, Yo), ct = J((function(e, t, r) {
|
|
1826
|
+
return e.h === 0 && (K(t, r, (e = fs(e.g)) === !1 ? void 0 : e), !0);
|
|
1827
|
+
}), la, Yo), X = qt((function(e, t, r) {
|
|
1828
|
+
return e.h === 2 && (e = ps(e), Ht(t, 0 | t[f], r).push(e), !0);
|
|
1829
|
+
}), (function(e, t, r) {
|
|
1830
|
+
if ((t = Kt(q, t)) != null) for (let o = 0; o < t.length; o++) {
|
|
1831
|
+
var n = e, s = r, i = t[o];
|
|
1832
|
+
i != null && Jr(n, s, po(i));
|
|
1833
|
+
}
|
|
1834
|
+
}), vs), Ve = J((function(e, t, r) {
|
|
1835
|
+
return e.h === 2 && (K(t, r, (e = ps(e)) === "" ? void 0 : e), !0);
|
|
1836
|
+
}), da, vs), T = J((function(e, t, r) {
|
|
1837
|
+
return e.h === 2 && (K(t, r, ps(e)), !0);
|
|
1838
|
+
}), da, vs), H = (function(e, t, r = _s) {
|
|
1839
|
+
return new Wt(e, t, r);
|
|
1840
|
+
})((function(e, t, r, n, s) {
|
|
1841
|
+
return e.h === 2 && (n = st(void 0, n), Ht(t, 0 | t[f], r).push(n), br(e, n, s), !0);
|
|
1842
|
+
}), (function(e, t, r, n, s) {
|
|
1843
|
+
if (Array.isArray(t)) {
|
|
1844
|
+
for (let i = 0; i < t.length; i++) fa(e, t[i], r, n, s);
|
|
1845
|
+
1 & (e = 0 | t[f]) || V(t, 1 | e);
|
|
1846
|
+
}
|
|
1847
|
+
})), F = Qr((function(e, t, r, n, s, i) {
|
|
1848
|
+
if (e.h !== 2) return !1;
|
|
1849
|
+
let o = 0 | t[f];
|
|
1850
|
+
return Bo(t, o, i, r, Bt(o)), br(e, t = us(t, n, r), s), !0;
|
|
1851
|
+
}), fa), ma = J((function(e, t, r) {
|
|
1852
|
+
return e.h === 2 && (K(t, r, Xo(e)), !0);
|
|
1853
|
+
}), pa, Qo), M1 = qt((function(e, t, r) {
|
|
1854
|
+
return (e.h === 0 || e.h === 2) && (t = Ht(t, 0 | t[f], r), e.h == 2 ? Xr(e, Ue, t) : t.push(Ue(e.g)), !0);
|
|
1855
|
+
}), (function(e, t, r) {
|
|
1856
|
+
if ((t = Kt(Po, t)) != null) for (let o = 0; o < t.length; o++) {
|
|
1857
|
+
var n = e, s = r, i = t[o];
|
|
1858
|
+
i != null && (ye(n, s, 0), zt(n.g, i));
|
|
1859
|
+
}
|
|
1860
|
+
}), Jo), O1 = J((function(e, t, r) {
|
|
1861
|
+
return e.h === 0 && (K(t, r, (e = Ue(e.g)) === 0 ? void 0 : e), !0);
|
|
1862
|
+
}), (function(e, t, r) {
|
|
1863
|
+
(t = Po(t)) != null && t != null && (ye(e, r, 0), zt(e.g, t));
|
|
1864
|
+
}), Jo), he = J((function(e, t, r) {
|
|
1865
|
+
return e.h === 0 && (K(t, r, We(e.g)), !0);
|
|
1866
|
+
}), (function(e, t, r) {
|
|
1867
|
+
(t = Dt(t)) != null && (t = parseInt(t, 10), ye(e, r, 0), Yr(e.g, t));
|
|
1868
|
+
}), ea);
|
|
1869
|
+
class F1 {
|
|
1870
|
+
constructor(t, r) {
|
|
1871
|
+
var n = le;
|
|
1872
|
+
this.g = t, this.h = r, this.m = A, this.j = v, this.defaultValue = void 0, this.l = n.Oa != null ? So : void 0;
|
|
1873
|
+
}
|
|
1874
|
+
register() {
|
|
1875
|
+
jr(this);
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
function $e(e, t) {
|
|
1879
|
+
return new F1(e, t);
|
|
1880
|
+
}
|
|
1881
|
+
function Xe(e, t) {
|
|
1882
|
+
return (r, n) => {
|
|
1883
|
+
{
|
|
1884
|
+
const i = { ea: !0 };
|
|
1885
|
+
n && Object.assign(i, n), r = Wo(r, void 0, void 0, i);
|
|
1886
|
+
try {
|
|
1887
|
+
const o = new e(), a = o.v;
|
|
1888
|
+
Es(t)(a, r);
|
|
1889
|
+
var s = o;
|
|
1890
|
+
} finally {
|
|
1891
|
+
Ko(r);
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
return s;
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
function sn(e) {
|
|
1898
|
+
return function() {
|
|
1899
|
+
const t = new class {
|
|
1900
|
+
constructor() {
|
|
1901
|
+
this.l = [], this.h = 0, this.g = new class {
|
|
1902
|
+
constructor() {
|
|
1903
|
+
this.g = [];
|
|
1904
|
+
}
|
|
1905
|
+
length() {
|
|
1906
|
+
return this.g.length;
|
|
1907
|
+
}
|
|
1908
|
+
end() {
|
|
1909
|
+
const o = this.g;
|
|
1910
|
+
return this.g = [], o;
|
|
1911
|
+
}
|
|
1912
|
+
}();
|
|
1913
|
+
}
|
|
1914
|
+
}();
|
|
1915
|
+
aa(this.v, t, mt(en, rn, nn, e)), $t(t, t.g.end());
|
|
1916
|
+
const r = new Uint8Array(t.h), n = t.l, s = n.length;
|
|
1917
|
+
let i = 0;
|
|
1918
|
+
for (let o = 0; o < s; o++) {
|
|
1919
|
+
const a = n[o];
|
|
1920
|
+
r.set(a, i), i += a.length;
|
|
1921
|
+
}
|
|
1922
|
+
return t.l = [r], r;
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
var mi = class extends p {
|
|
1926
|
+
constructor(e) {
|
|
1927
|
+
super(e);
|
|
1928
|
+
}
|
|
1929
|
+
}, yi = [0, Ve, J((function(e, t, r) {
|
|
1930
|
+
return e.h === 2 && (K(t, r, (e = Xo(e)) === ut() ? void 0 : e), !0);
|
|
1931
|
+
}), (function(e, t, r) {
|
|
1932
|
+
if (t != null) {
|
|
1933
|
+
if (t instanceof p) {
|
|
1934
|
+
const n = t.Ra;
|
|
1935
|
+
return void (n ? (t = n(t), t != null && Jr(e, r, ds(t, !0).buffer)) : St(xn, 3));
|
|
1936
|
+
}
|
|
1937
|
+
if (Array.isArray(t)) return void St(xn, 3);
|
|
1938
|
+
}
|
|
1939
|
+
pa(e, t, r);
|
|
1940
|
+
}), Qo)];
|
|
1941
|
+
let vn, _i = globalThis.trustedTypes;
|
|
1942
|
+
function vi(e) {
|
|
1943
|
+
var t;
|
|
1944
|
+
return vn === void 0 && (vn = (function() {
|
|
1945
|
+
let r = null;
|
|
1946
|
+
if (!_i) return r;
|
|
1947
|
+
try {
|
|
1948
|
+
const n = (s) => s;
|
|
1949
|
+
r = _i.createPolicy("goog#html", { createHTML: n, createScript: n, createScriptURL: n });
|
|
1950
|
+
} catch {
|
|
1951
|
+
}
|
|
1952
|
+
return r;
|
|
1953
|
+
})()), e = (t = vn) ? t.createScriptURL(e) : e, new class {
|
|
1954
|
+
constructor(r) {
|
|
1955
|
+
this.g = r;
|
|
1956
|
+
}
|
|
1957
|
+
toString() {
|
|
1958
|
+
return this.g + "";
|
|
1959
|
+
}
|
|
1960
|
+
}(e);
|
|
1961
|
+
}
|
|
1962
|
+
function I1(e, ...t) {
|
|
1963
|
+
if (t.length === 0) return vi(e[0]);
|
|
1964
|
+
let r = e[0];
|
|
1965
|
+
for (let n = 0; n < t.length; n++) r += encodeURIComponent(t[n]) + e[n + 1];
|
|
1966
|
+
return vi(r);
|
|
1967
|
+
}
|
|
1968
|
+
var ya = [0, W, he, R, -1, wr, he, -1, R], R1 = class extends p {
|
|
1969
|
+
constructor(e) {
|
|
1970
|
+
super(e);
|
|
1971
|
+
}
|
|
1972
|
+
}, _a = [0, R, T, R, he, -1, qt((function(e, t, r) {
|
|
1973
|
+
return (e.h === 0 || e.h === 2) && (t = Ht(t, 0 | t[f], r), e.h == 2 ? Xr(e, _1, t) : t.push(We(e.g)), !0);
|
|
1974
|
+
}), (function(e, t, r) {
|
|
1975
|
+
if ((t = Kt(Dt, t)) != null && t.length) {
|
|
1976
|
+
r = ms(e, r);
|
|
1977
|
+
for (let n = 0; n < t.length; n++) Yr(e.g, t[n]);
|
|
1978
|
+
ys(e, r);
|
|
1979
|
+
}
|
|
1980
|
+
}), ea), T, -1, [0, R, -1], he, R, -1], va = [0, 3, R, -1, 2, [0, W], [0, he, R], [0, T, -1], [0]], ba = [0, T, -2], bi = class extends p {
|
|
1981
|
+
constructor(e) {
|
|
1982
|
+
super(e);
|
|
1983
|
+
}
|
|
1984
|
+
}, wa = [0], Aa = [0, W, R, 1, R, -4], le = class extends p {
|
|
1985
|
+
constructor(e) {
|
|
1986
|
+
super(e, 2);
|
|
1987
|
+
}
|
|
1988
|
+
}, j = {};
|
|
1989
|
+
j[336783863] = [0, T, R, -1, W, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], F, wa, F, _a, F, ba, F, Aa, F, ya, F, [0, T, -2], F, [0, T, he], F, va, F, [0, he, -1, R]], [0, T], R, [0, [1, 3], [2, 4], F, [0, wr], -1, F, [0, X], -1, H, [0, T, -1]], T];
|
|
1990
|
+
var wi = [0, _n, -1, ct, -3, _n, wr, Ve, bt, _n, -1, ct, bt, ct, -2, Ve];
|
|
1991
|
+
function x(e, t) {
|
|
1992
|
+
qr(e, 3, t);
|
|
1993
|
+
}
|
|
1994
|
+
function b(e, t) {
|
|
1995
|
+
qr(e, 4, t);
|
|
1996
|
+
}
|
|
1997
|
+
var Q = class extends p {
|
|
1998
|
+
constructor(e) {
|
|
1999
|
+
super(e, 500);
|
|
2000
|
+
}
|
|
2001
|
+
o(e) {
|
|
2002
|
+
return v(this, 0, 7, e);
|
|
2003
|
+
}
|
|
2004
|
+
}, rr = [-1, {}], Ai = [0, T, 1, rr], Ei = [0, T, X, rr];
|
|
2005
|
+
function _e(e, t) {
|
|
2006
|
+
ls(e, 1, Q, t);
|
|
2007
|
+
}
|
|
2008
|
+
function $(e, t) {
|
|
2009
|
+
qr(e, 10, t);
|
|
2010
|
+
}
|
|
2011
|
+
function E(e, t) {
|
|
2012
|
+
qr(e, 15, t);
|
|
2013
|
+
}
|
|
2014
|
+
var de = class extends p {
|
|
2015
|
+
constructor(e) {
|
|
2016
|
+
super(e, 500);
|
|
2017
|
+
}
|
|
2018
|
+
o(e) {
|
|
2019
|
+
return v(this, 0, 1001, e);
|
|
2020
|
+
}
|
|
2021
|
+
}, Ea = [-500, H, [-500, Ve, -1, X, -3, [-2, j, R], H, yi, bt, -1, Ai, Ei, H, [0, Ve, ct], Ve, wi, bt, X, 987, X], 4, H, [-500, T, -1, [-1, {}], 998, T], H, [-500, T, X, -1, [-2, {}, R], 997, X, -1], bt, H, [-500, T, X, rr, 998, X], X, bt, Ai, Ei, H, [0, Ve, -1, rr], X, -2, wi, Ve, -1, ct, [0, ct, O1], 978, rr, H, yi];
|
|
2022
|
+
de.prototype.g = sn(Ea);
|
|
2023
|
+
var N1 = Xe(de, Ea), U1 = class extends p {
|
|
2024
|
+
constructor(e) {
|
|
2025
|
+
super(e);
|
|
2026
|
+
}
|
|
2027
|
+
}, ka = class extends p {
|
|
2028
|
+
constructor(e) {
|
|
2029
|
+
super(e);
|
|
2030
|
+
}
|
|
2031
|
+
g() {
|
|
2032
|
+
return Re(this, U1, 1);
|
|
2033
|
+
}
|
|
2034
|
+
}, Sa = [0, H, [0, W, U, T, -1]], on = Xe(ka, Sa), B1 = class extends p {
|
|
2035
|
+
constructor(e) {
|
|
2036
|
+
super(e);
|
|
2037
|
+
}
|
|
2038
|
+
}, D1 = class extends p {
|
|
2039
|
+
constructor(e) {
|
|
2040
|
+
super(e);
|
|
2041
|
+
}
|
|
2042
|
+
}, bn = class extends p {
|
|
2043
|
+
constructor(e) {
|
|
2044
|
+
super(e);
|
|
2045
|
+
}
|
|
2046
|
+
l() {
|
|
2047
|
+
return A(this, B1, 2);
|
|
2048
|
+
}
|
|
2049
|
+
g() {
|
|
2050
|
+
return Re(this, D1, 5);
|
|
2051
|
+
}
|
|
2052
|
+
}, Ta = Xe(class extends p {
|
|
2053
|
+
constructor(e) {
|
|
2054
|
+
super(e);
|
|
2055
|
+
}
|
|
2056
|
+
}, [0, X, wr, ks, [0, he, [0, W, -3], [0, U, -3], [0, W, -1, [0, H, [0, W, -2]]], H, [0, U, -1, T, U]], T, -1, Ke, H, [0, W, U], X, Ke]), La = class extends p {
|
|
2057
|
+
constructor(e) {
|
|
2058
|
+
super(e);
|
|
2059
|
+
}
|
|
2060
|
+
}, At = Xe(class extends p {
|
|
2061
|
+
constructor(e) {
|
|
2062
|
+
super(e);
|
|
2063
|
+
}
|
|
2064
|
+
}, [0, H, [0, U, -4]]), Pa = class extends p {
|
|
2065
|
+
constructor(e) {
|
|
2066
|
+
super(e);
|
|
2067
|
+
}
|
|
2068
|
+
}, Ar = Xe(class extends p {
|
|
2069
|
+
constructor(e) {
|
|
2070
|
+
super(e);
|
|
2071
|
+
}
|
|
2072
|
+
}, [0, H, [0, U, -4]]), j1 = class extends p {
|
|
2073
|
+
constructor(e) {
|
|
2074
|
+
super(e);
|
|
2075
|
+
}
|
|
2076
|
+
}, V1 = [0, W, -1, ks, he], xa = class extends p {
|
|
2077
|
+
constructor(e) {
|
|
2078
|
+
super(e);
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
xa.prototype.g = sn([0, U, -4, Ke]);
|
|
2082
|
+
var G1 = class extends p {
|
|
2083
|
+
constructor(e) {
|
|
2084
|
+
super(e);
|
|
2085
|
+
}
|
|
2086
|
+
}, H1 = Xe(class extends p {
|
|
2087
|
+
constructor(e) {
|
|
2088
|
+
super(e);
|
|
2089
|
+
}
|
|
2090
|
+
}, [0, H, [0, 1, W, T, Sa], Ke]), ki = class extends p {
|
|
2091
|
+
constructor(e) {
|
|
2092
|
+
super(e);
|
|
2093
|
+
}
|
|
2094
|
+
}, z1 = class extends p {
|
|
2095
|
+
constructor(e) {
|
|
2096
|
+
super(e);
|
|
2097
|
+
}
|
|
2098
|
+
na() {
|
|
2099
|
+
const e = P(this, 1, void 0, void 0, No);
|
|
2100
|
+
return e ?? ut();
|
|
2101
|
+
}
|
|
2102
|
+
}, W1 = class extends p {
|
|
2103
|
+
constructor(e) {
|
|
2104
|
+
super(e);
|
|
2105
|
+
}
|
|
2106
|
+
}, Ca = [1, 2], K1 = Xe(class extends p {
|
|
2107
|
+
constructor(e) {
|
|
2108
|
+
super(e);
|
|
2109
|
+
}
|
|
2110
|
+
}, [0, H, [0, Ca, F, [0, ks], F, [0, ma], W, T], Ke]), Ss = class extends p {
|
|
2111
|
+
constructor(e) {
|
|
2112
|
+
super(e);
|
|
2113
|
+
}
|
|
2114
|
+
}, $a = [0, T, W, U, X, -1], Si = class extends p {
|
|
2115
|
+
constructor(e) {
|
|
2116
|
+
super(e);
|
|
2117
|
+
}
|
|
2118
|
+
}, q1 = [0, R, -1], Ti = class extends p {
|
|
2119
|
+
constructor(e) {
|
|
2120
|
+
super(e);
|
|
2121
|
+
}
|
|
2122
|
+
}, Cr = [1, 2, 3, 4, 5, 6], Ur = class extends p {
|
|
2123
|
+
constructor(e) {
|
|
2124
|
+
super(e);
|
|
2125
|
+
}
|
|
2126
|
+
g() {
|
|
2127
|
+
return P(this, 1, void 0, void 0, No) != null;
|
|
2128
|
+
}
|
|
2129
|
+
l() {
|
|
2130
|
+
return q(P(this, 2)) != null;
|
|
2131
|
+
}
|
|
2132
|
+
}, O = class extends p {
|
|
2133
|
+
constructor(e) {
|
|
2134
|
+
super(e);
|
|
2135
|
+
}
|
|
2136
|
+
g() {
|
|
2137
|
+
return Lo(P(this, 2)) ?? !1;
|
|
2138
|
+
}
|
|
2139
|
+
}, Ma = [0, ma, T, [0, W, Ke, -1], [0, $1, Ke]], B = [0, Ma, R, [0, Cr, F, Aa, F, _a, F, ya, F, wa, F, ba, F, va], he], an = class extends p {
|
|
2140
|
+
constructor(e) {
|
|
2141
|
+
super(e);
|
|
2142
|
+
}
|
|
2143
|
+
}, Ts = [0, B, U, -1, W], X1 = $e(502141897, an);
|
|
2144
|
+
j[502141897] = Ts;
|
|
2145
|
+
var Y1 = Xe(class extends p {
|
|
2146
|
+
constructor(e) {
|
|
2147
|
+
super(e);
|
|
2148
|
+
}
|
|
2149
|
+
}, [0, [0, he, -1, x1, M1], V1]), Oa = class extends p {
|
|
2150
|
+
constructor(e) {
|
|
2151
|
+
super(e);
|
|
2152
|
+
}
|
|
2153
|
+
}, Fa = class extends p {
|
|
2154
|
+
constructor(e) {
|
|
2155
|
+
super(e);
|
|
2156
|
+
}
|
|
2157
|
+
}, Rn = [0, B, U, [0, B], R], J1 = $e(508968150, Fa);
|
|
2158
|
+
j[508968150] = [0, B, Ts, Rn, U, [0, [0, Ma]]], j[508968149] = Rn;
|
|
2159
|
+
var _t = class extends p {
|
|
2160
|
+
constructor(e) {
|
|
2161
|
+
super(e);
|
|
2162
|
+
}
|
|
2163
|
+
l() {
|
|
2164
|
+
return A(this, Ss, 2);
|
|
2165
|
+
}
|
|
2166
|
+
g() {
|
|
2167
|
+
S(this, 2);
|
|
2168
|
+
}
|
|
2169
|
+
}, Ia = [0, B, $a];
|
|
2170
|
+
j[478825465] = Ia;
|
|
2171
|
+
var Z1 = class extends p {
|
|
2172
|
+
constructor(e) {
|
|
2173
|
+
super(e);
|
|
2174
|
+
}
|
|
2175
|
+
}, Ra = class extends p {
|
|
2176
|
+
constructor(e) {
|
|
2177
|
+
super(e);
|
|
2178
|
+
}
|
|
2179
|
+
}, Ls = class extends p {
|
|
2180
|
+
constructor(e) {
|
|
2181
|
+
super(e);
|
|
2182
|
+
}
|
|
2183
|
+
}, Ps = class extends p {
|
|
2184
|
+
constructor(e) {
|
|
2185
|
+
super(e);
|
|
2186
|
+
}
|
|
2187
|
+
}, Na = class extends p {
|
|
2188
|
+
constructor(e) {
|
|
2189
|
+
super(e);
|
|
2190
|
+
}
|
|
2191
|
+
}, Li = [0, B, [0, B], Ia, -1], Ua = [0, B, U, W], xs = [0, B, U], Ba = [0, B, Ua, xs, U], Q1 = $e(479097054, Na);
|
|
2192
|
+
j[479097054] = [0, B, Ba, Li], j[463370452] = Li, j[464864288] = Ua;
|
|
2193
|
+
var ec = $e(462713202, Ps);
|
|
2194
|
+
j[462713202] = Ba, j[474472470] = xs;
|
|
2195
|
+
var tc = class extends p {
|
|
2196
|
+
constructor(e) {
|
|
2197
|
+
super(e);
|
|
2198
|
+
}
|
|
2199
|
+
}, Da = class extends p {
|
|
2200
|
+
constructor(e) {
|
|
2201
|
+
super(e);
|
|
2202
|
+
}
|
|
2203
|
+
}, ja = class extends p {
|
|
2204
|
+
constructor(e) {
|
|
2205
|
+
super(e);
|
|
2206
|
+
}
|
|
2207
|
+
}, Va = class extends p {
|
|
2208
|
+
constructor(e) {
|
|
2209
|
+
super(e);
|
|
2210
|
+
}
|
|
2211
|
+
}, Cs = [0, B, U, -1, W], Nn = [0, B, U, R];
|
|
2212
|
+
Va.prototype.g = sn([0, B, xs, [0, B], Ts, Rn, Cs, Nn]);
|
|
2213
|
+
var Ga = class extends p {
|
|
2214
|
+
constructor(e) {
|
|
2215
|
+
super(e);
|
|
2216
|
+
}
|
|
2217
|
+
}, rc = $e(456383383, Ga);
|
|
2218
|
+
j[456383383] = [0, B, $a];
|
|
2219
|
+
var Ha = class extends p {
|
|
2220
|
+
constructor(e) {
|
|
2221
|
+
super(e);
|
|
2222
|
+
}
|
|
2223
|
+
}, nc = $e(476348187, Ha);
|
|
2224
|
+
j[476348187] = [0, B, q1];
|
|
2225
|
+
var za = class extends p {
|
|
2226
|
+
constructor(e) {
|
|
2227
|
+
super(e);
|
|
2228
|
+
}
|
|
2229
|
+
}, Pi = class extends p {
|
|
2230
|
+
constructor(e) {
|
|
2231
|
+
super(e);
|
|
2232
|
+
}
|
|
2233
|
+
}, Wa = [0, he, -1], sc = $e(458105876, class extends p {
|
|
2234
|
+
constructor(e) {
|
|
2235
|
+
super(e);
|
|
2236
|
+
}
|
|
2237
|
+
g() {
|
|
2238
|
+
let e;
|
|
2239
|
+
var t = this.v;
|
|
2240
|
+
const r = 0 | t[f];
|
|
2241
|
+
return e = ae(this, r), t = (function(n, s, i, o) {
|
|
2242
|
+
var a = Pi;
|
|
2243
|
+
!o && Vt(n) && (i = 0 | (s = n.v)[f]);
|
|
2244
|
+
var c = Ie(s, 2);
|
|
2245
|
+
if (n = !1, c == null) {
|
|
2246
|
+
if (o) return ci();
|
|
2247
|
+
c = [];
|
|
2248
|
+
} else if (c.constructor === Fe) {
|
|
2249
|
+
if (!(2 & c.J) || o) return c;
|
|
2250
|
+
c = c.V();
|
|
2251
|
+
} else Array.isArray(c) ? n = !!(2 & (0 | c[f])) : c = [];
|
|
2252
|
+
if (o) {
|
|
2253
|
+
if (!c.length) return ci();
|
|
2254
|
+
n || (n = !0, mr(c));
|
|
2255
|
+
} else n && (n = !1, cr(c), c = Uo(c));
|
|
2256
|
+
return !n && 32 & i && gr(c, 32), i = D(s, i, 2, o = new Fe(c, a, s1, void 0)), n || gt(s, i), o;
|
|
2257
|
+
})(this, t, r, e), !e && Pi && (t.ra = !0), t;
|
|
2258
|
+
}
|
|
2259
|
+
});
|
|
2260
|
+
j[458105876] = [0, Wa, P1, [!0, Ke, [0, T, -1, X]], [0, wr, R, he]];
|
|
2261
|
+
var $s = class extends p {
|
|
2262
|
+
constructor(e) {
|
|
2263
|
+
super(e);
|
|
2264
|
+
}
|
|
2265
|
+
}, Ka = $e(458105758, $s);
|
|
2266
|
+
j[458105758] = [0, B, T, Wa];
|
|
2267
|
+
var wn = class extends p {
|
|
2268
|
+
constructor(e) {
|
|
2269
|
+
super(e);
|
|
2270
|
+
}
|
|
2271
|
+
}, xi = [0, C1, -1, ct], ic = class extends p {
|
|
2272
|
+
constructor(e) {
|
|
2273
|
+
super(e);
|
|
2274
|
+
}
|
|
2275
|
+
}, qa = class extends p {
|
|
2276
|
+
constructor(e) {
|
|
2277
|
+
super(e);
|
|
2278
|
+
}
|
|
2279
|
+
}, Un = [1, 2];
|
|
2280
|
+
qa.prototype.g = sn([0, Un, F, xi, F, [0, H, xi]]);
|
|
2281
|
+
var Xa = class extends p {
|
|
2282
|
+
constructor(e) {
|
|
2283
|
+
super(e);
|
|
2284
|
+
}
|
|
2285
|
+
}, oc = $e(443442058, Xa);
|
|
2286
|
+
j[443442058] = [0, B, T, W, U, X, -1, R, U], j[514774813] = Cs;
|
|
2287
|
+
var Ya = class extends p {
|
|
2288
|
+
constructor(e) {
|
|
2289
|
+
super(e);
|
|
2290
|
+
}
|
|
2291
|
+
}, ac = $e(516587230, Ya);
|
|
2292
|
+
function Bn(e, t) {
|
|
2293
|
+
return t = t ? t.clone() : new Ss(), e.displayNamesLocale !== void 0 ? S(t, 1, vr(e.displayNamesLocale)) : e.displayNamesLocale === void 0 && S(t, 1), e.maxResults !== void 0 ? Ne(t, 2, e.maxResults) : "maxResults" in e && S(t, 2), e.scoreThreshold !== void 0 ? y(t, 3, e.scoreThreshold) : "scoreThreshold" in e && S(t, 3), e.categoryAllowlist !== void 0 ? Fr(t, 4, e.categoryAllowlist) : "categoryAllowlist" in e && S(t, 4), e.categoryDenylist !== void 0 ? Fr(t, 5, e.categoryDenylist) : "categoryDenylist" in e && S(t, 5), t;
|
|
2294
|
+
}
|
|
2295
|
+
function Ja(e) {
|
|
2296
|
+
const t = Number(e);
|
|
2297
|
+
return Number.isSafeInteger(t) ? t : String(e);
|
|
2298
|
+
}
|
|
2299
|
+
function Ms(e, t = -1, r = "") {
|
|
2300
|
+
return { categories: e.map(((n) => ({ index: me(n, 1) ?? 0 ?? -1, score: I(n, 2) ?? 0, categoryName: q(P(n, 3)) ?? "" ?? "", displayName: q(P(n, 4)) ?? "" ?? "" }))), headIndex: t, headName: r };
|
|
2301
|
+
}
|
|
2302
|
+
function cc(e) {
|
|
2303
|
+
const t = { classifications: Re(e, G1, 1).map(((r) => {
|
|
2304
|
+
var n;
|
|
2305
|
+
return Ms(((n = A(r, ka, 4)) == null ? void 0 : n.g()) ?? [], me(r, 2) ?? 0, q(P(r, 3)) ?? "");
|
|
2306
|
+
})) };
|
|
2307
|
+
return (function(r) {
|
|
2308
|
+
return n1(Kn ? P(r, 2, void 0, void 0, Mr) : P(r, 2));
|
|
2309
|
+
})(e) != null && (t.timestampMs = Ja(Go(e))), t;
|
|
2310
|
+
}
|
|
2311
|
+
function Za(e) {
|
|
2312
|
+
var o, a;
|
|
2313
|
+
var t = rt(e, 3, Te, tt()), r = rt(e, 2, Dt, tt()), n = rt(e, 1, q, tt()), s = rt(e, 9, q, tt());
|
|
2314
|
+
const i = { categories: [], keypoints: [] };
|
|
2315
|
+
for (let c = 0; c < t.length; c++) i.categories.push({ score: t[c], index: r[c] ?? -1, categoryName: n[c] ?? "", displayName: s[c] ?? "" });
|
|
2316
|
+
if ((t = (o = A(e, bn, 4)) == null ? void 0 : o.l()) && (i.boundingBox = { originX: me(t, 1, Be) ?? 0, originY: me(t, 2, Be) ?? 0, width: me(t, 3, Be) ?? 0, height: me(t, 4, Be) ?? 0, angle: 0 }), (a = A(e, bn, 4)) == null ? void 0 : a.g().length) for (const c of A(e, bn, 4).g()) i.keypoints.push({ x: P(c, 1, void 0, Be, Te) ?? 0, y: P(c, 2, void 0, Be, Te) ?? 0, score: P(c, 4, void 0, Be, Te) ?? 0, label: q(P(c, 3, void 0, Be)) ?? "" });
|
|
2317
|
+
return i;
|
|
2318
|
+
}
|
|
2319
|
+
function cn(e) {
|
|
2320
|
+
const t = [];
|
|
2321
|
+
for (const r of Re(e, Pa, 1)) t.push({ x: I(r, 1) ?? 0, y: I(r, 2) ?? 0, z: I(r, 3) ?? 0, visibility: I(r, 4) ?? 0 });
|
|
2322
|
+
return t;
|
|
2323
|
+
}
|
|
2324
|
+
function nr(e) {
|
|
2325
|
+
const t = [];
|
|
2326
|
+
for (const r of Re(e, La, 1)) t.push({ x: I(r, 1) ?? 0, y: I(r, 2) ?? 0, z: I(r, 3) ?? 0, visibility: I(r, 4) ?? 0 });
|
|
2327
|
+
return t;
|
|
2328
|
+
}
|
|
2329
|
+
function Ci(e) {
|
|
2330
|
+
return Array.from(e, ((t) => t > 127 ? t - 256 : t));
|
|
2331
|
+
}
|
|
2332
|
+
function $i(e, t) {
|
|
2333
|
+
if (e.length !== t.length) throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);
|
|
2334
|
+
let r = 0, n = 0, s = 0;
|
|
2335
|
+
for (let i = 0; i < e.length; i++) r += e[i] * t[i], n += e[i] * e[i], s += t[i] * t[i];
|
|
2336
|
+
if (n <= 0 || s <= 0) throw Error("Cannot compute cosine similarity on embedding with 0 norm.");
|
|
2337
|
+
return r / Math.sqrt(n * s);
|
|
2338
|
+
}
|
|
2339
|
+
let Sr;
|
|
2340
|
+
j[516587230] = [0, B, Cs, Nn, U], j[518928384] = Nn;
|
|
2341
|
+
const hc = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11]);
|
|
2342
|
+
async function Qa() {
|
|
2343
|
+
if (Sr === void 0) try {
|
|
2344
|
+
await WebAssembly.instantiate(hc), Sr = !0;
|
|
2345
|
+
} catch {
|
|
2346
|
+
Sr = !1;
|
|
2347
|
+
}
|
|
2348
|
+
return Sr;
|
|
2349
|
+
}
|
|
2350
|
+
async function Jt(e, t = I1``) {
|
|
2351
|
+
const r = await Qa() ? "wasm_internal" : "wasm_nosimd_internal";
|
|
2352
|
+
return { wasmLoaderPath: `${t}/${e}_${r}.js`, wasmBinaryPath: `${t}/${e}_${r}.wasm` };
|
|
2353
|
+
}
|
|
2354
|
+
var et = class {
|
|
2355
|
+
};
|
|
2356
|
+
function e2() {
|
|
2357
|
+
var e = navigator;
|
|
2358
|
+
return typeof OffscreenCanvas < "u" && (!(function(t = navigator) {
|
|
2359
|
+
return (t = t.userAgent).includes("Safari") && !t.includes("Chrome");
|
|
2360
|
+
})(e) || !!((e = e.userAgent.match(/Version\/([\d]+).*Safari/)) && e.length >= 1 && Number(e[1]) >= 17));
|
|
2361
|
+
}
|
|
2362
|
+
async function Mi(e) {
|
|
2363
|
+
if (typeof importScripts != "function") {
|
|
2364
|
+
const t = document.createElement("script");
|
|
2365
|
+
return t.src = e.toString(), t.crossOrigin = "anonymous", new Promise(((r, n) => {
|
|
2366
|
+
t.addEventListener("load", (() => {
|
|
2367
|
+
r();
|
|
2368
|
+
}), !1), t.addEventListener("error", ((s) => {
|
|
2369
|
+
n(s);
|
|
2370
|
+
}), !1), document.body.appendChild(t);
|
|
2371
|
+
}));
|
|
2372
|
+
}
|
|
2373
|
+
try {
|
|
2374
|
+
importScripts(e.toString());
|
|
2375
|
+
} catch (t) {
|
|
2376
|
+
if (!(t instanceof TypeError)) throw t;
|
|
2377
|
+
await self.import(e.toString());
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
function t2(e) {
|
|
2381
|
+
return e.videoWidth !== void 0 ? [e.videoWidth, e.videoHeight] : e.naturalWidth !== void 0 ? [e.naturalWidth, e.naturalHeight] : e.displayWidth !== void 0 ? [e.displayWidth, e.displayHeight] : [e.width, e.height];
|
|
2382
|
+
}
|
|
2383
|
+
function m(e, t, r) {
|
|
2384
|
+
e.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"), r(t = e.i.stringToNewUTF8(t)), e.i._free(t);
|
|
2385
|
+
}
|
|
2386
|
+
function Oi(e, t, r) {
|
|
2387
|
+
if (!e.i.canvas) throw Error("No OpenGL canvas configured.");
|
|
2388
|
+
if (r ? e.i._bindTextureToStream(r) : e.i._bindTextureToCanvas(), !(r = e.i.canvas.getContext("webgl2") || e.i.canvas.getContext("webgl"))) throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");
|
|
2389
|
+
e.i.gpuOriginForWebTexturesIsBottomLeft && r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, !0), r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, r.RGBA, r.UNSIGNED_BYTE, t), e.i.gpuOriginForWebTexturesIsBottomLeft && r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, !1);
|
|
2390
|
+
const [n, s] = t2(t);
|
|
2391
|
+
return !e.l || n === e.i.canvas.width && s === e.i.canvas.height || (e.i.canvas.width = n, e.i.canvas.height = s), [n, s];
|
|
2392
|
+
}
|
|
2393
|
+
function Fi(e, t, r) {
|
|
2394
|
+
e.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");
|
|
2395
|
+
const n = new Uint32Array(t.length);
|
|
2396
|
+
for (let s = 0; s < t.length; s++) n[s] = e.i.stringToNewUTF8(t[s]);
|
|
2397
|
+
t = e.i._malloc(4 * n.length), e.i.HEAPU32.set(n, t >> 2), r(t);
|
|
2398
|
+
for (const s of n) e.i._free(s);
|
|
2399
|
+
e.i._free(t);
|
|
2400
|
+
}
|
|
2401
|
+
function Ee(e, t, r) {
|
|
2402
|
+
e.i.simpleListeners = e.i.simpleListeners || {}, e.i.simpleListeners[t] = r;
|
|
2403
|
+
}
|
|
2404
|
+
function De(e, t, r) {
|
|
2405
|
+
let n = [];
|
|
2406
|
+
e.i.simpleListeners = e.i.simpleListeners || {}, e.i.simpleListeners[t] = (s, i, o) => {
|
|
2407
|
+
i ? (r(n, o), n = []) : n.push(s);
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
et.forVisionTasks = function(e) {
|
|
2411
|
+
return Jt("vision", e);
|
|
2412
|
+
}, et.forTextTasks = function(e) {
|
|
2413
|
+
return Jt("text", e);
|
|
2414
|
+
}, et.forGenAiExperimentalTasks = function(e) {
|
|
2415
|
+
return Jt("genai_experimental", e);
|
|
2416
|
+
}, et.forGenAiTasks = function(e) {
|
|
2417
|
+
return Jt("genai", e);
|
|
2418
|
+
}, et.forAudioTasks = function(e) {
|
|
2419
|
+
return Jt("audio", e);
|
|
2420
|
+
}, et.isSimdSupported = function() {
|
|
2421
|
+
return Qa();
|
|
2422
|
+
};
|
|
2423
|
+
async function uc(e, t, r, n) {
|
|
2424
|
+
return e = await (async (s, i, o, a, c) => {
|
|
2425
|
+
if (i && await Mi(i), !self.ModuleFactory || o && (await Mi(o), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
|
|
2426
|
+
return self.Module && c && ((i = self.Module).locateFile = c.locateFile, c.mainScriptUrlOrBlob && (i.mainScriptUrlOrBlob = c.mainScriptUrlOrBlob)), c = await self.ModuleFactory(self.Module || c), self.ModuleFactory = self.Module = void 0, new s(c, a);
|
|
2427
|
+
})(e, r.wasmLoaderPath, r.assetLoaderPath, t, { locateFile: (s) => s.endsWith(".wasm") ? r.wasmBinaryPath.toString() : r.assetBinaryPath && s.endsWith(".data") ? r.assetBinaryPath.toString() : s }), await e.o(n), e;
|
|
2428
|
+
}
|
|
2429
|
+
function An(e, t) {
|
|
2430
|
+
const r = A(e.baseOptions, Ur, 1) || new Ur();
|
|
2431
|
+
typeof t == "string" ? (S(r, 2, vr(t)), S(r, 1)) : t instanceof Uint8Array && (S(r, 1, Yn(t, !1)), S(r, 2)), v(e.baseOptions, 0, 1, r);
|
|
2432
|
+
}
|
|
2433
|
+
function Ii(e) {
|
|
2434
|
+
try {
|
|
2435
|
+
const t = e.H.length;
|
|
2436
|
+
if (t === 1) throw Error(e.H[0].message);
|
|
2437
|
+
if (t > 1) throw Error("Encountered multiple errors: " + e.H.map(((r) => r.message)).join(", "));
|
|
2438
|
+
} finally {
|
|
2439
|
+
e.H = [];
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
function d(e, t) {
|
|
2443
|
+
e.C = Math.max(e.C, t);
|
|
2444
|
+
}
|
|
2445
|
+
function hn(e, t) {
|
|
2446
|
+
e.B = new Q(), ce(e.B, 2, "PassThroughCalculator"), x(e.B, "free_memory"), b(e.B, "free_memory_unused_out"), $(t, "free_memory"), _e(t, e.B);
|
|
2447
|
+
}
|
|
2448
|
+
function Mt(e, t) {
|
|
2449
|
+
x(e.B, t), b(e.B, t + "_unused_out");
|
|
2450
|
+
}
|
|
2451
|
+
function un(e) {
|
|
2452
|
+
e.g.addBoolToStream(!0, "free_memory", e.C);
|
|
2453
|
+
}
|
|
2454
|
+
var Dn = class {
|
|
2455
|
+
constructor(e) {
|
|
2456
|
+
this.g = e, this.H = [], this.C = 0, this.g.setAutoRenderToScreen(!1);
|
|
2457
|
+
}
|
|
2458
|
+
l(e, t = !0) {
|
|
2459
|
+
var r, n, s, i, o, a;
|
|
2460
|
+
if (t) {
|
|
2461
|
+
const c = e.baseOptions || {};
|
|
2462
|
+
if ((r = e.baseOptions) != null && r.modelAssetBuffer && ((n = e.baseOptions) != null && n.modelAssetPath)) throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");
|
|
2463
|
+
if (!((s = A(this.baseOptions, Ur, 1)) != null && s.g() || (i = A(this.baseOptions, Ur, 1)) != null && i.l() || (o = e.baseOptions) != null && o.modelAssetBuffer || (a = e.baseOptions) != null && a.modelAssetPath)) throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");
|
|
2464
|
+
if ((function(u, h) {
|
|
2465
|
+
let l = A(u.baseOptions, Ti, 3);
|
|
2466
|
+
if (!l) {
|
|
2467
|
+
var g = l = new Ti(), _ = new bi();
|
|
2468
|
+
tr(g, 4, Cr, _);
|
|
2469
|
+
}
|
|
2470
|
+
"delegate" in h && (h.delegate === "GPU" ? (h = l, g = new R1(), tr(h, 2, Cr, g)) : (h = l, g = new bi(), tr(h, 4, Cr, g))), v(u.baseOptions, 0, 3, l);
|
|
2471
|
+
})(this, c), c.modelAssetPath) return fetch(c.modelAssetPath.toString()).then(((u) => {
|
|
2472
|
+
if (u.ok) return u.arrayBuffer();
|
|
2473
|
+
throw Error(`Failed to fetch model: ${c.modelAssetPath} (${u.status})`);
|
|
2474
|
+
})).then(((u) => {
|
|
2475
|
+
try {
|
|
2476
|
+
this.g.i.FS_unlink("/model.dat");
|
|
2477
|
+
} catch {
|
|
2478
|
+
}
|
|
2479
|
+
this.g.i.FS_createDataFile("/", "model.dat", new Uint8Array(u), !0, !1, !1), An(this, "/model.dat"), this.m(), this.L();
|
|
2480
|
+
}));
|
|
2481
|
+
if (c.modelAssetBuffer instanceof Uint8Array) An(this, c.modelAssetBuffer);
|
|
2482
|
+
else if (c.modelAssetBuffer) return (async function(u) {
|
|
2483
|
+
const h = [];
|
|
2484
|
+
for (var l = 0; ; ) {
|
|
2485
|
+
const { done: g, value: _ } = await u.read();
|
|
2486
|
+
if (g) break;
|
|
2487
|
+
h.push(_), l += _.length;
|
|
2488
|
+
}
|
|
2489
|
+
if (h.length === 0) return new Uint8Array(0);
|
|
2490
|
+
if (h.length === 1) return h[0];
|
|
2491
|
+
u = new Uint8Array(l), l = 0;
|
|
2492
|
+
for (const g of h) u.set(g, l), l += g.length;
|
|
2493
|
+
return u;
|
|
2494
|
+
})(c.modelAssetBuffer).then(((u) => {
|
|
2495
|
+
An(this, u), this.m(), this.L();
|
|
2496
|
+
}));
|
|
2497
|
+
}
|
|
2498
|
+
return this.m(), this.L(), Promise.resolve();
|
|
2499
|
+
}
|
|
2500
|
+
L() {
|
|
2501
|
+
}
|
|
2502
|
+
ca() {
|
|
2503
|
+
let e;
|
|
2504
|
+
if (this.g.ca(((t) => {
|
|
2505
|
+
e = N1(t);
|
|
2506
|
+
})), !e) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
2507
|
+
return e;
|
|
2508
|
+
}
|
|
2509
|
+
setGraph(e, t) {
|
|
2510
|
+
this.g.attachErrorListener(((r, n) => {
|
|
2511
|
+
this.H.push(Error(n));
|
|
2512
|
+
})), this.g.Ja(), this.g.setGraph(e, t), this.B = void 0, Ii(this);
|
|
2513
|
+
}
|
|
2514
|
+
finishProcessing() {
|
|
2515
|
+
this.g.finishProcessing(), Ii(this);
|
|
2516
|
+
}
|
|
2517
|
+
close() {
|
|
2518
|
+
this.B = void 0, this.g.closeGraph();
|
|
2519
|
+
}
|
|
2520
|
+
};
|
|
2521
|
+
function He(e, t) {
|
|
2522
|
+
if (!e) throw Error(`Unable to obtain required WebGL resource: ${t}`);
|
|
2523
|
+
return e;
|
|
2524
|
+
}
|
|
2525
|
+
Dn.prototype.close = Dn.prototype.close;
|
|
2526
|
+
class lc {
|
|
2527
|
+
constructor(t, r, n, s) {
|
|
2528
|
+
this.g = t, this.h = r, this.m = n, this.l = s;
|
|
2529
|
+
}
|
|
2530
|
+
bind() {
|
|
2531
|
+
this.g.bindVertexArray(this.h);
|
|
2532
|
+
}
|
|
2533
|
+
close() {
|
|
2534
|
+
this.g.deleteVertexArray(this.h), this.g.deleteBuffer(this.m), this.g.deleteBuffer(this.l);
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
function Ri(e, t, r) {
|
|
2538
|
+
const n = e.g;
|
|
2539
|
+
if (r = He(n.createShader(r), "Failed to create WebGL shader"), n.shaderSource(r, t), n.compileShader(r), !n.getShaderParameter(r, n.COMPILE_STATUS)) throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);
|
|
2540
|
+
return n.attachShader(e.h, r), r;
|
|
2541
|
+
}
|
|
2542
|
+
function Ni(e, t) {
|
|
2543
|
+
const r = e.g, n = He(r.createVertexArray(), "Failed to create vertex array");
|
|
2544
|
+
r.bindVertexArray(n);
|
|
2545
|
+
const s = He(r.createBuffer(), "Failed to create buffer");
|
|
2546
|
+
r.bindBuffer(r.ARRAY_BUFFER, s), r.enableVertexAttribArray(e.O), r.vertexAttribPointer(e.O, 2, r.FLOAT, !1, 0, 0), r.bufferData(r.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), r.STATIC_DRAW);
|
|
2547
|
+
const i = He(r.createBuffer(), "Failed to create buffer");
|
|
2548
|
+
return r.bindBuffer(r.ARRAY_BUFFER, i), r.enableVertexAttribArray(e.L), r.vertexAttribPointer(e.L, 2, r.FLOAT, !1, 0, 0), r.bufferData(r.ARRAY_BUFFER, new Float32Array(t ? [0, 1, 0, 0, 1, 0, 1, 1] : [0, 0, 0, 1, 1, 1, 1, 0]), r.STATIC_DRAW), r.bindBuffer(r.ARRAY_BUFFER, null), r.bindVertexArray(null), new lc(r, n, s, i);
|
|
2549
|
+
}
|
|
2550
|
+
function Os(e, t) {
|
|
2551
|
+
if (e.g) {
|
|
2552
|
+
if (t !== e.g) throw Error("Cannot change GL context once initialized");
|
|
2553
|
+
} else e.g = t;
|
|
2554
|
+
}
|
|
2555
|
+
function dc(e, t, r, n) {
|
|
2556
|
+
return Os(e, t), e.h || (e.m(), e.D()), r ? (e.u || (e.u = Ni(e, !0)), r = e.u) : (e.A || (e.A = Ni(e, !1)), r = e.A), t.useProgram(e.h), r.bind(), e.l(), e = n(), r.g.bindVertexArray(null), e;
|
|
2557
|
+
}
|
|
2558
|
+
function r2(e, t, r) {
|
|
2559
|
+
return Os(e, t), e = He(t.createTexture(), "Failed to create texture"), t.bindTexture(t.TEXTURE_2D, e), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, r ?? t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, r ?? t.LINEAR), t.bindTexture(t.TEXTURE_2D, null), e;
|
|
2560
|
+
}
|
|
2561
|
+
function n2(e, t, r) {
|
|
2562
|
+
Os(e, t), e.B || (e.B = He(t.createFramebuffer(), "Failed to create framebuffe.")), t.bindFramebuffer(t.FRAMEBUFFER, e.B), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, r, 0);
|
|
2563
|
+
}
|
|
2564
|
+
function fc(e) {
|
|
2565
|
+
var t;
|
|
2566
|
+
(t = e.g) == null || t.bindFramebuffer(e.g.FRAMEBUFFER, null);
|
|
2567
|
+
}
|
|
2568
|
+
var s2 = class {
|
|
2569
|
+
H() {
|
|
2570
|
+
return `
|
|
2571
|
+
precision mediump float;
|
|
2572
|
+
varying vec2 vTex;
|
|
2573
|
+
uniform sampler2D inputTexture;
|
|
2574
|
+
void main() {
|
|
2575
|
+
gl_FragColor = texture2D(inputTexture, vTex);
|
|
2576
|
+
}
|
|
2577
|
+
`;
|
|
2578
|
+
}
|
|
2579
|
+
m() {
|
|
2580
|
+
const e = this.g;
|
|
2581
|
+
if (this.h = He(e.createProgram(), "Failed to create WebGL program"), this.X = Ri(this, `
|
|
2582
|
+
attribute vec2 aVertex;
|
|
2583
|
+
attribute vec2 aTex;
|
|
2584
|
+
varying vec2 vTex;
|
|
2585
|
+
void main(void) {
|
|
2586
|
+
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
2587
|
+
vTex = aTex;
|
|
2588
|
+
}`, e.VERTEX_SHADER), this.W = Ri(this, this.H(), e.FRAGMENT_SHADER), e.linkProgram(this.h), !e.getProgramParameter(this.h, e.LINK_STATUS)) throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);
|
|
2589
|
+
this.O = e.getAttribLocation(this.h, "aVertex"), this.L = e.getAttribLocation(this.h, "aTex");
|
|
2590
|
+
}
|
|
2591
|
+
D() {
|
|
2592
|
+
}
|
|
2593
|
+
l() {
|
|
2594
|
+
}
|
|
2595
|
+
close() {
|
|
2596
|
+
if (this.h) {
|
|
2597
|
+
const e = this.g;
|
|
2598
|
+
e.deleteProgram(this.h), e.deleteShader(this.X), e.deleteShader(this.W);
|
|
2599
|
+
}
|
|
2600
|
+
this.B && this.g.deleteFramebuffer(this.B), this.A && this.A.close(), this.u && this.u.close();
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
function Oe(e, t) {
|
|
2604
|
+
switch (t) {
|
|
2605
|
+
case 0:
|
|
2606
|
+
return e.g.find(((r) => r instanceof Uint8Array));
|
|
2607
|
+
case 1:
|
|
2608
|
+
return e.g.find(((r) => r instanceof Float32Array));
|
|
2609
|
+
case 2:
|
|
2610
|
+
return e.g.find(((r) => typeof WebGLTexture < "u" && r instanceof WebGLTexture));
|
|
2611
|
+
default:
|
|
2612
|
+
throw Error(`Type is not supported: ${t}`);
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
function jn(e) {
|
|
2616
|
+
var t = Oe(e, 1);
|
|
2617
|
+
if (!t) {
|
|
2618
|
+
if (t = Oe(e, 0)) t = new Float32Array(t).map(((n) => n / 255));
|
|
2619
|
+
else {
|
|
2620
|
+
t = new Float32Array(e.width * e.height);
|
|
2621
|
+
const n = Ot(e);
|
|
2622
|
+
var r = Fs(e);
|
|
2623
|
+
if (n2(r, n, i2(e)), "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "document" in self && "ontouchend" in self.document) {
|
|
2624
|
+
r = new Float32Array(e.width * e.height * 4), n.readPixels(0, 0, e.width, e.height, n.RGBA, n.FLOAT, r);
|
|
2625
|
+
for (let s = 0, i = 0; s < t.length; ++s, i += 4) t[s] = r[i];
|
|
2626
|
+
} else n.readPixels(0, 0, e.width, e.height, n.RED, n.FLOAT, t);
|
|
2627
|
+
}
|
|
2628
|
+
e.g.push(t);
|
|
2629
|
+
}
|
|
2630
|
+
return t;
|
|
2631
|
+
}
|
|
2632
|
+
function i2(e) {
|
|
2633
|
+
let t = Oe(e, 2);
|
|
2634
|
+
if (!t) {
|
|
2635
|
+
const r = Ot(e);
|
|
2636
|
+
t = a2(e);
|
|
2637
|
+
const n = jn(e), s = o2(e);
|
|
2638
|
+
r.texImage2D(r.TEXTURE_2D, 0, s, e.width, e.height, 0, r.RED, r.FLOAT, n), Vn(e);
|
|
2639
|
+
}
|
|
2640
|
+
return t;
|
|
2641
|
+
}
|
|
2642
|
+
function Ot(e) {
|
|
2643
|
+
if (!e.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
|
|
2644
|
+
return e.h || (e.h = He(e.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), e.h;
|
|
2645
|
+
}
|
|
2646
|
+
function o2(e) {
|
|
2647
|
+
if (e = Ot(e), !Tr) if (e.getExtension("EXT_color_buffer_float") && e.getExtension("OES_texture_float_linear") && e.getExtension("EXT_float_blend")) Tr = e.R32F;
|
|
2648
|
+
else {
|
|
2649
|
+
if (!e.getExtension("EXT_color_buffer_half_float")) throw Error("GPU does not fully support 4-channel float32 or float16 formats");
|
|
2650
|
+
Tr = e.R16F;
|
|
2651
|
+
}
|
|
2652
|
+
return Tr;
|
|
2653
|
+
}
|
|
2654
|
+
function Fs(e) {
|
|
2655
|
+
return e.l || (e.l = new s2()), e.l;
|
|
2656
|
+
}
|
|
2657
|
+
function a2(e) {
|
|
2658
|
+
const t = Ot(e);
|
|
2659
|
+
t.viewport(0, 0, e.width, e.height), t.activeTexture(t.TEXTURE0);
|
|
2660
|
+
let r = Oe(e, 2);
|
|
2661
|
+
return r || (r = r2(Fs(e), t, e.m ? t.LINEAR : t.NEAREST), e.g.push(r), e.j = !0), t.bindTexture(t.TEXTURE_2D, r), r;
|
|
2662
|
+
}
|
|
2663
|
+
function Vn(e) {
|
|
2664
|
+
e.h.bindTexture(e.h.TEXTURE_2D, null);
|
|
2665
|
+
}
|
|
2666
|
+
var Tr, G = class {
|
|
2667
|
+
constructor(e, t, r, n, s, i, o) {
|
|
2668
|
+
this.g = e, this.m = t, this.j = r, this.canvas = n, this.l = s, this.width = i, this.height = o, this.j && --Ui === 0 && console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.");
|
|
2669
|
+
}
|
|
2670
|
+
Fa() {
|
|
2671
|
+
return !!Oe(this, 0);
|
|
2672
|
+
}
|
|
2673
|
+
ka() {
|
|
2674
|
+
return !!Oe(this, 1);
|
|
2675
|
+
}
|
|
2676
|
+
R() {
|
|
2677
|
+
return !!Oe(this, 2);
|
|
2678
|
+
}
|
|
2679
|
+
ja() {
|
|
2680
|
+
return (t = Oe(e = this, 0)) || (t = jn(e), t = new Uint8Array(t.map(((r) => Math.round(255 * r)))), e.g.push(t)), t;
|
|
2681
|
+
var e, t;
|
|
2682
|
+
}
|
|
2683
|
+
ia() {
|
|
2684
|
+
return jn(this);
|
|
2685
|
+
}
|
|
2686
|
+
N() {
|
|
2687
|
+
return i2(this);
|
|
2688
|
+
}
|
|
2689
|
+
clone() {
|
|
2690
|
+
const e = [];
|
|
2691
|
+
for (const t of this.g) {
|
|
2692
|
+
let r;
|
|
2693
|
+
if (t instanceof Uint8Array) r = new Uint8Array(t);
|
|
2694
|
+
else if (t instanceof Float32Array) r = new Float32Array(t);
|
|
2695
|
+
else {
|
|
2696
|
+
if (!(t instanceof WebGLTexture)) throw Error(`Type is not supported: ${t}`);
|
|
2697
|
+
{
|
|
2698
|
+
const n = Ot(this), s = Fs(this);
|
|
2699
|
+
n.activeTexture(n.TEXTURE1), r = r2(s, n, this.m ? n.LINEAR : n.NEAREST), n.bindTexture(n.TEXTURE_2D, r);
|
|
2700
|
+
const i = o2(this);
|
|
2701
|
+
n.texImage2D(n.TEXTURE_2D, 0, i, this.width, this.height, 0, n.RED, n.FLOAT, null), n.bindTexture(n.TEXTURE_2D, null), n2(s, n, r), dc(s, n, !1, (() => {
|
|
2702
|
+
a2(this), n.clearColor(0, 0, 0, 0), n.clear(n.COLOR_BUFFER_BIT), n.drawArrays(n.TRIANGLE_FAN, 0, 4), Vn(this);
|
|
2703
|
+
})), fc(s), Vn(this);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
e.push(r);
|
|
2707
|
+
}
|
|
2708
|
+
return new G(e, this.m, this.R(), this.canvas, this.l, this.width, this.height);
|
|
2709
|
+
}
|
|
2710
|
+
close() {
|
|
2711
|
+
this.j && Ot(this).deleteTexture(Oe(this, 2)), Ui = -1;
|
|
2712
|
+
}
|
|
2713
|
+
};
|
|
2714
|
+
G.prototype.close = G.prototype.close, G.prototype.clone = G.prototype.clone, G.prototype.getAsWebGLTexture = G.prototype.N, G.prototype.getAsFloat32Array = G.prototype.ia, G.prototype.getAsUint8Array = G.prototype.ja, G.prototype.hasWebGLTexture = G.prototype.R, G.prototype.hasFloat32Array = G.prototype.ka, G.prototype.hasUint8Array = G.prototype.Fa;
|
|
2715
|
+
var Ui = 250;
|
|
2716
|
+
function be(...e) {
|
|
2717
|
+
return e.map((([t, r]) => ({ start: t, end: r })));
|
|
2718
|
+
}
|
|
2719
|
+
const pc = /* @__PURE__ */ (function(e) {
|
|
2720
|
+
return class extends e {
|
|
2721
|
+
Ja() {
|
|
2722
|
+
this.i._registerModelResourcesGraphService();
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
})((Bi = class {
|
|
2726
|
+
constructor(e, t) {
|
|
2727
|
+
this.l = !0, this.i = e, this.g = null, this.h = 0, this.m = typeof this.i._addIntToInputStream == "function", t !== void 0 ? this.i.canvas = t : e2() ? this.i.canvas = new OffscreenCanvas(1, 1) : (console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."), this.i.canvas = document.createElement("canvas"));
|
|
2728
|
+
}
|
|
2729
|
+
async initializeGraph(e) {
|
|
2730
|
+
const t = await (await fetch(e)).arrayBuffer();
|
|
2731
|
+
e = !(e.endsWith(".pbtxt") || e.endsWith(".textproto")), this.setGraph(new Uint8Array(t), e);
|
|
2732
|
+
}
|
|
2733
|
+
setGraphFromString(e) {
|
|
2734
|
+
this.setGraph(new TextEncoder().encode(e), !1);
|
|
2735
|
+
}
|
|
2736
|
+
setGraph(e, t) {
|
|
2737
|
+
const r = e.length, n = this.i._malloc(r);
|
|
2738
|
+
this.i.HEAPU8.set(e, n), t ? this.i._changeBinaryGraph(r, n) : this.i._changeTextGraph(r, n), this.i._free(n);
|
|
2739
|
+
}
|
|
2740
|
+
configureAudio(e, t, r, n, s) {
|
|
2741
|
+
this.i._configureAudio || console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'), m(this, n || "input_audio", ((i) => {
|
|
2742
|
+
m(this, s = s || "audio_header", ((o) => {
|
|
2743
|
+
this.i._configureAudio(i, o, e, t ?? 0, r);
|
|
2744
|
+
}));
|
|
2745
|
+
}));
|
|
2746
|
+
}
|
|
2747
|
+
setAutoResizeCanvas(e) {
|
|
2748
|
+
this.l = e;
|
|
2749
|
+
}
|
|
2750
|
+
setAutoRenderToScreen(e) {
|
|
2751
|
+
this.i._setAutoRenderToScreen(e);
|
|
2752
|
+
}
|
|
2753
|
+
setGpuBufferVerticalFlip(e) {
|
|
2754
|
+
this.i.gpuOriginForWebTexturesIsBottomLeft = e;
|
|
2755
|
+
}
|
|
2756
|
+
ca(e) {
|
|
2757
|
+
Ee(this, "__graph_config__", ((t) => {
|
|
2758
|
+
e(t);
|
|
2759
|
+
})), m(this, "__graph_config__", ((t) => {
|
|
2760
|
+
this.i._getGraphConfig(t, void 0);
|
|
2761
|
+
})), delete this.i.simpleListeners.__graph_config__;
|
|
2762
|
+
}
|
|
2763
|
+
attachErrorListener(e) {
|
|
2764
|
+
this.i.errorListener = e;
|
|
2765
|
+
}
|
|
2766
|
+
attachEmptyPacketListener(e, t) {
|
|
2767
|
+
this.i.emptyPacketListeners = this.i.emptyPacketListeners || {}, this.i.emptyPacketListeners[e] = t;
|
|
2768
|
+
}
|
|
2769
|
+
addAudioToStream(e, t, r) {
|
|
2770
|
+
this.addAudioToStreamWithShape(e, 0, 0, t, r);
|
|
2771
|
+
}
|
|
2772
|
+
addAudioToStreamWithShape(e, t, r, n, s) {
|
|
2773
|
+
const i = 4 * e.length;
|
|
2774
|
+
this.h !== i && (this.g && this.i._free(this.g), this.g = this.i._malloc(i), this.h = i), this.i.HEAPF32.set(e, this.g / 4), m(this, n, ((o) => {
|
|
2775
|
+
this.i._addAudioToInputStream(this.g, t, r, o, s);
|
|
2776
|
+
}));
|
|
2777
|
+
}
|
|
2778
|
+
addGpuBufferToStream(e, t, r) {
|
|
2779
|
+
m(this, t, ((n) => {
|
|
2780
|
+
const [s, i] = Oi(this, e, n);
|
|
2781
|
+
this.i._addBoundTextureToStream(n, s, i, r);
|
|
2782
|
+
}));
|
|
2783
|
+
}
|
|
2784
|
+
addBoolToStream(e, t, r) {
|
|
2785
|
+
m(this, t, ((n) => {
|
|
2786
|
+
this.i._addBoolToInputStream(e, n, r);
|
|
2787
|
+
}));
|
|
2788
|
+
}
|
|
2789
|
+
addDoubleToStream(e, t, r) {
|
|
2790
|
+
m(this, t, ((n) => {
|
|
2791
|
+
this.i._addDoubleToInputStream(e, n, r);
|
|
2792
|
+
}));
|
|
2793
|
+
}
|
|
2794
|
+
addFloatToStream(e, t, r) {
|
|
2795
|
+
m(this, t, ((n) => {
|
|
2796
|
+
this.i._addFloatToInputStream(e, n, r);
|
|
2797
|
+
}));
|
|
2798
|
+
}
|
|
2799
|
+
addIntToStream(e, t, r) {
|
|
2800
|
+
m(this, t, ((n) => {
|
|
2801
|
+
this.i._addIntToInputStream(e, n, r);
|
|
2802
|
+
}));
|
|
2803
|
+
}
|
|
2804
|
+
addUintToStream(e, t, r) {
|
|
2805
|
+
m(this, t, ((n) => {
|
|
2806
|
+
this.i._addUintToInputStream(e, n, r);
|
|
2807
|
+
}));
|
|
2808
|
+
}
|
|
2809
|
+
addStringToStream(e, t, r) {
|
|
2810
|
+
m(this, t, ((n) => {
|
|
2811
|
+
m(this, e, ((s) => {
|
|
2812
|
+
this.i._addStringToInputStream(s, n, r);
|
|
2813
|
+
}));
|
|
2814
|
+
}));
|
|
2815
|
+
}
|
|
2816
|
+
addStringRecordToStream(e, t, r) {
|
|
2817
|
+
m(this, t, ((n) => {
|
|
2818
|
+
Fi(this, Object.keys(e), ((s) => {
|
|
2819
|
+
Fi(this, Object.values(e), ((i) => {
|
|
2820
|
+
this.i._addFlatHashMapToInputStream(s, i, Object.keys(e).length, n, r);
|
|
2821
|
+
}));
|
|
2822
|
+
}));
|
|
2823
|
+
}));
|
|
2824
|
+
}
|
|
2825
|
+
addProtoToStream(e, t, r, n) {
|
|
2826
|
+
m(this, r, ((s) => {
|
|
2827
|
+
m(this, t, ((i) => {
|
|
2828
|
+
const o = this.i._malloc(e.length);
|
|
2829
|
+
this.i.HEAPU8.set(e, o), this.i._addProtoToInputStream(o, e.length, i, s, n), this.i._free(o);
|
|
2830
|
+
}));
|
|
2831
|
+
}));
|
|
2832
|
+
}
|
|
2833
|
+
addEmptyPacketToStream(e, t) {
|
|
2834
|
+
m(this, e, ((r) => {
|
|
2835
|
+
this.i._addEmptyPacketToInputStream(r, t);
|
|
2836
|
+
}));
|
|
2837
|
+
}
|
|
2838
|
+
addBoolVectorToStream(e, t, r) {
|
|
2839
|
+
m(this, t, ((n) => {
|
|
2840
|
+
const s = this.i._allocateBoolVector(e.length);
|
|
2841
|
+
if (!s) throw Error("Unable to allocate new bool vector on heap.");
|
|
2842
|
+
for (const i of e) this.i._addBoolVectorEntry(s, i);
|
|
2843
|
+
this.i._addBoolVectorToInputStream(s, n, r);
|
|
2844
|
+
}));
|
|
2845
|
+
}
|
|
2846
|
+
addDoubleVectorToStream(e, t, r) {
|
|
2847
|
+
m(this, t, ((n) => {
|
|
2848
|
+
const s = this.i._allocateDoubleVector(e.length);
|
|
2849
|
+
if (!s) throw Error("Unable to allocate new double vector on heap.");
|
|
2850
|
+
for (const i of e) this.i._addDoubleVectorEntry(s, i);
|
|
2851
|
+
this.i._addDoubleVectorToInputStream(s, n, r);
|
|
2852
|
+
}));
|
|
2853
|
+
}
|
|
2854
|
+
addFloatVectorToStream(e, t, r) {
|
|
2855
|
+
m(this, t, ((n) => {
|
|
2856
|
+
const s = this.i._allocateFloatVector(e.length);
|
|
2857
|
+
if (!s) throw Error("Unable to allocate new float vector on heap.");
|
|
2858
|
+
for (const i of e) this.i._addFloatVectorEntry(s, i);
|
|
2859
|
+
this.i._addFloatVectorToInputStream(s, n, r);
|
|
2860
|
+
}));
|
|
2861
|
+
}
|
|
2862
|
+
addIntVectorToStream(e, t, r) {
|
|
2863
|
+
m(this, t, ((n) => {
|
|
2864
|
+
const s = this.i._allocateIntVector(e.length);
|
|
2865
|
+
if (!s) throw Error("Unable to allocate new int vector on heap.");
|
|
2866
|
+
for (const i of e) this.i._addIntVectorEntry(s, i);
|
|
2867
|
+
this.i._addIntVectorToInputStream(s, n, r);
|
|
2868
|
+
}));
|
|
2869
|
+
}
|
|
2870
|
+
addUintVectorToStream(e, t, r) {
|
|
2871
|
+
m(this, t, ((n) => {
|
|
2872
|
+
const s = this.i._allocateUintVector(e.length);
|
|
2873
|
+
if (!s) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2874
|
+
for (const i of e) this.i._addUintVectorEntry(s, i);
|
|
2875
|
+
this.i._addUintVectorToInputStream(s, n, r);
|
|
2876
|
+
}));
|
|
2877
|
+
}
|
|
2878
|
+
addStringVectorToStream(e, t, r) {
|
|
2879
|
+
m(this, t, ((n) => {
|
|
2880
|
+
const s = this.i._allocateStringVector(e.length);
|
|
2881
|
+
if (!s) throw Error("Unable to allocate new string vector on heap.");
|
|
2882
|
+
for (const i of e) m(this, i, ((o) => {
|
|
2883
|
+
this.i._addStringVectorEntry(s, o);
|
|
2884
|
+
}));
|
|
2885
|
+
this.i._addStringVectorToInputStream(s, n, r);
|
|
2886
|
+
}));
|
|
2887
|
+
}
|
|
2888
|
+
addBoolToInputSidePacket(e, t) {
|
|
2889
|
+
m(this, t, ((r) => {
|
|
2890
|
+
this.i._addBoolToInputSidePacket(e, r);
|
|
2891
|
+
}));
|
|
2892
|
+
}
|
|
2893
|
+
addDoubleToInputSidePacket(e, t) {
|
|
2894
|
+
m(this, t, ((r) => {
|
|
2895
|
+
this.i._addDoubleToInputSidePacket(e, r);
|
|
2896
|
+
}));
|
|
2897
|
+
}
|
|
2898
|
+
addFloatToInputSidePacket(e, t) {
|
|
2899
|
+
m(this, t, ((r) => {
|
|
2900
|
+
this.i._addFloatToInputSidePacket(e, r);
|
|
2901
|
+
}));
|
|
2902
|
+
}
|
|
2903
|
+
addIntToInputSidePacket(e, t) {
|
|
2904
|
+
m(this, t, ((r) => {
|
|
2905
|
+
this.i._addIntToInputSidePacket(e, r);
|
|
2906
|
+
}));
|
|
2907
|
+
}
|
|
2908
|
+
addUintToInputSidePacket(e, t) {
|
|
2909
|
+
m(this, t, ((r) => {
|
|
2910
|
+
this.i._addUintToInputSidePacket(e, r);
|
|
2911
|
+
}));
|
|
2912
|
+
}
|
|
2913
|
+
addStringToInputSidePacket(e, t) {
|
|
2914
|
+
m(this, t, ((r) => {
|
|
2915
|
+
m(this, e, ((n) => {
|
|
2916
|
+
this.i._addStringToInputSidePacket(n, r);
|
|
2917
|
+
}));
|
|
2918
|
+
}));
|
|
2919
|
+
}
|
|
2920
|
+
addProtoToInputSidePacket(e, t, r) {
|
|
2921
|
+
m(this, r, ((n) => {
|
|
2922
|
+
m(this, t, ((s) => {
|
|
2923
|
+
const i = this.i._malloc(e.length);
|
|
2924
|
+
this.i.HEAPU8.set(e, i), this.i._addProtoToInputSidePacket(i, e.length, s, n), this.i._free(i);
|
|
2925
|
+
}));
|
|
2926
|
+
}));
|
|
2927
|
+
}
|
|
2928
|
+
addBoolVectorToInputSidePacket(e, t) {
|
|
2929
|
+
m(this, t, ((r) => {
|
|
2930
|
+
const n = this.i._allocateBoolVector(e.length);
|
|
2931
|
+
if (!n) throw Error("Unable to allocate new bool vector on heap.");
|
|
2932
|
+
for (const s of e) this.i._addBoolVectorEntry(n, s);
|
|
2933
|
+
this.i._addBoolVectorToInputSidePacket(n, r);
|
|
2934
|
+
}));
|
|
2935
|
+
}
|
|
2936
|
+
addDoubleVectorToInputSidePacket(e, t) {
|
|
2937
|
+
m(this, t, ((r) => {
|
|
2938
|
+
const n = this.i._allocateDoubleVector(e.length);
|
|
2939
|
+
if (!n) throw Error("Unable to allocate new double vector on heap.");
|
|
2940
|
+
for (const s of e) this.i._addDoubleVectorEntry(n, s);
|
|
2941
|
+
this.i._addDoubleVectorToInputSidePacket(n, r);
|
|
2942
|
+
}));
|
|
2943
|
+
}
|
|
2944
|
+
addFloatVectorToInputSidePacket(e, t) {
|
|
2945
|
+
m(this, t, ((r) => {
|
|
2946
|
+
const n = this.i._allocateFloatVector(e.length);
|
|
2947
|
+
if (!n) throw Error("Unable to allocate new float vector on heap.");
|
|
2948
|
+
for (const s of e) this.i._addFloatVectorEntry(n, s);
|
|
2949
|
+
this.i._addFloatVectorToInputSidePacket(n, r);
|
|
2950
|
+
}));
|
|
2951
|
+
}
|
|
2952
|
+
addIntVectorToInputSidePacket(e, t) {
|
|
2953
|
+
m(this, t, ((r) => {
|
|
2954
|
+
const n = this.i._allocateIntVector(e.length);
|
|
2955
|
+
if (!n) throw Error("Unable to allocate new int vector on heap.");
|
|
2956
|
+
for (const s of e) this.i._addIntVectorEntry(n, s);
|
|
2957
|
+
this.i._addIntVectorToInputSidePacket(n, r);
|
|
2958
|
+
}));
|
|
2959
|
+
}
|
|
2960
|
+
addUintVectorToInputSidePacket(e, t) {
|
|
2961
|
+
m(this, t, ((r) => {
|
|
2962
|
+
const n = this.i._allocateUintVector(e.length);
|
|
2963
|
+
if (!n) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2964
|
+
for (const s of e) this.i._addUintVectorEntry(n, s);
|
|
2965
|
+
this.i._addUintVectorToInputSidePacket(n, r);
|
|
2966
|
+
}));
|
|
2967
|
+
}
|
|
2968
|
+
addStringVectorToInputSidePacket(e, t) {
|
|
2969
|
+
m(this, t, ((r) => {
|
|
2970
|
+
const n = this.i._allocateStringVector(e.length);
|
|
2971
|
+
if (!n) throw Error("Unable to allocate new string vector on heap.");
|
|
2972
|
+
for (const s of e) m(this, s, ((i) => {
|
|
2973
|
+
this.i._addStringVectorEntry(n, i);
|
|
2974
|
+
}));
|
|
2975
|
+
this.i._addStringVectorToInputSidePacket(n, r);
|
|
2976
|
+
}));
|
|
2977
|
+
}
|
|
2978
|
+
attachBoolListener(e, t) {
|
|
2979
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
2980
|
+
this.i._attachBoolListener(r);
|
|
2981
|
+
}));
|
|
2982
|
+
}
|
|
2983
|
+
attachBoolVectorListener(e, t) {
|
|
2984
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
2985
|
+
this.i._attachBoolVectorListener(r);
|
|
2986
|
+
}));
|
|
2987
|
+
}
|
|
2988
|
+
attachIntListener(e, t) {
|
|
2989
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
2990
|
+
this.i._attachIntListener(r);
|
|
2991
|
+
}));
|
|
2992
|
+
}
|
|
2993
|
+
attachIntVectorListener(e, t) {
|
|
2994
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
2995
|
+
this.i._attachIntVectorListener(r);
|
|
2996
|
+
}));
|
|
2997
|
+
}
|
|
2998
|
+
attachUintListener(e, t) {
|
|
2999
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
3000
|
+
this.i._attachUintListener(r);
|
|
3001
|
+
}));
|
|
3002
|
+
}
|
|
3003
|
+
attachUintVectorListener(e, t) {
|
|
3004
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
3005
|
+
this.i._attachUintVectorListener(r);
|
|
3006
|
+
}));
|
|
3007
|
+
}
|
|
3008
|
+
attachDoubleListener(e, t) {
|
|
3009
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
3010
|
+
this.i._attachDoubleListener(r);
|
|
3011
|
+
}));
|
|
3012
|
+
}
|
|
3013
|
+
attachDoubleVectorListener(e, t) {
|
|
3014
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
3015
|
+
this.i._attachDoubleVectorListener(r);
|
|
3016
|
+
}));
|
|
3017
|
+
}
|
|
3018
|
+
attachFloatListener(e, t) {
|
|
3019
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
3020
|
+
this.i._attachFloatListener(r);
|
|
3021
|
+
}));
|
|
3022
|
+
}
|
|
3023
|
+
attachFloatVectorListener(e, t) {
|
|
3024
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
3025
|
+
this.i._attachFloatVectorListener(r);
|
|
3026
|
+
}));
|
|
3027
|
+
}
|
|
3028
|
+
attachStringListener(e, t) {
|
|
3029
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
3030
|
+
this.i._attachStringListener(r);
|
|
3031
|
+
}));
|
|
3032
|
+
}
|
|
3033
|
+
attachStringVectorListener(e, t) {
|
|
3034
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
3035
|
+
this.i._attachStringVectorListener(r);
|
|
3036
|
+
}));
|
|
3037
|
+
}
|
|
3038
|
+
attachProtoListener(e, t, r) {
|
|
3039
|
+
Ee(this, e, t), m(this, e, ((n) => {
|
|
3040
|
+
this.i._attachProtoListener(n, r || !1);
|
|
3041
|
+
}));
|
|
3042
|
+
}
|
|
3043
|
+
attachProtoVectorListener(e, t, r) {
|
|
3044
|
+
De(this, e, t), m(this, e, ((n) => {
|
|
3045
|
+
this.i._attachProtoVectorListener(n, r || !1);
|
|
3046
|
+
}));
|
|
3047
|
+
}
|
|
3048
|
+
attachAudioListener(e, t, r) {
|
|
3049
|
+
this.i._attachAudioListener || console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'), Ee(this, e, ((n, s) => {
|
|
3050
|
+
n = new Float32Array(n.buffer, n.byteOffset, n.length / 4), t(n, s);
|
|
3051
|
+
})), m(this, e, ((n) => {
|
|
3052
|
+
this.i._attachAudioListener(n, r || !1);
|
|
3053
|
+
}));
|
|
3054
|
+
}
|
|
3055
|
+
finishProcessing() {
|
|
3056
|
+
this.i._waitUntilIdle();
|
|
3057
|
+
}
|
|
3058
|
+
closeGraph() {
|
|
3059
|
+
this.i._closeGraph(), this.i.simpleListeners = void 0, this.i.emptyPacketListeners = void 0;
|
|
3060
|
+
}
|
|
3061
|
+
}, class extends Bi {
|
|
3062
|
+
get ga() {
|
|
3063
|
+
return this.i;
|
|
3064
|
+
}
|
|
3065
|
+
pa(e, t, r) {
|
|
3066
|
+
m(this, t, ((n) => {
|
|
3067
|
+
const [s, i] = Oi(this, e, n);
|
|
3068
|
+
this.ga._addBoundTextureAsImageToStream(n, s, i, r);
|
|
3069
|
+
}));
|
|
3070
|
+
}
|
|
3071
|
+
Z(e, t) {
|
|
3072
|
+
Ee(this, e, t), m(this, e, ((r) => {
|
|
3073
|
+
this.ga._attachImageListener(r);
|
|
3074
|
+
}));
|
|
3075
|
+
}
|
|
3076
|
+
aa(e, t) {
|
|
3077
|
+
De(this, e, t), m(this, e, ((r) => {
|
|
3078
|
+
this.ga._attachImageVectorListener(r);
|
|
3079
|
+
}));
|
|
3080
|
+
}
|
|
3081
|
+
}));
|
|
3082
|
+
var Bi, we = class extends pc {
|
|
3083
|
+
};
|
|
3084
|
+
async function w(e, t, r) {
|
|
3085
|
+
return (async function(n, s, i, o) {
|
|
3086
|
+
return uc(n, s, i, o);
|
|
3087
|
+
})(e, r.canvas ?? (e2() ? void 0 : document.createElement("canvas")), t, r);
|
|
3088
|
+
}
|
|
3089
|
+
function c2(e, t, r, n) {
|
|
3090
|
+
if (e.U) {
|
|
3091
|
+
const i = new xa();
|
|
3092
|
+
if (r != null && r.regionOfInterest) {
|
|
3093
|
+
if (!e.oa) throw Error("This task doesn't support region-of-interest.");
|
|
3094
|
+
var s = r.regionOfInterest;
|
|
3095
|
+
if (s.left >= s.right || s.top >= s.bottom) throw Error("Expected RectF with left < right and top < bottom.");
|
|
3096
|
+
if (s.left < 0 || s.top < 0 || s.right > 1 || s.bottom > 1) throw Error("Expected RectF values to be in [0,1].");
|
|
3097
|
+
y(i, 1, (s.left + s.right) / 2), y(i, 2, (s.top + s.bottom) / 2), y(i, 4, s.right - s.left), y(i, 3, s.bottom - s.top);
|
|
3098
|
+
} else y(i, 1, 0.5), y(i, 2, 0.5), y(i, 4, 1), y(i, 3, 1);
|
|
3099
|
+
if (r != null && r.rotationDegrees) {
|
|
3100
|
+
if ((r == null ? void 0 : r.rotationDegrees) % 90 != 0) throw Error("Expected rotation to be a multiple of 90°.");
|
|
3101
|
+
if (y(i, 5, -Math.PI * r.rotationDegrees / 180), (r == null ? void 0 : r.rotationDegrees) % 180 != 0) {
|
|
3102
|
+
const [o, a] = t2(t);
|
|
3103
|
+
r = I(i, 3) * a / o, s = I(i, 4) * o / a, y(i, 4, r), y(i, 3, s);
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
e.g.addProtoToStream(i.g(), "mediapipe.NormalizedRect", e.U, n);
|
|
3107
|
+
}
|
|
3108
|
+
e.g.pa(t, e.X, n ?? performance.now()), e.finishProcessing();
|
|
3109
|
+
}
|
|
3110
|
+
function Ae(e, t, r) {
|
|
3111
|
+
var n;
|
|
3112
|
+
if ((n = e.baseOptions) != null && n.g()) throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");
|
|
3113
|
+
c2(e, t, r, e.C + 1);
|
|
3114
|
+
}
|
|
3115
|
+
function Me(e, t, r, n) {
|
|
3116
|
+
var s;
|
|
3117
|
+
if (!((s = e.baseOptions) != null && s.g())) throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");
|
|
3118
|
+
c2(e, t, r, n);
|
|
3119
|
+
}
|
|
3120
|
+
function Ft(e, t, r, n) {
|
|
3121
|
+
var s = t.data;
|
|
3122
|
+
const i = t.width, o = i * (t = t.height);
|
|
3123
|
+
if ((s instanceof Uint8Array || s instanceof Float32Array) && s.length !== o) throw Error("Unsupported channel count: " + s.length / o);
|
|
3124
|
+
return e = new G([s], r, !1, e.g.i.canvas, e.P, i, t), n ? e.clone() : e;
|
|
3125
|
+
}
|
|
3126
|
+
var ue = class extends Dn {
|
|
3127
|
+
constructor(e, t, r, n) {
|
|
3128
|
+
super(e), this.g = e, this.X = t, this.U = r, this.oa = n, this.P = new s2();
|
|
3129
|
+
}
|
|
3130
|
+
l(e, t = !0) {
|
|
3131
|
+
if ("runningMode" in e && S(this.baseOptions, 2, ur(!!e.runningMode && e.runningMode !== "IMAGE")), e.canvas !== void 0 && this.g.i.canvas !== e.canvas) throw Error("You must create a new task to reset the canvas.");
|
|
3132
|
+
return super.l(e, t);
|
|
3133
|
+
}
|
|
3134
|
+
close() {
|
|
3135
|
+
this.P.close(), super.close();
|
|
3136
|
+
}
|
|
3137
|
+
};
|
|
3138
|
+
ue.prototype.close = ue.prototype.close;
|
|
3139
|
+
var se = class extends ue {
|
|
3140
|
+
constructor(e, t) {
|
|
3141
|
+
super(new we(e, t), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, v(e = this.h = new an(), 0, 1, t = new O()), y(this.h, 2, 0.5), y(this.h, 3, 0.3);
|
|
3142
|
+
}
|
|
3143
|
+
get baseOptions() {
|
|
3144
|
+
return A(this.h, O, 1);
|
|
3145
|
+
}
|
|
3146
|
+
set baseOptions(e) {
|
|
3147
|
+
v(this.h, 0, 1, e);
|
|
3148
|
+
}
|
|
3149
|
+
o(e) {
|
|
3150
|
+
return "minDetectionConfidence" in e && y(this.h, 2, e.minDetectionConfidence ?? 0.5), "minSuppressionThreshold" in e && y(this.h, 3, e.minSuppressionThreshold ?? 0.3), this.l(e);
|
|
3151
|
+
}
|
|
3152
|
+
F(e, t) {
|
|
3153
|
+
return this.j = { detections: [] }, Ae(this, e, t), this.j;
|
|
3154
|
+
}
|
|
3155
|
+
G(e, t, r) {
|
|
3156
|
+
return this.j = { detections: [] }, Me(this, e, r, t), this.j;
|
|
3157
|
+
}
|
|
3158
|
+
m() {
|
|
3159
|
+
var e = new de();
|
|
3160
|
+
$(e, "image_in"), $(e, "norm_rect_in"), E(e, "detections");
|
|
3161
|
+
const t = new le();
|
|
3162
|
+
Ce(t, X1, this.h);
|
|
3163
|
+
const r = new Q();
|
|
3164
|
+
ce(r, 2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect_in"), b(r, "DETECTIONS:detections"), r.o(t), _e(e, r), this.g.attachProtoVectorListener("detections", ((n, s) => {
|
|
3165
|
+
for (const i of n) n = Ta(i), this.j.detections.push(Za(n));
|
|
3166
|
+
d(this, s);
|
|
3167
|
+
})), this.g.attachEmptyPacketListener("detections", ((n) => {
|
|
3168
|
+
d(this, n);
|
|
3169
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3170
|
+
}
|
|
3171
|
+
};
|
|
3172
|
+
se.prototype.detectForVideo = se.prototype.G, se.prototype.detect = se.prototype.F, se.prototype.setOptions = se.prototype.o, se.createFromModelPath = async function(e, t) {
|
|
3173
|
+
return w(se, e, { baseOptions: { modelAssetPath: t } });
|
|
3174
|
+
}, se.createFromModelBuffer = function(e, t) {
|
|
3175
|
+
return w(se, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3176
|
+
}, se.createFromOptions = function(e, t) {
|
|
3177
|
+
return w(se, e, t);
|
|
3178
|
+
};
|
|
3179
|
+
var Is = be([61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291], [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308]), Rs = be([263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]), Ns = be([276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]), h2 = be([474, 475], [475, 476], [476, 477], [477, 474]), Us = be([33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]), Bs = be([46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]), u2 = be([469, 470], [470, 471], [471, 472], [472, 469]), Ds = be([10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152], [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10]), l2 = [...Is, ...Rs, ...Ns, ...Us, ...Bs, ...Ds], d2 = be([127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232], [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48], [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202], [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135], [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205], [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148], [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54], [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166], [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45], [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63], [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123], [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200], [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160], [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41], [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42], [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96], [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15], [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88], [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42], [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144], [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48], [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19], [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122], [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2], [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226], [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133], [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86], [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76], [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79], [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59], [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23], [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28], [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166], [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233], [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177], [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452], [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347], [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310], [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387], [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281], [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320], [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386], [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413], [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364], [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273], [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308], [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436], [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250], [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273], [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279], [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334], [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330], [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285], [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367], [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396], [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264], [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340], [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263], [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395], [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302], [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429], [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414], [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313], [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432], [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421], [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305], [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341], [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260], [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250], [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360], [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448], [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362], [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238], [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233], [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49], [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210], [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138], [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207], [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176], [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103], [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219], [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220], [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105], [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116], [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199], [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29], [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73], [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183], [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89], [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16], [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178], [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41], [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24], [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219], [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94], [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139], [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0], [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203], [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140], [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194], [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192], [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98], [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229], [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244], [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113], [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244], [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215], [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451], [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280], [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272], [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259], [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254], [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314], [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248], [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277], [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282], [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359], [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264], [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267], [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446], [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352], [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436], [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376], [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366], [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253], [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278], [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276], [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337], [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295], [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417], [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354], [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280], [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364], [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314], [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287], [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418], [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289], [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256], [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259], [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309], [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344], [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339]);
|
|
3180
|
+
function Di(e) {
|
|
3181
|
+
e.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] };
|
|
3182
|
+
}
|
|
3183
|
+
var M = class extends ue {
|
|
3184
|
+
constructor(e, t) {
|
|
3185
|
+
super(new we(e, t), "image_in", "norm_rect", !1), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, v(e = this.h = new Fa(), 0, 1, t = new O()), this.A = new Oa(), v(this.h, 0, 3, this.A), this.u = new an(), v(this.h, 0, 2, this.u), Ne(this.u, 4, 1), y(this.u, 2, 0.5), y(this.A, 2, 0.5), y(this.h, 4, 0.5);
|
|
3186
|
+
}
|
|
3187
|
+
get baseOptions() {
|
|
3188
|
+
return A(this.h, O, 1);
|
|
3189
|
+
}
|
|
3190
|
+
set baseOptions(e) {
|
|
3191
|
+
v(this.h, 0, 1, e);
|
|
3192
|
+
}
|
|
3193
|
+
o(e) {
|
|
3194
|
+
return "numFaces" in e && Ne(this.u, 4, e.numFaces ?? 1), "minFaceDetectionConfidence" in e && y(this.u, 2, e.minFaceDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && y(this.h, 4, e.minTrackingConfidence ?? 0.5), "minFacePresenceConfidence" in e && y(this.A, 2, e.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in e && (this.outputFaceBlendshapes = !!e.outputFaceBlendshapes), "outputFacialTransformationMatrixes" in e && (this.outputFacialTransformationMatrixes = !!e.outputFacialTransformationMatrixes), this.l(e);
|
|
3195
|
+
}
|
|
3196
|
+
F(e, t) {
|
|
3197
|
+
return Di(this), Ae(this, e, t), this.j;
|
|
3198
|
+
}
|
|
3199
|
+
G(e, t, r) {
|
|
3200
|
+
return Di(this), Me(this, e, r, t), this.j;
|
|
3201
|
+
}
|
|
3202
|
+
m() {
|
|
3203
|
+
var e = new de();
|
|
3204
|
+
$(e, "image_in"), $(e, "norm_rect"), E(e, "face_landmarks");
|
|
3205
|
+
const t = new le();
|
|
3206
|
+
Ce(t, J1, this.h);
|
|
3207
|
+
const r = new Q();
|
|
3208
|
+
ce(r, 2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), b(r, "NORM_LANDMARKS:face_landmarks"), r.o(t), _e(e, r), this.g.attachProtoVectorListener("face_landmarks", ((n, s) => {
|
|
3209
|
+
for (const i of n) n = Ar(i), this.j.faceLandmarks.push(cn(n));
|
|
3210
|
+
d(this, s);
|
|
3211
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((n) => {
|
|
3212
|
+
d(this, n);
|
|
3213
|
+
})), this.outputFaceBlendshapes && (E(e, "blendshapes"), b(r, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", ((n, s) => {
|
|
3214
|
+
if (this.outputFaceBlendshapes) for (const i of n) n = on(i), this.j.faceBlendshapes.push(Ms(n.g() ?? []));
|
|
3215
|
+
d(this, s);
|
|
3216
|
+
})), this.g.attachEmptyPacketListener("blendshapes", ((n) => {
|
|
3217
|
+
d(this, n);
|
|
3218
|
+
}))), this.outputFacialTransformationMatrixes && (E(e, "face_geometry"), b(r, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", ((n, s) => {
|
|
3219
|
+
if (this.outputFacialTransformationMatrixes) for (const i of n) (n = A(n = Y1(i), j1, 2)) && this.j.facialTransformationMatrixes.push({ rows: me(n, 1) ?? 0 ?? 0, columns: me(n, 2) ?? 0 ?? 0, data: rt(n, 3, Te, tt()).slice() ?? [] });
|
|
3220
|
+
d(this, s);
|
|
3221
|
+
})), this.g.attachEmptyPacketListener("face_geometry", ((n) => {
|
|
3222
|
+
d(this, n);
|
|
3223
|
+
}))), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3224
|
+
}
|
|
3225
|
+
};
|
|
3226
|
+
M.prototype.detectForVideo = M.prototype.G, M.prototype.detect = M.prototype.F, M.prototype.setOptions = M.prototype.o, M.createFromModelPath = function(e, t) {
|
|
3227
|
+
return w(M, e, { baseOptions: { modelAssetPath: t } });
|
|
3228
|
+
}, M.createFromModelBuffer = function(e, t) {
|
|
3229
|
+
return w(M, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3230
|
+
}, M.createFromOptions = function(e, t) {
|
|
3231
|
+
return w(M, e, t);
|
|
3232
|
+
}, M.FACE_LANDMARKS_LIPS = Is, M.FACE_LANDMARKS_LEFT_EYE = Rs, M.FACE_LANDMARKS_LEFT_EYEBROW = Ns, M.FACE_LANDMARKS_LEFT_IRIS = h2, M.FACE_LANDMARKS_RIGHT_EYE = Us, M.FACE_LANDMARKS_RIGHT_EYEBROW = Bs, M.FACE_LANDMARKS_RIGHT_IRIS = u2, M.FACE_LANDMARKS_FACE_OVAL = Ds, M.FACE_LANDMARKS_CONTOURS = l2, M.FACE_LANDMARKS_TESSELATION = d2;
|
|
3233
|
+
var js = be([0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [5, 9], [9, 10], [10, 11], [11, 12], [9, 13], [13, 14], [14, 15], [15, 16], [13, 17], [0, 17], [17, 18], [18, 19], [19, 20]);
|
|
3234
|
+
function ji(e) {
|
|
3235
|
+
e.gestures = [], e.landmarks = [], e.worldLandmarks = [], e.handedness = [];
|
|
3236
|
+
}
|
|
3237
|
+
function Vi(e) {
|
|
3238
|
+
return e.gestures.length === 0 ? { gestures: [], landmarks: [], worldLandmarks: [], handedness: [], handednesses: [] } : { gestures: e.gestures, landmarks: e.landmarks, worldLandmarks: e.worldLandmarks, handedness: e.handedness, handednesses: e.handedness };
|
|
3239
|
+
}
|
|
3240
|
+
function Gi(e, t = !0) {
|
|
3241
|
+
const r = [];
|
|
3242
|
+
for (const s of e) {
|
|
3243
|
+
var n = on(s);
|
|
3244
|
+
e = [];
|
|
3245
|
+
for (const i of n.g()) n = t && me(i, 1) != null ? me(i, 1) ?? 0 : -1, e.push({ score: I(i, 2) ?? 0, index: n, categoryName: q(P(i, 3)) ?? "" ?? "", displayName: q(P(i, 4)) ?? "" ?? "" });
|
|
3246
|
+
r.push(e);
|
|
3247
|
+
}
|
|
3248
|
+
return r;
|
|
3249
|
+
}
|
|
3250
|
+
var ee = class extends ue {
|
|
3251
|
+
constructor(e, t) {
|
|
3252
|
+
super(new we(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], v(e = this.j = new Na(), 0, 1, t = new O()), this.u = new Ps(), v(this.j, 0, 2, this.u), this.D = new Ls(), v(this.u, 0, 3, this.D), this.A = new Ra(), v(this.u, 0, 2, this.A), this.h = new Z1(), v(this.j, 0, 3, this.h), y(this.A, 2, 0.5), y(this.u, 4, 0.5), y(this.D, 2, 0.5);
|
|
3253
|
+
}
|
|
3254
|
+
get baseOptions() {
|
|
3255
|
+
return A(this.j, O, 1);
|
|
3256
|
+
}
|
|
3257
|
+
set baseOptions(e) {
|
|
3258
|
+
v(this.j, 0, 1, e);
|
|
3259
|
+
}
|
|
3260
|
+
o(e) {
|
|
3261
|
+
var s, i, o, a;
|
|
3262
|
+
if (Ne(this.A, 3, e.numHands ?? 1), "minHandDetectionConfidence" in e && y(this.A, 2, e.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && y(this.u, 4, e.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in e && y(this.D, 2, e.minHandPresenceConfidence ?? 0.5), e.cannedGesturesClassifierOptions) {
|
|
3263
|
+
var t = new _t(), r = t, n = Bn(e.cannedGesturesClassifierOptions, (s = A(this.h, _t, 3)) == null ? void 0 : s.l());
|
|
3264
|
+
v(r, 0, 2, n), v(this.h, 0, 3, t);
|
|
3265
|
+
} else e.cannedGesturesClassifierOptions === void 0 && ((i = A(this.h, _t, 3)) == null || i.g());
|
|
3266
|
+
return e.customGesturesClassifierOptions ? (v(r = t = new _t(), 0, 2, n = Bn(e.customGesturesClassifierOptions, (o = A(this.h, _t, 4)) == null ? void 0 : o.l())), v(this.h, 0, 4, t)) : e.customGesturesClassifierOptions === void 0 && ((a = A(this.h, _t, 4)) == null || a.g()), this.l(e);
|
|
3267
|
+
}
|
|
3268
|
+
Ha(e, t) {
|
|
3269
|
+
return ji(this), Ae(this, e, t), Vi(this);
|
|
3270
|
+
}
|
|
3271
|
+
Ia(e, t, r) {
|
|
3272
|
+
return ji(this), Me(this, e, r, t), Vi(this);
|
|
3273
|
+
}
|
|
3274
|
+
m() {
|
|
3275
|
+
var e = new de();
|
|
3276
|
+
$(e, "image_in"), $(e, "norm_rect"), E(e, "hand_gestures"), E(e, "hand_landmarks"), E(e, "world_hand_landmarks"), E(e, "handedness");
|
|
3277
|
+
const t = new le();
|
|
3278
|
+
Ce(t, Q1, this.j);
|
|
3279
|
+
const r = new Q();
|
|
3280
|
+
ce(r, 2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), b(r, "HAND_GESTURES:hand_gestures"), b(r, "LANDMARKS:hand_landmarks"), b(r, "WORLD_LANDMARKS:world_hand_landmarks"), b(r, "HANDEDNESS:handedness"), r.o(t), _e(e, r), this.g.attachProtoVectorListener("hand_landmarks", ((n, s) => {
|
|
3281
|
+
for (const i of n) {
|
|
3282
|
+
n = Ar(i);
|
|
3283
|
+
const o = [];
|
|
3284
|
+
for (const a of Re(n, Pa, 1)) o.push({ x: I(a, 1) ?? 0, y: I(a, 2) ?? 0, z: I(a, 3) ?? 0, visibility: I(a, 4) ?? 0 });
|
|
3285
|
+
this.landmarks.push(o);
|
|
3286
|
+
}
|
|
3287
|
+
d(this, s);
|
|
3288
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((n) => {
|
|
3289
|
+
d(this, n);
|
|
3290
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((n, s) => {
|
|
3291
|
+
for (const i of n) {
|
|
3292
|
+
n = At(i);
|
|
3293
|
+
const o = [];
|
|
3294
|
+
for (const a of Re(n, La, 1)) o.push({ x: I(a, 1) ?? 0, y: I(a, 2) ?? 0, z: I(a, 3) ?? 0, visibility: I(a, 4) ?? 0 });
|
|
3295
|
+
this.worldLandmarks.push(o);
|
|
3296
|
+
}
|
|
3297
|
+
d(this, s);
|
|
3298
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((n) => {
|
|
3299
|
+
d(this, n);
|
|
3300
|
+
})), this.g.attachProtoVectorListener("hand_gestures", ((n, s) => {
|
|
3301
|
+
this.gestures.push(...Gi(n, !1)), d(this, s);
|
|
3302
|
+
})), this.g.attachEmptyPacketListener("hand_gestures", ((n) => {
|
|
3303
|
+
d(this, n);
|
|
3304
|
+
})), this.g.attachProtoVectorListener("handedness", ((n, s) => {
|
|
3305
|
+
this.handedness.push(...Gi(n)), d(this, s);
|
|
3306
|
+
})), this.g.attachEmptyPacketListener("handedness", ((n) => {
|
|
3307
|
+
d(this, n);
|
|
3308
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3309
|
+
}
|
|
3310
|
+
};
|
|
3311
|
+
function Hi(e) {
|
|
3312
|
+
return { landmarks: e.landmarks, worldLandmarks: e.worldLandmarks, handednesses: e.handedness, handedness: e.handedness };
|
|
3313
|
+
}
|
|
3314
|
+
ee.prototype.recognizeForVideo = ee.prototype.Ia, ee.prototype.recognize = ee.prototype.Ha, ee.prototype.setOptions = ee.prototype.o, ee.createFromModelPath = function(e, t) {
|
|
3315
|
+
return w(ee, e, { baseOptions: { modelAssetPath: t } });
|
|
3316
|
+
}, ee.createFromModelBuffer = function(e, t) {
|
|
3317
|
+
return w(ee, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3318
|
+
}, ee.createFromOptions = function(e, t) {
|
|
3319
|
+
return w(ee, e, t);
|
|
3320
|
+
}, ee.HAND_CONNECTIONS = js;
|
|
3321
|
+
var te = class extends ue {
|
|
3322
|
+
constructor(e, t) {
|
|
3323
|
+
super(new we(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], v(e = this.h = new Ps(), 0, 1, t = new O()), this.u = new Ls(), v(this.h, 0, 3, this.u), this.j = new Ra(), v(this.h, 0, 2, this.j), Ne(this.j, 3, 1), y(this.j, 2, 0.5), y(this.u, 2, 0.5), y(this.h, 4, 0.5);
|
|
3324
|
+
}
|
|
3325
|
+
get baseOptions() {
|
|
3326
|
+
return A(this.h, O, 1);
|
|
3327
|
+
}
|
|
3328
|
+
set baseOptions(e) {
|
|
3329
|
+
v(this.h, 0, 1, e);
|
|
3330
|
+
}
|
|
3331
|
+
o(e) {
|
|
3332
|
+
return "numHands" in e && Ne(this.j, 3, e.numHands ?? 1), "minHandDetectionConfidence" in e && y(this.j, 2, e.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && y(this.h, 4, e.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in e && y(this.u, 2, e.minHandPresenceConfidence ?? 0.5), this.l(e);
|
|
3333
|
+
}
|
|
3334
|
+
F(e, t) {
|
|
3335
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], Ae(this, e, t), Hi(this);
|
|
3336
|
+
}
|
|
3337
|
+
G(e, t, r) {
|
|
3338
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], Me(this, e, r, t), Hi(this);
|
|
3339
|
+
}
|
|
3340
|
+
m() {
|
|
3341
|
+
var e = new de();
|
|
3342
|
+
$(e, "image_in"), $(e, "norm_rect"), E(e, "hand_landmarks"), E(e, "world_hand_landmarks"), E(e, "handedness");
|
|
3343
|
+
const t = new le();
|
|
3344
|
+
Ce(t, ec, this.h);
|
|
3345
|
+
const r = new Q();
|
|
3346
|
+
ce(r, 2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), b(r, "LANDMARKS:hand_landmarks"), b(r, "WORLD_LANDMARKS:world_hand_landmarks"), b(r, "HANDEDNESS:handedness"), r.o(t), _e(e, r), this.g.attachProtoVectorListener("hand_landmarks", ((n, s) => {
|
|
3347
|
+
for (const i of n) n = Ar(i), this.landmarks.push(cn(n));
|
|
3348
|
+
d(this, s);
|
|
3349
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((n) => {
|
|
3350
|
+
d(this, n);
|
|
3351
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((n, s) => {
|
|
3352
|
+
for (const i of n) n = At(i), this.worldLandmarks.push(nr(n));
|
|
3353
|
+
d(this, s);
|
|
3354
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((n) => {
|
|
3355
|
+
d(this, n);
|
|
3356
|
+
})), this.g.attachProtoVectorListener("handedness", ((n, s) => {
|
|
3357
|
+
var i = this.handedness, o = i.push;
|
|
3358
|
+
const a = [];
|
|
3359
|
+
for (const c of n) {
|
|
3360
|
+
n = on(c);
|
|
3361
|
+
const u = [];
|
|
3362
|
+
for (const h of n.g()) u.push({ score: I(h, 2) ?? 0, index: me(h, 1) ?? 0 ?? -1, categoryName: q(P(h, 3)) ?? "" ?? "", displayName: q(P(h, 4)) ?? "" ?? "" });
|
|
3363
|
+
a.push(u);
|
|
3364
|
+
}
|
|
3365
|
+
o.call(i, ...a), d(this, s);
|
|
3366
|
+
})), this.g.attachEmptyPacketListener("handedness", ((n) => {
|
|
3367
|
+
d(this, n);
|
|
3368
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3369
|
+
}
|
|
3370
|
+
};
|
|
3371
|
+
te.prototype.detectForVideo = te.prototype.G, te.prototype.detect = te.prototype.F, te.prototype.setOptions = te.prototype.o, te.createFromModelPath = function(e, t) {
|
|
3372
|
+
return w(te, e, { baseOptions: { modelAssetPath: t } });
|
|
3373
|
+
}, te.createFromModelBuffer = function(e, t) {
|
|
3374
|
+
return w(te, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3375
|
+
}, te.createFromOptions = function(e, t) {
|
|
3376
|
+
return w(te, e, t);
|
|
3377
|
+
}, te.HAND_CONNECTIONS = js;
|
|
3378
|
+
var f2 = be([0, 1], [1, 2], [2, 3], [3, 7], [0, 4], [4, 5], [5, 6], [6, 8], [9, 10], [11, 12], [11, 13], [13, 15], [15, 17], [15, 19], [15, 21], [17, 19], [12, 14], [14, 16], [16, 18], [16, 20], [16, 22], [18, 20], [11, 23], [12, 24], [23, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32], [27, 31], [28, 32]);
|
|
3379
|
+
function zi(e) {
|
|
3380
|
+
e.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
|
|
3381
|
+
}
|
|
3382
|
+
function Wi(e) {
|
|
3383
|
+
try {
|
|
3384
|
+
if (!e.D) return e.h;
|
|
3385
|
+
e.D(e.h);
|
|
3386
|
+
} finally {
|
|
3387
|
+
un(e);
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
function Lr(e, t) {
|
|
3391
|
+
e = Ar(e), t.push(cn(e));
|
|
3392
|
+
}
|
|
3393
|
+
var L = class extends ue {
|
|
3394
|
+
constructor(e, t) {
|
|
3395
|
+
super(new we(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, v(e = this.j = new Va(), 0, 1, t = new O()), this.I = new Ls(), v(this.j, 0, 2, this.I), this.W = new tc(), v(this.j, 0, 3, this.W), this.u = new an(), v(this.j, 0, 4, this.u), this.O = new Oa(), v(this.j, 0, 5, this.O), this.A = new Da(), v(this.j, 0, 6, this.A), this.M = new ja(), v(this.j, 0, 7, this.M), y(this.u, 2, 0.5), y(this.u, 3, 0.3), y(this.O, 2, 0.5), y(this.A, 2, 0.5), y(this.A, 3, 0.3), y(this.M, 2, 0.5), y(this.I, 2, 0.5);
|
|
3396
|
+
}
|
|
3397
|
+
get baseOptions() {
|
|
3398
|
+
return A(this.j, O, 1);
|
|
3399
|
+
}
|
|
3400
|
+
set baseOptions(e) {
|
|
3401
|
+
v(this.j, 0, 1, e);
|
|
3402
|
+
}
|
|
3403
|
+
o(e) {
|
|
3404
|
+
return "minFaceDetectionConfidence" in e && y(this.u, 2, e.minFaceDetectionConfidence ?? 0.5), "minFaceSuppressionThreshold" in e && y(this.u, 3, e.minFaceSuppressionThreshold ?? 0.3), "minFacePresenceConfidence" in e && y(this.O, 2, e.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in e && (this.outputFaceBlendshapes = !!e.outputFaceBlendshapes), "minPoseDetectionConfidence" in e && y(this.A, 2, e.minPoseDetectionConfidence ?? 0.5), "minPoseSuppressionThreshold" in e && y(this.A, 3, e.minPoseSuppressionThreshold ?? 0.3), "minPosePresenceConfidence" in e && y(this.M, 2, e.minPosePresenceConfidence ?? 0.5), "outputPoseSegmentationMasks" in e && (this.outputPoseSegmentationMasks = !!e.outputPoseSegmentationMasks), "minHandLandmarksConfidence" in e && y(this.I, 2, e.minHandLandmarksConfidence ?? 0.5), this.l(e);
|
|
3405
|
+
}
|
|
3406
|
+
F(e, t, r) {
|
|
3407
|
+
const n = typeof t != "function" ? t : {};
|
|
3408
|
+
return this.D = typeof t == "function" ? t : r, zi(this), Ae(this, e, n), Wi(this);
|
|
3409
|
+
}
|
|
3410
|
+
G(e, t, r, n) {
|
|
3411
|
+
const s = typeof r != "function" ? r : {};
|
|
3412
|
+
return this.D = typeof r == "function" ? r : n, zi(this), Me(this, e, s, t), Wi(this);
|
|
3413
|
+
}
|
|
3414
|
+
m() {
|
|
3415
|
+
var e = new de();
|
|
3416
|
+
$(e, "input_frames_image"), E(e, "pose_landmarks"), E(e, "pose_world_landmarks"), E(e, "face_landmarks"), E(e, "left_hand_landmarks"), E(e, "left_hand_world_landmarks"), E(e, "right_hand_landmarks"), E(e, "right_hand_world_landmarks");
|
|
3417
|
+
const t = new le(), r = new mi();
|
|
3418
|
+
ce(r, 1, "type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), (function(s, i) {
|
|
3419
|
+
if (i != null) if (Array.isArray(i)) S(s, 2, Kr(i, 0, lr));
|
|
3420
|
+
else {
|
|
3421
|
+
if (!(typeof i == "string" || i instanceof Le || qn(i))) throw Error("invalid value in Any.value field: " + i + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
3422
|
+
je(s, 2, Yn(i, !1), ut());
|
|
3423
|
+
}
|
|
3424
|
+
})(r, this.j.g());
|
|
3425
|
+
const n = new Q();
|
|
3426
|
+
ce(n, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), ls(n, 8, mi, r), x(n, "IMAGE:input_frames_image"), b(n, "POSE_LANDMARKS:pose_landmarks"), b(n, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), b(n, "FACE_LANDMARKS:face_landmarks"), b(n, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), b(n, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), b(n, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), b(n, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), n.o(t), _e(e, n), hn(this, e), this.g.attachProtoListener("pose_landmarks", ((s, i) => {
|
|
3427
|
+
Lr(s, this.h.poseLandmarks), d(this, i);
|
|
3428
|
+
})), this.g.attachEmptyPacketListener("pose_landmarks", ((s) => {
|
|
3429
|
+
d(this, s);
|
|
3430
|
+
})), this.g.attachProtoListener("pose_world_landmarks", ((s, i) => {
|
|
3431
|
+
var o = this.h.poseWorldLandmarks;
|
|
3432
|
+
s = At(s), o.push(nr(s)), d(this, i);
|
|
3433
|
+
})), this.g.attachEmptyPacketListener("pose_world_landmarks", ((s) => {
|
|
3434
|
+
d(this, s);
|
|
3435
|
+
})), this.outputPoseSegmentationMasks && (b(n, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Mt(this, "pose_segmentation_mask"), this.g.Z("pose_segmentation_mask", ((s, i) => {
|
|
3436
|
+
this.h.poseSegmentationMasks = [Ft(this, s, !0, !this.D)], d(this, i);
|
|
3437
|
+
})), this.g.attachEmptyPacketListener("pose_segmentation_mask", ((s) => {
|
|
3438
|
+
this.h.poseSegmentationMasks = [], d(this, s);
|
|
3439
|
+
}))), this.g.attachProtoListener("face_landmarks", ((s, i) => {
|
|
3440
|
+
Lr(s, this.h.faceLandmarks), d(this, i);
|
|
3441
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((s) => {
|
|
3442
|
+
d(this, s);
|
|
3443
|
+
})), this.outputFaceBlendshapes && (E(e, "extra_blendshapes"), b(n, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", ((s, i) => {
|
|
3444
|
+
var o = this.h.faceBlendshapes;
|
|
3445
|
+
this.outputFaceBlendshapes && (s = on(s), o.push(Ms(s.g() ?? []))), d(this, i);
|
|
3446
|
+
})), this.g.attachEmptyPacketListener("extra_blendshapes", ((s) => {
|
|
3447
|
+
d(this, s);
|
|
3448
|
+
}))), this.g.attachProtoListener("left_hand_landmarks", ((s, i) => {
|
|
3449
|
+
Lr(s, this.h.leftHandLandmarks), d(this, i);
|
|
3450
|
+
})), this.g.attachEmptyPacketListener("left_hand_landmarks", ((s) => {
|
|
3451
|
+
d(this, s);
|
|
3452
|
+
})), this.g.attachProtoListener("left_hand_world_landmarks", ((s, i) => {
|
|
3453
|
+
var o = this.h.leftHandWorldLandmarks;
|
|
3454
|
+
s = At(s), o.push(nr(s)), d(this, i);
|
|
3455
|
+
})), this.g.attachEmptyPacketListener("left_hand_world_landmarks", ((s) => {
|
|
3456
|
+
d(this, s);
|
|
3457
|
+
})), this.g.attachProtoListener("right_hand_landmarks", ((s, i) => {
|
|
3458
|
+
Lr(s, this.h.rightHandLandmarks), d(this, i);
|
|
3459
|
+
})), this.g.attachEmptyPacketListener("right_hand_landmarks", ((s) => {
|
|
3460
|
+
d(this, s);
|
|
3461
|
+
})), this.g.attachProtoListener("right_hand_world_landmarks", ((s, i) => {
|
|
3462
|
+
var o = this.h.rightHandWorldLandmarks;
|
|
3463
|
+
s = At(s), o.push(nr(s)), d(this, i);
|
|
3464
|
+
})), this.g.attachEmptyPacketListener("right_hand_world_landmarks", ((s) => {
|
|
3465
|
+
d(this, s);
|
|
3466
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3467
|
+
}
|
|
3468
|
+
};
|
|
3469
|
+
L.prototype.detectForVideo = L.prototype.G, L.prototype.detect = L.prototype.F, L.prototype.setOptions = L.prototype.o, L.createFromModelPath = function(e, t) {
|
|
3470
|
+
return w(L, e, { baseOptions: { modelAssetPath: t } });
|
|
3471
|
+
}, L.createFromModelBuffer = function(e, t) {
|
|
3472
|
+
return w(L, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3473
|
+
}, L.createFromOptions = function(e, t) {
|
|
3474
|
+
return w(L, e, t);
|
|
3475
|
+
}, L.HAND_CONNECTIONS = js, L.POSE_CONNECTIONS = f2, L.FACE_LANDMARKS_LIPS = Is, L.FACE_LANDMARKS_LEFT_EYE = Rs, L.FACE_LANDMARKS_LEFT_EYEBROW = Ns, L.FACE_LANDMARKS_LEFT_IRIS = h2, L.FACE_LANDMARKS_RIGHT_EYE = Us, L.FACE_LANDMARKS_RIGHT_EYEBROW = Bs, L.FACE_LANDMARKS_RIGHT_IRIS = u2, L.FACE_LANDMARKS_FACE_OVAL = Ds, L.FACE_LANDMARKS_CONTOURS = l2, L.FACE_LANDMARKS_TESSELATION = d2;
|
|
3476
|
+
var pe = class extends ue {
|
|
3477
|
+
constructor(e, t) {
|
|
3478
|
+
super(new we(e, t), "input_image", "norm_rect", !0), this.j = { classifications: [] }, v(e = this.h = new Ga(), 0, 1, t = new O());
|
|
3479
|
+
}
|
|
3480
|
+
get baseOptions() {
|
|
3481
|
+
return A(this.h, O, 1);
|
|
3482
|
+
}
|
|
3483
|
+
set baseOptions(e) {
|
|
3484
|
+
v(this.h, 0, 1, e);
|
|
3485
|
+
}
|
|
3486
|
+
o(e) {
|
|
3487
|
+
return v(this.h, 0, 2, Bn(e, A(this.h, Ss, 2))), this.l(e);
|
|
3488
|
+
}
|
|
3489
|
+
sa(e, t) {
|
|
3490
|
+
return this.j = { classifications: [] }, Ae(this, e, t), this.j;
|
|
3491
|
+
}
|
|
3492
|
+
ta(e, t, r) {
|
|
3493
|
+
return this.j = { classifications: [] }, Me(this, e, r, t), this.j;
|
|
3494
|
+
}
|
|
3495
|
+
m() {
|
|
3496
|
+
var e = new de();
|
|
3497
|
+
$(e, "input_image"), $(e, "norm_rect"), E(e, "classifications");
|
|
3498
|
+
const t = new le();
|
|
3499
|
+
Ce(t, rc, this.h);
|
|
3500
|
+
const r = new Q();
|
|
3501
|
+
ce(r, 2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), x(r, "IMAGE:input_image"), x(r, "NORM_RECT:norm_rect"), b(r, "CLASSIFICATIONS:classifications"), r.o(t), _e(e, r), this.g.attachProtoListener("classifications", ((n, s) => {
|
|
3502
|
+
this.j = cc(H1(n)), d(this, s);
|
|
3503
|
+
})), this.g.attachEmptyPacketListener("classifications", ((n) => {
|
|
3504
|
+
d(this, n);
|
|
3505
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3506
|
+
}
|
|
3507
|
+
};
|
|
3508
|
+
pe.prototype.classifyForVideo = pe.prototype.ta, pe.prototype.classify = pe.prototype.sa, pe.prototype.setOptions = pe.prototype.o, pe.createFromModelPath = function(e, t) {
|
|
3509
|
+
return w(pe, e, { baseOptions: { modelAssetPath: t } });
|
|
3510
|
+
}, pe.createFromModelBuffer = function(e, t) {
|
|
3511
|
+
return w(pe, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3512
|
+
}, pe.createFromOptions = function(e, t) {
|
|
3513
|
+
return w(pe, e, t);
|
|
3514
|
+
};
|
|
3515
|
+
var re = class extends ue {
|
|
3516
|
+
constructor(e, t) {
|
|
3517
|
+
super(new we(e, t), "image_in", "norm_rect", !0), this.h = new Ha(), this.embeddings = { embeddings: [] }, v(e = this.h, 0, 1, t = new O());
|
|
3518
|
+
}
|
|
3519
|
+
get baseOptions() {
|
|
3520
|
+
return A(this.h, O, 1);
|
|
3521
|
+
}
|
|
3522
|
+
set baseOptions(e) {
|
|
3523
|
+
v(this.h, 0, 1, e);
|
|
3524
|
+
}
|
|
3525
|
+
o(e) {
|
|
3526
|
+
var t = this.h, r = A(this.h, Si, 2);
|
|
3527
|
+
return r = r ? r.clone() : new Si(), e.l2Normalize !== void 0 ? S(r, 1, ur(e.l2Normalize)) : "l2Normalize" in e && S(r, 1), e.quantize !== void 0 ? S(r, 2, ur(e.quantize)) : "quantize" in e && S(r, 2), v(t, 0, 2, r), this.l(e);
|
|
3528
|
+
}
|
|
3529
|
+
za(e, t) {
|
|
3530
|
+
return Ae(this, e, t), this.embeddings;
|
|
3531
|
+
}
|
|
3532
|
+
Aa(e, t, r) {
|
|
3533
|
+
return Me(this, e, r, t), this.embeddings;
|
|
3534
|
+
}
|
|
3535
|
+
m() {
|
|
3536
|
+
var e = new de();
|
|
3537
|
+
$(e, "image_in"), $(e, "norm_rect"), E(e, "embeddings_out");
|
|
3538
|
+
const t = new le();
|
|
3539
|
+
Ce(t, nc, this.h);
|
|
3540
|
+
const r = new Q();
|
|
3541
|
+
ce(r, 2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), b(r, "EMBEDDINGS:embeddings_out"), r.o(t), _e(e, r), this.g.attachProtoListener("embeddings_out", ((n, s) => {
|
|
3542
|
+
n = K1(n), this.embeddings = (function(i) {
|
|
3543
|
+
return { embeddings: Re(i, W1, 1).map(((o) => {
|
|
3544
|
+
var u, h;
|
|
3545
|
+
const a = { headIndex: me(o, 3) ?? 0 ?? -1, headName: q(P(o, 4)) ?? "" ?? "" };
|
|
3546
|
+
var c = o.v;
|
|
3547
|
+
return Do(c, 0 | c[f], ki, yn(o, 1)) !== void 0 ? (o = rt(o = A(o, ki, yn(o, 1), void 0), 1, Te, tt()), a.floatEmbedding = o.slice()) : (c = new Uint8Array(0), a.quantizedEmbedding = ((h = (u = A(o, z1, yn(o, 2), void 0)) == null ? void 0 : u.na()) == null ? void 0 : h.h()) ?? c), a;
|
|
3548
|
+
})), timestampMs: Ja(Go(i)) };
|
|
3549
|
+
})(n), d(this, s);
|
|
3550
|
+
})), this.g.attachEmptyPacketListener("embeddings_out", ((n) => {
|
|
3551
|
+
d(this, n);
|
|
3552
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3553
|
+
}
|
|
3554
|
+
};
|
|
3555
|
+
re.cosineSimilarity = function(e, t) {
|
|
3556
|
+
if (e.floatEmbedding && t.floatEmbedding) e = $i(e.floatEmbedding, t.floatEmbedding);
|
|
3557
|
+
else {
|
|
3558
|
+
if (!e.quantizedEmbedding || !t.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
|
|
3559
|
+
e = $i(Ci(e.quantizedEmbedding), Ci(t.quantizedEmbedding));
|
|
3560
|
+
}
|
|
3561
|
+
return e;
|
|
3562
|
+
}, re.prototype.embedForVideo = re.prototype.Aa, re.prototype.embed = re.prototype.za, re.prototype.setOptions = re.prototype.o, re.createFromModelPath = function(e, t) {
|
|
3563
|
+
return w(re, e, { baseOptions: { modelAssetPath: t } });
|
|
3564
|
+
}, re.createFromModelBuffer = function(e, t) {
|
|
3565
|
+
return w(re, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3566
|
+
}, re.createFromOptions = function(e, t) {
|
|
3567
|
+
return w(re, e, t);
|
|
3568
|
+
};
|
|
3569
|
+
var Gn = class {
|
|
3570
|
+
constructor(e, t, r) {
|
|
3571
|
+
this.confidenceMasks = e, this.categoryMask = t, this.qualityScores = r;
|
|
3572
|
+
}
|
|
3573
|
+
close() {
|
|
3574
|
+
var e, t;
|
|
3575
|
+
(e = this.confidenceMasks) == null || e.forEach(((r) => {
|
|
3576
|
+
r.close();
|
|
3577
|
+
})), (t = this.categoryMask) == null || t.close();
|
|
3578
|
+
}
|
|
3579
|
+
};
|
|
3580
|
+
function gc(e) {
|
|
3581
|
+
var r, n;
|
|
3582
|
+
const t = (function(s) {
|
|
3583
|
+
return Re(s, Q, 1);
|
|
3584
|
+
})(e.ca()).filter(((s) => (q(P(s, 1)) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));
|
|
3585
|
+
if (e.u = [], t.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
3586
|
+
t.length === 1 && (((n = (r = A(t[0], le, 7)) == null ? void 0 : r.j()) == null ? void 0 : n.g()) ?? /* @__PURE__ */ new Map()).forEach(((s, i) => {
|
|
3587
|
+
e.u[Number(i)] = q(P(s, 1)) ?? "";
|
|
3588
|
+
}));
|
|
3589
|
+
}
|
|
3590
|
+
function Ki(e) {
|
|
3591
|
+
e.categoryMask = void 0, e.confidenceMasks = void 0, e.qualityScores = void 0;
|
|
3592
|
+
}
|
|
3593
|
+
function qi(e) {
|
|
3594
|
+
try {
|
|
3595
|
+
const t = new Gn(e.confidenceMasks, e.categoryMask, e.qualityScores);
|
|
3596
|
+
if (!e.j) return t;
|
|
3597
|
+
e.j(t);
|
|
3598
|
+
} finally {
|
|
3599
|
+
un(e);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
Gn.prototype.close = Gn.prototype.close;
|
|
3603
|
+
var Z = class extends ue {
|
|
3604
|
+
constructor(e, t) {
|
|
3605
|
+
super(new we(e, t), "image_in", "norm_rect", !1), this.u = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new $s(), this.A = new za(), v(this.h, 0, 3, this.A), v(e = this.h, 0, 1, t = new O());
|
|
3606
|
+
}
|
|
3607
|
+
get baseOptions() {
|
|
3608
|
+
return A(this.h, O, 1);
|
|
3609
|
+
}
|
|
3610
|
+
set baseOptions(e) {
|
|
3611
|
+
v(this.h, 0, 1, e);
|
|
3612
|
+
}
|
|
3613
|
+
o(e) {
|
|
3614
|
+
return e.displayNamesLocale !== void 0 ? S(this.h, 2, vr(e.displayNamesLocale)) : "displayNamesLocale" in e && S(this.h, 2), "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
|
|
3615
|
+
}
|
|
3616
|
+
L() {
|
|
3617
|
+
gc(this);
|
|
3618
|
+
}
|
|
3619
|
+
segment(e, t, r) {
|
|
3620
|
+
const n = typeof t != "function" ? t : {};
|
|
3621
|
+
return this.j = typeof t == "function" ? t : r, Ki(this), Ae(this, e, n), qi(this);
|
|
3622
|
+
}
|
|
3623
|
+
La(e, t, r, n) {
|
|
3624
|
+
const s = typeof r != "function" ? r : {};
|
|
3625
|
+
return this.j = typeof r == "function" ? r : n, Ki(this), Me(this, e, s, t), qi(this);
|
|
3626
|
+
}
|
|
3627
|
+
Da() {
|
|
3628
|
+
return this.u;
|
|
3629
|
+
}
|
|
3630
|
+
m() {
|
|
3631
|
+
var e = new de();
|
|
3632
|
+
$(e, "image_in"), $(e, "norm_rect");
|
|
3633
|
+
const t = new le();
|
|
3634
|
+
Ce(t, Ka, this.h);
|
|
3635
|
+
const r = new Q();
|
|
3636
|
+
ce(r, 2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), r.o(t), _e(e, r), hn(this, e), this.outputConfidenceMasks && (E(e, "confidence_masks"), b(r, "CONFIDENCE_MASKS:confidence_masks"), Mt(this, "confidence_masks"), this.g.aa("confidence_masks", ((n, s) => {
|
|
3637
|
+
this.confidenceMasks = n.map(((i) => Ft(this, i, !0, !this.j))), d(this, s);
|
|
3638
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((n) => {
|
|
3639
|
+
this.confidenceMasks = [], d(this, n);
|
|
3640
|
+
}))), this.outputCategoryMask && (E(e, "category_mask"), b(r, "CATEGORY_MASK:category_mask"), Mt(this, "category_mask"), this.g.Z("category_mask", ((n, s) => {
|
|
3641
|
+
this.categoryMask = Ft(this, n, !1, !this.j), d(this, s);
|
|
3642
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((n) => {
|
|
3643
|
+
this.categoryMask = void 0, d(this, n);
|
|
3644
|
+
}))), E(e, "quality_scores"), b(r, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((n, s) => {
|
|
3645
|
+
this.qualityScores = n, d(this, s);
|
|
3646
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((n) => {
|
|
3647
|
+
this.categoryMask = void 0, d(this, n);
|
|
3648
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3649
|
+
}
|
|
3650
|
+
};
|
|
3651
|
+
Z.prototype.getLabels = Z.prototype.Da, Z.prototype.segmentForVideo = Z.prototype.La, Z.prototype.segment = Z.prototype.segment, Z.prototype.setOptions = Z.prototype.o, Z.createFromModelPath = function(e, t) {
|
|
3652
|
+
return w(Z, e, { baseOptions: { modelAssetPath: t } });
|
|
3653
|
+
}, Z.createFromModelBuffer = function(e, t) {
|
|
3654
|
+
return w(Z, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3655
|
+
}, Z.createFromOptions = function(e, t) {
|
|
3656
|
+
return w(Z, e, t);
|
|
3657
|
+
};
|
|
3658
|
+
var Hn = class {
|
|
3659
|
+
constructor(e, t, r) {
|
|
3660
|
+
this.confidenceMasks = e, this.categoryMask = t, this.qualityScores = r;
|
|
3661
|
+
}
|
|
3662
|
+
close() {
|
|
3663
|
+
var e, t;
|
|
3664
|
+
(e = this.confidenceMasks) == null || e.forEach(((r) => {
|
|
3665
|
+
r.close();
|
|
3666
|
+
})), (t = this.categoryMask) == null || t.close();
|
|
3667
|
+
}
|
|
3668
|
+
};
|
|
3669
|
+
Hn.prototype.close = Hn.prototype.close;
|
|
3670
|
+
var ke = class extends ue {
|
|
3671
|
+
constructor(e, t) {
|
|
3672
|
+
super(new we(e, t), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new $s(), this.u = new za(), v(this.h, 0, 3, this.u), v(e = this.h, 0, 1, t = new O());
|
|
3673
|
+
}
|
|
3674
|
+
get baseOptions() {
|
|
3675
|
+
return A(this.h, O, 1);
|
|
3676
|
+
}
|
|
3677
|
+
set baseOptions(e) {
|
|
3678
|
+
v(this.h, 0, 1, e);
|
|
3679
|
+
}
|
|
3680
|
+
o(e) {
|
|
3681
|
+
return "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
|
|
3682
|
+
}
|
|
3683
|
+
segment(e, t, r, n) {
|
|
3684
|
+
const s = typeof r != "function" ? r : {};
|
|
3685
|
+
if (this.j = typeof r == "function" ? r : n, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, r = this.C + 1, n = new qa(), t.keypoint && t.scribble) throw Error("Cannot provide both keypoint and scribble.");
|
|
3686
|
+
if (t.keypoint) {
|
|
3687
|
+
var i = new wn();
|
|
3688
|
+
je(i, 3, ur(!0), !1), je(i, 1, er(t.keypoint.x), 0), je(i, 2, er(t.keypoint.y), 0), tr(n, 1, Un, i);
|
|
3689
|
+
} else {
|
|
3690
|
+
if (!t.scribble) throw Error("Must provide either a keypoint or a scribble.");
|
|
3691
|
+
{
|
|
3692
|
+
const a = new ic();
|
|
3693
|
+
for (i of t.scribble) je(t = new wn(), 3, ur(!0), !1), je(t, 1, er(i.x), 0), je(t, 2, er(i.y), 0), ls(a, 1, wn, t);
|
|
3694
|
+
tr(n, 2, Un, a);
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
this.g.addProtoToStream(n.g(), "mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest", "roi_in", r), Ae(this, e, s);
|
|
3698
|
+
e: {
|
|
3699
|
+
try {
|
|
3700
|
+
const a = new Hn(this.confidenceMasks, this.categoryMask, this.qualityScores);
|
|
3701
|
+
if (!this.j) {
|
|
3702
|
+
var o = a;
|
|
3703
|
+
break e;
|
|
3704
|
+
}
|
|
3705
|
+
this.j(a);
|
|
3706
|
+
} finally {
|
|
3707
|
+
un(this);
|
|
3708
|
+
}
|
|
3709
|
+
o = void 0;
|
|
3710
|
+
}
|
|
3711
|
+
return o;
|
|
3712
|
+
}
|
|
3713
|
+
m() {
|
|
3714
|
+
var e = new de();
|
|
3715
|
+
$(e, "image_in"), $(e, "roi_in"), $(e, "norm_rect_in");
|
|
3716
|
+
const t = new le();
|
|
3717
|
+
Ce(t, Ka, this.h);
|
|
3718
|
+
const r = new Q();
|
|
3719
|
+
ce(r, 2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"), x(r, "IMAGE:image_in"), x(r, "ROI:roi_in"), x(r, "NORM_RECT:norm_rect_in"), r.o(t), _e(e, r), hn(this, e), this.outputConfidenceMasks && (E(e, "confidence_masks"), b(r, "CONFIDENCE_MASKS:confidence_masks"), Mt(this, "confidence_masks"), this.g.aa("confidence_masks", ((n, s) => {
|
|
3720
|
+
this.confidenceMasks = n.map(((i) => Ft(this, i, !0, !this.j))), d(this, s);
|
|
3721
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((n) => {
|
|
3722
|
+
this.confidenceMasks = [], d(this, n);
|
|
3723
|
+
}))), this.outputCategoryMask && (E(e, "category_mask"), b(r, "CATEGORY_MASK:category_mask"), Mt(this, "category_mask"), this.g.Z("category_mask", ((n, s) => {
|
|
3724
|
+
this.categoryMask = Ft(this, n, !1, !this.j), d(this, s);
|
|
3725
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((n) => {
|
|
3726
|
+
this.categoryMask = void 0, d(this, n);
|
|
3727
|
+
}))), E(e, "quality_scores"), b(r, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((n, s) => {
|
|
3728
|
+
this.qualityScores = n, d(this, s);
|
|
3729
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((n) => {
|
|
3730
|
+
this.categoryMask = void 0, d(this, n);
|
|
3731
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3732
|
+
}
|
|
3733
|
+
};
|
|
3734
|
+
ke.prototype.segment = ke.prototype.segment, ke.prototype.setOptions = ke.prototype.o, ke.createFromModelPath = function(e, t) {
|
|
3735
|
+
return w(ke, e, { baseOptions: { modelAssetPath: t } });
|
|
3736
|
+
}, ke.createFromModelBuffer = function(e, t) {
|
|
3737
|
+
return w(ke, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3738
|
+
}, ke.createFromOptions = function(e, t) {
|
|
3739
|
+
return w(ke, e, t);
|
|
3740
|
+
};
|
|
3741
|
+
var ge = class extends ue {
|
|
3742
|
+
constructor(e, t) {
|
|
3743
|
+
super(new we(e, t), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, v(e = this.h = new Xa(), 0, 1, t = new O());
|
|
3744
|
+
}
|
|
3745
|
+
get baseOptions() {
|
|
3746
|
+
return A(this.h, O, 1);
|
|
3747
|
+
}
|
|
3748
|
+
set baseOptions(e) {
|
|
3749
|
+
v(this.h, 0, 1, e);
|
|
3750
|
+
}
|
|
3751
|
+
o(e) {
|
|
3752
|
+
return e.displayNamesLocale !== void 0 ? S(this.h, 2, vr(e.displayNamesLocale)) : "displayNamesLocale" in e && S(this.h, 2), e.maxResults !== void 0 ? Ne(this.h, 3, e.maxResults) : "maxResults" in e && S(this.h, 3), e.scoreThreshold !== void 0 ? y(this.h, 4, e.scoreThreshold) : "scoreThreshold" in e && S(this.h, 4), e.categoryAllowlist !== void 0 ? Fr(this.h, 5, e.categoryAllowlist) : "categoryAllowlist" in e && S(this.h, 5), e.categoryDenylist !== void 0 ? Fr(this.h, 6, e.categoryDenylist) : "categoryDenylist" in e && S(this.h, 6), this.l(e);
|
|
3753
|
+
}
|
|
3754
|
+
F(e, t) {
|
|
3755
|
+
return this.j = { detections: [] }, Ae(this, e, t), this.j;
|
|
3756
|
+
}
|
|
3757
|
+
G(e, t, r) {
|
|
3758
|
+
return this.j = { detections: [] }, Me(this, e, r, t), this.j;
|
|
3759
|
+
}
|
|
3760
|
+
m() {
|
|
3761
|
+
var e = new de();
|
|
3762
|
+
$(e, "input_frame_gpu"), $(e, "norm_rect"), E(e, "detections");
|
|
3763
|
+
const t = new le();
|
|
3764
|
+
Ce(t, oc, this.h);
|
|
3765
|
+
const r = new Q();
|
|
3766
|
+
ce(r, 2, "mediapipe.tasks.vision.ObjectDetectorGraph"), x(r, "IMAGE:input_frame_gpu"), x(r, "NORM_RECT:norm_rect"), b(r, "DETECTIONS:detections"), r.o(t), _e(e, r), this.g.attachProtoVectorListener("detections", ((n, s) => {
|
|
3767
|
+
for (const i of n) n = Ta(i), this.j.detections.push(Za(n));
|
|
3768
|
+
d(this, s);
|
|
3769
|
+
})), this.g.attachEmptyPacketListener("detections", ((n) => {
|
|
3770
|
+
d(this, n);
|
|
3771
|
+
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3772
|
+
}
|
|
3773
|
+
};
|
|
3774
|
+
ge.prototype.detectForVideo = ge.prototype.G, ge.prototype.detect = ge.prototype.F, ge.prototype.setOptions = ge.prototype.o, ge.createFromModelPath = async function(e, t) {
|
|
3775
|
+
return w(ge, e, { baseOptions: { modelAssetPath: t } });
|
|
3776
|
+
}, ge.createFromModelBuffer = function(e, t) {
|
|
3777
|
+
return w(ge, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3778
|
+
}, ge.createFromOptions = function(e, t) {
|
|
3779
|
+
return w(ge, e, t);
|
|
3780
|
+
};
|
|
3781
|
+
var zn = class {
|
|
3782
|
+
constructor(e, t, r) {
|
|
3783
|
+
this.landmarks = e, this.worldLandmarks = t, this.segmentationMasks = r;
|
|
3784
|
+
}
|
|
3785
|
+
close() {
|
|
3786
|
+
var e;
|
|
3787
|
+
(e = this.segmentationMasks) == null || e.forEach(((t) => {
|
|
3788
|
+
t.close();
|
|
3789
|
+
}));
|
|
3790
|
+
}
|
|
3791
|
+
};
|
|
3792
|
+
function Xi(e) {
|
|
3793
|
+
e.landmarks = [], e.worldLandmarks = [], e.segmentationMasks = void 0;
|
|
3794
|
+
}
|
|
3795
|
+
function Yi(e) {
|
|
3796
|
+
try {
|
|
3797
|
+
const t = new zn(e.landmarks, e.worldLandmarks, e.segmentationMasks);
|
|
3798
|
+
if (!e.u) return t;
|
|
3799
|
+
e.u(t);
|
|
3800
|
+
} finally {
|
|
3801
|
+
un(e);
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
zn.prototype.close = zn.prototype.close;
|
|
3805
|
+
var ne = class extends ue {
|
|
3806
|
+
constructor(e, t) {
|
|
3807
|
+
super(new we(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, v(e = this.h = new Ya(), 0, 1, t = new O()), this.A = new ja(), v(this.h, 0, 3, this.A), this.j = new Da(), v(this.h, 0, 2, this.j), Ne(this.j, 4, 1), y(this.j, 2, 0.5), y(this.A, 2, 0.5), y(this.h, 4, 0.5);
|
|
3808
|
+
}
|
|
3809
|
+
get baseOptions() {
|
|
3810
|
+
return A(this.h, O, 1);
|
|
3811
|
+
}
|
|
3812
|
+
set baseOptions(e) {
|
|
3813
|
+
v(this.h, 0, 1, e);
|
|
3814
|
+
}
|
|
3815
|
+
o(e) {
|
|
3816
|
+
return "numPoses" in e && Ne(this.j, 4, e.numPoses ?? 1), "minPoseDetectionConfidence" in e && y(this.j, 2, e.minPoseDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && y(this.h, 4, e.minTrackingConfidence ?? 0.5), "minPosePresenceConfidence" in e && y(this.A, 2, e.minPosePresenceConfidence ?? 0.5), "outputSegmentationMasks" in e && (this.outputSegmentationMasks = e.outputSegmentationMasks ?? !1), this.l(e);
|
|
3817
|
+
}
|
|
3818
|
+
F(e, t, r) {
|
|
3819
|
+
const n = typeof t != "function" ? t : {};
|
|
3820
|
+
return this.u = typeof t == "function" ? t : r, Xi(this), Ae(this, e, n), Yi(this);
|
|
3821
|
+
}
|
|
3822
|
+
G(e, t, r, n) {
|
|
3823
|
+
const s = typeof r != "function" ? r : {};
|
|
3824
|
+
return this.u = typeof r == "function" ? r : n, Xi(this), Me(this, e, s, t), Yi(this);
|
|
3825
|
+
}
|
|
3826
|
+
m() {
|
|
3827
|
+
var e = new de();
|
|
3828
|
+
$(e, "image_in"), $(e, "norm_rect"), E(e, "normalized_landmarks"), E(e, "world_landmarks"), E(e, "segmentation_masks");
|
|
3829
|
+
const t = new le();
|
|
3830
|
+
Ce(t, ac, this.h);
|
|
3831
|
+
const r = new Q();
|
|
3832
|
+
ce(r, 2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), x(r, "IMAGE:image_in"), x(r, "NORM_RECT:norm_rect"), b(r, "NORM_LANDMARKS:normalized_landmarks"), b(r, "WORLD_LANDMARKS:world_landmarks"), r.o(t), _e(e, r), hn(this, e), this.g.attachProtoVectorListener("normalized_landmarks", ((n, s) => {
|
|
3833
|
+
this.landmarks = [];
|
|
3834
|
+
for (const i of n) n = Ar(i), this.landmarks.push(cn(n));
|
|
3835
|
+
d(this, s);
|
|
3836
|
+
})), this.g.attachEmptyPacketListener("normalized_landmarks", ((n) => {
|
|
3837
|
+
this.landmarks = [], d(this, n);
|
|
3838
|
+
})), this.g.attachProtoVectorListener("world_landmarks", ((n, s) => {
|
|
3839
|
+
this.worldLandmarks = [];
|
|
3840
|
+
for (const i of n) n = At(i), this.worldLandmarks.push(nr(n));
|
|
3841
|
+
d(this, s);
|
|
3842
|
+
})), this.g.attachEmptyPacketListener("world_landmarks", ((n) => {
|
|
3843
|
+
this.worldLandmarks = [], d(this, n);
|
|
3844
|
+
})), this.outputSegmentationMasks && (b(r, "SEGMENTATION_MASK:segmentation_masks"), Mt(this, "segmentation_masks"), this.g.aa("segmentation_masks", ((n, s) => {
|
|
3845
|
+
this.segmentationMasks = n.map(((i) => Ft(this, i, !0, !this.u))), d(this, s);
|
|
3846
|
+
})), this.g.attachEmptyPacketListener("segmentation_masks", ((n) => {
|
|
3847
|
+
this.segmentationMasks = [], d(this, n);
|
|
3848
|
+
}))), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3849
|
+
}
|
|
3850
|
+
};
|
|
3851
|
+
ne.prototype.detectForVideo = ne.prototype.G, ne.prototype.detect = ne.prototype.F, ne.prototype.setOptions = ne.prototype.o, ne.createFromModelPath = function(e, t) {
|
|
3852
|
+
return w(ne, e, { baseOptions: { modelAssetPath: t } });
|
|
3853
|
+
}, ne.createFromModelBuffer = function(e, t) {
|
|
3854
|
+
return w(ne, e, { baseOptions: { modelAssetBuffer: t } });
|
|
3855
|
+
}, ne.createFromOptions = function(e, t) {
|
|
3856
|
+
return w(ne, e, t);
|
|
3857
|
+
}, ne.POSE_CONNECTIONS = f2;
|
|
3858
|
+
const mc = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision/wasm", yc = "https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite", _c = 0.7, vc = 0.08, bc = 0.85, Ji = 0.25;
|
|
3859
|
+
let Pr = null;
|
|
3860
|
+
async function wc() {
|
|
3861
|
+
if (Pr) return Pr;
|
|
3862
|
+
const e = await et.forVisionTasks(mc);
|
|
3863
|
+
return Pr = await se.createFromOptions(e, {
|
|
3864
|
+
baseOptions: { modelAssetPath: yc },
|
|
3865
|
+
runningMode: "IMAGE",
|
|
3866
|
+
minDetectionConfidence: _c
|
|
3867
|
+
}), Pr;
|
|
3868
|
+
}
|
|
3869
|
+
async function p2(e) {
|
|
3870
|
+
var _, k;
|
|
3871
|
+
const n = (await wc()).detect(e).detections;
|
|
3872
|
+
if (n.length === 0)
|
|
3873
|
+
return {
|
|
3874
|
+
hasFace: !1,
|
|
3875
|
+
faceCount: 0,
|
|
3876
|
+
confidence: 0,
|
|
3877
|
+
isCentered: !1,
|
|
3878
|
+
message: "No face detected. Please ensure your face is visible and well-lit."
|
|
3879
|
+
};
|
|
3880
|
+
if (n.length > 1)
|
|
3881
|
+
return {
|
|
3882
|
+
hasFace: !0,
|
|
3883
|
+
faceCount: n.length,
|
|
3884
|
+
confidence: ((_ = n[0].categories[0]) == null ? void 0 : _.score) ?? 0,
|
|
3885
|
+
isCentered: !1,
|
|
3886
|
+
message: "Multiple faces detected. Please ensure only your face is in the frame."
|
|
3887
|
+
};
|
|
3888
|
+
const s = n[0], i = s.boundingBox, o = ((k = s.categories[0]) == null ? void 0 : k.score) ?? 0;
|
|
3889
|
+
if (!i)
|
|
3890
|
+
return {
|
|
3891
|
+
hasFace: !0,
|
|
3892
|
+
faceCount: 1,
|
|
3893
|
+
confidence: o,
|
|
3894
|
+
isCentered: !1,
|
|
3895
|
+
message: "Face detected but could not determine position."
|
|
3896
|
+
};
|
|
3897
|
+
const a = e.naturalWidth, c = e.naturalHeight, u = i.width * i.height / (a * c);
|
|
3898
|
+
if (u < vc)
|
|
3899
|
+
return {
|
|
3900
|
+
hasFace: !0,
|
|
3901
|
+
faceCount: 1,
|
|
3902
|
+
confidence: o,
|
|
3903
|
+
isCentered: !1,
|
|
3904
|
+
message: "Face is too far away. Please move closer to the camera."
|
|
3905
|
+
};
|
|
3906
|
+
if (u > bc)
|
|
3907
|
+
return {
|
|
3908
|
+
hasFace: !0,
|
|
3909
|
+
faceCount: 1,
|
|
3910
|
+
confidence: o,
|
|
3911
|
+
isCentered: !1,
|
|
3912
|
+
message: "Face is too close. Please move further from the camera."
|
|
3913
|
+
};
|
|
3914
|
+
const h = (i.originX + i.width / 2) / a, l = (i.originY + i.height / 2) / c;
|
|
3915
|
+
return Math.abs(h - 0.5) < Ji && Math.abs(l - 0.5) < Ji ? {
|
|
3916
|
+
hasFace: !0,
|
|
3917
|
+
faceCount: 1,
|
|
3918
|
+
confidence: o,
|
|
3919
|
+
isCentered: !0,
|
|
3920
|
+
message: "Face looks good!"
|
|
3921
|
+
} : {
|
|
3922
|
+
hasFace: !0,
|
|
3923
|
+
faceCount: 1,
|
|
3924
|
+
confidence: o,
|
|
3925
|
+
isCentered: !1,
|
|
3926
|
+
message: "Please center your face in the frame."
|
|
3927
|
+
};
|
|
3928
|
+
}
|
|
3929
|
+
/**
|
|
3930
|
+
* @license
|
|
3931
|
+
* Copyright 2019 Google LLC
|
|
3932
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3933
|
+
*/
|
|
3934
|
+
const $r = globalThis, Vs = $r.ShadowRoot && ($r.ShadyCSS === void 0 || $r.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Gs = Symbol(), Zi = /* @__PURE__ */ new WeakMap();
|
|
3935
|
+
let g2 = class {
|
|
3936
|
+
constructor(t, r, n) {
|
|
3937
|
+
if (this._$cssResult$ = !0, n !== Gs) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
3938
|
+
this.cssText = t, this.t = r;
|
|
3939
|
+
}
|
|
3940
|
+
get styleSheet() {
|
|
3941
|
+
let t = this.o;
|
|
3942
|
+
const r = this.t;
|
|
3943
|
+
if (Vs && t === void 0) {
|
|
3944
|
+
const n = r !== void 0 && r.length === 1;
|
|
3945
|
+
n && (t = Zi.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Zi.set(r, t));
|
|
3946
|
+
}
|
|
3947
|
+
return t;
|
|
3948
|
+
}
|
|
3949
|
+
toString() {
|
|
3950
|
+
return this.cssText;
|
|
3951
|
+
}
|
|
3952
|
+
};
|
|
3953
|
+
const Ac = (e) => new g2(typeof e == "string" ? e : e + "", void 0, Gs), Ec = (e, ...t) => {
|
|
3954
|
+
const r = e.length === 1 ? e[0] : t.reduce((n, s, i) => n + ((o) => {
|
|
3955
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
|
3956
|
+
if (typeof o == "number") return o;
|
|
3957
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
3958
|
+
})(s) + e[i + 1], e[0]);
|
|
3959
|
+
return new g2(r, e, Gs);
|
|
3960
|
+
}, kc = (e, t) => {
|
|
3961
|
+
if (Vs) e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
|
|
3962
|
+
else for (const r of t) {
|
|
3963
|
+
const n = document.createElement("style"), s = $r.litNonce;
|
|
3964
|
+
s !== void 0 && n.setAttribute("nonce", s), n.textContent = r.cssText, e.appendChild(n);
|
|
3965
|
+
}
|
|
3966
|
+
}, Qi = Vs ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
3967
|
+
let r = "";
|
|
3968
|
+
for (const n of t.cssRules) r += n.cssText;
|
|
3969
|
+
return Ac(r);
|
|
3970
|
+
})(e) : e;
|
|
3971
|
+
/**
|
|
3972
|
+
* @license
|
|
3973
|
+
* Copyright 2017 Google LLC
|
|
3974
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3975
|
+
*/
|
|
3976
|
+
const { is: Sc, defineProperty: Tc, getOwnPropertyDescriptor: Lc, getOwnPropertyNames: Pc, getOwnPropertySymbols: xc, getPrototypeOf: Cc } = Object, ze = globalThis, eo = ze.trustedTypes, $c = eo ? eo.emptyScript : "", En = ze.reactiveElementPolyfillSupport, sr = (e, t) => e, Br = { toAttribute(e, t) {
|
|
3977
|
+
switch (t) {
|
|
3978
|
+
case Boolean:
|
|
3979
|
+
e = e ? $c : null;
|
|
3980
|
+
break;
|
|
3981
|
+
case Object:
|
|
3982
|
+
case Array:
|
|
3983
|
+
e = e == null ? e : JSON.stringify(e);
|
|
3984
|
+
}
|
|
3985
|
+
return e;
|
|
3986
|
+
}, fromAttribute(e, t) {
|
|
3987
|
+
let r = e;
|
|
3988
|
+
switch (t) {
|
|
3989
|
+
case Boolean:
|
|
3990
|
+
r = e !== null;
|
|
3991
|
+
break;
|
|
3992
|
+
case Number:
|
|
3993
|
+
r = e === null ? null : Number(e);
|
|
3994
|
+
break;
|
|
3995
|
+
case Object:
|
|
3996
|
+
case Array:
|
|
3997
|
+
try {
|
|
3998
|
+
r = JSON.parse(e);
|
|
3999
|
+
} catch {
|
|
4000
|
+
r = null;
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
4003
|
+
return r;
|
|
4004
|
+
} }, Hs = (e, t) => !Sc(e, t), to = { attribute: !0, type: String, converter: Br, reflect: !1, useDefault: !1, hasChanged: Hs };
|
|
4005
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ze.litPropertyMetadata ?? (ze.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
4006
|
+
let vt = class extends HTMLElement {
|
|
4007
|
+
static addInitializer(t) {
|
|
4008
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
4009
|
+
}
|
|
4010
|
+
static get observedAttributes() {
|
|
4011
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
4012
|
+
}
|
|
4013
|
+
static createProperty(t, r = to) {
|
|
4014
|
+
if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(t, r), !r.noAccessor) {
|
|
4015
|
+
const n = Symbol(), s = this.getPropertyDescriptor(t, n, r);
|
|
4016
|
+
s !== void 0 && Tc(this.prototype, t, s);
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
static getPropertyDescriptor(t, r, n) {
|
|
4020
|
+
const { get: s, set: i } = Lc(this.prototype, t) ?? { get() {
|
|
4021
|
+
return this[r];
|
|
4022
|
+
}, set(o) {
|
|
4023
|
+
this[r] = o;
|
|
4024
|
+
} };
|
|
4025
|
+
return { get: s, set(o) {
|
|
4026
|
+
const a = s == null ? void 0 : s.call(this);
|
|
4027
|
+
i == null || i.call(this, o), this.requestUpdate(t, a, n);
|
|
4028
|
+
}, configurable: !0, enumerable: !0 };
|
|
4029
|
+
}
|
|
4030
|
+
static getPropertyOptions(t) {
|
|
4031
|
+
return this.elementProperties.get(t) ?? to;
|
|
4032
|
+
}
|
|
4033
|
+
static _$Ei() {
|
|
4034
|
+
if (this.hasOwnProperty(sr("elementProperties"))) return;
|
|
4035
|
+
const t = Cc(this);
|
|
4036
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
4037
|
+
}
|
|
4038
|
+
static finalize() {
|
|
4039
|
+
if (this.hasOwnProperty(sr("finalized"))) return;
|
|
4040
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(sr("properties"))) {
|
|
4041
|
+
const r = this.properties, n = [...Pc(r), ...xc(r)];
|
|
4042
|
+
for (const s of n) this.createProperty(s, r[s]);
|
|
4043
|
+
}
|
|
4044
|
+
const t = this[Symbol.metadata];
|
|
4045
|
+
if (t !== null) {
|
|
4046
|
+
const r = litPropertyMetadata.get(t);
|
|
4047
|
+
if (r !== void 0) for (const [n, s] of r) this.elementProperties.set(n, s);
|
|
4048
|
+
}
|
|
4049
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
4050
|
+
for (const [r, n] of this.elementProperties) {
|
|
4051
|
+
const s = this._$Eu(r, n);
|
|
4052
|
+
s !== void 0 && this._$Eh.set(s, r);
|
|
4053
|
+
}
|
|
4054
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
4055
|
+
}
|
|
4056
|
+
static finalizeStyles(t) {
|
|
4057
|
+
const r = [];
|
|
4058
|
+
if (Array.isArray(t)) {
|
|
4059
|
+
const n = new Set(t.flat(1 / 0).reverse());
|
|
4060
|
+
for (const s of n) r.unshift(Qi(s));
|
|
4061
|
+
} else t !== void 0 && r.push(Qi(t));
|
|
4062
|
+
return r;
|
|
4063
|
+
}
|
|
4064
|
+
static _$Eu(t, r) {
|
|
4065
|
+
const n = r.attribute;
|
|
4066
|
+
return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
4067
|
+
}
|
|
4068
|
+
constructor() {
|
|
4069
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
4070
|
+
}
|
|
4071
|
+
_$Ev() {
|
|
4072
|
+
var t;
|
|
4073
|
+
this._$ES = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((r) => r(this));
|
|
4074
|
+
}
|
|
4075
|
+
addController(t) {
|
|
4076
|
+
var r;
|
|
4077
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((r = t.hostConnected) == null || r.call(t));
|
|
4078
|
+
}
|
|
4079
|
+
removeController(t) {
|
|
4080
|
+
var r;
|
|
4081
|
+
(r = this._$EO) == null || r.delete(t);
|
|
4082
|
+
}
|
|
4083
|
+
_$E_() {
|
|
4084
|
+
const t = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
|
|
4085
|
+
for (const n of r.keys()) this.hasOwnProperty(n) && (t.set(n, this[n]), delete this[n]);
|
|
4086
|
+
t.size > 0 && (this._$Ep = t);
|
|
4087
|
+
}
|
|
4088
|
+
createRenderRoot() {
|
|
4089
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
4090
|
+
return kc(t, this.constructor.elementStyles), t;
|
|
4091
|
+
}
|
|
4092
|
+
connectedCallback() {
|
|
4093
|
+
var t;
|
|
4094
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((r) => {
|
|
4095
|
+
var n;
|
|
4096
|
+
return (n = r.hostConnected) == null ? void 0 : n.call(r);
|
|
4097
|
+
});
|
|
4098
|
+
}
|
|
4099
|
+
enableUpdating(t) {
|
|
4100
|
+
}
|
|
4101
|
+
disconnectedCallback() {
|
|
4102
|
+
var t;
|
|
4103
|
+
(t = this._$EO) == null || t.forEach((r) => {
|
|
4104
|
+
var n;
|
|
4105
|
+
return (n = r.hostDisconnected) == null ? void 0 : n.call(r);
|
|
4106
|
+
});
|
|
4107
|
+
}
|
|
4108
|
+
attributeChangedCallback(t, r, n) {
|
|
4109
|
+
this._$AK(t, n);
|
|
4110
|
+
}
|
|
4111
|
+
_$ET(t, r) {
|
|
4112
|
+
var i;
|
|
4113
|
+
const n = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, n);
|
|
4114
|
+
if (s !== void 0 && n.reflect === !0) {
|
|
4115
|
+
const o = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Br).toAttribute(r, n.type);
|
|
4116
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
_$AK(t, r) {
|
|
4120
|
+
var i, o;
|
|
4121
|
+
const n = this.constructor, s = n._$Eh.get(t);
|
|
4122
|
+
if (s !== void 0 && this._$Em !== s) {
|
|
4123
|
+
const a = n.getPropertyOptions(s), c = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : Br;
|
|
4124
|
+
this._$Em = s;
|
|
4125
|
+
const u = c.fromAttribute(r, a.type);
|
|
4126
|
+
this[s] = u ?? ((o = this._$Ej) == null ? void 0 : o.get(s)) ?? u, this._$Em = null;
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
requestUpdate(t, r, n, s = !1, i) {
|
|
4130
|
+
var o;
|
|
4131
|
+
if (t !== void 0) {
|
|
4132
|
+
const a = this.constructor;
|
|
4133
|
+
if (s === !1 && (i = this[t]), n ?? (n = a.getPropertyOptions(t)), !((n.hasChanged ?? Hs)(i, r) || n.useDefault && n.reflect && i === ((o = this._$Ej) == null ? void 0 : o.get(t)) && !this.hasAttribute(a._$Eu(t, n)))) return;
|
|
4134
|
+
this.C(t, r, n);
|
|
4135
|
+
}
|
|
4136
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
4137
|
+
}
|
|
4138
|
+
C(t, r, { useDefault: n, reflect: s, wrapped: i }, o) {
|
|
4139
|
+
n && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? r ?? this[t]), i !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || n || (r = void 0), this._$AL.set(t, r)), s === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
4140
|
+
}
|
|
4141
|
+
async _$EP() {
|
|
4142
|
+
this.isUpdatePending = !0;
|
|
4143
|
+
try {
|
|
4144
|
+
await this._$ES;
|
|
4145
|
+
} catch (r) {
|
|
4146
|
+
Promise.reject(r);
|
|
4147
|
+
}
|
|
4148
|
+
const t = this.scheduleUpdate();
|
|
4149
|
+
return t != null && await t, !this.isUpdatePending;
|
|
4150
|
+
}
|
|
4151
|
+
scheduleUpdate() {
|
|
4152
|
+
return this.performUpdate();
|
|
4153
|
+
}
|
|
4154
|
+
performUpdate() {
|
|
4155
|
+
var n;
|
|
4156
|
+
if (!this.isUpdatePending) return;
|
|
4157
|
+
if (!this.hasUpdated) {
|
|
4158
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
4159
|
+
for (const [i, o] of this._$Ep) this[i] = o;
|
|
4160
|
+
this._$Ep = void 0;
|
|
4161
|
+
}
|
|
4162
|
+
const s = this.constructor.elementProperties;
|
|
4163
|
+
if (s.size > 0) for (const [i, o] of s) {
|
|
4164
|
+
const { wrapped: a } = o, c = this[i];
|
|
4165
|
+
a !== !0 || this._$AL.has(i) || c === void 0 || this.C(i, void 0, o, c);
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
let t = !1;
|
|
4169
|
+
const r = this._$AL;
|
|
4170
|
+
try {
|
|
4171
|
+
t = this.shouldUpdate(r), t ? (this.willUpdate(r), (n = this._$EO) == null || n.forEach((s) => {
|
|
4172
|
+
var i;
|
|
4173
|
+
return (i = s.hostUpdate) == null ? void 0 : i.call(s);
|
|
4174
|
+
}), this.update(r)) : this._$EM();
|
|
4175
|
+
} catch (s) {
|
|
4176
|
+
throw t = !1, this._$EM(), s;
|
|
4177
|
+
}
|
|
4178
|
+
t && this._$AE(r);
|
|
4179
|
+
}
|
|
4180
|
+
willUpdate(t) {
|
|
4181
|
+
}
|
|
4182
|
+
_$AE(t) {
|
|
4183
|
+
var r;
|
|
4184
|
+
(r = this._$EO) == null || r.forEach((n) => {
|
|
4185
|
+
var s;
|
|
4186
|
+
return (s = n.hostUpdated) == null ? void 0 : s.call(n);
|
|
4187
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
4188
|
+
}
|
|
4189
|
+
_$EM() {
|
|
4190
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
4191
|
+
}
|
|
4192
|
+
get updateComplete() {
|
|
4193
|
+
return this.getUpdateComplete();
|
|
4194
|
+
}
|
|
4195
|
+
getUpdateComplete() {
|
|
4196
|
+
return this._$ES;
|
|
4197
|
+
}
|
|
4198
|
+
shouldUpdate(t) {
|
|
4199
|
+
return !0;
|
|
4200
|
+
}
|
|
4201
|
+
update(t) {
|
|
4202
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((r) => this._$ET(r, this[r]))), this._$EM();
|
|
4203
|
+
}
|
|
4204
|
+
updated(t) {
|
|
4205
|
+
}
|
|
4206
|
+
firstUpdated(t) {
|
|
4207
|
+
}
|
|
4208
|
+
};
|
|
4209
|
+
vt.elementStyles = [], vt.shadowRootOptions = { mode: "open" }, vt[sr("elementProperties")] = /* @__PURE__ */ new Map(), vt[sr("finalized")] = /* @__PURE__ */ new Map(), En == null || En({ ReactiveElement: vt }), (ze.reactiveElementVersions ?? (ze.reactiveElementVersions = [])).push("2.1.2");
|
|
4210
|
+
/**
|
|
4211
|
+
* @license
|
|
4212
|
+
* Copyright 2017 Google LLC
|
|
4213
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4214
|
+
*/
|
|
4215
|
+
const ir = globalThis, ro = (e) => e, Dr = ir.trustedTypes, no = Dr ? Dr.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, m2 = "$lit$", Ge = `lit$${Math.random().toFixed(9).slice(2)}$`, y2 = "?" + Ge, Mc = `<${y2}>`, ft = document, dr = () => ft.createComment(""), fr = (e) => e === null || typeof e != "object" && typeof e != "function", zs = Array.isArray, Oc = (e) => zs(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", kn = `[
|
|
4216
|
+
\f\r]`, Zt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, so = /-->/g, io = />/g, Ze = RegExp(`>|${kn}(?:([^\\s"'>=/]+)(${kn}*=${kn}*(?:[^
|
|
4217
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), oo = /'/g, ao = /"/g, _2 = /^(?:script|style|textarea|title)$/i, Fc = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), Se = Fc(1), It = Symbol.for("lit-noChange"), z = Symbol.for("lit-nothing"), co = /* @__PURE__ */ new WeakMap(), nt = ft.createTreeWalker(ft, 129);
|
|
4218
|
+
function v2(e, t) {
|
|
4219
|
+
if (!zs(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
4220
|
+
return no !== void 0 ? no.createHTML(t) : t;
|
|
4221
|
+
}
|
|
4222
|
+
const Ic = (e, t) => {
|
|
4223
|
+
const r = e.length - 1, n = [];
|
|
4224
|
+
let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = Zt;
|
|
4225
|
+
for (let a = 0; a < r; a++) {
|
|
4226
|
+
const c = e[a];
|
|
4227
|
+
let u, h, l = -1, g = 0;
|
|
4228
|
+
for (; g < c.length && (o.lastIndex = g, h = o.exec(c), h !== null); ) g = o.lastIndex, o === Zt ? h[1] === "!--" ? o = so : h[1] !== void 0 ? o = io : h[2] !== void 0 ? (_2.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = Ze) : h[3] !== void 0 && (o = Ze) : o === Ze ? h[0] === ">" ? (o = s ?? Zt, l = -1) : h[1] === void 0 ? l = -2 : (l = o.lastIndex - h[2].length, u = h[1], o = h[3] === void 0 ? Ze : h[3] === '"' ? ao : oo) : o === ao || o === oo ? o = Ze : o === so || o === io ? o = Zt : (o = Ze, s = void 0);
|
|
4229
|
+
const _ = o === Ze && e[a + 1].startsWith("/>") ? " " : "";
|
|
4230
|
+
i += o === Zt ? c + Mc : l >= 0 ? (n.push(u), c.slice(0, l) + m2 + c.slice(l) + Ge + _) : c + Ge + (l === -2 ? a : _);
|
|
4231
|
+
}
|
|
4232
|
+
return [v2(e, i + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
|
|
4233
|
+
};
|
|
4234
|
+
class pr {
|
|
4235
|
+
constructor({ strings: t, _$litType$: r }, n) {
|
|
4236
|
+
let s;
|
|
4237
|
+
this.parts = [];
|
|
4238
|
+
let i = 0, o = 0;
|
|
4239
|
+
const a = t.length - 1, c = this.parts, [u, h] = Ic(t, r);
|
|
4240
|
+
if (this.el = pr.createElement(u, n), nt.currentNode = this.el.content, r === 2 || r === 3) {
|
|
4241
|
+
const l = this.el.content.firstChild;
|
|
4242
|
+
l.replaceWith(...l.childNodes);
|
|
4243
|
+
}
|
|
4244
|
+
for (; (s = nt.nextNode()) !== null && c.length < a; ) {
|
|
4245
|
+
if (s.nodeType === 1) {
|
|
4246
|
+
if (s.hasAttributes()) for (const l of s.getAttributeNames()) if (l.endsWith(m2)) {
|
|
4247
|
+
const g = h[o++], _ = s.getAttribute(l).split(Ge), k = /([.?@])?(.*)/.exec(g);
|
|
4248
|
+
c.push({ type: 1, index: i, name: k[2], strings: _, ctor: k[1] === "." ? Nc : k[1] === "?" ? Uc : k[1] === "@" ? Bc : ln }), s.removeAttribute(l);
|
|
4249
|
+
} else l.startsWith(Ge) && (c.push({ type: 6, index: i }), s.removeAttribute(l));
|
|
4250
|
+
if (_2.test(s.tagName)) {
|
|
4251
|
+
const l = s.textContent.split(Ge), g = l.length - 1;
|
|
4252
|
+
if (g > 0) {
|
|
4253
|
+
s.textContent = Dr ? Dr.emptyScript : "";
|
|
4254
|
+
for (let _ = 0; _ < g; _++) s.append(l[_], dr()), nt.nextNode(), c.push({ type: 2, index: ++i });
|
|
4255
|
+
s.append(l[g], dr());
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
} else if (s.nodeType === 8) if (s.data === y2) c.push({ type: 2, index: i });
|
|
4259
|
+
else {
|
|
4260
|
+
let l = -1;
|
|
4261
|
+
for (; (l = s.data.indexOf(Ge, l + 1)) !== -1; ) c.push({ type: 7, index: i }), l += Ge.length - 1;
|
|
4262
|
+
}
|
|
4263
|
+
i++;
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
static createElement(t, r) {
|
|
4267
|
+
const n = ft.createElement("template");
|
|
4268
|
+
return n.innerHTML = t, n;
|
|
4269
|
+
}
|
|
4270
|
+
}
|
|
4271
|
+
function Rt(e, t, r = e, n) {
|
|
4272
|
+
var o, a;
|
|
4273
|
+
if (t === It) return t;
|
|
4274
|
+
let s = n !== void 0 ? (o = r._$Co) == null ? void 0 : o[n] : r._$Cl;
|
|
4275
|
+
const i = fr(t) ? void 0 : t._$litDirective$;
|
|
4276
|
+
return (s == null ? void 0 : s.constructor) !== i && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), i === void 0 ? s = void 0 : (s = new i(e), s._$AT(e, r, n)), n !== void 0 ? (r._$Co ?? (r._$Co = []))[n] = s : r._$Cl = s), s !== void 0 && (t = Rt(e, s._$AS(e, t.values), s, n)), t;
|
|
4277
|
+
}
|
|
4278
|
+
class Rc {
|
|
4279
|
+
constructor(t, r) {
|
|
4280
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
|
|
4281
|
+
}
|
|
4282
|
+
get parentNode() {
|
|
4283
|
+
return this._$AM.parentNode;
|
|
4284
|
+
}
|
|
4285
|
+
get _$AU() {
|
|
4286
|
+
return this._$AM._$AU;
|
|
4287
|
+
}
|
|
4288
|
+
u(t) {
|
|
4289
|
+
const { el: { content: r }, parts: n } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? ft).importNode(r, !0);
|
|
4290
|
+
nt.currentNode = s;
|
|
4291
|
+
let i = nt.nextNode(), o = 0, a = 0, c = n[0];
|
|
4292
|
+
for (; c !== void 0; ) {
|
|
4293
|
+
if (o === c.index) {
|
|
4294
|
+
let u;
|
|
4295
|
+
c.type === 2 ? u = new Er(i, i.nextSibling, this, t) : c.type === 1 ? u = new c.ctor(i, c.name, c.strings, this, t) : c.type === 6 && (u = new Dc(i, this, t)), this._$AV.push(u), c = n[++a];
|
|
4296
|
+
}
|
|
4297
|
+
o !== (c == null ? void 0 : c.index) && (i = nt.nextNode(), o++);
|
|
4298
|
+
}
|
|
4299
|
+
return nt.currentNode = ft, s;
|
|
4300
|
+
}
|
|
4301
|
+
p(t) {
|
|
4302
|
+
let r = 0;
|
|
4303
|
+
for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, r), r += n.strings.length - 2) : n._$AI(t[r])), r++;
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
class Er {
|
|
4307
|
+
get _$AU() {
|
|
4308
|
+
var t;
|
|
4309
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
4310
|
+
}
|
|
4311
|
+
constructor(t, r, n, s) {
|
|
4312
|
+
this.type = 2, this._$AH = z, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = n, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
4313
|
+
}
|
|
4314
|
+
get parentNode() {
|
|
4315
|
+
let t = this._$AA.parentNode;
|
|
4316
|
+
const r = this._$AM;
|
|
4317
|
+
return r !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = r.parentNode), t;
|
|
4318
|
+
}
|
|
4319
|
+
get startNode() {
|
|
4320
|
+
return this._$AA;
|
|
4321
|
+
}
|
|
4322
|
+
get endNode() {
|
|
4323
|
+
return this._$AB;
|
|
4324
|
+
}
|
|
4325
|
+
_$AI(t, r = this) {
|
|
4326
|
+
t = Rt(this, t, r), fr(t) ? t === z || t == null || t === "" ? (this._$AH !== z && this._$AR(), this._$AH = z) : t !== this._$AH && t !== It && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Oc(t) ? this.k(t) : this._(t);
|
|
4327
|
+
}
|
|
4328
|
+
O(t) {
|
|
4329
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
4330
|
+
}
|
|
4331
|
+
T(t) {
|
|
4332
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
4333
|
+
}
|
|
4334
|
+
_(t) {
|
|
4335
|
+
this._$AH !== z && fr(this._$AH) ? this._$AA.nextSibling.data = t : this.T(ft.createTextNode(t)), this._$AH = t;
|
|
4336
|
+
}
|
|
4337
|
+
$(t) {
|
|
4338
|
+
var i;
|
|
4339
|
+
const { values: r, _$litType$: n } = t, s = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = pr.createElement(v2(n.h, n.h[0]), this.options)), n);
|
|
4340
|
+
if (((i = this._$AH) == null ? void 0 : i._$AD) === s) this._$AH.p(r);
|
|
4341
|
+
else {
|
|
4342
|
+
const o = new Rc(s, this), a = o.u(this.options);
|
|
4343
|
+
o.p(r), this.T(a), this._$AH = o;
|
|
4344
|
+
}
|
|
4345
|
+
}
|
|
4346
|
+
_$AC(t) {
|
|
4347
|
+
let r = co.get(t.strings);
|
|
4348
|
+
return r === void 0 && co.set(t.strings, r = new pr(t)), r;
|
|
4349
|
+
}
|
|
4350
|
+
k(t) {
|
|
4351
|
+
zs(this._$AH) || (this._$AH = [], this._$AR());
|
|
4352
|
+
const r = this._$AH;
|
|
4353
|
+
let n, s = 0;
|
|
4354
|
+
for (const i of t) s === r.length ? r.push(n = new Er(this.O(dr()), this.O(dr()), this, this.options)) : n = r[s], n._$AI(i), s++;
|
|
4355
|
+
s < r.length && (this._$AR(n && n._$AB.nextSibling, s), r.length = s);
|
|
4356
|
+
}
|
|
4357
|
+
_$AR(t = this._$AA.nextSibling, r) {
|
|
4358
|
+
var n;
|
|
4359
|
+
for ((n = this._$AP) == null ? void 0 : n.call(this, !1, !0, r); t !== this._$AB; ) {
|
|
4360
|
+
const s = ro(t).nextSibling;
|
|
4361
|
+
ro(t).remove(), t = s;
|
|
4362
|
+
}
|
|
4363
|
+
}
|
|
4364
|
+
setConnected(t) {
|
|
4365
|
+
var r;
|
|
4366
|
+
this._$AM === void 0 && (this._$Cv = t, (r = this._$AP) == null || r.call(this, t));
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
class ln {
|
|
4370
|
+
get tagName() {
|
|
4371
|
+
return this.element.tagName;
|
|
4372
|
+
}
|
|
4373
|
+
get _$AU() {
|
|
4374
|
+
return this._$AM._$AU;
|
|
4375
|
+
}
|
|
4376
|
+
constructor(t, r, n, s, i) {
|
|
4377
|
+
this.type = 1, this._$AH = z, this._$AN = void 0, this.element = t, this.name = r, this._$AM = s, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = z;
|
|
4378
|
+
}
|
|
4379
|
+
_$AI(t, r = this, n, s) {
|
|
4380
|
+
const i = this.strings;
|
|
4381
|
+
let o = !1;
|
|
4382
|
+
if (i === void 0) t = Rt(this, t, r, 0), o = !fr(t) || t !== this._$AH && t !== It, o && (this._$AH = t);
|
|
4383
|
+
else {
|
|
4384
|
+
const a = t;
|
|
4385
|
+
let c, u;
|
|
4386
|
+
for (t = i[0], c = 0; c < i.length - 1; c++) u = Rt(this, a[n + c], r, c), u === It && (u = this._$AH[c]), o || (o = !fr(u) || u !== this._$AH[c]), u === z ? t = z : t !== z && (t += (u ?? "") + i[c + 1]), this._$AH[c] = u;
|
|
4387
|
+
}
|
|
4388
|
+
o && !s && this.j(t);
|
|
4389
|
+
}
|
|
4390
|
+
j(t) {
|
|
4391
|
+
t === z ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
class Nc extends ln {
|
|
4395
|
+
constructor() {
|
|
4396
|
+
super(...arguments), this.type = 3;
|
|
4397
|
+
}
|
|
4398
|
+
j(t) {
|
|
4399
|
+
this.element[this.name] = t === z ? void 0 : t;
|
|
4400
|
+
}
|
|
4401
|
+
}
|
|
4402
|
+
class Uc extends ln {
|
|
4403
|
+
constructor() {
|
|
4404
|
+
super(...arguments), this.type = 4;
|
|
4405
|
+
}
|
|
4406
|
+
j(t) {
|
|
4407
|
+
this.element.toggleAttribute(this.name, !!t && t !== z);
|
|
4408
|
+
}
|
|
4409
|
+
}
|
|
4410
|
+
class Bc extends ln {
|
|
4411
|
+
constructor(t, r, n, s, i) {
|
|
4412
|
+
super(t, r, n, s, i), this.type = 5;
|
|
4413
|
+
}
|
|
4414
|
+
_$AI(t, r = this) {
|
|
4415
|
+
if ((t = Rt(this, t, r, 0) ?? z) === It) return;
|
|
4416
|
+
const n = this._$AH, s = t === z && n !== z || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, i = t !== z && (n === z || s);
|
|
4417
|
+
s && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
4418
|
+
}
|
|
4419
|
+
handleEvent(t) {
|
|
4420
|
+
var r;
|
|
4421
|
+
typeof this._$AH == "function" ? this._$AH.call(((r = this.options) == null ? void 0 : r.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
class Dc {
|
|
4425
|
+
constructor(t, r, n) {
|
|
4426
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = n;
|
|
4427
|
+
}
|
|
4428
|
+
get _$AU() {
|
|
4429
|
+
return this._$AM._$AU;
|
|
4430
|
+
}
|
|
4431
|
+
_$AI(t) {
|
|
4432
|
+
Rt(this, t);
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
const Sn = ir.litHtmlPolyfillSupport;
|
|
4436
|
+
Sn == null || Sn(pr, Er), (ir.litHtmlVersions ?? (ir.litHtmlVersions = [])).push("3.3.2");
|
|
4437
|
+
const jc = (e, t, r) => {
|
|
4438
|
+
const n = (r == null ? void 0 : r.renderBefore) ?? t;
|
|
4439
|
+
let s = n._$litPart$;
|
|
4440
|
+
if (s === void 0) {
|
|
4441
|
+
const i = (r == null ? void 0 : r.renderBefore) ?? null;
|
|
4442
|
+
n._$litPart$ = s = new Er(t.insertBefore(dr(), i), i, void 0, r ?? {});
|
|
4443
|
+
}
|
|
4444
|
+
return s._$AI(e), s;
|
|
4445
|
+
};
|
|
4446
|
+
/**
|
|
4447
|
+
* @license
|
|
4448
|
+
* Copyright 2017 Google LLC
|
|
4449
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4450
|
+
*/
|
|
4451
|
+
const ht = globalThis;
|
|
4452
|
+
class or extends vt {
|
|
4453
|
+
constructor() {
|
|
4454
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
4455
|
+
}
|
|
4456
|
+
createRenderRoot() {
|
|
4457
|
+
var r;
|
|
4458
|
+
const t = super.createRenderRoot();
|
|
4459
|
+
return (r = this.renderOptions).renderBefore ?? (r.renderBefore = t.firstChild), t;
|
|
4460
|
+
}
|
|
4461
|
+
update(t) {
|
|
4462
|
+
const r = this.render();
|
|
4463
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = jc(r, this.renderRoot, this.renderOptions);
|
|
4464
|
+
}
|
|
4465
|
+
connectedCallback() {
|
|
4466
|
+
var t;
|
|
4467
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
4468
|
+
}
|
|
4469
|
+
disconnectedCallback() {
|
|
4470
|
+
var t;
|
|
4471
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
4472
|
+
}
|
|
4473
|
+
render() {
|
|
4474
|
+
return It;
|
|
4475
|
+
}
|
|
4476
|
+
}
|
|
4477
|
+
var ho;
|
|
4478
|
+
or._$litElement$ = !0, or.finalized = !0, (ho = ht.litElementHydrateSupport) == null || ho.call(ht, { LitElement: or });
|
|
4479
|
+
const Tn = ht.litElementPolyfillSupport;
|
|
4480
|
+
Tn == null || Tn({ LitElement: or });
|
|
4481
|
+
(ht.litElementVersions ?? (ht.litElementVersions = [])).push("4.2.2");
|
|
4482
|
+
/**
|
|
4483
|
+
* @license
|
|
4484
|
+
* Copyright 2017 Google LLC
|
|
4485
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4486
|
+
*/
|
|
4487
|
+
const Vc = (e) => (t, r) => {
|
|
4488
|
+
r !== void 0 ? r.addInitializer(() => {
|
|
4489
|
+
customElements.define(e, t);
|
|
4490
|
+
}) : customElements.define(e, t);
|
|
4491
|
+
};
|
|
4492
|
+
/**
|
|
4493
|
+
* @license
|
|
4494
|
+
* Copyright 2017 Google LLC
|
|
4495
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4496
|
+
*/
|
|
4497
|
+
const Gc = { attribute: !0, type: String, converter: Br, reflect: !1, hasChanged: Hs }, Hc = (e = Gc, t, r) => {
|
|
4498
|
+
const { kind: n, metadata: s } = r;
|
|
4499
|
+
let i = globalThis.litPropertyMetadata.get(s);
|
|
4500
|
+
if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), n === "setter" && ((e = Object.create(e)).wrapped = !0), i.set(r.name, e), n === "accessor") {
|
|
4501
|
+
const { name: o } = r;
|
|
4502
|
+
return { set(a) {
|
|
4503
|
+
const c = t.get.call(this);
|
|
4504
|
+
t.set.call(this, a), this.requestUpdate(o, c, e, !0, a);
|
|
4505
|
+
}, init(a) {
|
|
4506
|
+
return a !== void 0 && this.C(o, void 0, e, a), a;
|
|
4507
|
+
} };
|
|
4508
|
+
}
|
|
4509
|
+
if (n === "setter") {
|
|
4510
|
+
const { name: o } = r;
|
|
4511
|
+
return function(a) {
|
|
4512
|
+
const c = this[o];
|
|
4513
|
+
t.call(this, a), this.requestUpdate(o, c, e, !0, a);
|
|
4514
|
+
};
|
|
4515
|
+
}
|
|
4516
|
+
throw Error("Unsupported decorator location: " + n);
|
|
4517
|
+
};
|
|
4518
|
+
function b2(e) {
|
|
4519
|
+
return (t, r) => typeof r == "object" ? Hc(e, t, r) : ((n, s, i) => {
|
|
4520
|
+
const o = s.hasOwnProperty(i);
|
|
4521
|
+
return s.constructor.createProperty(i, n), o ? Object.getOwnPropertyDescriptor(s, i) : void 0;
|
|
4522
|
+
})(e, t, r);
|
|
4523
|
+
}
|
|
4524
|
+
/**
|
|
4525
|
+
* @license
|
|
4526
|
+
* Copyright 2017 Google LLC
|
|
4527
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4528
|
+
*/
|
|
4529
|
+
function dn(e) {
|
|
4530
|
+
return b2({ ...e, state: !0, attribute: !1 });
|
|
4531
|
+
}
|
|
4532
|
+
var zc = Object.defineProperty, Wc = Object.getOwnPropertyDescriptor, Xt = (e, t, r, n) => {
|
|
4533
|
+
for (var s = n > 1 ? void 0 : n ? Wc(t, r) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4534
|
+
(o = e[i]) && (s = (n ? o(t, r, s) : o(s)) || s);
|
|
4535
|
+
return n && s && zc(t, r, s), s;
|
|
4536
|
+
};
|
|
4537
|
+
let qe = class extends or {
|
|
4538
|
+
constructor() {
|
|
4539
|
+
super(...arguments), this.label = "Take a selfie", this.captureState = "idle", this.previewUrl = "", this.qualityResult = null, this.errorMessage = "", this.capturedBlob = null;
|
|
4540
|
+
}
|
|
4541
|
+
render() {
|
|
4542
|
+
return Se`
|
|
4543
|
+
<div class="container">
|
|
4544
|
+
${this.renderState()}
|
|
4545
|
+
</div>
|
|
4546
|
+
`;
|
|
4547
|
+
}
|
|
4548
|
+
renderState() {
|
|
4549
|
+
var e, t;
|
|
4550
|
+
switch (this.captureState) {
|
|
4551
|
+
case "idle":
|
|
4552
|
+
return Se`
|
|
4553
|
+
<p>${this.label}</p>
|
|
4554
|
+
<button class="btn btn-primary" @click=${this.handleCapture}>
|
|
4555
|
+
📷 Open Camera
|
|
4556
|
+
</button>
|
|
4557
|
+
`;
|
|
4558
|
+
case "capturing":
|
|
4559
|
+
return Se`
|
|
4560
|
+
<p>Opening camera...</p>
|
|
4561
|
+
<div class="spinner"></div>
|
|
4562
|
+
`;
|
|
4563
|
+
case "analyzing":
|
|
4564
|
+
return Se`
|
|
4565
|
+
<p>Checking image quality...</p>
|
|
4566
|
+
<div class="spinner"></div>
|
|
4567
|
+
`;
|
|
4568
|
+
case "preview":
|
|
4569
|
+
return Se`
|
|
4570
|
+
${this.previewUrl ? Se`<img class="preview-img" src=${this.previewUrl} alt="Captured face" />` : ""}
|
|
4571
|
+
${this.qualityResult ? Se`
|
|
4572
|
+
<div class="quality-msg ${this.qualityResult.isCentered && this.qualityResult.hasFace ? "quality-good" : "quality-bad"}">
|
|
4573
|
+
${this.qualityResult.message}
|
|
4574
|
+
</div>
|
|
4575
|
+
` : ""}
|
|
4576
|
+
${(e = this.qualityResult) != null && e.isCentered && ((t = this.qualityResult) != null && t.hasFace) ? Se`
|
|
4577
|
+
<button class="btn btn-primary" @click=${this.handleConfirm}>✓ Use this photo</button>
|
|
4578
|
+
<button class="btn btn-secondary" @click=${this.handleRetake}>↻ Retake</button>
|
|
4579
|
+
` : Se`
|
|
4580
|
+
<button class="btn btn-primary" @click=${this.handleRetake}>↻ Try again</button>
|
|
4581
|
+
<button class="btn btn-secondary" @click=${this.handleCancel}>Cancel</button>
|
|
4582
|
+
`}
|
|
4583
|
+
`;
|
|
4584
|
+
case "error":
|
|
4585
|
+
return Se`
|
|
4586
|
+
<div class="quality-msg quality-bad">${this.errorMessage}</div>
|
|
4587
|
+
<button class="btn btn-primary" @click=${this.handleRetake}>↻ Try again</button>
|
|
4588
|
+
<button class="btn btn-secondary" @click=${this.handleCancel}>Cancel</button>
|
|
4589
|
+
`;
|
|
4590
|
+
}
|
|
4591
|
+
}
|
|
4592
|
+
async handleCapture() {
|
|
4593
|
+
this.captureState = "capturing";
|
|
4594
|
+
try {
|
|
4595
|
+
const e = await lo();
|
|
4596
|
+
if (!e) {
|
|
4597
|
+
this.captureState = "idle";
|
|
4598
|
+
return;
|
|
4599
|
+
}
|
|
4600
|
+
this.captureState = "analyzing", this.capturedBlob = e, this.previewUrl = await x2(e);
|
|
4601
|
+
const t = await fo(e);
|
|
4602
|
+
this.qualityResult = await p2(t), this.captureState = "preview";
|
|
4603
|
+
} catch (e) {
|
|
4604
|
+
this.errorMessage = e instanceof Error ? e.message : "Capture failed", this.captureState = "error", this.dispatchEvent(new CustomEvent("simface-error", {
|
|
4605
|
+
detail: { error: this.errorMessage },
|
|
4606
|
+
bubbles: !0,
|
|
4607
|
+
composed: !0
|
|
4608
|
+
}));
|
|
4609
|
+
}
|
|
4610
|
+
}
|
|
4611
|
+
handleConfirm() {
|
|
4612
|
+
this.capturedBlob && (this.dispatchEvent(new CustomEvent("simface-captured", {
|
|
4613
|
+
detail: { imageBlob: this.capturedBlob },
|
|
4614
|
+
bubbles: !0,
|
|
4615
|
+
composed: !0
|
|
4616
|
+
})), this.reset());
|
|
4617
|
+
}
|
|
4618
|
+
handleRetake() {
|
|
4619
|
+
this.reset(), this.handleCapture();
|
|
4620
|
+
}
|
|
4621
|
+
handleCancel() {
|
|
4622
|
+
this.dispatchEvent(new CustomEvent("simface-cancelled", {
|
|
4623
|
+
bubbles: !0,
|
|
4624
|
+
composed: !0
|
|
4625
|
+
})), this.reset();
|
|
4626
|
+
}
|
|
4627
|
+
reset() {
|
|
4628
|
+
this.captureState = "idle", this.previewUrl = "", this.qualityResult = null, this.capturedBlob = null, this.errorMessage = "";
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
qe.styles = Ec`
|
|
4632
|
+
:host {
|
|
4633
|
+
display: block;
|
|
4634
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4635
|
+
max-width: 400px;
|
|
4636
|
+
margin: 0 auto;
|
|
4637
|
+
text-align: center;
|
|
4638
|
+
}
|
|
4639
|
+
|
|
4640
|
+
.container {
|
|
4641
|
+
padding: 16px;
|
|
4642
|
+
border: 1px solid #e0e0e0;
|
|
4643
|
+
border-radius: 12px;
|
|
4644
|
+
background: #fafafa;
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
.preview-img {
|
|
4648
|
+
max-width: 100%;
|
|
4649
|
+
border-radius: 8px;
|
|
4650
|
+
margin: 12px 0;
|
|
4651
|
+
}
|
|
4652
|
+
|
|
4653
|
+
.btn {
|
|
4654
|
+
display: inline-block;
|
|
4655
|
+
padding: 12px 24px;
|
|
4656
|
+
margin: 8px 4px;
|
|
4657
|
+
border: none;
|
|
4658
|
+
border-radius: 8px;
|
|
4659
|
+
font-size: 16px;
|
|
4660
|
+
font-weight: 600;
|
|
4661
|
+
cursor: pointer;
|
|
4662
|
+
transition: background-color 0.2s;
|
|
4663
|
+
}
|
|
4664
|
+
|
|
4665
|
+
.btn-primary {
|
|
4666
|
+
background: #2563eb;
|
|
4667
|
+
color: white;
|
|
4668
|
+
}
|
|
4669
|
+
.btn-primary:hover { background: #1d4ed8; }
|
|
4670
|
+
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
|
|
4671
|
+
|
|
4672
|
+
.btn-secondary {
|
|
4673
|
+
background: #e5e7eb;
|
|
4674
|
+
color: #374151;
|
|
4675
|
+
}
|
|
4676
|
+
.btn-secondary:hover { background: #d1d5db; }
|
|
4677
|
+
|
|
4678
|
+
.btn-danger {
|
|
4679
|
+
background: #ef4444;
|
|
4680
|
+
color: white;
|
|
4681
|
+
}
|
|
4682
|
+
.btn-danger:hover { background: #dc2626; }
|
|
4683
|
+
|
|
4684
|
+
.quality-msg {
|
|
4685
|
+
padding: 8px 12px;
|
|
4686
|
+
border-radius: 6px;
|
|
4687
|
+
margin: 8px 0;
|
|
4688
|
+
font-size: 14px;
|
|
4689
|
+
}
|
|
4690
|
+
|
|
4691
|
+
.quality-good { background: #dcfce7; color: #166534; }
|
|
4692
|
+
.quality-bad { background: #fef2f2; color: #991b1b; }
|
|
4693
|
+
|
|
4694
|
+
.spinner {
|
|
4695
|
+
display: inline-block;
|
|
4696
|
+
width: 24px;
|
|
4697
|
+
height: 24px;
|
|
4698
|
+
border: 3px solid #e5e7eb;
|
|
4699
|
+
border-top: 3px solid #2563eb;
|
|
4700
|
+
border-radius: 50%;
|
|
4701
|
+
animation: spin 0.8s linear infinite;
|
|
4702
|
+
margin: 12px auto;
|
|
4703
|
+
}
|
|
4704
|
+
|
|
4705
|
+
@keyframes spin {
|
|
4706
|
+
to { transform: rotate(360deg); }
|
|
4707
|
+
}
|
|
4708
|
+
`;
|
|
4709
|
+
Xt([
|
|
4710
|
+
b2({ type: String })
|
|
4711
|
+
], qe.prototype, "label", 2);
|
|
4712
|
+
Xt([
|
|
4713
|
+
dn()
|
|
4714
|
+
], qe.prototype, "captureState", 2);
|
|
4715
|
+
Xt([
|
|
4716
|
+
dn()
|
|
4717
|
+
], qe.prototype, "previewUrl", 2);
|
|
4718
|
+
Xt([
|
|
4719
|
+
dn()
|
|
4720
|
+
], qe.prototype, "qualityResult", 2);
|
|
4721
|
+
Xt([
|
|
4722
|
+
dn()
|
|
4723
|
+
], qe.prototype, "errorMessage", 2);
|
|
4724
|
+
qe = Xt([
|
|
4725
|
+
Vc("simface-capture")
|
|
4726
|
+
], qe);
|
|
4727
|
+
async function Yc(e, t) {
|
|
4728
|
+
const r = new uo(e);
|
|
4729
|
+
await r.validateAPIKey();
|
|
4730
|
+
const n = await w2();
|
|
4731
|
+
if (!n)
|
|
4732
|
+
return { success: !1, clientId: t, message: "Capture cancelled by user" };
|
|
4733
|
+
const s = await r.enroll(t, n);
|
|
4734
|
+
return s.alreadyEnrolled, s;
|
|
4735
|
+
}
|
|
4736
|
+
async function Jc(e, t) {
|
|
4737
|
+
const r = new uo(e);
|
|
4738
|
+
await r.validateAPIKey();
|
|
4739
|
+
const n = await w2();
|
|
4740
|
+
return n ? r.verify(t, n) : { match: !1, score: 0, threshold: 0, message: "Capture cancelled by user" };
|
|
4741
|
+
}
|
|
4742
|
+
async function w2() {
|
|
4743
|
+
for (let t = 0; t < 5; t++) {
|
|
4744
|
+
const r = await lo();
|
|
4745
|
+
if (!r) return null;
|
|
4746
|
+
const n = await fo(r), s = await p2(n);
|
|
4747
|
+
if (s.hasFace && s.isCentered || t === 4 && s.hasFace)
|
|
4748
|
+
return r;
|
|
4749
|
+
}
|
|
4750
|
+
return null;
|
|
4751
|
+
}
|
|
4752
|
+
export {
|
|
4753
|
+
uo as SimFaceAPIClient,
|
|
4754
|
+
qe as SimFaceCapture,
|
|
4755
|
+
p2 as assessFaceQuality,
|
|
4756
|
+
x2 as blobToDataURL,
|
|
4757
|
+
fo as blobToImage,
|
|
4758
|
+
lo as captureFromCamera,
|
|
4759
|
+
Yc as enroll,
|
|
4760
|
+
Jc as verify
|
|
4761
|
+
};
|