interview-widget 3.2.2 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.es.js CHANGED
@@ -2,7 +2,7 @@ var Bl = Object.defineProperty;
2
2
  var Ul = (e, t, i) => t in e ? Bl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
3
  var Ne = (e, t, i) => Ul(e, typeof t != "symbol" ? t + "" : t, i);
4
4
  import { jsx as c, jsxs as m, Fragment as yt } from "react/jsx-runtime";
5
- import Hn, { createContext as qn, useContext as Ni, useSyncExternalStore as Kn, useRef as M, useCallback as R, useMemo as er, useState as E, useEffect as D, forwardRef as wa, useImperativeHandle as ma } from "react";
5
+ import Hn, { createContext as qn, useContext as Ni, useSyncExternalStore as Kn, useRef as M, useCallback as L, useMemo as er, useState as _, useEffect as D, forwardRef as wa, useImperativeHandle as ma } from "react";
6
6
  import { createPortal as ga } from "react-dom";
7
7
  const wn = {}, ct = {
8
8
  api: {
@@ -45,7 +45,7 @@ function Vl() {
45
45
  }
46
46
  const pa = Vl(), Pr = 30, Gl = {
47
47
  SCREENSHOT: "screenshot"
48
- }, Xn = "AES-GCM", Tn = 12;
48
+ }, Xn = "AES-GCM", An = 12;
49
49
  async function ya(e) {
50
50
  const i = new TextEncoder().encode(e), r = await crypto.subtle.digest("SHA-256", i);
51
51
  return crypto.subtle.importKey("raw", r, Xn, !1, [
@@ -54,7 +54,7 @@ async function ya(e) {
54
54
  ]);
55
55
  }
56
56
  function jl() {
57
- return crypto.getRandomValues(new Uint8Array(Tn));
57
+ return crypto.getRandomValues(new Uint8Array(An));
58
58
  }
59
59
  async function zl(e, t = "default-seed") {
60
60
  try {
@@ -73,7 +73,7 @@ async function $l(e, t = "default-seed") {
73
73
  const i = atob(e), r = new Uint8Array(i.length);
74
74
  for (let u = 0; u < i.length; u++)
75
75
  r[u] = i.charCodeAt(u);
76
- const n = r.slice(0, Tn), o = r.slice(Tn), s = await ya(t), a = await crypto.subtle.decrypt(
76
+ const n = r.slice(0, An), o = r.slice(An), s = await ya(t), a = await crypto.subtle.decrypt(
77
77
  { name: Xn, iv: n },
78
78
  s,
79
79
  o
@@ -168,11 +168,11 @@ const sr = qn(null), ql = async () => {
168
168
  t.current = f, r();
169
169
  });
170
170
  }, []);
171
- const r = R(() => {
171
+ const r = L(() => {
172
172
  i.current.forEach((f) => f());
173
- }, []), n = R((f) => (i.current.add(f), () => {
173
+ }, []), n = L((f) => (i.current.add(f), () => {
174
174
  i.current.delete(f);
175
- }), []), o = R(() => t.current, []), s = R(
175
+ }), []), o = L(() => t.current, []), s = L(
176
176
  (f) => {
177
177
  t.current = {
178
178
  ...t.current,
@@ -181,7 +181,7 @@ const sr = qn(null), ql = async () => {
181
181
  }, Hi(t.current), r();
182
182
  },
183
183
  [r]
184
- ), a = R(
184
+ ), a = L(
185
185
  (f) => {
186
186
  const w = { ...t.current.gazeViolationCounters };
187
187
  f === "looking_away" && (w.lookingAwayCount += 1), f === "no_face_detected" && (w.noFaceDetectedCount += 1), f === "multiple_faces" && (w.multipleFacesCount += 1), w.totalGazeViolations = w.lookingAwayCount + w.noFaceDetectedCount + w.multipleFacesCount, t.current = {
@@ -190,13 +190,13 @@ const sr = qn(null), ql = async () => {
190
190
  }, Hi(t.current), r();
191
191
  },
192
192
  [r]
193
- ), l = R(() => {
193
+ ), l = L(() => {
194
194
  t.current = {
195
195
  ...t.current,
196
196
  logViolations: [],
197
197
  totalViolations: 0
198
198
  }, Hi(t.current), r();
199
- }, [r]), u = R(() => {
199
+ }, [r]), u = L(() => {
200
200
  t.current = {
201
201
  ...t.current,
202
202
  gazeViolationCounters: {
@@ -206,7 +206,7 @@ const sr = qn(null), ql = async () => {
206
206
  totalGazeViolations: 0
207
207
  }
208
208
  }, Hi(t.current), r();
209
- }, [r]), d = R(
209
+ }, [r]), d = L(
210
210
  (f, w) => {
211
211
  t.current = {
212
212
  ...t.current,
@@ -343,7 +343,7 @@ function Or() {
343
343
  function xa() {
344
344
  return Or().api || ct.api;
345
345
  }
346
- function Ci() {
346
+ function Si() {
347
347
  return Or().ui || ct.ui;
348
348
  }
349
349
  function Qn() {
@@ -405,7 +405,7 @@ const sd = (e) => {
405
405
  className: i = "",
406
406
  showFallbackStyles: r = !0
407
407
  }) => {
408
- const { baseColor: n } = Ci();
408
+ const { baseColor: n } = Si();
409
409
  return e ? /* @__PURE__ */ c("div", { className: i, children: e }) : /* @__PURE__ */ c(
410
410
  "div",
411
411
  {
@@ -415,25 +415,25 @@ const sd = (e) => {
415
415
  }
416
416
  );
417
417
  }, ad = (e) => {
418
- const t = M(null), i = M(null), [r, n] = E(!1), [o, s] = E(!1), [a, l] = E(null), [u, d] = E([]), [h, f] = E([]), [w, g] = E(""), [y, p] = E(""), [b, v] = E(!1), L = R(() => {
418
+ const t = M(null), i = M(null), [r, n] = _(!1), [o, s] = _(!1), [a, l] = _(null), [u, d] = _([]), [h, f] = _([]), [w, g] = _(""), [y, p] = _(""), [b, v] = _(!1), F = L(() => {
419
419
  i.current && (i.current.getTracks().forEach((I) => I.stop()), i.current = null, l(null));
420
- }, []), S = R(async () => {
421
- var I, P, X, xe;
420
+ }, []), S = L(async () => {
421
+ var I, P, H, xe;
422
422
  try {
423
- const Q = await navigator.mediaDevices.enumerateDevices(), K = Q.filter((V) => V.kind === "audioinput"), ie = Q.filter((V) => V.kind === "videoinput");
424
- if (d(K), f(ie), !w && K.length > 0) {
423
+ const Q = await navigator.mediaDevices.enumerateDevices(), Y = Q.filter((V) => V.kind === "audioinput"), ie = Q.filter((V) => V.kind === "videoinput");
424
+ if (d(Y), f(ie), !w && Y.length > 0) {
425
425
  const V = (I = i.current) == null ? void 0 : I.getAudioTracks()[0], J = V == null ? void 0 : V.getSettings().deviceId;
426
- g(J || ((P = K[0]) == null ? void 0 : P.deviceId) || "");
426
+ g(J || ((P = Y[0]) == null ? void 0 : P.deviceId) || "");
427
427
  }
428
428
  if (!y && ie.length > 0) {
429
- const V = (X = i.current) == null ? void 0 : X.getVideoTracks()[0], J = V == null ? void 0 : V.getSettings().deviceId;
429
+ const V = (H = i.current) == null ? void 0 : H.getVideoTracks()[0], J = V == null ? void 0 : V.getSettings().deviceId;
430
430
  p(J || ((xe = ie[0]) == null ? void 0 : xe.deviceId) || "");
431
431
  }
432
432
  } catch (Q) {
433
433
  console.error("Error enumerating devices:", Q);
434
434
  }
435
- }, [w, y]), A = R(async (I, P) => {
436
- const X = {
435
+ }, [w, y]), E = L(async (I, P) => {
436
+ const H = {
437
437
  width: { ideal: 1280 },
438
438
  height: { ideal: 720 },
439
439
  ...P ? { deviceId: { exact: P } } : { facingMode: "user" }
@@ -448,11 +448,11 @@ const sd = (e) => {
448
448
  let Q = null;
449
449
  try {
450
450
  Q = await navigator.mediaDevices.getUserMedia({
451
- video: X,
451
+ video: H,
452
452
  audio: xe
453
453
  }), n(!0), s(!0);
454
- } catch (K) {
455
- console.warn("Combined media request failed, trying individual.", K);
454
+ } catch (Y) {
455
+ console.warn("Combined media request failed, trying individual.", Y);
456
456
  try {
457
457
  const ie = await navigator.mediaDevices.getUserMedia({ audio: xe });
458
458
  n(!0), Q = ie;
@@ -460,24 +460,24 @@ const sd = (e) => {
460
460
  console.error("Audio permission denied", ie), n(!1);
461
461
  }
462
462
  try {
463
- const ie = await navigator.mediaDevices.getUserMedia({ video: X });
463
+ const ie = await navigator.mediaDevices.getUserMedia({ video: H });
464
464
  s(!0), Q ? ie.getTracks().forEach((V) => Q.addTrack(V)) : Q = ie;
465
465
  } catch (ie) {
466
466
  console.error("Video permission denied", ie), s(!1);
467
467
  }
468
468
  }
469
- Q ? (i.current = Q, l(Q), t.current && (t.current.srcObject = Q, await t.current.play().catch((K) => console.error("Error playing video element", K)))) : (i.current = null, l(null)), await S();
470
- }, [S]), T = async (I) => {
471
- I !== w && (v(!0), g(I), L(), await A(I, y), v(!1));
469
+ Q ? (i.current = Q, l(Q), t.current && (t.current.srcObject = Q, await t.current.play().catch((Y) => console.error("Error playing video element", Y)))) : (i.current = null, l(null)), await S();
470
+ }, [S]), A = async (I) => {
471
+ I !== w && (v(!0), g(I), F(), await E(I, y), v(!1));
472
472
  }, O = async (I) => {
473
- I !== y && (v(!0), p(I), L(), await A(w, I), v(!1));
473
+ I !== y && (v(!0), p(I), F(), await E(w, I), v(!1));
474
474
  };
475
475
  return D(() => {
476
476
  if (!e) {
477
- L();
477
+ F();
478
478
  return;
479
479
  }
480
- return A(), () => L();
480
+ return E(), () => F();
481
481
  }, [e]), {
482
482
  videoRef: t,
483
483
  audioAllowed: r,
@@ -488,9 +488,9 @@ const sd = (e) => {
488
488
  selectedVideoDeviceId: y,
489
489
  isDeviceLoading: b,
490
490
  currentStream: a,
491
- handleAudioChange: T,
491
+ handleAudioChange: A,
492
492
  handleVideoChange: O,
493
- stopStream: L
493
+ stopStream: F
494
494
  };
495
495
  }, Br = (e) => /* @__PURE__ */ m(
496
496
  "svg",
@@ -737,7 +737,7 @@ const sd = (e) => {
737
737
  /* @__PURE__ */ c("path", { d: "M8.16651 8.63991V5.35747C8.16651 3.52277 8.16651 2.60542 7.62675 2.37712C7.08699 2.14882 6.45168 2.79749 5.18119 4.09482C4.52323 4.76666 4.14784 4.91543 3.2117 4.91543C2.39301 4.91543 1.98366 4.91543 1.68961 5.11606C1.07921 5.53252 1.17148 6.34653 1.17148 6.9987C1.17148 7.65086 1.07921 8.46485 1.68961 8.88135C1.98366 9.08196 2.39301 9.08196 3.2117 9.08196C4.14784 9.08196 4.52323 9.23076 5.18119 9.90259C6.45168 11.1999 7.08699 11.8486 7.62675 11.6203C8.16651 11.392 8.16651 10.4746 8.16651 8.63991Z", stroke: "currentColor", strokeWidth: "0.875", strokeLinecap: "round", strokeLinejoin: "round" }),
738
738
  /* @__PURE__ */ c("path", { d: "M9.9165 5.25C10.2813 5.72815 10.4998 6.33698 10.4998 7C10.4998 7.66302 10.2813 8.27184 9.9165 8.75", stroke: "currentColor", strokeWidth: "0.875", strokeLinecap: "round", strokeLinejoin: "round" }),
739
739
  /* @__PURE__ */ c("path", { d: "M11.6665 4.08203C12.3961 4.87894 12.8332 5.89369 12.8332 6.9987C12.8332 8.10371 12.3961 9.11847 11.6665 9.91536", stroke: "currentColor", strokeWidth: "0.875", strokeLinecap: "round", strokeLinejoin: "round" })
740
- ] }), Le = {
740
+ ] }), Fe = {
741
741
  FACE_DETECTED: "face_detected",
742
742
  NO_FACE: "no_face_detected",
743
743
  MULTIPLE_FACES: "multiple_faces",
@@ -745,7 +745,7 @@ const sd = (e) => {
745
745
  CAMERA_ERROR: "camera_error",
746
746
  MODEL_LOADING: "model_loading"
747
747
  }, ka = {
748
- [Le.FACE_DETECTED]: {
748
+ [Fe.FACE_DETECTED]: {
749
749
  icon: ud,
750
750
  iconColor: "iw-text-green-600",
751
751
  iconBg: "iw-bg-green-50",
@@ -755,7 +755,7 @@ const sd = (e) => {
755
755
  description: "Your gaze is properly focused on the screen. Continue with your interview.",
756
756
  buttonText: "Continue"
757
757
  },
758
- [Le.NO_FACE]: {
758
+ [Fe.NO_FACE]: {
759
759
  icon: ld,
760
760
  iconColor: "iw-text-orange-600",
761
761
  iconBg: "iw-bg-orange-50",
@@ -765,7 +765,7 @@ const sd = (e) => {
765
765
  description: "Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",
766
766
  buttonText: "I Understood"
767
767
  },
768
- [Le.MULTIPLE_FACES]: {
768
+ [Fe.MULTIPLE_FACES]: {
769
769
  icon: wd,
770
770
  iconColor: "iw-text-red-600",
771
771
  iconBg: "iw-bg-red-50",
@@ -776,7 +776,7 @@ const sd = (e) => {
776
776
  // "For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",
777
777
  buttonText: "I Understood"
778
778
  },
779
- [Le.LOOKING_AWAY]: {
779
+ [Fe.LOOKING_AWAY]: {
780
780
  icon: rs,
781
781
  iconColor: "iw-text-amber-600",
782
782
  iconBg: "iw-bg-amber-50",
@@ -785,7 +785,7 @@ const sd = (e) => {
785
785
  subtitle: "You looked away from the screen. Maintain focus to continue.",
786
786
  buttonText: "I Understood"
787
787
  },
788
- [Le.CAMERA_ERROR]: {
788
+ [Fe.CAMERA_ERROR]: {
789
789
  icon: Br,
790
790
  iconColor: "iw-text-red-600",
791
791
  iconBg: "iw-bg-red-50",
@@ -795,7 +795,7 @@ const sd = (e) => {
795
795
  description: "Please check your camera connection and permissions, contact support if the problem continues.",
796
796
  buttonText: "I Understood"
797
797
  },
798
- [Le.MODEL_LOADING]: {
798
+ [Fe.MODEL_LOADING]: {
799
799
  icon: rs,
800
800
  iconColor: "iw-text-blue-600",
801
801
  iconBg: "iw-bg-blue-50",
@@ -865,7 +865,7 @@ function pd(e) {
865
865
  originalError: e
866
866
  };
867
867
  }
868
- async function Lt(e, t = {}, i = {
868
+ async function Ft(e, t = {}, i = {
869
869
  attempts: 3,
870
870
  backoff: "exponential",
871
871
  baseDelay: 1e3,
@@ -901,19 +901,19 @@ function yd(e, t) {
901
901
  let i;
902
902
  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);
903
903
  }
904
- const Ct = {
904
+ const St = {
905
905
  v2: "/v2"
906
- }, Ft = {
907
- GENERATE_QUESTION: (e) => `${Ct.v2}/interviews/${e}/next-question`,
908
- SCREENSHOT_UPLOAD: (e) => `${Ct.v2}/interviews/${e}/assets/upload-url`,
909
- CONFIRM_UPLOAD: (e) => `${Ct.v2}/interviews/assets/${e}/confirm`,
910
- TRANSCRIBE_ANSWER: (e) => `${Ct.v2}/interviews/${e}/transcribe-answer`,
911
- SUBMIT_ANSWER: (e) => `${Ct.v2}/interviews/${e}/submit-answer`,
912
- EXIT: (e) => `${Ct.v2}/interviews/${e}/exit`,
913
- CONFIG: (e) => `${Ct.v2}/interviews/${e}/config`,
914
- TRANSCRIPTION: (e) => `${Ct.v2}/interviews/${e}/transcript`
906
+ }, Rt = {
907
+ GENERATE_QUESTION: (e) => `${St.v2}/interviews/${e}/next-question`,
908
+ SCREENSHOT_UPLOAD: (e) => `${St.v2}/interviews/${e}/assets/upload-url`,
909
+ CONFIRM_UPLOAD: (e) => `${St.v2}/interviews/assets/${e}/confirm`,
910
+ TRANSCRIBE_ANSWER: (e) => `${St.v2}/interviews/${e}/transcribe-answer`,
911
+ SUBMIT_ANSWER: (e) => `${St.v2}/interviews/${e}/submit-answer`,
912
+ EXIT: (e) => `${St.v2}/interviews/${e}/exit`,
913
+ CONFIG: (e) => `${St.v2}/interviews/${e}/config`,
914
+ TRANSCRIPTION: (e) => `${St.v2}/interviews/${e}/transcript`
915
915
  };
916
- class Aa {
916
+ class Ta {
917
917
  constructor(t = {}) {
918
918
  Ne(this, "config");
919
919
  this.config = t;
@@ -948,8 +948,8 @@ class Aa {
948
948
  interviewId: t,
949
949
  isInterviewDone: i = !1
950
950
  }) {
951
- const r = await Lt(
952
- `${this.getBaseUrl()}${Ft.GENERATE_QUESTION(t)}`,
951
+ const r = await Ft(
952
+ `${this.getBaseUrl()}${Rt.GENERATE_QUESTION(t)}`,
953
953
  {
954
954
  method: "POST",
955
955
  headers: this.getHeaders(),
@@ -971,8 +971,8 @@ class Aa {
971
971
  qnaId: i,
972
972
  answer: r
973
973
  }) {
974
- const n = await Lt(
975
- `${this.getBaseUrl()}${Ft.SUBMIT_ANSWER(t)}`,
974
+ const n = await Ft(
975
+ `${this.getBaseUrl()}${Rt.SUBMIT_ANSWER(t)}`,
976
976
  {
977
977
  method: "POST",
978
978
  headers: this.getHeaders(),
@@ -990,8 +990,8 @@ class Aa {
990
990
  * Exit interview
991
991
  */
992
992
  async exitInterview(t) {
993
- const i = await Lt(
994
- `${this.getBaseUrl()}${Ft.EXIT(t)}`,
993
+ const i = await Ft(
994
+ `${this.getBaseUrl()}${Rt.EXIT(t)}`,
995
995
  {
996
996
  method: "POST",
997
997
  headers: this.getHeaders()
@@ -1004,8 +1004,8 @@ class Aa {
1004
1004
  * Get interview config
1005
1005
  */
1006
1006
  async getInterviewConfig(t) {
1007
- const i = await Lt(
1008
- `${this.getBaseUrl()}${Ft.CONFIG(t)}`,
1007
+ const i = await Ft(
1008
+ `${this.getBaseUrl()}${Rt.CONFIG(t)}`,
1009
1009
  {
1010
1010
  method: "GET",
1011
1011
  headers: this.getHeaders()
@@ -1019,8 +1019,8 @@ class Aa {
1019
1019
  * Request a signed URL for uploading a screenshot
1020
1020
  */
1021
1021
  async requestScreenshotUploadUrl(t, i = `screenshot-${Date.now()}.jpeg`) {
1022
- const r = await Lt(
1023
- `${this.getBaseUrl()}${Ft.SCREENSHOT_UPLOAD(t)}`,
1022
+ const r = await Ft(
1023
+ `${this.getBaseUrl()}${Rt.SCREENSHOT_UPLOAD(t)}`,
1024
1024
  {
1025
1025
  method: "POST",
1026
1026
  headers: this.getHeaders(),
@@ -1055,8 +1055,8 @@ class Aa {
1055
1055
  * Confirm screenshot upload
1056
1056
  */
1057
1057
  async confirmScreenshotUpload(t) {
1058
- const i = await Lt(
1059
- `${this.getBaseUrl()}${Ft.CONFIRM_UPLOAD(t)}`,
1058
+ const i = await Ft(
1059
+ `${this.getBaseUrl()}${Rt.CONFIRM_UPLOAD(t)}`,
1060
1060
  {
1061
1061
  method: "POST",
1062
1062
  headers: this.getHeaders()
@@ -1071,8 +1071,8 @@ class Aa {
1071
1071
  * Get interview transcription
1072
1072
  */
1073
1073
  async getInterviewTranscription(t) {
1074
- const i = await Lt(
1075
- `${this.getBaseUrl()}${Ft.TRANSCRIPTION(t)}`,
1074
+ const i = await Ft(
1075
+ `${this.getBaseUrl()}${Rt.TRANSCRIPTION(t)}`,
1076
1076
  {
1077
1077
  method: "GET",
1078
1078
  headers: {
@@ -1087,7 +1087,7 @@ class Aa {
1087
1087
  return await i.json();
1088
1088
  }
1089
1089
  }
1090
- const br = new Aa(), bd = ({
1090
+ const br = new Ta(), bd = ({
1091
1091
  gazeAnalysisEnabled: e,
1092
1092
  isModelLoaded: t,
1093
1093
  stats: i,
@@ -1291,7 +1291,7 @@ let vr, mn;
1291
1291
  const xd = typeof TextDecoder < "u";
1292
1292
  let Ed;
1293
1293
  const _d = typeof TextEncoder < "u";
1294
- function Ta(e) {
1294
+ function Aa(e) {
1295
1295
  if (_d) e = (Ed || (Ed = new TextEncoder())).encode(e);
1296
1296
  else {
1297
1297
  let i = 0;
@@ -1338,9 +1338,9 @@ function Vr(e) {
1338
1338
  }
1339
1339
  Nn = as && as.userAgentData || null, Vr[" "] = function() {
1340
1340
  };
1341
- const Ca = {};
1341
+ const Sa = {};
1342
1342
  let Yi = null;
1343
- function Ad(e) {
1343
+ function Td(e) {
1344
1344
  const t = e.length;
1345
1345
  let i = 3 * t / 4;
1346
1346
  i % 3 ? i = Math.floor(i) : "=.".indexOf(e[t - 1]) != -1 && (i = "=.".indexOf(e[t - 2]) != -1 ? i - 2 : i - 1);
@@ -1355,7 +1355,7 @@ function Ad(e) {
1355
1355
  }
1356
1356
  return u;
1357
1357
  }
1358
- Sa();
1358
+ Ca();
1359
1359
  let l = 0;
1360
1360
  for (; ; ) {
1361
1361
  const u = a(-1), d = a(0), h = a(64), f = a(64);
@@ -1366,13 +1366,13 @@ function Ad(e) {
1366
1366
  r[n++] = o;
1367
1367
  }), n !== i ? r.subarray(0, n) : r;
1368
1368
  }
1369
- function Sa() {
1369
+ function Ca() {
1370
1370
  if (!Yi) {
1371
1371
  Yi = {};
1372
1372
  var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), t = ["+/=", "+/", "-_=", "-_.", "-_"];
1373
1373
  for (let i = 0; i < 5; i++) {
1374
1374
  const r = e.concat(t[i].split(""));
1375
- Ca[i] = r;
1375
+ Sa[i] = r;
1376
1376
  for (let n = 0; n < r.length; n++) {
1377
1377
  const o = r[n];
1378
1378
  Yi[o] === void 0 && (Yi[o] = n);
@@ -1380,70 +1380,70 @@ function Sa() {
1380
1380
  }
1381
1381
  }
1382
1382
  }
1383
- var Td = typeof Uint8Array < "u", Ia = !(!(kd && Nn && Nn.brands.length > 0) && (ss().indexOf("Trident") != -1 || ss().indexOf("MSIE") != -1)) && typeof btoa == "function";
1383
+ var Ad = typeof Uint8Array < "u", Ia = !(!(kd && Nn && Nn.brands.length > 0) && (ss().indexOf("Trident") != -1 || ss().indexOf("MSIE") != -1)) && typeof btoa == "function";
1384
1384
  const cs = /[-_.]/g, Nd = { "-": "+", _: "/", ".": "=" };
1385
- function Cd(e) {
1385
+ function Sd(e) {
1386
1386
  return Nd[e] || "";
1387
1387
  }
1388
- function La(e) {
1389
- if (!Ia) return Ad(e);
1390
- e = cs.test(e) ? e.replace(cs, Cd) : e, e = atob(e);
1388
+ function Fa(e) {
1389
+ if (!Ia) return Td(e);
1390
+ e = cs.test(e) ? e.replace(cs, Sd) : e, e = atob(e);
1391
1391
  const t = new Uint8Array(e.length);
1392
1392
  for (let i = 0; i < e.length; i++) t[i] = e.charCodeAt(i);
1393
1393
  return t;
1394
1394
  }
1395
1395
  function io(e) {
1396
- return Td && e != null && e instanceof Uint8Array;
1396
+ return Ad && e != null && e instanceof Uint8Array;
1397
1397
  }
1398
1398
  var gi = {};
1399
1399
  function Xt() {
1400
- return Sd || (Sd = new dt(null, gi));
1400
+ return Cd || (Cd = new dt(null, gi));
1401
1401
  }
1402
1402
  function ro(e) {
1403
- Fa(gi);
1403
+ Ra(gi);
1404
1404
  var t = e.g;
1405
- return (t = t == null || io(t) ? t : typeof t == "string" ? La(t) : null) == null ? t : e.g = t;
1405
+ return (t = t == null || io(t) ? t : typeof t == "string" ? Fa(t) : null) == null ? t : e.g = t;
1406
1406
  }
1407
1407
  var dt = class {
1408
1408
  h() {
1409
1409
  return new Uint8Array(ro(this) || 0);
1410
1410
  }
1411
1411
  constructor(e, t) {
1412
- if (Fa(t), this.g = e, e != null && e.length === 0) throw Error("ByteString should be constructed with non-empty values");
1412
+ if (Ra(t), this.g = e, e != null && e.length === 0) throw Error("ByteString should be constructed with non-empty values");
1413
1413
  }
1414
1414
  };
1415
- let Sd, Id;
1416
- function Fa(e) {
1415
+ let Cd, Id;
1416
+ function Ra(e) {
1417
1417
  if (e !== gi) throw Error("illegal external caller");
1418
1418
  }
1419
- function Ra(e, t) {
1419
+ function La(e, t) {
1420
1420
  e.__closure__error__context__984382 || (e.__closure__error__context__984382 = {}), e.__closure__error__context__984382.severity = t;
1421
1421
  }
1422
- function Cn(e) {
1423
- return Ra(e = Error(e), "warning"), e;
1422
+ function Sn(e) {
1423
+ return La(e = Error(e), "warning"), e;
1424
1424
  }
1425
1425
  function pi(e, t) {
1426
1426
  if (e != null) {
1427
1427
  var i = Id ?? (Id = {}), r = i[e] || 0;
1428
- r >= t || (i[e] = r + 1, Ra(e = Error(), "incident"), Na(e));
1428
+ r >= t || (i[e] = r + 1, La(e = Error(), "incident"), Na(e));
1429
1429
  }
1430
1430
  }
1431
- function Si() {
1431
+ function Ci() {
1432
1432
  return typeof BigInt == "function";
1433
1433
  }
1434
1434
  var Ii = typeof Symbol == "function" && typeof Symbol() == "symbol";
1435
1435
  function ut(e, t, i = !1) {
1436
1436
  return typeof Symbol == "function" && typeof Symbol() == "symbol" ? i && Symbol.for && e ? Symbol.for(e) : e != null ? Symbol(e) : Symbol() : t;
1437
1437
  }
1438
- var Ld = ut("jas", void 0, !0), ls = ut(void 0, "0di"), qi = ut(void 0, "1oa"), Oe = ut(void 0, Symbol()), Fd = ut(void 0, "0ub"), Rd = ut(void 0, "0ubs"), Sn = ut(void 0, "0ubsb"), Md = ut(void 0, "0actk"), yi = ut("m_m", "Pa", !0), ds = ut();
1439
- const Ma = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Da = Object.defineProperties, _ = Ii ? Ld : "Ga";
1438
+ var Fd = ut("jas", void 0, !0), ls = ut(void 0, "0di"), qi = ut(void 0, "1oa"), Oe = ut(void 0, Symbol()), Rd = ut(void 0, "0ub"), Ld = ut(void 0, "0ubs"), Cn = ut(void 0, "0ubsb"), Md = ut(void 0, "0actk"), yi = ut("m_m", "Pa", !0), ds = ut();
1439
+ const Ma = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Da = Object.defineProperties, k = Ii ? Fd : "Ga";
1440
1440
  var Zt;
1441
1441
  const us = [];
1442
1442
  function ar(e, t) {
1443
- Ii || _ in e || Da(e, Ma), e[_] |= t;
1443
+ Ii || k in e || Da(e, Ma), e[k] |= t;
1444
1444
  }
1445
1445
  function ge(e, t) {
1446
- Ii || _ in e || Da(e, Ma), e[_] = t;
1446
+ Ii || k in e || Da(e, Ma), e[k] = t;
1447
1447
  }
1448
1448
  function cr(e) {
1449
1449
  return ar(e, 34), e;
@@ -1454,7 +1454,7 @@ function ir(e) {
1454
1454
  ge(us, 7), Zt = Object.freeze(us);
1455
1455
  var bi = {};
1456
1456
  function Ue(e, t) {
1457
- return t === void 0 ? e.h !== Qt && !!(2 & (0 | e.v[_])) : !!(2 & t) && e.h !== Qt;
1457
+ return t === void 0 ? e.h !== Qt && !!(2 & (0 | e.v[k])) : !!(2 & t) && e.h !== Qt;
1458
1458
  }
1459
1459
  const Qt = {};
1460
1460
  function no(e, t) {
@@ -1493,7 +1493,7 @@ function Pa(e, t, i) {
1493
1493
  }
1494
1494
  }
1495
1495
  var Oa = {};
1496
- function Li(e) {
1496
+ function Fi(e) {
1497
1497
  return 128 & e ? Oa : void 0;
1498
1498
  }
1499
1499
  function Gr(e) {
@@ -1535,30 +1535,30 @@ function oo(e) {
1535
1535
  const t = zd || (zd = new DataView(new ArrayBuffer(8)));
1536
1536
  t.setFloat32(0, +e, !0), ue = 0, ne = t.getUint32(0, !0);
1537
1537
  }
1538
- function Ln(e, t) {
1538
+ function Fn(e, t) {
1539
1539
  const i = 4294967296 * t + (e >>> 0);
1540
1540
  return Number.isSafeInteger(i) ? i : rr(e, t);
1541
1541
  }
1542
1542
  function $d(e, t) {
1543
- return Be(Si() ? BigInt.asUintN(64, (BigInt(t >>> 0) << BigInt(32)) + BigInt(e >>> 0)) : rr(e, t));
1543
+ return Be(Ci() ? BigInt.asUintN(64, (BigInt(t >>> 0) << BigInt(32)) + BigInt(e >>> 0)) : rr(e, t));
1544
1544
  }
1545
1545
  function so(e, t) {
1546
1546
  const i = 2147483648 & t;
1547
- return i && (t = ~t >>> 0, (e = 1 + ~e >>> 0) == 0 && (t = t + 1 >>> 0)), typeof (e = Ln(e, t)) == "number" ? i ? -e : e : i ? "-" + e : e;
1547
+ return i && (t = ~t >>> 0, (e = 1 + ~e >>> 0) == 0 && (t = t + 1 >>> 0)), typeof (e = Fn(e, t)) == "number" ? i ? -e : e : i ? "-" + e : e;
1548
1548
  }
1549
1549
  function Ba(e, t) {
1550
- return Si() ? Be(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(t)) << BigInt(32)) + BigInt.asUintN(32, BigInt(e)))) : Be(ao(e, t));
1550
+ return Ci() ? Be(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(t)) << BigInt(32)) + BigInt.asUintN(32, BigInt(e)))) : Be(ao(e, t));
1551
1551
  }
1552
1552
  function rr(e, t) {
1553
1553
  if (e >>>= 0, (t >>>= 0) <= 2097151) var i = "" + (4294967296 * t + e);
1554
- else Si() ? 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 + gs(i) + gs(e));
1554
+ else Ci() ? 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 + gs(i) + gs(e));
1555
1555
  return i;
1556
1556
  }
1557
1557
  function gs(e) {
1558
1558
  return e = String(e), "0000000".slice(e.length) + e;
1559
1559
  }
1560
1560
  function ao(e, t) {
1561
- if (2147483648 & t) if (Si()) e = "" + (BigInt(0 | t) << BigInt(32) | BigInt(e >>> 0));
1561
+ if (2147483648 & t) if (Ci()) e = "" + (BigInt(0 | t) << BigInt(32) | BigInt(e >>> 0));
1562
1562
  else {
1563
1563
  const [i, r] = co(e, t);
1564
1564
  e = "-" + rr(i, r);
@@ -1568,7 +1568,7 @@ function ao(e, t) {
1568
1568
  }
1569
1569
  function zr(e) {
1570
1570
  if (e.length < 16) vi(Number(e));
1571
- else if (Si()) e = BigInt(e), ne = Number(e & BigInt(4294967295)) >>> 0, ue = Number(e >> BigInt(32) & BigInt(4294967295));
1571
+ else if (Ci()) e = BigInt(e), ne = Number(e & BigInt(4294967295)) >>> 0, ue = Number(e >> BigInt(32) & BigInt(4294967295));
1572
1572
  else {
1573
1573
  const t = +(e[0] === "-");
1574
1574
  ue = ne = 0;
@@ -1620,7 +1620,7 @@ function dr(e) {
1620
1620
  return !1;
1621
1621
  }
1622
1622
  }
1623
- function Fi(e) {
1623
+ function Ri(e) {
1624
1624
  if (e == null) return e;
1625
1625
  if (typeof e == "string" && e) e = +e;
1626
1626
  else if (typeof e != "number") return;
@@ -1645,7 +1645,7 @@ function ja(e) {
1645
1645
  }
1646
1646
  function za(e) {
1647
1647
  var t = xi(Number(e));
1648
- return Jt(t) ? Be(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), Si() ? Be(lr(64, BigInt(e))) : Be(Ga(e)));
1648
+ return Jt(t) ? Be(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), Ci() ? Be(lr(64, BigInt(e))) : Be(Ga(e)));
1649
1649
  }
1650
1650
  function $a(e) {
1651
1651
  return Jt(e) ? e = Be(lo(e)) : (e = xi(e), Jt(e) ? e = String(e) : (vi(e), e = ao(ne, ue)), e = Be(e)), e;
@@ -1653,7 +1653,7 @@ function $a(e) {
1653
1653
  function Kd(e) {
1654
1654
  return e == null ? e : typeof e == "bigint" ? (In(e) ? e = Number(e) : (e = lr(64, e), e = In(e) ? Number(e) : String(e)), e) : dr(e) ? typeof e == "number" ? lo(e) : ja(e) : void 0;
1655
1655
  }
1656
- function Cr(e) {
1656
+ function Sr(e) {
1657
1657
  const t = typeof e;
1658
1658
  return e == null ? e : t === "bigint" ? Be(lr(64, e)) : dr(e) ? t === "string" ? za(e) : $a(e) : void 0;
1659
1659
  }
@@ -1669,11 +1669,11 @@ function Ee(e) {
1669
1669
  return e == null || typeof e == "string" ? e : void 0;
1670
1670
  }
1671
1671
  function uo(e, t, i, r) {
1672
- return e != null && e[yi] === bi ? e : Array.isArray(e) ? ((r = (i = 0 | e[_]) | 32 & r | 2 & r) !== i && ge(e, r), new t(e)) : (i ? 2 & r ? ((e = t[ls]) || (cr((e = new t()).v), e = t[ls] = e), t = e) : t = new t() : t = void 0, t);
1672
+ return e != null && e[yi] === bi ? e : Array.isArray(e) ? ((r = (i = 0 | e[k]) | 32 & r | 2 & r) !== i && ge(e, r), new t(e)) : (i ? 2 & r ? ((e = t[ls]) || (cr((e = new t()).v), e = t[ls] = e), t = e) : t = new t() : t = void 0, t);
1673
1673
  }
1674
1674
  function Yd(e, t, i) {
1675
1675
  if (t) e: {
1676
- if (!dr(t = e)) throw Cn("int64");
1676
+ if (!dr(t = e)) throw Sn("int64");
1677
1677
  switch (typeof t) {
1678
1678
  case "string":
1679
1679
  t = za(t);
@@ -1685,7 +1685,7 @@ function Yd(e, t, i) {
1685
1685
  t = $a(t);
1686
1686
  }
1687
1687
  }
1688
- else t = Cr(e);
1688
+ else t = Sr(e);
1689
1689
  return (e = t) == null ? i ? Hd : void 0 : e;
1690
1690
  }
1691
1691
  const Xd = {};
@@ -1748,7 +1748,7 @@ function pn(e) {
1748
1748
  }
1749
1749
  var bt = class extends Jd {
1750
1750
  constructor(e, t, i = ps, r = ps) {
1751
- super(), this.J = 0 | e[_], this.K = t, this.S = i, this.fa = this.K ? Zd : r;
1751
+ super(), this.J = 0 | e[k], this.K = t, this.S = i, this.fa = this.K ? Zd : r;
1752
1752
  for (let n = 0; n < e.length; n++) {
1753
1753
  const o = e[n], s = i(o[0], !1, !0);
1754
1754
  let a = o[1];
@@ -1818,21 +1818,21 @@ function ys() {
1818
1818
  function Wr(e) {
1819
1819
  return Oe ? e[Oe] : void 0;
1820
1820
  }
1821
- function Sr(e, t) {
1821
+ function Cr(e, t) {
1822
1822
  for (const i in e) !isNaN(i) && t(e, +i, e[i]);
1823
1823
  }
1824
1824
  bt.prototype.toJSON = void 0;
1825
- var Fn = class {
1825
+ var Rn = class {
1826
1826
  };
1827
1827
  const iu = { Ka: !0 };
1828
1828
  function ru(e, t) {
1829
- t < 100 || pi(Rd, 1);
1829
+ t < 100 || pi(Ld, 1);
1830
1830
  }
1831
1831
  function Hr(e, t, i, r) {
1832
1832
  const n = r !== void 0;
1833
1833
  r = !!r;
1834
1834
  var o, s = Oe;
1835
- !n && Ii && s && (o = e[s]) && Sr(o, ru), s = [];
1835
+ !n && Ii && s && (o = e[s]) && Cr(o, ru), s = [];
1836
1836
  var a = e.length;
1837
1837
  let l;
1838
1838
  o = 4294967295;
@@ -1851,9 +1851,9 @@ function Hr(e, t, i, r) {
1851
1851
  let g;
1852
1852
  f = +w, d && !Number.isNaN(f) && (g = f + h) < o ? s[g] = a : (t ?? (t = {}))[w] = a;
1853
1853
  }
1854
- return t && (u ? s.push(t) : s[o] = t), n && Oe && (e = Wr(e)) && e instanceof Fn && (s[Oe] = function(w) {
1855
- const g = new Fn();
1856
- return Sr(w, (y, p, b) => {
1854
+ return t && (u ? s.push(t) : s[o] = t), n && Oe && (e = Wr(e)) && e instanceof Rn && (s[Oe] = function(w) {
1855
+ const g = new Rn();
1856
+ return Cr(w, (y, p, b) => {
1857
1857
  g[p] = tt(b);
1858
1858
  }), g.da = w.da, g;
1859
1859
  }(e)), s;
@@ -1871,7 +1871,7 @@ function or(e) {
1871
1871
  return e ? 1 : 0;
1872
1872
  case "object":
1873
1873
  if (Array.isArray(e)) {
1874
- var t = 0 | e[_];
1874
+ var t = 0 | e[k];
1875
1875
  return e.length === 0 && 1 & t ? void 0 : Hr(e, t, or);
1876
1876
  }
1877
1877
  if (e != null && e[yi] === bi) return Ha(e);
@@ -1883,7 +1883,7 @@ function or(e) {
1883
1883
  for (var i = "", r = 0, n = t.length - 10240; r < n; ) i += String.fromCharCode.apply(null, t.subarray(r, r += 10240));
1884
1884
  i += String.fromCharCode.apply(null, r ? t.subarray(r) : t), t = btoa(i);
1885
1885
  } else {
1886
- i === void 0 && (i = 0), Sa(), i = Ca[i], r = Array(Math.floor(t.length / 3)), n = i[64] || "";
1886
+ i === void 0 && (i = 0), Ca(), i = Sa[i], r = Array(Math.floor(t.length / 3)), n = i[64] || "";
1887
1887
  let u = 0, d = 0;
1888
1888
  for (; u < t.length - 2; u += 3) {
1889
1889
  var o = t[u], s = t[u + 1], a = t[u + 2], l = i[o >> 2];
@@ -1906,7 +1906,7 @@ function or(e) {
1906
1906
  return e;
1907
1907
  }
1908
1908
  function Ha(e) {
1909
- return Hr(e = e.v, 0 | e[_], or);
1909
+ return Hr(e = e.v, 0 | e[k], or);
1910
1910
  }
1911
1911
  let ou, su;
1912
1912
  function Wt(e, t) {
@@ -1918,7 +1918,7 @@ function qa(e, t, i, r = 0) {
1918
1918
  i ? (e = [i], n |= 128) : e = [], t && (n = -16760833 & n | (1023 & t) << 14);
1919
1919
  } else {
1920
1920
  if (!Array.isArray(e)) throw Error("narr");
1921
- if (n = 0 | e[_], os && 1 & n) throw Error("rfarr");
1921
+ if (n = 0 | e[k], os && 1 & n) throw Error("rfarr");
1922
1922
  if (2048 & n && !(2 & n) && function() {
1923
1923
  if (os) throw Error("carr");
1924
1924
  pi(Md, 5);
@@ -1949,7 +1949,7 @@ function qa(e, t, i, r = 0) {
1949
1949
  function au(e, t) {
1950
1950
  if (typeof e != "object") return e;
1951
1951
  if (Array.isArray(e)) {
1952
- var i = 0 | e[_];
1952
+ var i = 0 | e[k];
1953
1953
  return e.length === 0 && 1 & i ? void 0 : bs(e, i, t);
1954
1954
  }
1955
1955
  if (e != null && e[yi] === bi) return vs(e);
@@ -1959,44 +1959,44 @@ function au(e, t) {
1959
1959
  if (i = cr(e.V()), e.K) for (e = 0; e < i.length; e++) {
1960
1960
  const r = i[e];
1961
1961
  let n = r[1];
1962
- n = n == null || typeof n != "object" ? void 0 : n != null && n[yi] === bi ? vs(n) : Array.isArray(n) ? bs(n, 0 | n[_], !!(32 & t)) : void 0, r[1] = n;
1962
+ n = n == null || typeof n != "object" ? void 0 : n != null && n[yi] === bi ? vs(n) : Array.isArray(n) ? bs(n, 0 | n[k], !!(32 & t)) : void 0, r[1] = n;
1963
1963
  }
1964
1964
  return i;
1965
1965
  }
1966
1966
  return e instanceof dt ? e : void 0;
1967
1967
  }
1968
1968
  function bs(e, t, i) {
1969
- return 2 & t || (!i || 4096 & t || 16 & t ? e = Ri(e, t, !1, i && !(16 & t)) : (ar(e, 34), 4 & t && Object.freeze(e))), e;
1969
+ return 2 & t || (!i || 4096 & t || 16 & t ? e = Li(e, t, !1, i && !(16 & t)) : (ar(e, 34), 4 & t && Object.freeze(e))), e;
1970
1970
  }
1971
1971
  function ho(e, t, i) {
1972
1972
  return e = new e.constructor(t), i && (e.h = Qt), e.m = Qt, e;
1973
1973
  }
1974
1974
  function vs(e) {
1975
- const t = e.v, i = 0 | t[_];
1976
- return Ue(e, i) ? e : wo(e, t, i) ? ho(e, t) : Ri(t, i);
1975
+ const t = e.v, i = 0 | t[k];
1976
+ return Ue(e, i) ? e : wo(e, t, i) ? ho(e, t) : Li(t, i);
1977
1977
  }
1978
- function Ri(e, t, i, r) {
1978
+ function Li(e, t, i, r) {
1979
1979
  return r ?? (r = !!(34 & t)), e = Hr(e, t, au, r), r = 32, i && (r |= 2), ge(e, t = 16769217 & t | r), e;
1980
1980
  }
1981
1981
  function fo(e) {
1982
- const t = e.v, i = 0 | t[_];
1983
- return Ue(e, i) ? wo(e, t, i) ? ho(e, t, !0) : new e.constructor(Ri(t, i, !1)) : e;
1982
+ const t = e.v, i = 0 | t[k];
1983
+ return Ue(e, i) ? wo(e, t, i) ? ho(e, t, !0) : new e.constructor(Li(t, i, !1)) : e;
1984
1984
  }
1985
1985
  function Mi(e) {
1986
1986
  if (e.h !== Qt) return !1;
1987
1987
  var t = e.v;
1988
- return ar(t = Ri(t, 0 | t[_]), 2048), e.v = t, e.h = void 0, e.m = void 0, !0;
1988
+ return ar(t = Li(t, 0 | t[k]), 2048), e.v = t, e.h = void 0, e.m = void 0, !0;
1989
1989
  }
1990
1990
  function Di(e) {
1991
- if (!Mi(e) && Ue(e, 0 | e.v[_])) throw Error();
1991
+ if (!Mi(e) && Ue(e, 0 | e.v[k])) throw Error();
1992
1992
  }
1993
1993
  function ei(e, t) {
1994
- t === void 0 && (t = 0 | e[_]), 32 & t && !(4096 & t) && ge(e, 4096 | t);
1994
+ t === void 0 && (t = 0 | e[k]), 32 & t && !(4096 & t) && ge(e, 4096 | t);
1995
1995
  }
1996
1996
  function wo(e, t, i) {
1997
1997
  return !!(2 & i) || !(!(32 & i) || 4096 & i) && (ge(t, 2 | i), e.h = Qt, !0);
1998
1998
  }
1999
- const cu = Be(0), St = {};
1999
+ const cu = Be(0), Ct = {};
2000
2000
  function ee(e, t, i, r, n) {
2001
2001
  if ((t = vt(e.v, t, i, n)) !== null || r && e.m !== Qt) return t;
2002
2002
  }
@@ -2018,8 +2018,8 @@ function vt(e, t, i, r) {
2018
2018
  return i;
2019
2019
  }
2020
2020
  }
2021
- function H(e, t, i, r) {
2022
- Di(e), we(e = e.v, 0 | e[_], t, i, r);
2021
+ function K(e, t, i, r) {
2022
+ Di(e), we(e = e.v, 0 | e[k], t, i, r);
2023
2023
  }
2024
2024
  function we(e, t, i, r, n) {
2025
2025
  const o = i + (n ? 0 : -1);
@@ -2028,15 +2028,15 @@ function we(e, t, i, r, n) {
2028
2028
  const a = e[s];
2029
2029
  if (a != null && typeof a == "object" && a.constructor === Object) return a[i] = r, t;
2030
2030
  }
2031
- return o <= s ? (e[o] = r, t) : (r !== void 0 && (i >= (s = (t ?? (t = 0 | e[_])) >> 14 & 1023 || 536870912) ? r != null && (e[s + (n ? 0 : -1)] = { [i]: r }) : e[o] = r), t);
2031
+ return o <= s ? (e[o] = r, t) : (r !== void 0 && (i >= (s = (t ?? (t = 0 | e[k])) >> 14 & 1023 || 536870912) ? r != null && (e[s + (n ? 0 : -1)] = { [i]: r }) : e[o] = r), t);
2032
2032
  }
2033
2033
  function zt() {
2034
2034
  return Dd === void 0 ? 2 : 4;
2035
2035
  }
2036
2036
  function $t(e, t, i, r, n) {
2037
- let o = e.v, s = 0 | o[_];
2038
- r = Ue(e, s) ? 1 : r, n = !!n || r === 3, r === 2 && Mi(e) && (o = e.v, s = 0 | o[_]);
2039
- let a = (e = mo(o, t)) === Zt ? 7 : 0 | e[_], l = go(a, s);
2037
+ let o = e.v, s = 0 | o[k];
2038
+ r = Ue(e, s) ? 1 : r, n = !!n || r === 3, r === 2 && Mi(e) && (o = e.v, s = 0 | o[k]);
2039
+ let a = (e = mo(o, t)) === Zt ? 7 : 0 | e[k], l = go(a, s);
2040
2040
  var u = !(4 & l);
2041
2041
  if (u) {
2042
2042
  4 & l && (e = tt(e), a = 0, l = qt(l, s), s = we(o, s, t, e));
@@ -2073,13 +2073,13 @@ function Xa(e) {
2073
2073
  }
2074
2074
  return ir(e);
2075
2075
  }
2076
- function Rt(e, t, i, r) {
2077
- Di(e), we(e = e.v, 0 | e[_], t, (r === "0" ? Number(i) === 0 : i === r) ? void 0 : i);
2076
+ function Lt(e, t, i, r) {
2077
+ Di(e), we(e = e.v, 0 | e[k], t, (r === "0" ? Number(i) === 0 : i === r) ? void 0 : i);
2078
2078
  }
2079
2079
  function Pi(e, t, i) {
2080
2080
  if (2 & t) throw Error();
2081
- const r = Li(t);
2082
- let n = mo(e, i, r), o = n === Zt ? 7 : 0 | n[_], s = go(o, t);
2081
+ const r = Fi(t);
2082
+ let n = mo(e, i, r), o = n === Zt ? 7 : 0 | n[k], s = go(o, t);
2083
2083
  return (2 & s || Ht(s) || 16 & s) && (s === o || Ht(s) || ge(n, s), n = tt(n), o = 0, s = qt(s, t), we(e, t, i, n, r)), s &= -13, s !== o && ge(n, s), n;
2084
2084
  }
2085
2085
  function yn(e, t) {
@@ -2107,16 +2107,16 @@ function yo(e, t, i, r, n) {
2107
2107
  return e.set(r, o), o;
2108
2108
  }
2109
2109
  function bo(e, t, i) {
2110
- let r = 0 | e[_];
2111
- const n = Li(r), o = vt(e, i, n);
2110
+ let r = 0 | e[k];
2111
+ const n = Fi(r), o = vt(e, i, n);
2112
2112
  let s;
2113
2113
  if (o != null && o[yi] === bi) {
2114
2114
  if (!Ue(o)) return Mi(o), o.v;
2115
2115
  s = o.v;
2116
2116
  } else Array.isArray(o) && (s = o);
2117
2117
  if (s) {
2118
- const a = 0 | s[_];
2119
- 2 & a && (s = Ri(s, a));
2118
+ const a = 0 | s[k];
2119
+ 2 & a && (s = Li(s, a));
2120
2120
  }
2121
2121
  return s = Wt(s, t), s !== o && we(e, r, i, s, n), s;
2122
2122
  }
@@ -2128,18 +2128,18 @@ function Ja(e, t, i, r, n) {
2128
2128
  })) != null) return o && !Ue(r) && ei(e, t), r;
2129
2129
  }
2130
2130
  function $(e, t, i, r) {
2131
- let n = e.v, o = 0 | n[_];
2131
+ let n = e.v, o = 0 | n[k];
2132
2132
  if ((t = Ja(n, o, t, i, r)) == null) return t;
2133
- if (o = 0 | n[_], !Ue(e, o)) {
2133
+ if (o = 0 | n[k], !Ue(e, o)) {
2134
2134
  const s = fo(t);
2135
- s !== t && (Mi(e) && (n = e.v, o = 0 | n[_]), o = we(n, o, i, t = s, r), ei(n, o));
2135
+ s !== t && (Mi(e) && (n = e.v, o = 0 | n[k]), o = we(n, o, i, t = s, r), ei(n, o));
2136
2136
  }
2137
2137
  return t;
2138
2138
  }
2139
2139
  function Za(e, t, i, r, n, o, s, a) {
2140
2140
  var l = Ue(e, i);
2141
- o = l ? 1 : o, s = !!s || o === 3, l = a && !l, (o === 2 || l) && Mi(e) && (i = 0 | (t = e.v)[_]);
2142
- var u = (e = mo(t, n)) === Zt ? 7 : 0 | e[_], d = go(u, i);
2141
+ o = l ? 1 : o, s = !!s || o === 3, l = a && !l, (o === 2 || l) && Mi(e) && (i = 0 | (t = e.v)[k]);
2142
+ var u = (e = mo(t, n)) === Zt ? 7 : 0 | e[k], d = go(u, i);
2143
2143
  if (a = !(4 & d)) {
2144
2144
  var h = e, f = i;
2145
2145
  const w = !!(2 & d);
@@ -2149,8 +2149,8 @@ function Za(e, t, i, r, n, o, s, a) {
2149
2149
  const v = uo(h[p], r, !1, f);
2150
2150
  if (v instanceof r) {
2151
2151
  if (!w) {
2152
- const L = Ue(v);
2153
- g && (g = !L), y && (y = L);
2152
+ const F = Ue(v);
2153
+ g && (g = !F), y && (y = F);
2154
2154
  }
2155
2155
  h[b++] = v;
2156
2156
  }
@@ -2165,20 +2165,20 @@ function Za(e, t, i, r, n, o, s, a) {
2165
2165
  }
2166
2166
  function xt(e, t, i) {
2167
2167
  const r = e.v;
2168
- return Za(e, r, 0 | r[_], t, i, zt(), !1, !0);
2168
+ return Za(e, r, 0 | r[k], t, i, zt(), !1, !0);
2169
2169
  }
2170
2170
  function ec(e) {
2171
2171
  return e == null && (e = void 0), e;
2172
2172
  }
2173
- function F(e, t, i, r, n) {
2174
- return H(e, i, r = ec(r), n), r && !Ue(r) && ei(e.v), e;
2173
+ function R(e, t, i, r, n) {
2174
+ return K(e, i, r = ec(r), n), r && !Ue(r) && ei(e.v), e;
2175
2175
  }
2176
2176
  function Qi(e, t, i, r) {
2177
2177
  e: {
2178
2178
  var n = r = ec(r);
2179
2179
  Di(e);
2180
2180
  const o = e.v;
2181
- let s = 0 | o[_];
2181
+ let s = 0 | o[k];
2182
2182
  if (n == null) {
2183
2183
  const a = po(o);
2184
2184
  if (yo(a, o, s, i) !== t) break e;
@@ -2193,38 +2193,38 @@ function qt(e, t) {
2193
2193
  }
2194
2194
  function vo(e, t, i, r) {
2195
2195
  var n = r;
2196
- Di(e), e = Za(e, r = e.v, 0 | r[_], i, t, 2, !0), n = n ?? new i(), e.push(n), t = i = e === Zt ? 7 : 0 | e[_], (n = Ue(n)) ? (i &= -9, e.length === 1 && (i &= -4097)) : i |= 4096, i !== t && ge(e, i), n || ei(r);
2196
+ Di(e), e = Za(e, r = e.v, 0 | r[k], i, t, 2, !0), n = n ?? new i(), e.push(n), t = i = e === Zt ? 7 : 0 | e[k], (n = Ue(n)) ? (i &= -9, e.length === 1 && (i &= -4097)) : i |= 4096, i !== t && ge(e, i), n || ei(r);
2197
2197
  }
2198
2198
  function Xe(e, t, i) {
2199
- return Fi(ee(e, t, void 0, i));
2199
+ return Ri(ee(e, t, void 0, i));
2200
2200
  }
2201
2201
  function tc(e) {
2202
- return (to ? ee(e, 2, void 0, void 0, Cr) : Cr(ee(e, 2))) ?? cu;
2202
+ return (to ? ee(e, 2, void 0, void 0, Sr) : Sr(ee(e, 2))) ?? cu;
2203
2203
  }
2204
2204
  function ce(e, t) {
2205
2205
  return ee(e, t, void 0, void 0, lt) ?? 0;
2206
2206
  }
2207
2207
  function Et(e, t, i) {
2208
2208
  if (i != null) {
2209
- if (typeof i != "number" || !$r(i)) throw Cn("int32");
2209
+ if (typeof i != "number" || !$r(i)) throw Sn("int32");
2210
2210
  i |= 0;
2211
2211
  }
2212
- H(e, t, i);
2212
+ K(e, t, i);
2213
2213
  }
2214
2214
  function C(e, t, i) {
2215
- H(e, t, Xi(i));
2215
+ K(e, t, Xi(i));
2216
2216
  }
2217
2217
  function Ve(e, t, i) {
2218
- Rt(e, t, ur(i), "");
2218
+ Lt(e, t, ur(i), "");
2219
2219
  }
2220
2220
  function Ir(e, t, i) {
2221
2221
  {
2222
2222
  Di(e);
2223
2223
  const s = e.v;
2224
- let a = 0 | s[_];
2224
+ let a = 0 | s[k];
2225
2225
  if (i == null) we(s, a, t);
2226
2226
  else {
2227
- var r = e = i === Zt ? 7 : 0 | i[_], n = Ht(e), o = n || Object.isFrozen(i);
2227
+ var r = e = i === Zt ? 7 : 0 | i[k], n = Ht(e), o = n || Object.isFrozen(i);
2228
2228
  for (n || (e = 0), o || (i = tt(i), r = 0, e = qt(e, a), o = !1), e |= 5, e |= (4 & e ? 512 & e ? 512 : 1024 & e ? 1024 : 0 : void 0) ?? (to ? 1024 : 0), n = 0; n < i.length; n++) {
2229
2229
  const l = i[n], u = Wa(l);
2230
2230
  Object.is(l, u) || (o && (i = tt(i), r = 0, e = qt(e, a), o = !1), i[n] = u);
@@ -2243,7 +2243,7 @@ var di = class {
2243
2243
  }
2244
2244
  };
2245
2245
  function xo(e, t) {
2246
- if (typeof e == "string") return new di(La(e), t);
2246
+ if (typeof e == "string") return new di(Fa(e), t);
2247
2247
  if (Array.isArray(e)) return new di(new Uint8Array(e), t);
2248
2248
  if (e.constructor === Uint8Array) return new di(e, !1);
2249
2249
  if (e.constructor === ArrayBuffer) return e = new Uint8Array(e), new di(e, !1);
@@ -2280,7 +2280,7 @@ function Pt(e) {
2280
2280
  function _t(e) {
2281
2281
  return Pt(e) >>> 0;
2282
2282
  }
2283
- function Lr(e) {
2283
+ function Fr(e) {
2284
2284
  var t = e.h;
2285
2285
  const i = e.g;
2286
2286
  var r = t[i], n = t[i + 1];
@@ -2306,14 +2306,14 @@ function rc(e, t) {
2306
2306
  }
2307
2307
  var xs = [];
2308
2308
  function nc(e, t, i, r) {
2309
- if (Fr.length) {
2310
- const n = Fr.pop();
2309
+ if (Rr.length) {
2310
+ const n = Rr.pop();
2311
2311
  return n.o(r), n.g.init(e, t, i, r), n;
2312
2312
  }
2313
2313
  return new du(e, t, i, r);
2314
2314
  }
2315
2315
  function oc(e) {
2316
- e.g.clear(), e.l = -1, e.h = -1, Fr.length < 100 && Fr.push(e);
2316
+ e.g.clear(), e.l = -1, e.h = -1, Rr.length < 100 && Rr.push(e);
2317
2317
  }
2318
2318
  function sc(e) {
2319
2319
  var t = e.g;
@@ -2323,16 +2323,16 @@ function sc(e) {
2323
2323
  if (t = i >>> 3, !((i &= 7) >= 0 && i <= 5) || t < 1) throw Error();
2324
2324
  return e.l = t, e.h = i, !0;
2325
2325
  }
2326
- function Ar(e) {
2326
+ function Tr(e) {
2327
2327
  switch (e.h) {
2328
2328
  case 0:
2329
- e.h != 0 ? Ar(e) : Eo(e.g);
2329
+ e.h != 0 ? Tr(e) : Eo(e.g);
2330
2330
  break;
2331
2331
  case 1:
2332
2332
  Kt(e = e.g, e.g + 8);
2333
2333
  break;
2334
2334
  case 2:
2335
- if (e.h != 2) Ar(e);
2335
+ if (e.h != 2) Tr(e);
2336
2336
  else {
2337
2337
  var t = _t(e.g);
2338
2338
  Kt(e = e.g, e.g + t);
@@ -2348,7 +2348,7 @@ function Ar(e) {
2348
2348
  if (e.l != t) throw Error();
2349
2349
  break;
2350
2350
  }
2351
- Ar(e);
2351
+ Tr(e);
2352
2352
  }
2353
2353
  break;
2354
2354
  default:
@@ -2423,11 +2423,11 @@ var du = class {
2423
2423
  o({ ha: e = !1 } = {}) {
2424
2424
  this.ha = e;
2425
2425
  }
2426
- }, Fr = [];
2426
+ }, Rr = [];
2427
2427
  function Es(e) {
2428
- return e ? /^\d+$/.test(e) ? (zr(e), new Rn(ne, ue)) : null : uu || (uu = new Rn(0, 0));
2428
+ return e ? /^\d+$/.test(e) ? (zr(e), new Ln(ne, ue)) : null : uu || (uu = new Ln(0, 0));
2429
2429
  }
2430
- var Rn = class {
2430
+ var Ln = class {
2431
2431
  constructor(e, t) {
2432
2432
  this.h = e >>> 0, this.g = t >>> 0;
2433
2433
  }
@@ -2467,10 +2467,10 @@ function _i(e, t) {
2467
2467
  function Qe(e, t, i) {
2468
2468
  Oi(e.g, 8 * t + i);
2469
2469
  }
2470
- function Ao(e, t) {
2470
+ function To(e, t) {
2471
2471
  return Qe(e, t, 2), t = e.g.end(), _i(e, t), t.push(e.h), t;
2472
2472
  }
2473
- function To(e, t) {
2473
+ function Ao(e, t) {
2474
2474
  var i = t.pop();
2475
2475
  for (i = e.h + e.g.length() - i; i > 127; ) t.push(127 & i | 128), i >>>= 7, e.h++;
2476
2476
  t.push(i), e.h++;
@@ -2478,8 +2478,8 @@ function To(e, t) {
2478
2478
  function Xr(e, t, i) {
2479
2479
  Qe(e, t, 2), Oi(e.g, i.length), _i(e, e.g.end()), _i(e, i);
2480
2480
  }
2481
- function Rr(e, t, i, r) {
2482
- i != null && (t = Ao(e, t), r(i, e), To(e, t));
2481
+ function Lr(e, t, i, r) {
2482
+ i != null && (t = To(e, t), r(i, e), Ao(e, t));
2483
2483
  }
2484
2484
  function ht() {
2485
2485
  const e = class {
@@ -2489,12 +2489,12 @@ function ht() {
2489
2489
  };
2490
2490
  return Object.setPrototypeOf(e, e.prototype), e;
2491
2491
  }
2492
- var No = ht(), cc = ht(), Co = ht(), So = ht(), lc = ht(), dc = ht(), fu = ht(), Qr = ht(), uc = ht(), hc = ht();
2492
+ var No = ht(), cc = ht(), So = ht(), Co = ht(), lc = ht(), dc = ht(), fu = ht(), Qr = ht(), uc = ht(), hc = ht();
2493
2493
  function ft(e, t, i) {
2494
2494
  var r = e.v;
2495
2495
  Oe && Oe in r && (r = r[Oe]) && delete r[t.g], t.h ? t.j(e, t.h, t.g, i, t.l) : t.j(e, t.g, i, t.l);
2496
2496
  }
2497
- var k = class {
2497
+ var T = class {
2498
2498
  constructor(e, t) {
2499
2499
  this.v = qa(e, t, void 0, 2048);
2500
2500
  }
@@ -2504,7 +2504,7 @@ var k = class {
2504
2504
  j() {
2505
2505
  var n;
2506
2506
  var e = Yu, t = this.v, i = e.g, r = Oe;
2507
- if (Ii && r && ((n = t[r]) == null ? void 0 : n[i]) != null && pi(Fd, 3), t = e.g, ds && Oe && ds === void 0 && (r = (i = this.v)[Oe]) && (r = r.da)) try {
2507
+ if (Ii && r && ((n = t[r]) == null ? void 0 : n[i]) != null && pi(Rd, 3), t = e.g, ds && Oe && ds === void 0 && (r = (i = this.v)[Oe]) && (r = r.da)) try {
2508
2508
  r(i, t, iu);
2509
2509
  } catch (o) {
2510
2510
  Na(o);
@@ -2512,11 +2512,11 @@ var k = class {
2512
2512
  return e.h ? e.m(this, e.h, e.g, e.l) : e.m(this, e.g, e.defaultValue, e.l);
2513
2513
  }
2514
2514
  clone() {
2515
- const e = this.v, t = 0 | e[_];
2516
- return wo(this, e, t) ? ho(this, e, !0) : new this.constructor(Ri(e, t, !1));
2515
+ const e = this.v, t = 0 | e[k];
2516
+ return wo(this, e, t) ? ho(this, e, !0) : new this.constructor(Li(e, t, !1));
2517
2517
  }
2518
2518
  };
2519
- k.prototype[yi] = bi, k.prototype.toString = function() {
2519
+ T.prototype[yi] = bi, T.prototype.toString = function() {
2520
2520
  return this.v.toString();
2521
2521
  };
2522
2522
  var Bi = class {
@@ -2528,14 +2528,14 @@ function Jr(e, t) {
2528
2528
  return new Bi(e, t, No);
2529
2529
  }
2530
2530
  function fc(e, t, i, r, n) {
2531
- Rr(e, i, pc(t, r), n);
2531
+ Lr(e, i, pc(t, r), n);
2532
2532
  }
2533
2533
  const wu = Jr(function(e, t, i, r, n) {
2534
2534
  return e.h === 2 && (hr(e, bo(t, r, i), n), !0);
2535
2535
  }, fc), mu = Jr(function(e, t, i, r, n) {
2536
2536
  return e.h === 2 && (hr(e, bo(t, r, i), n), !0);
2537
2537
  }, fc);
2538
- var Zr = Symbol(), en = Symbol(), Dn = Symbol(), ks = Symbol(), As = Symbol();
2538
+ var Zr = Symbol(), en = Symbol(), Dn = Symbol(), ks = Symbol(), Ts = Symbol();
2539
2539
  let wc, mc;
2540
2540
  function ti(e, t, i, r) {
2541
2541
  var n = r[e];
@@ -2580,21 +2580,21 @@ function gc(e) {
2580
2580
  return Array.isArray(e) ? e[0] instanceof Bi ? e : [mu, e] : [e, void 0];
2581
2581
  }
2582
2582
  function pc(e, t) {
2583
- return e instanceof k ? e.v : Array.isArray(e) ? Wt(e, t) : void 0;
2583
+ return e instanceof T ? e.v : Array.isArray(e) ? Wt(e, t) : void 0;
2584
2584
  }
2585
2585
  function Io(e, t, i, r) {
2586
2586
  const n = i.g;
2587
2587
  e[t] = r ? (o, s, a) => n(o, s, a, r) : n;
2588
2588
  }
2589
- function Lo(e, t, i, r, n) {
2589
+ function Fo(e, t, i, r, n) {
2590
2590
  const o = i.g;
2591
2591
  let s, a;
2592
- e[t] = (l, u, d) => o(l, u, d, a || (a = ti(en, Io, Lo, r).T), s || (s = Fo(r)), n);
2592
+ e[t] = (l, u, d) => o(l, u, d, a || (a = ti(en, Io, Fo, r).T), s || (s = Ro(r)), n);
2593
2593
  }
2594
- function Fo(e) {
2594
+ function Ro(e) {
2595
2595
  let t = e[Dn];
2596
2596
  if (t != null) return t;
2597
- const i = ti(en, Io, Lo, e);
2597
+ const i = ti(en, Io, Fo, e);
2598
2598
  return t = i.ma ? (r, n) => wc(r, n, i) : (r, n) => {
2599
2599
  for (; sc(n) && n.h != 4; ) {
2600
2600
  var o = n.l, s = i[o];
@@ -2603,13 +2603,13 @@ function Fo(e) {
2603
2603
  a && (a = a[o]) && (a = pu(a)) != null && (s = i[o] = a);
2604
2604
  }
2605
2605
  if (s == null || !s(n, r, o)) {
2606
- if (s = (a = n).m, Ar(a), a.ha) var l = void 0;
2606
+ if (s = (a = n).m, Tr(a), a.ha) var l = void 0;
2607
2607
  else l = a.g.g - s, a.g.g = s, l = rc(a.g, l);
2608
- s = void 0, a = r, l && ((s = a[Oe] ?? (a[Oe] = new Fn()))[o] ?? (s[o] = [])).push(l);
2608
+ s = void 0, a = r, l && ((s = a[Oe] ?? (a[Oe] = new Rn()))[o] ?? (s[o] = [])).push(l);
2609
2609
  }
2610
2610
  }
2611
- return (r = Wr(r)) && (r.da = i.qa[As]), !0;
2612
- }, e[Dn] = t, e[As] = gu.bind(e), t;
2611
+ return (r = Wr(r)) && (r.da = i.qa[Ts]), !0;
2612
+ }, e[Dn] = t, e[Ts] = gu.bind(e), t;
2613
2613
  }
2614
2614
  function gu(e, t, i, r) {
2615
2615
  var n = this[en];
@@ -2627,22 +2627,22 @@ function gu(e, t, i, r) {
2627
2627
  }
2628
2628
  }
2629
2629
  else r == null || r(e, h, f);
2630
- }, t == null) Sr(a, n);
2630
+ }, t == null) Cr(a, n);
2631
2631
  else if (a != null) {
2632
2632
  const d = a[t];
2633
2633
  d && n(a, t, d);
2634
2634
  }
2635
2635
  if (l) {
2636
- let d = 0 | e[_];
2636
+ let d = 0 | e[k];
2637
2637
  if (2 & d && 2048 & d && !(i != null && i.Ka)) throw Error();
2638
- const h = Li(d), f = (w, g) => {
2638
+ const h = Fi(d), f = (w, g) => {
2639
2639
  if (vt(e, w, h) != null) {
2640
2640
  if ((i == null ? void 0 : i.Qa) === 1) return;
2641
2641
  throw Error();
2642
2642
  }
2643
2643
  g != null && (d = we(e, d, w, g, h)), delete a[w];
2644
2644
  };
2645
- t == null ? Pa(s, 0 | s[_], (w, g) => {
2645
+ t == null ? Pa(s, 0 | s[k], (w, g) => {
2646
2646
  f(w, g);
2647
2647
  }) : f(t, vt(s, t, h));
2648
2648
  }
@@ -2652,7 +2652,7 @@ function gu(e, t, i, r) {
2652
2652
  function pu(e) {
2653
2653
  const t = (e = gc(e))[0].g;
2654
2654
  if (e = e[1]) {
2655
- const i = Fo(e), r = ti(en, Io, Lo, e).T;
2655
+ const i = Ro(e), r = ti(en, Io, Fo, e).T;
2656
2656
  return (n, o, s) => t(n, o, s, r, i);
2657
2657
  }
2658
2658
  return t;
@@ -2674,7 +2674,7 @@ function yc(e) {
2674
2674
  return t;
2675
2675
  }
2676
2676
  function bc(e, t, i) {
2677
- Pa(e, 0 | e[_], (r, n) => {
2677
+ Pa(e, 0 | e[k], (r, n) => {
2678
2678
  if (n != null) {
2679
2679
  var o = function(s, a) {
2680
2680
  var l = s[a];
@@ -2688,16 +2688,16 @@ function bc(e, t, i) {
2688
2688
  return s[a] = l;
2689
2689
  }
2690
2690
  }(i, r);
2691
- o ? o(t, n, r) : r < 500 || pi(Sn, 3);
2691
+ o ? o(t, n, r) : r < 500 || pi(Cn, 3);
2692
2692
  }
2693
- }), (e = Wr(e)) && Sr(e, (r, n, o) => {
2693
+ }), (e = Wr(e)) && Cr(e, (r, n, o) => {
2694
2694
  for (_i(t, t.g.end()), r = 0; r < o.length; r++) _i(t, ro(o[r]) || new Uint8Array(0));
2695
2695
  });
2696
2696
  }
2697
2697
  const yu = Be(0);
2698
2698
  function Ui(e, t) {
2699
2699
  if (Array.isArray(t)) {
2700
- var i = 0 | t[_];
2700
+ var i = 0 | t[k];
2701
2701
  if (4 & i) return t;
2702
2702
  for (var r = 0, n = 0; r < t.length; r++) {
2703
2703
  const o = e(t[r]);
@@ -2706,33 +2706,33 @@ function Ui(e, t) {
2706
2706
  return n < r && (t.length = n), (e = -1537 & (5 | i)) !== i && ge(t, e), 2 & e && Object.freeze(t), t;
2707
2707
  }
2708
2708
  }
2709
- function Ce(e, t, i) {
2709
+ function Se(e, t, i) {
2710
2710
  return new Bi(e, t, i);
2711
2711
  }
2712
2712
  function Vi(e, t, i) {
2713
2713
  return new Bi(e, t, i);
2714
2714
  }
2715
2715
  function ve(e, t, i) {
2716
- we(e, 0 | e[_], t, i, Li(0 | e[_]));
2716
+ we(e, 0 | e[k], t, i, Fi(0 | e[k]));
2717
2717
  }
2718
2718
  var bu = Jr(function(e, t, i, r, n) {
2719
2719
  if (e.h !== 2) return !1;
2720
- if (e = tt(e = hr(e, Wt([void 0, void 0], r), n)), n = Li(r = 0 | t[_]), 2 & r) throw Error();
2720
+ if (e = tt(e = hr(e, Wt([void 0, void 0], r), n)), n = Fi(r = 0 | t[k]), 2 & r) throw Error();
2721
2721
  let o = vt(t, i, n);
2722
2722
  if (o instanceof bt) 2 & o.J ? (o = o.V(), o.push(e), we(t, r, i, o, n)) : o.Ma(e);
2723
2723
  else if (Array.isArray(o)) {
2724
- var s = 0 | o[_];
2724
+ var s = 0 | o[k];
2725
2725
  8192 & s || ge(o, s |= 8192), 2 & s && (o = Xa(o), we(t, r, i, o, n)), o.push(e);
2726
2726
  } else we(t, r, i, ir([e]), n);
2727
2727
  return !0;
2728
2728
  }, function(e, t, i, r, n) {
2729
2729
  if (t instanceof bt) t.forEach((o, s) => {
2730
- Rr(e, i, Wt([s, o], r), n);
2730
+ Lr(e, i, Wt([s, o], r), n);
2731
2731
  });
2732
2732
  else if (Array.isArray(t)) {
2733
2733
  for (let o = 0; o < t.length; o++) {
2734
2734
  const s = t[o];
2735
- Array.isArray(s) && Rr(e, i, Wt(s, r), n);
2735
+ Array.isArray(s) && Lr(e, i, Wt(s, r), n);
2736
2736
  }
2737
2737
  ir(t);
2738
2738
  }
@@ -2762,43 +2762,43 @@ function xc(e, t, i) {
2762
2762
  }
2763
2763
  }
2764
2764
  function Ec(e, t, i) {
2765
- (t = Fi(t)) != null && t != null && (Qe(e, i, 0), Yr(e.g, t));
2765
+ (t = Ri(t)) != null && t != null && (Qe(e, i, 0), Yr(e.g, t));
2766
2766
  }
2767
2767
  function _c(e, t, i) {
2768
2768
  (t = Ua(t)) != null && (Qe(e, i, 0), e.g.g.push(t ? 1 : 0));
2769
2769
  }
2770
2770
  function kc(e, t, i) {
2771
- (t = Ee(t)) != null && Xr(e, i, Ta(t));
2771
+ (t = Ee(t)) != null && Xr(e, i, Aa(t));
2772
2772
  }
2773
- function Ac(e, t, i, r, n) {
2774
- Rr(e, i, pc(t, r), n);
2773
+ function Tc(e, t, i, r, n) {
2774
+ Lr(e, i, pc(t, r), n);
2775
2775
  }
2776
- function Tc(e, t, i) {
2776
+ function Ac(e, t, i) {
2777
2777
  (t = t == null || typeof t == "string" || t instanceof dt ? t : void 0) != null && Xr(e, i, xo(t, !0).buffer);
2778
2778
  }
2779
2779
  function Nc(e, t, i) {
2780
- return (e.h === 5 || e.h === 2) && (t = Pi(t, 0 | t[_], i), e.h == 2 ? Kr(e, Lr, t) : t.push(Lr(e.g)), !0);
2780
+ return (e.h === 5 || e.h === 2) && (t = Pi(t, 0 | t[k], i), e.h == 2 ? Kr(e, Fr, t) : t.push(Fr(e.g)), !0);
2781
2781
  }
2782
- var he = Ce(function(e, t, i) {
2783
- return e.h === 5 && (ve(t, i, Lr(e.g)), !0);
2782
+ var he = Se(function(e, t, i) {
2783
+ return e.h === 5 && (ve(t, i, Fr(e.g)), !0);
2784
2784
  }, vc, Qr), vu = Vi(Nc, function(e, t, i) {
2785
2785
  if ((t = Ui(lt, t)) != null) for (let s = 0; s < t.length; s++) {
2786
2786
  var r = e, n = i, o = t[s];
2787
2787
  o != null && (Qe(r, n, 5), r = r.g, oo(o), ko(r));
2788
2788
  }
2789
- }, Qr), Ro = Vi(Nc, function(e, t, i) {
2789
+ }, Qr), Lo = Vi(Nc, function(e, t, i) {
2790
2790
  if ((t = Ui(lt, t)) != null && t.length) {
2791
2791
  Qe(e, i, 2), Oi(e.g, 4 * t.length);
2792
2792
  for (let r = 0; r < t.length; r++) i = e.g, oo(t[r]), ko(i);
2793
2793
  }
2794
- }, Qr), xu = Ce(function(e, t, i) {
2795
- return e.h === 5 && (ve(t, i, (e = Lr(e.g)) === 0 ? void 0 : e), !0);
2796
- }, vc, Qr), Ot = Ce(function(e, t, i) {
2794
+ }, Qr), xu = Se(function(e, t, i) {
2795
+ return e.h === 5 && (ve(t, i, (e = Fr(e.g)) === 0 ? void 0 : e), !0);
2796
+ }, vc, Qr), Ot = Se(function(e, t, i) {
2797
2797
  return eo ? (e.h !== 0 ? e = !1 : (ve(t, i, Ei(e.g, Ba)), e = !0), e) : e.h === 0 && (ve(t, i, Ei(e.g, so)), !0);
2798
- }, xc, dc), bn = Ce(function(e, t, i) {
2798
+ }, xc, dc), bn = Se(function(e, t, i) {
2799
2799
  return eo ? (e.h !== 0 ? t = !1 : (ve(t, i, (e = Ei(e.g, Ba)) === yu ? void 0 : e), t = !0), t) : e.h === 0 && (ve(t, i, (e = Ei(e.g, so)) === 0 ? void 0 : e), !0);
2800
- }, xc, dc), Eu = Ce(function(e, t, i) {
2801
- return eo ? (e.h !== 0 ? e = !1 : (ve(t, i, Ei(e.g, $d)), e = !0), e) : e.h === 0 && (ve(t, i, Ei(e.g, Ln)), !0);
2800
+ }, xc, dc), Eu = Se(function(e, t, i) {
2801
+ return eo ? (e.h !== 0 ? e = !1 : (ve(t, i, Ei(e.g, $d)), e = !0), e) : e.h === 0 && (ve(t, i, Ei(e.g, Fn)), !0);
2802
2802
  }, function(e, t, i) {
2803
2803
  if (t = function(r) {
2804
2804
  if (r == null) return r;
@@ -2806,7 +2806,7 @@ var he = Ce(function(e, t, i) {
2806
2806
  if (n === "bigint") return String(Wd(64, r));
2807
2807
  if (dr(r)) {
2808
2808
  if (n === "string") return n = xi(Number(r)), Jt(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 = rr(ne, ue))), r;
2809
- if (n === "number") return (r = xi(r)) >= 0 && Jt(r) || (vi(r), r = Ln(ne, ue)), r;
2809
+ if (n === "number") return (r = xi(r)) >= 0 && Jt(r) || (vi(r), r = Fn(ne, ue)), r;
2810
2810
  }
2811
2811
  }(t), t != null && (typeof t == "string" && Es(t), t != null))
2812
2812
  switch (Qe(e, i, 0), typeof t) {
@@ -2814,80 +2814,80 @@ var he = Ce(function(e, t, i) {
2814
2814
  e = e.g, vi(t), fi(e, ne, ue);
2815
2815
  break;
2816
2816
  case "bigint":
2817
- i = BigInt.asUintN(64, t), i = new Rn(Number(i & BigInt(4294967295)), Number(i >> BigInt(32))), fi(e.g, i.h, i.g);
2817
+ i = BigInt.asUintN(64, t), i = new Ln(Number(i & BigInt(4294967295)), Number(i >> BigInt(32))), fi(e.g, i.h, i.g);
2818
2818
  break;
2819
2819
  default:
2820
2820
  i = Es(t), fi(e.g, i.h, i.g);
2821
2821
  }
2822
- }, fu), be = Ce(function(e, t, i) {
2822
+ }, fu), be = Se(function(e, t, i) {
2823
2823
  return e.h === 0 && (ve(t, i, Pt(e.g)), !0);
2824
- }, Ec, So), fr = Vi(function(e, t, i) {
2825
- return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[_], i), e.h == 2 ? Kr(e, Pt, t) : t.push(Pt(e.g)), !0);
2824
+ }, Ec, Co), fr = Vi(function(e, t, i) {
2825
+ return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[k], i), e.h == 2 ? Kr(e, Pt, t) : t.push(Pt(e.g)), !0);
2826
2826
  }, function(e, t, i) {
2827
- if ((t = Ui(Fi, t)) != null && t.length) {
2828
- i = Ao(e, i);
2827
+ if ((t = Ui(Ri, t)) != null && t.length) {
2828
+ i = To(e, i);
2829
2829
  for (let r = 0; r < t.length; r++) Yr(e.g, t[r]);
2830
- To(e, i);
2830
+ Ao(e, i);
2831
2831
  }
2832
- }, So), hi = Ce(function(e, t, i) {
2832
+ }, Co), hi = Se(function(e, t, i) {
2833
2833
  return e.h === 0 && (ve(t, i, (e = Pt(e.g)) === 0 ? void 0 : e), !0);
2834
- }, Ec, So), le = Ce(function(e, t, i) {
2834
+ }, Ec, Co), le = Se(function(e, t, i) {
2835
2835
  return e.h === 0 && (ve(t, i, Eo(e.g)), !0);
2836
- }, _c, cc), Yt = Ce(function(e, t, i) {
2836
+ }, _c, cc), Yt = Se(function(e, t, i) {
2837
2837
  return e.h === 0 && (ve(t, i, (e = Eo(e.g)) === !1 ? void 0 : e), !0);
2838
2838
  }, _c, cc), ke = Vi(function(e, t, i) {
2839
- return e.h === 2 && (e = _o(e), Pi(t, 0 | t[_], i).push(e), !0);
2839
+ return e.h === 2 && (e = _o(e), Pi(t, 0 | t[k], i).push(e), !0);
2840
2840
  }, function(e, t, i) {
2841
2841
  if ((t = Ui(Ee, t)) != null) for (let s = 0; s < t.length; s++) {
2842
2842
  var r = e, n = i, o = t[s];
2843
- o != null && Xr(r, n, Ta(o));
2843
+ o != null && Xr(r, n, Aa(o));
2844
2844
  }
2845
- }, Co), Mt = Ce(function(e, t, i) {
2845
+ }, So), Mt = Se(function(e, t, i) {
2846
2846
  return e.h === 2 && (ve(t, i, (e = _o(e)) === "" ? void 0 : e), !0);
2847
- }, kc, Co), Y = Ce(function(e, t, i) {
2847
+ }, kc, So), X = Se(function(e, t, i) {
2848
2848
  return e.h === 2 && (ve(t, i, _o(e)), !0);
2849
- }, kc, Co), ye = function(e, t, i = No) {
2849
+ }, kc, So), ye = function(e, t, i = No) {
2850
2850
  return new Bi(e, t, i);
2851
2851
  }(function(e, t, i, r, n) {
2852
- return e.h === 2 && (r = Wt(void 0, r), Pi(t, 0 | t[_], i).push(r), hr(e, r, n), !0);
2852
+ return e.h === 2 && (r = Wt(void 0, r), Pi(t, 0 | t[k], i).push(r), hr(e, r, n), !0);
2853
2853
  }, function(e, t, i, r, n) {
2854
2854
  if (Array.isArray(t)) {
2855
- for (let o = 0; o < t.length; o++) Ac(e, t[o], i, r, n);
2856
- 1 & (e = 0 | t[_]) || ge(t, 1 | e);
2855
+ for (let o = 0; o < t.length; o++) Tc(e, t[o], i, r, n);
2856
+ 1 & (e = 0 | t[k]) || ge(t, 1 | e);
2857
2857
  }
2858
2858
  }), ae = Jr(function(e, t, i, r, n, o) {
2859
2859
  if (e.h !== 2) return !1;
2860
- let s = 0 | t[_];
2861
- return Qa(t, s, o, i, Li(s)), hr(e, t = bo(t, r, i), n), !0;
2862
- }, Ac), Cc = Ce(function(e, t, i) {
2860
+ let s = 0 | t[k];
2861
+ return Qa(t, s, o, i, Fi(s)), hr(e, t = bo(t, r, i), n), !0;
2862
+ }, Tc), Sc = Se(function(e, t, i) {
2863
2863
  return e.h === 2 && (ve(t, i, ac(e)), !0);
2864
- }, Tc, uc), _u = Vi(function(e, t, i) {
2865
- return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[_], i), e.h == 2 ? Kr(e, _t, t) : t.push(_t(e.g)), !0);
2864
+ }, Ac, uc), _u = Vi(function(e, t, i) {
2865
+ return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[k], i), e.h == 2 ? Kr(e, _t, t) : t.push(_t(e.g)), !0);
2866
2866
  }, function(e, t, i) {
2867
2867
  if ((t = Ui(Va, t)) != null) for (let s = 0; s < t.length; s++) {
2868
2868
  var r = e, n = i, o = t[s];
2869
2869
  o != null && (Qe(r, n, 0), Oi(r.g, o));
2870
2870
  }
2871
- }, lc), ku = Ce(function(e, t, i) {
2871
+ }, lc), ku = Se(function(e, t, i) {
2872
2872
  return e.h === 0 && (ve(t, i, (e = _t(e.g)) === 0 ? void 0 : e), !0);
2873
2873
  }, function(e, t, i) {
2874
2874
  (t = Va(t)) != null && t != null && (Qe(e, i, 0), Oi(e.g, t));
2875
- }, lc), Ge = Ce(function(e, t, i) {
2875
+ }, lc), Ge = Se(function(e, t, i) {
2876
2876
  return e.h === 0 && (ve(t, i, Pt(e.g)), !0);
2877
2877
  }, function(e, t, i) {
2878
- (t = Fi(t)) != null && (t = parseInt(t, 10), Qe(e, i, 0), Yr(e.g, t));
2878
+ (t = Ri(t)) != null && (t = parseInt(t, 10), Qe(e, i, 0), Yr(e.g, t));
2879
2879
  }, hc);
2880
- class Au {
2880
+ class Tu {
2881
2881
  constructor(t, i) {
2882
2882
  var r = ze;
2883
- this.g = t, this.h = i, this.m = $, this.j = F, this.defaultValue = void 0, this.l = r.Oa != null ? Oa : void 0;
2883
+ this.g = t, this.h = i, this.m = $, this.j = R, this.defaultValue = void 0, this.l = r.Oa != null ? Oa : void 0;
2884
2884
  }
2885
2885
  register() {
2886
2886
  Vr(this);
2887
2887
  }
2888
2888
  }
2889
2889
  function wt(e, t) {
2890
- return new Au(e, t);
2890
+ return new Tu(e, t);
2891
2891
  }
2892
2892
  function Bt(e, t) {
2893
2893
  return (i, r) => {
@@ -2896,7 +2896,7 @@ function Bt(e, t) {
2896
2896
  r && Object.assign(o, r), i = nc(i, void 0, void 0, o);
2897
2897
  try {
2898
2898
  const s = new e(), a = s.v;
2899
- Fo(t)(a, i);
2899
+ Ro(t)(a, i);
2900
2900
  var n = s;
2901
2901
  } finally {
2902
2902
  oc(i);
@@ -2933,31 +2933,31 @@ function nn(e) {
2933
2933
  return t.l = [i], i;
2934
2934
  };
2935
2935
  }
2936
- var Ts = class extends k {
2936
+ var As = class extends T {
2937
2937
  constructor(e) {
2938
2938
  super(e);
2939
2939
  }
2940
- }, Ns = [0, Mt, Ce(function(e, t, i) {
2940
+ }, Ns = [0, Mt, Se(function(e, t, i) {
2941
2941
  return e.h === 2 && (ve(t, i, (e = ac(e)) === Xt() ? void 0 : e), !0);
2942
2942
  }, function(e, t, i) {
2943
2943
  if (t != null) {
2944
- if (t instanceof k) {
2944
+ if (t instanceof T) {
2945
2945
  const r = t.Ra;
2946
- return void (r ? (t = r(t), t != null && Xr(e, i, xo(t, !0).buffer)) : pi(Sn, 3));
2946
+ return void (r ? (t = r(t), t != null && Xr(e, i, xo(t, !0).buffer)) : pi(Cn, 3));
2947
2947
  }
2948
- if (Array.isArray(t)) return void pi(Sn, 3);
2948
+ if (Array.isArray(t)) return void pi(Cn, 3);
2949
2949
  }
2950
- Tc(e, t, i);
2950
+ Ac(e, t, i);
2951
2951
  }, uc)];
2952
- let vn, Cs = globalThis.trustedTypes;
2953
- function Ss(e) {
2952
+ let vn, Ss = globalThis.trustedTypes;
2953
+ function Cs(e) {
2954
2954
  var t;
2955
2955
  return vn === void 0 && (vn = function() {
2956
2956
  let i = null;
2957
- if (!Cs) return i;
2957
+ if (!Ss) return i;
2958
2958
  try {
2959
2959
  const r = (n) => n;
2960
- i = Cs.createPolicy("goog#html", { createHTML: r, createScript: r, createScriptURL: r });
2960
+ i = Ss.createPolicy("goog#html", { createHTML: r, createScript: r, createScriptURL: r });
2961
2961
  } catch {
2962
2962
  }
2963
2963
  return i;
@@ -2970,51 +2970,51 @@ function Ss(e) {
2970
2970
  }
2971
2971
  }(e);
2972
2972
  }
2973
- function Tu(e, ...t) {
2974
- if (t.length === 0) return Ss(e[0]);
2973
+ function Au(e, ...t) {
2974
+ if (t.length === 0) return Cs(e[0]);
2975
2975
  let i = e[0];
2976
2976
  for (let r = 0; r < t.length; r++) i += encodeURIComponent(t[r]) + e[r + 1];
2977
- return Ss(i);
2977
+ return Cs(i);
2978
2978
  }
2979
- var Sc = [0, be, Ge, le, -1, fr, Ge, -1, le], Nu = class extends k {
2979
+ var Cc = [0, be, Ge, le, -1, fr, Ge, -1, le], Nu = class extends T {
2980
2980
  constructor(e) {
2981
2981
  super(e);
2982
2982
  }
2983
- }, Ic = [0, le, Y, le, Ge, -1, Vi(function(e, t, i) {
2984
- return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[_], i), e.h == 2 ? Kr(e, lu, t) : t.push(Pt(e.g)), !0);
2983
+ }, Ic = [0, le, X, le, Ge, -1, Vi(function(e, t, i) {
2984
+ return (e.h === 0 || e.h === 2) && (t = Pi(t, 0 | t[k], i), e.h == 2 ? Kr(e, lu, t) : t.push(Pt(e.g)), !0);
2985
2985
  }, function(e, t, i) {
2986
- if ((t = Ui(Fi, t)) != null && t.length) {
2987
- i = Ao(e, i);
2986
+ if ((t = Ui(Ri, t)) != null && t.length) {
2987
+ i = To(e, i);
2988
2988
  for (let r = 0; r < t.length; r++) Yr(e.g, t[r]);
2989
- To(e, i);
2989
+ Ao(e, i);
2990
2990
  }
2991
- }, hc), Y, -1, [0, le, -1], Ge, le, -1], Lc = [0, 3, le, -1, 2, [0, be], [0, Ge, le], [0, Y, -1], [0]], Fc = [0, Y, -2], Is = class extends k {
2991
+ }, hc), X, -1, [0, le, -1], Ge, le, -1], Fc = [0, 3, le, -1, 2, [0, be], [0, Ge, le], [0, X, -1], [0]], Rc = [0, X, -2], Is = class extends T {
2992
2992
  constructor(e) {
2993
2993
  super(e);
2994
2994
  }
2995
- }, Rc = [0], Mc = [0, be, le, 1, le, -4], ze = class extends k {
2995
+ }, Lc = [0], Mc = [0, be, le, 1, le, -4], ze = class extends T {
2996
2996
  constructor(e) {
2997
2997
  super(e, 2);
2998
2998
  }
2999
2999
  }, me = {};
3000
- me[336783863] = [0, Y, le, -1, be, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], ae, Rc, ae, Ic, ae, Fc, ae, Mc, ae, Sc, ae, [0, Y, -2], ae, [0, Y, Ge], ae, Lc, ae, [0, Ge, -1, le]], [0, Y], le, [0, [1, 3], [2, 4], ae, [0, fr], -1, ae, [0, ke], -1, ye, [0, Y, -1]], Y];
3001
- var Ls = [0, bn, -1, Yt, -3, bn, fr, Mt, hi, bn, -1, Yt, hi, Yt, -2, Mt];
3000
+ me[336783863] = [0, X, le, -1, be, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], ae, Lc, ae, Ic, ae, Rc, ae, Mc, ae, Cc, ae, [0, X, -2], ae, [0, X, Ge], ae, Fc, ae, [0, Ge, -1, le]], [0, X], le, [0, [1, 3], [2, 4], ae, [0, fr], -1, ae, [0, ke], -1, ye, [0, X, -1]], X];
3001
+ var Fs = [0, bn, -1, Yt, -3, bn, fr, Mt, hi, bn, -1, Yt, hi, Yt, -2, Mt];
3002
3002
  function te(e, t) {
3003
3003
  qr(e, 3, t);
3004
3004
  }
3005
3005
  function U(e, t) {
3006
3006
  qr(e, 4, t);
3007
3007
  }
3008
- var Fe = class extends k {
3008
+ var Re = class extends T {
3009
3009
  constructor(e) {
3010
3010
  super(e, 500);
3011
3011
  }
3012
3012
  o(e) {
3013
- return F(this, 0, 7, e);
3013
+ return R(this, 0, 7, e);
3014
3014
  }
3015
- }, Ji = [-1, {}], Fs = [0, Y, 1, Ji], Rs = [0, Y, ke, Ji];
3015
+ }, Ji = [-1, {}], Rs = [0, X, 1, Ji], Ls = [0, X, ke, Ji];
3016
3016
  function Je(e, t) {
3017
- vo(e, 1, Fe, t);
3017
+ vo(e, 1, Re, t);
3018
3018
  }
3019
3019
  function oe(e, t) {
3020
3020
  qr(e, 10, t);
@@ -3022,35 +3022,35 @@ function oe(e, t) {
3022
3022
  function W(e, t) {
3023
3023
  qr(e, 15, t);
3024
3024
  }
3025
- var $e = class extends k {
3025
+ var $e = class extends T {
3026
3026
  constructor(e) {
3027
3027
  super(e, 500);
3028
3028
  }
3029
3029
  o(e) {
3030
- return F(this, 0, 1001, e);
3030
+ return R(this, 0, 1001, e);
3031
3031
  }
3032
- }, Dc = [-500, ye, [-500, Mt, -1, ke, -3, [-2, me, le], ye, Ns, hi, -1, Fs, Rs, ye, [0, Mt, Yt], Mt, Ls, hi, ke, 987, ke], 4, ye, [-500, Y, -1, [-1, {}], 998, Y], ye, [-500, Y, ke, -1, [-2, {}, le], 997, ke, -1], hi, ye, [-500, Y, ke, Ji, 998, ke], ke, hi, Fs, Rs, ye, [0, Mt, -1, Ji], ke, -2, Ls, Mt, -1, Yt, [0, Yt, ku], 978, Ji, ye, Ns];
3032
+ }, Dc = [-500, ye, [-500, Mt, -1, ke, -3, [-2, me, le], ye, Ns, hi, -1, Rs, Ls, ye, [0, Mt, Yt], Mt, Fs, hi, ke, 987, ke], 4, ye, [-500, X, -1, [-1, {}], 998, X], ye, [-500, X, ke, -1, [-2, {}, le], 997, ke, -1], hi, ye, [-500, X, ke, Ji, 998, ke], ke, hi, Rs, Ls, ye, [0, Mt, -1, Ji], ke, -2, Fs, Mt, -1, Yt, [0, Yt, ku], 978, Ji, ye, Ns];
3033
3033
  $e.prototype.g = nn(Dc);
3034
- var Cu = Bt($e, Dc), Su = class extends k {
3034
+ var Su = Bt($e, Dc), Cu = class extends T {
3035
3035
  constructor(e) {
3036
3036
  super(e);
3037
3037
  }
3038
- }, Pc = class extends k {
3038
+ }, Pc = class extends T {
3039
3039
  constructor(e) {
3040
3040
  super(e);
3041
3041
  }
3042
3042
  g() {
3043
- return xt(this, Su, 1);
3043
+ return xt(this, Cu, 1);
3044
3044
  }
3045
- }, Oc = [0, ye, [0, be, he, Y, -1]], on = Bt(Pc, Oc), Iu = class extends k {
3045
+ }, Oc = [0, ye, [0, be, he, X, -1]], on = Bt(Pc, Oc), Iu = class extends T {
3046
3046
  constructor(e) {
3047
3047
  super(e);
3048
3048
  }
3049
- }, Lu = class extends k {
3049
+ }, Fu = class extends T {
3050
3050
  constructor(e) {
3051
3051
  super(e);
3052
3052
  }
3053
- }, xn = class extends k {
3053
+ }, xn = class extends T {
3054
3054
  constructor(e) {
3055
3055
  super(e);
3056
3056
  }
@@ -3058,51 +3058,51 @@ var Cu = Bt($e, Dc), Su = class extends k {
3058
3058
  return $(this, Iu, 2);
3059
3059
  }
3060
3060
  g() {
3061
- return xt(this, Lu, 5);
3061
+ return xt(this, Fu, 5);
3062
3062
  }
3063
- }, Bc = Bt(class extends k {
3063
+ }, Bc = Bt(class extends T {
3064
3064
  constructor(e) {
3065
3065
  super(e);
3066
3066
  }
3067
- }, [0, ke, fr, Ro, [0, Ge, [0, be, -3], [0, he, -3], [0, be, -1, [0, ye, [0, be, -2]]], ye, [0, he, -1, Y, he]], Y, -1, Ot, ye, [0, be, he], ke, Ot]), Uc = class extends k {
3067
+ }, [0, ke, fr, Lo, [0, Ge, [0, be, -3], [0, he, -3], [0, be, -1, [0, ye, [0, be, -2]]], ye, [0, he, -1, X, he]], X, -1, Ot, ye, [0, be, he], ke, Ot]), Uc = class extends T {
3068
3068
  constructor(e) {
3069
3069
  super(e);
3070
3070
  }
3071
- }, wi = Bt(class extends k {
3071
+ }, wi = Bt(class extends T {
3072
3072
  constructor(e) {
3073
3073
  super(e);
3074
3074
  }
3075
- }, [0, ye, [0, he, -4]]), Vc = class extends k {
3075
+ }, [0, ye, [0, he, -4]]), Vc = class extends T {
3076
3076
  constructor(e) {
3077
3077
  super(e);
3078
3078
  }
3079
- }, wr = Bt(class extends k {
3079
+ }, wr = Bt(class extends T {
3080
3080
  constructor(e) {
3081
3081
  super(e);
3082
3082
  }
3083
- }, [0, ye, [0, he, -4]]), Fu = class extends k {
3083
+ }, [0, ye, [0, he, -4]]), Ru = class extends T {
3084
3084
  constructor(e) {
3085
3085
  super(e);
3086
3086
  }
3087
- }, Ru = [0, be, -1, Ro, Ge], Gc = class extends k {
3087
+ }, Lu = [0, be, -1, Lo, Ge], Gc = class extends T {
3088
3088
  constructor(e) {
3089
3089
  super(e);
3090
3090
  }
3091
3091
  };
3092
3092
  Gc.prototype.g = nn([0, he, -4, Ot]);
3093
- var Mu = class extends k {
3093
+ var Mu = class extends T {
3094
3094
  constructor(e) {
3095
3095
  super(e);
3096
3096
  }
3097
- }, Du = Bt(class extends k {
3097
+ }, Du = Bt(class extends T {
3098
3098
  constructor(e) {
3099
3099
  super(e);
3100
3100
  }
3101
- }, [0, ye, [0, 1, be, Y, Oc], Ot]), Ms = class extends k {
3101
+ }, [0, ye, [0, 1, be, X, Oc], Ot]), Ms = class extends T {
3102
3102
  constructor(e) {
3103
3103
  super(e);
3104
3104
  }
3105
- }, Pu = class extends k {
3105
+ }, Pu = class extends T {
3106
3106
  constructor(e) {
3107
3107
  super(e);
3108
3108
  }
@@ -3110,27 +3110,27 @@ var Mu = class extends k {
3110
3110
  const e = ee(this, 1, void 0, void 0, Ya);
3111
3111
  return e ?? Xt();
3112
3112
  }
3113
- }, Ou = class extends k {
3113
+ }, Ou = class extends T {
3114
3114
  constructor(e) {
3115
3115
  super(e);
3116
3116
  }
3117
- }, jc = [1, 2], Bu = Bt(class extends k {
3117
+ }, jc = [1, 2], Bu = Bt(class extends T {
3118
3118
  constructor(e) {
3119
3119
  super(e);
3120
3120
  }
3121
- }, [0, ye, [0, jc, ae, [0, Ro], ae, [0, Cc], be, Y], Ot]), Mo = class extends k {
3121
+ }, [0, ye, [0, jc, ae, [0, Lo], ae, [0, Sc], be, X], Ot]), Mo = class extends T {
3122
3122
  constructor(e) {
3123
3123
  super(e);
3124
3124
  }
3125
- }, zc = [0, Y, be, he, ke, -1], Ds = class extends k {
3125
+ }, zc = [0, X, be, he, ke, -1], Ds = class extends T {
3126
3126
  constructor(e) {
3127
3127
  super(e);
3128
3128
  }
3129
- }, Uu = [0, le, -1], Ps = class extends k {
3129
+ }, Uu = [0, le, -1], Ps = class extends T {
3130
3130
  constructor(e) {
3131
3131
  super(e);
3132
3132
  }
3133
- }, Tr = [1, 2, 3, 4, 5, 6], Mr = class extends k {
3133
+ }, Ar = [1, 2, 3, 4, 5, 6], Mr = class extends T {
3134
3134
  constructor(e) {
3135
3135
  super(e);
3136
3136
  }
@@ -3140,34 +3140,34 @@ var Mu = class extends k {
3140
3140
  l() {
3141
3141
  return Ee(ee(this, 2)) != null;
3142
3142
  }
3143
- }, se = class extends k {
3143
+ }, se = class extends T {
3144
3144
  constructor(e) {
3145
3145
  super(e);
3146
3146
  }
3147
3147
  g() {
3148
3148
  return Ua(ee(this, 2)) ?? !1;
3149
3149
  }
3150
- }, $c = [0, Cc, Y, [0, be, Ot, -1], [0, Eu, Ot]], fe = [0, $c, le, [0, Tr, ae, Mc, ae, Ic, ae, Sc, ae, Rc, ae, Fc, ae, Lc], Ge], sn = class extends k {
3150
+ }, $c = [0, Sc, X, [0, be, Ot, -1], [0, Eu, Ot]], fe = [0, $c, le, [0, Ar, ae, Mc, ae, Ic, ae, Cc, ae, Lc, ae, Rc, ae, Fc], Ge], sn = class extends T {
3151
3151
  constructor(e) {
3152
3152
  super(e);
3153
3153
  }
3154
3154
  }, Do = [0, fe, he, -1, be], Vu = wt(502141897, sn);
3155
3155
  me[502141897] = Do;
3156
- var Gu = Bt(class extends k {
3156
+ var Gu = Bt(class extends T {
3157
3157
  constructor(e) {
3158
3158
  super(e);
3159
3159
  }
3160
- }, [0, [0, Ge, -1, vu, _u], Ru]), Wc = class extends k {
3160
+ }, [0, [0, Ge, -1, vu, _u], Lu]), Wc = class extends T {
3161
3161
  constructor(e) {
3162
3162
  super(e);
3163
3163
  }
3164
- }, Hc = class extends k {
3164
+ }, Hc = class extends T {
3165
3165
  constructor(e) {
3166
3166
  super(e);
3167
3167
  }
3168
3168
  }, Pn = [0, fe, he, [0, fe], le], ju = wt(508968150, Hc);
3169
3169
  me[508968150] = [0, fe, Do, Pn, he, [0, [0, $c]]], me[508968149] = Pn;
3170
- var ui = class extends k {
3170
+ var ui = class extends T {
3171
3171
  constructor(e) {
3172
3172
  super(e);
3173
3173
  }
@@ -3175,27 +3175,27 @@ var ui = class extends k {
3175
3175
  return $(this, Mo, 2);
3176
3176
  }
3177
3177
  g() {
3178
- H(this, 2);
3178
+ K(this, 2);
3179
3179
  }
3180
3180
  }, qc = [0, fe, zc];
3181
3181
  me[478825465] = qc;
3182
- var zu = class extends k {
3182
+ var zu = class extends T {
3183
3183
  constructor(e) {
3184
3184
  super(e);
3185
3185
  }
3186
- }, Kc = class extends k {
3186
+ }, Kc = class extends T {
3187
3187
  constructor(e) {
3188
3188
  super(e);
3189
3189
  }
3190
- }, Po = class extends k {
3190
+ }, Po = class extends T {
3191
3191
  constructor(e) {
3192
3192
  super(e);
3193
3193
  }
3194
- }, Oo = class extends k {
3194
+ }, Oo = class extends T {
3195
3195
  constructor(e) {
3196
3196
  super(e);
3197
3197
  }
3198
- }, Yc = class extends k {
3198
+ }, Yc = class extends T {
3199
3199
  constructor(e) {
3200
3200
  super(e);
3201
3201
  }
@@ -3203,55 +3203,55 @@ var zu = class extends k {
3203
3203
  me[479097054] = [0, fe, Qc, Os], me[463370452] = Os, me[464864288] = Xc;
3204
3204
  var Wu = wt(462713202, Oo);
3205
3205
  me[462713202] = Qc, me[474472470] = Bo;
3206
- var Hu = class extends k {
3206
+ var Hu = class extends T {
3207
3207
  constructor(e) {
3208
3208
  super(e);
3209
3209
  }
3210
- }, Jc = class extends k {
3210
+ }, Jc = class extends T {
3211
3211
  constructor(e) {
3212
3212
  super(e);
3213
3213
  }
3214
- }, Zc = class extends k {
3214
+ }, Zc = class extends T {
3215
3215
  constructor(e) {
3216
3216
  super(e);
3217
3217
  }
3218
- }, el = class extends k {
3218
+ }, el = class extends T {
3219
3219
  constructor(e) {
3220
3220
  super(e);
3221
3221
  }
3222
3222
  }, Uo = [0, fe, he, -1, be], On = [0, fe, he, le];
3223
3223
  el.prototype.g = nn([0, fe, Bo, [0, fe], Do, Pn, Uo, On]);
3224
- var tl = class extends k {
3224
+ var tl = class extends T {
3225
3225
  constructor(e) {
3226
3226
  super(e);
3227
3227
  }
3228
3228
  }, qu = wt(456383383, tl);
3229
3229
  me[456383383] = [0, fe, zc];
3230
- var il = class extends k {
3230
+ var il = class extends T {
3231
3231
  constructor(e) {
3232
3232
  super(e);
3233
3233
  }
3234
3234
  }, Ku = wt(476348187, il);
3235
3235
  me[476348187] = [0, fe, Uu];
3236
- var rl = class extends k {
3236
+ var rl = class extends T {
3237
3237
  constructor(e) {
3238
3238
  super(e);
3239
3239
  }
3240
- }, Bs = class extends k {
3240
+ }, Bs = class extends T {
3241
3241
  constructor(e) {
3242
3242
  super(e);
3243
3243
  }
3244
- }, nl = [0, Ge, -1], Yu = wt(458105876, class extends k {
3244
+ }, nl = [0, Ge, -1], Yu = wt(458105876, class extends T {
3245
3245
  constructor(e) {
3246
3246
  super(e);
3247
3247
  }
3248
3248
  g() {
3249
3249
  let e;
3250
3250
  var t = this.v;
3251
- const i = 0 | t[_];
3251
+ const i = 0 | t[k];
3252
3252
  return e = Ue(this, i), t = function(r, n, o, s) {
3253
3253
  var a = Bs;
3254
- !s && Mi(r) && (o = 0 | (n = r.v)[_]);
3254
+ !s && Mi(r) && (o = 0 | (n = r.v)[k]);
3255
3255
  var l = vt(n, 2);
3256
3256
  if (r = !1, l == null) {
3257
3257
  if (s) return ys();
@@ -3259,7 +3259,7 @@ var rl = class extends k {
3259
3259
  } else if (l.constructor === bt) {
3260
3260
  if (!(2 & l.J) || s) return l;
3261
3261
  l = l.V();
3262
- } else Array.isArray(l) ? r = !!(2 & (0 | l[_])) : l = [];
3262
+ } else Array.isArray(l) ? r = !!(2 & (0 | l[k])) : l = [];
3263
3263
  if (s) {
3264
3264
  if (!l.length) return ys();
3265
3265
  r || (r = !0, cr(l));
@@ -3268,40 +3268,40 @@ var rl = class extends k {
3268
3268
  }(this, t, i, e), !e && Bs && (t.ra = !0), t;
3269
3269
  }
3270
3270
  });
3271
- me[458105876] = [0, nl, bu, [!0, Ot, [0, Y, -1, ke]], [0, fr, le, Ge]];
3272
- var Vo = class extends k {
3271
+ me[458105876] = [0, nl, bu, [!0, Ot, [0, X, -1, ke]], [0, fr, le, Ge]];
3272
+ var Vo = class extends T {
3273
3273
  constructor(e) {
3274
3274
  super(e);
3275
3275
  }
3276
3276
  }, ol = wt(458105758, Vo);
3277
- me[458105758] = [0, fe, Y, nl];
3278
- var En = class extends k {
3277
+ me[458105758] = [0, fe, X, nl];
3278
+ var En = class extends T {
3279
3279
  constructor(e) {
3280
3280
  super(e);
3281
3281
  }
3282
- }, Us = [0, xu, -1, Yt], Xu = class extends k {
3282
+ }, Us = [0, xu, -1, Yt], Xu = class extends T {
3283
3283
  constructor(e) {
3284
3284
  super(e);
3285
3285
  }
3286
- }, sl = class extends k {
3286
+ }, sl = class extends T {
3287
3287
  constructor(e) {
3288
3288
  super(e);
3289
3289
  }
3290
3290
  }, Bn = [1, 2];
3291
3291
  sl.prototype.g = nn([0, Bn, ae, Us, ae, [0, ye, Us]]);
3292
- var al = class extends k {
3292
+ var al = class extends T {
3293
3293
  constructor(e) {
3294
3294
  super(e);
3295
3295
  }
3296
3296
  }, Qu = wt(443442058, al);
3297
- me[443442058] = [0, fe, Y, be, he, ke, -1, le, he], me[514774813] = Uo;
3298
- var cl = class extends k {
3297
+ me[443442058] = [0, fe, X, be, he, ke, -1, le, he], me[514774813] = Uo;
3298
+ var cl = class extends T {
3299
3299
  constructor(e) {
3300
3300
  super(e);
3301
3301
  }
3302
3302
  }, Ju = wt(516587230, cl);
3303
3303
  function Un(e, t) {
3304
- return t = t ? t.clone() : new Mo(), e.displayNamesLocale !== void 0 ? H(t, 1, ur(e.displayNamesLocale)) : e.displayNamesLocale === void 0 && H(t, 1), e.maxResults !== void 0 ? Et(t, 2, e.maxResults) : "maxResults" in e && H(t, 2), e.scoreThreshold !== void 0 ? C(t, 3, e.scoreThreshold) : "scoreThreshold" in e && H(t, 3), e.categoryAllowlist !== void 0 ? Ir(t, 4, e.categoryAllowlist) : "categoryAllowlist" in e && H(t, 4), e.categoryDenylist !== void 0 ? Ir(t, 5, e.categoryDenylist) : "categoryDenylist" in e && H(t, 5), t;
3304
+ return t = t ? t.clone() : new Mo(), e.displayNamesLocale !== void 0 ? K(t, 1, ur(e.displayNamesLocale)) : e.displayNamesLocale === void 0 && K(t, 1), e.maxResults !== void 0 ? Et(t, 2, e.maxResults) : "maxResults" in e && K(t, 2), e.scoreThreshold !== void 0 ? C(t, 3, e.scoreThreshold) : "scoreThreshold" in e && K(t, 3), e.categoryAllowlist !== void 0 ? Ir(t, 4, e.categoryAllowlist) : "categoryAllowlist" in e && K(t, 4), e.categoryDenylist !== void 0 ? Ir(t, 5, e.categoryDenylist) : "categoryDenylist" in e && K(t, 5), t;
3305
3305
  }
3306
3306
  function ll(e) {
3307
3307
  const t = Number(e);
@@ -3316,15 +3316,15 @@ function Zu(e) {
3316
3316
  return Go(((r = $(i, Pc, 4)) == null ? void 0 : r.g()) ?? [], Xe(i, 2) ?? 0, Ee(ee(i, 3)) ?? "");
3317
3317
  }) };
3318
3318
  return function(i) {
3319
- return Kd(to ? ee(i, 2, void 0, void 0, Cr) : ee(i, 2));
3319
+ return Kd(to ? ee(i, 2, void 0, void 0, Sr) : ee(i, 2));
3320
3320
  }(e) != null && (t.timestampMs = ll(tc(e))), t;
3321
3321
  }
3322
3322
  function dl(e) {
3323
3323
  var s, a;
3324
- var t = $t(e, 3, lt, zt()), i = $t(e, 2, Fi, zt()), r = $t(e, 1, Ee, zt()), n = $t(e, 9, Ee, zt());
3324
+ var t = $t(e, 3, lt, zt()), i = $t(e, 2, Ri, zt()), r = $t(e, 1, Ee, zt()), n = $t(e, 9, Ee, zt());
3325
3325
  const o = { categories: [], keypoints: [] };
3326
3326
  for (let l = 0; l < t.length; l++) o.categories.push({ score: t[l], index: i[l] ?? -1, categoryName: r[l] ?? "", displayName: n[l] ?? "" });
3327
- if ((t = (s = $(e, xn, 4)) == null ? void 0 : s.l()) && (o.boundingBox = { originX: Xe(t, 1, St) ?? 0, originY: Xe(t, 2, St) ?? 0, width: Xe(t, 3, St) ?? 0, height: Xe(t, 4, St) ?? 0, angle: 0 }), (a = $(e, xn, 4)) == null ? void 0 : a.g().length) for (const l of $(e, xn, 4).g()) o.keypoints.push({ x: ee(l, 1, void 0, St, lt) ?? 0, y: ee(l, 2, void 0, St, lt) ?? 0, score: ee(l, 4, void 0, St, lt) ?? 0, label: Ee(ee(l, 3, void 0, St)) ?? "" });
3327
+ if ((t = (s = $(e, xn, 4)) == null ? void 0 : s.l()) && (o.boundingBox = { originX: Xe(t, 1, Ct) ?? 0, originY: Xe(t, 2, Ct) ?? 0, width: Xe(t, 3, Ct) ?? 0, height: Xe(t, 4, Ct) ?? 0, angle: 0 }), (a = $(e, xn, 4)) == null ? void 0 : a.g().length) for (const l of $(e, xn, 4).g()) o.keypoints.push({ x: ee(l, 1, void 0, Ct, lt) ?? 0, y: ee(l, 2, void 0, Ct, lt) ?? 0, score: ee(l, 4, void 0, Ct, lt) ?? 0, label: Ee(ee(l, 3, void 0, Ct)) ?? "" });
3328
3328
  return o;
3329
3329
  }
3330
3330
  function an(e) {
@@ -3349,16 +3349,16 @@ function Gs(e, t) {
3349
3349
  }
3350
3350
  let xr;
3351
3351
  me[516587230] = [0, fe, Uo, On, he], me[518928384] = On;
3352
- const e1 = 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]);
3352
+ const e2 = 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]);
3353
3353
  async function ul() {
3354
3354
  if (xr === void 0) try {
3355
- await WebAssembly.instantiate(e1), xr = !0;
3355
+ await WebAssembly.instantiate(e2), xr = !0;
3356
3356
  } catch {
3357
3357
  xr = !1;
3358
3358
  }
3359
3359
  return xr;
3360
3360
  }
3361
- async function Ki(e, t = Tu``) {
3361
+ async function Ki(e, t = Au``) {
3362
3362
  const i = await ul() ? "wasm_internal" : "wasm_nosimd_internal";
3363
3363
  return { wasmLoaderPath: `${t}/${e}_${i}.js`, wasmBinaryPath: `${t}/${e}_${i}.wasm` };
3364
3364
  }
@@ -3431,7 +3431,7 @@ jt.forVisionTasks = function(e) {
3431
3431
  }, jt.isSimdSupported = function() {
3432
3432
  return ul();
3433
3433
  };
3434
- async function t1(e, t, i, r) {
3434
+ async function t2(e, t, i, r) {
3435
3435
  return e = await (async (n, o, s, a, l) => {
3436
3436
  if (o && await js(o), !self.ModuleFactory || s && (await js(s), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
3437
3437
  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);
@@ -3439,7 +3439,7 @@ async function t1(e, t, i, r) {
3439
3439
  }
3440
3440
  function _n(e, t) {
3441
3441
  const i = $(e.baseOptions, Mr, 1) || new Mr();
3442
- typeof t == "string" ? (H(i, 2, ur(t)), H(i, 1)) : t instanceof Uint8Array && (H(i, 1, no(t, !1)), H(i, 2)), F(e.baseOptions, 0, 1, i);
3442
+ typeof t == "string" ? (K(i, 2, ur(t)), K(i, 1)) : t instanceof Uint8Array && (K(i, 1, no(t, !1)), K(i, 2)), R(e.baseOptions, 0, 1, i);
3443
3443
  }
3444
3444
  function Ws(e) {
3445
3445
  try {
@@ -3454,7 +3454,7 @@ function x(e, t) {
3454
3454
  e.C = Math.max(e.C, t);
3455
3455
  }
3456
3456
  function cn(e, t) {
3457
- e.B = new Fe(), Ve(e.B, 2, "PassThroughCalculator"), te(e.B, "free_memory"), U(e.B, "free_memory_unused_out"), oe(t, "free_memory"), Je(t, e.B);
3457
+ e.B = new Re(), Ve(e.B, 2, "PassThroughCalculator"), te(e.B, "free_memory"), U(e.B, "free_memory_unused_out"), oe(t, "free_memory"), Je(t, e.B);
3458
3458
  }
3459
3459
  function ki(e, t) {
3460
3460
  te(e.B, t), U(e.B, t + "_unused_out");
@@ -3476,9 +3476,9 @@ var Vn = class {
3476
3476
  let h = $(u.baseOptions, Ps, 3);
3477
3477
  if (!h) {
3478
3478
  var f = h = new Ps(), w = new Is();
3479
- Qi(f, 4, Tr, w);
3479
+ Qi(f, 4, Ar, w);
3480
3480
  }
3481
- "delegate" in d && (d.delegate === "GPU" ? (d = h, f = new Nu(), Qi(d, 2, Tr, f)) : (d = h, f = new Is(), Qi(d, 4, Tr, f))), F(u.baseOptions, 0, 3, h);
3481
+ "delegate" in d && (d.delegate === "GPU" ? (d = h, f = new Nu(), Qi(d, 2, Ar, f)) : (d = h, f = new Is(), Qi(d, 4, Ar, f))), R(u.baseOptions, 0, 3, h);
3482
3482
  }(this, l), l.modelAssetPath) return fetch(l.modelAssetPath.toString()).then((u) => {
3483
3483
  if (u.ok) return u.arrayBuffer();
3484
3484
  throw Error(`Failed to fetch model: ${l.modelAssetPath} (${u.status})`);
@@ -3513,7 +3513,7 @@ var Vn = class {
3513
3513
  ca() {
3514
3514
  let e;
3515
3515
  if (this.g.ca((t) => {
3516
- e = Cu(t);
3516
+ e = Su(t);
3517
3517
  }), !e) throw Error("Failed to retrieve CalculatorGraphConfig");
3518
3518
  return e;
3519
3519
  }
@@ -3534,7 +3534,7 @@ function Dt(e, t) {
3534
3534
  return e;
3535
3535
  }
3536
3536
  Vn.prototype.close = Vn.prototype.close;
3537
- class i1 {
3537
+ class i2 {
3538
3538
  constructor(t, i, r, n) {
3539
3539
  this.g = t, this.h = i, this.m = r, this.l = n;
3540
3540
  }
@@ -3556,14 +3556,14 @@ function qs(e, t) {
3556
3556
  const n = Dt(i.createBuffer(), "Failed to create buffer");
3557
3557
  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);
3558
3558
  const o = Dt(i.createBuffer(), "Failed to create buffer");
3559
- 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 i1(i, r, n, o);
3559
+ 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 i2(i, r, n, o);
3560
3560
  }
3561
3561
  function jo(e, t) {
3562
3562
  if (e.g) {
3563
3563
  if (t !== e.g) throw Error("Cannot change GL context once initialized");
3564
3564
  } else e.g = t;
3565
3565
  }
3566
- function r1(e, t, i, r) {
3566
+ function r2(e, t, i, r) {
3567
3567
  return jo(e, t), e.h || (e.m(), e.D()), i ? (e.u || (e.u = qs(e, !0)), i = e.u) : (e.A || (e.A = qs(e, !1)), i = e.A), t.useProgram(e.h), i.bind(), e.l(), e = r(), i.g.bindVertexArray(null), e;
3568
3568
  }
3569
3569
  function wl(e, t, i) {
@@ -3572,7 +3572,7 @@ function wl(e, t, i) {
3572
3572
  function ml(e, t, i) {
3573
3573
  jo(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);
3574
3574
  }
3575
- function n1(e) {
3575
+ function n2(e) {
3576
3576
  var t;
3577
3577
  (t = e.g) == null || t.bindFramebuffer(e.g.FRAMEBUFFER, null);
3578
3578
  }
@@ -3629,7 +3629,7 @@ function Gn(e) {
3629
3629
  if (t = pt(e, 0)) t = new Float32Array(t).map((r) => r / 255);
3630
3630
  else {
3631
3631
  t = new Float32Array(e.width * e.height);
3632
- const r = Ai(e);
3632
+ const r = Ti(e);
3633
3633
  var i = zo(e);
3634
3634
  if (ml(i, r, pl(e)), "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "document" in self && "ontouchend" in self.document) {
3635
3635
  i = new Float32Array(e.width * e.height * 4), r.readPixels(0, 0, e.width, e.height, r.RGBA, r.FLOAT, i);
@@ -3643,19 +3643,19 @@ function Gn(e) {
3643
3643
  function pl(e) {
3644
3644
  let t = pt(e, 2);
3645
3645
  if (!t) {
3646
- const i = Ai(e);
3646
+ const i = Ti(e);
3647
3647
  t = bl(e);
3648
3648
  const r = Gn(e), n = yl(e);
3649
3649
  i.texImage2D(i.TEXTURE_2D, 0, n, e.width, e.height, 0, i.RED, i.FLOAT, r), jn(e);
3650
3650
  }
3651
3651
  return t;
3652
3652
  }
3653
- function Ai(e) {
3653
+ function Ti(e) {
3654
3654
  if (!e.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
3655
3655
  return e.h || (e.h = Dt(e.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), e.h;
3656
3656
  }
3657
3657
  function yl(e) {
3658
- if (e = Ai(e), !Er) if (e.getExtension("EXT_color_buffer_float") && e.getExtension("OES_texture_float_linear") && e.getExtension("EXT_float_blend")) Er = e.R32F;
3658
+ if (e = Ti(e), !Er) if (e.getExtension("EXT_color_buffer_float") && e.getExtension("OES_texture_float_linear") && e.getExtension("EXT_float_blend")) Er = e.R32F;
3659
3659
  else {
3660
3660
  if (!e.getExtension("EXT_color_buffer_half_float")) throw Error("GPU does not fully support 4-channel float32 or float16 formats");
3661
3661
  Er = e.R16F;
@@ -3666,7 +3666,7 @@ function zo(e) {
3666
3666
  return e.l || (e.l = new gl()), e.l;
3667
3667
  }
3668
3668
  function bl(e) {
3669
- const t = Ai(e);
3669
+ const t = Ti(e);
3670
3670
  t.viewport(0, 0, e.width, e.height), t.activeTexture(t.TEXTURE0);
3671
3671
  let i = pt(e, 2);
3672
3672
  return i || (i = wl(zo(e), t, e.m ? t.LINEAR : t.NEAREST), e.g.push(i), e.j = !0), t.bindTexture(t.TEXTURE_2D, i), i;
@@ -3706,12 +3706,12 @@ var Er, pe = class {
3706
3706
  else {
3707
3707
  if (!(t instanceof WebGLTexture)) throw Error(`Type is not supported: ${t}`);
3708
3708
  {
3709
- const r = Ai(this), n = zo(this);
3709
+ const r = Ti(this), n = zo(this);
3710
3710
  r.activeTexture(r.TEXTURE1), i = wl(n, r, this.m ? r.LINEAR : r.NEAREST), r.bindTexture(r.TEXTURE_2D, i);
3711
3711
  const o = yl(this);
3712
- r.texImage2D(r.TEXTURE_2D, 0, o, this.width, this.height, 0, r.RED, r.FLOAT, null), r.bindTexture(r.TEXTURE_2D, null), ml(n, r, i), r1(n, r, !1, () => {
3712
+ r.texImage2D(r.TEXTURE_2D, 0, o, this.width, this.height, 0, r.RED, r.FLOAT, null), r.bindTexture(r.TEXTURE_2D, null), ml(n, r, i), r2(n, r, !1, () => {
3713
3713
  bl(this), r.clearColor(0, 0, 0, 0), r.clear(r.COLOR_BUFFER_BIT), r.drawArrays(r.TRIANGLE_FAN, 0, 4), jn(this);
3714
- }), n1(n), jn(this);
3714
+ }), n2(n), jn(this);
3715
3715
  }
3716
3716
  }
3717
3717
  e.push(i);
@@ -3719,7 +3719,7 @@ var Er, pe = class {
3719
3719
  return new pe(e, this.m, this.R(), this.canvas, this.l, this.width, this.height);
3720
3720
  }
3721
3721
  close() {
3722
- this.j && Ai(this).deleteTexture(pt(this, 2)), Ks = -1;
3722
+ this.j && Ti(this).deleteTexture(pt(this, 2)), Ks = -1;
3723
3723
  }
3724
3724
  };
3725
3725
  pe.prototype.close = pe.prototype.close, pe.prototype.clone = pe.prototype.clone, pe.prototype.getAsWebGLTexture = pe.prototype.N, pe.prototype.getAsFloat32Array = pe.prototype.ia, pe.prototype.getAsUint8Array = pe.prototype.ja, pe.prototype.hasWebGLTexture = pe.prototype.R, pe.prototype.hasFloat32Array = pe.prototype.ka, pe.prototype.hasUint8Array = pe.prototype.Fa;
@@ -3727,7 +3727,7 @@ var Ks = 250;
3727
3727
  function it(...e) {
3728
3728
  return e.map(([t, i]) => ({ start: t, end: i }));
3729
3729
  }
3730
- const o1 = /* @__PURE__ */ function(e) {
3730
+ const o2 = /* @__PURE__ */ function(e) {
3731
3731
  return class extends e {
3732
3732
  Ja() {
3733
3733
  this.i._registerModelResourcesGraphService();
@@ -4090,11 +4090,11 @@ const o1 = /* @__PURE__ */ function(e) {
4090
4090
  });
4091
4091
  }
4092
4092
  }));
4093
- var Ys, rt = class extends o1 {
4093
+ var Ys, rt = class extends o2 {
4094
4094
  };
4095
4095
  async function j(e, t, i) {
4096
4096
  return async function(r, n, o, s) {
4097
- return t1(r, n, o, s);
4097
+ return t2(r, n, o, s);
4098
4098
  }(e, i.canvas ?? (hl() ? void 0 : document.createElement("canvas")), t, i);
4099
4099
  }
4100
4100
  function vl(e, t, i, r) {
@@ -4128,7 +4128,7 @@ function mt(e, t, i, r) {
4128
4128
  if (!((n = e.baseOptions) != null && n.g())) throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");
4129
4129
  vl(e, t, i, r);
4130
4130
  }
4131
- function Ti(e, t, i, r) {
4131
+ function Ai(e, t, i, r) {
4132
4132
  var n = t.data;
4133
4133
  const o = t.width, s = o * (t = t.height);
4134
4134
  if ((n instanceof Uint8Array || n instanceof Float32Array) && n.length !== s) throw Error("Unsupported channel count: " + n.length / s);
@@ -4139,7 +4139,7 @@ var je = class extends Vn {
4139
4139
  super(e), this.g = e, this.X = t, this.U = i, this.oa = r, this.P = new gl();
4140
4140
  }
4141
4141
  l(e, t = !0) {
4142
- if ("runningMode" in e && H(this.baseOptions, 2, nr(!!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.");
4142
+ if ("runningMode" in e && K(this.baseOptions, 2, nr(!!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.");
4143
4143
  return super.l(e, t);
4144
4144
  }
4145
4145
  close() {
@@ -4149,13 +4149,13 @@ var je = class extends Vn {
4149
4149
  je.prototype.close = je.prototype.close;
4150
4150
  var qe = class extends je {
4151
4151
  constructor(e, t) {
4152
- super(new rt(e, t), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, F(e = this.h = new sn(), 0, 1, t = new se()), C(this.h, 2, 0.5), C(this.h, 3, 0.3);
4152
+ super(new rt(e, t), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, R(e = this.h = new sn(), 0, 1, t = new se()), C(this.h, 2, 0.5), C(this.h, 3, 0.3);
4153
4153
  }
4154
4154
  get baseOptions() {
4155
4155
  return $(this.h, se, 1);
4156
4156
  }
4157
4157
  set baseOptions(e) {
4158
- F(this.h, 0, 1, e);
4158
+ R(this.h, 0, 1, e);
4159
4159
  }
4160
4160
  o(e) {
4161
4161
  return "minDetectionConfidence" in e && C(this.h, 2, e.minDetectionConfidence ?? 0.5), "minSuppressionThreshold" in e && C(this.h, 3, e.minSuppressionThreshold ?? 0.3), this.l(e);
@@ -4171,7 +4171,7 @@ var qe = class extends je {
4171
4171
  oe(e, "image_in"), oe(e, "norm_rect_in"), W(e, "detections");
4172
4172
  const t = new ze();
4173
4173
  ft(t, Vu, this.h);
4174
- const i = new Fe();
4174
+ const i = new Re();
4175
4175
  Ve(i, 2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect_in"), U(i, "DETECTIONS:detections"), i.o(t), Je(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
4176
4176
  for (const o of r) r = Bc(o), this.j.detections.push(dl(r));
4177
4177
  x(this, n);
@@ -4193,13 +4193,13 @@ function Xs(e) {
4193
4193
  }
4194
4194
  var re = class extends je {
4195
4195
  constructor(e, t) {
4196
- super(new rt(e, t), "image_in", "norm_rect", !1), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, F(e = this.h = new Hc(), 0, 1, t = new se()), this.A = new Wc(), F(this.h, 0, 3, this.A), this.u = new sn(), F(this.h, 0, 2, this.u), Et(this.u, 4, 1), C(this.u, 2, 0.5), C(this.A, 2, 0.5), C(this.h, 4, 0.5);
4196
+ super(new rt(e, t), "image_in", "norm_rect", !1), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, R(e = this.h = new Hc(), 0, 1, t = new se()), this.A = new Wc(), R(this.h, 0, 3, this.A), this.u = new sn(), R(this.h, 0, 2, this.u), Et(this.u, 4, 1), C(this.u, 2, 0.5), C(this.A, 2, 0.5), C(this.h, 4, 0.5);
4197
4197
  }
4198
4198
  get baseOptions() {
4199
4199
  return $(this.h, se, 1);
4200
4200
  }
4201
4201
  set baseOptions(e) {
4202
- F(this.h, 0, 1, e);
4202
+ R(this.h, 0, 1, e);
4203
4203
  }
4204
4204
  o(e) {
4205
4205
  return "numFaces" in e && Et(this.u, 4, e.numFaces ?? 1), "minFaceDetectionConfidence" in e && C(this.u, 2, e.minFaceDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && C(this.h, 4, e.minTrackingConfidence ?? 0.5), "minFacePresenceConfidence" in e && C(this.A, 2, e.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in e && (this.outputFaceBlendshapes = !!e.outputFaceBlendshapes), "outputFacialTransformationMatrixes" in e && (this.outputFacialTransformationMatrixes = !!e.outputFacialTransformationMatrixes), this.l(e);
@@ -4215,7 +4215,7 @@ var re = class extends je {
4215
4215
  oe(e, "image_in"), oe(e, "norm_rect"), W(e, "face_landmarks");
4216
4216
  const t = new ze();
4217
4217
  ft(t, ju, this.h);
4218
- const i = new Fe();
4218
+ const i = new Re();
4219
4219
  Ve(i, 2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), U(i, "NORM_LANDMARKS:face_landmarks"), i.o(t), Je(e, i), this.g.attachProtoVectorListener("face_landmarks", (r, n) => {
4220
4220
  for (const o of r) r = wr(o), this.j.faceLandmarks.push(an(r));
4221
4221
  x(this, n);
@@ -4227,7 +4227,7 @@ var re = class extends je {
4227
4227
  }), this.g.attachEmptyPacketListener("blendshapes", (r) => {
4228
4228
  x(this, r);
4229
4229
  })), this.outputFacialTransformationMatrixes && (W(e, "face_geometry"), U(i, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", (r, n) => {
4230
- if (this.outputFacialTransformationMatrixes) for (const o of r) (r = $(r = Gu(o), Fu, 2)) && this.j.facialTransformationMatrixes.push({ rows: Xe(r, 1) ?? 0 ?? 0, columns: Xe(r, 2) ?? 0 ?? 0, data: $t(r, 3, lt, zt()).slice() ?? [] });
4230
+ if (this.outputFacialTransformationMatrixes) for (const o of r) (r = $(r = Gu(o), Ru, 2)) && this.j.facialTransformationMatrixes.push({ rows: Xe(r, 1) ?? 0 ?? 0, columns: Xe(r, 2) ?? 0 ?? 0, data: $t(r, 3, lt, zt()).slice() ?? [] });
4231
4231
  x(this, n);
4232
4232
  }), this.g.attachEmptyPacketListener("face_geometry", (r) => {
4233
4233
  x(this, r);
@@ -4258,23 +4258,23 @@ function Zs(e, t = !0) {
4258
4258
  }
4259
4259
  return i;
4260
4260
  }
4261
- var Re = class extends je {
4261
+ var Le = class extends je {
4262
4262
  constructor(e, t) {
4263
- super(new rt(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], F(e = this.j = new Yc(), 0, 1, t = new se()), this.u = new Oo(), F(this.j, 0, 2, this.u), this.D = new Po(), F(this.u, 0, 3, this.D), this.A = new Kc(), F(this.u, 0, 2, this.A), this.h = new zu(), F(this.j, 0, 3, this.h), C(this.A, 2, 0.5), C(this.u, 4, 0.5), C(this.D, 2, 0.5);
4263
+ super(new rt(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], R(e = this.j = new Yc(), 0, 1, t = new se()), this.u = new Oo(), R(this.j, 0, 2, this.u), this.D = new Po(), R(this.u, 0, 3, this.D), this.A = new Kc(), R(this.u, 0, 2, this.A), this.h = new zu(), R(this.j, 0, 3, this.h), C(this.A, 2, 0.5), C(this.u, 4, 0.5), C(this.D, 2, 0.5);
4264
4264
  }
4265
4265
  get baseOptions() {
4266
4266
  return $(this.j, se, 1);
4267
4267
  }
4268
4268
  set baseOptions(e) {
4269
- F(this.j, 0, 1, e);
4269
+ R(this.j, 0, 1, e);
4270
4270
  }
4271
4271
  o(e) {
4272
4272
  var n, o, s, a;
4273
4273
  if (Et(this.A, 3, e.numHands ?? 1), "minHandDetectionConfidence" in e && C(this.A, 2, e.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && C(this.u, 4, e.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in e && C(this.D, 2, e.minHandPresenceConfidence ?? 0.5), e.cannedGesturesClassifierOptions) {
4274
4274
  var t = new ui(), i = t, r = Un(e.cannedGesturesClassifierOptions, (n = $(this.h, ui, 3)) == null ? void 0 : n.l());
4275
- F(i, 0, 2, r), F(this.h, 0, 3, t);
4275
+ R(i, 0, 2, r), R(this.h, 0, 3, t);
4276
4276
  } else e.cannedGesturesClassifierOptions === void 0 && ((o = $(this.h, ui, 3)) == null || o.g());
4277
- return e.customGesturesClassifierOptions ? (F(i = t = new ui(), 0, 2, r = Un(e.customGesturesClassifierOptions, (s = $(this.h, ui, 4)) == null ? void 0 : s.l())), F(this.h, 0, 4, t)) : e.customGesturesClassifierOptions === void 0 && ((a = $(this.h, ui, 4)) == null || a.g()), this.l(e);
4277
+ return e.customGesturesClassifierOptions ? (R(i = t = new ui(), 0, 2, r = Un(e.customGesturesClassifierOptions, (s = $(this.h, ui, 4)) == null ? void 0 : s.l())), R(this.h, 0, 4, t)) : e.customGesturesClassifierOptions === void 0 && ((a = $(this.h, ui, 4)) == null || a.g()), this.l(e);
4278
4278
  }
4279
4279
  Ha(e, t) {
4280
4280
  return Qs(this), nt(this, e, t), Js(this);
@@ -4287,7 +4287,7 @@ var Re = class extends je {
4287
4287
  oe(e, "image_in"), oe(e, "norm_rect"), W(e, "hand_gestures"), W(e, "hand_landmarks"), W(e, "world_hand_landmarks"), W(e, "handedness");
4288
4288
  const t = new ze();
4289
4289
  ft(t, $u, this.j);
4290
- const i = new Fe();
4290
+ const i = new Re();
4291
4291
  Ve(i, 2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), U(i, "HAND_GESTURES:hand_gestures"), U(i, "LANDMARKS:hand_landmarks"), U(i, "WORLD_LANDMARKS:world_hand_landmarks"), U(i, "HANDEDNESS:handedness"), i.o(t), Je(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
4292
4292
  for (const o of r) {
4293
4293
  r = wr(o);
@@ -4322,22 +4322,22 @@ var Re = class extends je {
4322
4322
  function ea(e) {
4323
4323
  return { landmarks: e.landmarks, worldLandmarks: e.worldLandmarks, handednesses: e.handedness, handedness: e.handedness };
4324
4324
  }
4325
- Re.prototype.recognizeForVideo = Re.prototype.Ia, Re.prototype.recognize = Re.prototype.Ha, Re.prototype.setOptions = Re.prototype.o, Re.createFromModelPath = function(e, t) {
4326
- return j(Re, e, { baseOptions: { modelAssetPath: t } });
4327
- }, Re.createFromModelBuffer = function(e, t) {
4328
- return j(Re, e, { baseOptions: { modelAssetBuffer: t } });
4329
- }, Re.createFromOptions = function(e, t) {
4330
- return j(Re, e, t);
4331
- }, Re.HAND_CONNECTIONS = Xo;
4325
+ Le.prototype.recognizeForVideo = Le.prototype.Ia, Le.prototype.recognize = Le.prototype.Ha, Le.prototype.setOptions = Le.prototype.o, Le.createFromModelPath = function(e, t) {
4326
+ return j(Le, e, { baseOptions: { modelAssetPath: t } });
4327
+ }, Le.createFromModelBuffer = function(e, t) {
4328
+ return j(Le, e, { baseOptions: { modelAssetBuffer: t } });
4329
+ }, Le.createFromOptions = function(e, t) {
4330
+ return j(Le, e, t);
4331
+ }, Le.HAND_CONNECTIONS = Xo;
4332
4332
  var Me = class extends je {
4333
4333
  constructor(e, t) {
4334
- super(new rt(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], F(e = this.h = new Oo(), 0, 1, t = new se()), this.u = new Po(), F(this.h, 0, 3, this.u), this.j = new Kc(), F(this.h, 0, 2, this.j), Et(this.j, 3, 1), C(this.j, 2, 0.5), C(this.u, 2, 0.5), C(this.h, 4, 0.5);
4334
+ super(new rt(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], R(e = this.h = new Oo(), 0, 1, t = new se()), this.u = new Po(), R(this.h, 0, 3, this.u), this.j = new Kc(), R(this.h, 0, 2, this.j), Et(this.j, 3, 1), C(this.j, 2, 0.5), C(this.u, 2, 0.5), C(this.h, 4, 0.5);
4335
4335
  }
4336
4336
  get baseOptions() {
4337
4337
  return $(this.h, se, 1);
4338
4338
  }
4339
4339
  set baseOptions(e) {
4340
- F(this.h, 0, 1, e);
4340
+ R(this.h, 0, 1, e);
4341
4341
  }
4342
4342
  o(e) {
4343
4343
  return "numHands" in e && Et(this.j, 3, e.numHands ?? 1), "minHandDetectionConfidence" in e && C(this.j, 2, e.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && C(this.h, 4, e.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in e && C(this.u, 2, e.minHandPresenceConfidence ?? 0.5), this.l(e);
@@ -4353,7 +4353,7 @@ var Me = class extends je {
4353
4353
  oe(e, "image_in"), oe(e, "norm_rect"), W(e, "hand_landmarks"), W(e, "world_hand_landmarks"), W(e, "handedness");
4354
4354
  const t = new ze();
4355
4355
  ft(t, Wu, this.h);
4356
- const i = new Fe();
4356
+ const i = new Re();
4357
4357
  Ve(i, 2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), U(i, "LANDMARKS:hand_landmarks"), U(i, "WORLD_LANDMARKS:world_hand_landmarks"), U(i, "HANDEDNESS:handedness"), i.o(t), Je(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
4358
4358
  for (const o of r) r = wr(o), this.landmarks.push(an(r));
4359
4359
  x(this, n);
@@ -4386,7 +4386,7 @@ Me.prototype.detectForVideo = Me.prototype.G, Me.prototype.detect = Me.prototype
4386
4386
  }, Me.createFromOptions = function(e, t) {
4387
4387
  return j(Me, e, t);
4388
4388
  }, Me.HAND_CONNECTIONS = Xo;
4389
- var Al = it([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]);
4389
+ var Tl = it([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]);
4390
4390
  function ta(e) {
4391
4391
  e.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
4392
4392
  }
@@ -4403,13 +4403,13 @@ function _r(e, t) {
4403
4403
  }
4404
4404
  var Z = class extends je {
4405
4405
  constructor(e, t) {
4406
- super(new rt(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, F(e = this.j = new el(), 0, 1, t = new se()), this.I = new Po(), F(this.j, 0, 2, this.I), this.W = new Hu(), F(this.j, 0, 3, this.W), this.u = new sn(), F(this.j, 0, 4, this.u), this.O = new Wc(), F(this.j, 0, 5, this.O), this.A = new Jc(), F(this.j, 0, 6, this.A), this.M = new Zc(), F(this.j, 0, 7, this.M), C(this.u, 2, 0.5), C(this.u, 3, 0.3), C(this.O, 2, 0.5), C(this.A, 2, 0.5), C(this.A, 3, 0.3), C(this.M, 2, 0.5), C(this.I, 2, 0.5);
4406
+ super(new rt(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, R(e = this.j = new el(), 0, 1, t = new se()), this.I = new Po(), R(this.j, 0, 2, this.I), this.W = new Hu(), R(this.j, 0, 3, this.W), this.u = new sn(), R(this.j, 0, 4, this.u), this.O = new Wc(), R(this.j, 0, 5, this.O), this.A = new Jc(), R(this.j, 0, 6, this.A), this.M = new Zc(), R(this.j, 0, 7, this.M), C(this.u, 2, 0.5), C(this.u, 3, 0.3), C(this.O, 2, 0.5), C(this.A, 2, 0.5), C(this.A, 3, 0.3), C(this.M, 2, 0.5), C(this.I, 2, 0.5);
4407
4407
  }
4408
4408
  get baseOptions() {
4409
4409
  return $(this.j, se, 1);
4410
4410
  }
4411
4411
  set baseOptions(e) {
4412
- F(this.j, 0, 1, e);
4412
+ R(this.j, 0, 1, e);
4413
4413
  }
4414
4414
  o(e) {
4415
4415
  return "minFaceDetectionConfidence" in e && C(this.u, 2, e.minFaceDetectionConfidence ?? 0.5), "minFaceSuppressionThreshold" in e && C(this.u, 3, e.minFaceSuppressionThreshold ?? 0.3), "minFacePresenceConfidence" in e && C(this.O, 2, e.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in e && (this.outputFaceBlendshapes = !!e.outputFaceBlendshapes), "minPoseDetectionConfidence" in e && C(this.A, 2, e.minPoseDetectionConfidence ?? 0.5), "minPoseSuppressionThreshold" in e && C(this.A, 3, e.minPoseSuppressionThreshold ?? 0.3), "minPosePresenceConfidence" in e && C(this.M, 2, e.minPosePresenceConfidence ?? 0.5), "outputPoseSegmentationMasks" in e && (this.outputPoseSegmentationMasks = !!e.outputPoseSegmentationMasks), "minHandLandmarksConfidence" in e && C(this.I, 2, e.minHandLandmarksConfidence ?? 0.5), this.l(e);
@@ -4425,16 +4425,16 @@ var Z = class extends je {
4425
4425
  m() {
4426
4426
  var e = new $e();
4427
4427
  oe(e, "input_frames_image"), W(e, "pose_landmarks"), W(e, "pose_world_landmarks"), W(e, "face_landmarks"), W(e, "left_hand_landmarks"), W(e, "left_hand_world_landmarks"), W(e, "right_hand_landmarks"), W(e, "right_hand_world_landmarks");
4428
- const t = new ze(), i = new Ts();
4428
+ const t = new ze(), i = new As();
4429
4429
  Ve(i, 1, "type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), function(n, o) {
4430
- if (o != null) if (Array.isArray(o)) H(n, 2, Hr(o, 0, or));
4430
+ if (o != null) if (Array.isArray(o)) K(n, 2, Hr(o, 0, or));
4431
4431
  else {
4432
4432
  if (!(typeof o == "string" || o instanceof dt || io(o))) throw Error("invalid value in Any.value field: " + o + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
4433
- Rt(n, 2, no(o, !1), Xt());
4433
+ Lt(n, 2, no(o, !1), Xt());
4434
4434
  }
4435
4435
  }(i, this.j.g());
4436
- const r = new Fe();
4437
- Ve(r, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), vo(r, 8, Ts, i), te(r, "IMAGE:input_frames_image"), U(r, "POSE_LANDMARKS:pose_landmarks"), U(r, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), U(r, "FACE_LANDMARKS:face_landmarks"), U(r, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), U(r, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), U(r, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), U(r, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r.o(t), Je(e, r), cn(this, e), this.g.attachProtoListener("pose_landmarks", (n, o) => {
4436
+ const r = new Re();
4437
+ Ve(r, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), vo(r, 8, As, i), te(r, "IMAGE:input_frames_image"), U(r, "POSE_LANDMARKS:pose_landmarks"), U(r, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), U(r, "FACE_LANDMARKS:face_landmarks"), U(r, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), U(r, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), U(r, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), U(r, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r.o(t), Je(e, r), cn(this, e), this.g.attachProtoListener("pose_landmarks", (n, o) => {
4438
4438
  _r(n, this.h.poseLandmarks), x(this, o);
4439
4439
  }), this.g.attachEmptyPacketListener("pose_landmarks", (n) => {
4440
4440
  x(this, n);
@@ -4444,7 +4444,7 @@ var Z = class extends je {
4444
4444
  }), this.g.attachEmptyPacketListener("pose_world_landmarks", (n) => {
4445
4445
  x(this, n);
4446
4446
  }), this.outputPoseSegmentationMasks && (U(r, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), ki(this, "pose_segmentation_mask"), this.g.Z("pose_segmentation_mask", (n, o) => {
4447
- this.h.poseSegmentationMasks = [Ti(this, n, !0, !this.D)], x(this, o);
4447
+ this.h.poseSegmentationMasks = [Ai(this, n, !0, !this.D)], x(this, o);
4448
4448
  }), this.g.attachEmptyPacketListener("pose_segmentation_mask", (n) => {
4449
4449
  this.h.poseSegmentationMasks = [], x(this, n);
4450
4450
  })), this.g.attachProtoListener("face_landmarks", (n, o) => {
@@ -4483,19 +4483,19 @@ Z.prototype.detectForVideo = Z.prototype.G, Z.prototype.detect = Z.prototype.F,
4483
4483
  return j(Z, e, { baseOptions: { modelAssetBuffer: t } });
4484
4484
  }, Z.createFromOptions = function(e, t) {
4485
4485
  return j(Z, e, t);
4486
- }, Z.HAND_CONNECTIONS = Xo, Z.POSE_CONNECTIONS = Al, Z.FACE_LANDMARKS_LIPS = $o, Z.FACE_LANDMARKS_LEFT_EYE = Wo, Z.FACE_LANDMARKS_LEFT_EYEBROW = Ho, Z.FACE_LANDMARKS_LEFT_IRIS = xl, Z.FACE_LANDMARKS_RIGHT_EYE = qo, Z.FACE_LANDMARKS_RIGHT_EYEBROW = Ko, Z.FACE_LANDMARKS_RIGHT_IRIS = El, Z.FACE_LANDMARKS_FACE_OVAL = Yo, Z.FACE_LANDMARKS_CONTOURS = _l, Z.FACE_LANDMARKS_TESSELATION = kl;
4486
+ }, Z.HAND_CONNECTIONS = Xo, Z.POSE_CONNECTIONS = Tl, Z.FACE_LANDMARKS_LIPS = $o, Z.FACE_LANDMARKS_LEFT_EYE = Wo, Z.FACE_LANDMARKS_LEFT_EYEBROW = Ho, Z.FACE_LANDMARKS_LEFT_IRIS = xl, Z.FACE_LANDMARKS_RIGHT_EYE = qo, Z.FACE_LANDMARKS_RIGHT_EYEBROW = Ko, Z.FACE_LANDMARKS_RIGHT_IRIS = El, Z.FACE_LANDMARKS_FACE_OVAL = Yo, Z.FACE_LANDMARKS_CONTOURS = _l, Z.FACE_LANDMARKS_TESSELATION = kl;
4487
4487
  var Ke = class extends je {
4488
4488
  constructor(e, t) {
4489
- super(new rt(e, t), "input_image", "norm_rect", !0), this.j = { classifications: [] }, F(e = this.h = new tl(), 0, 1, t = new se());
4489
+ super(new rt(e, t), "input_image", "norm_rect", !0), this.j = { classifications: [] }, R(e = this.h = new tl(), 0, 1, t = new se());
4490
4490
  }
4491
4491
  get baseOptions() {
4492
4492
  return $(this.h, se, 1);
4493
4493
  }
4494
4494
  set baseOptions(e) {
4495
- F(this.h, 0, 1, e);
4495
+ R(this.h, 0, 1, e);
4496
4496
  }
4497
4497
  o(e) {
4498
- return F(this.h, 0, 2, Un(e, $(this.h, Mo, 2))), this.l(e);
4498
+ return R(this.h, 0, 2, Un(e, $(this.h, Mo, 2))), this.l(e);
4499
4499
  }
4500
4500
  sa(e, t) {
4501
4501
  return this.j = { classifications: [] }, nt(this, e, t), this.j;
@@ -4508,7 +4508,7 @@ var Ke = class extends je {
4508
4508
  oe(e, "input_image"), oe(e, "norm_rect"), W(e, "classifications");
4509
4509
  const t = new ze();
4510
4510
  ft(t, qu, this.h);
4511
- const i = new Fe();
4511
+ const i = new Re();
4512
4512
  Ve(i, 2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), te(i, "IMAGE:input_image"), te(i, "NORM_RECT:norm_rect"), U(i, "CLASSIFICATIONS:classifications"), i.o(t), Je(e, i), this.g.attachProtoListener("classifications", (r, n) => {
4513
4513
  this.j = Zu(Du(r)), x(this, n);
4514
4514
  }), this.g.attachEmptyPacketListener("classifications", (r) => {
@@ -4525,17 +4525,17 @@ Ke.prototype.classifyForVideo = Ke.prototype.ta, Ke.prototype.classify = Ke.prot
4525
4525
  };
4526
4526
  var De = class extends je {
4527
4527
  constructor(e, t) {
4528
- super(new rt(e, t), "image_in", "norm_rect", !0), this.h = new il(), this.embeddings = { embeddings: [] }, F(e = this.h, 0, 1, t = new se());
4528
+ super(new rt(e, t), "image_in", "norm_rect", !0), this.h = new il(), this.embeddings = { embeddings: [] }, R(e = this.h, 0, 1, t = new se());
4529
4529
  }
4530
4530
  get baseOptions() {
4531
4531
  return $(this.h, se, 1);
4532
4532
  }
4533
4533
  set baseOptions(e) {
4534
- F(this.h, 0, 1, e);
4534
+ R(this.h, 0, 1, e);
4535
4535
  }
4536
4536
  o(e) {
4537
4537
  var t = this.h, i = $(this.h, Ds, 2);
4538
- return i = i ? i.clone() : new Ds(), e.l2Normalize !== void 0 ? H(i, 1, nr(e.l2Normalize)) : "l2Normalize" in e && H(i, 1), e.quantize !== void 0 ? H(i, 2, nr(e.quantize)) : "quantize" in e && H(i, 2), F(t, 0, 2, i), this.l(e);
4538
+ return i = i ? i.clone() : new Ds(), e.l2Normalize !== void 0 ? K(i, 1, nr(e.l2Normalize)) : "l2Normalize" in e && K(i, 1), e.quantize !== void 0 ? K(i, 2, nr(e.quantize)) : "quantize" in e && K(i, 2), R(t, 0, 2, i), this.l(e);
4539
4539
  }
4540
4540
  za(e, t) {
4541
4541
  return nt(this, e, t), this.embeddings;
@@ -4548,14 +4548,14 @@ var De = class extends je {
4548
4548
  oe(e, "image_in"), oe(e, "norm_rect"), W(e, "embeddings_out");
4549
4549
  const t = new ze();
4550
4550
  ft(t, Ku, this.h);
4551
- const i = new Fe();
4551
+ const i = new Re();
4552
4552
  Ve(i, 2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), U(i, "EMBEDDINGS:embeddings_out"), i.o(t), Je(e, i), this.g.attachProtoListener("embeddings_out", (r, n) => {
4553
4553
  r = Bu(r), this.embeddings = function(o) {
4554
4554
  return { embeddings: xt(o, Ou, 1).map((s) => {
4555
4555
  var u, d;
4556
4556
  const a = { headIndex: Xe(s, 3) ?? 0 ?? -1, headName: Ee(ee(s, 4)) ?? "" ?? "" };
4557
4557
  var l = s.v;
4558
- return Ja(l, 0 | l[_], Ms, yn(s, 1)) !== void 0 ? (s = $t(s = $(s, Ms, yn(s, 1), void 0), 1, lt, zt()), a.floatEmbedding = s.slice()) : (l = new Uint8Array(0), a.quantizedEmbedding = ((d = (u = $(s, Pu, yn(s, 2), void 0)) == null ? void 0 : u.na()) == null ? void 0 : d.h()) ?? l), a;
4558
+ return Ja(l, 0 | l[k], Ms, yn(s, 1)) !== void 0 ? (s = $t(s = $(s, Ms, yn(s, 1), void 0), 1, lt, zt()), a.floatEmbedding = s.slice()) : (l = new Uint8Array(0), a.quantizedEmbedding = ((d = (u = $(s, Pu, yn(s, 2), void 0)) == null ? void 0 : u.na()) == null ? void 0 : d.h()) ?? l), a;
4559
4559
  }), timestampMs: ll(tc(o)) };
4560
4560
  }(r), x(this, n);
4561
4561
  }), this.g.attachEmptyPacketListener("embeddings_out", (r) => {
@@ -4588,10 +4588,10 @@ var zn = class {
4588
4588
  }), (t = this.categoryMask) == null || t.close();
4589
4589
  }
4590
4590
  };
4591
- function s1(e) {
4591
+ function s2(e) {
4592
4592
  var i, r;
4593
4593
  const t = function(n) {
4594
- return xt(n, Fe, 1);
4594
+ return xt(n, Re, 1);
4595
4595
  }(e.ca()).filter((n) => (Ee(ee(n, 1)) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));
4596
4596
  if (e.u = [], t.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
4597
4597
  t.length === 1 && (((r = (i = $(t[0], ze, 7)) == null ? void 0 : i.j()) == null ? void 0 : r.g()) ?? /* @__PURE__ */ new Map()).forEach((n, o) => {
@@ -4613,19 +4613,19 @@ function na(e) {
4613
4613
  zn.prototype.close = zn.prototype.close;
4614
4614
  var Ie = class extends je {
4615
4615
  constructor(e, t) {
4616
- super(new rt(e, t), "image_in", "norm_rect", !1), this.u = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Vo(), this.A = new rl(), F(this.h, 0, 3, this.A), F(e = this.h, 0, 1, t = new se());
4616
+ super(new rt(e, t), "image_in", "norm_rect", !1), this.u = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Vo(), this.A = new rl(), R(this.h, 0, 3, this.A), R(e = this.h, 0, 1, t = new se());
4617
4617
  }
4618
4618
  get baseOptions() {
4619
4619
  return $(this.h, se, 1);
4620
4620
  }
4621
4621
  set baseOptions(e) {
4622
- F(this.h, 0, 1, e);
4622
+ R(this.h, 0, 1, e);
4623
4623
  }
4624
4624
  o(e) {
4625
- return e.displayNamesLocale !== void 0 ? H(this.h, 2, ur(e.displayNamesLocale)) : "displayNamesLocale" in e && H(this.h, 2), "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
4625
+ return e.displayNamesLocale !== void 0 ? K(this.h, 2, ur(e.displayNamesLocale)) : "displayNamesLocale" in e && K(this.h, 2), "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
4626
4626
  }
4627
4627
  L() {
4628
- s1(this);
4628
+ s2(this);
4629
4629
  }
4630
4630
  segment(e, t, i) {
4631
4631
  const r = typeof t != "function" ? t : {};
@@ -4643,13 +4643,13 @@ var Ie = class extends je {
4643
4643
  oe(e, "image_in"), oe(e, "norm_rect");
4644
4644
  const t = new ze();
4645
4645
  ft(t, ol, this.h);
4646
- const i = new Fe();
4646
+ const i = new Re();
4647
4647
  Ve(i, 2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), i.o(t), Je(e, i), cn(this, e), this.outputConfidenceMasks && (W(e, "confidence_masks"), U(i, "CONFIDENCE_MASKS:confidence_masks"), ki(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
4648
- this.confidenceMasks = r.map((o) => Ti(this, o, !0, !this.j)), x(this, n);
4648
+ this.confidenceMasks = r.map((o) => Ai(this, o, !0, !this.j)), x(this, n);
4649
4649
  }), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
4650
4650
  this.confidenceMasks = [], x(this, r);
4651
4651
  })), this.outputCategoryMask && (W(e, "category_mask"), U(i, "CATEGORY_MASK:category_mask"), ki(this, "category_mask"), this.g.Z("category_mask", (r, n) => {
4652
- this.categoryMask = Ti(this, r, !1, !this.j), x(this, n);
4652
+ this.categoryMask = Ai(this, r, !1, !this.j), x(this, n);
4653
4653
  }), this.g.attachEmptyPacketListener("category_mask", (r) => {
4654
4654
  this.categoryMask = void 0, x(this, r);
4655
4655
  })), W(e, "quality_scores"), U(i, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (r, n) => {
@@ -4680,13 +4680,13 @@ var $n = class {
4680
4680
  $n.prototype.close = $n.prototype.close;
4681
4681
  var at = class extends je {
4682
4682
  constructor(e, t) {
4683
- super(new rt(e, t), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Vo(), this.u = new rl(), F(this.h, 0, 3, this.u), F(e = this.h, 0, 1, t = new se());
4683
+ super(new rt(e, t), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Vo(), this.u = new rl(), R(this.h, 0, 3, this.u), R(e = this.h, 0, 1, t = new se());
4684
4684
  }
4685
4685
  get baseOptions() {
4686
4686
  return $(this.h, se, 1);
4687
4687
  }
4688
4688
  set baseOptions(e) {
4689
- F(this.h, 0, 1, e);
4689
+ R(this.h, 0, 1, e);
4690
4690
  }
4691
4691
  o(e) {
4692
4692
  return "outputCategoryMask" in e && (this.outputCategoryMask = e.outputCategoryMask ?? !1), "outputConfidenceMasks" in e && (this.outputConfidenceMasks = e.outputConfidenceMasks ?? !0), super.l(e);
@@ -4696,12 +4696,12 @@ var at = class extends je {
4696
4696
  if (this.j = typeof i == "function" ? i : r, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, i = this.C + 1, r = new sl(), t.keypoint && t.scribble) throw Error("Cannot provide both keypoint and scribble.");
4697
4697
  if (t.keypoint) {
4698
4698
  var o = new En();
4699
- Rt(o, 3, nr(!0), !1), Rt(o, 1, Xi(t.keypoint.x), 0), Rt(o, 2, Xi(t.keypoint.y), 0), Qi(r, 1, Bn, o);
4699
+ Lt(o, 3, nr(!0), !1), Lt(o, 1, Xi(t.keypoint.x), 0), Lt(o, 2, Xi(t.keypoint.y), 0), Qi(r, 1, Bn, o);
4700
4700
  } else {
4701
4701
  if (!t.scribble) throw Error("Must provide either a keypoint or a scribble.");
4702
4702
  {
4703
4703
  const a = new Xu();
4704
- for (o of t.scribble) Rt(t = new En(), 3, nr(!0), !1), Rt(t, 1, Xi(o.x), 0), Rt(t, 2, Xi(o.y), 0), vo(a, 1, En, t);
4704
+ for (o of t.scribble) Lt(t = new En(), 3, nr(!0), !1), Lt(t, 1, Xi(o.x), 0), Lt(t, 2, Xi(o.y), 0), vo(a, 1, En, t);
4705
4705
  Qi(r, 2, Bn, a);
4706
4706
  }
4707
4707
  }
@@ -4726,13 +4726,13 @@ var at = class extends je {
4726
4726
  oe(e, "image_in"), oe(e, "roi_in"), oe(e, "norm_rect_in");
4727
4727
  const t = new ze();
4728
4728
  ft(t, ol, this.h);
4729
- const i = new Fe();
4729
+ const i = new Re();
4730
4730
  Ve(i, 2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"), te(i, "IMAGE:image_in"), te(i, "ROI:roi_in"), te(i, "NORM_RECT:norm_rect_in"), i.o(t), Je(e, i), cn(this, e), this.outputConfidenceMasks && (W(e, "confidence_masks"), U(i, "CONFIDENCE_MASKS:confidence_masks"), ki(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
4731
- this.confidenceMasks = r.map((o) => Ti(this, o, !0, !this.j)), x(this, n);
4731
+ this.confidenceMasks = r.map((o) => Ai(this, o, !0, !this.j)), x(this, n);
4732
4732
  }), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
4733
4733
  this.confidenceMasks = [], x(this, r);
4734
4734
  })), this.outputCategoryMask && (W(e, "category_mask"), U(i, "CATEGORY_MASK:category_mask"), ki(this, "category_mask"), this.g.Z("category_mask", (r, n) => {
4735
- this.categoryMask = Ti(this, r, !1, !this.j), x(this, n);
4735
+ this.categoryMask = Ai(this, r, !1, !this.j), x(this, n);
4736
4736
  }), this.g.attachEmptyPacketListener("category_mask", (r) => {
4737
4737
  this.categoryMask = void 0, x(this, r);
4738
4738
  })), W(e, "quality_scores"), U(i, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (r, n) => {
@@ -4751,16 +4751,16 @@ at.prototype.segment = at.prototype.segment, at.prototype.setOptions = at.protot
4751
4751
  };
4752
4752
  var Ye = class extends je {
4753
4753
  constructor(e, t) {
4754
- super(new rt(e, t), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, F(e = this.h = new al(), 0, 1, t = new se());
4754
+ super(new rt(e, t), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, R(e = this.h = new al(), 0, 1, t = new se());
4755
4755
  }
4756
4756
  get baseOptions() {
4757
4757
  return $(this.h, se, 1);
4758
4758
  }
4759
4759
  set baseOptions(e) {
4760
- F(this.h, 0, 1, e);
4760
+ R(this.h, 0, 1, e);
4761
4761
  }
4762
4762
  o(e) {
4763
- return e.displayNamesLocale !== void 0 ? H(this.h, 2, ur(e.displayNamesLocale)) : "displayNamesLocale" in e && H(this.h, 2), e.maxResults !== void 0 ? Et(this.h, 3, e.maxResults) : "maxResults" in e && H(this.h, 3), e.scoreThreshold !== void 0 ? C(this.h, 4, e.scoreThreshold) : "scoreThreshold" in e && H(this.h, 4), e.categoryAllowlist !== void 0 ? Ir(this.h, 5, e.categoryAllowlist) : "categoryAllowlist" in e && H(this.h, 5), e.categoryDenylist !== void 0 ? Ir(this.h, 6, e.categoryDenylist) : "categoryDenylist" in e && H(this.h, 6), this.l(e);
4763
+ return e.displayNamesLocale !== void 0 ? K(this.h, 2, ur(e.displayNamesLocale)) : "displayNamesLocale" in e && K(this.h, 2), e.maxResults !== void 0 ? Et(this.h, 3, e.maxResults) : "maxResults" in e && K(this.h, 3), e.scoreThreshold !== void 0 ? C(this.h, 4, e.scoreThreshold) : "scoreThreshold" in e && K(this.h, 4), e.categoryAllowlist !== void 0 ? Ir(this.h, 5, e.categoryAllowlist) : "categoryAllowlist" in e && K(this.h, 5), e.categoryDenylist !== void 0 ? Ir(this.h, 6, e.categoryDenylist) : "categoryDenylist" in e && K(this.h, 6), this.l(e);
4764
4764
  }
4765
4765
  F(e, t) {
4766
4766
  return this.j = { detections: [] }, nt(this, e, t), this.j;
@@ -4773,7 +4773,7 @@ var Ye = class extends je {
4773
4773
  oe(e, "input_frame_gpu"), oe(e, "norm_rect"), W(e, "detections");
4774
4774
  const t = new ze();
4775
4775
  ft(t, Qu, this.h);
4776
- const i = new Fe();
4776
+ const i = new Re();
4777
4777
  Ve(i, 2, "mediapipe.tasks.vision.ObjectDetectorGraph"), te(i, "IMAGE:input_frame_gpu"), te(i, "NORM_RECT:norm_rect"), U(i, "DETECTIONS:detections"), i.o(t), Je(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
4778
4778
  for (const o of r) r = Bc(o), this.j.detections.push(dl(r));
4779
4779
  x(this, n);
@@ -4815,13 +4815,13 @@ function sa(e) {
4815
4815
  Wn.prototype.close = Wn.prototype.close;
4816
4816
  var Pe = class extends je {
4817
4817
  constructor(e, t) {
4818
- super(new rt(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, F(e = this.h = new cl(), 0, 1, t = new se()), this.A = new Zc(), F(this.h, 0, 3, this.A), this.j = new Jc(), F(this.h, 0, 2, this.j), Et(this.j, 4, 1), C(this.j, 2, 0.5), C(this.A, 2, 0.5), C(this.h, 4, 0.5);
4818
+ super(new rt(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, R(e = this.h = new cl(), 0, 1, t = new se()), this.A = new Zc(), R(this.h, 0, 3, this.A), this.j = new Jc(), R(this.h, 0, 2, this.j), Et(this.j, 4, 1), C(this.j, 2, 0.5), C(this.A, 2, 0.5), C(this.h, 4, 0.5);
4819
4819
  }
4820
4820
  get baseOptions() {
4821
4821
  return $(this.h, se, 1);
4822
4822
  }
4823
4823
  set baseOptions(e) {
4824
- F(this.h, 0, 1, e);
4824
+ R(this.h, 0, 1, e);
4825
4825
  }
4826
4826
  o(e) {
4827
4827
  return "numPoses" in e && Et(this.j, 4, e.numPoses ?? 1), "minPoseDetectionConfidence" in e && C(this.j, 2, e.minPoseDetectionConfidence ?? 0.5), "minTrackingConfidence" in e && C(this.h, 4, e.minTrackingConfidence ?? 0.5), "minPosePresenceConfidence" in e && C(this.A, 2, e.minPosePresenceConfidence ?? 0.5), "outputSegmentationMasks" in e && (this.outputSegmentationMasks = e.outputSegmentationMasks ?? !1), this.l(e);
@@ -4839,7 +4839,7 @@ var Pe = class extends je {
4839
4839
  oe(e, "image_in"), oe(e, "norm_rect"), W(e, "normalized_landmarks"), W(e, "world_landmarks"), W(e, "segmentation_masks");
4840
4840
  const t = new ze();
4841
4841
  ft(t, Ju, this.h);
4842
- const i = new Fe();
4842
+ const i = new Re();
4843
4843
  Ve(i, 2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), te(i, "IMAGE:image_in"), te(i, "NORM_RECT:norm_rect"), U(i, "NORM_LANDMARKS:normalized_landmarks"), U(i, "WORLD_LANDMARKS:world_landmarks"), i.o(t), Je(e, i), cn(this, e), this.g.attachProtoVectorListener("normalized_landmarks", (r, n) => {
4844
4844
  this.landmarks = [];
4845
4845
  for (const o of r) r = wr(o), this.landmarks.push(an(r));
@@ -4853,7 +4853,7 @@ var Pe = class extends je {
4853
4853
  }), this.g.attachEmptyPacketListener("world_landmarks", (r) => {
4854
4854
  this.worldLandmarks = [], x(this, r);
4855
4855
  }), this.outputSegmentationMasks && (U(i, "SEGMENTATION_MASK:segmentation_masks"), ki(this, "segmentation_masks"), this.g.aa("segmentation_masks", (r, n) => {
4856
- this.segmentationMasks = r.map((o) => Ti(this, o, !0, !this.u)), x(this, n);
4856
+ this.segmentationMasks = r.map((o) => Ai(this, o, !0, !this.u)), x(this, n);
4857
4857
  }), this.g.attachEmptyPacketListener("segmentation_masks", (r) => {
4858
4858
  this.segmentationMasks = [], x(this, r);
4859
4859
  })), e = e.g(), this.setGraph(new Uint8Array(e), !0);
@@ -4865,9 +4865,9 @@ Pe.prototype.detectForVideo = Pe.prototype.G, Pe.prototype.detect = Pe.prototype
4865
4865
  return j(Pe, e, { baseOptions: { modelAssetBuffer: t } });
4866
4866
  }, Pe.createFromOptions = function(e, t) {
4867
4867
  return j(Pe, e, t);
4868
- }, Pe.POSE_CONNECTIONS = Al;
4869
- const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task", a1 = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm", c1 = () => {
4870
- const e = M(null), [t, i] = E(!1), [r, n] = E("Initializing..."), [o, s] = E(0), [a, l] = E(!1);
4868
+ }, Pe.POSE_CONNECTIONS = Tl;
4869
+ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task", a2 = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm", c2 = () => {
4870
+ const e = M(null), [t, i] = _(!1), [r, n] = _("Initializing..."), [o, s] = _(0), [a, l] = _(!1);
4871
4871
  D(() => {
4872
4872
  "serviceWorker" in navigator && navigator.serviceWorker.register("/sw.js").then((f) => {
4873
4873
  console.log("ServiceWorker registered:", f);
@@ -4883,9 +4883,9 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4883
4883
  let p = 0;
4884
4884
  const b = [];
4885
4885
  for (; ; ) {
4886
- const { done: v, value: L } = await y.read();
4886
+ const { done: v, value: F } = await y.read();
4887
4887
  if (v) break;
4888
- if (b.push(L), p += L.length, g) {
4888
+ if (b.push(F), p += F.length, g) {
4889
4889
  const S = Math.round(p / g * 100);
4890
4890
  s(S), n(`Downloading model... ${S}%`);
4891
4891
  }
@@ -4904,7 +4904,7 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4904
4904
  (async () => {
4905
4905
  try {
4906
4906
  n("Checking cached models..."), await u() ? n("Using cached model...") : (n("Model not cached. Downloading..."), await d()), n("Loading MediaPipe WASM...");
4907
- const g = await jt.forVisionTasks(a1);
4907
+ const g = await jt.forVisionTasks(a2);
4908
4908
  n("Creating face landmarker...");
4909
4909
  const y = await re.createFromOptions(g, {
4910
4910
  baseOptions: {
@@ -4932,8 +4932,8 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4932
4932
  "caches" in window && (await caches.delete("mediapipe-models-v1"), n("Cache cleared. Please refresh to re-download models."));
4933
4933
  }
4934
4934
  };
4935
- }, l1 = () => {
4936
- const [e, t] = E(0), i = M({ lastTime: 0, frames: 0, fps: 0 }), r = R(() => {
4935
+ }, l2 = () => {
4936
+ const [e, t] = _(0), i = M({ lastTime: 0, frames: 0, fps: 0 }), r = L(() => {
4937
4937
  const n = performance.now(), o = i.current;
4938
4938
  if (o.frames++, n - o.lastTime >= 1e3) {
4939
4939
  const s = Math.round(o.frames * 1e3 / (n - o.lastTime));
@@ -4941,8 +4941,8 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4941
4941
  }
4942
4942
  }, []);
4943
4943
  return { fps: e, updateFPS: r };
4944
- }, d1 = () => {
4945
- const e = M({ value: 100, isLookingAway: !1 }), t = R(
4944
+ }, d2 = () => {
4945
+ const e = M({ value: 100, isLookingAway: !1 }), t = L(
4946
4946
  (o, s, a, l) => {
4947
4947
  if (!o || !a || !s) return;
4948
4948
  const u = o.getContext("2d");
@@ -4955,14 +4955,14 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4955
4955
  }
4956
4956
  },
4957
4957
  []
4958
- ), i = R((o) => {
4958
+ ), i = L((o) => {
4959
4959
  const s = e.current.value / 100, a = 100, l = 20, u = 20, d = 40;
4960
4960
  o.fillStyle = "rgba(0, 0, 0, 0.3)", o.fillRect(u, d, l, a), o.fillStyle = `rgba(${Math.floor(
4961
4961
  255 * (1 - s)
4962
4962
  )}, ${Math.floor(255 * s)}, 0, 0.8)`;
4963
4963
  const h = a * s;
4964
4964
  o.fillRect(u, d + a - h, l, h), o.fillStyle = "#FFFFFF", o.fillRect(u, d + a * (1 - s), l, 2);
4965
- }, []), r = R(
4965
+ }, []), r = L(
4966
4966
  (o, s, a, l, u, d, h) => {
4967
4967
  if (t(o, s, a, l), u && d && h) {
4968
4968
  const f = o.getContext("2d");
@@ -4970,7 +4970,7 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4970
4970
  }
4971
4971
  },
4972
4972
  [t, i]
4973
- ), n = R(
4973
+ ), n = L(
4974
4974
  (o, s) => {
4975
4975
  const a = o.getContext("2d");
4976
4976
  a && (a.clearRect(0, 0, o.width, o.height), a.drawImage(s, 0, 0, o.width, o.height));
@@ -4984,18 +4984,18 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
4984
4984
  clearCanvas: n,
4985
4985
  engagementRef: e
4986
4986
  };
4987
- }, u1 = 50, h1 = () => {
4988
- const [e, t] = E(100), [i, r] = E(!1), n = M(0), o = R(
4987
+ }, u2 = 50, h2 = () => {
4988
+ const [e, t] = _(100), [i, r] = _(!1), n = M(0), o = L(
4989
4989
  (s, a, l) => {
4990
4990
  if (!l || s.length < 468)
4991
4991
  return;
4992
4992
  const u = s[33], d = s[263], h = s[1];
4993
4993
  if (!u || !d || !h) return;
4994
- const f = (u.x + d.x) * 0.5, w = (u.y + d.y) * 0.5, g = f - a.x, y = w - a.y, p = Math.sqrt(g * g + y * y), b = Math.abs(h.y - a.noseY) * 100, v = Math.abs(h.x - a.noseX) * 100, L = Math.max(
4994
+ const f = (u.x + d.x) * 0.5, w = (u.y + d.y) * 0.5, g = f - a.x, y = w - a.y, p = Math.sqrt(g * g + y * y), b = Math.abs(h.y - a.noseY) * 100, v = Math.abs(h.x - a.noseX) * 100, F = Math.max(
4995
4995
  0,
4996
4996
  100 - (p * 200 + b + v)
4997
- ), S = L < u1, A = performance.now();
4998
- return A - n.current > 100 && (t(L), r(S), n.current = A), { engagement: L, isLookingAway: S };
4997
+ ), S = F < u2, E = performance.now();
4998
+ return E - n.current > 100 && (t(F), r(S), n.current = E), { engagement: F, isLookingAway: S };
4999
4999
  },
5000
5000
  []
5001
5001
  );
@@ -5006,11 +5006,11 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
5006
5006
  setEngagement: t,
5007
5007
  setIsLookingAway: r
5008
5008
  };
5009
- }, f1 = 0.05, w1 = () => {
5010
- const [e, t] = E(!1), [i, r] = E(!1), n = R(
5009
+ }, f2 = 0.05, w2 = () => {
5010
+ const [e, t] = _(!1), [i, r] = _(!1), n = L(
5011
5011
  (a, l) => Math.sqrt(Math.pow(a.x - l.x, 2) + Math.pow(a.y - l.y, 2)),
5012
5012
  []
5013
- ), o = R(
5013
+ ), o = L(
5014
5014
  (a, l) => {
5015
5015
  if (!a || !l) return 0;
5016
5016
  const u = [
@@ -5035,12 +5035,12 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
5035
5035
  y
5036
5036
  );
5037
5037
  if (p === 0 || b === 0) return 0;
5038
- for (const L of u) {
5039
- const S = l[L], A = a[L];
5040
- if (S && A) {
5041
- const T = f.x + (A.x - g.x) * p / b, O = f.y + (A.y - g.y) * p / b;
5038
+ for (const F of u) {
5039
+ const S = l[F], E = a[F];
5040
+ if (S && E) {
5041
+ const A = f.x + (E.x - g.x) * p / b, O = f.y + (E.y - g.y) * p / b;
5042
5042
  d += n(S, {
5043
- x: T,
5043
+ x: A,
5044
5044
  y: O
5045
5045
  }), h++;
5046
5046
  }
@@ -5048,14 +5048,14 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
5048
5048
  return h === 0 ? 0 : d / h;
5049
5049
  },
5050
5050
  [n]
5051
- ), s = R(
5051
+ ), s = L(
5052
5052
  (a, l, u, d) => {
5053
5053
  if (!a.faceLandmarks || a.faceLandmarks.length === 0)
5054
5054
  return d("Face not detected."), r(!0), t(!1), null;
5055
5055
  if (l && u) {
5056
5056
  let h = null, f = 0;
5057
5057
  for (const w of a.faceLandmarks)
5058
- o(w, u) < f1 && (h = w, f++);
5058
+ o(w, u) < f2 && (h = w, f++);
5059
5059
  return f === 1 ? (t(!1), r(!1), d("Reference face tracked."), h) : f > 1 ? (t(!0), r(!1), d(
5060
5060
  "Multiple matching faces detected. Tracking suspended."
5061
5061
  ), null) : (t(!1), r(!0), d("Reference face not detected."), null);
@@ -5080,13 +5080,13 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
5080
5080
  setMultipleFacesDetected: t,
5081
5081
  setReferenceFaceNotDetected: r
5082
5082
  };
5083
- }, m1 = 500, g1 = (e, t) => {
5084
- const [i, r] = E(!1), [n, o] = E(Le.MODEL_LOADING), { incrementGazeViolation: s } = ba(), { multipleFacesDetected: a, referenceFaceNotDetected: l, isLookingAway: u } = e;
5083
+ }, m2 = 500, g2 = (e, t) => {
5084
+ const [i, r] = _(!1), [n, o] = _(Fe.MODEL_LOADING), { incrementGazeViolation: s } = ba(), { multipleFacesDetected: a, referenceFaceNotDetected: l, isLookingAway: u } = e;
5085
5085
  D(() => {
5086
5086
  let f;
5087
5087
  return (u || a || l) && t ? f = setTimeout(() => {
5088
5088
  r(!0), u ? (o("looking_away"), s("looking_away")) : a ? (o("multiple_faces"), s("multiple_faces")) : l && (o("no_face_detected"), s("no_face_detected"));
5089
- }, m1) : (r(!1), o("face_detected")), () => {
5089
+ }, m2) : (r(!1), o("face_detected")), () => {
5090
5090
  clearTimeout(f);
5091
5091
  };
5092
5092
  }, [
@@ -5096,7 +5096,7 @@ const kr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
5096
5096
  t,
5097
5097
  s
5098
5098
  ]);
5099
- const d = R(() => a ? Le.MULTIPLE_FACES : l ? "no_face_detected" : u ? Le.LOOKING_AWAY : n === Le.MODEL_LOADING ? Le.MODEL_LOADING : Le.FACE_DETECTED, [a, l, u]), h = R(() => {
5099
+ const d = L(() => a ? Fe.MULTIPLE_FACES : l ? "no_face_detected" : u ? Fe.LOOKING_AWAY : n === Fe.MODEL_LOADING ? Fe.MODEL_LOADING : Fe.FACE_DETECTED, [a, l, u]), h = L(() => {
5100
5100
  r(!1), o("face_detected");
5101
5101
  }, []);
5102
5102
  return {
@@ -5113,8 +5113,8 @@ class q extends Error {
5113
5113
  super(t), this.code = i, this.recoverable = r, this.name = "STTError";
5114
5114
  }
5115
5115
  }
5116
- const p1 = 50 * 1024 * 1024;
5117
- class Tl {
5116
+ const p2 = 50 * 1024 * 1024;
5117
+ class Al {
5118
5118
  constructor(t = {}) {
5119
5119
  Ne(this, "config");
5120
5120
  Ne(this, "mediaRecorder", null);
@@ -5182,7 +5182,8 @@ class Tl {
5182
5182
  }), this.mediaRecorder.addEventListener("dataavailable", (o) => {
5183
5183
  var s, a, l;
5184
5184
  if (o.data.size > 0) {
5185
- if (this.audioChunksTotalSize + o.data.size > p1) {
5185
+ if (this.audioChunksTotalSize + o.data.size > p2) {
5186
+ console.error(`[STTService] Max size exceeded: ${(this.audioChunksTotalSize / 1024 / 1024).toFixed(2)} MB`);
5186
5187
  const u = new q(
5187
5188
  "Recording exceeded maximum size limit",
5188
5189
  "MAX_SIZE_EXCEEDED",
@@ -5209,8 +5210,9 @@ class Tl {
5209
5210
  );
5210
5211
  (a = i == null ? void 0 : i.onError) == null || a.call(i, s), this.cleanup();
5211
5212
  }), this.mediaRecorder.start(100), (r = i == null ? void 0 : i.onStart) == null || r.call(i), t && t > 0 && (this.autoStopTimeoutId = setTimeout(() => {
5212
- this.isRecording() && this.stopRecording().catch(() => {
5213
- });
5213
+ console.log(`[STTService] Auto-stop triggered after ${t} seconds.`), this.isRecording() ? this.stopRecording().catch((o) => {
5214
+ console.error("[STTService] Auto-stop recording failed:", o), o instanceof q && (console.error("[STTService] Error Name:", o.name), console.error("[STTService] Error Code:", o.code));
5215
+ }) : console.log("[STTService] Recording was already stopped before auto-stop timeout.");
5214
5216
  }, t * 1e3));
5215
5217
  } catch (n) {
5216
5218
  if (this.cleanup(), n instanceof Error) {
@@ -5238,34 +5240,42 @@ class Tl {
5238
5240
  * This prevents the double-fire issue.
5239
5241
  */
5240
5242
  async stopRecording() {
5241
- if (this.throwIfDisposed(), this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null), !this.mediaRecorder || !this.isRecording())
5242
- throw new q(
5243
+ var t;
5244
+ if (this.throwIfDisposed(), console.log("[STTService] stopRecording called. Current state:", {
5245
+ hasMediaRecorder: !!this.mediaRecorder,
5246
+ recorderState: (t = this.mediaRecorder) == null ? void 0 : t.state,
5247
+ isRecording: this.isRecording(),
5248
+ autoStopTimeoutId: !!this.autoStopTimeoutId
5249
+ }), this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null), !this.mediaRecorder || !this.isRecording()) {
5250
+ const i = this.mediaRecorder ? `State is ${this.mediaRecorder.state}` : "MediaRecorder is null";
5251
+ throw console.warn(`[STTService] Cannot stop recording: ${i}`), new q(
5243
5252
  "No active recording to stop",
5244
5253
  "NO_ACTIVE_RECORDING",
5245
5254
  !1
5246
5255
  );
5247
- return new Promise((t, i) => {
5256
+ }
5257
+ return new Promise((i, r) => {
5248
5258
  if (!this.mediaRecorder) {
5249
- i(
5259
+ r(
5250
5260
  new q("MediaRecorder is null", "MEDIARECORDER_NULL", !1)
5251
5261
  );
5252
5262
  return;
5253
5263
  }
5254
- const r = this.mediaRecorder, n = () => {
5264
+ const n = this.mediaRecorder, o = () => {
5255
5265
  try {
5256
- const o = r.mimeType || "audio/webm", s = new Blob(this.audioChunks, { type: o });
5257
- this.cleanup(), t(s);
5258
- } catch (o) {
5259
- this.cleanup(), i(
5266
+ const s = n.mimeType || "audio/webm", a = new Blob(this.audioChunks, { type: s }), l = (a.size / 1024 / 1024).toFixed(2);
5267
+ console.log(`[STTService] Recording stopped. Created blob: ${l} MB, Type: ${s}`), this.cleanup(), i(a);
5268
+ } catch (s) {
5269
+ this.cleanup(), r(
5260
5270
  new q(
5261
- `Failed to create audio blob: ${o instanceof Error ? o.message : String(o)}`,
5271
+ `Failed to create audio blob: ${s instanceof Error ? s.message : String(s)}`,
5262
5272
  "BLOB_CREATION_FAILED",
5263
5273
  !1
5264
5274
  )
5265
5275
  );
5266
5276
  }
5267
5277
  };
5268
- r.addEventListener("stop", n, { once: !0 }), r.stop();
5278
+ n.addEventListener("stop", o, { once: !0 }), n.stop();
5269
5279
  });
5270
5280
  }
5271
5281
  /**
@@ -5290,8 +5300,8 @@ class Tl {
5290
5300
  "MISSING_INTERVIEW_ID",
5291
5301
  !1
5292
5302
  );
5293
- const o = await Lt(
5294
- `${this.config.baseUrl}${Ft.TRANSCRIBE_ANSWER(this.config.interviewId)}`,
5303
+ const o = await Ft(
5304
+ `${this.config.baseUrl}${Rt.TRANSCRIBE_ANSWER(this.config.interviewId)}`,
5295
5305
  {
5296
5306
  method: "POST",
5297
5307
  headers: {
@@ -5402,7 +5412,7 @@ class Tl {
5402
5412
  );
5403
5413
  }
5404
5414
  }
5405
- const y1 = new Tl(), b1 = (e, t, i, r) => {
5415
+ const y2 = new Al(), b2 = (e, t, i, r) => {
5406
5416
  const n = M(null);
5407
5417
  return D(() => {
5408
5418
  if (!t) return;
@@ -5426,7 +5436,7 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5426
5436
  s && cancelAnimationFrame(s), a != null && a.srcObject && a.srcObject.getTracks().forEach((u) => u.stop());
5427
5437
  };
5428
5438
  }, [t, i]), D(() => {
5429
- const o = y1.getRecordingStream();
5439
+ const o = y2.getRecordingStream();
5430
5440
  if (o && e.current) {
5431
5441
  e.current.srcObject = o;
5432
5442
  const s = o.getVideoTracks(), a = o.getAudioTracks(), l = () => {
@@ -5437,33 +5447,33 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5437
5447
  });
5438
5448
  }
5439
5449
  }, []), { animationFrameRef: n };
5440
- }, v1 = (e, t, i, r, n, o, s, a, l, u, d, h, f, w, g) => {
5441
- const y = M(null), p = R(() => {
5442
- const b = e.current, v = t.current, L = i.current;
5443
- if (!b || b.readyState < 2 || !L || !v) {
5450
+ }, v2 = (e, t, i, r, n, o, s, a, l, u, d, h, f, w, g) => {
5451
+ const y = M(null), p = L(() => {
5452
+ const b = e.current, v = t.current, F = i.current;
5453
+ if (!b || b.readyState < 2 || !F || !v) {
5444
5454
  y.current = requestAnimationFrame(p);
5445
5455
  return;
5446
5456
  }
5447
5457
  r();
5448
5458
  try {
5449
- const S = performance.now(), A = L.detectForVideo(
5459
+ const S = performance.now(), E = F.detectForVideo(
5450
5460
  b,
5451
5461
  S
5452
- ), T = n(
5453
- A,
5462
+ ), A = n(
5463
+ E,
5454
5464
  l,
5455
5465
  u.current,
5456
5466
  w
5457
5467
  );
5458
- T ? (o(
5468
+ A ? (o(
5459
5469
  v,
5460
5470
  b,
5461
- T,
5471
+ A,
5462
5472
  d,
5463
5473
  h,
5464
5474
  f,
5465
5475
  l
5466
- ), l && f && a(T, u.current, f)) : s(v, b);
5476
+ ), l && f && a(A, u.current, f)) : s(v, b);
5467
5477
  } catch (S) {
5468
5478
  console.error("Face detection error:", S);
5469
5479
  }
@@ -5486,14 +5496,14 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5486
5496
  g
5487
5497
  ]);
5488
5498
  return { renderLoop: p, animationFrameRef: y };
5489
- }, x1 = (e, t, i, r) => {
5499
+ }, x2 = (e, t, i, r) => {
5490
5500
  const {
5491
5501
  referenceSet: n,
5492
5502
  referenceRef: o,
5493
5503
  setReferenceData: s
5494
- } = ba(), a = M(o), l = R(() => {
5504
+ } = ba(), a = M(o), l = L(() => {
5495
5505
  a.current = o;
5496
- }, [o]), u = R(() => {
5506
+ }, [o]), u = L(() => {
5497
5507
  var w;
5498
5508
  const h = e.current, f = t.current;
5499
5509
  if (console.log({ faceLandmarker: h, video: f }), !(!h || !f))
@@ -5503,12 +5513,12 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5503
5513
  g
5504
5514
  );
5505
5515
  if ((w = y.faceLandmarks) != null && w[0]) {
5506
- const p = y.faceLandmarks[0], b = p[33], v = p[263], L = p[1];
5507
- b && v && L && (a.current = {
5516
+ const p = y.faceLandmarks[0], b = p[33], v = p[263], F = p[1];
5517
+ b && v && F && (a.current = {
5508
5518
  x: (b.x + v.x) * 0.5,
5509
5519
  y: (b.y + v.y) * 0.5,
5510
- noseX: L.x,
5511
- noseY: L.y
5520
+ noseX: F.x,
5521
+ noseY: F.y
5512
5522
  }, s(!0, a.current), i("Reference set. Gaze tracking active."), console.log("Reference set. Gaze tracking active.", a.current), r && r());
5513
5523
  }
5514
5524
  } catch (g) {
@@ -5520,7 +5530,7 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5520
5530
  i,
5521
5531
  s,
5522
5532
  r
5523
- ]), d = R(() => {
5533
+ ]), d = L(() => {
5524
5534
  s(!1, { x: 0, y: 0, noseX: 0, noseY: 0 }), i("Reference reset. Starting calibration...");
5525
5535
  }, [s, i]);
5526
5536
  return {
@@ -5531,7 +5541,7 @@ const y1 = new Tl(), b1 = (e, t, i, r) => {
5531
5541
  syncReference: l
5532
5542
  };
5533
5543
  };
5534
- function E1({
5544
+ function E2({
5535
5545
  onClose: e,
5536
5546
  warningType: t,
5537
5547
  isCheatingModalOpen: i = !1
@@ -5565,7 +5575,7 @@ function E1({
5565
5575
  }
5566
5576
  );
5567
5577
  }
5568
- const _1 = ({ status: e }) => {
5578
+ const _2 = ({ status: e }) => {
5569
5579
  const t = ka[e];
5570
5580
  if (!t) return null;
5571
5581
  const i = e !== "face_detected";
@@ -5591,34 +5601,34 @@ const _1 = ({ status: e }) => {
5591
5601
  videoAllowed: d = !0
5592
5602
  }, h) => {
5593
5603
  var is;
5594
- const { authToken: f } = xa(), w = f ? od(f) : null, { borderRadius: g } = Ci(), y = g ?? 18, { proctoring: p, capture_screenshots: b } = Qn(), v = !!(p != null && p.gazeAnalysisEnabled), [L, S] = E(!1), [A, T] = E(
5604
+ const { authToken: f } = xa(), w = f ? od(f) : null, { borderRadius: g } = Si(), y = g ?? 18, { proctoring: p, capture_screenshots: b } = Qn(), v = !!(p != null && p.gazeAnalysisEnabled), [F, S] = _(!1), [E, A] = _(
5595
5605
  (p == null ? void 0 : p.showLandmarks) ?? !1
5596
- ), [O, I] = E(
5606
+ ), [O, I] = _(
5597
5607
  r && ((p == null ? void 0 : p.showEngagementBar) ?? !0)
5598
- ), [P, X] = E(
5608
+ ), [P, H] = _(
5599
5609
  v
5600
- ), [xe, Q] = E(!1), K = M(null), ie = M(null), V = M(null), J = M(null), Ze = R(
5610
+ ), [xe, Q] = _(!1), Y = M(null), ie = M(null), V = M(null), J = M(null), Ze = L(
5601
5611
  async (_e) => {
5602
5612
  var yr;
5603
- const $i = K.current, Ae = V.current;
5604
- if (!$i || !Ae) return;
5605
- const li = Ae.getContext("2d");
5613
+ const $i = Y.current, Te = V.current;
5614
+ if (!$i || !Te) return;
5615
+ const li = Te.getContext("2d");
5606
5616
  if (!li) return;
5607
- Ae.width = $i.videoWidth, Ae.height = $i.videoHeight, li.save(), li.scale(-1, 1), li.drawImage($i, -Ae.width, 0, Ae.width, Ae.height), li.restore();
5617
+ Te.width = $i.videoWidth, Te.height = $i.videoHeight, li.save(), li.scale(-1, 1), li.drawImage($i, -Te.width, 0, Te.width, Te.height), li.restore();
5608
5618
  const Wi = await new Promise(
5609
- (Vt) => Ae.toBlob(Vt, "image/jpeg")
5619
+ (Vt) => Te.toBlob(Vt, "image/jpeg")
5610
5620
  );
5611
5621
  if (Wi && t)
5612
5622
  try {
5613
- const Vt = `${_e}-${Date.now()}.jpeg`, Te = await br.requestScreenshotUploadUrl(
5623
+ const Vt = `${_e}-${Date.now()}.jpeg`, Ae = await br.requestScreenshotUploadUrl(
5614
5624
  t,
5615
5625
  Vt
5616
5626
  );
5617
- Te.data && Te.data.upload_url && (await br.uploadScreenshot(
5618
- (yr = Te == null ? void 0 : Te.data) == null ? void 0 : yr.upload_url,
5627
+ Ae.data && Ae.data.upload_url && (await br.uploadScreenshot(
5628
+ (yr = Ae == null ? void 0 : Ae.data) == null ? void 0 : yr.upload_url,
5619
5629
  Wi
5620
- ), Te.data.asset_id && await br.confirmScreenshotUpload(
5621
- Te.data.asset_id
5630
+ ), Ae.data.asset_id && await br.confirmScreenshotUpload(
5631
+ Ae.data.asset_id
5622
5632
  ));
5623
5633
  } catch (Vt) {
5624
5634
  console.error(`Failed to upload screenshot for ${_e}:`, Vt);
@@ -5634,30 +5644,30 @@ const _1 = ({ status: e }) => {
5634
5644
  }, [o]);
5635
5645
  const {
5636
5646
  faceLandmarkerRef: gt,
5637
- isModelLoaded: Se,
5647
+ isModelLoaded: Ce,
5638
5648
  statusMessage: kt,
5639
5649
  setStatusMessage: We,
5640
5650
  loadingProgress: ii,
5641
- permissionDenied: At,
5651
+ permissionDenied: Tt,
5642
5652
  clearCache: ri
5643
- } = c1(), { fps: ni, updateFPS: ot } = l1(), { drawWithEngagementBar: Tt, clearCanvas: de, engagementRef: et } = d1(), {
5653
+ } = c2(), { fps: ni, updateFPS: ot } = l2(), { drawWithEngagementBar: At, clearCanvas: de, engagementRef: et } = d2(), {
5644
5654
  engagement: oi,
5645
5655
  isLookingAway: Ut,
5646
5656
  analyzeGaze: un,
5647
5657
  setEngagement: mr,
5648
5658
  setIsLookingAway: si
5649
- } = h1(), {
5659
+ } = h2(), {
5650
5660
  multipleFacesDetected: Gi,
5651
5661
  referenceFaceNotDetected: ai,
5652
5662
  analyzeFace: hn,
5653
5663
  setMultipleFacesDetected: ji,
5654
5664
  setReferenceFaceNotDetected: ci
5655
- } = w1(), { referenceSet: zi, referenceRef: B, setReference: z, resetReference: He, syncReference: gr } = x1(
5665
+ } = w2(), { referenceSet: zi, referenceRef: B, setReference: z, resetReference: He, syncReference: gr } = x2(
5656
5666
  gt,
5657
- K,
5667
+ Y,
5658
5668
  We,
5659
5669
  n
5660
- ), Ll = {
5670
+ ), Fl = {
5661
5671
  multipleFacesDetected: Gi,
5662
5672
  referenceFaceNotDetected: ai,
5663
5673
  isLookingAway: Ut
@@ -5667,14 +5677,14 @@ const _1 = ({ status: e }) => {
5667
5677
  closeWarningModal: Zo,
5668
5678
  setShowGazeWarningModal: es,
5669
5679
  setFaceDetectionState: ts
5670
- } = g1(
5671
- Ll,
5680
+ } = g2(
5681
+ Fl,
5672
5682
  v && !a
5673
5683
  // Disable warning manager modal triggers if overlay is on
5674
5684
  );
5675
5685
  D(() => {
5676
5686
  if (s) {
5677
- if (u || !Se) {
5687
+ if (u || !Ce) {
5678
5688
  s("model_loading");
5679
5689
  return;
5680
5690
  }
@@ -5682,11 +5692,11 @@ const _1 = ({ status: e }) => {
5682
5692
  s("camera_error");
5683
5693
  return;
5684
5694
  }
5685
- const _e = pr() || Le.NO_FACE;
5695
+ const _e = pr() || Fe.NO_FACE;
5686
5696
  s(_e);
5687
5697
  }
5688
5698
  }, [
5689
- Se,
5699
+ Ce,
5690
5700
  u,
5691
5701
  d,
5692
5702
  Gi,
@@ -5695,34 +5705,34 @@ const _1 = ({ status: e }) => {
5695
5705
  pr,
5696
5706
  s
5697
5707
  ]);
5698
- const { renderLoop: Fl } = v1(
5699
- K,
5708
+ const { renderLoop: Rl } = v2(
5709
+ Y,
5700
5710
  ie,
5701
5711
  gt,
5702
5712
  ot,
5703
5713
  hn,
5704
- Tt,
5714
+ At,
5705
5715
  de,
5706
5716
  un,
5707
5717
  zi,
5708
5718
  B,
5709
- A,
5719
+ E,
5710
5720
  O,
5711
5721
  v,
5712
5722
  We,
5713
5723
  ci
5714
5724
  );
5715
- b1(K, Se, Fl, We), D(() => {
5725
+ b2(Y, Ce, Rl, We), D(() => {
5716
5726
  gr();
5717
5727
  }, [gr]), D(() => {
5718
5728
  et && et.current && (et.current.value = oi, et.current.isLookingAway = Ut);
5719
5729
  }, [oi, Ut, et]);
5720
- const Rl = R(
5730
+ const Ll = L(
5721
5731
  (_e) => {
5722
- X(_e), _e || (mr(100), si(!1));
5732
+ H(_e), _e || (mr(100), si(!1));
5723
5733
  },
5724
5734
  [mr, si]
5725
- ), Ml = R(() => {
5735
+ ), Ml = L(() => {
5726
5736
  si(!1), ji(!1), ci(!1), ts("face_detected"), es(!1), Zo();
5727
5737
  }, [
5728
5738
  si,
@@ -5743,29 +5753,29 @@ const _1 = ({ status: e }) => {
5743
5753
  const _e = [];
5744
5754
  return (async () => {
5745
5755
  try {
5746
- const Ae = await navigator.mediaDevices.getUserMedia({
5756
+ const Te = await navigator.mediaDevices.getUserMedia({
5747
5757
  video: !0,
5748
5758
  audio: !1
5749
5759
  });
5750
- J.current = Ae, K.current && (K.current.srcObject = Ae);
5751
- const Wi = (i ?? Pr) * 60 * 1e3 / 3, yr = [0, 1, 2].map((Te, Nt) => ({
5760
+ J.current = Te, Y.current && (Y.current.srcObject = Te);
5761
+ const Wi = (i ?? Pr) * 60 * 1e3 / 3, yr = [0, 1, 2].map((Ae, Nt) => ({
5752
5762
  label: `capture-${Nt + 1}`,
5753
5763
  start: Nt * Wi,
5754
5764
  end: (Nt + 1) * Wi
5755
- })), Vt = (Te, Nt) => Te === Nt ? Te : Math.random() * (Nt - Te) + Te;
5756
- yr.forEach(({ label: Te, start: Nt, end: Pl }, Ol) => {
5765
+ })), Vt = (Ae, Nt) => Ae === Nt ? Ae : Math.random() * (Nt - Ae) + Ae;
5766
+ yr.forEach(({ label: Ae, start: Nt, end: Pl }, Ol) => {
5757
5767
  let fn;
5758
5768
  Ol === 0 ? fn = 3e3 : fn = Vt(Nt, Pl), _e.push(
5759
5769
  setTimeout(() => {
5760
- Ze(Te);
5770
+ Ze(Ae);
5761
5771
  }, fn)
5762
5772
  );
5763
5773
  });
5764
- } catch (Ae) {
5765
- console.error("Error accessing camera:", Ae);
5774
+ } catch (Te) {
5775
+ console.error("Error accessing camera:", Te);
5766
5776
  }
5767
5777
  })(), () => {
5768
- J.current && J.current.getTracks().forEach((Ae) => Ae.stop()), _e.forEach(clearTimeout);
5778
+ J.current && J.current.getTracks().forEach((Te) => Te.stop()), _e.forEach(clearTimeout);
5769
5779
  };
5770
5780
  }, [Ze, b]), ma(
5771
5781
  h,
@@ -5782,7 +5792,7 @@ const _1 = ({ status: e }) => {
5782
5792
  }),
5783
5793
  [z, He]
5784
5794
  ), /* @__PURE__ */ m("div", { className: `iw-relative iw-h-full iw-w-full ${e}`, children: [
5785
- At ? /* @__PURE__ */ m("div", { className: "iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600", children: [
5795
+ Tt ? /* @__PURE__ */ m("div", { className: "iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600", children: [
5786
5796
  /* @__PURE__ */ c("h2", { children: "Camera Permission Denied" }),
5787
5797
  /* @__PURE__ */ c("p", { children: "Please allow camera access to use this application." })
5788
5798
  ] }) : /* @__PURE__ */ c("div", { className: "iw-flex iw-w-full iw-h-full iw-justify-start iw-items-start", children: /* @__PURE__ */ m(
@@ -5794,7 +5804,7 @@ const _1 = ({ status: e }) => {
5794
5804
  /* @__PURE__ */ c(
5795
5805
  "video",
5796
5806
  {
5797
- ref: K,
5807
+ ref: Y,
5798
5808
  autoPlay: !0,
5799
5809
  playsInline: !0,
5800
5810
  muted: !0,
@@ -5802,7 +5812,7 @@ const _1 = ({ status: e }) => {
5802
5812
  style: { transform: "scaleX(-1)" }
5803
5813
  }
5804
5814
  ),
5805
- !d && /* @__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: u || !Se ? /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-gap-3", children: [
5815
+ !d && /* @__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: u || !Ce ? /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-gap-3", children: [
5806
5816
  /* @__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" }),
5807
5817
  /* @__PURE__ */ c("span", { className: "iw-text-white/60 iw-text-xs iw-font-medium iw-tracking-wide", children: "Initializing camera..." })
5808
5818
  ] }) : /* @__PURE__ */ m(yt, { children: [
@@ -5833,18 +5843,18 @@ const _1 = ({ status: e }) => {
5833
5843
  vd,
5834
5844
  {
5835
5845
  showControls: (p == null ? void 0 : p.showControls) ?? !1,
5836
- isBubbleOpen: L,
5846
+ isBubbleOpen: F,
5837
5847
  setIsBubbleOpen: S,
5838
5848
  setReference: z,
5839
5849
  clearCache: ri,
5840
- isModelLoaded: Se,
5850
+ isModelLoaded: Ce,
5841
5851
  gazeAnalysisEnabled: P && v,
5842
5852
  referenceSet: zi,
5843
- showLandmarks: A,
5844
- setShowLandmarks: T,
5853
+ showLandmarks: E,
5854
+ setShowLandmarks: A,
5845
5855
  showEngagementBar: O,
5846
5856
  setShowEngagementBar: I,
5847
- handleToggleGazeAnalysis: Rl,
5857
+ handleToggleGazeAnalysis: Ll,
5848
5858
  stats: Dl,
5849
5859
  statusMessage: kt,
5850
5860
  loadingProgress: ii
@@ -5861,9 +5871,9 @@ const _1 = ({ status: e }) => {
5861
5871
  }
5862
5872
  ),
5863
5873
  /* @__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(
5864
- _1,
5874
+ _2,
5865
5875
  {
5866
- status: d ? u || !Se ? "model_loading" : pr() ?? "no_face_detected" : "camera_error"
5876
+ status: d ? u || !Ce ? "model_loading" : pr() ?? "no_face_detected" : "camera_error"
5867
5877
  }
5868
5878
  ) })
5869
5879
  ] })
@@ -5871,7 +5881,7 @@ const _1 = ({ status: e }) => {
5871
5881
  }
5872
5882
  ) }),
5873
5883
  v && Jo && !a && /* @__PURE__ */ c(
5874
- E1,
5884
+ E2,
5875
5885
  {
5876
5886
  isOpen: Jo,
5877
5887
  onClose: Ml,
@@ -5914,7 +5924,7 @@ const _1 = ({ status: e }) => {
5914
5924
  ]
5915
5925
  }
5916
5926
  );
5917
- }, k1 = ({ stream: e, className: t = "", barCount: i = 50 }) => {
5927
+ }, k2 = ({ stream: e, className: t = "", barCount: i = 50 }) => {
5918
5928
  const r = M(null), n = M(null), o = M(null), s = M(null), a = M(null);
5919
5929
  D(() => {
5920
5930
  if (!e || window === void 0) return;
@@ -5941,12 +5951,12 @@ const _1 = ({ status: e }) => {
5941
5951
  const I = y[O] ?? 0;
5942
5952
  v += I * I;
5943
5953
  }
5944
- const L = Math.sqrt(v / g), S = Math.min(1, L / 128);
5954
+ const F = Math.sqrt(v / g), S = Math.min(1, F / 128);
5945
5955
  w.clearRect(0, 0, p, b);
5946
- const A = i, T = Math.floor(S * A);
5947
- for (let O = 0; O < A; O++) {
5948
- const I = O * (p / A), P = p / A - 1.8;
5949
- O < T ? w.fillStyle = "#0EB00E" : w.fillStyle = "#D9D9D9", w.fillRect(I, 0, P, b);
5956
+ const E = i, A = Math.floor(S * E);
5957
+ for (let O = 0; O < E; O++) {
5958
+ const I = O * (p / E), P = p / E - 1.8;
5959
+ O < A ? w.fillStyle = "#0EB00E" : w.fillStyle = "#D9D9D9", w.fillRect(I, 0, P, b);
5950
5960
  }
5951
5961
  n.current = requestAnimationFrame(h);
5952
5962
  };
@@ -5977,7 +5987,7 @@ const _1 = ({ status: e }) => {
5977
5987
  stream: s = null,
5978
5988
  hasPermission: a = !0
5979
5989
  }) => {
5980
- const { baseColor: l } = Ci(), [u, d] = E(!1), h = M(null);
5990
+ const { baseColor: l } = Si(), [u, d] = _(!1), h = M(null);
5981
5991
  D(() => {
5982
5992
  const g = (y) => {
5983
5993
  h.current && !h.current.contains(y.target) && d(!1);
@@ -6023,7 +6033,7 @@ const _1 = ({ status: e }) => {
6023
6033
  ) }),
6024
6034
  o && a && /* @__PURE__ */ m("div", { className: "iw-mt-2 iw-px-1 iw-flex iw-items-center iw-gap-2 iw-overflow-hidden", children: [
6025
6035
  /* @__PURE__ */ c(gd, { className: "iw-min-h-5 iw-min-w-5" }),
6026
- /* @__PURE__ */ c(k1, { stream: s, className: "iw-w-full" })
6036
+ /* @__PURE__ */ c(k2, { stream: s, className: "iw-w-full" })
6027
6037
  ] }),
6028
6038
  u && a && /* @__PURE__ */ m("div", { className: "iw-absolute iw-bottom-full iw-left-0 iw-right-0 iw-mb-2 iw-bg-white iw-border iw-border-gray-100 iw-rounded-xl iw-shadow-xl iw-z-50 iw-py-2 iw-max-h-60 iw-overflow-y-auto", children: [
6029
6039
  t.map((g) => /* @__PURE__ */ m(
@@ -6120,11 +6130,11 @@ const _1 = ({ status: e }) => {
6120
6130
  children: p ? "Device Loading..." : i
6121
6131
  }
6122
6132
  ),
6123
- !n && (!a || e && t) && A1()
6133
+ !n && (!a || e && t) && T2()
6124
6134
  ] })
6125
6135
  ] });
6126
- }, A1 = () => {
6127
- const { baseColor: e } = Ci();
6136
+ }, T2 = () => {
6137
+ const { baseColor: e } = Si();
6128
6138
  return /* @__PURE__ */ c(yt, { children: /* @__PURE__ */ c("div", { className: "iw-hidden group-hover:iw-block iw-absolute iw-bottom-full iw-mb-3 iw-left-1/2 -iw-translate-x-1/2 iw-w-64 iw-z-50", children: /* @__PURE__ */ m(
6129
6139
  "div",
6130
6140
  {
@@ -6139,7 +6149,7 @@ const _1 = ({ status: e }) => {
6139
6149
  ]
6140
6150
  }
6141
6151
  ) }) });
6142
- }, T1 = ({ steps: e, currentStepIndex: t }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-3", children: e.map((i, r) => {
6152
+ }, A2 = ({ steps: e, currentStepIndex: t }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-3", children: e.map((i, r) => {
6143
6153
  const n = r < t, o = r === t;
6144
6154
  return /* @__PURE__ */ m(Hn.Fragment, { children: [
6145
6155
  /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
@@ -6174,12 +6184,12 @@ const _1 = ({ status: e }) => {
6174
6184
  ] }),
6175
6185
  r < e.length - 1 && /* @__PURE__ */ c("div", { className: "iw-flex-1 iw-max-w-[120px] iw-border-t iw-border-dotted iw-border-[#B3B9CB]" })
6176
6186
  ] }, r);
6177
- }) }), N1 = [
6187
+ }) }), N2 = [
6178
6188
  "Don't refresh or reload the page during your assessment",
6179
6189
  "Don't switch tabs or open other applications while session is ongoing",
6180
6190
  "Don't leave your position during the session",
6181
6191
  "Don't disable or interfere with video/audio monitoring"
6182
- ], C1 = ({
6192
+ ], S2 = ({
6183
6193
  isOpen: e,
6184
6194
  onStart: t,
6185
6195
  gazeEnabled: i = !1,
@@ -6200,15 +6210,15 @@ const _1 = ({ status: e }) => {
6200
6210
  handleAudioChange: y,
6201
6211
  handleVideoChange: p,
6202
6212
  stopStream: b
6203
- } = ad(e), [v, L] = E(!1), [S, A] = E(0), [T, O] = E(!1), I = M(null), P = M(null), X = (V) => {
6213
+ } = ad(e), [v, F] = _(!1), [S, E] = _(0), [A, O] = _(!1), I = M(null), P = M(null), H = (V) => {
6204
6214
  I.current = V, r && (typeof r == "function" ? r(V) : r.current = V);
6205
6215
  };
6206
6216
  if (D(() => () => {
6207
6217
  P.current && (clearInterval(P.current), P.current = null);
6208
6218
  }, []), !e) return null;
6209
- const [xe, Q] = E(Le.MODEL_LOADING), K = async () => {
6219
+ const [xe, Q] = _(Fe.MODEL_LOADING), Y = async () => {
6210
6220
  var J;
6211
- L(!0), (J = I.current) == null || J.resetReference();
6221
+ F(!0), (J = I.current) == null || J.resetReference();
6212
6222
  const V = () => {
6213
6223
  var Ze;
6214
6224
  return (Ze = I.current) == null ? void 0 : Ze.setReference();
@@ -6220,7 +6230,7 @@ const _1 = ({ status: e }) => {
6220
6230
  /* @__PURE__ */ c("h2", { className: "iw-text-[#062260] iw-text-2xl iw-font-medium iw-tracking-tight", children: "Final checks before you go live" }),
6221
6231
  /* @__PURE__ */ c("div", { className: "iw-mt-2 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-2 iw-border iw-border-[#E7EAF1]", children: /* @__PURE__ */ c("p", { className: "iw-text-[#5C6686] iw-text-xs iw-leading-relaxed", children: "To ensure the integrity of the interview process, this platform uses your device’s camera to monitor your face and gaze direction. We do not store any outside this session" }) }),
6222
6232
  /* @__PURE__ */ c("div", { className: "iw-mt-3 iw-border-b iw-border-dashed iw-border-[#B3B9CB] iw-w-full" }),
6223
- /* @__PURE__ */ c(T1, { steps: [
6233
+ /* @__PURE__ */ c(A2, { steps: [
6224
6234
  { label: i ? "Calibrate your camera" : "Camera & Mic permission" },
6225
6235
  { label: "Basic guidelines" }
6226
6236
  ], currentStepIndex: S })
@@ -6229,7 +6239,7 @@ const _1 = ({ status: e }) => {
6229
6239
  /* @__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(
6230
6240
  Nl,
6231
6241
  {
6232
- ref: X,
6242
+ ref: H,
6233
6243
  interviewId: n,
6234
6244
  interview_duration: o,
6235
6245
  showProctoringUI: !1,
@@ -6238,7 +6248,7 @@ const _1 = ({ status: e }) => {
6238
6248
  videoAllowed: a,
6239
6249
  onProctoringStatusChange: Q,
6240
6250
  onSetReference: () => {
6241
- P.current && (clearInterval(P.current), P.current = null), L(!1), A(1);
6251
+ P.current && (clearInterval(P.current), P.current = null), F(!1), E(1);
6242
6252
  }
6243
6253
  }
6244
6254
  ) : /* @__PURE__ */ c(
@@ -6259,10 +6269,10 @@ const _1 = ({ status: e }) => {
6259
6269
  videoEnabled: a,
6260
6270
  buttonText: i ? v ? "Calibrating..." : xe === "model_loading" ? "Initialising..." : "Start calibrate" : "Next",
6261
6271
  onButtonClick: () => {
6262
- i ? K() : A(1);
6272
+ i ? Y() : E(1);
6263
6273
  },
6264
- disabled: !T || i && xe !== "face_detected" || !i && (!s || !a),
6265
- isAgreed: T,
6274
+ disabled: !A || i && xe !== "face_detected" || !i && (!s || !a),
6275
+ isAgreed: A,
6266
6276
  onAgreedToggle: O,
6267
6277
  audioDevices: u,
6268
6278
  videoDevices: d,
@@ -6275,7 +6285,7 @@ const _1 = ({ status: e }) => {
6275
6285
  }
6276
6286
  )
6277
6287
  ] }) : /* @__PURE__ */ m("div", { className: "iw-w-full iw-flex iw-flex-col iw-gap-6", children: [
6278
- /* @__PURE__ */ c("div", { className: "iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5", children: N1.map((V, J) => /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-gap-4", children: [
6288
+ /* @__PURE__ */ c("div", { className: "iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5", children: N2.map((V, J) => /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-gap-4", children: [
6279
6289
  /* @__PURE__ */ c("div", { className: "iw-flex iw-h-7 iw-w-7 iw-min-w-[28px] iw-items-center iw-justify-center iw-rounded-full iw-bg-[#DBEAFE] iw-text-[#062260] iw-text-xs iw-font-bold", children: J + 1 }),
6280
6290
  /* @__PURE__ */ c("span", { className: "iw-text-[#5C6686] iw-font-medium", children: V })
6281
6291
  ] }, J)) }),
@@ -6286,7 +6296,7 @@ const _1 = ({ status: e }) => {
6286
6296
  onButtonClick: () => {
6287
6297
  t(), b();
6288
6298
  },
6289
- isAgreed: T,
6299
+ isAgreed: A,
6290
6300
  onAgreedToggle: O,
6291
6301
  showMediaIcons: !1
6292
6302
  }
@@ -6295,7 +6305,7 @@ const _1 = ({ status: e }) => {
6295
6305
  ] }) });
6296
6306
  };
6297
6307
  var G = /* @__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))(G || {});
6298
- const Cl = {
6308
+ const Sl = {
6299
6309
  thinkingDuration: 0,
6300
6310
  answeringDuration: 120,
6301
6311
  editingDuration: 30
@@ -6329,14 +6339,14 @@ const Cl = {
6329
6339
  /* COMPLETED */
6330
6340
  }
6331
6341
  };
6332
- class S1 {
6342
+ class C2 {
6333
6343
  constructor(t = {}, i = {}) {
6334
6344
  Ne(this, "config");
6335
6345
  Ne(this, "state");
6336
6346
  Ne(this, "phaseIntervalId", null);
6337
6347
  Ne(this, "globalIntervalId", null);
6338
6348
  Ne(this, "callbacks");
6339
- this.config = { ...Cl, ...t }, this.callbacks = i, this.state = {
6349
+ this.config = { ...Sl, ...t }, this.callbacks = i, this.state = {
6340
6350
  phase: "idle",
6341
6351
  currentPhaseTimeRemaining: 0,
6342
6352
  totalTimeElapsed: 0,
@@ -6448,10 +6458,10 @@ class S1 {
6448
6458
  (i = (t = this.callbacks).onPhaseChange) == null || i.call(t, this.state.phase, this.getState());
6449
6459
  }
6450
6460
  }
6451
- function I1(e = {}) {
6461
+ function I2(e = {}) {
6452
6462
  const { config: t = {}, callbacks: i = {} } = e, r = M(null);
6453
- r.current || (r.current = new S1(t, {}));
6454
- const n = r.current, [o, s] = E(n.getState()), a = R(() => {
6463
+ r.current || (r.current = new C2(t, {}));
6464
+ const n = r.current, [o, s] = _(n.getState()), a = L(() => {
6455
6465
  s(n.getState());
6456
6466
  }, [n]);
6457
6467
  D(() => {
@@ -6475,11 +6485,11 @@ function I1(e = {}) {
6475
6485
  }, [n, t]), D(() => () => {
6476
6486
  n.destroy();
6477
6487
  }, [n]);
6478
- const l = R(() => {
6488
+ const l = L(() => {
6479
6489
  n.startQuestion(), a();
6480
- }, [n, a]), u = R(() => {
6490
+ }, [n, a]), u = L(() => {
6481
6491
  n.nextPhase(), a();
6482
- }, [n, a]), d = R(() => {
6492
+ }, [n, a]), d = L(() => {
6483
6493
  n.completeInterview(), a();
6484
6494
  }, [n, a]);
6485
6495
  return {
@@ -6490,12 +6500,12 @@ function I1(e = {}) {
6490
6500
  timerService: n
6491
6501
  };
6492
6502
  }
6493
- function L1(e, t = {}) {
6494
- const [i, r] = E({
6503
+ function F2(e, t = {}) {
6504
+ const [i, r] = _({
6495
6505
  data: null,
6496
6506
  loading: !1,
6497
6507
  error: null
6498
- }), n = R(
6508
+ }), n = L(
6499
6509
  async (...o) => {
6500
6510
  var s, a, l, u;
6501
6511
  r((d) => ({ ...d, loading: !0, error: null }));
@@ -6529,8 +6539,8 @@ function L1(e, t = {}) {
6529
6539
  execute: n
6530
6540
  };
6531
6541
  }
6532
- const F1 = (e) => {
6533
- const [t, i] = E(null), [r, n] = E(!1), o = document, s = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), a = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, l = async (w) => {
6542
+ const R2 = (e) => {
6543
+ const [t, i] = _(null), [r, n] = _(!1), o = document, s = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), a = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, l = async (w) => {
6534
6544
  var g;
6535
6545
  try {
6536
6546
  if (!s())
@@ -6554,7 +6564,7 @@ const F1 = (e) => {
6554
6564
  };
6555
6565
  i(y), (w = e == null ? void 0 : e.onError) == null || w.call(e, y);
6556
6566
  }
6557
- }, d = R(() => {
6567
+ }, d = L(() => {
6558
6568
  var g;
6559
6569
  const w = !!a();
6560
6570
  n(w), (g = e == null ? void 0 : e.onFullScreenChange) == null || g.call(e, w);
@@ -6589,14 +6599,14 @@ const F1 = (e) => {
6589
6599
  error: t
6590
6600
  };
6591
6601
  };
6592
- function Sl() {
6602
+ function Cl() {
6593
6603
  const e = Or();
6594
6604
  return er(() => {
6595
6605
  const i = e.api || {};
6596
- return new Aa(i);
6606
+ return new Ta(i);
6597
6607
  }, [e.api]);
6598
6608
  }
6599
- const R1 = (e) => {
6609
+ const L2 = (e) => {
6600
6610
  D(() => {
6601
6611
  const t = (r) => {
6602
6612
  (r.ctrlKey || r.metaKey) && ["c", "v", "a", "t", "n", "w", "r", "s", "p"].includes(r.key.toLowerCase()) && (r.preventDefault(), e({
@@ -6635,11 +6645,11 @@ const R1 = (e) => {
6635
6645
  document.removeEventListener("keydown", t), document.removeEventListener("contextmenu", i);
6636
6646
  };
6637
6647
  }, [e]);
6638
- }, M1 = (e = {}) => {
6639
- const [t, i] = E(!1), [r, n] = E(!1), [o, s] = E(null), [a, l] = E(null), [u, d] = E(null), h = M(e);
6648
+ }, M2 = (e = {}) => {
6649
+ const [t, i] = _(!1), [r, n] = _(!1), [o, s] = _(null), [a, l] = _(null), [u, d] = _(null), h = M(e);
6640
6650
  h.current = e;
6641
6651
  const f = M(null);
6642
- f.current || (f.current = new Tl(e.config)), D(() => {
6652
+ f.current || (f.current = new Al(e.config)), D(() => {
6643
6653
  var b;
6644
6654
  e.config && ((b = f.current) == null || b.updateConfig(e.config));
6645
6655
  }, [e.config]), D(() => {
@@ -6648,77 +6658,79 @@ const R1 = (e) => {
6648
6658
  b == null || b.dispose(), f.current = null;
6649
6659
  };
6650
6660
  }, []);
6651
- const w = R(async (b) => {
6652
- var L, S;
6661
+ const w = L(async (b) => {
6662
+ var F, S;
6653
6663
  const v = f.current;
6654
6664
  if (!v || v.isDisposed())
6655
6665
  throw new q("STT service is not available", "SERVICE_UNAVAILABLE", !1);
6656
6666
  try {
6657
6667
  l(null), s(null), d(null), await v.startRecording(b, {
6658
6668
  onStart: () => {
6659
- var A, T;
6660
- i(!0), (T = (A = h.current).onStart) == null || T.call(A);
6669
+ var E, A;
6670
+ i(!0), (A = (E = h.current).onStart) == null || A.call(E);
6661
6671
  },
6662
6672
  // ---- FIX: onStop is the SINGLE source of truth for stop events.
6663
6673
  // stopRecording() no longer calls onStop separately, preventing double-fire.
6664
6674
  onStop: () => {
6665
- var A, T;
6666
- i(!1), (T = (A = h.current).onStop) == null || T.call(A);
6675
+ var E, A;
6676
+ i(!1), (A = (E = h.current).onStop) == null || A.call(E);
6667
6677
  },
6668
- onError: (A) => {
6678
+ onError: (E) => {
6669
6679
  var O, I;
6670
- const T = A instanceof q ? A : new q(A.message, "RECORDING_ERROR", !0);
6671
- l(T), i(!1), (I = (O = h.current).onError) == null || I.call(O, T);
6680
+ const A = E instanceof q ? E : new q(E.message, "RECORDING_ERROR", !0);
6681
+ l(A), i(!1), (I = (O = h.current).onError) == null || I.call(O, A);
6672
6682
  }
6673
6683
  });
6674
- } catch (A) {
6675
- const T = A instanceof q ? A : new q(
6676
- A instanceof Error ? A.message : String(A),
6684
+ } catch (E) {
6685
+ const A = E instanceof q ? E : new q(
6686
+ E instanceof Error ? E.message : String(E),
6677
6687
  "START_FAILED",
6678
6688
  !1
6679
6689
  );
6680
- throw l(T), i(!1), (S = (L = h.current).onError) == null || S.call(L, T), T;
6690
+ throw l(A), i(!1), (S = (F = h.current).onError) == null || S.call(F, A), A;
6681
6691
  }
6682
- }, []), g = R(async () => {
6683
- var v, L;
6692
+ }, []), g = L(async () => {
6693
+ var v, F;
6684
6694
  const b = f.current;
6685
6695
  if (!b || b.isDisposed())
6686
6696
  throw new q("STT service is not available", "SERVICE_UNAVAILABLE", !1);
6687
6697
  try {
6688
- const S = await b.stopRecording();
6689
- return d(S), S;
6698
+ const S = await b.stopRecording(), E = (S.size / 1024 / 1024).toFixed(2);
6699
+ return console.log(`[useSTT] Received audio blob: ${E} MB`), d(S), S;
6690
6700
  } catch (S) {
6691
- const A = S instanceof q ? S : new q(
6701
+ const E = S instanceof q ? S : new q(
6692
6702
  S instanceof Error ? S.message : String(S),
6693
6703
  "STOP_FAILED",
6694
6704
  !1
6695
6705
  );
6696
- throw l(A), i(!1), (L = (v = h.current).onError) == null || L.call(v, A), A;
6706
+ throw l(E), i(!1), (F = (v = h.current).onError) == null || F.call(v, E), E;
6697
6707
  }
6698
- }, []), y = R(
6708
+ }, []), y = L(
6699
6709
  async (b, v = {}) => {
6700
- var S, A, T, O;
6701
- const L = f.current;
6702
- if (!L || L.isDisposed())
6710
+ var S, E, A, O;
6711
+ const F = f.current;
6712
+ if (!F || F.isDisposed())
6703
6713
  throw new q("STT service is not available", "SERVICE_UNAVAILABLE", !1);
6704
6714
  try {
6705
6715
  l(null), n(!0);
6706
- const I = {
6716
+ const I = (b.size / 1024 / 1024).toFixed(2);
6717
+ console.log(`[useSTT] Starting transcription for blob: ${I} MB`);
6718
+ const P = {
6707
6719
  audioBlob: b,
6708
6720
  ...v
6709
- }, P = await L.transcribe(I);
6710
- return s(P.transcript), n(!1), (A = (S = h.current).onTranscriptionComplete) == null || A.call(S, P), P;
6721
+ }, H = await F.transcribe(P);
6722
+ return console.log(`[useSTT] Transcription complete. Text length: ${H.transcript.length}`), s(H.transcript), n(!1), (E = (S = h.current).onTranscriptionComplete) == null || E.call(S, H), H;
6711
6723
  } catch (I) {
6712
6724
  const P = I instanceof q ? I : new q(
6713
6725
  I instanceof Error ? I.message : String(I),
6714
6726
  "TRANSCRIPTION_FAILED",
6715
6727
  !0
6716
6728
  );
6717
- throw l(P), n(!1), (O = (T = h.current).onError) == null || O.call(T, P), P;
6729
+ throw l(P), n(!1), (O = (A = h.current).onError) == null || O.call(A, P), P;
6718
6730
  }
6719
6731
  },
6720
6732
  []
6721
- ), p = R(() => {
6733
+ ), p = L(() => {
6722
6734
  var b;
6723
6735
  (b = f.current) == null || b.cancelRecording(), i(!1), d(null);
6724
6736
  }, []);
@@ -6733,7 +6745,7 @@ const R1 = (e) => {
6733
6745
  error: a,
6734
6746
  audioBlob: u
6735
6747
  };
6736
- }, D1 = (e) => {
6748
+ }, D2 = (e) => {
6737
6749
  const t = M(null), i = M(!1);
6738
6750
  D(() => {
6739
6751
  const r = () => {
@@ -6763,7 +6775,7 @@ const R1 = (e) => {
6763
6775
  document.removeEventListener("visibilitychange", r), window.removeEventListener("blur", n), t.current && clearTimeout(t.current);
6764
6776
  };
6765
6777
  }, [e]);
6766
- }, P1 = () => {
6778
+ }, P2 = () => {
6767
6779
  D(() => {
6768
6780
  const e = document.createElement("style");
6769
6781
  return e.textContent = `
@@ -6784,7 +6796,7 @@ const R1 = (e) => {
6784
6796
  };
6785
6797
  }, []);
6786
6798
  };
6787
- class O1 {
6799
+ class O2 {
6788
6800
  constructor() {
6789
6801
  Ne(this, "currentAudio", null);
6790
6802
  }
@@ -6839,8 +6851,8 @@ class O1 {
6839
6851
  return this.currentAudio !== null && !this.currentAudio.paused;
6840
6852
  }
6841
6853
  }
6842
- const da = new O1(), B1 = (e = {}) => {
6843
- const [t, i] = E(!1), [r, n] = E(!1), [o, s] = E(null), a = R(
6854
+ const da = new O2(), B2 = (e = {}) => {
6855
+ const [t, i] = _(!1), [r, n] = _(!1), [o, s] = _(null), a = L(
6844
6856
  async (u) => {
6845
6857
  var d;
6846
6858
  try {
@@ -6864,7 +6876,7 @@ const da = new O1(), B1 = (e = {}) => {
6864
6876
  }
6865
6877
  },
6866
6878
  [e]
6867
- ), l = R(() => {
6879
+ ), l = L(() => {
6868
6880
  da.stop(), i(!1), n(!1);
6869
6881
  }, []);
6870
6882
  return {
@@ -6874,7 +6886,7 @@ const da = new O1(), B1 = (e = {}) => {
6874
6886
  isLoading: r,
6875
6887
  error: o
6876
6888
  };
6877
- }, U1 = ({
6889
+ }, U2 = ({
6878
6890
  onViolation: e,
6879
6891
  onEnd: t,
6880
6892
  maxViolations: i = 5
@@ -6883,14 +6895,14 @@ const da = new O1(), B1 = (e = {}) => {
6883
6895
  D(() => {
6884
6896
  s.current = o;
6885
6897
  }, [o]);
6886
- const a = R(
6898
+ const a = L(
6887
6899
  (u) => {
6888
6900
  t && t(u, s.current);
6889
6901
  },
6890
6902
  [t]
6891
6903
  );
6892
6904
  return {
6893
- logViolation: R(
6905
+ logViolation: L(
6894
6906
  ({ type: u, severity: d, details: h }) => {
6895
6907
  const f = {
6896
6908
  id: nd(),
@@ -6909,7 +6921,7 @@ const da = new O1(), B1 = (e = {}) => {
6909
6921
  violationCount: o,
6910
6922
  logList: n
6911
6923
  };
6912
- }, V1 = () => {
6924
+ }, V2 = () => {
6913
6925
  D(() => {
6914
6926
  function e() {
6915
6927
  console.clear(), console.log(
@@ -6992,7 +7004,7 @@ const da = new O1(), B1 = (e = {}) => {
6992
7004
  };
6993
7005
  }, []);
6994
7006
  }, Qo = (e) => {
6995
- const { baseColor: t, borderRadius: i } = Ci(), { loading: r, children: n, ...o } = e;
7007
+ const { baseColor: t, borderRadius: i } = Si(), { loading: r, children: n, ...o } = e;
6996
7008
  return /* @__PURE__ */ c(
6997
7009
  Dr,
6998
7010
  {
@@ -7004,7 +7016,7 @@ const da = new O1(), B1 = (e = {}) => {
7004
7016
  children: r ? /* @__PURE__ */ c(_a, {}) : n
7005
7017
  }
7006
7018
  );
7007
- }, G1 = (e, t, i) => Math.max(t, Math.min(i, e)), ua = (e) => {
7019
+ }, G2 = (e, t, i) => Math.max(t, Math.min(i, e)), ua = (e) => {
7008
7020
  const t = Math.max(0, Math.floor(e)), i = Math.floor(t / 60).toString().padStart(2, "0"), r = (t % 60).toString().padStart(2, "0");
7009
7021
  return `${i}:${r}`;
7010
7022
  }, dn = ({
@@ -7015,7 +7027,7 @@ const da = new O1(), B1 = (e = {}) => {
7015
7027
  className: n = "",
7016
7028
  showLabel: o = !0
7017
7029
  }) => {
7018
- const s = Math.max(1, e || 1), a = G1(t / s, 0, 1), { radius: l, circumference: u, dashOffset: d, center: h } = er(() => {
7030
+ const s = Math.max(1, e || 1), a = G2(t / s, 0, 1), { radius: l, circumference: u, dashOffset: d, center: h } = er(() => {
7019
7031
  const g = (i - r) / 2, y = 2 * Math.PI * g, p = y * (1 - a), b = Math.round(r) % 2 === 1, v = i / 2 + (b ? 0.5 : 0);
7020
7032
  return { radius: g, circumference: y, dashOffset: p, center: v };
7021
7033
  }, [i, r, a]), f = er(() => a <= 0.25 ? "iw-stroke-red-500" : a <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [a]), w = a <= 0.25 ? "iw-animate-pulse" : "";
@@ -7081,11 +7093,11 @@ const da = new O1(), B1 = (e = {}) => {
7081
7093
  ]
7082
7094
  }
7083
7095
  );
7084
- }, j1 = ({
7096
+ }, j2 = ({
7085
7097
  timerState: e,
7086
7098
  answeringTime: t
7087
7099
  }) => {
7088
- const i = (e == null ? void 0 : e.currentPhaseTimeRemaining) || 0, r = t || Cl.answeringDuration;
7100
+ const i = (e == null ? void 0 : e.currentPhaseTimeRemaining) || 0, r = t || Sl.answeringDuration;
7089
7101
  return /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
7090
7102
  /* @__PURE__ */ c(
7091
7103
  dn,
@@ -7106,7 +7118,7 @@ const da = new O1(), B1 = (e = {}) => {
7106
7118
  ] })
7107
7119
  ] })
7108
7120
  ] });
7109
- }, z1 = ({
7121
+ }, z2 = ({
7110
7122
  question: e,
7111
7123
  isLoading: t = !1,
7112
7124
  phase: i,
@@ -7136,7 +7148,7 @@ const da = new O1(), B1 = (e = {}) => {
7136
7148
  }
7137
7149
  ),
7138
7150
  /* @__PURE__ */ c(
7139
- $1,
7151
+ $2,
7140
7152
  {
7141
7153
  phase: i,
7142
7154
  question: e,
@@ -7148,7 +7160,7 @@ const da = new O1(), B1 = (e = {}) => {
7148
7160
  )
7149
7161
  ] })
7150
7162
  }
7151
- ), $1 = ({ phase: e, question: t, isLoading: i, brandName: r, timerState: n, answeringTime: o }) => {
7163
+ ), $2 = ({ phase: e, question: t, isLoading: i, brandName: r, timerState: n, answeringTime: o }) => {
7152
7164
  const s = r || "We", a = r ? "is" : "are";
7153
7165
  if (i || e === G.FETCHING_QUESTION || e === G.IDLE)
7154
7166
  return /* @__PURE__ */ m("div", { className: "iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10", children: [
@@ -7168,7 +7180,7 @@ const da = new O1(), B1 = (e = {}) => {
7168
7180
  /* @__PURE__ */ c(l, {})
7169
7181
  ] }),
7170
7182
  /* @__PURE__ */ c(
7171
- j1,
7183
+ j2,
7172
7184
  {
7173
7185
  timerState: n,
7174
7186
  answeringTime: o
@@ -7193,7 +7205,7 @@ const da = new O1(), B1 = (e = {}) => {
7193
7205
  default:
7194
7206
  return /* @__PURE__ */ c("p", { className: "iw-text-lg iw-leading-7", children: t == null ? void 0 : t.question });
7195
7207
  }
7196
- }, W1 = ({
7208
+ }, W2 = ({
7197
7209
  label: e,
7198
7210
  error: t,
7199
7211
  fullWidth: i = !1,
@@ -7228,14 +7240,14 @@ const da = new O1(), B1 = (e = {}) => {
7228
7240
  ]
7229
7241
  }
7230
7242
  );
7231
- }, H1 = ({
7243
+ }, H2 = ({
7232
7244
  answerText: e,
7233
7245
  onAnswerChange: t,
7234
7246
  timerState: i,
7235
7247
  editingTime: r
7236
7248
  }) => /* @__PURE__ */ m("div", { className: "iw-w-full iw-bg-white iw-rounded-xl iw-border iw-border-[#84bbf5] iw-overflow-hidden iw-rounded-tr-none", children: [
7237
7249
  /* @__PURE__ */ c("div", { className: "iw-p-2 iw-pb-0", children: /* @__PURE__ */ c(
7238
- W1,
7250
+ W2,
7239
7251
  {
7240
7252
  value: e,
7241
7253
  onChange: t,
@@ -7262,9 +7274,9 @@ const da = new O1(), B1 = (e = {}) => {
7262
7274
  ] })
7263
7275
  ] }), ha = ({
7264
7276
  children: e
7265
- }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1", children: e }), q1 = ({
7277
+ }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1", children: e }), q2 = ({
7266
7278
  children: e
7267
- }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1", children: e }), K1 = ({ questionNumber: e }) => /* @__PURE__ */ m(
7279
+ }) => /* @__PURE__ */ c("div", { className: "iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1", children: e }), K2 = ({ questionNumber: e }) => /* @__PURE__ */ m(
7268
7280
  "div",
7269
7281
  {
7270
7282
  className: "iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",
@@ -7285,15 +7297,15 @@ const da = new O1(), B1 = (e = {}) => {
7285
7297
  /* @__PURE__ */ c("span", { children: "." }),
7286
7298
  /* @__PURE__ */ c("span", { children: "." })
7287
7299
  ] })
7288
- ] }), Y1 = ({ phase: e, questionNumber: t }) => {
7300
+ ] }), Y2 = ({ phase: e, questionNumber: t }) => {
7289
7301
  switch (e) {
7290
7302
  case G.FETCHING_QUESTION:
7291
7303
  return /* @__PURE__ */ m(ha, { children: [
7292
- /* @__PURE__ */ c(K1, { questionNumber: t + 1 }),
7304
+ /* @__PURE__ */ c(K2, { questionNumber: t + 1 }),
7293
7305
  /* @__PURE__ */ c(fa, {})
7294
7306
  ] });
7295
7307
  case G.ANSWERING:
7296
- return /* @__PURE__ */ c(q1, { children: /* @__PURE__ */ c(fa, { label: "You" }) });
7308
+ return /* @__PURE__ */ c(q2, { children: /* @__PURE__ */ c(fa, { label: "You" }) });
7297
7309
  case G.TRANSCRIBING:
7298
7310
  return /* @__PURE__ */ c(ha, { children: /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-px-1 iw-py-1.5 iw-rounded-lg iw-mb-2 iw-text-sm iw-bg-[#F2E8FE]", children: [
7299
7311
  /* @__PURE__ */ c("div", { className: "iw-h-8 iw-w-12 iw-transcribing-icon" }),
@@ -7302,7 +7314,7 @@ const da = new O1(), B1 = (e = {}) => {
7302
7314
  default:
7303
7315
  return null;
7304
7316
  }
7305
- }, X1 = ({
7317
+ }, X2 = ({
7306
7318
  item: e,
7307
7319
  index: t,
7308
7320
  isCurrentQuestion: i = !1,
@@ -7356,7 +7368,7 @@ const da = new O1(), B1 = (e = {}) => {
7356
7368
  }
7357
7369
  ),
7358
7370
  l ? /* @__PURE__ */ c(
7359
- H1,
7371
+ H2,
7360
7372
  {
7361
7373
  answerText: n || "",
7362
7374
  onAnswerChange: o,
@@ -7375,14 +7387,14 @@ const da = new O1(), B1 = (e = {}) => {
7375
7387
  )
7376
7388
  ] }),
7377
7389
  i && /* @__PURE__ */ c(
7378
- Y1,
7390
+ Y2,
7379
7391
  {
7380
7392
  phase: s == null ? void 0 : s.phase,
7381
7393
  questionNumber: t + 1
7382
7394
  }
7383
7395
  )
7384
7396
  ] });
7385
- }, Q1 = () => /* @__PURE__ */ c("div", { className: "iw-space-y-6 iw-animate-pulse", children: [1, 2, 3].map((e) => /* @__PURE__ */ m(
7397
+ }, Q2 = () => /* @__PURE__ */ c("div", { className: "iw-space-y-6 iw-animate-pulse", children: [1, 2, 3].map((e) => /* @__PURE__ */ m(
7386
7398
  "div",
7387
7399
  {
7388
7400
  className: `iw-flex iw-flex-col ${e % 2 === 0 ? "iw-items-end" : "iw-items-start"} iw-gap-2`,
@@ -7392,7 +7404,7 @@ const da = new O1(), B1 = (e = {}) => {
7392
7404
  ]
7393
7405
  },
7394
7406
  e
7395
- )) }), J1 = ({
7407
+ )) }), J2 = ({
7396
7408
  transcript: e,
7397
7409
  isLoading: t,
7398
7410
  className: i = "",
@@ -7419,8 +7431,8 @@ const da = new O1(), B1 = (e = {}) => {
7419
7431
  /* @__PURE__ */ c("div", { className: "iw-h-px iw-w-full iw-border-t iw-border-dashed iw-border-gray-300" })
7420
7432
  ] }),
7421
7433
  /* @__PURE__ */ m("div", { className: "iw-flex-1 iw-overflow-y-auto iw-pr-2 iw-space-y-6 iw-scrollbar-thin iw-max-w-xl iw-pb-5", children: [
7422
- t ? /* @__PURE__ */ c(Q1, {}) : e == null ? void 0 : e.map((u, d) => /* @__PURE__ */ c(
7423
- X1,
7434
+ t ? /* @__PURE__ */ c(Q2, {}) : e == null ? void 0 : e.map((u, d) => /* @__PURE__ */ c(
7435
+ X2,
7424
7436
  {
7425
7437
  item: u,
7426
7438
  index: d,
@@ -7438,7 +7450,7 @@ const da = new O1(), B1 = (e = {}) => {
7438
7450
  ] })
7439
7451
  ]
7440
7452
  }
7441
- ), Z1 = ({
7453
+ ), Z2 = ({
7442
7454
  interviewId: e,
7443
7455
  className: t = "",
7444
7456
  currentQuestion: i,
@@ -7449,7 +7461,7 @@ const da = new O1(), B1 = (e = {}) => {
7449
7461
  timerState: a,
7450
7462
  editingTime: l
7451
7463
  }) => {
7452
- const u = Sl(), [d, h] = E([]), [f, w] = E(!0), g = Hn.useRef(null);
7464
+ const u = Cl(), [d, h] = _([]), [f, w] = _(!0), g = Hn.useRef(null);
7453
7465
  return D(() => {
7454
7466
  var y;
7455
7467
  (y = g.current) == null || y.scrollIntoView({ behavior: "smooth" });
@@ -7490,7 +7502,7 @@ const da = new O1(), B1 = (e = {}) => {
7490
7502
  answer_submitted_at: (/* @__PURE__ */ new Date()).toISOString()
7491
7503
  } : p));
7492
7504
  }, [r, o]), /* @__PURE__ */ c(
7493
- J1,
7505
+ J2,
7494
7506
  {
7495
7507
  transcript: d,
7496
7508
  isLoading: f || (d == null ? void 0 : d.length) === 0,
@@ -7503,25 +7515,25 @@ const da = new O1(), B1 = (e = {}) => {
7503
7515
  editingTime: l
7504
7516
  }
7505
7517
  );
7506
- }, kn = 5, An = 5;
7507
- function e2({
7518
+ }, kn = 5, Tn = 5;
7519
+ function e1({
7508
7520
  isOpen: e,
7509
7521
  onClose: t,
7510
7522
  warningCount: i,
7511
7523
  violationType: r,
7512
7524
  onDisqualify: n
7513
7525
  }) {
7514
- const [, o] = E(An), s = M(t), a = M(n), l = M(i);
7526
+ const [, o] = _(Tn), s = M(t), a = M(n), l = M(i);
7515
7527
  if (D(() => {
7516
7528
  s.current = t, a.current = n, l.current = i;
7517
7529
  }, [t, n, i]), D(() => {
7518
7530
  if (!e) return;
7519
7531
  const f = setInterval(() => {
7520
- o((w) => w <= 1 ? (l.current + 1 > kn ? a.current() : s.current(), An) : w - 1);
7532
+ o((w) => w <= 1 ? (l.current + 1 > kn ? a.current() : s.current(), Tn) : w - 1);
7521
7533
  }, 1e3);
7522
7534
  return () => clearInterval(f);
7523
7535
  }, [e]), D(() => {
7524
- e && o(An);
7536
+ e && o(Tn);
7525
7537
  }, [e]), !e) return null;
7526
7538
  const u = () => {
7527
7539
  switch (r) {
@@ -7582,7 +7594,7 @@ function e2({
7582
7594
  }
7583
7595
  );
7584
7596
  }
7585
- const t2 = ({
7597
+ const t1 = ({
7586
7598
  isOpen: e,
7587
7599
  onClose: t,
7588
7600
  children: i,
@@ -7661,7 +7673,7 @@ const t2 = ({
7661
7673
  )
7662
7674
  ] });
7663
7675
  return ga(u, document.body);
7664
- }, i2 = (e) => /* @__PURE__ */ m(
7676
+ }, i1 = (e) => /* @__PURE__ */ m(
7665
7677
  "svg",
7666
7678
  {
7667
7679
  xmlns: "http://www.w3.org/2000/svg",
@@ -7679,7 +7691,7 @@ const t2 = ({
7679
7691
  /* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "10" })
7680
7692
  ]
7681
7693
  }
7682
- ), r2 = ({
7694
+ ), r1 = ({
7683
7695
  showHardReloadWarning: e,
7684
7696
  onContinue: t
7685
7697
  }) => {
@@ -7687,7 +7699,7 @@ const t2 = ({
7687
7699
  t();
7688
7700
  };
7689
7701
  return /* @__PURE__ */ m(
7690
- t2,
7702
+ t1,
7691
7703
  {
7692
7704
  isOpen: e,
7693
7705
  onClose: i,
@@ -7708,7 +7720,7 @@ const t2 = ({
7708
7720
  onClick: i,
7709
7721
  className: "iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",
7710
7722
  children: [
7711
- /* @__PURE__ */ c(i2, { className: "iw-size-4" }),
7723
+ /* @__PURE__ */ c(i1, { className: "iw-size-4" }),
7712
7724
  "Continue Session"
7713
7725
  ]
7714
7726
  }
@@ -7716,7 +7728,7 @@ const t2 = ({
7716
7728
  ]
7717
7729
  }
7718
7730
  );
7719
- }, Il = qn(null), n2 = () => {
7731
+ }, Il = qn(null), n1 = () => {
7720
7732
  const e = Ni(Il);
7721
7733
  return e || {
7722
7734
  violationCount: 0,
@@ -7729,14 +7741,14 @@ const t2 = ({
7729
7741
  handleDisqualify: () => {
7730
7742
  }
7731
7743
  };
7732
- }, o2 = wa(
7744
+ }, o1 = wa(
7733
7745
  ({ children: e, onDisqualify: t, isCompleted: i }, r) => {
7734
- const [n, o] = E(!1), [s, a] = E(!1), [l, u] = E(!1), [d, h] = E("fullscreen_exit"), { logViolation: f, violationCount: w } = U1({
7746
+ const [n, o] = _(!1), [s, a] = _(!1), [l, u] = _(!1), [d, h] = _("fullscreen_exit"), { logViolation: f, violationCount: w } = U2({
7735
7747
  maxViolations: 5,
7736
7748
  onViolation: (v) => {
7737
7749
  !s && !i && !l && (o(!0), h(v.type));
7738
7750
  }
7739
- }), { enterFullScreen: g, isFullScreen: y, exitFullScreen: p } = F1({
7751
+ }), { enterFullScreen: g, isFullScreen: y, exitFullScreen: p } = R2({
7740
7752
  onFullScreenChange(v) {
7741
7753
  !v && !s && !l && !i && (o(!0), f({
7742
7754
  type: "fullscreen_exit",
@@ -7763,10 +7775,10 @@ const t2 = ({
7763
7775
  }
7764
7776
  }),
7765
7777
  []
7766
- ), D1(f), R1(f), P1(), V1(), D(() => {
7767
- const v = (L) => {
7778
+ ), D2(f), L2(f), P2(), V2(), D(() => {
7779
+ const v = (F) => {
7768
7780
  if (!(s || l || i))
7769
- return L.preventDefault(), L.returnValue = void 0, "";
7781
+ return F.preventDefault(), F.returnValue = void 0, "";
7770
7782
  };
7771
7783
  return window.addEventListener("beforeunload", v), () => {
7772
7784
  window.removeEventListener("beforeunload", v);
@@ -7791,7 +7803,7 @@ const t2 = ({
7791
7803
  children: [
7792
7804
  /* @__PURE__ */ c("div", { className: "iw-relative iw-h-full iw-w-full", children: e }),
7793
7805
  !y && w > 0 && !s && !l && /* @__PURE__ */ c(
7794
- r2,
7806
+ r1,
7795
7807
  {
7796
7808
  showHardReloadWarning: !0,
7797
7809
  logViolation: f,
@@ -7802,7 +7814,7 @@ const t2 = ({
7802
7814
  }
7803
7815
  );
7804
7816
  }
7805
- ), s2 = ({
7817
+ ), s1 = ({
7806
7818
  onClick: e,
7807
7819
  text: t = "Submit response"
7808
7820
  }) => (D(() => {
@@ -7822,7 +7834,7 @@ const t2 = ({
7822
7834
  /* @__PURE__ */ c("span", { className: "iw-bg-white/90 iw-text-[#062260] iw-px-2 iw-py-1 iw-rounded iw-text-xs iw-font-mono iw-font-bold group-hover:iw-bg-white iw-transition-colors", children: "Press Enter" })
7823
7835
  ]
7824
7836
  }
7825
- ) })), a2 = ({
7837
+ ) })), a1 = ({
7826
7838
  brandName: e,
7827
7839
  brandLogo: t,
7828
7840
  currentQuestion: i,
@@ -7844,8 +7856,8 @@ const t2 = ({
7844
7856
  violationCount: p,
7845
7857
  violationType: b,
7846
7858
  handleClose: v,
7847
- handleDisqualify: L
7848
- } = n2();
7859
+ handleDisqualify: F
7860
+ } = n1();
7849
7861
  return /* @__PURE__ */ m(
7850
7862
  "div",
7851
7863
  {
@@ -7853,7 +7865,7 @@ const t2 = ({
7853
7865
  children: [
7854
7866
  /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-flex-1 iw-p-5 iw-bg-white/50 iw-border iw-border-[#E8EEFE] iw-rounded-s-3xl iw-overflow-hidden", children: [
7855
7867
  /* @__PURE__ */ c("div", { className: "iw-flex iw-items-start iw-justify-between iw-gap-3 iw-mb-4", children: /* @__PURE__ */ c("div", { className: "iw-flex-1", children: /* @__PURE__ */ c(
7856
- z1,
7868
+ z2,
7857
7869
  {
7858
7870
  question: i,
7859
7871
  isLoading: n === G.FETCHING_QUESTION || n === G.IDLE,
@@ -7876,19 +7888,19 @@ const t2 = ({
7876
7888
  }
7877
7889
  ),
7878
7890
  /* @__PURE__ */ c(
7879
- e2,
7891
+ e1,
7880
7892
  {
7881
7893
  isOpen: y,
7882
7894
  warningCount: p,
7883
7895
  violationType: b,
7884
7896
  onClose: v,
7885
- onDisqualify: L
7897
+ onDisqualify: F
7886
7898
  }
7887
7899
  )
7888
7900
  ] })
7889
7901
  ] }),
7890
7902
  /* @__PURE__ */ c("div", { className: "iw-interview-transcription iw-w-1/4 iw-min-w-32 iw-h-full", children: /* @__PURE__ */ c(
7891
- Z1,
7903
+ Z2,
7892
7904
  {
7893
7905
  interviewId: s,
7894
7906
  currentQuestion: i,
@@ -7901,7 +7913,7 @@ const t2 = ({
7901
7913
  }
7902
7914
  ) }),
7903
7915
  d && (n === G.ANSWERING || n === G.EDITING) && /* @__PURE__ */ c(
7904
- s2,
7916
+ s1,
7905
7917
  {
7906
7918
  onClick: d,
7907
7919
  text: n === G.ANSWERING ? "Submit Response" : "Submit Final Response"
@@ -7910,7 +7922,7 @@ const t2 = ({
7910
7922
  ]
7911
7923
  }
7912
7924
  );
7913
- }, c2 = ({
7925
+ }, c1 = ({
7914
7926
  isOpen: e,
7915
7927
  onClose: t,
7916
7928
  children: i,
@@ -8009,12 +8021,12 @@ const t2 = ({
8009
8021
  }
8010
8022
  );
8011
8023
  return ga(u, document.body);
8012
- }, l2 = ({
8024
+ }, l1 = ({
8013
8025
  confirmExitInterview: e,
8014
8026
  isOpen: t,
8015
8027
  onClose: i
8016
8028
  }) => /* @__PURE__ */ m(
8017
- c2,
8029
+ c1,
8018
8030
  {
8019
8031
  isOpen: t,
8020
8032
  onClose: i,
@@ -8047,7 +8059,7 @@ const t2 = ({
8047
8059
  ] })
8048
8060
  ]
8049
8061
  }
8050
- ), d2 = ({
8062
+ ), d1 = ({
8051
8063
  title: e,
8052
8064
  brandName: t,
8053
8065
  brandLogo: i,
@@ -8055,7 +8067,7 @@ const t2 = ({
8055
8067
  totalDuration: n = 30,
8056
8068
  elapsedTime: o = 0
8057
8069
  }) => {
8058
- const [s, a] = E(!1), l = Math.min(o / (n * 60) * 100, 100);
8070
+ const [s, a] = _(!1), l = Math.min(o / (n * 60) * 100, 100);
8059
8071
  return /* @__PURE__ */ m("header", { className: "iw-w-full iw-text-gray-900 iw-shadow-sm", children: [
8060
8072
  /* @__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: [
8061
8073
  /* @__PURE__ */ m("div", { className: "iw-flex iw-items-center iw-space-x-2", children: [
@@ -8094,7 +8106,7 @@ const t2 = ({
8094
8106
  ] }), {}),
8095
8107
  /* @__PURE__ */ c("div", { className: "iw-h-px iw-bg-gray-200" }),
8096
8108
  /* @__PURE__ */ c(
8097
- l2,
8109
+ l1,
8098
8110
  {
8099
8111
  isOpen: s,
8100
8112
  confirmExitInterview: () => {
@@ -8104,7 +8116,7 @@ const t2 = ({
8104
8116
  }
8105
8117
  )
8106
8118
  ] });
8107
- }, u2 = ({
8119
+ }, u1 = ({
8108
8120
  className: e = "",
8109
8121
  width: t,
8110
8122
  height: i = 56,
@@ -8115,16 +8127,16 @@ const t2 = ({
8115
8127
  mediaStream: a,
8116
8128
  startOnMount: l = !0
8117
8129
  }) => {
8118
- const { baseColor: u } = Ci(), d = M(null), h = M(null), f = M(null), w = M(null), g = M(null), y = M(null), p = M(!1), [b, v] = E(null);
8130
+ const { baseColor: u } = Si(), d = M(null), h = M(null), f = M(null), w = M(null), g = M(null), y = M(null), p = M(!1), [b, v] = _(null);
8119
8131
  D(() => {
8120
8132
  if (t || !h.current) return;
8121
- const S = h.current, A = () => {
8133
+ const S = h.current, E = () => {
8122
8134
  const O = d.current;
8123
8135
  if (!O) return;
8124
8136
  const I = S.clientWidth, P = i;
8125
8137
  O.width = Math.max(1, Math.floor(I * window.devicePixelRatio || 1)), O.height = Math.max(1, Math.floor(P * window.devicePixelRatio || 1));
8126
- }, T = new ResizeObserver(A);
8127
- return T.observe(S), A(), () => T.disconnect();
8138
+ }, A = new ResizeObserver(E);
8139
+ return A.observe(S), E(), () => A.disconnect();
8128
8140
  }, [t, i]), D(() => {
8129
8141
  if (!t) return;
8130
8142
  const S = d.current;
@@ -8139,8 +8151,8 @@ const t2 = ({
8139
8151
  let S = !1;
8140
8152
  return (async () => {
8141
8153
  try {
8142
- const T = new (window.AudioContext || window.webkitAudioContext)();
8143
- f.current = T;
8154
+ const A = new (window.AudioContext || window.webkitAudioContext)();
8155
+ f.current = A;
8144
8156
  let O = a;
8145
8157
  if (!O) {
8146
8158
  if (!l) return;
@@ -8150,40 +8162,40 @@ const t2 = ({
8150
8162
  }), p.current = !0;
8151
8163
  }
8152
8164
  if (S) return;
8153
- const I = T.createAnalyser();
8165
+ const I = A.createAnalyser();
8154
8166
  I.fftSize = o, I.smoothingTimeConstant = s, w.current = I;
8155
- const P = T.createMediaStreamSource(O);
8156
- g.current = P, P.connect(I), L();
8157
- } catch (T) {
8158
- v((T == null ? void 0 : T.message) || "Failed to initialize microphone");
8167
+ const P = A.createMediaStreamSource(O);
8168
+ g.current = P, P.connect(I), F();
8169
+ } catch (A) {
8170
+ v((A == null ? void 0 : A.message) || "Failed to initialize microphone");
8159
8171
  }
8160
8172
  })(), () => {
8161
- var T, O, I, P;
8173
+ var A, O, I, P;
8162
8174
  S = !0, y.current && cancelAnimationFrame(y.current);
8163
8175
  try {
8164
- (T = g.current) == null || T.disconnect();
8176
+ (A = g.current) == null || A.disconnect();
8165
8177
  } catch {
8166
8178
  }
8167
8179
  try {
8168
8180
  (O = w.current) == null || O.disconnect();
8169
8181
  } catch {
8170
8182
  }
8171
- p.current && ((P = ((I = g.current) == null ? void 0 : I.mediaStream) || void 0) == null || P.getTracks().forEach((X) => X.stop())), f.current && f.current.state !== "closed" && f.current.close();
8183
+ p.current && ((P = ((I = g.current) == null ? void 0 : I.mediaStream) || void 0) == null || P.getTracks().forEach((H) => H.stop())), f.current && f.current.state !== "closed" && f.current.close();
8172
8184
  };
8173
8185
  }, [a, o, s, l]);
8174
- const L = () => {
8175
- const S = d.current, A = w.current;
8176
- if (!S || !A) return;
8177
- const T = S.getContext("2d");
8178
- if (!T) return;
8179
- const O = window.devicePixelRatio || 1, I = S.width, P = S.height, X = A.frequencyBinCount, xe = new Uint8Array(X), Q = () => {
8180
- y.current = requestAnimationFrame(Q), A.getByteTimeDomainData(xe), T.clearRect(0, 0, I, P), T.fillStyle = "rgba(0,0,0,0)", T.fillRect(0, 0, I, P);
8181
- const K = Math.max(1, Math.floor(r * O)), ie = Math.max(1, Math.floor(n * O)), V = K + ie, J = Math.max(8, Math.floor((I + ie) / V)), Ze = Math.floor(xe.length / J);
8186
+ const F = () => {
8187
+ const S = d.current, E = w.current;
8188
+ if (!S || !E) return;
8189
+ const A = S.getContext("2d");
8190
+ if (!A) return;
8191
+ const O = window.devicePixelRatio || 1, I = S.width, P = S.height, H = E.frequencyBinCount, xe = new Uint8Array(H), Q = () => {
8192
+ y.current = requestAnimationFrame(Q), E.getByteTimeDomainData(xe), A.clearRect(0, 0, I, P), A.fillStyle = "rgba(0,0,0,0)", A.fillRect(0, 0, I, P);
8193
+ const Y = Math.max(1, Math.floor(r * O)), ie = Math.max(1, Math.floor(n * O)), V = Y + ie, J = Math.max(8, Math.floor((I + ie) / V)), Ze = Math.floor(xe.length / J);
8182
8194
  for (let gt = 0; gt < J; gt++) {
8183
- const Se = Math.min(xe.length - 1, gt * Ze), kt = xe[Se] / 128 - 1, We = Math.abs(kt), ii = Math.pow(We, 0.6), At = Math.max(P * 0.06, ii * (P * 0.9)), ri = gt * V, ni = (P - At) / 2, ot = 140 - Math.min(140, 140 * We), Tt = 85, de = 48 + Math.floor(12 * (1 - We));
8184
- T.fillStyle = `${u}`, T.shadowColor = `hsla(${ot}, ${Tt}%, ${de}%, ${0.25 * We})`, T.shadowBlur = 8 * We;
8185
- const et = Math.min(K / 2, At / 2);
8186
- h2(T, ri, ni, K, At, et), T.fill();
8195
+ const Ce = Math.min(xe.length - 1, gt * Ze), kt = xe[Ce] / 128 - 1, We = Math.abs(kt), ii = Math.pow(We, 0.6), Tt = Math.max(P * 0.06, ii * (P * 0.9)), ri = gt * V, ni = (P - Tt) / 2, ot = 140 - Math.min(140, 140 * We), At = 85, de = 48 + Math.floor(12 * (1 - We));
8196
+ A.fillStyle = `${u}`, A.shadowColor = `hsla(${ot}, ${At}%, ${de}%, ${0.25 * We})`, A.shadowBlur = 8 * We;
8197
+ const et = Math.min(Y / 2, Tt / 2);
8198
+ h1(A, ri, ni, Y, Tt, et), A.fill();
8187
8199
  }
8188
8200
  };
8189
8201
  Q();
@@ -8201,11 +8213,11 @@ const t2 = ({
8201
8213
  }
8202
8214
  );
8203
8215
  };
8204
- function h2(e, t, i, r, n, o) {
8216
+ function h1(e, t, i, r, n, o) {
8205
8217
  const s = Math.min(o, r / 2, n / 2);
8206
8218
  e.beginPath(), e.moveTo(t + s, i), e.lineTo(t + r - s, i), e.quadraticCurveTo(t + r, i, t + r, i + s), e.lineTo(t + r, i + n - s), e.quadraticCurveTo(t + r, i + n, t + r - s, i + n), e.lineTo(t + s, i + n), e.quadraticCurveTo(t, i + n, t, i + n - s), e.lineTo(t, i + s), e.quadraticCurveTo(t, i, t + s, i), e.closePath();
8207
8219
  }
8208
- const f2 = ({
8220
+ const f1 = ({
8209
8221
  state: e,
8210
8222
  answeringTime: t,
8211
8223
  nextPhase: i,
@@ -8233,7 +8245,7 @@ const f2 = ({
8233
8245
  /* @__PURE__ */ c("p", { className: "iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: "Done talking? Click the button to review your answer." })
8234
8246
  ] }),
8235
8247
  /* @__PURE__ */ m("div", { children: [
8236
- /* @__PURE__ */ c(u2, {}),
8248
+ /* @__PURE__ */ c(u1, {}),
8237
8249
  r && /* @__PURE__ */ m("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
8238
8250
  "Recording error: ",
8239
8251
  r.message
@@ -8249,8 +8261,8 @@ const f2 = ({
8249
8261
  }
8250
8262
  ) })
8251
8263
  ] });
8252
- function w2() {
8253
- const [e, t] = E(!0), i = er(
8264
+ function w1() {
8265
+ const [e, t] = _(!0), i = er(
8254
8266
  () => [0, 1, 2].map((r) => ({ id: r })),
8255
8267
  []
8256
8268
  );
@@ -8287,7 +8299,7 @@ function w2() {
8287
8299
  /* @__PURE__ */ c("div", { className: "iw-text-center", children: /* @__PURE__ */ c("p", { className: "iw-text-gray-500 iw-font-medium", children: "Preparing your question..." }) })
8288
8300
  ] });
8289
8301
  }
8290
- const m2 = ({
8302
+ const m1 = ({
8291
8303
  size: e = "192px",
8292
8304
  className: t,
8293
8305
  colors: i,
@@ -8429,9 +8441,9 @@ const m2 = ({
8429
8441
  }
8430
8442
  );
8431
8443
  };
8432
- function g2({ ttsError: e }) {
8444
+ function g1({ ttsError: e }) {
8433
8445
  return /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full", children: [
8434
- /* @__PURE__ */ c(m2, { size: "80px" }),
8446
+ /* @__PURE__ */ c(m1, { size: "80px" }),
8435
8447
  e && /* @__PURE__ */ m("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
8436
8448
  "Audio playback failed: ",
8437
8449
  e.message
@@ -8439,7 +8451,7 @@ function g2({ ttsError: e }) {
8439
8451
  /* @__PURE__ */ c("p", { className: "iw-text- iw-text-gray-700", children: "Your AI interviewer is speaking..." })
8440
8452
  ] });
8441
8453
  }
8442
- const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
8454
+ const p1 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
8443
8455
  /* @__PURE__ */ m("div", { children: [
8444
8456
  /* @__PURE__ */ c("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Get Ready to Answer" }),
8445
8457
  /* @__PURE__ */ c("p", { className: "iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: "After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below." })
@@ -8468,7 +8480,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8468
8480
  children: "Start Answering"
8469
8481
  }
8470
8482
  ) })
8471
- ] }), y2 = ({
8483
+ ] }), y1 = ({
8472
8484
  sttError: e,
8473
8485
  editingDuration: t
8474
8486
  }) => /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
@@ -8516,7 +8528,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8516
8528
  e.message,
8517
8529
  e.recoverable && " (attempting to continue)"
8518
8530
  ] })
8519
- ] }), b2 = ({
8531
+ ] }), b1 = ({
8520
8532
  interviewTitle: e,
8521
8533
  brandName: t = "Novara",
8522
8534
  brandLogo: i,
@@ -8527,9 +8539,9 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8527
8539
  videoFeedRef: a
8528
8540
  }) => {
8529
8541
  var ci, zi;
8530
- const l = Sl(), { baseUrl: u, authToken: d } = xa(), { timers: h, stt: f, proctoring: w } = Qn(), g = M(null), [y, p] = E(null), [b, v] = E(""), [L, S] = E(null), [A, T] = E(
8542
+ const l = Cl(), { baseUrl: u, authToken: d } = xa(), { timers: h, stt: f, proctoring: w } = Qn(), g = M(null), [y, p] = _(null), [b, v] = _(""), [F, S] = _(null), [E, A] = _(
8531
8543
  Pr
8532
- ), [O, I] = E(!0), P = M(""), X = M(null), xe = {
8544
+ ), [O, I] = _(!0), P = M(""), H = M(null), xe = {
8533
8545
  thinkingTime: (h == null ? void 0 : h.thinkingDuration) || 0,
8534
8546
  // TODO: Use this to use the estimated answer duration from response
8535
8547
  // answeringTime:
@@ -8538,7 +8550,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8538
8550
  // 120,
8539
8551
  answeringTime: (h == null ? void 0 : h.answeringDuration) || 120,
8540
8552
  editingTime: O ? (h == null ? void 0 : h.editingDuration) || 30 : 0
8541
- }, { thinkingTime: Q, answeringTime: K, editingTime: ie } = xe;
8553
+ }, { thinkingTime: Q, answeringTime: Y, editingTime: ie } = xe;
8542
8554
  D(() => {
8543
8555
  P.current = b;
8544
8556
  }, [b]);
@@ -8546,31 +8558,31 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8546
8558
  speak: J,
8547
8559
  stop: Ze,
8548
8560
  error: gt
8549
- } = B1({
8561
+ } = B2({
8550
8562
  onEnd: () => {
8551
8563
  V.current = !1, de();
8552
8564
  },
8553
8565
  onError: () => {
8554
8566
  V.current || (V.current = !0, de());
8555
8567
  }
8556
- }), Se = M(!1), kt = M(!1), {
8568
+ }), Ce = M(!1), kt = M(!1), {
8557
8569
  startRecording: We,
8558
8570
  stopRecording: ii,
8559
- transcribe: At,
8571
+ transcribe: Tt,
8560
8572
  cancelRecording: ri,
8561
8573
  error: ni
8562
- } = M1({
8574
+ } = M2({
8563
8575
  config: {
8564
8576
  baseUrl: u,
8565
8577
  provider: f == null ? void 0 : f.provider,
8566
8578
  model: f == null ? void 0 : f.model,
8567
8579
  language: f == null ? void 0 : f.language,
8568
8580
  authToken: d,
8569
- qnaId: ((ci = X.current) == null ? void 0 : ci.qna_id) || "",
8581
+ qnaId: ((ci = H.current) == null ? void 0 : ci.qna_id) || "",
8570
8582
  interviewId: r
8571
8583
  },
8572
8584
  onStart: () => {
8573
- Se.current = !1, kt.current = !1;
8585
+ Ce.current = !1, kt.current = !1;
8574
8586
  },
8575
8587
  onStop: () => {
8576
8588
  },
@@ -8579,12 +8591,12 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8579
8591
  v(z), P.current = z, kt.current || (kt.current = !0, de());
8580
8592
  },
8581
8593
  onError: (B) => {
8582
- console.error("STT Error:", B), Se.current || (Se.current = !0, de());
8594
+ console.error("STT Error:", B), Ce.current || (Ce.current = !0, de());
8583
8595
  }
8584
- }), { state: ot, startQuestion: Tt, nextPhase: de, completeInterview: et, timerService: oi } = I1({
8596
+ }), { state: ot, startQuestion: At, nextPhase: de, completeInterview: et, timerService: oi } = I2({
8585
8597
  config: {
8586
8598
  // thinkingDuration: thinkingTime,
8587
- answeringDuration: K,
8599
+ answeringDuration: Y,
8588
8600
  editingDuration: ie
8589
8601
  },
8590
8602
  callbacks: {
@@ -8613,12 +8625,12 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8613
8625
  }
8614
8626
  });
8615
8627
  D(() => {
8616
- Tt();
8628
+ At();
8617
8629
  }, []), D(() => {
8618
8630
  (async () => {
8619
8631
  try {
8620
8632
  const z = await l.getInterviewConfig(r);
8621
- if (z != null && z.data && (z.data.duration_in_minutes && T(z.data.duration_in_minutes), typeof z.data.allow_answer_editing == "boolean" && I(z.data.allow_answer_editing), typeof z.data.elapsed_time_in_minutes == "number")) {
8633
+ if (z != null && z.data && (z.data.duration_in_minutes && A(z.data.duration_in_minutes), typeof z.data.allow_answer_editing == "boolean" && I(z.data.allow_answer_editing), typeof z.data.elapsed_time_in_minutes == "number")) {
8622
8634
  const He = Math.floor(
8623
8635
  z.data.elapsed_time_in_minutes * 60
8624
8636
  );
@@ -8629,7 +8641,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8629
8641
  }
8630
8642
  })();
8631
8643
  }, [r, oi]);
8632
- const { execute: Ut } = L1(
8644
+ const { execute: Ut } = F2(
8633
8645
  async () => {
8634
8646
  const B = await l.generateQuestion({
8635
8647
  interviewId: r
@@ -8637,7 +8649,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8637
8649
  // qnaId: currentQuestionRef.current?.qna_id || "",
8638
8650
  // answer: answerTextRef.current,
8639
8651
  });
8640
- return X.current = B.data, B;
8652
+ return H.current = B.data, B;
8641
8653
  },
8642
8654
  {
8643
8655
  onSuccess: async (B) => {
@@ -8647,10 +8659,10 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8647
8659
  console.error("Failed to fetch questions:", B);
8648
8660
  }
8649
8661
  }
8650
- ), un = R(async () => {
8662
+ ), un = L(async () => {
8651
8663
  var B;
8652
8664
  try {
8653
- const z = P.current, He = ((B = X.current) == null ? void 0 : B.qna_id) || "";
8665
+ const z = P.current, He = ((B = H.current) == null ? void 0 : B.qna_id) || "";
8654
8666
  O && await l.submitAnswer({
8655
8667
  interviewId: r,
8656
8668
  qnaId: He,
@@ -8662,15 +8674,15 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8662
8674
  } catch (z) {
8663
8675
  console.error("Failed to submit answer:", z);
8664
8676
  }
8665
- Tt();
8666
- }, [l, r, Tt, O]), mr = R(async () => {
8677
+ At();
8678
+ }, [l, r, At, O]), mr = L(async () => {
8667
8679
  var B, z;
8668
- if ((B = X.current) != null && B.question)
8669
- if (X.current.question_audio_data_base64)
8680
+ if ((B = H.current) != null && B.question)
8681
+ if (H.current.question_audio_data_base64)
8670
8682
  try {
8671
8683
  V.current = !1, await J(
8672
- X.current.question_audio_data_base64
8673
- ), X.current.is_interview_done && (Ze(), ri(), a && "current" in a && ((z = a.current) == null || z.stopCamera()), et());
8684
+ H.current.question_audio_data_base64
8685
+ ), H.current.is_interview_done && (Ze(), ri(), a && "current" in a && ((z = a.current) == null || z.stopCamera()), et());
8674
8686
  } catch (He) {
8675
8687
  console.error("Failed to speak question:", He), de();
8676
8688
  }
@@ -8678,20 +8690,22 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8678
8690
  console.warn("No audio data available for question"), await id(2e3), de();
8679
8691
  else
8680
8692
  de();
8681
- }, [J, de, et]), si = R(async () => {
8693
+ }, [J, de, et]), si = L(async () => {
8682
8694
  try {
8683
- await We(K);
8695
+ await We(Y);
8684
8696
  } catch (B) {
8685
8697
  console.error("Failed to start recording:", B), de();
8686
8698
  }
8687
- }, [We, de]), Gi = R(async () => {
8699
+ }, [We, de]), Gi = L(async () => {
8700
+ console.log("[InterviewController] handleAudioStopAndTranscribe triggered");
8688
8701
  try {
8702
+ console.log("[InterviewController] Calling stopRecording...");
8689
8703
  const B = await ii();
8690
- await At(B);
8704
+ console.log("[InterviewController] stopRecording success, calling transcribe..."), await Tt(B);
8691
8705
  } catch (B) {
8692
- console.error("STT processing failed:", B), !Se.current && !kt.current && (Se.current = !0, de());
8706
+ console.error("[InterviewController] STT processing failed:", B), B instanceof Error && (console.error("[InterviewController] Error Name:", B.name), B.code && console.error("[InterviewController] Error Code:", B.code)), !Ce.current && !kt.current && (Ce.current = !0, de());
8693
8707
  }
8694
- }, [ii, At, de]), ai = R(
8708
+ }, [ii, Tt, de]), ai = L(
8695
8709
  async (B) => {
8696
8710
  var z, He;
8697
8711
  Ze(), ri(), a && "current" in a && ((z = a.current) == null || z.stopCamera()), await ((He = g.current) == null ? void 0 : He.exitFullScreenIntentionally());
@@ -8711,15 +8725,15 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8711
8725
  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: [
8712
8726
  /* @__PURE__ */ c("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Ready to start the Interview?" }),
8713
8727
  /* @__PURE__ */ c("p", { className: "iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]", children: `You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.` }),
8714
- /* @__PURE__ */ c(Qo, { onClick: Tt, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
8728
+ /* @__PURE__ */ c(Qo, { onClick: At, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
8715
8729
  ] });
8716
8730
  case G.FETCHING_QUESTION:
8717
- return /* @__PURE__ */ c(w2, {});
8731
+ return /* @__PURE__ */ c(w1, {});
8718
8732
  case G.READING_QUESTION:
8719
- return /* @__PURE__ */ c(g2, { ttsError: gt });
8733
+ return /* @__PURE__ */ c(g1, { ttsError: gt });
8720
8734
  case G.THINKING:
8721
8735
  return /* @__PURE__ */ c(
8722
- p2,
8736
+ p1,
8723
8737
  {
8724
8738
  state: ot,
8725
8739
  thinkingTime: Q,
@@ -8728,17 +8742,17 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8728
8742
  );
8729
8743
  case G.ANSWERING:
8730
8744
  return /* @__PURE__ */ c(
8731
- f2,
8745
+ f1,
8732
8746
  {
8733
8747
  state: ot,
8734
- answeringTime: K,
8748
+ answeringTime: Y,
8735
8749
  nextPhase: de,
8736
8750
  sttError: ni
8737
8751
  }
8738
8752
  );
8739
8753
  case G.TRANSCRIBING:
8740
8754
  return /* @__PURE__ */ c(
8741
- y2,
8755
+ y1,
8742
8756
  {
8743
8757
  sttError: ni,
8744
8758
  editingDuration: ie
@@ -8754,18 +8768,18 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8754
8768
  }
8755
8769
  }, ji = /* @__PURE__ */ m(yt, { children: [
8756
8770
  /* @__PURE__ */ c(
8757
- d2,
8771
+ d1,
8758
8772
  {
8759
8773
  title: e,
8760
8774
  brandName: t,
8761
8775
  brandLogo: i,
8762
- totalDuration: A,
8776
+ totalDuration: E,
8763
8777
  elapsedTime: ot.totalTimeElapsed,
8764
8778
  onExit: () => ai()
8765
8779
  }
8766
8780
  ),
8767
8781
  /* @__PURE__ */ c(
8768
- a2,
8782
+ a1,
8769
8783
  {
8770
8784
  brandName: t,
8771
8785
  brandLogo: i,
@@ -8774,9 +8788,9 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8774
8788
  phase: ot.phase,
8775
8789
  className: s,
8776
8790
  interviewId: r,
8777
- interview_duration: A,
8791
+ interview_duration: E,
8778
8792
  videoFeedRef: a,
8779
- lastSubmittedAnswer: L,
8793
+ lastSubmittedAnswer: F,
8780
8794
  onNextPhase: de,
8781
8795
  answerText: b,
8782
8796
  onAnswerChange: (B) => {
@@ -8784,21 +8798,21 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8784
8798
  v(z), P.current = z;
8785
8799
  },
8786
8800
  editingTime: ie,
8787
- answeringTime: K,
8801
+ answeringTime: Y,
8788
8802
  children: hn()
8789
8803
  }
8790
8804
  )
8791
8805
  ] });
8792
8806
  return /* @__PURE__ */ c(yt, { children: w != null && w.enabled ? /* @__PURE__ */ c(
8793
- o2,
8807
+ o1,
8794
8808
  {
8795
8809
  ref: g,
8796
8810
  onDisqualify: () => ai(o),
8797
- isCompleted: ((zi = X == null ? void 0 : X.current) == null ? void 0 : zi.is_interview_done) ?? !1,
8811
+ isCompleted: ((zi = H == null ? void 0 : H.current) == null ? void 0 : zi.is_interview_done) ?? !1,
8798
8812
  children: ji
8799
8813
  }
8800
8814
  ) : ji });
8801
- }, v2 = ({
8815
+ }, v1 = ({
8802
8816
  title: e,
8803
8817
  brandName: t,
8804
8818
  brandLogo: i,
@@ -8807,7 +8821,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8807
8821
  onInterviewDisqualify: o,
8808
8822
  className: s = ""
8809
8823
  }) => {
8810
- const [a, l] = E(!1), [u, d] = E(!0), [h, f] = E(!1), { proctoring: w } = Qn(), g = M(null), y = M(null), p = (w == null ? void 0 : w.gazeAnalysisEnabled) === !0, b = () => {
8824
+ const [a, l] = _(!1), [u, d] = _(!0), [h, f] = _(!1), { proctoring: w } = Qn(), g = M(null), y = M(null), p = (w == null ? void 0 : w.gazeAnalysisEnabled) === !0, b = () => {
8811
8825
  l(!0), d(!1);
8812
8826
  };
8813
8827
  return D(() => {
@@ -8823,7 +8837,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8823
8837
  ref: g,
8824
8838
  className: `iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${s}`,
8825
8839
  children: /* @__PURE__ */ c("div", { className: "iw-h-[calc(100vh-1rem)] iw-flex iw-flex-col iw-justify-between gap-1", children: /* @__PURE__ */ c(
8826
- b2,
8840
+ b1,
8827
8841
  {
8828
8842
  interviewTitle: e ?? "Interview",
8829
8843
  brandName: t ?? "Novara",
@@ -8843,7 +8857,7 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8843
8857
  /* @__PURE__ */ c("p", { className: "iw-text-xl iw-font-semibold", children: t })
8844
8858
  ] }),
8845
8859
  /* @__PURE__ */ c(
8846
- C1,
8860
+ S2,
8847
8861
  {
8848
8862
  isOpen: u,
8849
8863
  gazeEnabled: p,
@@ -8856,11 +8870,11 @@ const p2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
8856
8870
  ] });
8857
8871
  };
8858
8872
  typeof window < "u" && (window.InterviewWidget = {
8859
- InterviewWidget: v2,
8873
+ InterviewWidget: v1,
8860
8874
  InterviewWidgetProvider: Jl
8861
8875
  });
8862
8876
  export {
8863
- v2 as InterviewWidget,
8877
+ v1 as InterviewWidget,
8864
8878
  Jl as InterviewWidgetProvider,
8865
- v2 as default
8879
+ v1 as default
8866
8880
  };