interview-widget 3.2.17 → 3.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/interview/proctoring/gaze-detection/hooks/use-warning-manager.d.ts +2 -2
- package/dist/{widget.3.2.17.css → widget.3.2.19.css} +1 -1
- package/dist/{widget.es.3.2.17.js → widget.es.3.2.19.js} +974 -958
- package/dist/{widget.umd.3.2.17.js → widget.umd.3.2.19.js} +5 -5
- package/package.json +9 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var me = (e, t, i) =>
|
|
1
|
+
var jl = Object.defineProperty;
|
|
2
|
+
var $l = (e, t, i) => t in e ? jl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var me = (e, t, i) => $l(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
import { jsx as c, jsxs as m, Fragment as bt } from "react/jsx-runtime";
|
|
5
|
-
import Ht, { createContext as io, useContext as
|
|
6
|
-
import { createPortal as
|
|
5
|
+
import Ht, { createContext as io, useContext as Ii, useSyncExternalStore as ro, useRef as P, useCallback as D, useMemo as lr, useState as N, useEffect as B, forwardRef as ba, useImperativeHandle as va } from "react";
|
|
6
|
+
import { createPortal as zl } from "react-dom";
|
|
7
7
|
const _n = {}, it = {
|
|
8
8
|
api: {
|
|
9
9
|
baseUrl: "/api",
|
|
@@ -40,11 +40,11 @@ const _n = {}, it = {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}, no = "iw-storage";
|
|
43
|
-
function
|
|
43
|
+
function Wl() {
|
|
44
44
|
if (!(typeof import.meta < "u" && (_n != null && _n.VITE_IW_SECRET)))
|
|
45
45
|
return typeof process < "u" && process.env.NEXT_PUBLIC_IW_SECRET ? process.env.NEXT_PUBLIC_IW_SECRET : typeof window < "u" && window.__IW_SECRET__ ? window.__IW_SECRET__ : "proctoring-data-seed";
|
|
46
46
|
}
|
|
47
|
-
const xa =
|
|
47
|
+
const xa = Wl(), Hr = 30, Hl = {
|
|
48
48
|
SCREENSHOT: "screenshot"
|
|
49
49
|
}, oo = "AES-GCM", Dn = 12;
|
|
50
50
|
async function Ea(e) {
|
|
@@ -54,12 +54,12 @@ async function Ea(e) {
|
|
|
54
54
|
"decrypt"
|
|
55
55
|
]);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ql() {
|
|
58
58
|
return crypto.getRandomValues(new Uint8Array(Dn));
|
|
59
59
|
}
|
|
60
|
-
async function
|
|
60
|
+
async function Kl(e, t = "default-seed") {
|
|
61
61
|
try {
|
|
62
|
-
const i = typeof e == "string" ? e : JSON.stringify(e), n = new TextEncoder().encode(i), o = await Ea(t), s =
|
|
62
|
+
const i = typeof e == "string" ? e : JSON.stringify(e), n = new TextEncoder().encode(i), o = await Ea(t), s = ql(), a = await crypto.subtle.encrypt(
|
|
63
63
|
{ name: oo, iv: s },
|
|
64
64
|
o,
|
|
65
65
|
n
|
|
@@ -69,7 +69,7 @@ async function ql(e, t = "default-seed") {
|
|
|
69
69
|
throw console.error("Encryption failed:", i), new Error("Failed to encrypt data");
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
async function
|
|
72
|
+
async function Yl(e, t = "default-seed") {
|
|
73
73
|
try {
|
|
74
74
|
const i = atob(e), r = new Uint8Array(i.length);
|
|
75
75
|
for (let d = 0; d < i.length; d++)
|
|
@@ -84,22 +84,22 @@ async function Kl(e, t = "default-seed") {
|
|
|
84
84
|
throw console.error("Decryption failed:", i), new Error("Failed to decrypt data");
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
async function Yl(e, t = "default-seed") {
|
|
88
|
-
return ql(e, t);
|
|
89
|
-
}
|
|
90
87
|
async function Xl(e, t = "default-seed") {
|
|
91
|
-
|
|
88
|
+
return Kl(e, t);
|
|
89
|
+
}
|
|
90
|
+
async function Ql(e, t = "default-seed") {
|
|
91
|
+
const i = await Yl(e, t);
|
|
92
92
|
try {
|
|
93
93
|
return JSON.parse(i);
|
|
94
94
|
} catch {
|
|
95
95
|
return i;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
const mr = io(null),
|
|
98
|
+
const mr = io(null), Jl = async () => {
|
|
99
99
|
try {
|
|
100
100
|
const e = sessionStorage.getItem(no);
|
|
101
101
|
if (e) {
|
|
102
|
-
const i = (await
|
|
102
|
+
const i = (await Ql(e, xa)).state;
|
|
103
103
|
return {
|
|
104
104
|
logViolations: (i == null ? void 0 : i.logViolations) || [],
|
|
105
105
|
totalViolations: (i == null ? void 0 : i.totalViolations) || 0,
|
|
@@ -136,9 +136,9 @@ const mr = io(null), Ql = async () => {
|
|
|
136
136
|
referenceSet: !1,
|
|
137
137
|
referenceRef: { x: 0.5, y: 0.5, noseX: 0.5, noseY: 0.5 }
|
|
138
138
|
};
|
|
139
|
-
},
|
|
139
|
+
}, er = async (e) => {
|
|
140
140
|
try {
|
|
141
|
-
const t = await
|
|
141
|
+
const t = await Xl(
|
|
142
142
|
{
|
|
143
143
|
state: e,
|
|
144
144
|
version: 0
|
|
@@ -149,10 +149,10 @@ const mr = io(null), Ql = async () => {
|
|
|
149
149
|
} catch (t) {
|
|
150
150
|
console.error("Failed to save proctoring data to session storage:", t);
|
|
151
151
|
}
|
|
152
|
-
},
|
|
152
|
+
}, Zl = ({
|
|
153
153
|
children: e
|
|
154
154
|
}) => {
|
|
155
|
-
const t =
|
|
155
|
+
const t = P({
|
|
156
156
|
logViolations: [],
|
|
157
157
|
totalViolations: 0,
|
|
158
158
|
gazeViolationCounters: {
|
|
@@ -163,41 +163,41 @@ const mr = io(null), Ql = async () => {
|
|
|
163
163
|
},
|
|
164
164
|
referenceSet: !1,
|
|
165
165
|
referenceRef: { x: 0.5, y: 0.5, noseX: 0.5, noseY: 0.5 }
|
|
166
|
-
}), i =
|
|
166
|
+
}), i = P(/* @__PURE__ */ new Set());
|
|
167
167
|
Ht.useEffect(() => {
|
|
168
|
-
|
|
168
|
+
Jl().then((w) => {
|
|
169
169
|
t.current = w, r();
|
|
170
170
|
});
|
|
171
171
|
}, []);
|
|
172
|
-
const r =
|
|
172
|
+
const r = D(() => {
|
|
173
173
|
i.current.forEach((w) => w());
|
|
174
|
-
}, []), n =
|
|
174
|
+
}, []), n = D((w) => (i.current.add(w), () => {
|
|
175
175
|
i.current.delete(w);
|
|
176
|
-
}), []), o =
|
|
176
|
+
}), []), o = D(() => t.current, []), s = D(
|
|
177
177
|
(w) => {
|
|
178
178
|
t.current = {
|
|
179
179
|
...t.current,
|
|
180
180
|
logViolations: [...t.current.logViolations, w],
|
|
181
181
|
totalViolations: t.current.totalViolations + 1
|
|
182
|
-
},
|
|
182
|
+
}, er(t.current), r();
|
|
183
183
|
},
|
|
184
184
|
[r]
|
|
185
|
-
), a =
|
|
185
|
+
), a = D(
|
|
186
186
|
(w) => {
|
|
187
187
|
const f = { ...t.current.gazeViolationCounters };
|
|
188
188
|
w === "looking_away" && (f.lookingAwayCount += 1), w === "no_face_detected" && (f.noFaceDetectedCount += 1), w === "multiple_faces" && (f.multipleFacesCount += 1), f.totalGazeViolations = f.lookingAwayCount + f.noFaceDetectedCount + f.multipleFacesCount, t.current = {
|
|
189
189
|
...t.current,
|
|
190
190
|
gazeViolationCounters: f
|
|
191
|
-
},
|
|
191
|
+
}, er(t.current), r();
|
|
192
192
|
},
|
|
193
193
|
[r]
|
|
194
|
-
), l =
|
|
194
|
+
), l = D(() => {
|
|
195
195
|
t.current = {
|
|
196
196
|
...t.current,
|
|
197
197
|
logViolations: [],
|
|
198
198
|
totalViolations: 0
|
|
199
|
-
},
|
|
200
|
-
}, [r]), d =
|
|
199
|
+
}, er(t.current), r();
|
|
200
|
+
}, [r]), d = D(() => {
|
|
201
201
|
t.current = {
|
|
202
202
|
...t.current,
|
|
203
203
|
gazeViolationCounters: {
|
|
@@ -206,17 +206,17 @@ const mr = io(null), Ql = async () => {
|
|
|
206
206
|
multipleFacesCount: 0,
|
|
207
207
|
totalGazeViolations: 0
|
|
208
208
|
}
|
|
209
|
-
},
|
|
210
|
-
}, [r]), u =
|
|
209
|
+
}, er(t.current), r();
|
|
210
|
+
}, [r]), u = D(
|
|
211
211
|
(w, f) => {
|
|
212
212
|
t.current = {
|
|
213
213
|
...t.current,
|
|
214
214
|
referenceSet: w,
|
|
215
215
|
referenceRef: f
|
|
216
|
-
},
|
|
216
|
+
}, er(t.current), r();
|
|
217
217
|
},
|
|
218
218
|
[r]
|
|
219
|
-
), h =
|
|
219
|
+
), h = lr(
|
|
220
220
|
() => ({
|
|
221
221
|
getState: o,
|
|
222
222
|
addViolation: s,
|
|
@@ -238,7 +238,7 @@ const mr = io(null), Ql = async () => {
|
|
|
238
238
|
);
|
|
239
239
|
return /* @__PURE__ */ c(mr.Provider, { value: h, children: e });
|
|
240
240
|
}, _a = () => {
|
|
241
|
-
const e =
|
|
241
|
+
const e = Ii(mr);
|
|
242
242
|
if (!e)
|
|
243
243
|
throw new Error(
|
|
244
244
|
"useProctoringStore must be used within a ProctoringProvider"
|
|
@@ -263,8 +263,8 @@ const mr = io(null), Ql = async () => {
|
|
|
263
263
|
clearGazeViolationCounters: e.clearGazeViolationCounters,
|
|
264
264
|
setReferenceData: e.setReferenceData
|
|
265
265
|
};
|
|
266
|
-
},
|
|
267
|
-
const e =
|
|
266
|
+
}, eu = () => {
|
|
267
|
+
const e = Ii(mr);
|
|
268
268
|
if (!e)
|
|
269
269
|
throw new Error("useViolations must be used within a ProctoringProvider");
|
|
270
270
|
return ro(
|
|
@@ -272,8 +272,8 @@ const mr = io(null), Ql = async () => {
|
|
|
272
272
|
() => e.getState().logViolations,
|
|
273
273
|
() => e.getState().logViolations
|
|
274
274
|
);
|
|
275
|
-
},
|
|
276
|
-
const e =
|
|
275
|
+
}, tu = () => {
|
|
276
|
+
const e = Ii(mr);
|
|
277
277
|
if (!e)
|
|
278
278
|
throw new Error(
|
|
279
279
|
"useTotalViolations must be used within a ProctoringProvider"
|
|
@@ -283,8 +283,8 @@ const mr = io(null), Ql = async () => {
|
|
|
283
283
|
() => e.getState().totalViolations,
|
|
284
284
|
() => e.getState().totalViolations
|
|
285
285
|
);
|
|
286
|
-
},
|
|
287
|
-
const e =
|
|
286
|
+
}, iu = () => {
|
|
287
|
+
const e = Ii(mr);
|
|
288
288
|
if (!e)
|
|
289
289
|
throw new Error(
|
|
290
290
|
"useProctoringActions must be used within a ProctoringProvider"
|
|
@@ -296,7 +296,7 @@ const mr = io(null), Ql = async () => {
|
|
|
296
296
|
}, ka = io(
|
|
297
297
|
null
|
|
298
298
|
);
|
|
299
|
-
function
|
|
299
|
+
function ru({
|
|
300
300
|
config: e = {},
|
|
301
301
|
children: t
|
|
302
302
|
}) {
|
|
@@ -335,10 +335,10 @@ function iu({
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
|
-
return /* @__PURE__ */ c(ka.Provider, { value: i, children: /* @__PURE__ */ c(
|
|
338
|
+
return /* @__PURE__ */ c(ka.Provider, { value: i, children: /* @__PURE__ */ c(Zl, { children: t }) });
|
|
339
339
|
}
|
|
340
340
|
function qr() {
|
|
341
|
-
const e =
|
|
341
|
+
const e = Ii(ka);
|
|
342
342
|
if (!e)
|
|
343
343
|
throw new Error(
|
|
344
344
|
"useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>"
|
|
@@ -348,13 +348,13 @@ function qr() {
|
|
|
348
348
|
function Aa() {
|
|
349
349
|
return qr().api || it.api;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Fi() {
|
|
352
352
|
return qr().ui || it.ui;
|
|
353
353
|
}
|
|
354
354
|
function gr() {
|
|
355
355
|
return qr().interview || it.interview;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function nu(e) {
|
|
358
358
|
const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
359
359
|
return t ? {
|
|
360
360
|
r: parseInt(t[1], 16),
|
|
@@ -362,26 +362,26 @@ function ru(e) {
|
|
|
362
362
|
b: parseInt(t[3], 16)
|
|
363
363
|
} : null;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function ou(e, t, i) {
|
|
366
366
|
return "#" + [e, t, i].map((r) => {
|
|
367
367
|
const n = Math.round(r).toString(16);
|
|
368
368
|
return n.length === 1 ? "0" + n : n;
|
|
369
369
|
}).join("");
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
const i =
|
|
371
|
+
function su(e, t) {
|
|
372
|
+
const i = nu(e);
|
|
373
373
|
if (!i) return e;
|
|
374
374
|
const r = i.r + (255 - i.r) * t, n = i.g + (255 - i.g) * t, o = i.b + (255 - i.b) * t;
|
|
375
|
-
return
|
|
375
|
+
return ou(r, n, o);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function au(e) {
|
|
378
378
|
return new Promise((t) => setTimeout(t, e));
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return `linear-gradient(to left, ${
|
|
380
|
+
function cu(e) {
|
|
381
|
+
return `linear-gradient(to left, ${su(e, 0.4)}, ${e})`;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
function
|
|
383
|
+
const lu = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
384
|
+
function uu(e) {
|
|
385
385
|
try {
|
|
386
386
|
const t = e.split(".");
|
|
387
387
|
if (t.length !== 3 || !t[1])
|
|
@@ -395,7 +395,7 @@ function lu(e) {
|
|
|
395
395
|
return console.error("Error decoding JWT:", t), null;
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
const
|
|
398
|
+
const du = (e) => {
|
|
399
399
|
var t;
|
|
400
400
|
return !e || typeof e != "string" ? "" : (t = e.charAt(0)) == null ? void 0 : t.toUpperCase();
|
|
401
401
|
}, so = (e, t) => {
|
|
@@ -410,50 +410,50 @@ const uu = (e) => {
|
|
|
410
410
|
className: i = "",
|
|
411
411
|
showFallbackStyles: r = !0
|
|
412
412
|
}) => {
|
|
413
|
-
const { baseColor: n } =
|
|
413
|
+
const { baseColor: n } = Fi();
|
|
414
414
|
return e ? /* @__PURE__ */ c("div", { className: i, children: e }) : /* @__PURE__ */ c(
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
417
|
className: r ? `iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold ${i}` : i,
|
|
418
418
|
style: r ? { backgroundColor: n } : {},
|
|
419
|
-
children:
|
|
419
|
+
children: du(t)
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
|
-
},
|
|
423
|
-
const t =
|
|
424
|
-
i.current && (i.current.getTracks().forEach((
|
|
425
|
-
}, []), E =
|
|
426
|
-
var
|
|
422
|
+
}, hu = (e) => {
|
|
423
|
+
const t = P(null), i = P(null), [r, n] = N(!1), [o, s] = N(!1), [a, l] = N(null), [d, u] = N([]), [h, w] = N([]), [f, g] = N(""), [y, b] = N(""), [p, v] = N(!1), k = D(() => {
|
|
424
|
+
i.current && (i.current.getTracks().forEach((C) => C.stop()), i.current = null, l(null));
|
|
425
|
+
}, []), E = D(async () => {
|
|
426
|
+
var C, x, M, j;
|
|
427
427
|
try {
|
|
428
428
|
const z = await navigator.mediaDevices.enumerateDevices(), X = z.filter((U) => U.kind === "audioinput"), O = z.filter((U) => U.kind === "videoinput");
|
|
429
429
|
if (u(X), w(O), !f && X.length > 0) {
|
|
430
|
-
const U = (
|
|
431
|
-
g(ee || ((
|
|
430
|
+
const U = (C = i.current) == null ? void 0 : C.getAudioTracks()[0], ee = U == null ? void 0 : U.getSettings().deviceId;
|
|
431
|
+
g(ee || ((x = X[0]) == null ? void 0 : x.deviceId) || "");
|
|
432
432
|
}
|
|
433
433
|
if (!y && O.length > 0) {
|
|
434
|
-
const U = (
|
|
434
|
+
const U = (M = i.current) == null ? void 0 : M.getVideoTracks()[0], ee = U == null ? void 0 : U.getSettings().deviceId;
|
|
435
435
|
b(ee || ((j = O[0]) == null ? void 0 : j.deviceId) || "");
|
|
436
436
|
}
|
|
437
437
|
} catch (z) {
|
|
438
438
|
console.error("Error enumerating devices:", z);
|
|
439
439
|
}
|
|
440
|
-
}, [f, y]),
|
|
441
|
-
const
|
|
440
|
+
}, [f, y]), A = D(async (C, x) => {
|
|
441
|
+
const M = {
|
|
442
442
|
width: { ideal: 1280 },
|
|
443
443
|
height: { ideal: 720 },
|
|
444
|
-
...
|
|
444
|
+
...x ? { deviceId: { exact: x } } : { facingMode: "user" }
|
|
445
445
|
}, j = {
|
|
446
446
|
echoCancellation: !0,
|
|
447
447
|
noiseSuppression: !0,
|
|
448
448
|
autoGainControl: !0,
|
|
449
449
|
sampleRate: { ideal: 16e3 },
|
|
450
450
|
channelCount: { ideal: 1 },
|
|
451
|
-
...
|
|
451
|
+
...C ? { deviceId: { exact: C } } : {}
|
|
452
452
|
};
|
|
453
453
|
let z = null;
|
|
454
454
|
try {
|
|
455
455
|
z = await navigator.mediaDevices.getUserMedia({
|
|
456
|
-
video:
|
|
456
|
+
video: M,
|
|
457
457
|
audio: j
|
|
458
458
|
}), n(!0), s(!0);
|
|
459
459
|
} catch (X) {
|
|
@@ -465,24 +465,24 @@ const uu = (e) => {
|
|
|
465
465
|
console.error("Audio permission denied", O), n(!1);
|
|
466
466
|
}
|
|
467
467
|
try {
|
|
468
|
-
const O = await navigator.mediaDevices.getUserMedia({ video:
|
|
468
|
+
const O = await navigator.mediaDevices.getUserMedia({ video: M });
|
|
469
469
|
s(!0), z ? O.getTracks().forEach((U) => z.addTrack(U)) : z = O;
|
|
470
470
|
} catch (O) {
|
|
471
471
|
console.error("Video permission denied", O), s(!1);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
z ? (i.current = z, l(z), t.current && (t.current.srcObject = z, await t.current.play().catch((X) => console.error("Error playing video element", X)))) : (i.current = null, l(null)), await E();
|
|
475
|
-
}, [E]),
|
|
476
|
-
|
|
477
|
-
}, G = async (
|
|
478
|
-
|
|
475
|
+
}, [E]), _ = async (C) => {
|
|
476
|
+
C !== f && (v(!0), g(C), k(), await A(C, y), v(!1));
|
|
477
|
+
}, G = async (C) => {
|
|
478
|
+
C !== y && (v(!0), b(C), k(), await A(f, C), v(!1));
|
|
479
479
|
};
|
|
480
480
|
return B(() => {
|
|
481
481
|
if (!e) {
|
|
482
|
-
|
|
482
|
+
k();
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
return
|
|
485
|
+
return A(), () => k();
|
|
486
486
|
}, [e]), {
|
|
487
487
|
videoRef: t,
|
|
488
488
|
audioAllowed: r,
|
|
@@ -493,9 +493,9 @@ const uu = (e) => {
|
|
|
493
493
|
selectedVideoDeviceId: y,
|
|
494
494
|
isDeviceLoading: p,
|
|
495
495
|
currentStream: a,
|
|
496
|
-
handleAudioChange:
|
|
496
|
+
handleAudioChange: _,
|
|
497
497
|
handleVideoChange: G,
|
|
498
|
-
stopStream:
|
|
498
|
+
stopStream: k
|
|
499
499
|
};
|
|
500
500
|
}, Kr = (e) => /* @__PURE__ */ m(
|
|
501
501
|
"svg",
|
|
@@ -516,7 +516,7 @@ const uu = (e) => {
|
|
|
516
516
|
/* @__PURE__ */ c("path", { d: "M12 17h.01" })
|
|
517
517
|
]
|
|
518
518
|
}
|
|
519
|
-
),
|
|
519
|
+
), wu = (e) => /* @__PURE__ */ m(
|
|
520
520
|
"svg",
|
|
521
521
|
{
|
|
522
522
|
width: 24,
|
|
@@ -533,7 +533,7 @@ const uu = (e) => {
|
|
|
533
533
|
/* @__PURE__ */ c("circle", { cx: 12, cy: 12, r: 4 })
|
|
534
534
|
]
|
|
535
535
|
}
|
|
536
|
-
),
|
|
536
|
+
), fu = (e) => /* @__PURE__ */ m(
|
|
537
537
|
"svg",
|
|
538
538
|
{
|
|
539
539
|
width: 24,
|
|
@@ -550,7 +550,7 @@ const uu = (e) => {
|
|
|
550
550
|
/* @__PURE__ */ c("path", { d: "M20 20H4a2 2 0 01-2-2V9a2 2 0 012-2h1.997a2 2 0 00.819-.175M9.695 4.024A2 2 0 0110.004 4h3.993a2 2 0 011.76 1.05l.486.9A2 2 0 0018.003 7H20a2 2 0 012 2v7.344" })
|
|
551
551
|
]
|
|
552
552
|
}
|
|
553
|
-
), Pr = (e) => /* @__PURE__ */ c("svg", { width: "10", height: "9", viewBox: "0 0 10 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: /* @__PURE__ */ c("path", { d: "M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
553
|
+
), Pr = (e) => /* @__PURE__ */ c("svg", { width: "10", height: "9", viewBox: "0 0 10 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: /* @__PURE__ */ c("path", { d: "M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), mu = ({ className: e }) => /* @__PURE__ */ c(
|
|
554
554
|
"svg",
|
|
555
555
|
{
|
|
556
556
|
width: "24",
|
|
@@ -601,7 +601,7 @@ const uu = (e) => {
|
|
|
601
601
|
}
|
|
602
602
|
)
|
|
603
603
|
}
|
|
604
|
-
),
|
|
604
|
+
), gu = (e) => /* @__PURE__ */ m(
|
|
605
605
|
"svg",
|
|
606
606
|
{
|
|
607
607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -619,7 +619,7 @@ const uu = (e) => {
|
|
|
619
619
|
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "3" })
|
|
620
620
|
]
|
|
621
621
|
}
|
|
622
|
-
),
|
|
622
|
+
), pu = (e) => /* @__PURE__ */ m(
|
|
623
623
|
"svg",
|
|
624
624
|
{
|
|
625
625
|
width: "16",
|
|
@@ -696,7 +696,7 @@ const uu = (e) => {
|
|
|
696
696
|
/* @__PURE__ */ c("path", { d: "M7.75 7.75l-2.15 -2.15" })
|
|
697
697
|
]
|
|
698
698
|
}
|
|
699
|
-
) }),
|
|
699
|
+
) }), yu = (e) => /* @__PURE__ */ m("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
700
700
|
/* @__PURE__ */ c("path", { d: "M17 7V11C17 13.7614 14.7614 16 12 16C9.23858 16 7 13.7614 7 11V7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7Z", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
701
701
|
/* @__PURE__ */ c("path", { d: "M20 11C20 15.4183 16.4183 19 12 19M12 19C7.58172 19 4 15.4183 4 11M12 19V22M12 22H15M12 22H9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
702
702
|
] }), cs = (e) => /* @__PURE__ */ m(
|
|
@@ -717,7 +717,7 @@ const uu = (e) => {
|
|
|
717
717
|
/* @__PURE__ */ c("circle", { cx: 12, cy: 12, r: 2 })
|
|
718
718
|
]
|
|
719
719
|
}
|
|
720
|
-
),
|
|
720
|
+
), bu = (e) => /* @__PURE__ */ m(
|
|
721
721
|
"svg",
|
|
722
722
|
{
|
|
723
723
|
width: 24,
|
|
@@ -734,11 +734,11 @@ const uu = (e) => {
|
|
|
734
734
|
/* @__PURE__ */ c("circle", { cx: 9, cy: 7, r: 4 })
|
|
735
735
|
]
|
|
736
736
|
}
|
|
737
|
-
),
|
|
737
|
+
), vu = (e) => /* @__PURE__ */ m("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
738
738
|
/* @__PURE__ */ c("path", { d: "M11 8H13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
739
739
|
/* @__PURE__ */ c("path", { d: "M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
740
740
|
/* @__PURE__ */ c("path", { d: "M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
741
|
-
] }),
|
|
741
|
+
] }), xu = (e) => /* @__PURE__ */ m(
|
|
742
742
|
"svg",
|
|
743
743
|
{
|
|
744
744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -757,7 +757,7 @@ const uu = (e) => {
|
|
|
757
757
|
/* @__PURE__ */ c("path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975" })
|
|
758
758
|
]
|
|
759
759
|
}
|
|
760
|
-
),
|
|
760
|
+
), Se = {
|
|
761
761
|
FACE_DETECTED: "face_detected",
|
|
762
762
|
NO_FACE: "no_face_detected",
|
|
763
763
|
MULTIPLE_FACES: "multiple_faces",
|
|
@@ -765,8 +765,8 @@ const uu = (e) => {
|
|
|
765
765
|
CAMERA_ERROR: "camera_error",
|
|
766
766
|
MODEL_LOADING: "model_loading"
|
|
767
767
|
}, Ca = {
|
|
768
|
-
[
|
|
769
|
-
icon:
|
|
768
|
+
[Se.FACE_DETECTED]: {
|
|
769
|
+
icon: gu,
|
|
770
770
|
iconColor: "iw-text-green-600",
|
|
771
771
|
iconBg: "iw-bg-green-50",
|
|
772
772
|
iconBorder: "iw-border-green-100",
|
|
@@ -775,8 +775,8 @@ const uu = (e) => {
|
|
|
775
775
|
description: "Your gaze is properly focused on the screen. Continue with your interview.",
|
|
776
776
|
buttonText: "Continue"
|
|
777
777
|
},
|
|
778
|
-
[
|
|
779
|
-
icon:
|
|
778
|
+
[Se.NO_FACE]: {
|
|
779
|
+
icon: fu,
|
|
780
780
|
iconColor: "iw-text-orange-600",
|
|
781
781
|
iconBg: "iw-bg-orange-50",
|
|
782
782
|
iconBorder: "iw-border-orange-100",
|
|
@@ -785,8 +785,8 @@ const uu = (e) => {
|
|
|
785
785
|
description: "Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",
|
|
786
786
|
buttonText: "I Understood"
|
|
787
787
|
},
|
|
788
|
-
[
|
|
789
|
-
icon:
|
|
788
|
+
[Se.MULTIPLE_FACES]: {
|
|
789
|
+
icon: bu,
|
|
790
790
|
iconColor: "iw-text-red-600",
|
|
791
791
|
iconBg: "iw-bg-red-50",
|
|
792
792
|
iconBorder: "iw-border-red-100",
|
|
@@ -796,7 +796,7 @@ const uu = (e) => {
|
|
|
796
796
|
// "For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",
|
|
797
797
|
buttonText: "I Understood"
|
|
798
798
|
},
|
|
799
|
-
[
|
|
799
|
+
[Se.LOOKING_AWAY]: {
|
|
800
800
|
icon: cs,
|
|
801
801
|
iconColor: "iw-text-amber-600",
|
|
802
802
|
iconBg: "iw-bg-amber-50",
|
|
@@ -805,7 +805,7 @@ const uu = (e) => {
|
|
|
805
805
|
subtitle: "You looked away from the screen. Maintain focus to continue.",
|
|
806
806
|
buttonText: "I Understood"
|
|
807
807
|
},
|
|
808
|
-
[
|
|
808
|
+
[Se.CAMERA_ERROR]: {
|
|
809
809
|
icon: Kr,
|
|
810
810
|
iconColor: "iw-text-red-600",
|
|
811
811
|
iconBg: "iw-bg-red-50",
|
|
@@ -815,7 +815,7 @@ const uu = (e) => {
|
|
|
815
815
|
description: "Please check your camera connection and permissions, contact support if the problem continues.",
|
|
816
816
|
buttonText: "I Understood"
|
|
817
817
|
},
|
|
818
|
-
[
|
|
818
|
+
[Se.MODEL_LOADING]: {
|
|
819
819
|
icon: cs,
|
|
820
820
|
iconColor: "iw-text-blue-600",
|
|
821
821
|
iconBg: "iw-bg-blue-50",
|
|
@@ -825,7 +825,7 @@ const uu = (e) => {
|
|
|
825
825
|
description: "The face detection model is being loaded. This should only take a moment.",
|
|
826
826
|
buttonText: "Wait"
|
|
827
827
|
}
|
|
828
|
-
},
|
|
828
|
+
}, Eu = ({
|
|
829
829
|
gazeAnalysisEnabled: e,
|
|
830
830
|
isModelLoaded: t,
|
|
831
831
|
stats: i,
|
|
@@ -902,7 +902,7 @@ const uu = (e) => {
|
|
|
902
902
|
/* @__PURE__ */ c("br", {}),
|
|
903
903
|
"Enable to track engagement and attention levels."
|
|
904
904
|
] })
|
|
905
|
-
] }) }),
|
|
905
|
+
] }) }), _u = ({
|
|
906
906
|
showControls: e,
|
|
907
907
|
isBubbleOpen: t,
|
|
908
908
|
setIsBubbleOpen: i,
|
|
@@ -925,7 +925,7 @@ const uu = (e) => {
|
|
|
925
925
|
{
|
|
926
926
|
onClick: () => i(!t),
|
|
927
927
|
className: "iw-absolute iw-right-4 iw-bottom-4 iw-z-10 iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-full iw-text-white",
|
|
928
|
-
children: /* @__PURE__ */ c(
|
|
928
|
+
children: /* @__PURE__ */ c(wu, { className: "iw-size-4.5" })
|
|
929
929
|
}
|
|
930
930
|
),
|
|
931
931
|
t && /* @__PURE__ */ m("div", { className: "iw-absolute iw-right-4 iw-bottom-16 iw-z-10 iw-max-h-96 iw-w-80 iw-overflow-y-auto iw-rounded-md iw-bg-gray-50 iw-p-4 iw-shadow-lg", children: [
|
|
@@ -997,7 +997,7 @@ const uu = (e) => {
|
|
|
997
997
|
)
|
|
998
998
|
] }),
|
|
999
999
|
a && /* @__PURE__ */ c(
|
|
1000
|
-
|
|
1000
|
+
Eu,
|
|
1001
1001
|
{
|
|
1002
1002
|
gazeAnalysisEnabled: s,
|
|
1003
1003
|
isModelLoaded: o,
|
|
@@ -1009,7 +1009,7 @@ const uu = (e) => {
|
|
|
1009
1009
|
] })
|
|
1010
1010
|
] }) : null;
|
|
1011
1011
|
var pi = typeof self < "u" ? self : {};
|
|
1012
|
-
function
|
|
1012
|
+
function ur(e, t) {
|
|
1013
1013
|
e: {
|
|
1014
1014
|
for (var i = ["CLOSURE_FLAGS"], r = pi, n = 0; n < i.length; n++) if ((r = r[i[n]]) == null) {
|
|
1015
1015
|
i = null;
|
|
@@ -1026,11 +1026,11 @@ function ls(e, t) {
|
|
|
1026
1026
|
return t = String.fromCharCode.apply(null, t), e == null ? t : e + t;
|
|
1027
1027
|
}
|
|
1028
1028
|
let Sr, kn;
|
|
1029
|
-
const
|
|
1030
|
-
let
|
|
1031
|
-
const
|
|
1029
|
+
const ku = typeof TextDecoder < "u";
|
|
1030
|
+
let Au;
|
|
1031
|
+
const Tu = typeof TextEncoder < "u";
|
|
1032
1032
|
function Sa(e) {
|
|
1033
|
-
if (
|
|
1033
|
+
if (Tu) e = (Au || (Au = new TextEncoder())).encode(e);
|
|
1034
1034
|
else {
|
|
1035
1035
|
let i = 0;
|
|
1036
1036
|
const r = new Uint8Array(3 * e.length);
|
|
@@ -1065,7 +1065,7 @@ function Ia(e) {
|
|
|
1065
1065
|
throw e;
|
|
1066
1066
|
}, 0);
|
|
1067
1067
|
}
|
|
1068
|
-
var Pn,
|
|
1068
|
+
var Pn, Nu = ur(610401301, !1), us = ur(748402147, !0), co = ur(824648567, !0), lo = ur(824656860, ur(1, !0));
|
|
1069
1069
|
function ds() {
|
|
1070
1070
|
var e = pi.navigator;
|
|
1071
1071
|
return e && (e = e.userAgent) ? e : "";
|
|
@@ -1077,8 +1077,8 @@ function Xr(e) {
|
|
|
1077
1077
|
Pn = hs && hs.userAgentData || null, Xr[" "] = function() {
|
|
1078
1078
|
};
|
|
1079
1079
|
const Fa = {};
|
|
1080
|
-
let
|
|
1081
|
-
function
|
|
1080
|
+
let rr = null;
|
|
1081
|
+
function Cu(e) {
|
|
1082
1082
|
const t = e.length;
|
|
1083
1083
|
let i = 3 * t / 4;
|
|
1084
1084
|
i % 3 ? i = Math.floor(i) : "=.".indexOf(e[t - 1]) != -1 && (i = "=.".indexOf(e[t - 2]) != -1 ? i - 2 : i - 1);
|
|
@@ -1087,7 +1087,7 @@ function Nu(e) {
|
|
|
1087
1087
|
return function(o, s) {
|
|
1088
1088
|
function a(d) {
|
|
1089
1089
|
for (; l < o.length; ) {
|
|
1090
|
-
const u = o.charAt(l++), h =
|
|
1090
|
+
const u = o.charAt(l++), h = rr[u];
|
|
1091
1091
|
if (h != null) return h;
|
|
1092
1092
|
if (!/^[\s\xa0]*$/.test(u)) throw Error("Unknown base64 encoding at char: " + u);
|
|
1093
1093
|
}
|
|
@@ -1105,37 +1105,37 @@ function Nu(e) {
|
|
|
1105
1105
|
}), n !== i ? r.subarray(0, n) : r;
|
|
1106
1106
|
}
|
|
1107
1107
|
function Ra() {
|
|
1108
|
-
if (!
|
|
1109
|
-
|
|
1108
|
+
if (!rr) {
|
|
1109
|
+
rr = {};
|
|
1110
1110
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), t = ["+/=", "+/", "-_=", "-_.", "-_"];
|
|
1111
1111
|
for (let i = 0; i < 5; i++) {
|
|
1112
1112
|
const r = e.concat(t[i].split(""));
|
|
1113
1113
|
Fa[i] = r;
|
|
1114
1114
|
for (let n = 0; n < r.length; n++) {
|
|
1115
1115
|
const o = r[n];
|
|
1116
|
-
|
|
1116
|
+
rr[o] === void 0 && (rr[o] = n);
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
|
-
var
|
|
1122
|
-
const ws = /[-_.]/g,
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1121
|
+
var Su = typeof Uint8Array < "u", La = !(!(Nu && Pn && Pn.brands.length > 0) && (ds().indexOf("Trident") != -1 || ds().indexOf("MSIE") != -1)) && typeof btoa == "function";
|
|
1122
|
+
const ws = /[-_.]/g, Iu = { "-": "+", _: "/", ".": "=" };
|
|
1123
|
+
function Fu(e) {
|
|
1124
|
+
return Iu[e] || "";
|
|
1125
1125
|
}
|
|
1126
1126
|
function Ma(e) {
|
|
1127
|
-
if (!La) return
|
|
1128
|
-
e = ws.test(e) ? e.replace(ws,
|
|
1127
|
+
if (!La) return Cu(e);
|
|
1128
|
+
e = ws.test(e) ? e.replace(ws, Fu) : e, e = atob(e);
|
|
1129
1129
|
const t = new Uint8Array(e.length);
|
|
1130
1130
|
for (let i = 0; i < e.length; i++) t[i] = e.charCodeAt(i);
|
|
1131
1131
|
return t;
|
|
1132
1132
|
}
|
|
1133
1133
|
function uo(e) {
|
|
1134
|
-
return
|
|
1134
|
+
return Su && e != null && e instanceof Uint8Array;
|
|
1135
1135
|
}
|
|
1136
1136
|
var yi = {};
|
|
1137
1137
|
function Jt() {
|
|
1138
|
-
return
|
|
1138
|
+
return Ru || (Ru = new ht(null, yi));
|
|
1139
1139
|
}
|
|
1140
1140
|
function ho(e) {
|
|
1141
1141
|
Da(yi);
|
|
@@ -1150,7 +1150,7 @@ var ht = class {
|
|
|
1150
1150
|
if (Da(t), this.g = e, e != null && e.length === 0) throw Error("ByteString should be constructed with non-empty values");
|
|
1151
1151
|
}
|
|
1152
1152
|
};
|
|
1153
|
-
let
|
|
1153
|
+
let Ru, Lu;
|
|
1154
1154
|
function Da(e) {
|
|
1155
1155
|
if (e !== yi) throw Error("illegal external caller");
|
|
1156
1156
|
}
|
|
@@ -1162,36 +1162,36 @@ function On(e) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
function bi(e, t) {
|
|
1164
1164
|
if (e != null) {
|
|
1165
|
-
var i =
|
|
1165
|
+
var i = Lu ?? (Lu = {}), r = i[e] || 0;
|
|
1166
1166
|
r >= t || (i[e] = r + 1, Pa(e = Error(), "incident"), Ia(e));
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function Ri() {
|
|
1170
1170
|
return typeof BigInt == "function";
|
|
1171
1171
|
}
|
|
1172
|
-
var
|
|
1172
|
+
var Li = typeof Symbol == "function" && typeof Symbol() == "symbol";
|
|
1173
1173
|
function wt(e, t, i = !1) {
|
|
1174
1174
|
return typeof Symbol == "function" && typeof Symbol() == "symbol" ? i && Symbol.for && e ? Symbol.for(e) : e != null ? Symbol(e) : Symbol() : t;
|
|
1175
1175
|
}
|
|
1176
|
-
var
|
|
1177
|
-
const Oa = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Ba = Object.defineProperties, S =
|
|
1176
|
+
var Mu = wt("jas", void 0, !0), fs = wt(void 0, "0di"), tr = wt(void 0, "1oa"), Ge = wt(void 0, Symbol()), Du = wt(void 0, "0ub"), Pu = wt(void 0, "0ubs"), Bn = wt(void 0, "0ubsb"), Ou = wt(void 0, "0actk"), vi = wt("m_m", "Pa", !0), ms = wt();
|
|
1177
|
+
const Oa = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Ba = Object.defineProperties, S = Li ? Mu : "Ga";
|
|
1178
1178
|
var ti;
|
|
1179
1179
|
const gs = [];
|
|
1180
1180
|
function pr(e, t) {
|
|
1181
|
-
|
|
1181
|
+
Li || S in e || Ba(e, Oa), e[S] |= t;
|
|
1182
1182
|
}
|
|
1183
1183
|
function ye(e, t) {
|
|
1184
|
-
|
|
1184
|
+
Li || S in e || Ba(e, Oa), e[S] = t;
|
|
1185
1185
|
}
|
|
1186
1186
|
function yr(e) {
|
|
1187
1187
|
return pr(e, 34), e;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function dr(e) {
|
|
1190
1190
|
return pr(e, 8192), e;
|
|
1191
1191
|
}
|
|
1192
1192
|
ye(gs, 7), ti = Object.freeze(gs);
|
|
1193
1193
|
var xi = {};
|
|
1194
|
-
function
|
|
1194
|
+
function $e(e, t) {
|
|
1195
1195
|
return t === void 0 ? e.h !== Zt && !!(2 & (0 | e.v[S])) : !!(2 & t) && e.h !== Zt;
|
|
1196
1196
|
}
|
|
1197
1197
|
const Zt = {};
|
|
@@ -1218,7 +1218,7 @@ class ps {
|
|
|
1218
1218
|
return this;
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
|
-
var
|
|
1221
|
+
var Bu = Object.freeze({});
|
|
1222
1222
|
function Ua(e, t, i) {
|
|
1223
1223
|
const r = 128 & t ? 0 : -1, n = e.length;
|
|
1224
1224
|
var o;
|
|
@@ -1231,22 +1231,22 @@ function Ua(e, t, i) {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
var Va = {};
|
|
1234
|
-
function
|
|
1234
|
+
function Mi(e) {
|
|
1235
1235
|
return 128 & e ? Va : void 0;
|
|
1236
1236
|
}
|
|
1237
1237
|
function Qr(e) {
|
|
1238
1238
|
return e.Na = !0, e;
|
|
1239
1239
|
}
|
|
1240
|
-
var
|
|
1241
|
-
function
|
|
1240
|
+
var Uu = Qr((e) => typeof e == "number"), ys = Qr((e) => typeof e == "string"), Vu = Qr((e) => typeof e == "boolean"), Jr = typeof pi.BigInt == "function" && typeof pi.BigInt(0) == "bigint";
|
|
1241
|
+
function je(e) {
|
|
1242
1242
|
var t = e;
|
|
1243
1243
|
if (ys(t)) {
|
|
1244
1244
|
if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t)) throw Error(String(t));
|
|
1245
|
-
} else if (
|
|
1246
|
-
return Jr ? BigInt(e) : e =
|
|
1245
|
+
} else if (Uu(t) && !Number.isSafeInteger(t)) throw Error(String(t));
|
|
1246
|
+
return Jr ? BigInt(e) : e = Vu(e) ? e ? "1" : "0" : ys(e) ? e.trim() || "0" : String(e);
|
|
1247
1247
|
}
|
|
1248
|
-
var Un = Qr((e) => Jr ? e >=
|
|
1249
|
-
const
|
|
1248
|
+
var Un = Qr((e) => Jr ? e >= ju && e <= zu : e[0] === "-" ? bs(e, Gu) : bs(e, $u));
|
|
1249
|
+
const Gu = Number.MIN_SAFE_INTEGER.toString(), ju = Jr ? BigInt(Number.MIN_SAFE_INTEGER) : void 0, $u = Number.MAX_SAFE_INTEGER.toString(), zu = Jr ? BigInt(Number.MAX_SAFE_INTEGER) : void 0;
|
|
1250
1250
|
function bs(e, t) {
|
|
1251
1251
|
if (e.length > t.length) return !1;
|
|
1252
1252
|
if (e.length < t.length || e === t) return !0;
|
|
@@ -1256,8 +1256,8 @@ function bs(e, t) {
|
|
|
1256
1256
|
if (r < n) return !0;
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
const
|
|
1260
|
-
let
|
|
1259
|
+
const Wu = typeof Uint8Array.prototype.slice == "function";
|
|
1260
|
+
let Hu, oe = 0, he = 0;
|
|
1261
1261
|
function vs(e) {
|
|
1262
1262
|
const t = e >>> 0;
|
|
1263
1263
|
oe = t, he = (e - t) / 4294967296 >>> 0;
|
|
@@ -1270,43 +1270,43 @@ function Ei(e) {
|
|
|
1270
1270
|
} else vs(e);
|
|
1271
1271
|
}
|
|
1272
1272
|
function fo(e) {
|
|
1273
|
-
const t =
|
|
1273
|
+
const t = Hu || (Hu = new DataView(new ArrayBuffer(8)));
|
|
1274
1274
|
t.setFloat32(0, +e, !0), he = 0, oe = t.getUint32(0, !0);
|
|
1275
1275
|
}
|
|
1276
1276
|
function Vn(e, t) {
|
|
1277
1277
|
const i = 4294967296 * t + (e >>> 0);
|
|
1278
|
-
return Number.isSafeInteger(i) ? i :
|
|
1278
|
+
return Number.isSafeInteger(i) ? i : hr(e, t);
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1280
|
+
function qu(e, t) {
|
|
1281
|
+
return je(Ri() ? BigInt.asUintN(64, (BigInt(t >>> 0) << BigInt(32)) + BigInt(e >>> 0)) : hr(e, t));
|
|
1282
1282
|
}
|
|
1283
1283
|
function mo(e, t) {
|
|
1284
1284
|
const i = 2147483648 & t;
|
|
1285
1285
|
return i && (t = ~t >>> 0, (e = 1 + ~e >>> 0) == 0 && (t = t + 1 >>> 0)), typeof (e = Vn(e, t)) == "number" ? i ? -e : e : i ? "-" + e : e;
|
|
1286
1286
|
}
|
|
1287
1287
|
function Ga(e, t) {
|
|
1288
|
-
return
|
|
1288
|
+
return Ri() ? je(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(t)) << BigInt(32)) + BigInt.asUintN(32, BigInt(e)))) : je(go(e, t));
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function hr(e, t) {
|
|
1291
1291
|
if (e >>>= 0, (t >>>= 0) <= 2097151) var i = "" + (4294967296 * t + e);
|
|
1292
|
-
else
|
|
1292
|
+
else Ri() ? i = "" + (BigInt(t) << BigInt(32) | BigInt(e)) : (e = (16777215 & e) + 6777216 * (i = 16777215 & (e >>> 24 | t << 8)) + 6710656 * (t = t >> 16 & 65535), i += 8147497 * t, t *= 2, e >= 1e7 && (i += e / 1e7 >>> 0, e %= 1e7), i >= 1e7 && (t += i / 1e7 >>> 0, i %= 1e7), i = t + xs(i) + xs(e));
|
|
1293
1293
|
return i;
|
|
1294
1294
|
}
|
|
1295
1295
|
function xs(e) {
|
|
1296
1296
|
return e = String(e), "0000000".slice(e.length) + e;
|
|
1297
1297
|
}
|
|
1298
1298
|
function go(e, t) {
|
|
1299
|
-
if (2147483648 & t) if (
|
|
1299
|
+
if (2147483648 & t) if (Ri()) e = "" + (BigInt(0 | t) << BigInt(32) | BigInt(e >>> 0));
|
|
1300
1300
|
else {
|
|
1301
1301
|
const [i, r] = po(e, t);
|
|
1302
|
-
e = "-" +
|
|
1302
|
+
e = "-" + hr(i, r);
|
|
1303
1303
|
}
|
|
1304
|
-
else e =
|
|
1304
|
+
else e = hr(e, t);
|
|
1305
1305
|
return e;
|
|
1306
1306
|
}
|
|
1307
1307
|
function Zr(e) {
|
|
1308
1308
|
if (e.length < 16) Ei(Number(e));
|
|
1309
|
-
else if (
|
|
1309
|
+
else if (Ri()) e = BigInt(e), oe = Number(e & BigInt(4294967295)) >>> 0, he = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1310
1310
|
else {
|
|
1311
1311
|
const t = +(e[0] === "-");
|
|
1312
1312
|
he = oe = 0;
|
|
@@ -1327,15 +1327,15 @@ function po(e, t) {
|
|
|
1327
1327
|
function rt(e) {
|
|
1328
1328
|
return Array.prototype.slice.call(e);
|
|
1329
1329
|
}
|
|
1330
|
-
const br = typeof BigInt == "function" ? BigInt.asIntN : void 0,
|
|
1331
|
-
function
|
|
1330
|
+
const br = typeof BigInt == "function" ? BigInt.asIntN : void 0, Ku = typeof BigInt == "function" ? BigInt.asUintN : void 0, ei = Number.isSafeInteger, en = Number.isFinite, _i = Math.trunc, Yu = je(0);
|
|
1331
|
+
function nr(e) {
|
|
1332
1332
|
if (e != null && typeof e != "number") throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);
|
|
1333
1333
|
return e;
|
|
1334
1334
|
}
|
|
1335
1335
|
function dt(e) {
|
|
1336
1336
|
return e == null || typeof e == "number" ? e : e === "NaN" || e === "Infinity" || e === "-Infinity" ? Number(e) : void 0;
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function wr(e) {
|
|
1339
1339
|
if (e != null && typeof e != "boolean") {
|
|
1340
1340
|
var t = typeof e;
|
|
1341
1341
|
throw Error(`Expected boolean but got ${t != "object" ? t : e ? Array.isArray(e) ? "array" : t : "null"}: ${e}`);
|
|
@@ -1345,7 +1345,7 @@ function hr(e) {
|
|
|
1345
1345
|
function ja(e) {
|
|
1346
1346
|
return e == null || typeof e == "boolean" ? e : typeof e == "number" ? !!e : void 0;
|
|
1347
1347
|
}
|
|
1348
|
-
const
|
|
1348
|
+
const Xu = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
|
|
1349
1349
|
function vr(e) {
|
|
1350
1350
|
switch (typeof e) {
|
|
1351
1351
|
case "bigint":
|
|
@@ -1353,12 +1353,12 @@ function vr(e) {
|
|
|
1353
1353
|
case "number":
|
|
1354
1354
|
return en(e);
|
|
1355
1355
|
case "string":
|
|
1356
|
-
return
|
|
1356
|
+
return Xu.test(e);
|
|
1357
1357
|
default:
|
|
1358
1358
|
return !1;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Di(e) {
|
|
1362
1362
|
if (e == null) return e;
|
|
1363
1363
|
if (typeof e == "string" && e) e = +e;
|
|
1364
1364
|
else if (typeof e != "number") return;
|
|
@@ -1383,17 +1383,17 @@ function Wa(e) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
function Ha(e) {
|
|
1385
1385
|
var t = _i(Number(e));
|
|
1386
|
-
return ei(t) ?
|
|
1386
|
+
return ei(t) ? je(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), Ri() ? je(br(64, BigInt(e))) : je(za(e)));
|
|
1387
1387
|
}
|
|
1388
1388
|
function qa(e) {
|
|
1389
|
-
return ei(e) ? e =
|
|
1389
|
+
return ei(e) ? e = je(yo(e)) : (e = _i(e), ei(e) ? e = String(e) : (Ei(e), e = go(oe, he)), e = je(e)), e;
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function Qu(e) {
|
|
1392
1392
|
return e == null ? e : typeof e == "bigint" ? (Un(e) ? e = Number(e) : (e = br(64, e), e = Un(e) ? Number(e) : String(e)), e) : vr(e) ? typeof e == "number" ? yo(e) : Wa(e) : void 0;
|
|
1393
1393
|
}
|
|
1394
1394
|
function Or(e) {
|
|
1395
1395
|
const t = typeof e;
|
|
1396
|
-
return e == null ? e : t === "bigint" ?
|
|
1396
|
+
return e == null ? e : t === "bigint" ? je(br(64, e)) : vr(e) ? t === "string" ? Ha(e) : qa(e) : void 0;
|
|
1397
1397
|
}
|
|
1398
1398
|
function Ka(e) {
|
|
1399
1399
|
if (typeof e != "string") throw Error();
|
|
@@ -1409,7 +1409,7 @@ function ke(e) {
|
|
|
1409
1409
|
function bo(e, t, i, r) {
|
|
1410
1410
|
return e != null && e[vi] === xi ? e : Array.isArray(e) ? ((r = (i = 0 | e[S]) | 32 & r | 2 & r) !== i && ye(e, r), new t(e)) : (i ? 2 & r ? ((e = t[fs]) || (yr((e = new t()).v), e = t[fs] = e), t = e) : t = new t() : t = void 0, t);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Ju(e, t, i) {
|
|
1413
1413
|
if (t) e: {
|
|
1414
1414
|
if (!vr(t = e)) throw On("int64");
|
|
1415
1415
|
switch (typeof t) {
|
|
@@ -1417,17 +1417,17 @@ function Qu(e, t, i) {
|
|
|
1417
1417
|
t = Ha(t);
|
|
1418
1418
|
break e;
|
|
1419
1419
|
case "bigint":
|
|
1420
|
-
t =
|
|
1420
|
+
t = je(br(64, t));
|
|
1421
1421
|
break e;
|
|
1422
1422
|
default:
|
|
1423
1423
|
t = qa(t);
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
else t = Or(e);
|
|
1427
|
-
return (e = t) == null ? i ?
|
|
1427
|
+
return (e = t) == null ? i ? Yu : void 0 : e;
|
|
1428
1428
|
}
|
|
1429
|
-
const
|
|
1430
|
-
let
|
|
1429
|
+
const Zu = {};
|
|
1430
|
+
let ed = function() {
|
|
1431
1431
|
try {
|
|
1432
1432
|
return Xr(new class extends Map {
|
|
1433
1433
|
constructor() {
|
|
@@ -1473,7 +1473,7 @@ class An {
|
|
|
1473
1473
|
return this.entries();
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
const
|
|
1476
|
+
const td = ed ? (Object.setPrototypeOf(An.prototype, Map.prototype), Object.defineProperties(An.prototype, { size: { value: 0, configurable: !0, enumerable: !0, writable: !0 } }), An) : class extends Map {
|
|
1477
1477
|
constructor() {
|
|
1478
1478
|
super();
|
|
1479
1479
|
}
|
|
@@ -1484,9 +1484,9 @@ function Es(e) {
|
|
|
1484
1484
|
function Tn(e) {
|
|
1485
1485
|
if (2 & e.J) throw Error("Cannot mutate an immutable Map");
|
|
1486
1486
|
}
|
|
1487
|
-
var vt = class extends
|
|
1487
|
+
var vt = class extends td {
|
|
1488
1488
|
constructor(e, t, i = Es, r = Es) {
|
|
1489
|
-
super(), this.J = 0 | e[S], this.K = t, this.S = i, this.fa = this.K ?
|
|
1489
|
+
super(), this.J = 0 | e[S], this.K = t, this.S = i, this.fa = this.K ? id : r;
|
|
1490
1490
|
for (let n = 0; n < e.length; n++) {
|
|
1491
1491
|
const o = e[n], s = i(o[0], !1, !0);
|
|
1492
1492
|
let a = o[1];
|
|
@@ -1494,7 +1494,7 @@ var vt = class extends ed {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
V(e) {
|
|
1497
|
-
return
|
|
1497
|
+
return dr(Array.from(super.entries(), e));
|
|
1498
1498
|
}
|
|
1499
1499
|
clear() {
|
|
1500
1500
|
Tn(this), super.clear();
|
|
@@ -1505,7 +1505,7 @@ var vt = class extends ed {
|
|
|
1505
1505
|
entries() {
|
|
1506
1506
|
if (this.K) {
|
|
1507
1507
|
var e = super.keys();
|
|
1508
|
-
e = new ps(e,
|
|
1508
|
+
e = new ps(e, rd, this);
|
|
1509
1509
|
} else e = super.entries();
|
|
1510
1510
|
return e;
|
|
1511
1511
|
}
|
|
@@ -1543,18 +1543,18 @@ var vt = class extends ed {
|
|
|
1543
1543
|
return this.entries();
|
|
1544
1544
|
}
|
|
1545
1545
|
};
|
|
1546
|
-
function
|
|
1546
|
+
function id(e, t, i, r, n, o) {
|
|
1547
1547
|
return e = bo(e, r, i, o), n && (e = xo(e)), e;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function rd(e) {
|
|
1550
1550
|
return [e, this.get(e)];
|
|
1551
1551
|
}
|
|
1552
|
-
let
|
|
1552
|
+
let nd;
|
|
1553
1553
|
function _s() {
|
|
1554
|
-
return
|
|
1554
|
+
return nd || (nd = new vt(yr([]), void 0, void 0, void 0, Zu));
|
|
1555
1555
|
}
|
|
1556
1556
|
function tn(e) {
|
|
1557
|
-
return
|
|
1557
|
+
return Ge ? e[Ge] : void 0;
|
|
1558
1558
|
}
|
|
1559
1559
|
function Br(e, t) {
|
|
1560
1560
|
for (const i in e) !isNaN(i) && t(e, +i, e[i]);
|
|
@@ -1562,15 +1562,15 @@ function Br(e, t) {
|
|
|
1562
1562
|
vt.prototype.toJSON = void 0;
|
|
1563
1563
|
var Gn = class {
|
|
1564
1564
|
};
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
t < 100 || bi(
|
|
1565
|
+
const od = { Ka: !0 };
|
|
1566
|
+
function sd(e, t) {
|
|
1567
|
+
t < 100 || bi(Pu, 1);
|
|
1568
1568
|
}
|
|
1569
1569
|
function rn(e, t, i, r) {
|
|
1570
1570
|
const n = r !== void 0;
|
|
1571
1571
|
r = !!r;
|
|
1572
|
-
var o, s =
|
|
1573
|
-
!n &&
|
|
1572
|
+
var o, s = Ge;
|
|
1573
|
+
!n && Li && s && (o = e[s]) && Br(o, sd), s = [];
|
|
1574
1574
|
var a = e.length;
|
|
1575
1575
|
let l;
|
|
1576
1576
|
o = 4294967295;
|
|
@@ -1589,17 +1589,17 @@ function rn(e, t, i, r) {
|
|
|
1589
1589
|
let g;
|
|
1590
1590
|
w = +f, u && !Number.isNaN(w) && (g = w + h) < o ? s[g] = a : (t ?? (t = {}))[f] = a;
|
|
1591
1591
|
}
|
|
1592
|
-
return t && (d ? s.push(t) : s[o] = t), n &&
|
|
1592
|
+
return t && (d ? s.push(t) : s[o] = t), n && Ge && (e = tn(e)) && e instanceof Gn && (s[Ge] = function(f) {
|
|
1593
1593
|
const g = new Gn();
|
|
1594
1594
|
return Br(f, (y, b, p) => {
|
|
1595
1595
|
g[b] = rt(p);
|
|
1596
1596
|
}), g.da = f.da, g;
|
|
1597
1597
|
}(e)), s;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1600
|
-
return e[0] =
|
|
1599
|
+
function ad(e) {
|
|
1600
|
+
return e[0] = fr(e[0]), e[1] = fr(e[1]), e;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function fr(e) {
|
|
1603
1603
|
switch (typeof e) {
|
|
1604
1604
|
case "number":
|
|
1605
1605
|
return Number.isFinite(e) ? e : "" + e;
|
|
@@ -1610,7 +1610,7 @@ function wr(e) {
|
|
|
1610
1610
|
case "object":
|
|
1611
1611
|
if (Array.isArray(e)) {
|
|
1612
1612
|
var t = 0 | e[S];
|
|
1613
|
-
return e.length === 0 && 1 & t ? void 0 : rn(e, t,
|
|
1613
|
+
return e.length === 0 && 1 & t ? void 0 : rn(e, t, fr);
|
|
1614
1614
|
}
|
|
1615
1615
|
if (e != null && e[vi] === xi) return Ya(e);
|
|
1616
1616
|
if (e instanceof ht) {
|
|
@@ -1639,14 +1639,14 @@ function wr(e) {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
return e;
|
|
1641
1641
|
}
|
|
1642
|
-
return e instanceof vt ? e = e.size !== 0 ? e.V(
|
|
1642
|
+
return e instanceof vt ? e = e.size !== 0 ? e.V(ad) : void 0 : void 0;
|
|
1643
1643
|
}
|
|
1644
1644
|
return e;
|
|
1645
1645
|
}
|
|
1646
1646
|
function Ya(e) {
|
|
1647
|
-
return rn(e = e.v, 0 | e[S],
|
|
1647
|
+
return rn(e = e.v, 0 | e[S], fr);
|
|
1648
1648
|
}
|
|
1649
|
-
let
|
|
1649
|
+
let cd, ld;
|
|
1650
1650
|
function qt(e, t) {
|
|
1651
1651
|
return Xa(e, t[0], t[1]);
|
|
1652
1652
|
}
|
|
@@ -1659,7 +1659,7 @@ function Xa(e, t, i, r = 0) {
|
|
|
1659
1659
|
if (n = 0 | e[S], us && 1 & n) throw Error("rfarr");
|
|
1660
1660
|
if (2048 & n && !(2 & n) && function() {
|
|
1661
1661
|
if (us) throw Error("carr");
|
|
1662
|
-
bi(
|
|
1662
|
+
bi(Ou, 5);
|
|
1663
1663
|
}(), 256 & n) throw Error("farr");
|
|
1664
1664
|
if (64 & n) return (n | r) !== n && ye(e, n | r), e;
|
|
1665
1665
|
if (i && (n |= 128, i !== e[0])) throw Error("mid");
|
|
@@ -1684,7 +1684,7 @@ function Xa(e, t, i, r = 0) {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
return ye(e, 64 | n | r), e;
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function ud(e, t) {
|
|
1688
1688
|
if (typeof e != "object") return e;
|
|
1689
1689
|
if (Array.isArray(e)) {
|
|
1690
1690
|
var i = 0 | e[S];
|
|
@@ -1704,29 +1704,29 @@ function ld(e, t) {
|
|
|
1704
1704
|
return e instanceof ht ? e : void 0;
|
|
1705
1705
|
}
|
|
1706
1706
|
function ks(e, t, i) {
|
|
1707
|
-
return 2 & t || (!i || 4096 & t || 16 & t ? e =
|
|
1707
|
+
return 2 & t || (!i || 4096 & t || 16 & t ? e = Pi(e, t, !1, i && !(16 & t)) : (pr(e, 34), 4 & t && Object.freeze(e))), e;
|
|
1708
1708
|
}
|
|
1709
1709
|
function vo(e, t, i) {
|
|
1710
1710
|
return e = new e.constructor(t), i && (e.h = Zt), e.m = Zt, e;
|
|
1711
1711
|
}
|
|
1712
1712
|
function As(e) {
|
|
1713
1713
|
const t = e.v, i = 0 | t[S];
|
|
1714
|
-
return
|
|
1714
|
+
return $e(e, i) ? e : Eo(e, t, i) ? vo(e, t) : Pi(t, i);
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1717
|
-
return r ?? (r = !!(34 & t)), e = rn(e, t,
|
|
1716
|
+
function Pi(e, t, i, r) {
|
|
1717
|
+
return r ?? (r = !!(34 & t)), e = rn(e, t, ud, r), r = 32, i && (r |= 2), ye(e, t = 16769217 & t | r), e;
|
|
1718
1718
|
}
|
|
1719
1719
|
function xo(e) {
|
|
1720
1720
|
const t = e.v, i = 0 | t[S];
|
|
1721
|
-
return
|
|
1721
|
+
return $e(e, i) ? Eo(e, t, i) ? vo(e, t, !0) : new e.constructor(Pi(t, i, !1)) : e;
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function Oi(e) {
|
|
1724
1724
|
if (e.h !== Zt) return !1;
|
|
1725
1725
|
var t = e.v;
|
|
1726
|
-
return pr(t =
|
|
1726
|
+
return pr(t = Pi(t, 0 | t[S]), 2048), e.v = t, e.h = void 0, e.m = void 0, !0;
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1729
|
-
if (!
|
|
1728
|
+
function Bi(e) {
|
|
1729
|
+
if (!Oi(e) && $e(e, 0 | e.v[S])) throw Error();
|
|
1730
1730
|
}
|
|
1731
1731
|
function ii(e, t) {
|
|
1732
1732
|
t === void 0 && (t = 0 | e[S]), 32 & t && !(4096 & t) && ye(e, 4096 | t);
|
|
@@ -1734,7 +1734,7 @@ function ii(e, t) {
|
|
|
1734
1734
|
function Eo(e, t, i) {
|
|
1735
1735
|
return !!(2 & i) || !(!(32 & i) || 4096 & i) && (ye(t, 2 | i), e.h = Zt, !0);
|
|
1736
1736
|
}
|
|
1737
|
-
const
|
|
1737
|
+
const dd = je(0), Ct = {};
|
|
1738
1738
|
function ie(e, t, i, r, n) {
|
|
1739
1739
|
if ((t = xt(e.v, t, i, n)) !== null || r && e.m !== Zt) return t;
|
|
1740
1740
|
}
|
|
@@ -1757,7 +1757,7 @@ function xt(e, t, i, r) {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
1759
|
function J(e, t, i, r) {
|
|
1760
|
-
|
|
1760
|
+
Bi(e), ge(e = e.v, 0 | e[S], t, i, r);
|
|
1761
1761
|
}
|
|
1762
1762
|
function ge(e, t, i, r, n) {
|
|
1763
1763
|
const o = i + (n ? 0 : -1);
|
|
@@ -1769,11 +1769,11 @@ function ge(e, t, i, r, n) {
|
|
|
1769
1769
|
return o <= s ? (e[o] = r, t) : (r !== void 0 && (i >= (s = (t ?? (t = 0 | e[S])) >> 14 & 1023 || 536870912) ? r != null && (e[s + (n ? 0 : -1)] = { [i]: r }) : e[o] = r), t);
|
|
1770
1770
|
}
|
|
1771
1771
|
function zt() {
|
|
1772
|
-
return
|
|
1772
|
+
return Bu === void 0 ? 2 : 4;
|
|
1773
1773
|
}
|
|
1774
1774
|
function Wt(e, t, i, r, n) {
|
|
1775
1775
|
let o = e.v, s = 0 | o[S];
|
|
1776
|
-
r =
|
|
1776
|
+
r = $e(e, s) ? 1 : r, n = !!n || r === 3, r === 2 && Oi(e) && (o = e.v, s = 0 | o[S]);
|
|
1777
1777
|
let a = (e = _o(o, t)) === ti ? 7 : 0 | e[S], l = ko(a, s);
|
|
1778
1778
|
var d = !(4 & l);
|
|
1779
1779
|
if (d) {
|
|
@@ -1809,14 +1809,14 @@ function Za(e) {
|
|
|
1809
1809
|
const i = e[t] = rt(e[t]);
|
|
1810
1810
|
Array.isArray(i[1]) && (i[1] = yr(i[1]));
|
|
1811
1811
|
}
|
|
1812
|
-
return
|
|
1812
|
+
return dr(e);
|
|
1813
1813
|
}
|
|
1814
1814
|
function Lt(e, t, i, r) {
|
|
1815
|
-
|
|
1815
|
+
Bi(e), ge(e = e.v, 0 | e[S], t, (r === "0" ? Number(i) === 0 : i === r) ? void 0 : i);
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function Ui(e, t, i) {
|
|
1818
1818
|
if (2 & t) throw Error();
|
|
1819
|
-
const r =
|
|
1819
|
+
const r = Mi(t);
|
|
1820
1820
|
let n = _o(e, i, r), o = n === ti ? 7 : 0 | n[S], s = ko(o, t);
|
|
1821
1821
|
return (2 & s || Kt(s) || 16 & s) && (s === o || Kt(s) || ye(n, s), n = rt(n), o = 0, s = Yt(s, t), ge(e, t, i, n, r)), s &= -13, s !== o && ye(n, s), n;
|
|
1822
1822
|
}
|
|
@@ -1825,10 +1825,10 @@ function Nn(e, t) {
|
|
|
1825
1825
|
return To(Ao(e = e.v), e, void 0, i) === t ? t : -1;
|
|
1826
1826
|
}
|
|
1827
1827
|
function Ao(e) {
|
|
1828
|
-
if (
|
|
1829
|
-
if (
|
|
1828
|
+
if (Li) return e[tr] ?? (e[tr] = /* @__PURE__ */ new Map());
|
|
1829
|
+
if (tr in e) return e[tr];
|
|
1830
1830
|
const t = /* @__PURE__ */ new Map();
|
|
1831
|
-
return Object.defineProperty(e,
|
|
1831
|
+
return Object.defineProperty(e, tr, { value: t }), t;
|
|
1832
1832
|
}
|
|
1833
1833
|
function ec(e, t, i, r, n) {
|
|
1834
1834
|
const o = Ao(e), s = To(o, e, t, i, n);
|
|
@@ -1846,15 +1846,15 @@ function To(e, t, i, r, n) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
function No(e, t, i) {
|
|
1848
1848
|
let r = 0 | e[S];
|
|
1849
|
-
const n =
|
|
1849
|
+
const n = Mi(r), o = xt(e, i, n);
|
|
1850
1850
|
let s;
|
|
1851
1851
|
if (o != null && o[vi] === xi) {
|
|
1852
|
-
if (
|
|
1852
|
+
if (!$e(o)) return Oi(o), o.v;
|
|
1853
1853
|
s = o.v;
|
|
1854
1854
|
} else Array.isArray(o) && (s = o);
|
|
1855
1855
|
if (s) {
|
|
1856
1856
|
const a = 0 | s[S];
|
|
1857
|
-
2 & a && (s =
|
|
1857
|
+
2 & a && (s = Pi(s, a));
|
|
1858
1858
|
}
|
|
1859
1859
|
return s = qt(s, t), s !== o && ge(e, r, i, s, n), s;
|
|
1860
1860
|
}
|
|
@@ -1863,20 +1863,20 @@ function tc(e, t, i, r, n) {
|
|
|
1863
1863
|
if ((r = xt(e, r, n, (s) => {
|
|
1864
1864
|
const a = bo(s, i, !1, t);
|
|
1865
1865
|
return o = a !== s && a != null, a;
|
|
1866
|
-
})) != null) return o &&
|
|
1866
|
+
})) != null) return o && !$e(r) && ii(e, t), r;
|
|
1867
1867
|
}
|
|
1868
1868
|
function K(e, t, i, r) {
|
|
1869
1869
|
let n = e.v, o = 0 | n[S];
|
|
1870
1870
|
if ((t = tc(n, o, t, i, r)) == null) return t;
|
|
1871
|
-
if (o = 0 | n[S],
|
|
1871
|
+
if (o = 0 | n[S], !$e(e, o)) {
|
|
1872
1872
|
const s = xo(t);
|
|
1873
|
-
s !== t && (
|
|
1873
|
+
s !== t && (Oi(e) && (n = e.v, o = 0 | n[S]), o = ge(n, o, i, t = s, r), ii(n, o));
|
|
1874
1874
|
}
|
|
1875
1875
|
return t;
|
|
1876
1876
|
}
|
|
1877
1877
|
function ic(e, t, i, r, n, o, s, a) {
|
|
1878
|
-
var l =
|
|
1879
|
-
o = l ? 1 : o, s = !!s || o === 3, l = a && !l, (o === 2 || l) &&
|
|
1878
|
+
var l = $e(e, i);
|
|
1879
|
+
o = l ? 1 : o, s = !!s || o === 3, l = a && !l, (o === 2 || l) && Oi(e) && (i = 0 | (t = e.v)[S]);
|
|
1880
1880
|
var d = (e = _o(t, n)) === ti ? 7 : 0 | e[S], u = ko(d, i);
|
|
1881
1881
|
if (a = !(4 & u)) {
|
|
1882
1882
|
var h = e, w = i;
|
|
@@ -1887,8 +1887,8 @@ function ic(e, t, i, r, n, o, s, a) {
|
|
|
1887
1887
|
const v = bo(h[b], r, !1, w);
|
|
1888
1888
|
if (v instanceof r) {
|
|
1889
1889
|
if (!f) {
|
|
1890
|
-
const
|
|
1891
|
-
g && (g = !
|
|
1890
|
+
const k = $e(v);
|
|
1891
|
+
g && (g = !k), y && (y = k);
|
|
1892
1892
|
}
|
|
1893
1893
|
h[p++] = v;
|
|
1894
1894
|
}
|
|
@@ -1909,12 +1909,12 @@ function rc(e) {
|
|
|
1909
1909
|
return e == null && (e = void 0), e;
|
|
1910
1910
|
}
|
|
1911
1911
|
function L(e, t, i, r, n) {
|
|
1912
|
-
return J(e, i, r = rc(r), n), r &&
|
|
1912
|
+
return J(e, i, r = rc(r), n), r && !$e(r) && ii(e.v), e;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function or(e, t, i, r) {
|
|
1915
1915
|
e: {
|
|
1916
1916
|
var n = r = rc(r);
|
|
1917
|
-
|
|
1917
|
+
Bi(e);
|
|
1918
1918
|
const o = e.v;
|
|
1919
1919
|
let s = 0 | o[S];
|
|
1920
1920
|
if (n == null) {
|
|
@@ -1924,20 +1924,20 @@ function nr(e, t, i, r) {
|
|
|
1924
1924
|
} else s = ec(o, s, i, t);
|
|
1925
1925
|
ge(o, s, t, n);
|
|
1926
1926
|
}
|
|
1927
|
-
r &&
|
|
1927
|
+
r && !$e(r) && ii(e.v);
|
|
1928
1928
|
}
|
|
1929
1929
|
function Yt(e, t) {
|
|
1930
1930
|
return -273 & (2 & t ? 2 | e : -3 & e);
|
|
1931
1931
|
}
|
|
1932
1932
|
function Co(e, t, i, r) {
|
|
1933
1933
|
var n = r;
|
|
1934
|
-
|
|
1934
|
+
Bi(e), e = ic(e, r = e.v, 0 | r[S], i, t, 2, !0), n = n ?? new i(), e.push(n), t = i = e === ti ? 7 : 0 | e[S], (n = $e(n)) ? (i &= -9, e.length === 1 && (i &= -4097)) : i |= 4096, i !== t && ye(e, i), n || ii(r);
|
|
1935
1935
|
}
|
|
1936
1936
|
function Ze(e, t, i) {
|
|
1937
|
-
return
|
|
1937
|
+
return Di(ie(e, t, void 0, i));
|
|
1938
1938
|
}
|
|
1939
1939
|
function nc(e) {
|
|
1940
|
-
return (lo ? ie(e, 2, void 0, void 0, Or) : Or(ie(e, 2))) ??
|
|
1940
|
+
return (lo ? ie(e, 2, void 0, void 0, Or) : Or(ie(e, 2))) ?? dd;
|
|
1941
1941
|
}
|
|
1942
1942
|
function ue(e, t) {
|
|
1943
1943
|
return ie(e, t, void 0, void 0, dt) ?? 0;
|
|
@@ -1950,14 +1950,14 @@ function _t(e, t, i) {
|
|
|
1950
1950
|
J(e, t, i);
|
|
1951
1951
|
}
|
|
1952
1952
|
function R(e, t, i) {
|
|
1953
|
-
J(e, t,
|
|
1953
|
+
J(e, t, nr(i));
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function ze(e, t, i) {
|
|
1956
1956
|
Lt(e, t, xr(i), "");
|
|
1957
1957
|
}
|
|
1958
1958
|
function Ur(e, t, i) {
|
|
1959
1959
|
{
|
|
1960
|
-
|
|
1960
|
+
Bi(e);
|
|
1961
1961
|
const s = e.v;
|
|
1962
1962
|
let a = 0 | s[S];
|
|
1963
1963
|
if (i == null) ge(s, a, t);
|
|
@@ -1972,7 +1972,7 @@ function Ur(e, t, i) {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
1974
|
function nn(e, t, i) {
|
|
1975
|
-
|
|
1975
|
+
Bi(e), Wt(e, t, ke, 2, !0).push(Ka(i));
|
|
1976
1976
|
}
|
|
1977
1977
|
var hi = class {
|
|
1978
1978
|
constructor(e, t, i) {
|
|
@@ -2025,7 +2025,7 @@ function Vr(e) {
|
|
|
2025
2025
|
const o = t[i + 2];
|
|
2026
2026
|
return t = t[i + 3], Xt(e, e.g + 4), e = 2 * ((n = (r << 0 | n << 8 | o << 16 | t << 24) >>> 0) >> 31) + 1, r = n >>> 23 & 255, n &= 8388607, r == 255 ? n ? NaN : e * (1 / 0) : r == 0 ? 1401298464324817e-60 * e * n : e * Math.pow(2, r - 150) * (n + 8388608);
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function hd(e) {
|
|
2029
2029
|
return Pt(e);
|
|
2030
2030
|
}
|
|
2031
2031
|
function Xt(e, t) {
|
|
@@ -2040,7 +2040,7 @@ function oc(e, t) {
|
|
|
2040
2040
|
function sc(e, t) {
|
|
2041
2041
|
if (t == 0) return Jt();
|
|
2042
2042
|
var i = oc(e, t);
|
|
2043
|
-
return e.Y && e.j ? i = e.h.subarray(i, i + t) : (e = e.h, i = i === (t = i + t) ? new Uint8Array(0) :
|
|
2043
|
+
return e.Y && e.j ? i = e.h.subarray(i, i + t) : (e = e.h, i = i === (t = i + t) ? new Uint8Array(0) : Wu ? e.slice(i, t) : new Uint8Array(e.subarray(i, t))), i.length == 0 ? Jt() : new ht(i, yi);
|
|
2044
2044
|
}
|
|
2045
2045
|
var Ts = [];
|
|
2046
2046
|
function ac(e, t, i, r) {
|
|
@@ -2048,7 +2048,7 @@ function ac(e, t, i, r) {
|
|
|
2048
2048
|
const n = Gr.pop();
|
|
2049
2049
|
return n.o(r), n.g.init(e, t, i, r), n;
|
|
2050
2050
|
}
|
|
2051
|
-
return new
|
|
2051
|
+
return new wd(e, t, i, r);
|
|
2052
2052
|
}
|
|
2053
2053
|
function cc(e) {
|
|
2054
2054
|
e.g.clear(), e.l = -1, e.h = -1, Gr.length < 100 && Gr.push(e);
|
|
@@ -2102,7 +2102,7 @@ function Er(e, t, i) {
|
|
|
2102
2102
|
}
|
|
2103
2103
|
function Fo(e) {
|
|
2104
2104
|
var t = kt(e.g), i = oc(e = e.g, t);
|
|
2105
|
-
if (e = e.h,
|
|
2105
|
+
if (e = e.h, ku) {
|
|
2106
2106
|
var r, n = e;
|
|
2107
2107
|
(r = kn) || (r = kn = new TextDecoder("utf-8", { fatal: !0 })), t = i + t, n = i === 0 && t === n.length ? n : n.subarray(i, t);
|
|
2108
2108
|
try {
|
|
@@ -2140,7 +2140,7 @@ function on(e, t, i) {
|
|
|
2140
2140
|
var r = kt(e.g);
|
|
2141
2141
|
for (r = e.g.g + r; e.g.g < r; ) i.push(t(e.g));
|
|
2142
2142
|
}
|
|
2143
|
-
var
|
|
2143
|
+
var wd = class {
|
|
2144
2144
|
constructor(e, t, i, r) {
|
|
2145
2145
|
if (Ts.length) {
|
|
2146
2146
|
const n = Ts.pop();
|
|
@@ -2163,33 +2163,33 @@ var hd = class {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}, Gr = [];
|
|
2165
2165
|
function Ns(e) {
|
|
2166
|
-
return e ? /^\d+$/.test(e) ? (Zr(e), new jn(oe, he)) : null :
|
|
2166
|
+
return e ? /^\d+$/.test(e) ? (Zr(e), new jn(oe, he)) : null : fd || (fd = new jn(0, 0));
|
|
2167
2167
|
}
|
|
2168
2168
|
var jn = class {
|
|
2169
2169
|
constructor(e, t) {
|
|
2170
2170
|
this.h = e >>> 0, this.g = t >>> 0;
|
|
2171
2171
|
}
|
|
2172
2172
|
};
|
|
2173
|
-
let
|
|
2173
|
+
let fd;
|
|
2174
2174
|
function Cs(e) {
|
|
2175
|
-
return e ? /^-?\d+$/.test(e) ? (Zr(e), new $n(oe, he)) : null :
|
|
2175
|
+
return e ? /^-?\d+$/.test(e) ? (Zr(e), new $n(oe, he)) : null : md || (md = new $n(0, 0));
|
|
2176
2176
|
}
|
|
2177
2177
|
var $n = class {
|
|
2178
2178
|
constructor(e, t) {
|
|
2179
2179
|
this.h = e >>> 0, this.g = t >>> 0;
|
|
2180
2180
|
}
|
|
2181
2181
|
};
|
|
2182
|
-
let
|
|
2182
|
+
let md;
|
|
2183
2183
|
function mi(e, t, i) {
|
|
2184
2184
|
for (; i > 0 || t > 127; ) e.g.push(127 & t | 128), t = (t >>> 7 | i << 25) >>> 0, i >>>= 7;
|
|
2185
2185
|
e.g.push(t);
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function Vi(e, t) {
|
|
2188
2188
|
for (; t > 127; ) e.g.push(127 & t | 128), t >>>= 7;
|
|
2189
2189
|
e.g.push(t);
|
|
2190
2190
|
}
|
|
2191
2191
|
function sn(e, t) {
|
|
2192
|
-
if (t >= 0)
|
|
2192
|
+
if (t >= 0) Vi(e, t);
|
|
2193
2193
|
else {
|
|
2194
2194
|
for (let i = 0; i < 9; i++) e.g.push(127 & t | 128), t >>= 7;
|
|
2195
2195
|
e.g.push(1);
|
|
@@ -2203,7 +2203,7 @@ function Ai(e, t) {
|
|
|
2203
2203
|
t.length !== 0 && (e.l.push(t), e.h += t.length);
|
|
2204
2204
|
}
|
|
2205
2205
|
function et(e, t, i) {
|
|
2206
|
-
|
|
2206
|
+
Vi(e.g, 8 * t + i);
|
|
2207
2207
|
}
|
|
2208
2208
|
function Lo(e, t) {
|
|
2209
2209
|
return et(e, t, 2), t = e.g.end(), Ai(e, t), t.push(e.h), t;
|
|
@@ -2214,7 +2214,7 @@ function Mo(e, t) {
|
|
|
2214
2214
|
t.push(i), e.h++;
|
|
2215
2215
|
}
|
|
2216
2216
|
function an(e, t, i) {
|
|
2217
|
-
et(e, t, 2),
|
|
2217
|
+
et(e, t, 2), Vi(e.g, i.length), Ai(e, e.g.end()), Ai(e, i);
|
|
2218
2218
|
}
|
|
2219
2219
|
function jr(e, t, i, r) {
|
|
2220
2220
|
i != null && (t = Lo(e, t), r(i, e), Mo(e, t));
|
|
@@ -2227,10 +2227,10 @@ function ft() {
|
|
|
2227
2227
|
};
|
|
2228
2228
|
return Object.setPrototypeOf(e, e.prototype), e;
|
|
2229
2229
|
}
|
|
2230
|
-
var Do = ft(), dc = ft(), Po = ft(), Oo = ft(), hc = ft(), wc = ft(),
|
|
2230
|
+
var Do = ft(), dc = ft(), Po = ft(), Oo = ft(), hc = ft(), wc = ft(), gd = ft(), cn = ft(), fc = ft(), mc = ft();
|
|
2231
2231
|
function mt(e, t, i) {
|
|
2232
2232
|
var r = e.v;
|
|
2233
|
-
|
|
2233
|
+
Ge && Ge in r && (r = r[Ge]) && delete r[t.g], t.h ? t.j(e, t.h, t.g, i, t.l) : t.j(e, t.g, i, t.l);
|
|
2234
2234
|
}
|
|
2235
2235
|
var I = class {
|
|
2236
2236
|
constructor(e, t) {
|
|
@@ -2241,9 +2241,9 @@ var I = class {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
j() {
|
|
2243
2243
|
var n;
|
|
2244
|
-
var e =
|
|
2245
|
-
if (
|
|
2246
|
-
r(i, t,
|
|
2244
|
+
var e = Jd, t = this.v, i = e.g, r = Ge;
|
|
2245
|
+
if (Li && r && ((n = t[r]) == null ? void 0 : n[i]) != null && bi(Du, 3), t = e.g, ms && Ge && ms === void 0 && (r = (i = this.v)[Ge]) && (r = r.da)) try {
|
|
2246
|
+
r(i, t, od);
|
|
2247
2247
|
} catch (o) {
|
|
2248
2248
|
Ia(o);
|
|
2249
2249
|
}
|
|
@@ -2251,26 +2251,26 @@ var I = class {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
clone() {
|
|
2253
2253
|
const e = this.v, t = 0 | e[S];
|
|
2254
|
-
return Eo(this, e, t) ? vo(this, e, !0) : new this.constructor(
|
|
2254
|
+
return Eo(this, e, t) ? vo(this, e, !0) : new this.constructor(Pi(e, t, !1));
|
|
2255
2255
|
}
|
|
2256
2256
|
};
|
|
2257
2257
|
I.prototype[vi] = xi, I.prototype.toString = function() {
|
|
2258
2258
|
return this.v.toString();
|
|
2259
2259
|
};
|
|
2260
|
-
var
|
|
2260
|
+
var Gi = class {
|
|
2261
2261
|
constructor(e, t, i) {
|
|
2262
2262
|
this.g = e, this.h = t, e = Do, this.l = !!e && i === e || !1;
|
|
2263
2263
|
}
|
|
2264
2264
|
};
|
|
2265
2265
|
function ln(e, t) {
|
|
2266
|
-
return new
|
|
2266
|
+
return new Gi(e, t, Do);
|
|
2267
2267
|
}
|
|
2268
2268
|
function gc(e, t, i, r, n) {
|
|
2269
2269
|
jr(e, i, vc(t, r), n);
|
|
2270
2270
|
}
|
|
2271
|
-
const
|
|
2271
|
+
const pd = ln(function(e, t, i, r, n) {
|
|
2272
2272
|
return e.h === 2 && (Er(e, No(t, r, i), n), !0);
|
|
2273
|
-
}, gc),
|
|
2273
|
+
}, gc), yd = ln(function(e, t, i, r, n) {
|
|
2274
2274
|
return e.h === 2 && (Er(e, No(t, r, i), n), !0);
|
|
2275
2275
|
}, gc);
|
|
2276
2276
|
var un = Symbol(), dn = Symbol(), zn = Symbol(), Ss = Symbol(), Is = Symbol();
|
|
@@ -2281,9 +2281,9 @@ function ri(e, t, i, r) {
|
|
|
2281
2281
|
(n = {}).qa = r, n.T = function(h) {
|
|
2282
2282
|
switch (typeof h) {
|
|
2283
2283
|
case "boolean":
|
|
2284
|
-
return
|
|
2284
|
+
return cd || (cd = [0, void 0, !0]);
|
|
2285
2285
|
case "number":
|
|
2286
|
-
return h > 0 ? void 0 : h === 0 ?
|
|
2286
|
+
return h > 0 ? void 0 : h === 0 ? ld || (ld = [0, void 0]) : [-h, void 0];
|
|
2287
2287
|
case "string":
|
|
2288
2288
|
return [0, h];
|
|
2289
2289
|
case "object":
|
|
@@ -2302,7 +2302,7 @@ function ri(e, t, i, r) {
|
|
|
2302
2302
|
let h;
|
|
2303
2303
|
typeof o == "number" && (l += o, o = r[++s]);
|
|
2304
2304
|
var d = void 0;
|
|
2305
|
-
if (o instanceof
|
|
2305
|
+
if (o instanceof Gi ? h = o : (h = pd, s--), h == null ? void 0 : h.l) {
|
|
2306
2306
|
o = r[++s], d = r;
|
|
2307
2307
|
var u = s;
|
|
2308
2308
|
typeof o == "function" && (o = o(), d[u] = o), d = o;
|
|
@@ -2315,7 +2315,7 @@ function ri(e, t, i, r) {
|
|
|
2315
2315
|
return r[e] = n;
|
|
2316
2316
|
}
|
|
2317
2317
|
function bc(e) {
|
|
2318
|
-
return Array.isArray(e) ? e[0] instanceof
|
|
2318
|
+
return Array.isArray(e) ? e[0] instanceof Gi ? e : [yd, e] : [e, void 0];
|
|
2319
2319
|
}
|
|
2320
2320
|
function vc(e, t) {
|
|
2321
2321
|
return e instanceof I ? e.v : Array.isArray(e) ? qt(e, t) : void 0;
|
|
@@ -2338,18 +2338,18 @@ function Vo(e) {
|
|
|
2338
2338
|
var o = n.l, s = i[o];
|
|
2339
2339
|
if (s == null) {
|
|
2340
2340
|
var a = i.ba;
|
|
2341
|
-
a && (a = a[o]) && (a =
|
|
2341
|
+
a && (a = a[o]) && (a = vd(a)) != null && (s = i[o] = a);
|
|
2342
2342
|
}
|
|
2343
2343
|
if (s == null || !s(n, r, o)) {
|
|
2344
2344
|
if (s = (a = n).m, Mr(a), a.ha) var l = void 0;
|
|
2345
2345
|
else l = a.g.g - s, a.g.g = s, l = sc(a.g, l);
|
|
2346
|
-
s = void 0, a = r, l && ((s = a[
|
|
2346
|
+
s = void 0, a = r, l && ((s = a[Ge] ?? (a[Ge] = new Gn()))[o] ?? (s[o] = [])).push(l);
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
2349
|
return (r = tn(r)) && (r.da = i.qa[Is]), !0;
|
|
2350
|
-
}, e[zn] = t, e[Is] =
|
|
2350
|
+
}, e[zn] = t, e[Is] = bd.bind(e), t;
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2352
|
+
function bd(e, t, i, r) {
|
|
2353
2353
|
var n = this[dn];
|
|
2354
2354
|
const o = this[zn], s = qt(void 0, n.T), a = tn(e);
|
|
2355
2355
|
if (a) {
|
|
@@ -2373,7 +2373,7 @@ function yd(e, t, i, r) {
|
|
|
2373
2373
|
if (l) {
|
|
2374
2374
|
let u = 0 | e[S];
|
|
2375
2375
|
if (2 & u && 2048 & u && !(i != null && i.Ka)) throw Error();
|
|
2376
|
-
const h =
|
|
2376
|
+
const h = Mi(u), w = (f, g) => {
|
|
2377
2377
|
if (xt(e, f, h) != null) {
|
|
2378
2378
|
if ((i == null ? void 0 : i.Qa) === 1) return;
|
|
2379
2379
|
throw Error();
|
|
@@ -2387,7 +2387,7 @@ function yd(e, t, i, r) {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2390
|
+
function vd(e) {
|
|
2391
2391
|
const t = (e = bc(e))[0].g;
|
|
2392
2392
|
if (e = e[1]) {
|
|
2393
2393
|
const i = Vo(e), r = ri(dn, Bo, Uo, e).T;
|
|
@@ -2432,8 +2432,8 @@ function Ec(e, t, i) {
|
|
|
2432
2432
|
for (Ai(t, t.g.end()), r = 0; r < o.length; r++) Ai(t, ho(o[r]) || new Uint8Array(0));
|
|
2433
2433
|
});
|
|
2434
2434
|
}
|
|
2435
|
-
const
|
|
2436
|
-
function
|
|
2435
|
+
const xd = je(0);
|
|
2436
|
+
function ji(e, t) {
|
|
2437
2437
|
if (Array.isArray(t)) {
|
|
2438
2438
|
var i = 0 | t[S];
|
|
2439
2439
|
if (4 & i) return t;
|
|
@@ -2444,24 +2444,24 @@ function Gi(e, t) {
|
|
|
2444
2444
|
return n < r && (t.length = n), (e = -1537 & (5 | i)) !== i && ye(t, e), 2 & e && Object.freeze(t), t;
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2448
|
-
return new
|
|
2447
|
+
function Ie(e, t, i) {
|
|
2448
|
+
return new Gi(e, t, i);
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2451
|
-
return new
|
|
2450
|
+
function $i(e, t, i) {
|
|
2451
|
+
return new Gi(e, t, i);
|
|
2452
2452
|
}
|
|
2453
2453
|
function _e(e, t, i) {
|
|
2454
|
-
ge(e, 0 | e[S], t, i,
|
|
2454
|
+
ge(e, 0 | e[S], t, i, Mi(0 | e[S]));
|
|
2455
2455
|
}
|
|
2456
|
-
var
|
|
2456
|
+
var Ed = ln(function(e, t, i, r, n) {
|
|
2457
2457
|
if (e.h !== 2) return !1;
|
|
2458
|
-
if (e = rt(e = Er(e, qt([void 0, void 0], r), n)), n =
|
|
2458
|
+
if (e = rt(e = Er(e, qt([void 0, void 0], r), n)), n = Mi(r = 0 | t[S]), 2 & r) throw Error();
|
|
2459
2459
|
let o = xt(t, i, n);
|
|
2460
2460
|
if (o instanceof vt) 2 & o.J ? (o = o.V(), o.push(e), ge(t, r, i, o, n)) : o.Ma(e);
|
|
2461
2461
|
else if (Array.isArray(o)) {
|
|
2462
2462
|
var s = 0 | o[S];
|
|
2463
2463
|
8192 & s || ye(o, s |= 8192), 2 & s && (o = Za(o), ge(t, r, i, o, n)), o.push(e);
|
|
2464
|
-
} else ge(t, r, i,
|
|
2464
|
+
} else ge(t, r, i, dr([e]), n);
|
|
2465
2465
|
return !0;
|
|
2466
2466
|
}, function(e, t, i, r, n) {
|
|
2467
2467
|
if (t instanceof vt) t.forEach((o, s) => {
|
|
@@ -2472,7 +2472,7 @@ var xd = ln(function(e, t, i, r, n) {
|
|
|
2472
2472
|
const s = t[o];
|
|
2473
2473
|
Array.isArray(s) && jr(e, i, qt(s, r), n);
|
|
2474
2474
|
}
|
|
2475
|
-
|
|
2475
|
+
dr(t);
|
|
2476
2476
|
}
|
|
2477
2477
|
});
|
|
2478
2478
|
function _c(e, t, i) {
|
|
@@ -2500,7 +2500,7 @@ function kc(e, t, i) {
|
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
2502
|
function Ac(e, t, i) {
|
|
2503
|
-
(t =
|
|
2503
|
+
(t = Di(t)) != null && t != null && (et(e, i, 0), sn(e.g, t));
|
|
2504
2504
|
}
|
|
2505
2505
|
function Tc(e, t, i) {
|
|
2506
2506
|
(t = ja(t)) != null && (et(e, i, 0), e.g.g.push(t ? 1 : 0));
|
|
@@ -2515,35 +2515,35 @@ function Sc(e, t, i) {
|
|
|
2515
2515
|
(t = t == null || typeof t == "string" || t instanceof ht ? t : void 0) != null && an(e, i, So(t, !0).buffer);
|
|
2516
2516
|
}
|
|
2517
2517
|
function Ic(e, t, i) {
|
|
2518
|
-
return (e.h === 5 || e.h === 2) && (t =
|
|
2518
|
+
return (e.h === 5 || e.h === 2) && (t = Ui(t, 0 | t[S], i), e.h == 2 ? on(e, Vr, t) : t.push(Vr(e.g)), !0);
|
|
2519
2519
|
}
|
|
2520
|
-
var we =
|
|
2520
|
+
var we = Ie(function(e, t, i) {
|
|
2521
2521
|
return e.h === 5 && (_e(t, i, Vr(e.g)), !0);
|
|
2522
|
-
}, _c, cn),
|
|
2523
|
-
if ((t =
|
|
2522
|
+
}, _c, cn), _d = $i(Ic, function(e, t, i) {
|
|
2523
|
+
if ((t = ji(dt, t)) != null) for (let s = 0; s < t.length; s++) {
|
|
2524
2524
|
var r = e, n = i, o = t[s];
|
|
2525
2525
|
o != null && (et(r, n, 5), r = r.g, fo(o), Ro(r));
|
|
2526
2526
|
}
|
|
2527
|
-
}, cn), Go =
|
|
2528
|
-
if ((t =
|
|
2529
|
-
et(e, i, 2),
|
|
2527
|
+
}, cn), Go = $i(Ic, function(e, t, i) {
|
|
2528
|
+
if ((t = ji(dt, t)) != null && t.length) {
|
|
2529
|
+
et(e, i, 2), Vi(e.g, 4 * t.length);
|
|
2530
2530
|
for (let r = 0; r < t.length; r++) i = e.g, fo(t[r]), Ro(i);
|
|
2531
2531
|
}
|
|
2532
|
-
}, cn),
|
|
2532
|
+
}, cn), kd = Ie(function(e, t, i) {
|
|
2533
2533
|
return e.h === 5 && (_e(t, i, (e = Vr(e.g)) === 0 ? void 0 : e), !0);
|
|
2534
|
-
}, _c, cn), Ot =
|
|
2534
|
+
}, _c, cn), Ot = Ie(function(e, t, i) {
|
|
2535
2535
|
return co ? (e.h !== 0 ? e = !1 : (_e(t, i, ki(e.g, Ga)), e = !0), e) : e.h === 0 && (_e(t, i, ki(e.g, mo)), !0);
|
|
2536
|
-
}, kc, wc), Cn =
|
|
2537
|
-
return co ? (e.h !== 0 ? t = !1 : (_e(t, i, (e = ki(e.g, Ga)) ===
|
|
2538
|
-
}, kc, wc),
|
|
2539
|
-
return co ? (e.h !== 0 ? e = !1 : (_e(t, i, ki(e.g,
|
|
2536
|
+
}, kc, wc), Cn = Ie(function(e, t, i) {
|
|
2537
|
+
return co ? (e.h !== 0 ? t = !1 : (_e(t, i, (e = ki(e.g, Ga)) === xd ? void 0 : e), t = !0), t) : e.h === 0 && (_e(t, i, (e = ki(e.g, mo)) === 0 ? void 0 : e), !0);
|
|
2538
|
+
}, kc, wc), Ad = Ie(function(e, t, i) {
|
|
2539
|
+
return co ? (e.h !== 0 ? e = !1 : (_e(t, i, ki(e.g, qu)), e = !0), e) : e.h === 0 && (_e(t, i, ki(e.g, Vn)), !0);
|
|
2540
2540
|
}, function(e, t, i) {
|
|
2541
2541
|
if (t = function(r) {
|
|
2542
2542
|
if (r == null) return r;
|
|
2543
2543
|
var n = typeof r;
|
|
2544
|
-
if (n === "bigint") return String(
|
|
2544
|
+
if (n === "bigint") return String(Ku(64, r));
|
|
2545
2545
|
if (vr(r)) {
|
|
2546
|
-
if (n === "string") return n = _i(Number(r)), ei(n) && n >= 0 ? r = String(n) : ((n = r.indexOf(".")) !== -1 && (r = r.substring(0, n)), (n = r[0] !== "-" && ((n = r.length) < 20 || n === 20 && r <= "18446744073709551615")) || (Zr(r), r =
|
|
2546
|
+
if (n === "string") return n = _i(Number(r)), ei(n) && n >= 0 ? r = String(n) : ((n = r.indexOf(".")) !== -1 && (r = r.substring(0, n)), (n = r[0] !== "-" && ((n = r.length) < 20 || n === 20 && r <= "18446744073709551615")) || (Zr(r), r = hr(oe, he))), r;
|
|
2547
2547
|
if (n === "number") return (r = _i(r)) >= 0 && ei(r) || (Ei(r), r = Vn(oe, he)), r;
|
|
2548
2548
|
}
|
|
2549
2549
|
}(t), t != null && (typeof t == "string" && Ns(t), t != null))
|
|
@@ -2557,37 +2557,37 @@ var we = Se(function(e, t, i) {
|
|
|
2557
2557
|
default:
|
|
2558
2558
|
i = Ns(t), mi(e.g, i.h, i.g);
|
|
2559
2559
|
}
|
|
2560
|
-
},
|
|
2560
|
+
}, gd), Ee = Ie(function(e, t, i) {
|
|
2561
2561
|
return e.h === 0 && (_e(t, i, Pt(e.g)), !0);
|
|
2562
|
-
}, Ac, Oo), _r =
|
|
2563
|
-
return (e.h === 0 || e.h === 2) && (t =
|
|
2562
|
+
}, Ac, Oo), _r = $i(function(e, t, i) {
|
|
2563
|
+
return (e.h === 0 || e.h === 2) && (t = Ui(t, 0 | t[S], i), e.h == 2 ? on(e, Pt, t) : t.push(Pt(e.g)), !0);
|
|
2564
2564
|
}, function(e, t, i) {
|
|
2565
|
-
if ((t =
|
|
2565
|
+
if ((t = ji(Di, t)) != null && t.length) {
|
|
2566
2566
|
i = Lo(e, i);
|
|
2567
2567
|
for (let r = 0; r < t.length; r++) sn(e.g, t[r]);
|
|
2568
2568
|
Mo(e, i);
|
|
2569
2569
|
}
|
|
2570
|
-
}, Oo), fi =
|
|
2570
|
+
}, Oo), fi = Ie(function(e, t, i) {
|
|
2571
2571
|
return e.h === 0 && (_e(t, i, (e = Pt(e.g)) === 0 ? void 0 : e), !0);
|
|
2572
|
-
}, Ac, Oo), de =
|
|
2572
|
+
}, Ac, Oo), de = Ie(function(e, t, i) {
|
|
2573
2573
|
return e.h === 0 && (_e(t, i, Io(e.g)), !0);
|
|
2574
|
-
}, Tc, dc), Qt =
|
|
2574
|
+
}, Tc, dc), Qt = Ie(function(e, t, i) {
|
|
2575
2575
|
return e.h === 0 && (_e(t, i, (e = Io(e.g)) === !1 ? void 0 : e), !0);
|
|
2576
|
-
}, Tc, dc), Te =
|
|
2577
|
-
return e.h === 2 && (e = Fo(e),
|
|
2576
|
+
}, Tc, dc), Te = $i(function(e, t, i) {
|
|
2577
|
+
return e.h === 2 && (e = Fo(e), Ui(t, 0 | t[S], i).push(e), !0);
|
|
2578
2578
|
}, function(e, t, i) {
|
|
2579
|
-
if ((t =
|
|
2579
|
+
if ((t = ji(ke, t)) != null) for (let s = 0; s < t.length; s++) {
|
|
2580
2580
|
var r = e, n = i, o = t[s];
|
|
2581
2581
|
o != null && an(r, n, Sa(o));
|
|
2582
2582
|
}
|
|
2583
|
-
}, Po), Mt =
|
|
2583
|
+
}, Po), Mt = Ie(function(e, t, i) {
|
|
2584
2584
|
return e.h === 2 && (_e(t, i, (e = Fo(e)) === "" ? void 0 : e), !0);
|
|
2585
|
-
}, Nc, Po), Z =
|
|
2585
|
+
}, Nc, Po), Z = Ie(function(e, t, i) {
|
|
2586
2586
|
return e.h === 2 && (_e(t, i, Fo(e)), !0);
|
|
2587
2587
|
}, Nc, Po), xe = function(e, t, i = Do) {
|
|
2588
|
-
return new
|
|
2588
|
+
return new Gi(e, t, i);
|
|
2589
2589
|
}(function(e, t, i, r, n) {
|
|
2590
|
-
return e.h === 2 && (r = qt(void 0, r),
|
|
2590
|
+
return e.h === 2 && (r = qt(void 0, r), Ui(t, 0 | t[S], i).push(r), Er(e, r, n), !0);
|
|
2591
2591
|
}, function(e, t, i, r, n) {
|
|
2592
2592
|
if (Array.isArray(t)) {
|
|
2593
2593
|
for (let o = 0; o < t.length; o++) Cc(e, t[o], i, r, n);
|
|
@@ -2596,28 +2596,28 @@ var we = Se(function(e, t, i) {
|
|
|
2596
2596
|
}), le = ln(function(e, t, i, r, n, o) {
|
|
2597
2597
|
if (e.h !== 2) return !1;
|
|
2598
2598
|
let s = 0 | t[S];
|
|
2599
|
-
return ec(t, s, o, i,
|
|
2600
|
-
}, Cc), Fc =
|
|
2599
|
+
return ec(t, s, o, i, Mi(s)), Er(e, t = No(t, r, i), n), !0;
|
|
2600
|
+
}, Cc), Fc = Ie(function(e, t, i) {
|
|
2601
2601
|
return e.h === 2 && (_e(t, i, uc(e)), !0);
|
|
2602
|
-
}, Sc, fc),
|
|
2603
|
-
return (e.h === 0 || e.h === 2) && (t =
|
|
2602
|
+
}, Sc, fc), Td = $i(function(e, t, i) {
|
|
2603
|
+
return (e.h === 0 || e.h === 2) && (t = Ui(t, 0 | t[S], i), e.h == 2 ? on(e, kt, t) : t.push(kt(e.g)), !0);
|
|
2604
2604
|
}, function(e, t, i) {
|
|
2605
|
-
if ((t =
|
|
2605
|
+
if ((t = ji($a, t)) != null) for (let s = 0; s < t.length; s++) {
|
|
2606
2606
|
var r = e, n = i, o = t[s];
|
|
2607
|
-
o != null && (et(r, n, 0),
|
|
2607
|
+
o != null && (et(r, n, 0), Vi(r.g, o));
|
|
2608
2608
|
}
|
|
2609
|
-
}, hc),
|
|
2609
|
+
}, hc), Nd = Ie(function(e, t, i) {
|
|
2610
2610
|
return e.h === 0 && (_e(t, i, (e = kt(e.g)) === 0 ? void 0 : e), !0);
|
|
2611
2611
|
}, function(e, t, i) {
|
|
2612
|
-
(t = $a(t)) != null && t != null && (et(e, i, 0),
|
|
2613
|
-
}, hc),
|
|
2612
|
+
(t = $a(t)) != null && t != null && (et(e, i, 0), Vi(e.g, t));
|
|
2613
|
+
}, hc), We = Ie(function(e, t, i) {
|
|
2614
2614
|
return e.h === 0 && (_e(t, i, Pt(e.g)), !0);
|
|
2615
2615
|
}, function(e, t, i) {
|
|
2616
|
-
(t =
|
|
2616
|
+
(t = Di(t)) != null && (t = parseInt(t, 10), et(e, i, 0), sn(e.g, t));
|
|
2617
2617
|
}, mc);
|
|
2618
|
-
class
|
|
2618
|
+
class Cd {
|
|
2619
2619
|
constructor(t, i) {
|
|
2620
|
-
var r =
|
|
2620
|
+
var r = qe;
|
|
2621
2621
|
this.g = t, this.h = i, this.m = K, this.j = L, this.defaultValue = void 0, this.l = r.Oa != null ? Va : void 0;
|
|
2622
2622
|
}
|
|
2623
2623
|
register() {
|
|
@@ -2625,7 +2625,7 @@ class Nd {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
2627
|
function gt(e, t) {
|
|
2628
|
-
return new
|
|
2628
|
+
return new Cd(e, t);
|
|
2629
2629
|
}
|
|
2630
2630
|
function Bt(e, t) {
|
|
2631
2631
|
return (i, r) => {
|
|
@@ -2675,7 +2675,7 @@ var Fs = class extends I {
|
|
|
2675
2675
|
constructor(e) {
|
|
2676
2676
|
super(e);
|
|
2677
2677
|
}
|
|
2678
|
-
}, Rs = [0, Mt,
|
|
2678
|
+
}, Rs = [0, Mt, Ie(function(e, t, i) {
|
|
2679
2679
|
return e.h === 2 && (_e(t, i, (e = uc(e)) === Jt() ? void 0 : e), !0);
|
|
2680
2680
|
}, function(e, t, i) {
|
|
2681
2681
|
if (t != null) {
|
|
@@ -2708,34 +2708,34 @@ function Ms(e) {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
}(e);
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2711
|
+
function Sd(e, ...t) {
|
|
2712
2712
|
if (t.length === 0) return Ms(e[0]);
|
|
2713
2713
|
let i = e[0];
|
|
2714
2714
|
for (let r = 0; r < t.length; r++) i += encodeURIComponent(t[r]) + e[r + 1];
|
|
2715
2715
|
return Ms(i);
|
|
2716
2716
|
}
|
|
2717
|
-
var Rc = [0, Ee,
|
|
2717
|
+
var Rc = [0, Ee, We, de, -1, _r, We, -1, de], Id = class extends I {
|
|
2718
2718
|
constructor(e) {
|
|
2719
2719
|
super(e);
|
|
2720
2720
|
}
|
|
2721
|
-
}, Lc = [0, de, Z, de,
|
|
2722
|
-
return (e.h === 0 || e.h === 2) && (t =
|
|
2721
|
+
}, Lc = [0, de, Z, de, We, -1, $i(function(e, t, i) {
|
|
2722
|
+
return (e.h === 0 || e.h === 2) && (t = Ui(t, 0 | t[S], i), e.h == 2 ? on(e, hd, t) : t.push(Pt(e.g)), !0);
|
|
2723
2723
|
}, function(e, t, i) {
|
|
2724
|
-
if ((t =
|
|
2724
|
+
if ((t = ji(Di, t)) != null && t.length) {
|
|
2725
2725
|
i = Lo(e, i);
|
|
2726
2726
|
for (let r = 0; r < t.length; r++) sn(e.g, t[r]);
|
|
2727
2727
|
Mo(e, i);
|
|
2728
2728
|
}
|
|
2729
|
-
}, mc), Z, -1, [0, de, -1],
|
|
2729
|
+
}, mc), Z, -1, [0, de, -1], We, de, -1], Mc = [0, 3, de, -1, 2, [0, Ee], [0, We, de], [0, Z, -1], [0]], Dc = [0, Z, -2], Ds = class extends I {
|
|
2730
2730
|
constructor(e) {
|
|
2731
2731
|
super(e);
|
|
2732
2732
|
}
|
|
2733
|
-
}, Pc = [0], Oc = [0, Ee, de, 1, de, -4],
|
|
2733
|
+
}, Pc = [0], Oc = [0, Ee, de, 1, de, -4], qe = class extends I {
|
|
2734
2734
|
constructor(e) {
|
|
2735
2735
|
super(e, 2);
|
|
2736
2736
|
}
|
|
2737
2737
|
}, pe = {};
|
|
2738
|
-
pe[336783863] = [0, Z, de, -1, Ee, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], le, Pc, le, Lc, le, Dc, le, Oc, le, Rc, le, [0, Z, -2], le, [0, Z,
|
|
2738
|
+
pe[336783863] = [0, Z, de, -1, Ee, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], le, Pc, le, Lc, le, Dc, le, Oc, le, Rc, le, [0, Z, -2], le, [0, Z, We], le, Mc, le, [0, We, -1, de]], [0, Z], de, [0, [1, 3], [2, 4], le, [0, _r], -1, le, [0, Te], -1, xe, [0, Z, -1]], Z];
|
|
2739
2739
|
var Ps = [0, Cn, -1, Qt, -3, Cn, _r, Mt, fi, Cn, -1, Qt, fi, Qt, -2, Mt];
|
|
2740
2740
|
function re(e, t) {
|
|
2741
2741
|
nn(e, 3, t);
|
|
@@ -2750,7 +2750,7 @@ var Le = class extends I {
|
|
|
2750
2750
|
o(e) {
|
|
2751
2751
|
return L(this, 0, 7, e);
|
|
2752
2752
|
}
|
|
2753
|
-
},
|
|
2753
|
+
}, sr = [-1, {}], Os = [0, Z, 1, sr], Bs = [0, Z, Te, sr];
|
|
2754
2754
|
function tt(e, t) {
|
|
2755
2755
|
Co(e, 1, Le, t);
|
|
2756
2756
|
}
|
|
@@ -2760,16 +2760,16 @@ function se(e, t) {
|
|
|
2760
2760
|
function Y(e, t) {
|
|
2761
2761
|
nn(e, 15, t);
|
|
2762
2762
|
}
|
|
2763
|
-
var
|
|
2763
|
+
var Ke = class extends I {
|
|
2764
2764
|
constructor(e) {
|
|
2765
2765
|
super(e, 500);
|
|
2766
2766
|
}
|
|
2767
2767
|
o(e) {
|
|
2768
2768
|
return L(this, 0, 1001, e);
|
|
2769
2769
|
}
|
|
2770
|
-
}, Bc = [-500, xe, [-500, Mt, -1, Te, -3, [-2, pe, de], xe, Rs, fi, -1, Os, Bs, xe, [0, Mt, Qt], Mt, Ps, fi, Te, 987, Te], 4, xe, [-500, Z, -1, [-1, {}], 998, Z], xe, [-500, Z, Te, -1, [-2, {}, de], 997, Te, -1], fi, xe, [-500, Z, Te,
|
|
2771
|
-
|
|
2772
|
-
var
|
|
2770
|
+
}, Bc = [-500, xe, [-500, Mt, -1, Te, -3, [-2, pe, de], xe, Rs, fi, -1, Os, Bs, xe, [0, Mt, Qt], Mt, Ps, fi, Te, 987, Te], 4, xe, [-500, Z, -1, [-1, {}], 998, Z], xe, [-500, Z, Te, -1, [-2, {}, de], 997, Te, -1], fi, xe, [-500, Z, Te, sr, 998, Te], Te, fi, Os, Bs, xe, [0, Mt, -1, sr], Te, -2, Ps, Mt, -1, Qt, [0, Qt, Nd], 978, sr, xe, Rs];
|
|
2771
|
+
Ke.prototype.g = fn(Bc);
|
|
2772
|
+
var Fd = Bt(Ke, Bc), Rd = class extends I {
|
|
2773
2773
|
constructor(e) {
|
|
2774
2774
|
super(e);
|
|
2775
2775
|
}
|
|
@@ -2778,13 +2778,13 @@ var Id = Bt(qe, Bc), Fd = class extends I {
|
|
|
2778
2778
|
super(e);
|
|
2779
2779
|
}
|
|
2780
2780
|
g() {
|
|
2781
|
-
return Et(this,
|
|
2781
|
+
return Et(this, Rd, 1);
|
|
2782
2782
|
}
|
|
2783
|
-
}, Vc = [0, xe, [0, Ee, we, Z, -1]], mn = Bt(Uc, Vc),
|
|
2783
|
+
}, Vc = [0, xe, [0, Ee, we, Z, -1]], mn = Bt(Uc, Vc), Ld = class extends I {
|
|
2784
2784
|
constructor(e) {
|
|
2785
2785
|
super(e);
|
|
2786
2786
|
}
|
|
2787
|
-
},
|
|
2787
|
+
}, Md = class extends I {
|
|
2788
2788
|
constructor(e) {
|
|
2789
2789
|
super(e);
|
|
2790
2790
|
}
|
|
@@ -2793,16 +2793,16 @@ var Id = Bt(qe, Bc), Fd = class extends I {
|
|
|
2793
2793
|
super(e);
|
|
2794
2794
|
}
|
|
2795
2795
|
l() {
|
|
2796
|
-
return K(this,
|
|
2796
|
+
return K(this, Ld, 2);
|
|
2797
2797
|
}
|
|
2798
2798
|
g() {
|
|
2799
|
-
return Et(this,
|
|
2799
|
+
return Et(this, Md, 5);
|
|
2800
2800
|
}
|
|
2801
2801
|
}, Gc = Bt(class extends I {
|
|
2802
2802
|
constructor(e) {
|
|
2803
2803
|
super(e);
|
|
2804
2804
|
}
|
|
2805
|
-
}, [0, Te, _r, Go, [0,
|
|
2805
|
+
}, [0, Te, _r, Go, [0, We, [0, Ee, -3], [0, we, -3], [0, Ee, -1, [0, xe, [0, Ee, -2]]], xe, [0, we, -1, Z, we]], Z, -1, Ot, xe, [0, Ee, we], Te, Ot]), jc = class extends I {
|
|
2806
2806
|
constructor(e) {
|
|
2807
2807
|
super(e);
|
|
2808
2808
|
}
|
|
@@ -2818,21 +2818,21 @@ var Id = Bt(qe, Bc), Fd = class extends I {
|
|
|
2818
2818
|
constructor(e) {
|
|
2819
2819
|
super(e);
|
|
2820
2820
|
}
|
|
2821
|
-
}, [0, xe, [0, we, -4]]),
|
|
2821
|
+
}, [0, xe, [0, we, -4]]), Dd = class extends I {
|
|
2822
2822
|
constructor(e) {
|
|
2823
2823
|
super(e);
|
|
2824
2824
|
}
|
|
2825
|
-
},
|
|
2825
|
+
}, Pd = [0, Ee, -1, Go, We], zc = class extends I {
|
|
2826
2826
|
constructor(e) {
|
|
2827
2827
|
super(e);
|
|
2828
2828
|
}
|
|
2829
2829
|
};
|
|
2830
2830
|
zc.prototype.g = fn([0, we, -4, Ot]);
|
|
2831
|
-
var
|
|
2831
|
+
var Od = class extends I {
|
|
2832
2832
|
constructor(e) {
|
|
2833
2833
|
super(e);
|
|
2834
2834
|
}
|
|
2835
|
-
},
|
|
2835
|
+
}, Bd = Bt(class extends I {
|
|
2836
2836
|
constructor(e) {
|
|
2837
2837
|
super(e);
|
|
2838
2838
|
}
|
|
@@ -2840,7 +2840,7 @@ var Pd = class extends I {
|
|
|
2840
2840
|
constructor(e) {
|
|
2841
2841
|
super(e);
|
|
2842
2842
|
}
|
|
2843
|
-
},
|
|
2843
|
+
}, Ud = class extends I {
|
|
2844
2844
|
constructor(e) {
|
|
2845
2845
|
super(e);
|
|
2846
2846
|
}
|
|
@@ -2848,11 +2848,11 @@ var Pd = class extends I {
|
|
|
2848
2848
|
const e = ie(this, 1, void 0, void 0, Ja);
|
|
2849
2849
|
return e ?? Jt();
|
|
2850
2850
|
}
|
|
2851
|
-
},
|
|
2851
|
+
}, Vd = class extends I {
|
|
2852
2852
|
constructor(e) {
|
|
2853
2853
|
super(e);
|
|
2854
2854
|
}
|
|
2855
|
-
}, Wc = [1, 2],
|
|
2855
|
+
}, Wc = [1, 2], Gd = Bt(class extends I {
|
|
2856
2856
|
constructor(e) {
|
|
2857
2857
|
super(e);
|
|
2858
2858
|
}
|
|
@@ -2864,7 +2864,7 @@ var Pd = class extends I {
|
|
|
2864
2864
|
constructor(e) {
|
|
2865
2865
|
super(e);
|
|
2866
2866
|
}
|
|
2867
|
-
},
|
|
2867
|
+
}, jd = [0, de, -1], Gs = class extends I {
|
|
2868
2868
|
constructor(e) {
|
|
2869
2869
|
super(e);
|
|
2870
2870
|
}
|
|
@@ -2885,17 +2885,17 @@ var Pd = class extends I {
|
|
|
2885
2885
|
g() {
|
|
2886
2886
|
return ja(ie(this, 2)) ?? !1;
|
|
2887
2887
|
}
|
|
2888
|
-
}, qc = [0, Fc, Z, [0, Ee, Ot, -1], [0,
|
|
2888
|
+
}, qc = [0, Fc, Z, [0, Ee, Ot, -1], [0, Ad, Ot]], fe = [0, qc, de, [0, Dr, le, Oc, le, Lc, le, Rc, le, Pc, le, Dc, le, Mc], We], gn = class extends I {
|
|
2889
2889
|
constructor(e) {
|
|
2890
2890
|
super(e);
|
|
2891
2891
|
}
|
|
2892
|
-
}, $o = [0, fe, we, -1, Ee],
|
|
2892
|
+
}, $o = [0, fe, we, -1, Ee], $d = gt(502141897, gn);
|
|
2893
2893
|
pe[502141897] = $o;
|
|
2894
|
-
var
|
|
2894
|
+
var zd = Bt(class extends I {
|
|
2895
2895
|
constructor(e) {
|
|
2896
2896
|
super(e);
|
|
2897
2897
|
}
|
|
2898
|
-
}, [0, [0,
|
|
2898
|
+
}, [0, [0, We, -1, _d, Td], Pd]), Kc = class extends I {
|
|
2899
2899
|
constructor(e) {
|
|
2900
2900
|
super(e);
|
|
2901
2901
|
}
|
|
@@ -2903,7 +2903,7 @@ var $d = Bt(class extends I {
|
|
|
2903
2903
|
constructor(e) {
|
|
2904
2904
|
super(e);
|
|
2905
2905
|
}
|
|
2906
|
-
}, Wn = [0, fe, we, [0, fe], de],
|
|
2906
|
+
}, Wn = [0, fe, we, [0, fe], de], Wd = gt(508968150, Yc);
|
|
2907
2907
|
pe[508968150] = [0, fe, $o, Wn, we, [0, [0, qc]]], pe[508968149] = Wn;
|
|
2908
2908
|
var wi = class extends I {
|
|
2909
2909
|
constructor(e) {
|
|
@@ -2917,7 +2917,7 @@ var wi = class extends I {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
}, Xc = [0, fe, Hc];
|
|
2919
2919
|
pe[478825465] = Xc;
|
|
2920
|
-
var
|
|
2920
|
+
var Hd = class extends I {
|
|
2921
2921
|
constructor(e) {
|
|
2922
2922
|
super(e);
|
|
2923
2923
|
}
|
|
@@ -2937,11 +2937,11 @@ var Wd = class extends I {
|
|
|
2937
2937
|
constructor(e) {
|
|
2938
2938
|
super(e);
|
|
2939
2939
|
}
|
|
2940
|
-
}, js = [0, fe, [0, fe], Xc, -1], Zc = [0, fe, we, Ee], Ho = [0, fe, we], el = [0, fe, Zc, Ho, we],
|
|
2940
|
+
}, js = [0, fe, [0, fe], Xc, -1], Zc = [0, fe, we, Ee], Ho = [0, fe, we], el = [0, fe, Zc, Ho, we], qd = gt(479097054, Jc);
|
|
2941
2941
|
pe[479097054] = [0, fe, el, js], pe[463370452] = js, pe[464864288] = Zc;
|
|
2942
|
-
var
|
|
2942
|
+
var Kd = gt(462713202, Wo);
|
|
2943
2943
|
pe[462713202] = el, pe[474472470] = Ho;
|
|
2944
|
-
var
|
|
2944
|
+
var Yd = class extends I {
|
|
2945
2945
|
constructor(e) {
|
|
2946
2946
|
super(e);
|
|
2947
2947
|
}
|
|
@@ -2963,14 +2963,14 @@ var nl = class extends I {
|
|
|
2963
2963
|
constructor(e) {
|
|
2964
2964
|
super(e);
|
|
2965
2965
|
}
|
|
2966
|
-
},
|
|
2966
|
+
}, Xd = gt(456383383, nl);
|
|
2967
2967
|
pe[456383383] = [0, fe, Hc];
|
|
2968
2968
|
var ol = class extends I {
|
|
2969
2969
|
constructor(e) {
|
|
2970
2970
|
super(e);
|
|
2971
2971
|
}
|
|
2972
|
-
},
|
|
2973
|
-
pe[476348187] = [0, fe,
|
|
2972
|
+
}, Qd = gt(476348187, ol);
|
|
2973
|
+
pe[476348187] = [0, fe, jd];
|
|
2974
2974
|
var sl = class extends I {
|
|
2975
2975
|
constructor(e) {
|
|
2976
2976
|
super(e);
|
|
@@ -2979,7 +2979,7 @@ var sl = class extends I {
|
|
|
2979
2979
|
constructor(e) {
|
|
2980
2980
|
super(e);
|
|
2981
2981
|
}
|
|
2982
|
-
}, al = [0,
|
|
2982
|
+
}, al = [0, We, -1], Jd = gt(458105876, class extends I {
|
|
2983
2983
|
constructor(e) {
|
|
2984
2984
|
super(e);
|
|
2985
2985
|
}
|
|
@@ -2987,9 +2987,9 @@ var sl = class extends I {
|
|
|
2987
2987
|
let e;
|
|
2988
2988
|
var t = this.v;
|
|
2989
2989
|
const i = 0 | t[S];
|
|
2990
|
-
return e =
|
|
2990
|
+
return e = $e(this, i), t = function(r, n, o, s) {
|
|
2991
2991
|
var a = $s;
|
|
2992
|
-
!s &&
|
|
2992
|
+
!s && Oi(r) && (o = 0 | (n = r.v)[S]);
|
|
2993
2993
|
var l = xt(n, 2);
|
|
2994
2994
|
if (r = !1, l == null) {
|
|
2995
2995
|
if (s) return _s();
|
|
@@ -3001,12 +3001,12 @@ var sl = class extends I {
|
|
|
3001
3001
|
if (s) {
|
|
3002
3002
|
if (!l.length) return _s();
|
|
3003
3003
|
r || (r = !0, yr(l));
|
|
3004
|
-
} else r && (r = !1,
|
|
3005
|
-
return !r && 32 & o && pr(l, 32), o = ge(n, o, 2, s = new vt(l, a,
|
|
3004
|
+
} else r && (r = !1, dr(l), l = Za(l));
|
|
3005
|
+
return !r && 32 & o && pr(l, 32), o = ge(n, o, 2, s = new vt(l, a, Ju, void 0)), r || ii(n, o), s;
|
|
3006
3006
|
}(this, t, i, e), !e && $s && (t.ra = !0), t;
|
|
3007
3007
|
}
|
|
3008
3008
|
});
|
|
3009
|
-
pe[458105876] = [0, al,
|
|
3009
|
+
pe[458105876] = [0, al, Ed, [!0, Ot, [0, Z, -1, Te]], [0, _r, de, We]];
|
|
3010
3010
|
var Ko = class extends I {
|
|
3011
3011
|
constructor(e) {
|
|
3012
3012
|
super(e);
|
|
@@ -3017,7 +3017,7 @@ var Fn = class extends I {
|
|
|
3017
3017
|
constructor(e) {
|
|
3018
3018
|
super(e);
|
|
3019
3019
|
}
|
|
3020
|
-
}, zs = [0,
|
|
3020
|
+
}, zs = [0, kd, -1, Qt], Zd = class extends I {
|
|
3021
3021
|
constructor(e) {
|
|
3022
3022
|
super(e);
|
|
3023
3023
|
}
|
|
@@ -3031,13 +3031,13 @@ var ul = class extends I {
|
|
|
3031
3031
|
constructor(e) {
|
|
3032
3032
|
super(e);
|
|
3033
3033
|
}
|
|
3034
|
-
},
|
|
3034
|
+
}, eh = gt(443442058, ul);
|
|
3035
3035
|
pe[443442058] = [0, fe, Z, Ee, we, Te, -1, de, we], pe[514774813] = qo;
|
|
3036
3036
|
var dl = class extends I {
|
|
3037
3037
|
constructor(e) {
|
|
3038
3038
|
super(e);
|
|
3039
3039
|
}
|
|
3040
|
-
},
|
|
3040
|
+
}, th = gt(516587230, dl);
|
|
3041
3041
|
function Kn(e, t) {
|
|
3042
3042
|
return t = t ? t.clone() : new jo(), e.displayNamesLocale !== void 0 ? J(t, 1, xr(e.displayNamesLocale)) : e.displayNamesLocale === void 0 && J(t, 1), e.maxResults !== void 0 ? _t(t, 2, e.maxResults) : "maxResults" in e && J(t, 2), e.scoreThreshold !== void 0 ? R(t, 3, e.scoreThreshold) : "scoreThreshold" in e && J(t, 3), e.categoryAllowlist !== void 0 ? Ur(t, 4, e.categoryAllowlist) : "categoryAllowlist" in e && J(t, 4), e.categoryDenylist !== void 0 ? Ur(t, 5, e.categoryDenylist) : "categoryDenylist" in e && J(t, 5), t;
|
|
3043
3043
|
}
|
|
@@ -3048,18 +3048,18 @@ function hl(e) {
|
|
|
3048
3048
|
function Yo(e, t = -1, i = "") {
|
|
3049
3049
|
return { categories: e.map((r) => ({ index: Ze(r, 1) ?? 0 ?? -1, score: ue(r, 2) ?? 0, categoryName: ke(ie(r, 3)) ?? "" ?? "", displayName: ke(ie(r, 4)) ?? "" ?? "" })), headIndex: t, headName: i };
|
|
3050
3050
|
}
|
|
3051
|
-
function
|
|
3052
|
-
const t = { classifications: Et(e,
|
|
3051
|
+
function ih(e) {
|
|
3052
|
+
const t = { classifications: Et(e, Od, 1).map((i) => {
|
|
3053
3053
|
var r;
|
|
3054
3054
|
return Yo(((r = K(i, Uc, 4)) == null ? void 0 : r.g()) ?? [], Ze(i, 2) ?? 0, ke(ie(i, 3)) ?? "");
|
|
3055
3055
|
}) };
|
|
3056
3056
|
return function(i) {
|
|
3057
|
-
return
|
|
3057
|
+
return Qu(lo ? ie(i, 2, void 0, void 0, Or) : ie(i, 2));
|
|
3058
3058
|
}(e) != null && (t.timestampMs = hl(nc(e))), t;
|
|
3059
3059
|
}
|
|
3060
3060
|
function wl(e) {
|
|
3061
3061
|
var s, a;
|
|
3062
|
-
var t = Wt(e, 3, dt, zt()), i = Wt(e, 2,
|
|
3062
|
+
var t = Wt(e, 3, dt, zt()), i = Wt(e, 2, Di, zt()), r = Wt(e, 1, ke, zt()), n = Wt(e, 9, ke, zt());
|
|
3063
3063
|
const o = { categories: [], keypoints: [] };
|
|
3064
3064
|
for (let l = 0; l < t.length; l++) o.categories.push({ score: t[l], index: i[l] ?? -1, categoryName: r[l] ?? "", displayName: n[l] ?? "" });
|
|
3065
3065
|
if ((t = (s = K(e, In, 4)) == null ? void 0 : s.l()) && (o.boundingBox = { originX: Ze(t, 1, Ct) ?? 0, originY: Ze(t, 2, Ct) ?? 0, width: Ze(t, 3, Ct) ?? 0, height: Ze(t, 4, Ct) ?? 0, angle: 0 }), (a = K(e, In, 4)) == null ? void 0 : a.g().length) for (const l of K(e, In, 4).g()) o.keypoints.push({ x: ie(l, 1, void 0, Ct, dt) ?? 0, y: ie(l, 2, void 0, Ct, dt) ?? 0, score: ie(l, 4, void 0, Ct, dt) ?? 0, label: ke(ie(l, 3, void 0, Ct)) ?? "" });
|
|
@@ -3070,7 +3070,7 @@ function pn(e) {
|
|
|
3070
3070
|
for (const i of Et(e, $c, 1)) t.push({ x: ue(i, 1) ?? 0, y: ue(i, 2) ?? 0, z: ue(i, 3) ?? 0, visibility: ue(i, 4) ?? 0 });
|
|
3071
3071
|
return t;
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
3073
|
+
function ar(e) {
|
|
3074
3074
|
const t = [];
|
|
3075
3075
|
for (const i of Et(e, jc, 1)) t.push({ x: ue(i, 1) ?? 0, y: ue(i, 2) ?? 0, z: ue(i, 3) ?? 0, visibility: ue(i, 4) ?? 0 });
|
|
3076
3076
|
return t;
|
|
@@ -3087,16 +3087,16 @@ function Hs(e, t) {
|
|
|
3087
3087
|
}
|
|
3088
3088
|
let Ir;
|
|
3089
3089
|
pe[516587230] = [0, fe, qo, Hn, we], pe[518928384] = Hn;
|
|
3090
|
-
const
|
|
3090
|
+
const rh = 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]);
|
|
3091
3091
|
async function fl() {
|
|
3092
3092
|
if (Ir === void 0) try {
|
|
3093
|
-
await WebAssembly.instantiate(
|
|
3093
|
+
await WebAssembly.instantiate(rh), Ir = !0;
|
|
3094
3094
|
} catch {
|
|
3095
3095
|
Ir = !1;
|
|
3096
3096
|
}
|
|
3097
3097
|
return Ir;
|
|
3098
3098
|
}
|
|
3099
|
-
async function
|
|
3099
|
+
async function ir(e, t = Sd``) {
|
|
3100
3100
|
const i = await fl() ? "wasm_internal" : "wasm_nosimd_internal";
|
|
3101
3101
|
return { wasmLoaderPath: `${t}/${e}_${i}.js`, wasmBinaryPath: `${t}/${e}_${i}.wasm` };
|
|
3102
3102
|
}
|
|
@@ -3157,19 +3157,19 @@ function St(e, t, i) {
|
|
|
3157
3157
|
};
|
|
3158
3158
|
}
|
|
3159
3159
|
$t.forVisionTasks = function(e) {
|
|
3160
|
-
return
|
|
3160
|
+
return ir("vision", e);
|
|
3161
3161
|
}, $t.forTextTasks = function(e) {
|
|
3162
|
-
return
|
|
3162
|
+
return ir("text", e);
|
|
3163
3163
|
}, $t.forGenAiExperimentalTasks = function(e) {
|
|
3164
|
-
return
|
|
3164
|
+
return ir("genai_experimental", e);
|
|
3165
3165
|
}, $t.forGenAiTasks = function(e) {
|
|
3166
|
-
return
|
|
3166
|
+
return ir("genai", e);
|
|
3167
3167
|
}, $t.forAudioTasks = function(e) {
|
|
3168
|
-
return
|
|
3168
|
+
return ir("audio", e);
|
|
3169
3169
|
}, $t.isSimdSupported = function() {
|
|
3170
3170
|
return fl();
|
|
3171
3171
|
};
|
|
3172
|
-
async function
|
|
3172
|
+
async function nh(e, t, i, r) {
|
|
3173
3173
|
return e = await (async (n, o, s, a, l) => {
|
|
3174
3174
|
if (o && await qs(o), !self.ModuleFactory || s && (await qs(s), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
|
|
3175
3175
|
return self.Module && l && ((o = self.Module).locateFile = l.locateFile, l.mainScriptUrlOrBlob && (o.mainScriptUrlOrBlob = l.mainScriptUrlOrBlob)), l = await self.ModuleFactory(self.Module || l), self.ModuleFactory = self.Module = void 0, new n(l, a);
|
|
@@ -3188,11 +3188,11 @@ function Xs(e) {
|
|
|
3188
3188
|
e.H = [];
|
|
3189
3189
|
}
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3191
|
+
function T(e, t) {
|
|
3192
3192
|
e.C = Math.max(e.C, t);
|
|
3193
3193
|
}
|
|
3194
3194
|
function yn(e, t) {
|
|
3195
|
-
e.B = new Le(),
|
|
3195
|
+
e.B = new Le(), ze(e.B, 2, "PassThroughCalculator"), re(e.B, "free_memory"), H(e.B, "free_memory_unused_out"), se(t, "free_memory"), tt(t, e.B);
|
|
3196
3196
|
}
|
|
3197
3197
|
function Ti(e, t) {
|
|
3198
3198
|
re(e.B, t), H(e.B, t + "_unused_out");
|
|
@@ -3214,9 +3214,9 @@ var Yn = class {
|
|
|
3214
3214
|
let h = K(d.baseOptions, Gs, 3);
|
|
3215
3215
|
if (!h) {
|
|
3216
3216
|
var w = h = new Gs(), f = new Ds();
|
|
3217
|
-
|
|
3217
|
+
or(w, 4, Dr, f);
|
|
3218
3218
|
}
|
|
3219
|
-
"delegate" in u && (u.delegate === "GPU" ? (u = h, w = new
|
|
3219
|
+
"delegate" in u && (u.delegate === "GPU" ? (u = h, w = new Id(), or(u, 2, Dr, w)) : (u = h, w = new Ds(), or(u, 4, Dr, w))), L(d.baseOptions, 0, 3, h);
|
|
3220
3220
|
}(this, l), l.modelAssetPath) return fetch(l.modelAssetPath.toString()).then((d) => {
|
|
3221
3221
|
if (d.ok) return d.arrayBuffer();
|
|
3222
3222
|
throw Error(`Failed to fetch model: ${l.modelAssetPath} (${d.status})`);
|
|
@@ -3251,7 +3251,7 @@ var Yn = class {
|
|
|
3251
3251
|
ca() {
|
|
3252
3252
|
let e;
|
|
3253
3253
|
if (this.g.ca((t) => {
|
|
3254
|
-
e =
|
|
3254
|
+
e = Fd(t);
|
|
3255
3255
|
}), !e) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
3256
3256
|
return e;
|
|
3257
3257
|
}
|
|
@@ -3272,7 +3272,7 @@ function Dt(e, t) {
|
|
|
3272
3272
|
return e;
|
|
3273
3273
|
}
|
|
3274
3274
|
Yn.prototype.close = Yn.prototype.close;
|
|
3275
|
-
class
|
|
3275
|
+
class oh {
|
|
3276
3276
|
constructor(t, i, r, n) {
|
|
3277
3277
|
this.g = t, this.h = i, this.m = r, this.l = n;
|
|
3278
3278
|
}
|
|
@@ -3294,14 +3294,14 @@ function Js(e, t) {
|
|
|
3294
3294
|
const n = Dt(i.createBuffer(), "Failed to create buffer");
|
|
3295
3295
|
i.bindBuffer(i.ARRAY_BUFFER, n), i.enableVertexAttribArray(e.O), i.vertexAttribPointer(e.O, 2, i.FLOAT, !1, 0, 0), i.bufferData(i.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), i.STATIC_DRAW);
|
|
3296
3296
|
const o = Dt(i.createBuffer(), "Failed to create buffer");
|
|
3297
|
-
return i.bindBuffer(i.ARRAY_BUFFER, o), i.enableVertexAttribArray(e.L), i.vertexAttribPointer(e.L, 2, i.FLOAT, !1, 0, 0), i.bufferData(i.ARRAY_BUFFER, new Float32Array(t ? [0, 1, 0, 0, 1, 0, 1, 1] : [0, 0, 0, 1, 1, 1, 1, 0]), i.STATIC_DRAW), i.bindBuffer(i.ARRAY_BUFFER, null), i.bindVertexArray(null), new
|
|
3297
|
+
return i.bindBuffer(i.ARRAY_BUFFER, o), i.enableVertexAttribArray(e.L), i.vertexAttribPointer(e.L, 2, i.FLOAT, !1, 0, 0), i.bufferData(i.ARRAY_BUFFER, new Float32Array(t ? [0, 1, 0, 0, 1, 0, 1, 1] : [0, 0, 0, 1, 1, 1, 1, 0]), i.STATIC_DRAW), i.bindBuffer(i.ARRAY_BUFFER, null), i.bindVertexArray(null), new oh(i, r, n, o);
|
|
3298
3298
|
}
|
|
3299
3299
|
function Xo(e, t) {
|
|
3300
3300
|
if (e.g) {
|
|
3301
3301
|
if (t !== e.g) throw Error("Cannot change GL context once initialized");
|
|
3302
3302
|
} else e.g = t;
|
|
3303
3303
|
}
|
|
3304
|
-
function
|
|
3304
|
+
function sh(e, t, i, r) {
|
|
3305
3305
|
return Xo(e, t), e.h || (e.m(), e.D()), i ? (e.u || (e.u = Js(e, !0)), i = e.u) : (e.A || (e.A = Js(e, !1)), i = e.A), t.useProgram(e.h), i.bind(), e.l(), e = r(), i.g.bindVertexArray(null), e;
|
|
3306
3306
|
}
|
|
3307
3307
|
function pl(e, t, i) {
|
|
@@ -3310,7 +3310,7 @@ function pl(e, t, i) {
|
|
|
3310
3310
|
function yl(e, t, i) {
|
|
3311
3311
|
Xo(e, t), e.B || (e.B = Dt(t.createFramebuffer(), "Failed to create framebuffe.")), t.bindFramebuffer(t.FRAMEBUFFER, e.B), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, i, 0);
|
|
3312
3312
|
}
|
|
3313
|
-
function
|
|
3313
|
+
function ah(e) {
|
|
3314
3314
|
var t;
|
|
3315
3315
|
(t = e.g) == null || t.bindFramebuffer(e.g.FRAMEBUFFER, null);
|
|
3316
3316
|
}
|
|
@@ -3447,9 +3447,9 @@ var Fr, ve = class {
|
|
|
3447
3447
|
const r = Ni(this), n = Qo(this);
|
|
3448
3448
|
r.activeTexture(r.TEXTURE1), i = pl(n, r, this.m ? r.LINEAR : r.NEAREST), r.bindTexture(r.TEXTURE_2D, i);
|
|
3449
3449
|
const o = xl(this);
|
|
3450
|
-
r.texImage2D(r.TEXTURE_2D, 0, o, this.width, this.height, 0, r.RED, r.FLOAT, null), r.bindTexture(r.TEXTURE_2D, null), yl(n, r, i),
|
|
3450
|
+
r.texImage2D(r.TEXTURE_2D, 0, o, this.width, this.height, 0, r.RED, r.FLOAT, null), r.bindTexture(r.TEXTURE_2D, null), yl(n, r, i), sh(n, r, !1, () => {
|
|
3451
3451
|
El(this), r.clearColor(0, 0, 0, 0), r.clear(r.COLOR_BUFFER_BIT), r.drawArrays(r.TRIANGLE_FAN, 0, 4), Qn(this);
|
|
3452
|
-
}),
|
|
3452
|
+
}), ah(n), Qn(this);
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
3455
|
e.push(i);
|
|
@@ -3465,7 +3465,7 @@ var Zs = 250;
|
|
|
3465
3465
|
function nt(...e) {
|
|
3466
3466
|
return e.map(([t, i]) => ({ start: t, end: i }));
|
|
3467
3467
|
}
|
|
3468
|
-
const
|
|
3468
|
+
const ch = /* @__PURE__ */ function(e) {
|
|
3469
3469
|
return class extends e {
|
|
3470
3470
|
Ja() {
|
|
3471
3471
|
this.i._registerModelResourcesGraphService();
|
|
@@ -3828,11 +3828,11 @@ const ah = /* @__PURE__ */ function(e) {
|
|
|
3828
3828
|
});
|
|
3829
3829
|
}
|
|
3830
3830
|
}));
|
|
3831
|
-
var ea, ot = class extends
|
|
3831
|
+
var ea, ot = class extends ch {
|
|
3832
3832
|
};
|
|
3833
3833
|
async function q(e, t, i) {
|
|
3834
3834
|
return async function(r, n, o, s) {
|
|
3835
|
-
return
|
|
3835
|
+
return nh(r, n, o, s);
|
|
3836
3836
|
}(e, i.canvas ?? (ml() ? void 0 : document.createElement("canvas")), t, i);
|
|
3837
3837
|
}
|
|
3838
3838
|
function _l(e, t, i, r) {
|
|
@@ -3872,20 +3872,20 @@ function Ci(e, t, i, r) {
|
|
|
3872
3872
|
if ((n instanceof Uint8Array || n instanceof Float32Array) && n.length !== s) throw Error("Unsupported channel count: " + n.length / s);
|
|
3873
3873
|
return e = new ve([n], i, !1, e.g.i.canvas, e.P, o, t), r ? e.clone() : e;
|
|
3874
3874
|
}
|
|
3875
|
-
var
|
|
3875
|
+
var He = class extends Yn {
|
|
3876
3876
|
constructor(e, t, i, r) {
|
|
3877
3877
|
super(e), this.g = e, this.X = t, this.U = i, this.oa = r, this.P = new bl();
|
|
3878
3878
|
}
|
|
3879
3879
|
l(e, t = !0) {
|
|
3880
|
-
if ("runningMode" in e && J(this.baseOptions, 2,
|
|
3880
|
+
if ("runningMode" in e && J(this.baseOptions, 2, wr(!!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.");
|
|
3881
3881
|
return super.l(e, t);
|
|
3882
3882
|
}
|
|
3883
3883
|
close() {
|
|
3884
3884
|
this.P.close(), super.close();
|
|
3885
3885
|
}
|
|
3886
3886
|
};
|
|
3887
|
-
|
|
3888
|
-
var Xe = class extends
|
|
3887
|
+
He.prototype.close = He.prototype.close;
|
|
3888
|
+
var Xe = class extends He {
|
|
3889
3889
|
constructor(e, t) {
|
|
3890
3890
|
super(new ot(e, t), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, L(e = this.h = new gn(), 0, 1, t = new ce()), R(this.h, 2, 0.5), R(this.h, 3, 0.3);
|
|
3891
3891
|
}
|
|
@@ -3905,16 +3905,16 @@ var Xe = class extends We {
|
|
|
3905
3905
|
return this.j = { detections: [] }, pt(this, e, i, t), this.j;
|
|
3906
3906
|
}
|
|
3907
3907
|
m() {
|
|
3908
|
-
var e = new
|
|
3908
|
+
var e = new Ke();
|
|
3909
3909
|
se(e, "image_in"), se(e, "norm_rect_in"), Y(e, "detections");
|
|
3910
|
-
const t = new
|
|
3911
|
-
mt(t,
|
|
3910
|
+
const t = new qe();
|
|
3911
|
+
mt(t, $d, this.h);
|
|
3912
3912
|
const i = new Le();
|
|
3913
|
-
|
|
3913
|
+
ze(i, 2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect_in"), H(i, "DETECTIONS:detections"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
|
|
3914
3914
|
for (const o of r) r = Gc(o), this.j.detections.push(wl(r));
|
|
3915
|
-
|
|
3915
|
+
T(this, n);
|
|
3916
3916
|
}), this.g.attachEmptyPacketListener("detections", (r) => {
|
|
3917
|
-
|
|
3917
|
+
T(this, r);
|
|
3918
3918
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3919
3919
|
}
|
|
3920
3920
|
};
|
|
@@ -3929,7 +3929,7 @@ var Jo = nt([61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [31
|
|
|
3929
3929
|
function ta(e) {
|
|
3930
3930
|
e.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] };
|
|
3931
3931
|
}
|
|
3932
|
-
var ne = class extends
|
|
3932
|
+
var ne = class extends He {
|
|
3933
3933
|
constructor(e, t) {
|
|
3934
3934
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, L(e = this.h = new Yc(), 0, 1, t = new ce()), this.A = new Kc(), L(this.h, 0, 3, this.A), this.u = new gn(), L(this.h, 0, 2, this.u), _t(this.u, 4, 1), R(this.u, 2, 0.5), R(this.A, 2, 0.5), R(this.h, 4, 0.5);
|
|
3935
3935
|
}
|
|
@@ -3949,26 +3949,26 @@ var ne = class extends We {
|
|
|
3949
3949
|
return ta(this), pt(this, e, i, t), this.j;
|
|
3950
3950
|
}
|
|
3951
3951
|
m() {
|
|
3952
|
-
var e = new
|
|
3952
|
+
var e = new Ke();
|
|
3953
3953
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "face_landmarks");
|
|
3954
|
-
const t = new
|
|
3955
|
-
mt(t,
|
|
3954
|
+
const t = new qe();
|
|
3955
|
+
mt(t, Wd, this.h);
|
|
3956
3956
|
const i = new Le();
|
|
3957
|
-
|
|
3957
|
+
ze(i, 2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "NORM_LANDMARKS:face_landmarks"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("face_landmarks", (r, n) => {
|
|
3958
3958
|
for (const o of r) r = kr(o), this.j.faceLandmarks.push(pn(r));
|
|
3959
|
-
|
|
3959
|
+
T(this, n);
|
|
3960
3960
|
}), this.g.attachEmptyPacketListener("face_landmarks", (r) => {
|
|
3961
|
-
|
|
3961
|
+
T(this, r);
|
|
3962
3962
|
}), this.outputFaceBlendshapes && (Y(e, "blendshapes"), H(i, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", (r, n) => {
|
|
3963
3963
|
if (this.outputFaceBlendshapes) for (const o of r) r = mn(o), this.j.faceBlendshapes.push(Yo(r.g() ?? []));
|
|
3964
|
-
|
|
3964
|
+
T(this, n);
|
|
3965
3965
|
}), this.g.attachEmptyPacketListener("blendshapes", (r) => {
|
|
3966
|
-
|
|
3966
|
+
T(this, r);
|
|
3967
3967
|
})), this.outputFacialTransformationMatrixes && (Y(e, "face_geometry"), H(i, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", (r, n) => {
|
|
3968
|
-
if (this.outputFacialTransformationMatrixes) for (const o of r) (r = K(r =
|
|
3969
|
-
|
|
3968
|
+
if (this.outputFacialTransformationMatrixes) for (const o of r) (r = K(r = zd(o), Dd, 2)) && this.j.facialTransformationMatrixes.push({ rows: Ze(r, 1) ?? 0 ?? 0, columns: Ze(r, 2) ?? 0 ?? 0, data: Wt(r, 3, dt, zt()).slice() ?? [] });
|
|
3969
|
+
T(this, n);
|
|
3970
3970
|
}), this.g.attachEmptyPacketListener("face_geometry", (r) => {
|
|
3971
|
-
|
|
3971
|
+
T(this, r);
|
|
3972
3972
|
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
3973
3973
|
}
|
|
3974
3974
|
};
|
|
@@ -3996,9 +3996,9 @@ function na(e, t = !0) {
|
|
|
3996
3996
|
}
|
|
3997
3997
|
return i;
|
|
3998
3998
|
}
|
|
3999
|
-
var
|
|
3999
|
+
var Oe = class extends He {
|
|
4000
4000
|
constructor(e, t) {
|
|
4001
|
-
super(new ot(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], L(e = this.j = new Jc(), 0, 1, t = new ce()), this.u = new Wo(), L(this.j, 0, 2, this.u), this.D = new zo(), L(this.u, 0, 3, this.D), this.A = new Qc(), L(this.u, 0, 2, this.A), this.h = new
|
|
4001
|
+
super(new ot(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], L(e = this.j = new Jc(), 0, 1, t = new ce()), this.u = new Wo(), L(this.j, 0, 2, this.u), this.D = new zo(), L(this.u, 0, 3, this.D), this.A = new Qc(), L(this.u, 0, 2, this.A), this.h = new Hd(), L(this.j, 0, 3, this.h), R(this.A, 2, 0.5), R(this.u, 4, 0.5), R(this.D, 2, 0.5);
|
|
4002
4002
|
}
|
|
4003
4003
|
get baseOptions() {
|
|
4004
4004
|
return K(this.j, ce, 1);
|
|
@@ -4021,21 +4021,21 @@ var Pe = class extends We {
|
|
|
4021
4021
|
return ia(this), pt(this, e, i, t), ra(this);
|
|
4022
4022
|
}
|
|
4023
4023
|
m() {
|
|
4024
|
-
var e = new
|
|
4024
|
+
var e = new Ke();
|
|
4025
4025
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "hand_gestures"), Y(e, "hand_landmarks"), Y(e, "world_hand_landmarks"), Y(e, "handedness");
|
|
4026
|
-
const t = new
|
|
4027
|
-
mt(t,
|
|
4026
|
+
const t = new qe();
|
|
4027
|
+
mt(t, qd, this.j);
|
|
4028
4028
|
const i = new Le();
|
|
4029
|
-
|
|
4029
|
+
ze(i, 2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "HAND_GESTURES:hand_gestures"), H(i, "LANDMARKS:hand_landmarks"), H(i, "WORLD_LANDMARKS:world_hand_landmarks"), H(i, "HANDEDNESS:handedness"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
|
|
4030
4030
|
for (const o of r) {
|
|
4031
4031
|
r = kr(o);
|
|
4032
4032
|
const s = [];
|
|
4033
4033
|
for (const a of Et(r, $c, 1)) s.push({ x: ue(a, 1) ?? 0, y: ue(a, 2) ?? 0, z: ue(a, 3) ?? 0, visibility: ue(a, 4) ?? 0 });
|
|
4034
4034
|
this.landmarks.push(s);
|
|
4035
4035
|
}
|
|
4036
|
-
|
|
4036
|
+
T(this, n);
|
|
4037
4037
|
}), this.g.attachEmptyPacketListener("hand_landmarks", (r) => {
|
|
4038
|
-
|
|
4038
|
+
T(this, r);
|
|
4039
4039
|
}), this.g.attachProtoVectorListener("world_hand_landmarks", (r, n) => {
|
|
4040
4040
|
for (const o of r) {
|
|
4041
4041
|
r = gi(o);
|
|
@@ -4043,31 +4043,31 @@ var Pe = class extends We {
|
|
|
4043
4043
|
for (const a of Et(r, jc, 1)) s.push({ x: ue(a, 1) ?? 0, y: ue(a, 2) ?? 0, z: ue(a, 3) ?? 0, visibility: ue(a, 4) ?? 0 });
|
|
4044
4044
|
this.worldLandmarks.push(s);
|
|
4045
4045
|
}
|
|
4046
|
-
|
|
4046
|
+
T(this, n);
|
|
4047
4047
|
}), this.g.attachEmptyPacketListener("world_hand_landmarks", (r) => {
|
|
4048
|
-
|
|
4048
|
+
T(this, r);
|
|
4049
4049
|
}), this.g.attachProtoVectorListener("hand_gestures", (r, n) => {
|
|
4050
|
-
this.gestures.push(...na(r, !1)),
|
|
4050
|
+
this.gestures.push(...na(r, !1)), T(this, n);
|
|
4051
4051
|
}), this.g.attachEmptyPacketListener("hand_gestures", (r) => {
|
|
4052
|
-
|
|
4052
|
+
T(this, r);
|
|
4053
4053
|
}), this.g.attachProtoVectorListener("handedness", (r, n) => {
|
|
4054
|
-
this.handedness.push(...na(r)),
|
|
4054
|
+
this.handedness.push(...na(r)), T(this, n);
|
|
4055
4055
|
}), this.g.attachEmptyPacketListener("handedness", (r) => {
|
|
4056
|
-
|
|
4056
|
+
T(this, r);
|
|
4057
4057
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4058
4058
|
}
|
|
4059
4059
|
};
|
|
4060
4060
|
function oa(e) {
|
|
4061
4061
|
return { landmarks: e.landmarks, worldLandmarks: e.worldLandmarks, handednesses: e.handedness, handedness: e.handedness };
|
|
4062
4062
|
}
|
|
4063
|
-
|
|
4064
|
-
return q(
|
|
4065
|
-
},
|
|
4066
|
-
return q(
|
|
4067
|
-
},
|
|
4068
|
-
return q(
|
|
4069
|
-
},
|
|
4070
|
-
var
|
|
4063
|
+
Oe.prototype.recognizeForVideo = Oe.prototype.Ia, Oe.prototype.recognize = Oe.prototype.Ha, Oe.prototype.setOptions = Oe.prototype.o, Oe.createFromModelPath = function(e, t) {
|
|
4064
|
+
return q(Oe, e, { baseOptions: { modelAssetPath: t } });
|
|
4065
|
+
}, Oe.createFromModelBuffer = function(e, t) {
|
|
4066
|
+
return q(Oe, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4067
|
+
}, Oe.createFromOptions = function(e, t) {
|
|
4068
|
+
return q(Oe, e, t);
|
|
4069
|
+
}, Oe.HAND_CONNECTIONS = ns;
|
|
4070
|
+
var Be = class extends He {
|
|
4071
4071
|
constructor(e, t) {
|
|
4072
4072
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], L(e = this.h = new Wo(), 0, 1, t = new ce()), this.u = new zo(), L(this.h, 0, 3, this.u), this.j = new Qc(), L(this.h, 0, 2, this.j), _t(this.j, 3, 1), R(this.j, 2, 0.5), R(this.u, 2, 0.5), R(this.h, 4, 0.5);
|
|
4073
4073
|
}
|
|
@@ -4087,21 +4087,21 @@ var Oe = class extends We {
|
|
|
4087
4087
|
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], pt(this, e, i, t), oa(this);
|
|
4088
4088
|
}
|
|
4089
4089
|
m() {
|
|
4090
|
-
var e = new
|
|
4090
|
+
var e = new Ke();
|
|
4091
4091
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "hand_landmarks"), Y(e, "world_hand_landmarks"), Y(e, "handedness");
|
|
4092
|
-
const t = new
|
|
4093
|
-
mt(t,
|
|
4092
|
+
const t = new qe();
|
|
4093
|
+
mt(t, Kd, this.h);
|
|
4094
4094
|
const i = new Le();
|
|
4095
|
-
|
|
4095
|
+
ze(i, 2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "LANDMARKS:hand_landmarks"), H(i, "WORLD_LANDMARKS:world_hand_landmarks"), H(i, "HANDEDNESS:handedness"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
|
|
4096
4096
|
for (const o of r) r = kr(o), this.landmarks.push(pn(r));
|
|
4097
|
-
|
|
4097
|
+
T(this, n);
|
|
4098
4098
|
}), this.g.attachEmptyPacketListener("hand_landmarks", (r) => {
|
|
4099
|
-
|
|
4099
|
+
T(this, r);
|
|
4100
4100
|
}), this.g.attachProtoVectorListener("world_hand_landmarks", (r, n) => {
|
|
4101
|
-
for (const o of r) r = gi(o), this.worldLandmarks.push(
|
|
4102
|
-
|
|
4101
|
+
for (const o of r) r = gi(o), this.worldLandmarks.push(ar(r));
|
|
4102
|
+
T(this, n);
|
|
4103
4103
|
}), this.g.attachEmptyPacketListener("world_hand_landmarks", (r) => {
|
|
4104
|
-
|
|
4104
|
+
T(this, r);
|
|
4105
4105
|
}), this.g.attachProtoVectorListener("handedness", (r, n) => {
|
|
4106
4106
|
var o = this.handedness, s = o.push;
|
|
4107
4107
|
const a = [];
|
|
@@ -4111,19 +4111,19 @@ var Oe = class extends We {
|
|
|
4111
4111
|
for (const u of r.g()) d.push({ score: ue(u, 2) ?? 0, index: Ze(u, 1) ?? 0 ?? -1, categoryName: ke(ie(u, 3)) ?? "" ?? "", displayName: ke(ie(u, 4)) ?? "" ?? "" });
|
|
4112
4112
|
a.push(d);
|
|
4113
4113
|
}
|
|
4114
|
-
s.call(o, ...a),
|
|
4114
|
+
s.call(o, ...a), T(this, n);
|
|
4115
4115
|
}), this.g.attachEmptyPacketListener("handedness", (r) => {
|
|
4116
|
-
|
|
4116
|
+
T(this, r);
|
|
4117
4117
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4118
4118
|
}
|
|
4119
4119
|
};
|
|
4120
|
-
|
|
4121
|
-
return q(
|
|
4122
|
-
},
|
|
4123
|
-
return q(
|
|
4124
|
-
},
|
|
4125
|
-
return q(
|
|
4126
|
-
},
|
|
4120
|
+
Be.prototype.detectForVideo = Be.prototype.G, Be.prototype.detect = Be.prototype.F, Be.prototype.setOptions = Be.prototype.o, Be.createFromModelPath = function(e, t) {
|
|
4121
|
+
return q(Be, e, { baseOptions: { modelAssetPath: t } });
|
|
4122
|
+
}, Be.createFromModelBuffer = function(e, t) {
|
|
4123
|
+
return q(Be, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4124
|
+
}, Be.createFromOptions = function(e, t) {
|
|
4125
|
+
return q(Be, e, t);
|
|
4126
|
+
}, Be.HAND_CONNECTIONS = ns;
|
|
4127
4127
|
var Cl = nt([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]);
|
|
4128
4128
|
function sa(e) {
|
|
4129
4129
|
e.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
|
|
@@ -4139,9 +4139,9 @@ function aa(e) {
|
|
|
4139
4139
|
function Rr(e, t) {
|
|
4140
4140
|
e = kr(e), t.push(pn(e));
|
|
4141
4141
|
}
|
|
4142
|
-
var te = class extends
|
|
4142
|
+
var te = class extends He {
|
|
4143
4143
|
constructor(e, t) {
|
|
4144
|
-
super(new ot(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, L(e = this.j = new rl(), 0, 1, t = new ce()), this.I = new zo(), L(this.j, 0, 2, this.I), this.W = new
|
|
4144
|
+
super(new ot(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, L(e = this.j = new rl(), 0, 1, t = new ce()), this.I = new zo(), L(this.j, 0, 2, this.I), this.W = new Yd(), L(this.j, 0, 3, this.W), this.u = new gn(), L(this.j, 0, 4, this.u), this.O = new Kc(), L(this.j, 0, 5, this.O), this.A = new tl(), L(this.j, 0, 6, this.A), this.M = new il(), L(this.j, 0, 7, this.M), R(this.u, 2, 0.5), R(this.u, 3, 0.3), R(this.O, 2, 0.5), R(this.A, 2, 0.5), R(this.A, 3, 0.3), R(this.M, 2, 0.5), R(this.I, 2, 0.5);
|
|
4145
4145
|
}
|
|
4146
4146
|
get baseOptions() {
|
|
4147
4147
|
return K(this.j, ce, 1);
|
|
@@ -4161,57 +4161,57 @@ var te = class extends We {
|
|
|
4161
4161
|
return this.D = typeof i == "function" ? i : r, sa(this), pt(this, e, n, t), aa(this);
|
|
4162
4162
|
}
|
|
4163
4163
|
m() {
|
|
4164
|
-
var e = new
|
|
4164
|
+
var e = new Ke();
|
|
4165
4165
|
se(e, "input_frames_image"), Y(e, "pose_landmarks"), Y(e, "pose_world_landmarks"), Y(e, "face_landmarks"), Y(e, "left_hand_landmarks"), Y(e, "left_hand_world_landmarks"), Y(e, "right_hand_landmarks"), Y(e, "right_hand_world_landmarks");
|
|
4166
|
-
const t = new
|
|
4167
|
-
|
|
4168
|
-
if (o != null) if (Array.isArray(o)) J(n, 2, rn(o, 0,
|
|
4166
|
+
const t = new qe(), i = new Fs();
|
|
4167
|
+
ze(i, 1, "type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), function(n, o) {
|
|
4168
|
+
if (o != null) if (Array.isArray(o)) J(n, 2, rn(o, 0, fr));
|
|
4169
4169
|
else {
|
|
4170
4170
|
if (!(typeof o == "string" || o instanceof ht || uo(o))) throw Error("invalid value in Any.value field: " + o + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
4171
4171
|
Lt(n, 2, wo(o, !1), Jt());
|
|
4172
4172
|
}
|
|
4173
4173
|
}(i, this.j.g());
|
|
4174
4174
|
const r = new Le();
|
|
4175
|
-
|
|
4176
|
-
Rr(n, this.h.poseLandmarks),
|
|
4175
|
+
ze(r, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), Co(r, 8, Fs, i), re(r, "IMAGE:input_frames_image"), H(r, "POSE_LANDMARKS:pose_landmarks"), H(r, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), H(r, "FACE_LANDMARKS:face_landmarks"), H(r, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), H(r, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), H(r, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), H(r, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r.o(t), tt(e, r), yn(this, e), this.g.attachProtoListener("pose_landmarks", (n, o) => {
|
|
4176
|
+
Rr(n, this.h.poseLandmarks), T(this, o);
|
|
4177
4177
|
}), this.g.attachEmptyPacketListener("pose_landmarks", (n) => {
|
|
4178
|
-
|
|
4178
|
+
T(this, n);
|
|
4179
4179
|
}), this.g.attachProtoListener("pose_world_landmarks", (n, o) => {
|
|
4180
4180
|
var s = this.h.poseWorldLandmarks;
|
|
4181
|
-
n = gi(n), s.push(
|
|
4181
|
+
n = gi(n), s.push(ar(n)), T(this, o);
|
|
4182
4182
|
}), this.g.attachEmptyPacketListener("pose_world_landmarks", (n) => {
|
|
4183
|
-
|
|
4183
|
+
T(this, n);
|
|
4184
4184
|
}), this.outputPoseSegmentationMasks && (H(r, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Ti(this, "pose_segmentation_mask"), this.g.Z("pose_segmentation_mask", (n, o) => {
|
|
4185
|
-
this.h.poseSegmentationMasks = [Ci(this, n, !0, !this.D)],
|
|
4185
|
+
this.h.poseSegmentationMasks = [Ci(this, n, !0, !this.D)], T(this, o);
|
|
4186
4186
|
}), this.g.attachEmptyPacketListener("pose_segmentation_mask", (n) => {
|
|
4187
|
-
this.h.poseSegmentationMasks = [],
|
|
4187
|
+
this.h.poseSegmentationMasks = [], T(this, n);
|
|
4188
4188
|
})), this.g.attachProtoListener("face_landmarks", (n, o) => {
|
|
4189
|
-
Rr(n, this.h.faceLandmarks),
|
|
4189
|
+
Rr(n, this.h.faceLandmarks), T(this, o);
|
|
4190
4190
|
}), this.g.attachEmptyPacketListener("face_landmarks", (n) => {
|
|
4191
|
-
|
|
4191
|
+
T(this, n);
|
|
4192
4192
|
}), this.outputFaceBlendshapes && (Y(e, "extra_blendshapes"), H(r, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", (n, o) => {
|
|
4193
4193
|
var s = this.h.faceBlendshapes;
|
|
4194
|
-
this.outputFaceBlendshapes && (n = mn(n), s.push(Yo(n.g() ?? []))),
|
|
4194
|
+
this.outputFaceBlendshapes && (n = mn(n), s.push(Yo(n.g() ?? []))), T(this, o);
|
|
4195
4195
|
}), this.g.attachEmptyPacketListener("extra_blendshapes", (n) => {
|
|
4196
|
-
|
|
4196
|
+
T(this, n);
|
|
4197
4197
|
})), this.g.attachProtoListener("left_hand_landmarks", (n, o) => {
|
|
4198
|
-
Rr(n, this.h.leftHandLandmarks),
|
|
4198
|
+
Rr(n, this.h.leftHandLandmarks), T(this, o);
|
|
4199
4199
|
}), this.g.attachEmptyPacketListener("left_hand_landmarks", (n) => {
|
|
4200
|
-
|
|
4200
|
+
T(this, n);
|
|
4201
4201
|
}), this.g.attachProtoListener("left_hand_world_landmarks", (n, o) => {
|
|
4202
4202
|
var s = this.h.leftHandWorldLandmarks;
|
|
4203
|
-
n = gi(n), s.push(
|
|
4203
|
+
n = gi(n), s.push(ar(n)), T(this, o);
|
|
4204
4204
|
}), this.g.attachEmptyPacketListener("left_hand_world_landmarks", (n) => {
|
|
4205
|
-
|
|
4205
|
+
T(this, n);
|
|
4206
4206
|
}), this.g.attachProtoListener("right_hand_landmarks", (n, o) => {
|
|
4207
|
-
Rr(n, this.h.rightHandLandmarks),
|
|
4207
|
+
Rr(n, this.h.rightHandLandmarks), T(this, o);
|
|
4208
4208
|
}), this.g.attachEmptyPacketListener("right_hand_landmarks", (n) => {
|
|
4209
|
-
|
|
4209
|
+
T(this, n);
|
|
4210
4210
|
}), this.g.attachProtoListener("right_hand_world_landmarks", (n, o) => {
|
|
4211
4211
|
var s = this.h.rightHandWorldLandmarks;
|
|
4212
|
-
n = gi(n), s.push(
|
|
4212
|
+
n = gi(n), s.push(ar(n)), T(this, o);
|
|
4213
4213
|
}), this.g.attachEmptyPacketListener("right_hand_world_landmarks", (n) => {
|
|
4214
|
-
|
|
4214
|
+
T(this, n);
|
|
4215
4215
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4216
4216
|
}
|
|
4217
4217
|
};
|
|
@@ -4222,7 +4222,7 @@ te.prototype.detectForVideo = te.prototype.G, te.prototype.detect = te.prototype
|
|
|
4222
4222
|
}, te.createFromOptions = function(e, t) {
|
|
4223
4223
|
return q(te, e, t);
|
|
4224
4224
|
}, te.HAND_CONNECTIONS = ns, te.POSE_CONNECTIONS = Cl, te.FACE_LANDMARKS_LIPS = Jo, te.FACE_LANDMARKS_LEFT_EYE = Zo, te.FACE_LANDMARKS_LEFT_EYEBROW = es, te.FACE_LANDMARKS_LEFT_IRIS = kl, te.FACE_LANDMARKS_RIGHT_EYE = ts, te.FACE_LANDMARKS_RIGHT_EYEBROW = is, te.FACE_LANDMARKS_RIGHT_IRIS = Al, te.FACE_LANDMARKS_FACE_OVAL = rs, te.FACE_LANDMARKS_CONTOURS = Tl, te.FACE_LANDMARKS_TESSELATION = Nl;
|
|
4225
|
-
var Qe = class extends
|
|
4225
|
+
var Qe = class extends He {
|
|
4226
4226
|
constructor(e, t) {
|
|
4227
4227
|
super(new ot(e, t), "input_image", "norm_rect", !0), this.j = { classifications: [] }, L(e = this.h = new nl(), 0, 1, t = new ce());
|
|
4228
4228
|
}
|
|
@@ -4242,15 +4242,15 @@ var Qe = class extends We {
|
|
|
4242
4242
|
return this.j = { classifications: [] }, pt(this, e, i, t), this.j;
|
|
4243
4243
|
}
|
|
4244
4244
|
m() {
|
|
4245
|
-
var e = new
|
|
4245
|
+
var e = new Ke();
|
|
4246
4246
|
se(e, "input_image"), se(e, "norm_rect"), Y(e, "classifications");
|
|
4247
|
-
const t = new
|
|
4248
|
-
mt(t,
|
|
4247
|
+
const t = new qe();
|
|
4248
|
+
mt(t, Xd, this.h);
|
|
4249
4249
|
const i = new Le();
|
|
4250
|
-
|
|
4251
|
-
this.j =
|
|
4250
|
+
ze(i, 2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), re(i, "IMAGE:input_image"), re(i, "NORM_RECT:norm_rect"), H(i, "CLASSIFICATIONS:classifications"), i.o(t), tt(e, i), this.g.attachProtoListener("classifications", (r, n) => {
|
|
4251
|
+
this.j = ih(Bd(r)), T(this, n);
|
|
4252
4252
|
}), this.g.attachEmptyPacketListener("classifications", (r) => {
|
|
4253
|
-
|
|
4253
|
+
T(this, r);
|
|
4254
4254
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4255
4255
|
}
|
|
4256
4256
|
};
|
|
@@ -4261,7 +4261,7 @@ Qe.prototype.classifyForVideo = Qe.prototype.ta, Qe.prototype.classify = Qe.prot
|
|
|
4261
4261
|
}, Qe.createFromOptions = function(e, t) {
|
|
4262
4262
|
return q(Qe, e, t);
|
|
4263
4263
|
};
|
|
4264
|
-
var
|
|
4264
|
+
var Ue = class extends He {
|
|
4265
4265
|
constructor(e, t) {
|
|
4266
4266
|
super(new ot(e, t), "image_in", "norm_rect", !0), this.h = new ol(), this.embeddings = { embeddings: [] }, L(e = this.h, 0, 1, t = new ce());
|
|
4267
4267
|
}
|
|
@@ -4273,7 +4273,7 @@ var Be = class extends We {
|
|
|
4273
4273
|
}
|
|
4274
4274
|
o(e) {
|
|
4275
4275
|
var t = this.h, i = K(this.h, Vs, 2);
|
|
4276
|
-
return i = i ? i.clone() : new Vs(), e.l2Normalize !== void 0 ? J(i, 1,
|
|
4276
|
+
return i = i ? i.clone() : new Vs(), e.l2Normalize !== void 0 ? J(i, 1, wr(e.l2Normalize)) : "l2Normalize" in e && J(i, 1), e.quantize !== void 0 ? J(i, 2, wr(e.quantize)) : "quantize" in e && J(i, 2), L(t, 0, 2, i), this.l(e);
|
|
4277
4277
|
}
|
|
4278
4278
|
za(e, t) {
|
|
4279
4279
|
return st(this, e, t), this.embeddings;
|
|
@@ -4282,38 +4282,38 @@ var Be = class extends We {
|
|
|
4282
4282
|
return pt(this, e, i, t), this.embeddings;
|
|
4283
4283
|
}
|
|
4284
4284
|
m() {
|
|
4285
|
-
var e = new
|
|
4285
|
+
var e = new Ke();
|
|
4286
4286
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "embeddings_out");
|
|
4287
|
-
const t = new
|
|
4288
|
-
mt(t,
|
|
4287
|
+
const t = new qe();
|
|
4288
|
+
mt(t, Qd, this.h);
|
|
4289
4289
|
const i = new Le();
|
|
4290
|
-
|
|
4291
|
-
r =
|
|
4292
|
-
return { embeddings: Et(o,
|
|
4290
|
+
ze(i, 2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "EMBEDDINGS:embeddings_out"), i.o(t), tt(e, i), this.g.attachProtoListener("embeddings_out", (r, n) => {
|
|
4291
|
+
r = Gd(r), this.embeddings = function(o) {
|
|
4292
|
+
return { embeddings: Et(o, Vd, 1).map((s) => {
|
|
4293
4293
|
var d, u;
|
|
4294
4294
|
const a = { headIndex: Ze(s, 3) ?? 0 ?? -1, headName: ke(ie(s, 4)) ?? "" ?? "" };
|
|
4295
4295
|
var l = s.v;
|
|
4296
|
-
return tc(l, 0 | l[S], Us, Nn(s, 1)) !== void 0 ? (s = Wt(s = K(s, Us, Nn(s, 1), void 0), 1, dt, zt()), a.floatEmbedding = s.slice()) : (l = new Uint8Array(0), a.quantizedEmbedding = ((u = (d = K(s,
|
|
4296
|
+
return tc(l, 0 | l[S], Us, Nn(s, 1)) !== void 0 ? (s = Wt(s = K(s, Us, Nn(s, 1), void 0), 1, dt, zt()), a.floatEmbedding = s.slice()) : (l = new Uint8Array(0), a.quantizedEmbedding = ((u = (d = K(s, Ud, Nn(s, 2), void 0)) == null ? void 0 : d.na()) == null ? void 0 : u.h()) ?? l), a;
|
|
4297
4297
|
}), timestampMs: hl(nc(o)) };
|
|
4298
|
-
}(r),
|
|
4298
|
+
}(r), T(this, n);
|
|
4299
4299
|
}), this.g.attachEmptyPacketListener("embeddings_out", (r) => {
|
|
4300
|
-
|
|
4300
|
+
T(this, r);
|
|
4301
4301
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4302
4302
|
}
|
|
4303
4303
|
};
|
|
4304
|
-
|
|
4304
|
+
Ue.cosineSimilarity = function(e, t) {
|
|
4305
4305
|
if (e.floatEmbedding && t.floatEmbedding) e = Hs(e.floatEmbedding, t.floatEmbedding);
|
|
4306
4306
|
else {
|
|
4307
4307
|
if (!e.quantizedEmbedding || !t.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
|
|
4308
4308
|
e = Hs(Ws(e.quantizedEmbedding), Ws(t.quantizedEmbedding));
|
|
4309
4309
|
}
|
|
4310
4310
|
return e;
|
|
4311
|
-
},
|
|
4312
|
-
return q(
|
|
4313
|
-
},
|
|
4314
|
-
return q(
|
|
4315
|
-
},
|
|
4316
|
-
return q(
|
|
4311
|
+
}, Ue.prototype.embedForVideo = Ue.prototype.Aa, Ue.prototype.embed = Ue.prototype.za, Ue.prototype.setOptions = Ue.prototype.o, Ue.createFromModelPath = function(e, t) {
|
|
4312
|
+
return q(Ue, e, { baseOptions: { modelAssetPath: t } });
|
|
4313
|
+
}, Ue.createFromModelBuffer = function(e, t) {
|
|
4314
|
+
return q(Ue, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4315
|
+
}, Ue.createFromOptions = function(e, t) {
|
|
4316
|
+
return q(Ue, e, t);
|
|
4317
4317
|
};
|
|
4318
4318
|
var Jn = class {
|
|
4319
4319
|
constructor(e, t, i) {
|
|
@@ -4326,13 +4326,13 @@ var Jn = class {
|
|
|
4326
4326
|
}), (t = this.categoryMask) == null || t.close();
|
|
4327
4327
|
}
|
|
4328
4328
|
};
|
|
4329
|
-
function
|
|
4329
|
+
function lh(e) {
|
|
4330
4330
|
var i, r;
|
|
4331
4331
|
const t = function(n) {
|
|
4332
4332
|
return Et(n, Le, 1);
|
|
4333
4333
|
}(e.ca()).filter((n) => (ke(ie(n, 1)) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));
|
|
4334
4334
|
if (e.u = [], t.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
4335
|
-
t.length === 1 && (((r = (i = K(t[0],
|
|
4335
|
+
t.length === 1 && (((r = (i = K(t[0], qe, 7)) == null ? void 0 : i.j()) == null ? void 0 : r.g()) ?? /* @__PURE__ */ new Map()).forEach((n, o) => {
|
|
4336
4336
|
e.u[Number(o)] = ke(ie(n, 1)) ?? "";
|
|
4337
4337
|
});
|
|
4338
4338
|
}
|
|
@@ -4349,7 +4349,7 @@ function la(e) {
|
|
|
4349
4349
|
}
|
|
4350
4350
|
}
|
|
4351
4351
|
Jn.prototype.close = Jn.prototype.close;
|
|
4352
|
-
var
|
|
4352
|
+
var Re = class extends He {
|
|
4353
4353
|
constructor(e, t) {
|
|
4354
4354
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.u = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Ko(), this.A = new sl(), L(this.h, 0, 3, this.A), L(e = this.h, 0, 1, t = new ce());
|
|
4355
4355
|
}
|
|
@@ -4363,7 +4363,7 @@ var Fe = class extends We {
|
|
|
4363
4363
|
return e.displayNamesLocale !== void 0 ? J(this.h, 2, xr(e.displayNamesLocale)) : "displayNamesLocale" in e && J(this.h, 2), "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
|
|
4364
4364
|
}
|
|
4365
4365
|
L() {
|
|
4366
|
-
|
|
4366
|
+
lh(this);
|
|
4367
4367
|
}
|
|
4368
4368
|
segment(e, t, i) {
|
|
4369
4369
|
const r = typeof t != "function" ? t : {};
|
|
@@ -4377,32 +4377,32 @@ var Fe = class extends We {
|
|
|
4377
4377
|
return this.u;
|
|
4378
4378
|
}
|
|
4379
4379
|
m() {
|
|
4380
|
-
var e = new
|
|
4380
|
+
var e = new Ke();
|
|
4381
4381
|
se(e, "image_in"), se(e, "norm_rect");
|
|
4382
|
-
const t = new
|
|
4382
|
+
const t = new qe();
|
|
4383
4383
|
mt(t, cl, this.h);
|
|
4384
4384
|
const i = new Le();
|
|
4385
|
-
|
|
4386
|
-
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)),
|
|
4385
|
+
ze(i, 2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), i.o(t), tt(e, i), yn(this, e), this.outputConfidenceMasks && (Y(e, "confidence_masks"), H(i, "CONFIDENCE_MASKS:confidence_masks"), Ti(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
|
|
4386
|
+
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)), T(this, n);
|
|
4387
4387
|
}), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
|
|
4388
|
-
this.confidenceMasks = [],
|
|
4388
|
+
this.confidenceMasks = [], T(this, r);
|
|
4389
4389
|
})), this.outputCategoryMask && (Y(e, "category_mask"), H(i, "CATEGORY_MASK:category_mask"), Ti(this, "category_mask"), this.g.Z("category_mask", (r, n) => {
|
|
4390
|
-
this.categoryMask = Ci(this, r, !1, !this.j),
|
|
4390
|
+
this.categoryMask = Ci(this, r, !1, !this.j), T(this, n);
|
|
4391
4391
|
}), this.g.attachEmptyPacketListener("category_mask", (r) => {
|
|
4392
|
-
this.categoryMask = void 0,
|
|
4392
|
+
this.categoryMask = void 0, T(this, r);
|
|
4393
4393
|
})), Y(e, "quality_scores"), H(i, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (r, n) => {
|
|
4394
|
-
this.qualityScores = r,
|
|
4394
|
+
this.qualityScores = r, T(this, n);
|
|
4395
4395
|
}), this.g.attachEmptyPacketListener("quality_scores", (r) => {
|
|
4396
|
-
this.categoryMask = void 0,
|
|
4396
|
+
this.categoryMask = void 0, T(this, r);
|
|
4397
4397
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4398
4398
|
}
|
|
4399
4399
|
};
|
|
4400
|
-
|
|
4401
|
-
return q(
|
|
4402
|
-
},
|
|
4403
|
-
return q(
|
|
4404
|
-
},
|
|
4405
|
-
return q(
|
|
4400
|
+
Re.prototype.getLabels = Re.prototype.Da, Re.prototype.segmentForVideo = Re.prototype.La, Re.prototype.segment = Re.prototype.segment, Re.prototype.setOptions = Re.prototype.o, Re.createFromModelPath = function(e, t) {
|
|
4401
|
+
return q(Re, e, { baseOptions: { modelAssetPath: t } });
|
|
4402
|
+
}, Re.createFromModelBuffer = function(e, t) {
|
|
4403
|
+
return q(Re, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4404
|
+
}, Re.createFromOptions = function(e, t) {
|
|
4405
|
+
return q(Re, e, t);
|
|
4406
4406
|
};
|
|
4407
4407
|
var Zn = class {
|
|
4408
4408
|
constructor(e, t, i) {
|
|
@@ -4416,7 +4416,7 @@ var Zn = class {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
};
|
|
4418
4418
|
Zn.prototype.close = Zn.prototype.close;
|
|
4419
|
-
var ut = class extends
|
|
4419
|
+
var ut = class extends He {
|
|
4420
4420
|
constructor(e, t) {
|
|
4421
4421
|
super(new ot(e, t), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Ko(), this.u = new sl(), L(this.h, 0, 3, this.u), L(e = this.h, 0, 1, t = new ce());
|
|
4422
4422
|
}
|
|
@@ -4434,13 +4434,13 @@ var ut = class extends We {
|
|
|
4434
4434
|
if (this.j = typeof i == "function" ? i : r, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, i = this.C + 1, r = new ll(), t.keypoint && t.scribble) throw Error("Cannot provide both keypoint and scribble.");
|
|
4435
4435
|
if (t.keypoint) {
|
|
4436
4436
|
var o = new Fn();
|
|
4437
|
-
Lt(o, 3,
|
|
4437
|
+
Lt(o, 3, wr(!0), !1), Lt(o, 1, nr(t.keypoint.x), 0), Lt(o, 2, nr(t.keypoint.y), 0), or(r, 1, qn, o);
|
|
4438
4438
|
} else {
|
|
4439
4439
|
if (!t.scribble) throw Error("Must provide either a keypoint or a scribble.");
|
|
4440
4440
|
{
|
|
4441
|
-
const a = new
|
|
4442
|
-
for (o of t.scribble) Lt(t = new Fn(), 3,
|
|
4443
|
-
|
|
4441
|
+
const a = new Zd();
|
|
4442
|
+
for (o of t.scribble) Lt(t = new Fn(), 3, wr(!0), !1), Lt(t, 1, nr(o.x), 0), Lt(t, 2, nr(o.y), 0), Co(a, 1, Fn, t);
|
|
4443
|
+
or(r, 2, qn, a);
|
|
4444
4444
|
}
|
|
4445
4445
|
}
|
|
4446
4446
|
this.g.addProtoToStream(r.g(), "mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest", "roi_in", i), st(this, e, n);
|
|
@@ -4460,23 +4460,23 @@ var ut = class extends We {
|
|
|
4460
4460
|
return s;
|
|
4461
4461
|
}
|
|
4462
4462
|
m() {
|
|
4463
|
-
var e = new
|
|
4463
|
+
var e = new Ke();
|
|
4464
4464
|
se(e, "image_in"), se(e, "roi_in"), se(e, "norm_rect_in");
|
|
4465
|
-
const t = new
|
|
4465
|
+
const t = new qe();
|
|
4466
4466
|
mt(t, cl, this.h);
|
|
4467
4467
|
const i = new Le();
|
|
4468
|
-
|
|
4469
|
-
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)),
|
|
4468
|
+
ze(i, 2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"), re(i, "IMAGE:image_in"), re(i, "ROI:roi_in"), re(i, "NORM_RECT:norm_rect_in"), i.o(t), tt(e, i), yn(this, e), this.outputConfidenceMasks && (Y(e, "confidence_masks"), H(i, "CONFIDENCE_MASKS:confidence_masks"), Ti(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
|
|
4469
|
+
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)), T(this, n);
|
|
4470
4470
|
}), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
|
|
4471
|
-
this.confidenceMasks = [],
|
|
4471
|
+
this.confidenceMasks = [], T(this, r);
|
|
4472
4472
|
})), this.outputCategoryMask && (Y(e, "category_mask"), H(i, "CATEGORY_MASK:category_mask"), Ti(this, "category_mask"), this.g.Z("category_mask", (r, n) => {
|
|
4473
|
-
this.categoryMask = Ci(this, r, !1, !this.j),
|
|
4473
|
+
this.categoryMask = Ci(this, r, !1, !this.j), T(this, n);
|
|
4474
4474
|
}), this.g.attachEmptyPacketListener("category_mask", (r) => {
|
|
4475
|
-
this.categoryMask = void 0,
|
|
4475
|
+
this.categoryMask = void 0, T(this, r);
|
|
4476
4476
|
})), Y(e, "quality_scores"), H(i, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (r, n) => {
|
|
4477
|
-
this.qualityScores = r,
|
|
4477
|
+
this.qualityScores = r, T(this, n);
|
|
4478
4478
|
}), this.g.attachEmptyPacketListener("quality_scores", (r) => {
|
|
4479
|
-
this.categoryMask = void 0,
|
|
4479
|
+
this.categoryMask = void 0, T(this, r);
|
|
4480
4480
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4481
4481
|
}
|
|
4482
4482
|
};
|
|
@@ -4487,7 +4487,7 @@ ut.prototype.segment = ut.prototype.segment, ut.prototype.setOptions = ut.protot
|
|
|
4487
4487
|
}, ut.createFromOptions = function(e, t) {
|
|
4488
4488
|
return q(ut, e, t);
|
|
4489
4489
|
};
|
|
4490
|
-
var Je = class extends
|
|
4490
|
+
var Je = class extends He {
|
|
4491
4491
|
constructor(e, t) {
|
|
4492
4492
|
super(new ot(e, t), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, L(e = this.h = new ul(), 0, 1, t = new ce());
|
|
4493
4493
|
}
|
|
@@ -4507,16 +4507,16 @@ var Je = class extends We {
|
|
|
4507
4507
|
return this.j = { detections: [] }, pt(this, e, i, t), this.j;
|
|
4508
4508
|
}
|
|
4509
4509
|
m() {
|
|
4510
|
-
var e = new
|
|
4510
|
+
var e = new Ke();
|
|
4511
4511
|
se(e, "input_frame_gpu"), se(e, "norm_rect"), Y(e, "detections");
|
|
4512
|
-
const t = new
|
|
4513
|
-
mt(t,
|
|
4512
|
+
const t = new qe();
|
|
4513
|
+
mt(t, eh, this.h);
|
|
4514
4514
|
const i = new Le();
|
|
4515
|
-
|
|
4515
|
+
ze(i, 2, "mediapipe.tasks.vision.ObjectDetectorGraph"), re(i, "IMAGE:input_frame_gpu"), re(i, "NORM_RECT:norm_rect"), H(i, "DETECTIONS:detections"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
|
|
4516
4516
|
for (const o of r) r = Gc(o), this.j.detections.push(wl(r));
|
|
4517
|
-
|
|
4517
|
+
T(this, n);
|
|
4518
4518
|
}), this.g.attachEmptyPacketListener("detections", (r) => {
|
|
4519
|
-
|
|
4519
|
+
T(this, r);
|
|
4520
4520
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4521
4521
|
}
|
|
4522
4522
|
};
|
|
@@ -4551,7 +4551,7 @@ function da(e) {
|
|
|
4551
4551
|
}
|
|
4552
4552
|
}
|
|
4553
4553
|
eo.prototype.close = eo.prototype.close;
|
|
4554
|
-
var
|
|
4554
|
+
var Ve = class extends He {
|
|
4555
4555
|
constructor(e, t) {
|
|
4556
4556
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, L(e = this.h = new dl(), 0, 1, t = new ce()), this.A = new il(), L(this.h, 0, 3, this.A), this.j = new tl(), L(this.h, 0, 2, this.j), _t(this.j, 4, 1), R(this.j, 2, 0.5), R(this.A, 2, 0.5), R(this.h, 4, 0.5);
|
|
4557
4557
|
}
|
|
@@ -4573,39 +4573,39 @@ var Ue = class extends We {
|
|
|
4573
4573
|
return this.u = typeof i == "function" ? i : r, ua(this), pt(this, e, n, t), da(this);
|
|
4574
4574
|
}
|
|
4575
4575
|
m() {
|
|
4576
|
-
var e = new
|
|
4576
|
+
var e = new Ke();
|
|
4577
4577
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "normalized_landmarks"), Y(e, "world_landmarks"), Y(e, "segmentation_masks");
|
|
4578
|
-
const t = new
|
|
4579
|
-
mt(t,
|
|
4578
|
+
const t = new qe();
|
|
4579
|
+
mt(t, th, this.h);
|
|
4580
4580
|
const i = new Le();
|
|
4581
|
-
|
|
4581
|
+
ze(i, 2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "NORM_LANDMARKS:normalized_landmarks"), H(i, "WORLD_LANDMARKS:world_landmarks"), i.o(t), tt(e, i), yn(this, e), this.g.attachProtoVectorListener("normalized_landmarks", (r, n) => {
|
|
4582
4582
|
this.landmarks = [];
|
|
4583
4583
|
for (const o of r) r = kr(o), this.landmarks.push(pn(r));
|
|
4584
|
-
|
|
4584
|
+
T(this, n);
|
|
4585
4585
|
}), this.g.attachEmptyPacketListener("normalized_landmarks", (r) => {
|
|
4586
|
-
this.landmarks = [],
|
|
4586
|
+
this.landmarks = [], T(this, r);
|
|
4587
4587
|
}), this.g.attachProtoVectorListener("world_landmarks", (r, n) => {
|
|
4588
4588
|
this.worldLandmarks = [];
|
|
4589
|
-
for (const o of r) r = gi(o), this.worldLandmarks.push(
|
|
4590
|
-
|
|
4589
|
+
for (const o of r) r = gi(o), this.worldLandmarks.push(ar(r));
|
|
4590
|
+
T(this, n);
|
|
4591
4591
|
}), this.g.attachEmptyPacketListener("world_landmarks", (r) => {
|
|
4592
|
-
this.worldLandmarks = [],
|
|
4592
|
+
this.worldLandmarks = [], T(this, r);
|
|
4593
4593
|
}), this.outputSegmentationMasks && (H(i, "SEGMENTATION_MASK:segmentation_masks"), Ti(this, "segmentation_masks"), this.g.aa("segmentation_masks", (r, n) => {
|
|
4594
|
-
this.segmentationMasks = r.map((o) => Ci(this, o, !0, !this.u)),
|
|
4594
|
+
this.segmentationMasks = r.map((o) => Ci(this, o, !0, !this.u)), T(this, n);
|
|
4595
4595
|
}), this.g.attachEmptyPacketListener("segmentation_masks", (r) => {
|
|
4596
|
-
this.segmentationMasks = [],
|
|
4596
|
+
this.segmentationMasks = [], T(this, r);
|
|
4597
4597
|
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4598
4598
|
}
|
|
4599
4599
|
};
|
|
4600
|
-
|
|
4601
|
-
return q(
|
|
4602
|
-
},
|
|
4603
|
-
return q(
|
|
4604
|
-
},
|
|
4605
|
-
return q(
|
|
4606
|
-
},
|
|
4607
|
-
const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",
|
|
4608
|
-
const e =
|
|
4600
|
+
Ve.prototype.detectForVideo = Ve.prototype.G, Ve.prototype.detect = Ve.prototype.F, Ve.prototype.setOptions = Ve.prototype.o, Ve.createFromModelPath = function(e, t) {
|
|
4601
|
+
return q(Ve, e, { baseOptions: { modelAssetPath: t } });
|
|
4602
|
+
}, Ve.createFromModelBuffer = function(e, t) {
|
|
4603
|
+
return q(Ve, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4604
|
+
}, Ve.createFromOptions = function(e, t) {
|
|
4605
|
+
return q(Ve, e, t);
|
|
4606
|
+
}, Ve.POSE_CONNECTIONS = Cl;
|
|
4607
|
+
const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task", uh = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.32/wasm", dh = () => {
|
|
4608
|
+
const e = P(null), [t, i] = N(!1), [r, n] = N("Initializing..."), [o, s] = N(0), [a, l] = N(!1);
|
|
4609
4609
|
B(() => {
|
|
4610
4610
|
"serviceWorker" in navigator && navigator.serviceWorker.register("/sw.js").then((w) => {
|
|
4611
4611
|
console.log("ServiceWorker registered:", w);
|
|
@@ -4621,9 +4621,9 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4621
4621
|
let b = 0;
|
|
4622
4622
|
const p = [];
|
|
4623
4623
|
for (; ; ) {
|
|
4624
|
-
const { done: v, value:
|
|
4624
|
+
const { done: v, value: k } = await y.read();
|
|
4625
4625
|
if (v) break;
|
|
4626
|
-
if (p.push(
|
|
4626
|
+
if (p.push(k), b += k.length, g) {
|
|
4627
4627
|
const E = Math.round(b / g * 100);
|
|
4628
4628
|
s(E), n(`Downloading model... ${E}%`);
|
|
4629
4629
|
}
|
|
@@ -4642,7 +4642,7 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4642
4642
|
(async () => {
|
|
4643
4643
|
try {
|
|
4644
4644
|
n("Checking cached models..."), await d() ? n("Using cached model...") : (n("Model not cached. Downloading..."), await u()), n("Loading MediaPipe WASM...");
|
|
4645
|
-
const g = await $t.forVisionTasks(
|
|
4645
|
+
const g = await $t.forVisionTasks(uh);
|
|
4646
4646
|
n("Creating face landmarker...");
|
|
4647
4647
|
const y = await ne.createFromOptions(g, {
|
|
4648
4648
|
baseOptions: {
|
|
@@ -4670,8 +4670,8 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4670
4670
|
"caches" in window && (await caches.delete("mediapipe-models-v1"), n("Cache cleared. Please refresh to re-download models."));
|
|
4671
4671
|
}
|
|
4672
4672
|
};
|
|
4673
|
-
},
|
|
4674
|
-
const [e, t] =
|
|
4673
|
+
}, hh = () => {
|
|
4674
|
+
const [e, t] = N(0), i = P({ lastTime: 0, frames: 0, fps: 0 }), r = D(() => {
|
|
4675
4675
|
const n = performance.now(), o = i.current;
|
|
4676
4676
|
if (o.frames++, n - o.lastTime >= 1e3) {
|
|
4677
4677
|
const s = Math.round(o.frames * 1e3 / (n - o.lastTime));
|
|
@@ -4679,8 +4679,8 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4679
4679
|
}
|
|
4680
4680
|
}, []);
|
|
4681
4681
|
return { fps: e, updateFPS: r };
|
|
4682
|
-
},
|
|
4683
|
-
const e =
|
|
4682
|
+
}, wh = () => {
|
|
4683
|
+
const e = P({ value: 100, isLookingAway: !1 }), t = D(
|
|
4684
4684
|
(o, s, a, l) => {
|
|
4685
4685
|
if (!o || !a || !s) return;
|
|
4686
4686
|
const d = o.getContext("2d");
|
|
@@ -4693,14 +4693,14 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4693
4693
|
}
|
|
4694
4694
|
},
|
|
4695
4695
|
[]
|
|
4696
|
-
), i =
|
|
4696
|
+
), i = D((o) => {
|
|
4697
4697
|
const s = e.current.value / 100, a = 100, l = 20, d = 20, u = 40;
|
|
4698
4698
|
o.fillStyle = "rgba(0, 0, 0, 0.3)", o.fillRect(d, u, l, a), o.fillStyle = `rgba(${Math.floor(
|
|
4699
4699
|
255 * (1 - s)
|
|
4700
4700
|
)}, ${Math.floor(255 * s)}, 0, 0.8)`;
|
|
4701
4701
|
const h = a * s;
|
|
4702
4702
|
o.fillRect(d, u + a - h, l, h), o.fillStyle = "#FFFFFF", o.fillRect(d, u + a * (1 - s), l, 2);
|
|
4703
|
-
}, []), r =
|
|
4703
|
+
}, []), r = D(
|
|
4704
4704
|
(o, s, a, l, d, u, h) => {
|
|
4705
4705
|
if (t(o, s, a, l), d && u && h) {
|
|
4706
4706
|
const w = o.getContext("2d");
|
|
@@ -4708,7 +4708,7 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4708
4708
|
}
|
|
4709
4709
|
},
|
|
4710
4710
|
[t, i]
|
|
4711
|
-
), n =
|
|
4711
|
+
), n = D(
|
|
4712
4712
|
(o, s) => {
|
|
4713
4713
|
const a = o.getContext("2d");
|
|
4714
4714
|
a && (a.clearRect(0, 0, o.width, o.height), a.drawImage(s, 0, 0, o.width, o.height));
|
|
@@ -4722,18 +4722,18 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4722
4722
|
clearCanvas: n,
|
|
4723
4723
|
engagementRef: e
|
|
4724
4724
|
};
|
|
4725
|
-
},
|
|
4726
|
-
const [e, t] =
|
|
4725
|
+
}, fh = 50, mh = () => {
|
|
4726
|
+
const [e, t] = N(100), [i, r] = N(!1), n = P(0), o = D(
|
|
4727
4727
|
(s, a, l) => {
|
|
4728
4728
|
if (!l || s.length < 468)
|
|
4729
4729
|
return;
|
|
4730
4730
|
const d = s[33], u = s[263], h = s[1];
|
|
4731
4731
|
if (!d || !u || !h) return;
|
|
4732
|
-
const w = (d.x + u.x) * 0.5, f = (d.y + u.y) * 0.5, g = w - a.x, y = f - a.y, b = Math.sqrt(g * g + y * y), p = Math.abs(h.y - a.noseY) * 100, v = Math.abs(h.x - a.noseX) * 100,
|
|
4732
|
+
const w = (d.x + u.x) * 0.5, f = (d.y + u.y) * 0.5, g = w - a.x, y = f - a.y, b = Math.sqrt(g * g + y * y), p = Math.abs(h.y - a.noseY) * 100, v = Math.abs(h.x - a.noseX) * 100, k = Math.max(
|
|
4733
4733
|
0,
|
|
4734
4734
|
100 - (b * 200 + p + v)
|
|
4735
|
-
), E =
|
|
4736
|
-
return
|
|
4735
|
+
), E = k < fh, A = performance.now();
|
|
4736
|
+
return A - n.current > 100 && (t(k), r(E), n.current = A), { engagement: k, isLookingAway: E };
|
|
4737
4737
|
},
|
|
4738
4738
|
[]
|
|
4739
4739
|
);
|
|
@@ -4744,11 +4744,11 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4744
4744
|
setEngagement: t,
|
|
4745
4745
|
setIsLookingAway: r
|
|
4746
4746
|
};
|
|
4747
|
-
},
|
|
4748
|
-
const [e, t] =
|
|
4747
|
+
}, gh = 0.05, ph = () => {
|
|
4748
|
+
const [e, t] = N(!1), [i, r] = N(!1), n = D(
|
|
4749
4749
|
(a, l) => Math.sqrt(Math.pow(a.x - l.x, 2) + Math.pow(a.y - l.y, 2)),
|
|
4750
4750
|
[]
|
|
4751
|
-
), o =
|
|
4751
|
+
), o = D(
|
|
4752
4752
|
(a, l) => {
|
|
4753
4753
|
if (!a || !l) return 0;
|
|
4754
4754
|
const d = [
|
|
@@ -4773,12 +4773,12 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4773
4773
|
y
|
|
4774
4774
|
);
|
|
4775
4775
|
if (b === 0 || p === 0) return 0;
|
|
4776
|
-
for (const
|
|
4777
|
-
const E = l[
|
|
4778
|
-
if (E &&
|
|
4779
|
-
const
|
|
4776
|
+
for (const k of d) {
|
|
4777
|
+
const E = l[k], A = a[k];
|
|
4778
|
+
if (E && A) {
|
|
4779
|
+
const _ = w.x + (A.x - g.x) * b / p, G = w.y + (A.y - g.y) * b / p;
|
|
4780
4780
|
u += n(E, {
|
|
4781
|
-
x:
|
|
4781
|
+
x: _,
|
|
4782
4782
|
y: G
|
|
4783
4783
|
}), h++;
|
|
4784
4784
|
}
|
|
@@ -4786,14 +4786,14 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4786
4786
|
return h === 0 ? 0 : u / h;
|
|
4787
4787
|
},
|
|
4788
4788
|
[n]
|
|
4789
|
-
), s =
|
|
4789
|
+
), s = D(
|
|
4790
4790
|
(a, l, d, u) => {
|
|
4791
4791
|
if (!a.faceLandmarks || a.faceLandmarks.length === 0)
|
|
4792
4792
|
return u("Face not detected."), r(!0), t(!1), null;
|
|
4793
4793
|
if (l && d) {
|
|
4794
4794
|
let h = null, w = 0;
|
|
4795
4795
|
for (const f of a.faceLandmarks)
|
|
4796
|
-
o(f, d) <
|
|
4796
|
+
o(f, d) < gh && (h = f, w++);
|
|
4797
4797
|
return w === 1 ? (t(!1), r(!1), u("Reference face tracked."), h) : w > 1 ? (t(!0), r(!1), u(
|
|
4798
4798
|
"Multiple matching faces detected. Tracking suspended."
|
|
4799
4799
|
), null) : (t(!1), r(!0), u("Reference face not detected."), null);
|
|
@@ -4818,35 +4818,44 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4818
4818
|
setMultipleFacesDetected: t,
|
|
4819
4819
|
setReferenceFaceNotDetected: r
|
|
4820
4820
|
};
|
|
4821
|
-
},
|
|
4822
|
-
const [
|
|
4821
|
+
}, yh = 500, bh = (e, t, i) => {
|
|
4822
|
+
const [r, n] = N(!1), [o, s] = N(Se.MODEL_LOADING), { incrementGazeViolation: a } = _a(), { multipleFacesDetected: l, referenceFaceNotDetected: d, isLookingAway: u } = e;
|
|
4823
4823
|
B(() => {
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4824
|
+
if (!i) return;
|
|
4825
|
+
let f;
|
|
4826
|
+
return (u || l || d) && t ? f = setTimeout(() => {
|
|
4827
|
+
n(!0), u ? (s("looking_away"), a("looking_away")) : l ? (s("multiple_faces"), a("multiple_faces")) : d && (s("no_face_detected"), a("no_face_detected"));
|
|
4828
|
+
}, yh) : (n(!1), o === Se.MODEL_LOADING ? f = setTimeout(() => {
|
|
4829
|
+
s("face_detected");
|
|
4830
|
+
}, 500) : s("face_detected")), () => {
|
|
4831
|
+
clearTimeout(f);
|
|
4829
4832
|
};
|
|
4830
4833
|
}, [
|
|
4831
|
-
|
|
4832
|
-
a,
|
|
4834
|
+
u,
|
|
4833
4835
|
l,
|
|
4836
|
+
d,
|
|
4834
4837
|
t,
|
|
4835
|
-
|
|
4838
|
+
a,
|
|
4839
|
+
i
|
|
4836
4840
|
]);
|
|
4837
|
-
const
|
|
4838
|
-
|
|
4841
|
+
const h = D(() => l ? Se.MULTIPLE_FACES : d ? "no_face_detected" : u ? Se.LOOKING_AWAY : o === Se.MODEL_LOADING ? Se.MODEL_LOADING : Se.FACE_DETECTED, [
|
|
4842
|
+
l,
|
|
4843
|
+
d,
|
|
4844
|
+
u,
|
|
4845
|
+
o
|
|
4846
|
+
]), w = D(() => {
|
|
4847
|
+
n(!1), s("face_detected");
|
|
4839
4848
|
}, []);
|
|
4840
4849
|
return {
|
|
4841
|
-
showGazeWarningModal:
|
|
4842
|
-
faceDetectionState:
|
|
4843
|
-
getWarningType:
|
|
4844
|
-
closeWarningModal:
|
|
4845
|
-
setShowGazeWarningModal:
|
|
4846
|
-
setFaceDetectionState:
|
|
4850
|
+
showGazeWarningModal: r,
|
|
4851
|
+
faceDetectionState: o,
|
|
4852
|
+
getWarningType: h,
|
|
4853
|
+
closeWarningModal: w,
|
|
4854
|
+
setShowGazeWarningModal: n,
|
|
4855
|
+
setFaceDetectionState: s
|
|
4847
4856
|
};
|
|
4848
4857
|
};
|
|
4849
|
-
function
|
|
4858
|
+
function vh(e) {
|
|
4850
4859
|
var t;
|
|
4851
4860
|
if (!navigator.onLine)
|
|
4852
4861
|
return {
|
|
@@ -4926,10 +4935,10 @@ async function Ft(e, t = {}, i = {
|
|
|
4926
4935
|
return a;
|
|
4927
4936
|
} catch (o) {
|
|
4928
4937
|
r = o;
|
|
4929
|
-
const s =
|
|
4938
|
+
const s = vh(o);
|
|
4930
4939
|
if (!s.retryable || n === i.attempts)
|
|
4931
4940
|
throw s;
|
|
4932
|
-
const a =
|
|
4941
|
+
const a = xh(n, i);
|
|
4933
4942
|
console.warn(
|
|
4934
4943
|
`API request failed (attempt ${n}/${i.attempts}), retrying in ${a}ms:`,
|
|
4935
4944
|
s.message
|
|
@@ -4937,7 +4946,7 @@ async function Ft(e, t = {}, i = {
|
|
|
4937
4946
|
}
|
|
4938
4947
|
throw r;
|
|
4939
4948
|
}
|
|
4940
|
-
function
|
|
4949
|
+
function xh(e, t) {
|
|
4941
4950
|
let i;
|
|
4942
4951
|
return t.backoff === "exponential" ? i = t.baseDelay * Math.pow(2, e - 1) : i = t.baseDelay, i = Math.min(i, t.maxDelay), t.jitter && (i = i * (0.5 + Math.random() * 0.5)), Math.round(i);
|
|
4943
4952
|
}
|
|
@@ -4958,7 +4967,7 @@ class Q extends Error {
|
|
|
4958
4967
|
super(t), this.code = i, this.recoverable = r, this.name = "STTError";
|
|
4959
4968
|
}
|
|
4960
4969
|
}
|
|
4961
|
-
const
|
|
4970
|
+
const Eh = 50 * 1024 * 1024, ha = 300, wa = 500, cr = class cr {
|
|
4962
4971
|
constructor(t = {}) {
|
|
4963
4972
|
me(this, "config");
|
|
4964
4973
|
me(this, "mediaRecorder", null);
|
|
@@ -5025,7 +5034,7 @@ const xh = 50 * 1024 * 1024, ha = 300, wa = 500, ar = class ar {
|
|
|
5025
5034
|
sampleRate: { ideal: 16e3 },
|
|
5026
5035
|
channelCount: { ideal: 1 }
|
|
5027
5036
|
}
|
|
5028
|
-
}),
|
|
5037
|
+
}), cr.activeStream = this.recordingStream, this.audioChunks = [], this.audioChunksTotalSize = 0;
|
|
5029
5038
|
const n = this.getSupportedMimeType();
|
|
5030
5039
|
this.mediaRecorder = new MediaRecorder(this.recordingStream, {
|
|
5031
5040
|
mimeType: n
|
|
@@ -5034,7 +5043,7 @@ const xh = 50 * 1024 * 1024, ha = 300, wa = 500, ar = class ar {
|
|
|
5034
5043
|
(o) => {
|
|
5035
5044
|
var s, a, l;
|
|
5036
5045
|
if (o.data.size > 0) {
|
|
5037
|
-
if (this.audioChunksTotalSize + o.data.size >
|
|
5046
|
+
if (this.audioChunksTotalSize + o.data.size > Eh) {
|
|
5038
5047
|
console.error(
|
|
5039
5048
|
`Max size exceeded: ${(this.audioChunksTotalSize / 1024 / 1024).toFixed(2)} MB`
|
|
5040
5049
|
);
|
|
@@ -5293,7 +5302,7 @@ const xh = 50 * 1024 * 1024, ha = 300, wa = 500, ar = class ar {
|
|
|
5293
5302
|
* Clean up recording resources
|
|
5294
5303
|
*/
|
|
5295
5304
|
cleanup() {
|
|
5296
|
-
this.recordingStream && (this.recordingStream.getTracks().forEach((t) => t.stop()), this.recordingStream = null,
|
|
5305
|
+
this.recordingStream && (this.recordingStream.getTracks().forEach((t) => t.stop()), this.recordingStream = null, cr.activeStream = null), this.recordingStartTime = null, this.mediaRecorder = null, this.audioChunks = [], this.audioChunksTotalSize = 0, this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null);
|
|
5297
5306
|
}
|
|
5298
5307
|
/**
|
|
5299
5308
|
* Throw if the service has been disposed
|
|
@@ -5307,10 +5316,10 @@ const xh = 50 * 1024 * 1024, ha = 300, wa = 500, ar = class ar {
|
|
|
5307
5316
|
);
|
|
5308
5317
|
}
|
|
5309
5318
|
};
|
|
5310
|
-
me(
|
|
5311
|
-
let
|
|
5312
|
-
const
|
|
5313
|
-
const n =
|
|
5319
|
+
me(cr, "activeStream", null);
|
|
5320
|
+
let Si = cr;
|
|
5321
|
+
const Sl = new Si(), _h = (e, t, i, r) => {
|
|
5322
|
+
const n = P(null);
|
|
5314
5323
|
return B(() => {
|
|
5315
5324
|
if (!t) return;
|
|
5316
5325
|
const o = async () => {
|
|
@@ -5333,7 +5342,7 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5333
5342
|
s && cancelAnimationFrame(s), a != null && a.srcObject && a.srcObject.getTracks().forEach((d) => d.stop());
|
|
5334
5343
|
};
|
|
5335
5344
|
}, [t, i]), B(() => {
|
|
5336
|
-
const o =
|
|
5345
|
+
const o = Sl.getRecordingStream();
|
|
5337
5346
|
if (o && e.current) {
|
|
5338
5347
|
e.current.srcObject = o;
|
|
5339
5348
|
const s = o.getVideoTracks(), a = o.getAudioTracks(), l = () => {
|
|
@@ -5345,32 +5354,32 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5345
5354
|
}
|
|
5346
5355
|
}, []), { animationFrameRef: n };
|
|
5347
5356
|
}, kh = (e, t, i, r, n, o, s, a, l, d, u, h, w, f, g) => {
|
|
5348
|
-
const y =
|
|
5349
|
-
const p = e.current, v = t.current,
|
|
5350
|
-
if (!p || p.readyState < 2 || !
|
|
5357
|
+
const y = P(null), b = D(() => {
|
|
5358
|
+
const p = e.current, v = t.current, k = i.current;
|
|
5359
|
+
if (!p || p.readyState < 2 || !k || !v) {
|
|
5351
5360
|
y.current = requestAnimationFrame(b);
|
|
5352
5361
|
return;
|
|
5353
5362
|
}
|
|
5354
5363
|
r();
|
|
5355
5364
|
try {
|
|
5356
|
-
const E = performance.now(),
|
|
5365
|
+
const E = performance.now(), A = k.detectForVideo(
|
|
5357
5366
|
p,
|
|
5358
5367
|
E
|
|
5359
|
-
),
|
|
5360
|
-
|
|
5368
|
+
), _ = n(
|
|
5369
|
+
A,
|
|
5361
5370
|
l,
|
|
5362
5371
|
d.current,
|
|
5363
5372
|
f
|
|
5364
5373
|
);
|
|
5365
|
-
|
|
5374
|
+
_ ? (o(
|
|
5366
5375
|
v,
|
|
5367
5376
|
p,
|
|
5368
|
-
|
|
5377
|
+
_,
|
|
5369
5378
|
u,
|
|
5370
5379
|
h,
|
|
5371
5380
|
w,
|
|
5372
5381
|
l
|
|
5373
|
-
), l && w && a(
|
|
5382
|
+
), l && w && a(_, d.current, w)) : s(v, p);
|
|
5374
5383
|
} catch (E) {
|
|
5375
5384
|
console.error("Face detection error:", E);
|
|
5376
5385
|
}
|
|
@@ -5398,9 +5407,9 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5398
5407
|
referenceSet: n,
|
|
5399
5408
|
referenceRef: o,
|
|
5400
5409
|
setReferenceData: s
|
|
5401
|
-
} = _a(), a =
|
|
5410
|
+
} = _a(), a = P(o), l = D(() => {
|
|
5402
5411
|
a.current = o;
|
|
5403
|
-
}, [o]), d =
|
|
5412
|
+
}, [o]), d = D(() => {
|
|
5404
5413
|
var f;
|
|
5405
5414
|
const h = e.current, w = t.current;
|
|
5406
5415
|
if (!(!h || !w))
|
|
@@ -5410,12 +5419,12 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5410
5419
|
g
|
|
5411
5420
|
);
|
|
5412
5421
|
if ((f = y.faceLandmarks) != null && f[0]) {
|
|
5413
|
-
const b = y.faceLandmarks[0], p = b[33], v = b[263],
|
|
5414
|
-
p && v &&
|
|
5422
|
+
const b = y.faceLandmarks[0], p = b[33], v = b[263], k = b[1];
|
|
5423
|
+
p && v && k && (a.current = {
|
|
5415
5424
|
x: (p.x + v.x) * 0.5,
|
|
5416
5425
|
y: (p.y + v.y) * 0.5,
|
|
5417
|
-
noseX:
|
|
5418
|
-
noseY:
|
|
5426
|
+
noseX: k.x,
|
|
5427
|
+
noseY: k.y
|
|
5419
5428
|
}, s(!0, a.current), i("Reference set. Gaze tracking active."), r && r());
|
|
5420
5429
|
}
|
|
5421
5430
|
} catch (g) {
|
|
@@ -5427,7 +5436,7 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5427
5436
|
i,
|
|
5428
5437
|
s,
|
|
5429
5438
|
r
|
|
5430
|
-
]), u =
|
|
5439
|
+
]), u = D(() => {
|
|
5431
5440
|
s(!1, { x: 0, y: 0, noseX: 0, noseY: 0 }), i("Reference reset. Starting calibration...");
|
|
5432
5441
|
}, [s, i]);
|
|
5433
5442
|
return {
|
|
@@ -5485,11 +5494,11 @@ const Nh = ({ status: e }) => {
|
|
|
5485
5494
|
] });
|
|
5486
5495
|
};
|
|
5487
5496
|
function Ch(e, t = {}) {
|
|
5488
|
-
const [i, r] =
|
|
5497
|
+
const [i, r] = N({
|
|
5489
5498
|
data: null,
|
|
5490
5499
|
loading: !1,
|
|
5491
5500
|
error: null
|
|
5492
|
-
}), n =
|
|
5501
|
+
}), n = D(
|
|
5493
5502
|
async (...o) => {
|
|
5494
5503
|
var s, a, l, d;
|
|
5495
5504
|
r((u) => ({ ...u, loading: !0, error: null }));
|
|
@@ -5524,7 +5533,7 @@ function Ch(e, t = {}) {
|
|
|
5524
5533
|
};
|
|
5525
5534
|
}
|
|
5526
5535
|
const Sh = (e) => {
|
|
5527
|
-
const [t, i] =
|
|
5536
|
+
const [t, i] = N(null), [r, n] = N(!1), o = document, s = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), a = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, l = async (f) => {
|
|
5528
5537
|
var g;
|
|
5529
5538
|
try {
|
|
5530
5539
|
if (!s())
|
|
@@ -5548,7 +5557,7 @@ const Sh = (e) => {
|
|
|
5548
5557
|
};
|
|
5549
5558
|
i(y), (f = e == null ? void 0 : e.onError) == null || f.call(e, y);
|
|
5550
5559
|
}
|
|
5551
|
-
}, u =
|
|
5560
|
+
}, u = D(() => {
|
|
5552
5561
|
var g;
|
|
5553
5562
|
const f = !!a();
|
|
5554
5563
|
n(f), (g = e == null ? void 0 : e.onFullScreenChange) == null || g.call(e, f);
|
|
@@ -5697,7 +5706,7 @@ class Ih {
|
|
|
5697
5706
|
body: JSON.stringify({
|
|
5698
5707
|
filename: i,
|
|
5699
5708
|
mime_type: "image/jpeg",
|
|
5700
|
-
asset_type:
|
|
5709
|
+
asset_type: Hl.SCREENSHOT
|
|
5701
5710
|
})
|
|
5702
5711
|
}
|
|
5703
5712
|
);
|
|
@@ -5759,7 +5768,7 @@ class Ih {
|
|
|
5759
5768
|
}
|
|
5760
5769
|
function os() {
|
|
5761
5770
|
const e = qr();
|
|
5762
|
-
return
|
|
5771
|
+
return lr(() => {
|
|
5763
5772
|
const i = e.api || {};
|
|
5764
5773
|
return new Ih(i);
|
|
5765
5774
|
}, [e.api]);
|
|
@@ -5804,10 +5813,10 @@ const Fh = (e) => {
|
|
|
5804
5813
|
};
|
|
5805
5814
|
}, [e]);
|
|
5806
5815
|
}, Rh = (e = {}) => {
|
|
5807
|
-
const [t, i] =
|
|
5816
|
+
const [t, i] = N(!1), [r, n] = N(!1), [o, s] = N(null), [a, l] = N(null), [d, u] = N(null), h = P(e);
|
|
5808
5817
|
h.current = e;
|
|
5809
|
-
const w =
|
|
5810
|
-
w.current || (w.current = new
|
|
5818
|
+
const w = P(null);
|
|
5819
|
+
w.current || (w.current = new Si(e.config)), B(() => {
|
|
5811
5820
|
var p;
|
|
5812
5821
|
e.config && ((p = w.current) == null || p.updateConfig(e.config));
|
|
5813
5822
|
}, [e.config]), B(() => {
|
|
@@ -5816,8 +5825,8 @@ const Fh = (e) => {
|
|
|
5816
5825
|
p == null || p.dispose(), w.current = null;
|
|
5817
5826
|
};
|
|
5818
5827
|
}, []);
|
|
5819
|
-
const f =
|
|
5820
|
-
var
|
|
5828
|
+
const f = D(async (p) => {
|
|
5829
|
+
var k, E;
|
|
5821
5830
|
const v = w.current;
|
|
5822
5831
|
if (!v || v.isDisposed())
|
|
5823
5832
|
throw new Q(
|
|
@@ -5828,31 +5837,31 @@ const Fh = (e) => {
|
|
|
5828
5837
|
try {
|
|
5829
5838
|
l(null), s(null), u(null), await v.startRecording(p, {
|
|
5830
5839
|
onStart: () => {
|
|
5831
|
-
var
|
|
5832
|
-
i(!0), (
|
|
5840
|
+
var A, _;
|
|
5841
|
+
i(!0), (_ = (A = h.current).onStart) == null || _.call(A);
|
|
5833
5842
|
},
|
|
5834
5843
|
// ---- FIX: onStop is the SINGLE source of truth for stop events.
|
|
5835
5844
|
// stopRecording() no longer calls onStop separately, preventing double-fire.
|
|
5836
5845
|
onStop: () => {
|
|
5837
|
-
var
|
|
5838
|
-
i(!1), (
|
|
5846
|
+
var A, _;
|
|
5847
|
+
i(!1), (_ = (A = h.current).onStop) == null || _.call(A);
|
|
5839
5848
|
},
|
|
5840
|
-
onError: (
|
|
5841
|
-
var G,
|
|
5842
|
-
const
|
|
5843
|
-
l(
|
|
5849
|
+
onError: (A) => {
|
|
5850
|
+
var G, C;
|
|
5851
|
+
const _ = A instanceof Q ? A : new Q(A.message, "RECORDING_ERROR", !0);
|
|
5852
|
+
l(_), i(!1), (C = (G = h.current).onError) == null || C.call(G, _);
|
|
5844
5853
|
}
|
|
5845
5854
|
});
|
|
5846
|
-
} catch (
|
|
5847
|
-
const
|
|
5848
|
-
|
|
5855
|
+
} catch (A) {
|
|
5856
|
+
const _ = A instanceof Q ? A : new Q(
|
|
5857
|
+
A instanceof Error ? A.message : String(A),
|
|
5849
5858
|
"START_FAILED",
|
|
5850
5859
|
!1
|
|
5851
5860
|
);
|
|
5852
|
-
throw l(
|
|
5861
|
+
throw l(_), i(!1), (E = (k = h.current).onError) == null || E.call(k, _), _;
|
|
5853
5862
|
}
|
|
5854
|
-
}, []), g =
|
|
5855
|
-
var v,
|
|
5863
|
+
}, []), g = D(async () => {
|
|
5864
|
+
var v, k;
|
|
5856
5865
|
const p = w.current;
|
|
5857
5866
|
if (!p || p.isDisposed())
|
|
5858
5867
|
throw new Q(
|
|
@@ -5864,18 +5873,18 @@ const Fh = (e) => {
|
|
|
5864
5873
|
const E = await p.stopRecording();
|
|
5865
5874
|
return u(E), E;
|
|
5866
5875
|
} catch (E) {
|
|
5867
|
-
const
|
|
5876
|
+
const A = E instanceof Q ? E : new Q(
|
|
5868
5877
|
E instanceof Error ? E.message : String(E),
|
|
5869
5878
|
"STOP_FAILED",
|
|
5870
5879
|
!1
|
|
5871
5880
|
);
|
|
5872
|
-
throw l(
|
|
5881
|
+
throw l(A), i(!1), (k = (v = h.current).onError) == null || k.call(v, A), A;
|
|
5873
5882
|
}
|
|
5874
|
-
}, []), y =
|
|
5883
|
+
}, []), y = D(
|
|
5875
5884
|
async (p, v = {}) => {
|
|
5876
|
-
var E,
|
|
5877
|
-
const
|
|
5878
|
-
if (!
|
|
5885
|
+
var E, A, _, G, C, x;
|
|
5886
|
+
const k = w.current;
|
|
5887
|
+
if (!k || k.isDisposed())
|
|
5879
5888
|
throw new Q(
|
|
5880
5889
|
"STT service is not available",
|
|
5881
5890
|
"SERVICE_UNAVAILABLE",
|
|
@@ -5885,24 +5894,24 @@ const Fh = (e) => {
|
|
|
5885
5894
|
if (l(null), n(!0), !p || p.size === 0) {
|
|
5886
5895
|
console.warn("Skipping transcription — blob is empty");
|
|
5887
5896
|
const z = { transcript: "" };
|
|
5888
|
-
return s(z.transcript), n(!1), (
|
|
5897
|
+
return s(z.transcript), n(!1), (A = (E = h.current).onTranscriptionComplete) == null || A.call(E, z), z;
|
|
5889
5898
|
}
|
|
5890
|
-
const
|
|
5899
|
+
const M = {
|
|
5891
5900
|
audioBlob: p,
|
|
5892
5901
|
...v
|
|
5893
|
-
}, j = await
|
|
5894
|
-
return s(j.transcript), n(!1), (G = (
|
|
5895
|
-
} catch (
|
|
5896
|
-
const j =
|
|
5897
|
-
|
|
5902
|
+
}, j = await k.transcribe(M);
|
|
5903
|
+
return s(j.transcript), n(!1), (G = (_ = h.current).onTranscriptionComplete) == null || G.call(_, j), j;
|
|
5904
|
+
} catch (M) {
|
|
5905
|
+
const j = M instanceof Q ? M : new Q(
|
|
5906
|
+
M instanceof Error ? M.message : String(M),
|
|
5898
5907
|
"TRANSCRIPTION_FAILED",
|
|
5899
5908
|
!0
|
|
5900
5909
|
);
|
|
5901
|
-
throw l(j), n(!1), (
|
|
5910
|
+
throw l(j), n(!1), (x = (C = h.current).onError) == null || x.call(C, j), j;
|
|
5902
5911
|
}
|
|
5903
5912
|
},
|
|
5904
5913
|
[]
|
|
5905
|
-
), b =
|
|
5914
|
+
), b = D(() => {
|
|
5906
5915
|
var p;
|
|
5907
5916
|
(p = w.current) == null || p.cancelRecording(), i(!1), u(null);
|
|
5908
5917
|
}, []);
|
|
@@ -5918,7 +5927,7 @@ const Fh = (e) => {
|
|
|
5918
5927
|
audioBlob: d
|
|
5919
5928
|
};
|
|
5920
5929
|
}, Lh = (e) => {
|
|
5921
|
-
const t =
|
|
5930
|
+
const t = P(null), i = P(!1);
|
|
5922
5931
|
B(() => {
|
|
5923
5932
|
const r = () => {
|
|
5924
5933
|
document.hidden && (i.current = !0, t.current && (clearTimeout(t.current), t.current = null), e({
|
|
@@ -5969,7 +5978,7 @@ const Fh = (e) => {
|
|
|
5969
5978
|
}, []);
|
|
5970
5979
|
};
|
|
5971
5980
|
var $ = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.FETCHING_QUESTION = "fetching_question", e.READING_QUESTION = "reading_question", e.THINKING = "thinking", e.ANSWERING = "answering", e.TRANSCRIBING = "transcribing", e.EDITING = "editing", e.SUBMITTING = "submitting", e.COMPLETED = "completed", e))($ || {});
|
|
5972
|
-
const
|
|
5981
|
+
const Il = {
|
|
5973
5982
|
thinkingDuration: 0,
|
|
5974
5983
|
answeringDuration: 120,
|
|
5975
5984
|
editingDuration: 30
|
|
@@ -6010,7 +6019,7 @@ class Dh {
|
|
|
6010
6019
|
me(this, "phaseIntervalId", null);
|
|
6011
6020
|
me(this, "globalIntervalId", null);
|
|
6012
6021
|
me(this, "callbacks");
|
|
6013
|
-
this.config = { ...
|
|
6022
|
+
this.config = { ...Il, ...t }, this.callbacks = i, this.state = {
|
|
6014
6023
|
phase: "idle",
|
|
6015
6024
|
currentPhaseTimeRemaining: 0,
|
|
6016
6025
|
totalTimeElapsed: 0,
|
|
@@ -6123,9 +6132,9 @@ class Dh {
|
|
|
6123
6132
|
}
|
|
6124
6133
|
}
|
|
6125
6134
|
function Ph(e = {}) {
|
|
6126
|
-
const { config: t = {}, callbacks: i = {} } = e, r =
|
|
6135
|
+
const { config: t = {}, callbacks: i = {} } = e, r = P(null);
|
|
6127
6136
|
r.current || (r.current = new Dh(t, {}));
|
|
6128
|
-
const n = r.current, [o, s] =
|
|
6137
|
+
const n = r.current, [o, s] = N(n.getState()), a = D(() => {
|
|
6129
6138
|
s(n.getState());
|
|
6130
6139
|
}, [n]);
|
|
6131
6140
|
B(() => {
|
|
@@ -6149,11 +6158,11 @@ function Ph(e = {}) {
|
|
|
6149
6158
|
}, [n, t]), B(() => () => {
|
|
6150
6159
|
n.destroy();
|
|
6151
6160
|
}, [n]);
|
|
6152
|
-
const l =
|
|
6161
|
+
const l = D(() => {
|
|
6153
6162
|
n.startQuestion(), a();
|
|
6154
|
-
}, [n, a]), d =
|
|
6163
|
+
}, [n, a]), d = D(() => {
|
|
6155
6164
|
n.nextPhase(), a();
|
|
6156
|
-
}, [n, a]), u =
|
|
6165
|
+
}, [n, a]), u = D(() => {
|
|
6157
6166
|
n.completeInterview(), a();
|
|
6158
6167
|
}, [n, a]);
|
|
6159
6168
|
return {
|
|
@@ -6220,7 +6229,7 @@ class Oh {
|
|
|
6220
6229
|
}
|
|
6221
6230
|
}
|
|
6222
6231
|
const to = new Oh(), Bh = (e = {}) => {
|
|
6223
|
-
const [t, i] =
|
|
6232
|
+
const [t, i] = N(!1), [r, n] = N(!1), [o, s] = N(null), a = D(
|
|
6224
6233
|
async (d) => {
|
|
6225
6234
|
var u;
|
|
6226
6235
|
try {
|
|
@@ -6244,7 +6253,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6244
6253
|
}
|
|
6245
6254
|
},
|
|
6246
6255
|
[e]
|
|
6247
|
-
), l =
|
|
6256
|
+
), l = D(() => {
|
|
6248
6257
|
to.stop(), i(!1), n(!1);
|
|
6249
6258
|
}, []);
|
|
6250
6259
|
return {
|
|
@@ -6259,21 +6268,21 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6259
6268
|
onEnd: t,
|
|
6260
6269
|
maxViolations: i = 5
|
|
6261
6270
|
}) => {
|
|
6262
|
-
const { addViolation: r } =
|
|
6271
|
+
const { addViolation: r } = iu(), n = eu(), o = tu(), s = P(o);
|
|
6263
6272
|
B(() => {
|
|
6264
6273
|
s.current = o;
|
|
6265
6274
|
}, [o]);
|
|
6266
|
-
const a =
|
|
6275
|
+
const a = D(
|
|
6267
6276
|
(d) => {
|
|
6268
6277
|
t && t(d, s.current);
|
|
6269
6278
|
},
|
|
6270
6279
|
[t]
|
|
6271
6280
|
);
|
|
6272
6281
|
return {
|
|
6273
|
-
logViolation:
|
|
6282
|
+
logViolation: D(
|
|
6274
6283
|
({ type: d, severity: u, details: h }) => {
|
|
6275
6284
|
const w = {
|
|
6276
|
-
id:
|
|
6285
|
+
id: lu(),
|
|
6277
6286
|
type: d,
|
|
6278
6287
|
severity: u,
|
|
6279
6288
|
details: h,
|
|
@@ -6371,7 +6380,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6371
6380
|
clearInterval(r), document.removeEventListener("keydown", n), document.removeEventListener("contextmenu", o), delete window.showStats, delete window.interviewTips;
|
|
6372
6381
|
};
|
|
6373
6382
|
}, []);
|
|
6374
|
-
},
|
|
6383
|
+
}, Fl = ba(
|
|
6375
6384
|
({
|
|
6376
6385
|
className: e = "",
|
|
6377
6386
|
interviewId: t = "",
|
|
@@ -6386,24 +6395,24 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6386
6395
|
videoAllowed: u = !0
|
|
6387
6396
|
}, h) => {
|
|
6388
6397
|
var as;
|
|
6389
|
-
const { authToken: w } = Aa(), f = os(), g = w ?
|
|
6398
|
+
const { authToken: w } = Aa(), f = os(), g = w ? uu(w) : null, { borderRadius: y } = Fi(), b = y ?? 18, { proctoring: p, capture_screenshots: v } = gr(), k = !!(p != null && p.gazeAnalysisEnabled), [E, A] = N(!1), [_, G] = N(
|
|
6390
6399
|
(p == null ? void 0 : p.showLandmarks) ?? !1
|
|
6391
|
-
), [
|
|
6400
|
+
), [C, x] = N(
|
|
6392
6401
|
r && ((p == null ? void 0 : p.showEngagementBar) ?? !0)
|
|
6393
|
-
), [
|
|
6394
|
-
|
|
6395
|
-
), [z, X] =
|
|
6402
|
+
), [M, j] = N(
|
|
6403
|
+
k
|
|
6404
|
+
), [z, X] = N(!1), O = P(null), U = P(null), ee = P(null), be = P(null), Me = D(
|
|
6396
6405
|
async (Ae) => {
|
|
6397
6406
|
var Cr;
|
|
6398
|
-
const
|
|
6399
|
-
if (!
|
|
6407
|
+
const Ji = O.current, Ne = ee.current;
|
|
6408
|
+
if (!Ji || !Ne) return;
|
|
6400
6409
|
const di = Ne.getContext("2d");
|
|
6401
6410
|
if (!di) return;
|
|
6402
|
-
Ne.width =
|
|
6403
|
-
const
|
|
6411
|
+
Ne.width = Ji.videoWidth, Ne.height = Ji.videoHeight, di.save(), di.scale(-1, 1), di.drawImage(Ji, -Ne.width, 0, Ne.width, Ne.height), di.restore();
|
|
6412
|
+
const Zi = await new Promise(
|
|
6404
6413
|
(Gt) => Ne.toBlob(Gt, "image/jpeg")
|
|
6405
6414
|
);
|
|
6406
|
-
if (
|
|
6415
|
+
if (Zi && t)
|
|
6407
6416
|
try {
|
|
6408
6417
|
const Gt = `${Ae}-${Date.now()}.jpeg`, Ce = await f.requestScreenshotUploadUrl(
|
|
6409
6418
|
t,
|
|
@@ -6411,7 +6420,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6411
6420
|
);
|
|
6412
6421
|
Ce.data && Ce.data.upload_url && (await f.uploadScreenshot(
|
|
6413
6422
|
(Cr = Ce == null ? void 0 : Ce.data) == null ? void 0 : Cr.upload_url,
|
|
6414
|
-
|
|
6423
|
+
Zi
|
|
6415
6424
|
), Ce.data.asset_id && await f.confirmScreenshotUpload(
|
|
6416
6425
|
Ce.data.asset_id
|
|
6417
6426
|
));
|
|
@@ -6429,32 +6438,32 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6429
6438
|
}, [o]);
|
|
6430
6439
|
const {
|
|
6431
6440
|
faceLandmarkerRef: at,
|
|
6432
|
-
isModelLoaded:
|
|
6433
|
-
statusMessage:
|
|
6441
|
+
isModelLoaded: De,
|
|
6442
|
+
statusMessage: Pe,
|
|
6434
6443
|
setStatusMessage: ct,
|
|
6435
6444
|
loadingProgress: At,
|
|
6436
6445
|
permissionDenied: ni,
|
|
6437
6446
|
clearCache: oi
|
|
6438
|
-
} =
|
|
6447
|
+
} = dh(), { fps: si, updateFPS: ai } = hh(), { drawWithEngagementBar: ci, clearCanvas: Ut, engagementRef: Fe } = wh(), {
|
|
6439
6448
|
engagement: Tt,
|
|
6440
6449
|
isLookingAway: ae,
|
|
6441
|
-
analyzeGaze:
|
|
6450
|
+
analyzeGaze: zi,
|
|
6442
6451
|
setEngagement: li,
|
|
6443
6452
|
setIsLookingAway: Vt
|
|
6444
|
-
} =
|
|
6453
|
+
} = mh(), {
|
|
6445
6454
|
multipleFacesDetected: ui,
|
|
6446
|
-
referenceFaceNotDetected:
|
|
6455
|
+
referenceFaceNotDetected: Wi,
|
|
6447
6456
|
analyzeFace: xn,
|
|
6448
6457
|
setMultipleFacesDetected: Ar,
|
|
6449
|
-
setReferenceFaceNotDetected:
|
|
6450
|
-
} =
|
|
6458
|
+
setReferenceFaceNotDetected: Hi
|
|
6459
|
+
} = ph(), { referenceSet: qi, referenceRef: Ki, setReference: Yi, resetReference: Xi, syncReference: Qi } = Ah(
|
|
6451
6460
|
at,
|
|
6452
6461
|
O,
|
|
6453
6462
|
ct,
|
|
6454
6463
|
n
|
|
6455
6464
|
), Tr = {
|
|
6456
6465
|
multipleFacesDetected: ui,
|
|
6457
|
-
referenceFaceNotDetected:
|
|
6466
|
+
referenceFaceNotDetected: Wi,
|
|
6458
6467
|
isLookingAway: ae
|
|
6459
6468
|
}, {
|
|
6460
6469
|
showGazeWarningModal: V,
|
|
@@ -6462,14 +6471,15 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6462
6471
|
closeWarningModal: Ye,
|
|
6463
6472
|
setShowGazeWarningModal: Nr,
|
|
6464
6473
|
setFaceDetectionState: ss
|
|
6465
|
-
} =
|
|
6474
|
+
} = bh(
|
|
6466
6475
|
Tr,
|
|
6467
|
-
|
|
6476
|
+
k && !a,
|
|
6468
6477
|
// Disable warning manager modal triggers if overlay is on
|
|
6478
|
+
De
|
|
6469
6479
|
);
|
|
6470
6480
|
B(() => {
|
|
6471
6481
|
if (s) {
|
|
6472
|
-
if (d || !
|
|
6482
|
+
if (d || !De) {
|
|
6473
6483
|
s("model_loading");
|
|
6474
6484
|
return;
|
|
6475
6485
|
}
|
|
@@ -6477,20 +6487,20 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6477
6487
|
s("camera_error");
|
|
6478
6488
|
return;
|
|
6479
6489
|
}
|
|
6480
|
-
const Ae = W() ||
|
|
6490
|
+
const Ae = W() || Se.NO_FACE;
|
|
6481
6491
|
s(Ae);
|
|
6482
6492
|
}
|
|
6483
6493
|
}, [
|
|
6484
|
-
|
|
6494
|
+
De,
|
|
6485
6495
|
d,
|
|
6486
6496
|
u,
|
|
6487
6497
|
ui,
|
|
6488
|
-
|
|
6498
|
+
Wi,
|
|
6489
6499
|
ae,
|
|
6490
6500
|
W,
|
|
6491
6501
|
s
|
|
6492
6502
|
]);
|
|
6493
|
-
const { renderLoop:
|
|
6503
|
+
const { renderLoop: Pl } = kh(
|
|
6494
6504
|
O,
|
|
6495
6505
|
U,
|
|
6496
6506
|
at,
|
|
@@ -6498,40 +6508,40 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6498
6508
|
xn,
|
|
6499
6509
|
ci,
|
|
6500
6510
|
Ut,
|
|
6501
|
-
|
|
6502
|
-
Hi,
|
|
6511
|
+
zi,
|
|
6503
6512
|
qi,
|
|
6504
|
-
|
|
6505
|
-
x,
|
|
6513
|
+
Ki,
|
|
6506
6514
|
_,
|
|
6515
|
+
C,
|
|
6516
|
+
k,
|
|
6507
6517
|
ct,
|
|
6508
|
-
|
|
6518
|
+
Hi
|
|
6509
6519
|
);
|
|
6510
|
-
_h(O,
|
|
6511
|
-
|
|
6512
|
-
}, [
|
|
6513
|
-
|
|
6514
|
-
}, [Tt, ae,
|
|
6515
|
-
const
|
|
6520
|
+
_h(O, De, Pl, ct), B(() => {
|
|
6521
|
+
Qi();
|
|
6522
|
+
}, [Qi]), B(() => {
|
|
6523
|
+
Fe && Fe.current && (Fe.current.value = Tt, Fe.current.isLookingAway = ae);
|
|
6524
|
+
}, [Tt, ae, Fe]);
|
|
6525
|
+
const Ol = D(
|
|
6516
6526
|
(Ae) => {
|
|
6517
6527
|
j(Ae), Ae || (li(100), Vt(!1));
|
|
6518
6528
|
},
|
|
6519
6529
|
[li, Vt]
|
|
6520
|
-
),
|
|
6521
|
-
Vt(!1), Ar(!1),
|
|
6530
|
+
), Bl = D(() => {
|
|
6531
|
+
Vt(!1), Ar(!1), Hi(!1), ss("face_detected"), Nr(!1), Ye();
|
|
6522
6532
|
}, [
|
|
6523
6533
|
Vt,
|
|
6524
6534
|
Ar,
|
|
6525
|
-
|
|
6535
|
+
Hi,
|
|
6526
6536
|
ss,
|
|
6527
6537
|
Nr,
|
|
6528
6538
|
Ye
|
|
6529
|
-
]),
|
|
6539
|
+
]), Ul = {
|
|
6530
6540
|
engagement: Tt,
|
|
6531
6541
|
fps: si,
|
|
6532
6542
|
isLookingAway: ae,
|
|
6533
6543
|
multipleFacesDetected: ui,
|
|
6534
|
-
referenceFaceNotDetected:
|
|
6544
|
+
referenceFaceNotDetected: Wi
|
|
6535
6545
|
};
|
|
6536
6546
|
return B(() => {
|
|
6537
6547
|
if (!v) return;
|
|
@@ -6543,14 +6553,14 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6543
6553
|
audio: !1
|
|
6544
6554
|
});
|
|
6545
6555
|
be.current = Ne, O.current && (O.current.srcObject = Ne);
|
|
6546
|
-
const
|
|
6556
|
+
const Zi = (i ?? Hr) * 60 * 1e3 / 3, Cr = [0, 1, 2].map((Ce, Nt) => ({
|
|
6547
6557
|
label: `capture-${Nt + 1}`,
|
|
6548
|
-
start: Nt *
|
|
6549
|
-
end: (Nt + 1) *
|
|
6558
|
+
start: Nt * Zi,
|
|
6559
|
+
end: (Nt + 1) * Zi
|
|
6550
6560
|
})), Gt = (Ce, Nt) => Ce === Nt ? Ce : Math.random() * (Nt - Ce) + Ce;
|
|
6551
|
-
Cr.forEach(({ label: Ce, start: Nt, end:
|
|
6561
|
+
Cr.forEach(({ label: Ce, start: Nt, end: Vl }, Gl) => {
|
|
6552
6562
|
let En;
|
|
6553
|
-
|
|
6563
|
+
Gl === 0 ? En = 3e3 : En = Gt(Nt, Vl), Ae.push(
|
|
6554
6564
|
setTimeout(() => {
|
|
6555
6565
|
Me(Ce);
|
|
6556
6566
|
}, En)
|
|
@@ -6566,16 +6576,16 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6566
6576
|
h,
|
|
6567
6577
|
() => ({
|
|
6568
6578
|
setReference: () => {
|
|
6569
|
-
|
|
6579
|
+
Yi();
|
|
6570
6580
|
},
|
|
6571
6581
|
resetReference: () => {
|
|
6572
|
-
|
|
6582
|
+
Xi();
|
|
6573
6583
|
},
|
|
6574
6584
|
stopCamera: () => {
|
|
6575
6585
|
be.current && (be.current.getTracks().forEach((Ae) => Ae.stop()), be.current = null);
|
|
6576
6586
|
}
|
|
6577
6587
|
}),
|
|
6578
|
-
[
|
|
6588
|
+
[Yi, Xi]
|
|
6579
6589
|
), /* @__PURE__ */ m("div", { className: `iw-relative iw-h-full iw-w-full ${e}`, children: [
|
|
6580
6590
|
ni ? /* @__PURE__ */ m("div", { className: "iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600", children: [
|
|
6581
6591
|
/* @__PURE__ */ c("h2", { children: "Camera Permission Denied" }),
|
|
@@ -6597,14 +6607,14 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6597
6607
|
style: { transform: "scaleX(-1)" }
|
|
6598
6608
|
}
|
|
6599
6609
|
),
|
|
6600
|
-
!u && /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-flex-col iw-items-center iw-justify-center iw-bg-black/60 iw-z-30", children: d || !
|
|
6610
|
+
!u && /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-flex-col iw-items-center iw-justify-center iw-bg-black/60 iw-z-30", children: d || !De ? /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-gap-3", children: [
|
|
6601
6611
|
/* @__PURE__ */ c("div", { className: "iw-w-5 iw-h-5 iw-border-2 iw-border-white/20 iw-border-t-white iw-rounded-full iw-animate-spin" }),
|
|
6602
6612
|
/* @__PURE__ */ c("span", { className: "iw-text-white/60 iw-text-xs iw-font-medium iw-tracking-wide", children: "Initializing camera..." })
|
|
6603
6613
|
] }) : /* @__PURE__ */ m(bt, { children: [
|
|
6604
6614
|
/* @__PURE__ */ c("span", { className: "iw-text-white iw-font-medium iw-text-sm", children: "Camera not found" }),
|
|
6605
6615
|
/* @__PURE__ */ c("p", { className: "iw-text-white/60 iw-text-xs iw-mt-1", children: "Please ensure your camera is connected and enabled" })
|
|
6606
6616
|
] }) }),
|
|
6607
|
-
|
|
6617
|
+
k && /* @__PURE__ */ c(
|
|
6608
6618
|
"canvas",
|
|
6609
6619
|
{
|
|
6610
6620
|
ref: U,
|
|
@@ -6625,23 +6635,23 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6625
6635
|
] }),
|
|
6626
6636
|
r && ((as = g == null ? void 0 : g.data) == null ? void 0 : as.user_name) && /* @__PURE__ */ c("div", { className: "iw-absolute iw-z-50 iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#F1F5FE] iw-px-3 iw-py-1 iw-backdrop-blur-md", children: /* @__PURE__ */ c("span", { className: "iw-font-medium iw-text-xs iw-text-[#062260]", children: g.data.user_name }) }),
|
|
6627
6637
|
r && /* @__PURE__ */ c("div", { className: "iw-absolute iw-bottom-4 iw-right-4", children: /* @__PURE__ */ c(
|
|
6628
|
-
|
|
6638
|
+
_u,
|
|
6629
6639
|
{
|
|
6630
6640
|
showControls: (p == null ? void 0 : p.showControls) ?? !1,
|
|
6631
6641
|
isBubbleOpen: E,
|
|
6632
|
-
setIsBubbleOpen:
|
|
6633
|
-
setReference:
|
|
6642
|
+
setIsBubbleOpen: A,
|
|
6643
|
+
setReference: Yi,
|
|
6634
6644
|
clearCache: oi,
|
|
6635
|
-
isModelLoaded:
|
|
6636
|
-
gazeAnalysisEnabled:
|
|
6637
|
-
referenceSet:
|
|
6638
|
-
showLandmarks:
|
|
6645
|
+
isModelLoaded: De,
|
|
6646
|
+
gazeAnalysisEnabled: M && k,
|
|
6647
|
+
referenceSet: qi,
|
|
6648
|
+
showLandmarks: _,
|
|
6639
6649
|
setShowLandmarks: G,
|
|
6640
|
-
showEngagementBar:
|
|
6641
|
-
setShowEngagementBar:
|
|
6642
|
-
handleToggleGazeAnalysis:
|
|
6643
|
-
stats:
|
|
6644
|
-
statusMessage:
|
|
6650
|
+
showEngagementBar: C,
|
|
6651
|
+
setShowEngagementBar: x,
|
|
6652
|
+
handleToggleGazeAnalysis: Ol,
|
|
6653
|
+
stats: Ul,
|
|
6654
|
+
statusMessage: Pe,
|
|
6645
6655
|
loadingProgress: At
|
|
6646
6656
|
}
|
|
6647
6657
|
) }),
|
|
@@ -6658,18 +6668,18 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6658
6668
|
/* @__PURE__ */ c("div", { className: "iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20", children: /* @__PURE__ */ c(
|
|
6659
6669
|
Nh,
|
|
6660
6670
|
{
|
|
6661
|
-
status: u ? d || !
|
|
6671
|
+
status: u ? d || !De ? "model_loading" : W() ?? "no_face_detected" : "camera_error"
|
|
6662
6672
|
}
|
|
6663
6673
|
) })
|
|
6664
6674
|
] })
|
|
6665
6675
|
]
|
|
6666
6676
|
}
|
|
6667
6677
|
) }),
|
|
6668
|
-
|
|
6678
|
+
k && V && !a && /* @__PURE__ */ c(
|
|
6669
6679
|
Th,
|
|
6670
6680
|
{
|
|
6671
6681
|
isOpen: V,
|
|
6672
|
-
onClose:
|
|
6682
|
+
onClose: Bl,
|
|
6673
6683
|
warningType: W(),
|
|
6674
6684
|
isCheatingModalOpen: l
|
|
6675
6685
|
}
|
|
@@ -6709,7 +6719,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6709
6719
|
]
|
|
6710
6720
|
}
|
|
6711
6721
|
);
|
|
6712
|
-
},
|
|
6722
|
+
}, Rl = ({
|
|
6713
6723
|
baseColor: e = "#3B82F6",
|
|
6714
6724
|
contentClassName: t,
|
|
6715
6725
|
title: i,
|
|
@@ -6741,7 +6751,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6741
6751
|
barCount: i = 50,
|
|
6742
6752
|
onAudioLevel: r
|
|
6743
6753
|
}) => {
|
|
6744
|
-
const n =
|
|
6754
|
+
const n = P(null), o = P(null), s = P(0), a = P(null), l = P(null), d = P(null);
|
|
6745
6755
|
B(() => {
|
|
6746
6756
|
if (!e || window === void 0) return;
|
|
6747
6757
|
l.current || (l.current = new (window.AudioContext || window.webkitAudioContext)());
|
|
@@ -6760,31 +6770,31 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6760
6770
|
if (!y) return;
|
|
6761
6771
|
const b = w.frequencyBinCount, p = new Uint8Array(b);
|
|
6762
6772
|
w.getByteFrequencyData(p);
|
|
6763
|
-
const v = g.width,
|
|
6764
|
-
y.clearRect(0, 0, v,
|
|
6773
|
+
const v = g.width, k = g.height;
|
|
6774
|
+
y.clearRect(0, 0, v, k);
|
|
6765
6775
|
let E = 0;
|
|
6766
6776
|
for (let O = 0; O < b; O++) {
|
|
6767
6777
|
const U = p[O] ?? 0;
|
|
6768
6778
|
E += U * U;
|
|
6769
6779
|
}
|
|
6770
|
-
const
|
|
6780
|
+
const A = Math.sqrt(E / b), _ = Math.min(1, A / 128), G = new Float32Array(w.fftSize);
|
|
6771
6781
|
w.getFloatTimeDomainData(G);
|
|
6772
|
-
let
|
|
6782
|
+
let C = 0;
|
|
6773
6783
|
for (let O = 0; O < G.length; O++) {
|
|
6774
6784
|
const U = G[O] || 0;
|
|
6775
|
-
|
|
6785
|
+
C += U * U;
|
|
6776
6786
|
}
|
|
6777
|
-
const
|
|
6787
|
+
const x = Math.sqrt(C / G.length), M = x > 0 ? 20 * Math.log10(x) : -1 / 0;
|
|
6778
6788
|
let j = "problem";
|
|
6779
|
-
if (
|
|
6789
|
+
if (M >= -20 ? j = "good" : M >= -25 ? j = "acceptable" : M >= -45 ? j = "poor" : j = "problem", r) {
|
|
6780
6790
|
const O = Date.now();
|
|
6781
|
-
O - s.current > 200 && (s.current = O, r(j,
|
|
6791
|
+
O - s.current > 200 && (s.current = O, r(j, M));
|
|
6782
6792
|
}
|
|
6783
|
-
y.clearRect(0, 0, v,
|
|
6784
|
-
const z = i, X = Math.floor(
|
|
6793
|
+
y.clearRect(0, 0, v, k);
|
|
6794
|
+
const z = i, X = Math.floor(_ * z);
|
|
6785
6795
|
for (let O = 0; O < z; O++) {
|
|
6786
6796
|
const U = O * (v / z), ee = v / z - 1.8;
|
|
6787
|
-
O < X ? y.fillStyle = "#0EB00E" : y.fillStyle = "#D9D9D9", y.fillRect(U, 0, ee,
|
|
6797
|
+
O < X ? y.fillStyle = "#0EB00E" : y.fillStyle = "#D9D9D9", y.fillRect(U, 0, ee, k);
|
|
6788
6798
|
}
|
|
6789
6799
|
o.current = requestAnimationFrame(f);
|
|
6790
6800
|
};
|
|
@@ -6792,7 +6802,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6792
6802
|
o.current && cancelAnimationFrame(o.current);
|
|
6793
6803
|
};
|
|
6794
6804
|
}, [e, i]);
|
|
6795
|
-
const u =
|
|
6805
|
+
const u = P({
|
|
6796
6806
|
audioContext: l.current,
|
|
6797
6807
|
source: d.current
|
|
6798
6808
|
});
|
|
@@ -6890,7 +6900,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6890
6900
|
"div",
|
|
6891
6901
|
{
|
|
6892
6902
|
className: `iw-flex iw-items-center iw-justify-center iw-w-9 iw-h-9 iw-rounded-full ${n.iconBg} iw-shrink-0`,
|
|
6893
|
-
children: /* @__PURE__ */ c(
|
|
6903
|
+
children: /* @__PURE__ */ c(xu, { className: `iw-w-5 iw-h-5 ${n.iconColor}` })
|
|
6894
6904
|
}
|
|
6895
6905
|
),
|
|
6896
6906
|
/* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-gap-[2px] iw-pr-2", children: [
|
|
@@ -6926,10 +6936,10 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6926
6936
|
hasPermission: u = !0,
|
|
6927
6937
|
onAudioLevel: h
|
|
6928
6938
|
}) => {
|
|
6929
|
-
const { baseColor: w } =
|
|
6939
|
+
const { baseColor: w } = Fi(), [f, g] = N(!1), y = P(null);
|
|
6930
6940
|
B(() => {
|
|
6931
|
-
const v = (
|
|
6932
|
-
y.current && !y.current.contains(
|
|
6941
|
+
const v = (k) => {
|
|
6942
|
+
y.current && !y.current.contains(k.target) && g(!1);
|
|
6933
6943
|
};
|
|
6934
6944
|
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
6935
6945
|
}, []);
|
|
@@ -6964,7 +6974,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6964
6974
|
] }),
|
|
6965
6975
|
/* @__PURE__ */ c("div", { className: "iw-flex iw-items-center iw-gap-2", children: u ? /* @__PURE__ */ m(bt, { children: [
|
|
6966
6976
|
/* @__PURE__ */ c(
|
|
6967
|
-
|
|
6977
|
+
mu,
|
|
6968
6978
|
{
|
|
6969
6979
|
className: `iw-w-4 iw-h-4 iw-text-gray-400 iw-transition-transform ${f ? "iw-rotate-180" : ""}`
|
|
6970
6980
|
}
|
|
@@ -6975,7 +6985,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6975
6985
|
}
|
|
6976
6986
|
),
|
|
6977
6987
|
!u && /* @__PURE__ */ c(
|
|
6978
|
-
|
|
6988
|
+
Rl,
|
|
6979
6989
|
{
|
|
6980
6990
|
baseColor: w,
|
|
6981
6991
|
contentClassName: "!iw-left-0",
|
|
@@ -7030,21 +7040,21 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7030
7040
|
audioStream: y = null,
|
|
7031
7041
|
isDeviceLoading: b = !1
|
|
7032
7042
|
}) => {
|
|
7033
|
-
const { baseColor: p } =
|
|
7043
|
+
const { baseColor: p } = Fi(), [v, k] = N("problem"), [E, A] = N(!1);
|
|
7034
7044
|
Ht.useEffect(() => {
|
|
7035
|
-
|
|
7045
|
+
k("problem"), A(!1);
|
|
7036
7046
|
}, [h]);
|
|
7037
|
-
const
|
|
7047
|
+
const _ = l || !n || a && (!e || !t || !E) || b;
|
|
7038
7048
|
return /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-gap-1 iw-w-full", children: [
|
|
7039
7049
|
/* @__PURE__ */ m("div", { className: "iw-flex iw-justify-center iw-items-center iw-gap-2 iw-flex-wrap iw-max-w-[700px] iw-mx-auto", children: [
|
|
7040
7050
|
a && /* @__PURE__ */ m("div", { className: "iw-flex sm:iw-flex-row iw-flex-col iw-gap-4 iw-w-full", children: [
|
|
7041
7051
|
/* @__PURE__ */ c(
|
|
7042
7052
|
ma,
|
|
7043
7053
|
{
|
|
7044
|
-
icon:
|
|
7054
|
+
icon: yu,
|
|
7045
7055
|
devices: d,
|
|
7046
7056
|
selectedId: h ?? "",
|
|
7047
|
-
onChange: (
|
|
7057
|
+
onChange: (C) => f && f(C),
|
|
7048
7058
|
label: "Choose mic",
|
|
7049
7059
|
showVisualizer: !0,
|
|
7050
7060
|
showMicHint: !0,
|
|
@@ -7052,21 +7062,21 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7052
7062
|
audioStatus: v,
|
|
7053
7063
|
stream: y,
|
|
7054
7064
|
hasPermission: e,
|
|
7055
|
-
onAudioLevel: (
|
|
7056
|
-
const
|
|
7057
|
-
|
|
7058
|
-
(
|
|
7059
|
-
), !E && (
|
|
7065
|
+
onAudioLevel: (C) => {
|
|
7066
|
+
const x = { good: 3, acceptable: 2, poor: 1, problem: 0 };
|
|
7067
|
+
k(
|
|
7068
|
+
(M) => x[C] > x[M] ? C : M
|
|
7069
|
+
), !E && (C === "good" || C === "acceptable") && A(!0);
|
|
7060
7070
|
}
|
|
7061
7071
|
}
|
|
7062
7072
|
),
|
|
7063
7073
|
/* @__PURE__ */ c(
|
|
7064
7074
|
ma,
|
|
7065
7075
|
{
|
|
7066
|
-
icon:
|
|
7076
|
+
icon: vu,
|
|
7067
7077
|
devices: u,
|
|
7068
7078
|
selectedId: w ?? "",
|
|
7069
|
-
onChange: (
|
|
7079
|
+
onChange: (C) => g && g(C),
|
|
7070
7080
|
label: "Choose camera",
|
|
7071
7081
|
hasPermission: t
|
|
7072
7082
|
}
|
|
@@ -7077,8 +7087,8 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7077
7087
|
"div",
|
|
7078
7088
|
{
|
|
7079
7089
|
className: `iw-mt-0.5 iw-h-5 iw-w-5 iw-min-w-[20px] iw-rounded iw-border iw-flex iw-items-center iw-justify-center iw-cursor-pointer iw-transition-colors ${n ? "iw-bg-[#062260] iw-border-[#062260]" : "iw-bg-white iw-border-[#062260]"}`,
|
|
7080
|
-
onClick: (
|
|
7081
|
-
|
|
7090
|
+
onClick: (C) => {
|
|
7091
|
+
C.stopPropagation(), o(!n);
|
|
7082
7092
|
},
|
|
7083
7093
|
children: n && /* @__PURE__ */ c(Pr, { className: "iw-size-3 iw-text-white" })
|
|
7084
7094
|
}
|
|
@@ -7098,12 +7108,12 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7098
7108
|
zr,
|
|
7099
7109
|
{
|
|
7100
7110
|
onClick: r,
|
|
7101
|
-
disabled:
|
|
7102
|
-
className: `iw-h-12 iw-w-full iw-shadow-lg !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold !iw-border-[#E7EAF1] iw-rounded-lg ${
|
|
7111
|
+
disabled: _,
|
|
7112
|
+
className: `iw-h-12 iw-w-full iw-shadow-lg !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold !iw-border-[#E7EAF1] iw-rounded-lg ${_ ? "iw-opacity-50" : "hover:iw-opacity-75"}`,
|
|
7103
7113
|
children: b ? "Device Loading..." : i
|
|
7104
7114
|
}
|
|
7105
7115
|
),
|
|
7106
|
-
!n && (!a || e && t) &&
|
|
7116
|
+
!n && (!a || e && t) && Rl({
|
|
7107
7117
|
baseColor: p,
|
|
7108
7118
|
title: "Action Required",
|
|
7109
7119
|
description: "Please check the box to acknowledge and consent to continue."
|
|
@@ -7171,20 +7181,20 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7171
7181
|
handleAudioChange: y,
|
|
7172
7182
|
handleVideoChange: b,
|
|
7173
7183
|
stopStream: p
|
|
7174
|
-
} =
|
|
7175
|
-
|
|
7184
|
+
} = hu(e), [v, k] = N(!1), [E, A] = N(0), [_, G] = N(!1), C = P(null), x = P(null), M = (U) => {
|
|
7185
|
+
C.current = U, r && (typeof r == "function" ? r(U) : r.current = U);
|
|
7176
7186
|
};
|
|
7177
7187
|
if (B(() => () => {
|
|
7178
|
-
|
|
7188
|
+
x.current && (clearInterval(x.current), x.current = null);
|
|
7179
7189
|
}, []), !e) return null;
|
|
7180
|
-
const [j, z] =
|
|
7190
|
+
const [j, z] = N(Se.MODEL_LOADING), X = async () => {
|
|
7181
7191
|
var ee;
|
|
7182
|
-
|
|
7192
|
+
k(!0), (ee = C.current) == null || ee.resetReference();
|
|
7183
7193
|
const U = () => {
|
|
7184
7194
|
var be;
|
|
7185
|
-
return (be =
|
|
7195
|
+
return (be = C.current) == null ? void 0 : be.setReference();
|
|
7186
7196
|
};
|
|
7187
|
-
U(),
|
|
7197
|
+
U(), x.current && clearInterval(x.current), x.current = setInterval(U, 500);
|
|
7188
7198
|
};
|
|
7189
7199
|
return /* @__PURE__ */ c("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-pt-16 iw-overflow-auto", children: /* @__PURE__ */ m("div", { className: "iw-w-full iw-max-w-[700px] iw-max-h-[900px] iw-my-6 iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto", children: [
|
|
7190
7200
|
/* @__PURE__ */ m("div", { className: "iw-px-12 iw-pt-3", children: [
|
|
@@ -7198,9 +7208,9 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7198
7208
|
] }),
|
|
7199
7209
|
/* @__PURE__ */ c("div", { className: "iw-px-12 iw-pb-3 iw-flex iw-flex-col iw-items-center", children: E === 0 ? /* @__PURE__ */ m("div", { className: "iw-w-full iw-flex iw-flex-col iw-items-center iw-gap-4", children: [
|
|
7200
7210
|
/* @__PURE__ */ c("div", { className: "iw-w-full iw-max-w-[600px] iw-aspect-video iw-bg-slate-100 iw-rounded-2xl iw-overflow-hidden iw-relative iw-border iw-border-slate-200", children: i ? /* @__PURE__ */ c(
|
|
7201
|
-
|
|
7211
|
+
Fl,
|
|
7202
7212
|
{
|
|
7203
|
-
ref:
|
|
7213
|
+
ref: M,
|
|
7204
7214
|
interviewId: n,
|
|
7205
7215
|
interview_duration: o,
|
|
7206
7216
|
showProctoringUI: !1,
|
|
@@ -7209,7 +7219,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7209
7219
|
videoAllowed: a,
|
|
7210
7220
|
onProctoringStatusChange: z,
|
|
7211
7221
|
onSetReference: () => {
|
|
7212
|
-
|
|
7222
|
+
x.current && (clearInterval(x.current), x.current = null), k(!1), A(1);
|
|
7213
7223
|
}
|
|
7214
7224
|
}
|
|
7215
7225
|
) : /* @__PURE__ */ c(
|
|
@@ -7230,10 +7240,10 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7230
7240
|
videoEnabled: a,
|
|
7231
7241
|
buttonText: i ? v ? "Calibrating..." : j === "model_loading" ? "Initialising..." : "Start calibrate" : "Next",
|
|
7232
7242
|
onButtonClick: () => {
|
|
7233
|
-
i ? X() :
|
|
7243
|
+
i ? X() : A(1);
|
|
7234
7244
|
},
|
|
7235
|
-
disabled: !
|
|
7236
|
-
isAgreed:
|
|
7245
|
+
disabled: !_ || i && j !== "face_detected" || !i && (!s || !a),
|
|
7246
|
+
isAgreed: _,
|
|
7237
7247
|
onAgreedToggle: G,
|
|
7238
7248
|
audioDevices: d,
|
|
7239
7249
|
videoDevices: u,
|
|
@@ -7257,7 +7267,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7257
7267
|
onButtonClick: () => {
|
|
7258
7268
|
t(), p();
|
|
7259
7269
|
},
|
|
7260
|
-
isAgreed:
|
|
7270
|
+
isAgreed: _,
|
|
7261
7271
|
onAgreedToggle: G,
|
|
7262
7272
|
showMediaIcons: !1
|
|
7263
7273
|
}
|
|
@@ -7265,12 +7275,12 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7265
7275
|
] }) })
|
|
7266
7276
|
] }) });
|
|
7267
7277
|
}, Wr = (e) => {
|
|
7268
|
-
const { baseColor: t, borderRadius: i } =
|
|
7278
|
+
const { baseColor: t, borderRadius: i } = Fi(), { loading: r, children: n, ...o } = e;
|
|
7269
7279
|
return /* @__PURE__ */ c(
|
|
7270
7280
|
zr,
|
|
7271
7281
|
{
|
|
7272
7282
|
style: {
|
|
7273
|
-
background:
|
|
7283
|
+
background: cu(t),
|
|
7274
7284
|
borderRadius: i
|
|
7275
7285
|
},
|
|
7276
7286
|
...o,
|
|
@@ -7362,10 +7372,10 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7362
7372
|
className: n = "",
|
|
7363
7373
|
showLabel: o = !0
|
|
7364
7374
|
}) => {
|
|
7365
|
-
const s = Math.max(1, e || 1), a = Yh(t / s, 0, 1), { radius: l, circumference: d, dashOffset: u, center: h } =
|
|
7375
|
+
const s = Math.max(1, e || 1), a = Yh(t / s, 0, 1), { radius: l, circumference: d, dashOffset: u, center: h } = lr(() => {
|
|
7366
7376
|
const g = (i - r) / 2, y = 2 * Math.PI * g, b = y * (1 - a), p = Math.round(r) % 2 === 1, v = i / 2 + (p ? 0.5 : 0);
|
|
7367
7377
|
return { radius: g, circumference: y, dashOffset: b, center: v };
|
|
7368
|
-
}, [i, r, a]), w =
|
|
7378
|
+
}, [i, r, a]), w = lr(() => a <= 0.25 ? "iw-stroke-red-500" : a <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [a]), f = a <= 0.25 ? "iw-animate-pulse" : "";
|
|
7369
7379
|
return /* @__PURE__ */ m(
|
|
7370
7380
|
"div",
|
|
7371
7381
|
{
|
|
@@ -7424,7 +7434,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7424
7434
|
className: `iw-text-[11px] iw-font-semibold iw-tabular-nums ${a <= 0.25 ? "iw-text-red-600" : a <= 0.5 ? "iw-text-yellow-600" : "iw-text-green-600"}`,
|
|
7425
7435
|
children: pa(t)
|
|
7426
7436
|
}
|
|
7427
|
-
) }) : /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0", children: /* @__PURE__ */ c(
|
|
7437
|
+
) }) : /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0", children: /* @__PURE__ */ c(pu, {}) })
|
|
7428
7438
|
]
|
|
7429
7439
|
}
|
|
7430
7440
|
);
|
|
@@ -7522,7 +7532,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7522
7532
|
timerState: e,
|
|
7523
7533
|
answeringTime: t
|
|
7524
7534
|
}) => {
|
|
7525
|
-
const i = (e == null ? void 0 : e.currentPhaseTimeRemaining) || 0, r = t ||
|
|
7535
|
+
const i = (e == null ? void 0 : e.currentPhaseTimeRemaining) || 0, r = t || Il.answeringDuration;
|
|
7526
7536
|
return /* @__PURE__ */ m("div", { className: "iw-flex iw-w-full iw-items-center iw-justify-between iw-gap-3 iw-bg-[#E6F3FF] iw-p-2 iw-rounded-lg", children: [
|
|
7527
7537
|
/* @__PURE__ */ c("span", { className: "iw-text-[#062260]", children: "Time left to answer" }),
|
|
7528
7538
|
/* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-gap-2", children: [
|
|
@@ -7552,7 +7562,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7552
7562
|
if (!r) return;
|
|
7553
7563
|
let n = null, o = null, s = null, a;
|
|
7554
7564
|
const l = () => {
|
|
7555
|
-
const d =
|
|
7565
|
+
const d = Si.activeStream;
|
|
7556
7566
|
if (!d || !d.active) {
|
|
7557
7567
|
a = requestAnimationFrame(l);
|
|
7558
7568
|
return;
|
|
@@ -7561,29 +7571,29 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7561
7571
|
n = new u(), o = n.createAnalyser(), o.fftSize = 256, o.smoothingTimeConstant = 0.9, s = n.createMediaStreamSource(d), s.connect(o);
|
|
7562
7572
|
const h = o.frequencyBinCount, w = new Uint8Array(h), f = new Float32Array(h), g = 0.2, y = () => {
|
|
7563
7573
|
if (t.current) {
|
|
7564
|
-
const
|
|
7565
|
-
i.width !==
|
|
7574
|
+
const x = t.current.clientWidth - 32;
|
|
7575
|
+
i.width !== x && x > 0 && (i.width = x);
|
|
7566
7576
|
}
|
|
7567
7577
|
const b = i.width, p = i.height;
|
|
7568
7578
|
r.clearRect(0, 0, b, p), o.getByteFrequencyData(w);
|
|
7569
|
-
for (let
|
|
7570
|
-
const
|
|
7571
|
-
f[
|
|
7579
|
+
for (let x = 0; x < h; x++) {
|
|
7580
|
+
const M = f[x] || 0, j = w[x] || 0;
|
|
7581
|
+
f[x] = M * g + j * (1 - g);
|
|
7572
7582
|
}
|
|
7573
|
-
const v = 3,
|
|
7574
|
-
if (
|
|
7583
|
+
const v = 3, k = 2, E = Math.floor(b / (v + k)), A = E > 0 ? E % 2 === 0 ? E - 1 : E : 0;
|
|
7584
|
+
if (A <= 0) {
|
|
7575
7585
|
a = requestAnimationFrame(y);
|
|
7576
7586
|
return;
|
|
7577
7587
|
}
|
|
7578
|
-
const
|
|
7588
|
+
const _ = (b - A * (v + k)) / 2, G = Math.floor(A / 2);
|
|
7579
7589
|
r.fillStyle = "#27ba71";
|
|
7580
|
-
const
|
|
7581
|
-
for (let
|
|
7582
|
-
const
|
|
7590
|
+
const C = 38;
|
|
7591
|
+
for (let x = 0; x < A; x++) {
|
|
7592
|
+
const M = Math.abs(x - G), j = G > 0 ? M / G : 0, z = 2 + Math.floor(Math.pow(j, 1.5) * C);
|
|
7583
7593
|
let X = f[Math.min(z, h - 1)] || 0;
|
|
7584
7594
|
X = X / 255, X = Math.pow(X, 2.2);
|
|
7585
|
-
const O = 1 - j * 0.8, U = 1.5, ee = X > 0.05 ? Math.sin(Date.now() / 300 +
|
|
7586
|
-
r.beginPath(), r.roundRect(at,
|
|
7595
|
+
const O = 1 - j * 0.8, U = 1.5, ee = X > 0.05 ? Math.sin(Date.now() / 300 + x) * 0.5 * O : 0, be = X * (p - 8) * O, Me = Math.max(U, be + ee), at = _ + x * (v + k), De = (p - Me) / 2;
|
|
7596
|
+
r.beginPath(), r.roundRect(at, De, v, Me, v / 2), r.fill();
|
|
7587
7597
|
}
|
|
7588
7598
|
a = requestAnimationFrame(y);
|
|
7589
7599
|
};
|
|
@@ -7793,7 +7803,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7793
7803
|
timerState: a,
|
|
7794
7804
|
editingTime: l
|
|
7795
7805
|
}) => {
|
|
7796
|
-
const d = os(), [u, h] =
|
|
7806
|
+
const d = os(), [u, h] = N([]), [w, f] = N(!0), g = Ht.useRef(null);
|
|
7797
7807
|
return B(() => {
|
|
7798
7808
|
var y;
|
|
7799
7809
|
(y = g.current) == null || y.scrollIntoView({ behavior: "smooth" });
|
|
@@ -7855,7 +7865,7 @@ function a2({
|
|
|
7855
7865
|
violationType: r,
|
|
7856
7866
|
onDisqualify: n
|
|
7857
7867
|
}) {
|
|
7858
|
-
const [, o] =
|
|
7868
|
+
const [, o] = N(Mn), s = P(t), a = P(n), l = P(i);
|
|
7859
7869
|
if (B(() => {
|
|
7860
7870
|
s.current = t, a.current = n, l.current = i;
|
|
7861
7871
|
}, [t, n, i]), B(() => {
|
|
@@ -7944,7 +7954,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
7944
7954
|
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "10" })
|
|
7945
7955
|
]
|
|
7946
7956
|
}
|
|
7947
|
-
),
|
|
7957
|
+
), Ll = ({
|
|
7948
7958
|
isOpen: e,
|
|
7949
7959
|
onClose: t,
|
|
7950
7960
|
children: i,
|
|
@@ -8042,7 +8052,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8042
8052
|
]
|
|
8043
8053
|
}
|
|
8044
8054
|
);
|
|
8045
|
-
return
|
|
8055
|
+
return zl(d, document.body);
|
|
8046
8056
|
}, l2 = ({
|
|
8047
8057
|
showHardReloadWarning: e,
|
|
8048
8058
|
onContinue: t
|
|
@@ -8051,7 +8061,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8051
8061
|
t();
|
|
8052
8062
|
};
|
|
8053
8063
|
return /* @__PURE__ */ m(
|
|
8054
|
-
|
|
8064
|
+
Ll,
|
|
8055
8065
|
{
|
|
8056
8066
|
isOpen: e,
|
|
8057
8067
|
onClose: i,
|
|
@@ -8080,12 +8090,12 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8080
8090
|
]
|
|
8081
8091
|
}
|
|
8082
8092
|
);
|
|
8083
|
-
},
|
|
8093
|
+
}, Ml = ({
|
|
8084
8094
|
confirmExitInterview: e,
|
|
8085
8095
|
isOpen: t,
|
|
8086
8096
|
onClose: i
|
|
8087
8097
|
}) => /* @__PURE__ */ m(
|
|
8088
|
-
|
|
8098
|
+
Ll,
|
|
8089
8099
|
{
|
|
8090
8100
|
isOpen: t,
|
|
8091
8101
|
onClose: i,
|
|
@@ -8118,8 +8128,8 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8118
8128
|
] })
|
|
8119
8129
|
]
|
|
8120
8130
|
}
|
|
8121
|
-
),
|
|
8122
|
-
const e =
|
|
8131
|
+
), Dl = io(null), u2 = () => {
|
|
8132
|
+
const e = Ii(Dl);
|
|
8123
8133
|
return e || {
|
|
8124
8134
|
violationCount: 0,
|
|
8125
8135
|
violationType: "fullscreen_exit",
|
|
@@ -8135,12 +8145,12 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8135
8145
|
};
|
|
8136
8146
|
}, d2 = ba(
|
|
8137
8147
|
({ children: e, onDisqualify: t, onExit: i, isCompleted: r }, n) => {
|
|
8138
|
-
const [o, s] =
|
|
8148
|
+
const [o, s] = N(!1), [a, l] = N(!1), [d, u] = N(!1), [h, w] = N(!1), [f, g] = N("fullscreen_exit"), { logViolation: y, violationCount: b } = Uh({
|
|
8139
8149
|
maxViolations: 5,
|
|
8140
8150
|
onViolation: (x) => {
|
|
8141
8151
|
!d && !r && !h && (s(!0), g(x.type));
|
|
8142
8152
|
}
|
|
8143
|
-
}), { enterFullScreen: p, isFullScreen: v, exitFullScreen:
|
|
8153
|
+
}), { enterFullScreen: p, isFullScreen: v, exitFullScreen: k } = Sh({
|
|
8144
8154
|
onFullScreenChange(x) {
|
|
8145
8155
|
!x && !d && !h && !r && (s(!0), y({
|
|
8146
8156
|
type: "fullscreen_exit",
|
|
@@ -8168,30 +8178,36 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8168
8178
|
}),
|
|
8169
8179
|
[]
|
|
8170
8180
|
), Lh(y), Fh(y), Mh(), Vh();
|
|
8171
|
-
const { proctoring: E } = gr(),
|
|
8181
|
+
const { proctoring: E } = gr(), A = (E == null ? void 0 : E.prevent_unintended_exit) ?? !1, _ = D(() => {
|
|
8182
|
+
var x, M;
|
|
8183
|
+
to.stop(), Sl.dispose(), (M = (x = Si.activeStream) == null ? void 0 : x.getTracks()) == null || M.forEach((j) => j.stop());
|
|
8184
|
+
}, []);
|
|
8172
8185
|
B(() => {
|
|
8173
8186
|
const x = () => {
|
|
8174
|
-
|
|
8175
|
-
},
|
|
8176
|
-
if (!(d || h || r)
|
|
8177
|
-
|
|
8187
|
+
A && (d || h || r || (console.log("User attempted to use browser back navigation"), l(!0), window.history.pushState(null, "", window.location.href)));
|
|
8188
|
+
}, M = (j) => {
|
|
8189
|
+
if (!(d || h || r)) {
|
|
8190
|
+
if (console.log("User attempted to reload or close the tab"), A)
|
|
8191
|
+
return l(!0), j.preventDefault(), j.returnValue = "", "";
|
|
8192
|
+
_();
|
|
8193
|
+
}
|
|
8178
8194
|
};
|
|
8179
|
-
return
|
|
8180
|
-
window.removeEventListener("popstate", x), window.removeEventListener("beforeunload",
|
|
8195
|
+
return A && (window.history.pushState(null, "", window.location.href), window.addEventListener("popstate", x)), window.addEventListener("beforeunload", M), () => {
|
|
8196
|
+
window.removeEventListener("popstate", x), window.removeEventListener("beforeunload", M);
|
|
8181
8197
|
};
|
|
8182
8198
|
}, [
|
|
8183
8199
|
d,
|
|
8184
8200
|
h,
|
|
8185
8201
|
r,
|
|
8186
|
-
|
|
8202
|
+
A
|
|
8187
8203
|
]);
|
|
8188
|
-
const
|
|
8189
|
-
u(!0),
|
|
8190
|
-
},
|
|
8191
|
-
l(!1), i == null || i();
|
|
8204
|
+
const G = () => {
|
|
8205
|
+
_(), u(!0), k(), s(!1), l(!1), t == null || t();
|
|
8206
|
+
}, C = () => {
|
|
8207
|
+
_(), l(!1), i == null || i();
|
|
8192
8208
|
};
|
|
8193
8209
|
return /* @__PURE__ */ m(
|
|
8194
|
-
|
|
8210
|
+
Dl.Provider,
|
|
8195
8211
|
{
|
|
8196
8212
|
value: {
|
|
8197
8213
|
violationCount: b,
|
|
@@ -8201,7 +8217,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8201
8217
|
handleClose: () => {
|
|
8202
8218
|
s(!1), p();
|
|
8203
8219
|
},
|
|
8204
|
-
handleDisqualify:
|
|
8220
|
+
handleDisqualify: G,
|
|
8205
8221
|
handleUnintendedExit: () => {
|
|
8206
8222
|
l(!0);
|
|
8207
8223
|
}
|
|
@@ -8209,14 +8225,14 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8209
8225
|
children: [
|
|
8210
8226
|
/* @__PURE__ */ c("div", { className: "iw-relative iw-h-full iw-w-full", children: e }),
|
|
8211
8227
|
/* @__PURE__ */ c(
|
|
8212
|
-
|
|
8228
|
+
Ml,
|
|
8213
8229
|
{
|
|
8214
8230
|
isOpen: a,
|
|
8215
8231
|
onClose: () => {
|
|
8216
8232
|
l(!1);
|
|
8217
8233
|
},
|
|
8218
8234
|
confirmExitInterview: () => {
|
|
8219
|
-
|
|
8235
|
+
C();
|
|
8220
8236
|
}
|
|
8221
8237
|
}
|
|
8222
8238
|
),
|
|
@@ -8286,7 +8302,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8286
8302
|
violationCount: b,
|
|
8287
8303
|
violationType: p,
|
|
8288
8304
|
handleClose: v,
|
|
8289
|
-
handleDisqualify:
|
|
8305
|
+
handleDisqualify: k
|
|
8290
8306
|
} = u2();
|
|
8291
8307
|
return /* @__PURE__ */ m(
|
|
8292
8308
|
"div",
|
|
@@ -8306,7 +8322,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8306
8322
|
) }) }),
|
|
8307
8323
|
/* @__PURE__ */ m("div", { className: "iw-flex-1 iw-min-h-0 iw-rounded-[16px] iw-overflow-hidden iw-relative", children: [
|
|
8308
8324
|
/* @__PURE__ */ c(
|
|
8309
|
-
|
|
8325
|
+
Fl,
|
|
8310
8326
|
{
|
|
8311
8327
|
ref: l,
|
|
8312
8328
|
interviewId: s,
|
|
@@ -8322,7 +8338,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8322
8338
|
warningCount: b,
|
|
8323
8339
|
violationType: p,
|
|
8324
8340
|
onClose: v,
|
|
8325
|
-
onDisqualify:
|
|
8341
|
+
onDisqualify: k
|
|
8326
8342
|
}
|
|
8327
8343
|
)
|
|
8328
8344
|
] })
|
|
@@ -8360,7 +8376,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8360
8376
|
totalDuration: n = 30,
|
|
8361
8377
|
elapsedTime: o = 0
|
|
8362
8378
|
}) => {
|
|
8363
|
-
const [s, a] =
|
|
8379
|
+
const [s, a] = N(!1), l = Math.min(o / (n * 60) * 100, 100);
|
|
8364
8380
|
return /* @__PURE__ */ m("header", { className: "iw-w-full iw-text-gray-900 iw-shadow-sm", children: [
|
|
8365
8381
|
/* @__PURE__ */ m("div", { className: "iw-mx-auto iw-flex iw-items-center iw-justify-between iw-p-4 iw-pt-1 iw-mb-2 iw-border-b iw-border-[#B3B9CB] iw-border-dashed", children: [
|
|
8366
8382
|
/* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-space-x-2", children: [
|
|
@@ -8399,7 +8415,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8399
8415
|
] }), {}),
|
|
8400
8416
|
/* @__PURE__ */ c("div", { className: "iw-h-px iw-bg-gray-200" }),
|
|
8401
8417
|
/* @__PURE__ */ c(
|
|
8402
|
-
|
|
8418
|
+
Ml,
|
|
8403
8419
|
{
|
|
8404
8420
|
isOpen: s,
|
|
8405
8421
|
confirmExitInterview: () => {
|
|
@@ -8420,16 +8436,16 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8420
8436
|
mediaStream: a,
|
|
8421
8437
|
startOnMount: l = !0
|
|
8422
8438
|
}) => {
|
|
8423
|
-
const { baseColor: d } =
|
|
8439
|
+
const { baseColor: d } = Fi(), u = P(null), h = P(null), w = P(null), f = P(null), g = P(null), y = P(null), b = P(!1), [p, v] = N(null);
|
|
8424
8440
|
B(() => {
|
|
8425
8441
|
if (t || !h.current) return;
|
|
8426
|
-
const E = h.current,
|
|
8442
|
+
const E = h.current, A = () => {
|
|
8427
8443
|
const G = u.current;
|
|
8428
8444
|
if (!G) return;
|
|
8429
|
-
const
|
|
8430
|
-
G.width = Math.max(1, Math.floor(
|
|
8431
|
-
},
|
|
8432
|
-
return
|
|
8445
|
+
const C = E.clientWidth, x = i;
|
|
8446
|
+
G.width = Math.max(1, Math.floor(C * window.devicePixelRatio || 1)), G.height = Math.max(1, Math.floor(x * window.devicePixelRatio || 1));
|
|
8447
|
+
}, _ = new ResizeObserver(A);
|
|
8448
|
+
return _.observe(E), A(), () => _.disconnect();
|
|
8433
8449
|
}, [t, i]), B(() => {
|
|
8434
8450
|
if (!t) return;
|
|
8435
8451
|
const E = u.current;
|
|
@@ -8444,8 +8460,8 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8444
8460
|
let E = !1;
|
|
8445
8461
|
return (async () => {
|
|
8446
8462
|
try {
|
|
8447
|
-
const
|
|
8448
|
-
w.current =
|
|
8463
|
+
const _ = new (window.AudioContext || window.webkitAudioContext)();
|
|
8464
|
+
w.current = _;
|
|
8449
8465
|
let G = a;
|
|
8450
8466
|
if (!G) {
|
|
8451
8467
|
if (!l) return;
|
|
@@ -8455,40 +8471,40 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8455
8471
|
}), b.current = !0;
|
|
8456
8472
|
}
|
|
8457
8473
|
if (E) return;
|
|
8458
|
-
const
|
|
8459
|
-
|
|
8460
|
-
const
|
|
8461
|
-
g.current =
|
|
8462
|
-
} catch (
|
|
8463
|
-
v((
|
|
8474
|
+
const C = _.createAnalyser();
|
|
8475
|
+
C.fftSize = o, C.smoothingTimeConstant = s, f.current = C;
|
|
8476
|
+
const x = _.createMediaStreamSource(G);
|
|
8477
|
+
g.current = x, x.connect(C), k();
|
|
8478
|
+
} catch (_) {
|
|
8479
|
+
v((_ == null ? void 0 : _.message) || "Failed to initialize microphone");
|
|
8464
8480
|
}
|
|
8465
8481
|
})(), () => {
|
|
8466
|
-
var
|
|
8482
|
+
var _, G, C, x;
|
|
8467
8483
|
E = !0, y.current && cancelAnimationFrame(y.current);
|
|
8468
8484
|
try {
|
|
8469
|
-
(
|
|
8485
|
+
(_ = g.current) == null || _.disconnect();
|
|
8470
8486
|
} catch {
|
|
8471
8487
|
}
|
|
8472
8488
|
try {
|
|
8473
8489
|
(G = f.current) == null || G.disconnect();
|
|
8474
8490
|
} catch {
|
|
8475
8491
|
}
|
|
8476
|
-
b.current && ((
|
|
8492
|
+
b.current && ((x = ((C = g.current) == null ? void 0 : C.mediaStream) || void 0) == null || x.getTracks().forEach((M) => M.stop())), w.current && w.current.state !== "closed" && w.current.close();
|
|
8477
8493
|
};
|
|
8478
8494
|
}, [a, o, s, l]);
|
|
8479
|
-
const
|
|
8480
|
-
const E = u.current,
|
|
8481
|
-
if (!E || !
|
|
8482
|
-
const
|
|
8483
|
-
if (!
|
|
8484
|
-
const G = window.devicePixelRatio || 1,
|
|
8485
|
-
y.current = requestAnimationFrame(z),
|
|
8486
|
-
const X = Math.max(1, Math.floor(r * G)), O = Math.max(1, Math.floor(n * G)), U = X + O, ee = Math.max(8, Math.floor((
|
|
8495
|
+
const k = () => {
|
|
8496
|
+
const E = u.current, A = f.current;
|
|
8497
|
+
if (!E || !A) return;
|
|
8498
|
+
const _ = E.getContext("2d");
|
|
8499
|
+
if (!_) return;
|
|
8500
|
+
const G = window.devicePixelRatio || 1, C = E.width, x = E.height, M = A.frequencyBinCount, j = new Uint8Array(M), z = () => {
|
|
8501
|
+
y.current = requestAnimationFrame(z), A.getByteTimeDomainData(j), _.clearRect(0, 0, C, x), _.fillStyle = "rgba(0,0,0,0)", _.fillRect(0, 0, C, x);
|
|
8502
|
+
const X = Math.max(1, Math.floor(r * G)), O = Math.max(1, Math.floor(n * G)), U = X + O, ee = Math.max(8, Math.floor((C + O) / U)), be = Math.floor(j.length / ee);
|
|
8487
8503
|
for (let Me = 0; Me < ee; Me++) {
|
|
8488
|
-
const at = Math.min(j.length - 1, Me * be),
|
|
8489
|
-
|
|
8504
|
+
const at = Math.min(j.length - 1, Me * be), De = j[at] / 128 - 1, Pe = Math.abs(De), ct = Math.pow(Pe, 0.6), At = Math.max(x * 0.06, ct * (x * 0.9)), ni = Me * U, oi = (x - At) / 2, si = 140 - Math.min(140, 140 * Pe), ai = 85, ci = 48 + Math.floor(12 * (1 - Pe));
|
|
8505
|
+
_.fillStyle = `${d}`, _.shadowColor = `hsla(${si}, ${ai}%, ${ci}%, ${0.25 * Pe})`, _.shadowBlur = 8 * Pe;
|
|
8490
8506
|
const Ut = Math.min(X / 2, At / 2);
|
|
8491
|
-
g2(
|
|
8507
|
+
g2(_, ni, oi, X, At, Ut), _.fill();
|
|
8492
8508
|
}
|
|
8493
8509
|
};
|
|
8494
8510
|
z();
|
|
@@ -8557,7 +8573,7 @@ const p2 = ({
|
|
|
8557
8573
|
) })
|
|
8558
8574
|
] });
|
|
8559
8575
|
function y2() {
|
|
8560
|
-
const [e, t] =
|
|
8576
|
+
const [e, t] = N(!0), i = lr(
|
|
8561
8577
|
() => [0, 1, 2].map((r) => ({ id: r })),
|
|
8562
8578
|
[]
|
|
8563
8579
|
);
|
|
@@ -8833,10 +8849,10 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8833
8849
|
className: s = "",
|
|
8834
8850
|
videoFeedRef: a
|
|
8835
8851
|
}) => {
|
|
8836
|
-
var
|
|
8837
|
-
const l = os(), { baseUrl: d, authToken: u } = Aa(), { timers: h, stt: w, proctoring: f } = gr(), g =
|
|
8852
|
+
var Qi, Tr;
|
|
8853
|
+
const l = os(), { baseUrl: d, authToken: u } = Aa(), { timers: h, stt: w, proctoring: f } = gr(), g = P(null), [y, b] = N(null), [p, v] = N(""), [k, E] = N(null), [A, _] = N(
|
|
8838
8854
|
Hr
|
|
8839
|
-
), [G,
|
|
8855
|
+
), [G, C] = N(!0), x = P(""), M = P(null), j = {
|
|
8840
8856
|
thinkingTime: (h == null ? void 0 : h.thinkingDuration) || 0,
|
|
8841
8857
|
// TODO: Use this to use the estimated answer duration from response
|
|
8842
8858
|
// answeringTime:
|
|
@@ -8847,12 +8863,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8847
8863
|
editingTime: G ? (h == null ? void 0 : h.editingDuration) || 30 : 0
|
|
8848
8864
|
}, { thinkingTime: z, answeringTime: X, editingTime: O } = j;
|
|
8849
8865
|
B(() => {
|
|
8850
|
-
|
|
8866
|
+
x.current = p;
|
|
8851
8867
|
}, [p]);
|
|
8852
|
-
const [U, ee] =
|
|
8868
|
+
const [U, ee] = N(!1), be = P(!1), {
|
|
8853
8869
|
speak: Me,
|
|
8854
8870
|
stop: at,
|
|
8855
|
-
error:
|
|
8871
|
+
error: De
|
|
8856
8872
|
} = Bh({
|
|
8857
8873
|
onEnd: () => {
|
|
8858
8874
|
be.current = !1, ae();
|
|
@@ -8860,7 +8876,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8860
8876
|
onError: () => {
|
|
8861
8877
|
be.current || (be.current = !0, ae());
|
|
8862
8878
|
}
|
|
8863
|
-
}),
|
|
8879
|
+
}), Pe = P(!1), ct = P(!1), {
|
|
8864
8880
|
startRecording: At,
|
|
8865
8881
|
stopRecording: ni,
|
|
8866
8882
|
transcribe: oi,
|
|
@@ -8875,22 +8891,22 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8875
8891
|
model: w == null ? void 0 : w.model,
|
|
8876
8892
|
language: w == null ? void 0 : w.language,
|
|
8877
8893
|
authToken: u,
|
|
8878
|
-
qnaId: ((
|
|
8894
|
+
qnaId: ((Qi = M.current) == null ? void 0 : Qi.qna_id) || "",
|
|
8879
8895
|
interviewId: r
|
|
8880
8896
|
},
|
|
8881
8897
|
onStart: () => {
|
|
8882
|
-
|
|
8898
|
+
Pe.current = !1, ct.current = !1;
|
|
8883
8899
|
},
|
|
8884
8900
|
onStop: () => {
|
|
8885
8901
|
},
|
|
8886
8902
|
onTranscriptionComplete: (V) => {
|
|
8887
8903
|
const W = V.transcript;
|
|
8888
|
-
v(W),
|
|
8904
|
+
v(W), x.current = W, ct.current || (ct.current = !0, ae());
|
|
8889
8905
|
},
|
|
8890
8906
|
onError: (V) => {
|
|
8891
|
-
console.error("STT Error:", V),
|
|
8907
|
+
console.error("STT Error:", V), Pe.current || (Pe.current = !0, ae());
|
|
8892
8908
|
}
|
|
8893
|
-
}), { state:
|
|
8909
|
+
}), { state: Fe, startQuestion: Tt, nextPhase: ae, completeInterview: zi, timerService: li } = Ph({
|
|
8894
8910
|
config: {
|
|
8895
8911
|
// thinkingDuration: thinkingTime,
|
|
8896
8912
|
answeringDuration: X,
|
|
@@ -8909,10 +8925,10 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8909
8925
|
Ar();
|
|
8910
8926
|
break;
|
|
8911
8927
|
case $.TRANSCRIBING:
|
|
8912
|
-
|
|
8928
|
+
Hi();
|
|
8913
8929
|
break;
|
|
8914
8930
|
case $.SUBMITTING:
|
|
8915
|
-
|
|
8931
|
+
Wi();
|
|
8916
8932
|
break;
|
|
8917
8933
|
}
|
|
8918
8934
|
},
|
|
@@ -8927,7 +8943,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8927
8943
|
(async () => {
|
|
8928
8944
|
try {
|
|
8929
8945
|
const W = await l.getInterviewConfig(r);
|
|
8930
|
-
if (W != null && W.data && (W.data.duration_in_minutes &&
|
|
8946
|
+
if (W != null && W.data && (W.data.duration_in_minutes && _(W.data.duration_in_minutes), typeof W.data.allow_answer_editing == "boolean" && C(W.data.allow_answer_editing), typeof W.data.elapsed_time_in_minutes == "number")) {
|
|
8931
8947
|
const Ye = Math.floor(
|
|
8932
8948
|
W.data.elapsed_time_in_minutes * 60
|
|
8933
8949
|
);
|
|
@@ -8946,20 +8962,20 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8946
8962
|
// qnaId: currentQuestionRef.current?.qna_id || "",
|
|
8947
8963
|
// answer: answerTextRef.current,
|
|
8948
8964
|
});
|
|
8949
|
-
return
|
|
8965
|
+
return M.current = V.data, V;
|
|
8950
8966
|
},
|
|
8951
8967
|
{
|
|
8952
8968
|
onSuccess: async (V) => {
|
|
8953
|
-
V && V.data && (v(""),
|
|
8969
|
+
V && V.data && (v(""), x.current = "", b(V.data), ae());
|
|
8954
8970
|
},
|
|
8955
8971
|
onError: (V) => {
|
|
8956
8972
|
console.error("Failed to fetch questions:", V);
|
|
8957
8973
|
}
|
|
8958
8974
|
}
|
|
8959
|
-
),
|
|
8975
|
+
), Wi = D(async () => {
|
|
8960
8976
|
var V;
|
|
8961
8977
|
try {
|
|
8962
|
-
const W =
|
|
8978
|
+
const W = x.current, Ye = ((V = M.current) == null ? void 0 : V.qna_id) || "";
|
|
8963
8979
|
G && await l.submitAnswer({
|
|
8964
8980
|
interviewId: r,
|
|
8965
8981
|
qnaId: Ye,
|
|
@@ -8972,22 +8988,22 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8972
8988
|
console.error("Failed to submit answer:", W);
|
|
8973
8989
|
}
|
|
8974
8990
|
Tt();
|
|
8975
|
-
}, [l, r, Tt, G]), xn =
|
|
8991
|
+
}, [l, r, Tt, G]), xn = D(async () => {
|
|
8976
8992
|
var V, W;
|
|
8977
|
-
if ((V =
|
|
8978
|
-
if (
|
|
8993
|
+
if ((V = M.current) != null && V.question)
|
|
8994
|
+
if (M.current.question_audio_data_base64)
|
|
8979
8995
|
try {
|
|
8980
8996
|
be.current = !1, await Me(
|
|
8981
|
-
|
|
8982
|
-
),
|
|
8997
|
+
M.current.question_audio_data_base64
|
|
8998
|
+
), M.current.is_interview_done && (at(), si(), a && "current" in a && ((W = a.current) == null || W.stopCamera()), zi());
|
|
8983
8999
|
} catch (Ye) {
|
|
8984
9000
|
console.error("Failed to speak question:", Ye);
|
|
8985
9001
|
}
|
|
8986
9002
|
else
|
|
8987
|
-
console.warn("No audio data available for question"), await
|
|
9003
|
+
console.warn("No audio data available for question"), await au(2e3), ae();
|
|
8988
9004
|
else
|
|
8989
9005
|
ae();
|
|
8990
|
-
}, [Me, ae,
|
|
9006
|
+
}, [Me, ae, zi]), Ar = D(async () => {
|
|
8991
9007
|
try {
|
|
8992
9008
|
await At(X);
|
|
8993
9009
|
} catch (V) {
|
|
@@ -8999,7 +9015,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8999
9015
|
}
|
|
9000
9016
|
console.error("Failed to start recording:", V), ae();
|
|
9001
9017
|
}
|
|
9002
|
-
}, [At, ae, X]),
|
|
9018
|
+
}, [At, ae, X]), Hi = D(async () => {
|
|
9003
9019
|
if (U) {
|
|
9004
9020
|
console.warn(
|
|
9005
9021
|
"Audio processing already in progress, ignoring duplicate call"
|
|
@@ -9011,7 +9027,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9011
9027
|
const V = !ai && Ut ? Ut : await ni();
|
|
9012
9028
|
await oi(V);
|
|
9013
9029
|
} catch (V) {
|
|
9014
|
-
console.error("STT processing failed:", V), !
|
|
9030
|
+
console.error("STT processing failed:", V), !Pe.current && !ct.current && (Pe.current = !0, ae());
|
|
9015
9031
|
} finally {
|
|
9016
9032
|
ee(!1);
|
|
9017
9033
|
}
|
|
@@ -9024,9 +9040,9 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9024
9040
|
ae,
|
|
9025
9041
|
r,
|
|
9026
9042
|
li
|
|
9027
|
-
]),
|
|
9043
|
+
]), qi = D(() => {
|
|
9028
9044
|
U || ae();
|
|
9029
|
-
}, [U, ae]),
|
|
9045
|
+
}, [U, ae]), Ki = D(
|
|
9030
9046
|
async (V) => {
|
|
9031
9047
|
var W, Ye;
|
|
9032
9048
|
at(), si(), a && "current" in a && ((W = a.current) == null || W.stopCamera()), await ((Ye = g.current) == null ? void 0 : Ye.exitFullScreenIntentionally());
|
|
@@ -9035,12 +9051,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9035
9051
|
} catch (Nr) {
|
|
9036
9052
|
console.error("API call failed:", Nr);
|
|
9037
9053
|
} finally {
|
|
9038
|
-
V == null || V(),
|
|
9054
|
+
V == null || V(), zi(), sessionStorage.removeItem(no);
|
|
9039
9055
|
}
|
|
9040
9056
|
},
|
|
9041
9057
|
[r, at, l]
|
|
9042
|
-
),
|
|
9043
|
-
const { phase: V } =
|
|
9058
|
+
), Yi = () => {
|
|
9059
|
+
const { phase: V } = Fe;
|
|
9044
9060
|
switch (V) {
|
|
9045
9061
|
case $.IDLE:
|
|
9046
9062
|
return /* @__PURE__ */ m("div", { className: "iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full", children: [
|
|
@@ -9062,12 +9078,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9062
9078
|
)
|
|
9063
9079
|
] }) : /* @__PURE__ */ c(y2, {});
|
|
9064
9080
|
case $.READING_QUESTION:
|
|
9065
|
-
return /* @__PURE__ */ c(v2, { ttsError:
|
|
9081
|
+
return /* @__PURE__ */ c(v2, { ttsError: De });
|
|
9066
9082
|
case $.THINKING:
|
|
9067
9083
|
return /* @__PURE__ */ c(
|
|
9068
9084
|
x2,
|
|
9069
9085
|
{
|
|
9070
|
-
state:
|
|
9086
|
+
state: Fe,
|
|
9071
9087
|
thinkingTime: z,
|
|
9072
9088
|
nextPhase: ae
|
|
9073
9089
|
}
|
|
@@ -9076,9 +9092,9 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9076
9092
|
return /* @__PURE__ */ c(
|
|
9077
9093
|
p2,
|
|
9078
9094
|
{
|
|
9079
|
-
state:
|
|
9095
|
+
state: Fe,
|
|
9080
9096
|
answeringTime: X,
|
|
9081
|
-
nextPhase:
|
|
9097
|
+
nextPhase: qi,
|
|
9082
9098
|
sttError: ci,
|
|
9083
9099
|
disableStopButton: U
|
|
9084
9100
|
}
|
|
@@ -9099,18 +9115,18 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9099
9115
|
default:
|
|
9100
9116
|
return null;
|
|
9101
9117
|
}
|
|
9102
|
-
},
|
|
9118
|
+
}, Xi = /* @__PURE__ */ m(bt, { children: [
|
|
9103
9119
|
/* @__PURE__ */ c(
|
|
9104
9120
|
f2,
|
|
9105
9121
|
{
|
|
9106
9122
|
title: e,
|
|
9107
9123
|
brandName: t,
|
|
9108
9124
|
brandLogo: i,
|
|
9109
|
-
totalDuration:
|
|
9110
|
-
elapsedTime:
|
|
9125
|
+
totalDuration: A,
|
|
9126
|
+
elapsedTime: Fe.totalTimeElapsed,
|
|
9111
9127
|
onExit: () => {
|
|
9112
9128
|
var V;
|
|
9113
|
-
return (V = g.current) == null ? void 0 : V.exitFullScreenIntentionally().then(() =>
|
|
9129
|
+
return (V = g.current) == null ? void 0 : V.exitFullScreenIntentionally().then(() => Ki());
|
|
9114
9130
|
}
|
|
9115
9131
|
}
|
|
9116
9132
|
),
|
|
@@ -9120,22 +9136,22 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9120
9136
|
brandName: t,
|
|
9121
9137
|
brandLogo: i,
|
|
9122
9138
|
currentQuestion: y,
|
|
9123
|
-
state:
|
|
9124
|
-
phase:
|
|
9139
|
+
state: Fe,
|
|
9140
|
+
phase: Fe.phase,
|
|
9125
9141
|
className: s,
|
|
9126
9142
|
interviewId: r,
|
|
9127
|
-
interview_duration:
|
|
9143
|
+
interview_duration: A,
|
|
9128
9144
|
videoFeedRef: a,
|
|
9129
|
-
lastSubmittedAnswer:
|
|
9130
|
-
onNextPhase:
|
|
9145
|
+
lastSubmittedAnswer: k,
|
|
9146
|
+
onNextPhase: Fe.phase === $.ANSWERING ? qi : ae,
|
|
9131
9147
|
answerText: p,
|
|
9132
9148
|
onAnswerChange: (V) => {
|
|
9133
9149
|
const W = V.target.value;
|
|
9134
|
-
v(W),
|
|
9150
|
+
v(W), x.current = W;
|
|
9135
9151
|
},
|
|
9136
9152
|
editingTime: O,
|
|
9137
|
-
disableSubmitButton:
|
|
9138
|
-
children:
|
|
9153
|
+
disableSubmitButton: Fe.phase === $.ANSWERING && U,
|
|
9154
|
+
children: Yi()
|
|
9139
9155
|
}
|
|
9140
9156
|
)
|
|
9141
9157
|
] });
|
|
@@ -9143,12 +9159,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9143
9159
|
d2,
|
|
9144
9160
|
{
|
|
9145
9161
|
ref: g,
|
|
9146
|
-
onDisqualify: () =>
|
|
9147
|
-
onExit: () =>
|
|
9148
|
-
isCompleted: ((Tr =
|
|
9149
|
-
children:
|
|
9162
|
+
onDisqualify: () => Ki(o),
|
|
9163
|
+
onExit: () => Ki(),
|
|
9164
|
+
isCompleted: ((Tr = M == null ? void 0 : M.current) == null ? void 0 : Tr.is_interview_done) ?? !1,
|
|
9165
|
+
children: Xi
|
|
9150
9166
|
}
|
|
9151
|
-
) :
|
|
9167
|
+
) : Xi });
|
|
9152
9168
|
}, k2 = ({
|
|
9153
9169
|
title: e,
|
|
9154
9170
|
brandName: t,
|
|
@@ -9158,7 +9174,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9158
9174
|
onInterviewDisqualify: o,
|
|
9159
9175
|
className: s = ""
|
|
9160
9176
|
}) => {
|
|
9161
|
-
const [a, l] =
|
|
9177
|
+
const [a, l] = N(!1), [d, u] = N(!0), [h, w] = N(!1), { proctoring: f } = gr(), g = P(null), y = P(null), b = (f == null ? void 0 : f.gazeAnalysisEnabled) === !0, p = () => {
|
|
9162
9178
|
l(!0), u(!1);
|
|
9163
9179
|
};
|
|
9164
9180
|
return B(() => {
|
|
@@ -9208,10 +9224,10 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9208
9224
|
};
|
|
9209
9225
|
typeof window < "u" && (window.InterviewWidget = {
|
|
9210
9226
|
InterviewWidget: k2,
|
|
9211
|
-
InterviewWidgetProvider:
|
|
9227
|
+
InterviewWidgetProvider: ru
|
|
9212
9228
|
});
|
|
9213
9229
|
export {
|
|
9214
9230
|
k2 as InterviewWidget,
|
|
9215
|
-
|
|
9231
|
+
ru as InterviewWidgetProvider,
|
|
9216
9232
|
k2 as default
|
|
9217
9233
|
};
|