interview-widget 1.0.4 → 1.0.6

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
@@ -1,9 +1,9 @@
1
- var Ue = Object.defineProperty;
2
- var qe = (i, r, t) => r in i ? Ue(i, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[r] = t;
3
- var F = (i, r, t) => qe(i, typeof r != "symbol" ? r + "" : r, t);
4
- import he, { createContext as Ee, useRef as T, useCallback as N, useMemo as X, useContext as re, useSyncExternalStore as Te, useState as k, useEffect as C } from "react";
5
- import { createPortal as Be } from "react-dom";
6
- var Ce = { exports: {} }, se = {};
1
+ var Be = Object.defineProperty;
2
+ var We = (i, r, t) => r in i ? Be(i, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[r] = t;
3
+ var F = (i, r, t) => We(i, typeof r != "symbol" ? r + "" : r, t);
4
+ import fe, { createContext as Ce, useContext as ne, useSyncExternalStore as Se, useRef as E, useCallback as T, useMemo as ee, useState as k, useEffect as C, forwardRef as Ge, useImperativeHandle as Ve } from "react";
5
+ import { createPortal as ze } from "react-dom";
6
+ var Ie = { exports: {} }, ae = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.js
@@ -13,8 +13,8 @@ var Ce = { exports: {} }, se = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var We = Symbol.for("react.transitional.element"), Ge = Symbol.for("react.fragment");
17
- function Se(i, r, t) {
16
+ var He = Symbol.for("react.transitional.element"), Ye = Symbol.for("react.fragment");
17
+ function Re(i, r, t) {
18
18
  var s = null;
19
19
  if (t !== void 0 && (s = "" + t), r.key !== void 0 && (s = "" + r.key), "key" in r) {
20
20
  t = {};
@@ -22,19 +22,19 @@ function Se(i, r, t) {
22
22
  n !== "key" && (t[n] = r[n]);
23
23
  } else t = r;
24
24
  return r = t.ref, {
25
- $$typeof: We,
25
+ $$typeof: He,
26
26
  type: i,
27
27
  key: s,
28
28
  ref: r !== void 0 ? r : null,
29
29
  props: t
30
30
  };
31
31
  }
32
- se.Fragment = Ge;
33
- se.jsx = Se;
34
- se.jsxs = Se;
35
- Ce.exports = se;
36
- var e = Ce.exports;
37
- const $ = {
32
+ ae.Fragment = Ye;
33
+ ae.jsx = Re;
34
+ ae.jsxs = Re;
35
+ Ie.exports = ae;
36
+ var e = Ie.exports;
37
+ const he = {}, $ = {
38
38
  api: {
39
39
  baseUrl: "/api",
40
40
  retryConfig: {
@@ -65,40 +65,41 @@ const $ = {
65
65
  enabled: !0
66
66
  }
67
67
  }
68
- }, ge = "iw-storage";
69
- function Ve() {
70
- return typeof import.meta < "u" ? "your-secure-encryption-seed-here" : typeof process < "u" && process.env.NEXT_PUBLIC_IW_SECRET ? process.env.NEXT_PUBLIC_IW_SECRET : typeof window < "u" && window.__IW_SECRET__ ? window.__IW_SECRET__ : "proctoring-data-seed";
68
+ }, pe = "iw-storage";
69
+ function Qe() {
70
+ if (!(typeof import.meta < "u" && (he != null && he.VITE_IW_SECRET)))
71
+ return typeof process < "u" && process.env.NEXT_PUBLIC_IW_SECRET ? process.env.NEXT_PUBLIC_IW_SECRET : typeof window < "u" && window.__IW_SECRET__ ? window.__IW_SECRET__ : "proctoring-data-seed";
71
72
  }
72
- const Ie = Ve(), fe = "AES-GCM", me = 12;
73
- async function Re(i) {
73
+ const Ae = Qe(), be = "AES-GCM", xe = 12;
74
+ async function Me(i) {
74
75
  const t = new TextEncoder().encode(i), s = await crypto.subtle.digest("SHA-256", t);
75
- return crypto.subtle.importKey("raw", s, fe, !1, [
76
+ return crypto.subtle.importKey("raw", s, be, !1, [
76
77
  "encrypt",
77
78
  "decrypt"
78
79
  ]);
79
80
  }
80
- function ze() {
81
- return crypto.getRandomValues(new Uint8Array(me));
81
+ function Ke() {
82
+ return crypto.getRandomValues(new Uint8Array(xe));
82
83
  }
83
- async function He(i, r = "default-seed") {
84
+ async function Je(i, r = "default-seed") {
84
85
  try {
85
- const t = typeof i == "string" ? i : JSON.stringify(i), n = new TextEncoder().encode(t), o = await Re(r), a = ze(), l = await crypto.subtle.encrypt(
86
- { name: fe, iv: a },
86
+ const t = typeof i == "string" ? i : JSON.stringify(i), n = new TextEncoder().encode(t), o = await Me(r), a = Ke(), l = await crypto.subtle.encrypt(
87
+ { name: be, iv: a },
87
88
  o,
88
89
  n
89
- ), d = new Uint8Array(a.length + l.byteLength);
90
- return d.set(new Uint8Array(a), 0), d.set(new Uint8Array(l), a.length), btoa(String.fromCharCode(...Array.from(d)));
90
+ ), w = new Uint8Array(a.length + l.byteLength);
91
+ return w.set(new Uint8Array(a), 0), w.set(new Uint8Array(l), a.length), btoa(String.fromCharCode(...Array.from(w)));
91
92
  } catch (t) {
92
93
  throw console.error("Encryption failed:", t), new Error("Failed to encrypt data");
93
94
  }
94
95
  }
95
- async function Ye(i, r = "default-seed") {
96
+ async function Xe(i, r = "default-seed") {
96
97
  try {
97
98
  const t = atob(i), s = new Uint8Array(t.length);
98
- for (let c = 0; c < t.length; c++)
99
- s[c] = t.charCodeAt(c);
100
- const n = s.slice(0, me), o = s.slice(me), a = await Re(r), l = await crypto.subtle.decrypt(
101
- { name: fe, iv: n },
99
+ for (let d = 0; d < t.length; d++)
100
+ s[d] = t.charCodeAt(d);
101
+ const n = s.slice(0, xe), o = s.slice(xe), a = await Me(r), l = await crypto.subtle.decrypt(
102
+ { name: be, iv: n },
102
103
  a,
103
104
  o
104
105
  );
@@ -107,23 +108,23 @@ async function Ye(i, r = "default-seed") {
107
108
  throw console.error("Decryption failed:", t), new Error("Failed to decrypt data");
108
109
  }
109
110
  }
110
- async function Qe(i, r = "default-seed") {
111
- return He(i, r);
111
+ async function Ze(i, r = "default-seed") {
112
+ return Je(i, r);
112
113
  }
113
- async function Ke(i, r = "default-seed") {
114
- const t = await Ye(i, r);
114
+ async function et(i, r = "default-seed") {
115
+ const t = await Xe(i, r);
115
116
  try {
116
117
  return JSON.parse(t);
117
118
  } catch {
118
119
  return t;
119
120
  }
120
121
  }
121
- const ne = Ee(null), Je = async () => {
122
+ const oe = Ce(null), tt = async () => {
122
123
  var i, r;
123
124
  try {
124
- const t = sessionStorage.getItem(ge);
125
+ const t = sessionStorage.getItem(pe);
125
126
  if (t) {
126
- const s = await Ke(t, Ie);
127
+ const s = await et(t, Ae);
127
128
  return {
128
129
  logViolations: ((i = s.state) == null ? void 0 : i.logViolations) || [],
129
130
  totalViolations: ((r = s.state) == null ? void 0 : r.totalViolations) || 0
@@ -136,49 +137,49 @@ const ne = Ee(null), Je = async () => {
136
137
  );
137
138
  }
138
139
  return { logViolations: [], totalViolations: 0 };
139
- }, ve = async (i) => {
140
+ }, Ne = async (i) => {
140
141
  try {
141
- const r = await Qe(
142
+ const r = await Ze(
142
143
  {
143
144
  state: i,
144
145
  version: 0
145
146
  },
146
- Ie
147
+ Ae
147
148
  );
148
- sessionStorage.setItem(ge, r);
149
+ sessionStorage.setItem(pe, r);
149
150
  } catch (r) {
150
151
  console.error("Failed to save proctoring data to session storage:", r);
151
152
  }
152
- }, Xe = ({
153
+ }, it = ({
153
154
  children: i
154
155
  }) => {
155
- const r = T({
156
+ const r = E({
156
157
  logViolations: [],
157
158
  totalViolations: 0
158
- }), t = T(/* @__PURE__ */ new Set());
159
- he.useEffect(() => {
160
- Je().then((c) => {
161
- r.current = c, s();
159
+ }), t = E(/* @__PURE__ */ new Set());
160
+ fe.useEffect(() => {
161
+ tt().then((d) => {
162
+ r.current = d, s();
162
163
  });
163
164
  }, []);
164
- const s = N(() => {
165
- t.current.forEach((c) => c());
166
- }, []), n = N((c) => (t.current.add(c), () => {
167
- t.current.delete(c);
168
- }), []), o = N(() => r.current, []), a = N(
169
- (c) => {
165
+ const s = T(() => {
166
+ t.current.forEach((d) => d());
167
+ }, []), n = T((d) => (t.current.add(d), () => {
168
+ t.current.delete(d);
169
+ }), []), o = T(() => r.current, []), a = T(
170
+ (d) => {
170
171
  r.current = {
171
- logViolations: [...r.current.logViolations, c],
172
+ logViolations: [...r.current.logViolations, d],
172
173
  totalViolations: r.current.totalViolations + 1
173
- }, ve(r.current), s();
174
+ }, Ne(r.current), s();
174
175
  },
175
176
  [s]
176
- ), l = N(() => {
177
+ ), l = T(() => {
177
178
  r.current = {
178
179
  logViolations: [],
179
180
  totalViolations: 0
180
- }, ve(r.current), s();
181
- }, [s]), d = X(
181
+ }, Ne(r.current), s();
182
+ }, [s]), w = ee(
182
183
  () => ({
183
184
  getState: o,
184
185
  addViolation: a,
@@ -187,29 +188,29 @@ const ne = Ee(null), Je = async () => {
187
188
  }),
188
189
  [o, a, l, n]
189
190
  );
190
- return /* @__PURE__ */ e.jsx(ne.Provider, { value: d, children: i });
191
- }, Ze = () => {
192
- const i = re(ne);
191
+ return /* @__PURE__ */ e.jsx(oe.Provider, { value: w, children: i });
192
+ }, rt = () => {
193
+ const i = ne(oe);
193
194
  if (!i)
194
195
  throw new Error("useViolations must be used within a ProctoringProvider");
195
- return Te(
196
+ return Se(
196
197
  i.subscribe,
197
198
  () => i.getState().logViolations,
198
199
  () => i.getState().logViolations
199
200
  );
200
- }, et = () => {
201
- const i = re(ne);
201
+ }, st = () => {
202
+ const i = ne(oe);
202
203
  if (!i)
203
204
  throw new Error(
204
205
  "useTotalViolations must be used within a ProctoringProvider"
205
206
  );
206
- return Te(
207
+ return Se(
207
208
  i.subscribe,
208
209
  () => i.getState().totalViolations,
209
210
  () => i.getState().totalViolations
210
211
  );
211
- }, tt = () => {
212
- const i = re(ne);
212
+ }, nt = () => {
213
+ const i = ne(oe);
213
214
  if (!i)
214
215
  throw new Error(
215
216
  "useProctoringActions must be used within a ProctoringProvider"
@@ -218,10 +219,10 @@ const ne = Ee(null), Je = async () => {
218
219
  addViolation: i.addViolation,
219
220
  clearViolations: i.clearViolations
220
221
  };
221
- }, Ae = Ee(
222
+ }, De = Ce(
222
223
  null
223
224
  );
224
- function it({
225
+ function at({
225
226
  config: i = {},
226
227
  children: r
227
228
  }) {
@@ -256,26 +257,26 @@ function it({
256
257
  }
257
258
  }
258
259
  };
259
- return /* @__PURE__ */ e.jsx(Ae.Provider, { value: t, children: /* @__PURE__ */ e.jsx(Xe, { children: r }) });
260
+ return /* @__PURE__ */ e.jsx(De.Provider, { value: t, children: /* @__PURE__ */ e.jsx(it, { children: r }) });
260
261
  }
261
- function ae() {
262
- const i = re(Ae);
262
+ function le() {
263
+ const i = ne(De);
263
264
  if (!i)
264
265
  throw new Error(
265
266
  "useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>"
266
267
  );
267
268
  return i;
268
269
  }
269
- function Me() {
270
- return ae().api || $.api;
270
+ function Pe() {
271
+ return le().api || $.api;
271
272
  }
272
- function Z() {
273
- return ae().ui || $.ui;
273
+ function te() {
274
+ return le().ui || $.ui;
274
275
  }
275
- function rt() {
276
- return ae().interview || $.interview;
276
+ function ot() {
277
+ return le().interview || $.interview;
277
278
  }
278
- const De = ({
279
+ const _e = ({
279
280
  className: i,
280
281
  ...r
281
282
  }) => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
@@ -304,7 +305,7 @@ const De = ({
304
305
  /* @__PURE__ */ e.jsx("path", { d: "M7.75 7.75l-2.15 -2.15" })
305
306
  ]
306
307
  }
307
- ) }), _e = ({
308
+ ) }), Fe = ({
308
309
  children: i,
309
310
  variant: r = "primary",
310
311
  size: t = "md",
@@ -314,7 +315,7 @@ const De = ({
314
315
  className: a = "",
315
316
  ...l
316
317
  }) => {
317
- const d = "iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2", c = {
318
+ const w = "iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2", d = {
318
319
  primary: "iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",
319
320
  secondary: "iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",
320
321
  outline: "iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",
@@ -328,17 +329,17 @@ const De = ({
328
329
  return /* @__PURE__ */ e.jsxs(
329
330
  "button",
330
331
  {
331
- className: `${d} ${c[r]} ${u[t]} ${m} ${h} ${a}`,
332
+ className: `${w} ${d[r]} ${u[t]} ${m} ${h} ${a}`,
332
333
  disabled: o || n,
333
334
  ...l,
334
335
  children: [
335
- n && /* @__PURE__ */ e.jsx(De, { height: 16, width: 16, style: { marginRight: "3px" } }),
336
+ n && /* @__PURE__ */ e.jsx(_e, { height: 16, width: 16, style: { marginRight: "3px" } }),
336
337
  i
337
338
  ]
338
339
  }
339
340
  );
340
341
  };
341
- function st(i) {
342
+ function lt(i) {
342
343
  const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);
343
344
  return r ? {
344
345
  r: parseInt(r[1], 16),
@@ -346,32 +347,32 @@ function st(i) {
346
347
  b: parseInt(r[3], 16)
347
348
  } : null;
348
349
  }
349
- function nt(i, r, t) {
350
+ function ct(i, r, t) {
350
351
  return "#" + [i, r, t].map((s) => {
351
352
  const n = Math.round(s).toString(16);
352
353
  return n.length === 1 ? "0" + n : n;
353
354
  }).join("");
354
355
  }
355
- function Pe(i, r) {
356
- const t = st(i);
356
+ function Le(i, r) {
357
+ const t = lt(i);
357
358
  if (!t) return i;
358
359
  const s = t.r + (255 - t.r) * r, n = t.g + (255 - t.g) * r, o = t.b + (255 - t.b) * r;
359
- return nt(s, n, o);
360
+ return ct(s, n, o);
360
361
  }
361
- function at(i, r = 0.8) {
362
+ function dt(i, r = 0.8) {
362
363
  return {
363
- background: `linear-gradient(to bottom, ${Pe(i, r)}, #ffffff)`,
364
+ background: `linear-gradient(to bottom, ${Le(i, r)}, #ffffff)`,
364
365
  color: "#1f2937"
365
366
  };
366
367
  }
367
- function ot(i) {
368
+ function wt(i) {
368
369
  return new Promise((r) => setTimeout(r, i));
369
370
  }
370
- function Fe(i) {
371
- return `linear-gradient(to left, ${Pe(i, 0.4)}, ${i})`;
371
+ function $e(i) {
372
+ return `linear-gradient(to left, ${Le(i, 0.4)}, ${i})`;
372
373
  }
373
- const lt = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
374
- function ct(i) {
374
+ const ut = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
375
+ function ht(i) {
375
376
  try {
376
377
  const r = i.split(".");
377
378
  if (r.length !== 3 || !r[1])
@@ -385,7 +386,7 @@ function ct(i) {
385
386
  return console.error("Error decoding JWT:", r), null;
386
387
  }
387
388
  }
388
- const Le = (i) => /* @__PURE__ */ e.jsxs(
389
+ const Oe = (i) => /* @__PURE__ */ e.jsxs(
389
390
  "svg",
390
391
  {
391
392
  xmlns: "http://www.w3.org/2000/svg",
@@ -403,7 +404,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
403
404
  /* @__PURE__ */ e.jsx("path", { d: "m9 12 2 2 4-4" })
404
405
  ]
405
406
  }
406
- ), $e = (i) => /* @__PURE__ */ e.jsxs(
407
+ ), Ue = (i) => /* @__PURE__ */ e.jsxs(
407
408
  "svg",
408
409
  {
409
410
  xmlns: "http://www.w3.org/2000/svg",
@@ -422,7 +423,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
422
423
  /* @__PURE__ */ e.jsx("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
423
424
  ]
424
425
  }
425
- ), dt = (i) => /* @__PURE__ */ e.jsxs(
426
+ ), mt = (i) => /* @__PURE__ */ e.jsxs(
426
427
  "svg",
427
428
  {
428
429
  xmlns: "http://www.w3.org/2000/svg",
@@ -442,51 +443,51 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
442
443
  ]
443
444
  }
444
445
  ), V = (i) => {
445
- const { baseColor: r, borderRadius: t } = Z(), { loading: s, children: n, ...o } = i;
446
+ const { baseColor: r, borderRadius: t } = te(), { loading: s, children: n, ...o } = i;
446
447
  return /* @__PURE__ */ e.jsx(
447
- _e,
448
+ Fe,
448
449
  {
449
450
  style: {
450
- background: Fe(r),
451
+ background: $e(r),
451
452
  borderRadius: t
452
453
  },
453
454
  ...o,
454
- children: s ? /* @__PURE__ */ e.jsx(De, {}) : n
455
+ children: s ? /* @__PURE__ */ e.jsx(_e, {}) : n
455
456
  }
456
457
  );
457
- }, wt = [
458
+ }, gt = [
458
459
  "Do not refresh or reload the page during your assessment",
459
460
  "Refrain from switching tabs or opening other applications while the session is in progress",
460
461
  "Ensure your face remains clearly visible on camera at all times",
461
462
  "Avoid frequent distractions or leaving your seat during the session",
462
463
  "Do not disable or interfere with audio/video monitoring"
463
- ], ut = ({
464
+ ], ft = ({
464
465
  isOpen: i,
465
466
  onStart: r,
466
467
  onClose: t
467
468
  }) => {
468
469
  var A;
469
- const s = T(null), n = T(null), { baseColor: o, borderRadius: a } = Z(), [l, d] = k(!1), [c, u] = k(null), [h, m] = k(!1), w = o ?? "#2563eb", f = Fe(w), v = a ?? 18, j = (g, I) => g.startsWith("#") && g.length === 7 ? `${g}${I}` : g, x = [
470
+ const s = E(null), n = E(null), { baseColor: o, borderRadius: a } = te(), [l, w] = k(!1), [d, u] = k(null), [h, m] = k(!1), c = o ?? "#2563eb", x = $e(c), b = a ?? 18, j = (f, M) => f.startsWith("#") && f.length === 7 ? `${f}${M}` : f, g = [
470
471
  `radial-gradient(120% 85% at 50% 125%, ${j(
471
- w,
472
+ c,
472
473
  "34"
473
474
  )} 0%, transparent 70%)`,
474
475
  `radial-gradient(90% 70% at 10% 130%, ${j(
475
- w,
476
+ c,
476
477
  "24"
477
478
  )} 0%, transparent 72%)`,
478
479
  `radial-gradient(90% 70% at 90% 130%, ${j(
479
- w,
480
+ c,
480
481
  "24"
481
482
  )} 0%, transparent 72%)`,
482
483
  `repeating-linear-gradient(135deg, ${j(
483
- w,
484
+ c,
484
485
  "14"
485
486
  )} 0, ${j(
486
- w,
487
+ c,
487
488
  "14"
488
489
  )} 16px, transparent 16px, transparent 32px)`
489
- ].join(", "), E = l ? {
490
+ ].join(", "), v = l ? {
490
491
  label: "Camera & microphone ready",
491
492
  toneClass: "iw-bg-white/15 iw-text-white",
492
493
  dotClass: "iw-bg-emerald-400"
@@ -513,35 +514,35 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
513
514
  toneClass: "iw-bg-rose-50 iw-text-rose-600",
514
515
  cameraCopy: "Grant camera access to continue with the interview.",
515
516
  micCopy: "Enable microphone access so we can capture your answers."
516
- }, y = [
517
+ }, N = [
517
518
  {
518
519
  label: "Camera feed",
519
520
  description: S.cameraCopy,
520
521
  status: S.badge,
521
522
  toneClass: S.toneClass,
522
- Icon: $e
523
+ Icon: Ue
523
524
  },
524
525
  {
525
526
  label: "Microphone input",
526
527
  description: S.micCopy,
527
528
  status: S.badge,
528
529
  toneClass: S.toneClass,
529
- Icon: dt
530
+ Icon: mt
530
531
  }
531
532
  ], P = () => {
532
- n.current && (n.current.getTracks().forEach((g) => g.stop()), n.current = null);
533
- }, b = async () => {
533
+ n.current && (n.current.getTracks().forEach((f) => f.stop()), n.current = null);
534
+ }, y = async () => {
534
535
  m(!0), u(null);
535
536
  try {
536
- const g = await navigator.mediaDevices.getUserMedia({
537
+ const f = await navigator.mediaDevices.getUserMedia({
537
538
  video: { width: { ideal: 1280 }, height: { ideal: 720 } },
538
539
  audio: !0
539
540
  });
540
- n.current = g, s.current && (s.current.srcObject = g), d(!0);
541
- } catch (g) {
542
- console.error("Media permission error:", g);
543
- let I = "Unable to access camera or microphone.";
544
- (g == null ? void 0 : g.name) === "NotAllowedError" ? I = "Permissions denied. Please allow access to camera and microphone." : (g == null ? void 0 : g.name) === "NotFoundError" ? I = "No camera/microphone found. Please connect a device and retry." : g != null && g.message && (I = g.message), d(!1), u(I);
541
+ n.current = f, s.current && (s.current.srcObject = f), w(!0);
542
+ } catch (f) {
543
+ console.error("Media permission error:", f);
544
+ let M = "Unable to access camera or microphone.";
545
+ (f == null ? void 0 : f.name) === "NotAllowedError" ? M = "Permissions denied. Please allow access to camera and microphone." : (f == null ? void 0 : f.name) === "NotFoundError" ? M = "No camera/microphone found. Please connect a device and retry." : f != null && f.message && (M = f.message), w(!1), u(M);
545
546
  } finally {
546
547
  m(!1);
547
548
  }
@@ -551,11 +552,11 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
551
552
  P();
552
553
  return;
553
554
  }
554
- return b(), () => {
555
+ return y(), () => {
555
556
  P();
556
557
  };
557
558
  }, [i]), !i) return null;
558
- const D = () => {
559
+ const R = () => {
559
560
  r(), P();
560
561
  };
561
562
  return /* @__PURE__ */ e.jsx("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/25 iw-backdrop-blur-md iw-p-4", children: /* @__PURE__ */ e.jsxs("div", { className: " iw-w-full iw-max-w-[920px] iw-max-h-[96vh] iw-overflow-auto iw-rounded-3xl iw-bg-white iw-shadow-[0_40px_80px_-28px_rgba(15,23,42,0.25)]", children: [
@@ -563,7 +564,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
563
564
  "div",
564
565
  {
565
566
  className: "iw-relative iw-overflow-hidden",
566
- style: { background: f },
567
+ style: { background: x },
567
568
  children: [
568
569
  /* @__PURE__ */ e.jsx(
569
570
  "div",
@@ -597,7 +598,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
597
598
  ),
598
599
  /* @__PURE__ */ e.jsxs("div", { className: "iw-relative iw-grid md:iw-grid-cols-[minmax(0,1fr)_auto] iw-items-start iw-gap-6 iw-px-6 iw-py-7", children: [
599
600
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-flex-col iw-gap-4 iw-text-white", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
600
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-white/15 iw-shadow-inner", children: /* @__PURE__ */ e.jsx(Le, { className: "iw-h-6 iw-w-6" }) }),
601
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-white/15 iw-shadow-inner", children: /* @__PURE__ */ e.jsx(Oe, { className: "iw-h-6 iw-w-6" }) }),
601
602
  /* @__PURE__ */ e.jsxs("div", { children: [
602
603
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-[11px] iw-font-medium iw-uppercase iw-tracking-wide iw-text-white/70", children: "Pre-interview checklist" }),
603
604
  /* @__PURE__ */ e.jsx("h2", { className: "iw-mt-1 iw-text-xl iw-font-semibold iw-leading-tight", children: "Final checks before you go live" }),
@@ -607,15 +608,15 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
607
608
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-items-start iw-justify-end", children: /* @__PURE__ */ e.jsxs(
608
609
  "div",
609
610
  {
610
- className: `iw-inline-flex iw-items-center iw-gap-2 iw-rounded-full iw-bg-white/10 iw-px-4 iw-py-1.5 iw-text-xs iw-font-medium iw-text-white/85 iw-backdrop-blur-sm ${E.toneClass}`,
611
+ className: `iw-inline-flex iw-items-center iw-gap-2 iw-rounded-full iw-bg-white/10 iw-px-4 iw-py-1.5 iw-text-xs iw-font-medium iw-text-white/85 iw-backdrop-blur-sm ${v.toneClass}`,
611
612
  children: [
612
613
  /* @__PURE__ */ e.jsx(
613
614
  "span",
614
615
  {
615
- className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${E.dotClass}`
616
+ className: `iw-inline-flex iw-h-2 iw-w-2 iw-rounded-full ${v.dotClass}`
616
617
  }
617
618
  ),
618
- E.label
619
+ v.label
619
620
  ]
620
621
  }
621
622
  ) }),
@@ -641,7 +642,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
641
642
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-sm iw-font-semibold iw-text-slate-900", children: "Proctoring guidelines" }),
642
643
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-[11px] iw-font-medium iw-uppercase iw-tracking-wide iw-text-slate-400", children: "Required" })
643
644
  ] }),
644
- /* @__PURE__ */ e.jsx("ul", { className: "iw-mt-5 iw-flex iw-flex-col iw-gap-4", children: wt.map((g, I) => /* @__PURE__ */ e.jsx(
645
+ /* @__PURE__ */ e.jsx("ul", { className: "iw-mt-5 iw-flex iw-flex-col iw-gap-4", children: gt.map((f, M) => /* @__PURE__ */ e.jsx(
645
646
  "li",
646
647
  {
647
648
  className: "iw-group iw-overflow-hidden iw-rounded-xl iw-border iw-border-slate-100 iw-bg-slate-50/60 iw-p-4 iw-transition-all hover:iw-border-slate-200 hover:iw-bg-white",
@@ -650,14 +651,14 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
650
651
  "span",
651
652
  {
652
653
  className: "iw-flex iw-h-8 iw-w-8 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-text-sm iw-font-semibold iw-text-white",
653
- style: { background: f },
654
- children: I + 1
654
+ style: { background: x },
655
+ children: M + 1
655
656
  }
656
657
  ),
657
- /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: g })
658
+ /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-slate-600", children: f })
658
659
  ] })
659
660
  },
660
- g
661
+ f
661
662
  )) })
662
663
  ] }) }),
663
664
  /* @__PURE__ */ e.jsxs("section", { className: "iw-flex iw-flex-col iw-gap-5", children: [
@@ -665,7 +666,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
665
666
  "div",
666
667
  {
667
668
  className: "iw-relative iw-flex iw-flex-col iw-gap-6 iw-overflow-hidden iw-rounded-3xl iw-bg-white ",
668
- style: { borderRadius: v },
669
+ style: { borderRadius: b },
669
670
  children: [
670
671
  /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-z-10 iw-rounded-2xl iw-border iw-border-slate-200 iw-bg-slate-50/80 iw-p-3", children: /* @__PURE__ */ e.jsx(
671
672
  "video",
@@ -677,23 +678,23 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
677
678
  className: "iw-h-64 iw-w-full iw-rounded-2xl iw-object-cover",
678
679
  style: {
679
680
  transform: "scaleX(-1)",
680
- borderRadius: v
681
+ borderRadius: b
681
682
  }
682
683
  }
683
684
  ) }),
684
685
  /* @__PURE__ */ e.jsxs("div", { className: "iw-relative iw-grid iw-grid-cols-2 iw-gap-4 iw-px-1", children: [
685
686
  /* @__PURE__ */ e.jsx(
686
- _e,
687
+ Fe,
687
688
  {
688
- onClick: b,
689
+ onClick: y,
689
690
  disabled: h,
690
691
  variant: "outline",
691
692
  size: "sm",
692
693
  className: "iw-font-medium",
693
694
  style: {
694
- borderColor: w,
695
- borderRadius: v,
696
- color: w
695
+ borderColor: c,
696
+ borderRadius: b,
697
+ color: c
697
698
  },
698
699
  children: l ? "Recheck permissions" : "Enable camera & mic"
699
700
  }
@@ -701,11 +702,11 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
701
702
  /* @__PURE__ */ e.jsx(
702
703
  V,
703
704
  {
704
- onClick: D,
705
+ onClick: R,
705
706
  disabled: !l,
706
707
  className: "iw-h-10 iw-px-6 iw-text-sm",
707
708
  style: {
708
- backgroundColor: w
709
+ backgroundColor: c
709
710
  },
710
711
  children: "Proceed"
711
712
  }
@@ -714,21 +715,21 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
714
715
  ]
715
716
  }
716
717
  ),
717
- /* @__PURE__ */ e.jsx("ul", { className: "iw-grid sm:iw-grid-cols-1 iw-gap-3", children: y.map(
718
- ({ Icon: g, label: I, description: L, status: B, toneClass: q }) => /* @__PURE__ */ e.jsx(
718
+ /* @__PURE__ */ e.jsx("ul", { className: "iw-grid sm:iw-grid-cols-1 iw-gap-3", children: N.map(
719
+ ({ Icon: f, label: M, description: L, status: O, toneClass: q }) => /* @__PURE__ */ e.jsx(
719
720
  "li",
720
721
  {
721
722
  className: "iw-rounded-2xl iw-border iw-border-slate-200/65 iw-bg-white iw-p-4 iw-shadow-sm iw-transition-all hover:iw-border-slate-200",
722
723
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-3", children: [
723
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-xl iw-bg-slate-100", children: /* @__PURE__ */ e.jsx(g, { className: "iw-h-5 iw-w-5 iw-text-slate-600" }) }),
724
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-xl iw-bg-slate-100", children: /* @__PURE__ */ e.jsx(f, { className: "iw-h-5 iw-w-5 iw-text-slate-600" }) }),
724
725
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
725
726
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-between iw-gap-3", children: [
726
- /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-font-medium iw-text-slate-800", children: I }),
727
+ /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-font-medium iw-text-slate-800", children: M }),
727
728
  /* @__PURE__ */ e.jsx(
728
729
  "span",
729
730
  {
730
731
  className: `iw-rounded-full iw-px-3 iw-py-1 iw-text-[11px] iw-font-semibold ${q}`,
731
- children: B
732
+ children: O
732
733
  }
733
734
  )
734
735
  ] }),
@@ -736,10 +737,10 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
736
737
  ] })
737
738
  ] })
738
739
  },
739
- I
740
+ M
740
741
  )
741
742
  ) }),
742
- c && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-rose-200 iw-bg-rose-50 iw-px-3 iw-py-2 iw-text-xs iw-text-rose-600", children: c }),
743
+ d && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-rose-200 iw-bg-rose-50 iw-px-3 iw-py-2 iw-text-xs iw-text-rose-600", children: d }),
743
744
  !((A = navigator.mediaDevices) != null && A.getUserMedia) && /* @__PURE__ */ e.jsx("div", { className: "iw-rounded-lg iw-border iw-border-amber-200 iw-bg-amber-50 iw-px-3 iw-py-2 iw-text-xs iw-text-amber-700", children: "Your browser does not support media devices. Please use a modern browser like Chrome, Edge, or Firefox." })
744
745
  ] })
745
746
  ] }),
@@ -750,7 +751,7 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
750
751
  "aria-hidden": !0,
751
752
  className: "iw-pointer-events-none iw-absolute iw-inset-x-0 iw-bottom-1 iw-h-20",
752
753
  style: {
753
- backgroundImage: x,
754
+ backgroundImage: g,
754
755
  backgroundSize: "100% 120%, 100% 120%, 100% 120%, 32px 32px",
755
756
  backgroundPosition: "center bottom, left 95% bottom, right 95% bottom, center bottom",
756
757
  backgroundRepeat: "no-repeat, no-repeat, no-repeat, repeat",
@@ -764,12 +765,12 @@ const Le = (i) => /* @__PURE__ */ e.jsxs(
764
765
  ] })
765
766
  ] }) });
766
767
  };
767
- var _ = /* @__PURE__ */ ((i) => (i.IDLE = "idle", i.FETCHING_QUESTION = "fetching_question", i.READING_QUESTION = "reading_question", i.THINKING = "thinking", i.ANSWERING = "answering", i.TRANSCRIBING = "transcribing", i.EDITING = "editing", i.SUBMITTING = "submitting", i.COMPLETED = "completed", i))(_ || {});
768
- const ht = {
768
+ var D = /* @__PURE__ */ ((i) => (i.IDLE = "idle", i.FETCHING_QUESTION = "fetching_question", i.READING_QUESTION = "reading_question", i.THINKING = "thinking", i.ANSWERING = "answering", i.TRANSCRIBING = "transcribing", i.EDITING = "editing", i.SUBMITTING = "submitting", i.COMPLETED = "completed", i))(D || {});
769
+ const xt = {
769
770
  thinkingDuration: 30,
770
771
  answeringDuration: 120,
771
772
  editingDuration: 30
772
- }, mt = {
773
+ }, pt = {
773
774
  idle: {
774
775
  next: "fetching_question"
775
776
  /* FETCHING_QUESTION */
@@ -798,14 +799,14 @@ const ht = {
798
799
  /* COMPLETED */
799
800
  }
800
801
  };
801
- class gt {
802
+ class bt {
802
803
  constructor(r = {}, t = {}) {
803
804
  F(this, "config");
804
805
  F(this, "state");
805
806
  F(this, "phaseIntervalId", null);
806
807
  F(this, "globalIntervalId", null);
807
808
  F(this, "callbacks");
808
- this.config = { ...ht, ...r }, this.callbacks = t, this.state = {
809
+ this.config = { ...xt, ...r }, this.callbacks = t, this.state = {
809
810
  phase: "idle",
810
811
  currentPhaseTimeRemaining: 0,
811
812
  totalTimeElapsed: 0,
@@ -828,7 +829,7 @@ class gt {
828
829
  * Move to next phase
829
830
  */
830
831
  nextPhase() {
831
- const r = this.state.phase, t = mt[r];
832
+ const r = this.state.phase, t = pt[r];
832
833
  if (!t) return;
833
834
  this.stopPhaseTimer(), this.state.phase = t.next;
834
835
  const s = this.getDurationForPhase(t.next);
@@ -899,21 +900,21 @@ class gt {
899
900
  (t = (r = this.callbacks).onPhaseChange) == null || t.call(r, this.state.phase, this.getState());
900
901
  }
901
902
  }
902
- function ft(i = {}) {
903
- const { config: r = {}, callbacks: t = {} } = i, s = T(null);
904
- s.current || (s.current = new gt(r, {}));
905
- const n = s.current, [o, a] = k(n.getState()), l = N(() => {
903
+ function yt(i = {}) {
904
+ const { config: r = {}, callbacks: t = {} } = i, s = E(null);
905
+ s.current || (s.current = new bt(r, {}));
906
+ const n = s.current, [o, a] = k(n.getState()), l = T(() => {
906
907
  a(n.getState());
907
908
  }, [n]);
908
909
  C(() => {
909
910
  const h = {
910
- onPhaseChange: (m, w) => {
911
- var f;
912
- l(), (f = t.onPhaseChange) == null || f.call(t, m, w);
911
+ onPhaseChange: (m, c) => {
912
+ var x;
913
+ l(), (x = t.onPhaseChange) == null || x.call(t, m, c);
913
914
  },
914
915
  onTick: (m) => {
915
- var w;
916
- l(), (w = t.onTick) == null || w.call(t, m);
916
+ var c;
917
+ l(), (c = t.onTick) == null || c.call(t, m);
917
918
  },
918
919
  onInterviewEnd: () => {
919
920
  var m;
@@ -924,29 +925,29 @@ function ft(i = {}) {
924
925
  }, [n, t, l]), C(() => () => {
925
926
  n.destroy();
926
927
  }, [n]);
927
- const d = N(() => {
928
+ const w = T(() => {
928
929
  n.startQuestion(), l();
929
- }, [n, l]), c = N(() => {
930
+ }, [n, l]), d = T(() => {
930
931
  n.nextPhase(), l();
931
- }, [n, l]), u = N(() => {
932
+ }, [n, l]), u = T(() => {
932
933
  n.completeInterview(), l();
933
934
  }, [n, l]);
934
935
  return {
935
936
  state: o,
936
- startQuestion: d,
937
- nextPhase: c,
937
+ startQuestion: w,
938
+ nextPhase: d,
938
939
  completeInterview: u,
939
940
  timerService: n
940
941
  };
941
942
  }
942
- function xt(i, r = {}) {
943
+ function vt(i, r = {}) {
943
944
  const [t, s] = k({
944
945
  data: null,
945
946
  loading: !1,
946
947
  error: null
947
- }), n = N(
948
+ }), n = T(
948
949
  async (...o) => {
949
- var a, l, d, c;
950
+ var a, l, w, d;
950
951
  s((u) => ({ ...u, loading: !0, error: null }));
951
952
  try {
952
953
  const u = await i(...o);
@@ -968,7 +969,7 @@ function xt(i, r = {}) {
968
969
  ...m,
969
970
  loading: !1,
970
971
  error: h
971
- })), (d = r.onError) == null || d.call(r, h), (c = r.onSettled) == null || c.call(r, null, h);
972
+ })), (w = r.onError) == null || w.call(r, h), (d = r.onSettled) == null || d.call(r, null, h);
972
973
  }
973
974
  },
974
975
  [i, r]
@@ -978,67 +979,67 @@ function xt(i, r = {}) {
978
979
  execute: n
979
980
  };
980
981
  }
981
- const pt = (i) => {
982
- const [r, t] = k(null), [s, n] = k(!1), o = document, a = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), l = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, d = async (w) => {
983
- var f;
982
+ const jt = (i) => {
983
+ const [r, t] = k(null), [s, n] = k(!1), o = document, a = () => !!(o.fullscreenEnabled || o.webkitFullscreenEnabled || o.mozFullScreenEnabled || o.msFullscreenEnabled), l = () => o.fullscreenElement || o.webkitFullscreenElement || o.mozFullScreenElement || o.msFullscreenElement, w = async (c) => {
984
+ var x;
984
985
  try {
985
986
  if (!a())
986
987
  throw new Error("Fullscreen is not supported in this environment");
987
- w.requestFullscreen ? await w.requestFullscreen() : w.webkitRequestFullscreen ? await w.webkitRequestFullscreen() : w.mozRequestFullScreen ? await w.mozRequestFullScreen() : w.msRequestFullscreen && await w.msRequestFullscreen();
988
- } catch (v) {
988
+ c.requestFullscreen ? await c.requestFullscreen() : c.webkitRequestFullscreen ? await c.webkitRequestFullscreen() : c.mozRequestFullScreen ? await c.mozRequestFullScreen() : c.msRequestFullscreen && await c.msRequestFullscreen();
989
+ } catch (b) {
989
990
  const j = {
990
991
  name: "FullscreenError",
991
- message: v instanceof Error ? v.message : "Failed to enter fullscreen"
992
+ message: b instanceof Error ? b.message : "Failed to enter fullscreen"
992
993
  };
993
- t(j), (f = i == null ? void 0 : i.onError) == null || f.call(i, j);
994
+ t(j), (x = i == null ? void 0 : i.onError) == null || x.call(i, j);
994
995
  }
995
- }, c = async () => {
996
- var w;
996
+ }, d = async () => {
997
+ var c;
997
998
  try {
998
999
  o.exitFullscreen ? await o.exitFullscreen() : o.webkitExitFullscreen ? await o.webkitExitFullscreen() : o.mozCancelFullScreen ? await o.mozCancelFullScreen() : o.msExitFullscreen && await o.msExitFullscreen();
999
- } catch (f) {
1000
- const v = {
1000
+ } catch (x) {
1001
+ const b = {
1001
1002
  name: "FullscreenError",
1002
- message: f instanceof Error ? f.message : "Failed to exit fullscreen"
1003
+ message: x instanceof Error ? x.message : "Failed to exit fullscreen"
1003
1004
  };
1004
- t(v), (w = i == null ? void 0 : i.onError) == null || w.call(i, v);
1005
+ t(b), (c = i == null ? void 0 : i.onError) == null || c.call(i, b);
1005
1006
  }
1006
- }, u = N(() => {
1007
- var f;
1008
- const w = !!l();
1009
- n(w), (f = i == null ? void 0 : i.onFullScreenChange) == null || f.call(i, w);
1007
+ }, u = T(() => {
1008
+ var x;
1009
+ const c = !!l();
1010
+ n(c), (x = i == null ? void 0 : i.onFullScreenChange) == null || x.call(i, c);
1010
1011
  }, [i]);
1011
1012
  C(() => {
1012
- const w = [
1013
+ const c = [
1013
1014
  "fullscreenchange",
1014
1015
  "webkitfullscreenchange",
1015
1016
  "mozfullscreenchange",
1016
1017
  "MSFullscreenChange"
1017
1018
  ];
1018
- return w.forEach((f) => {
1019
- document.addEventListener(f, u);
1019
+ return c.forEach((x) => {
1020
+ document.addEventListener(x, u);
1020
1021
  }), () => {
1021
- w.forEach((f) => {
1022
- document.removeEventListener(f, u);
1022
+ c.forEach((x) => {
1023
+ document.removeEventListener(x, u);
1023
1024
  });
1024
1025
  };
1025
1026
  }, [u]);
1026
- const h = async (w) => {
1027
+ const h = async (c) => {
1027
1028
  t(null);
1028
- const f = w ?? document.documentElement;
1029
- await d(f);
1029
+ const x = c ?? document.documentElement;
1030
+ await w(x);
1030
1031
  };
1031
1032
  return {
1032
1033
  isFullScreen: s,
1033
- toggleFullScreen: async (w) => {
1034
- s ? await c() : await h(w);
1034
+ toggleFullScreen: async (c) => {
1035
+ s ? await d() : await h(c);
1035
1036
  },
1036
1037
  enterFullScreen: h,
1037
- exitFullScreen: c,
1038
+ exitFullScreen: d,
1038
1039
  error: r
1039
1040
  };
1040
1041
  };
1041
- function bt(i) {
1042
+ function Nt(i) {
1042
1043
  var r;
1043
1044
  if (!navigator.onLine)
1044
1045
  return {
@@ -1097,7 +1098,7 @@ function bt(i) {
1097
1098
  originalError: i
1098
1099
  };
1099
1100
  }
1100
- async function xe(i, r = {}, t = {
1101
+ async function ye(i, r = {}, t = {
1101
1102
  attempts: 3,
1102
1103
  backoff: "exponential",
1103
1104
  baseDelay: 1e3,
@@ -1118,22 +1119,22 @@ async function xe(i, r = {}, t = {
1118
1119
  return l;
1119
1120
  } catch (o) {
1120
1121
  s = o;
1121
- const a = bt(o);
1122
+ const a = Nt(o);
1122
1123
  if (!a.retryable || n === t.attempts)
1123
1124
  throw a;
1124
- const l = yt(n, t);
1125
+ const l = kt(n, t);
1125
1126
  console.warn(
1126
1127
  `API request failed (attempt ${n}/${t.attempts}), retrying in ${l}ms:`,
1127
1128
  a.message
1128
- ), await new Promise((d) => setTimeout(d, l));
1129
+ ), await new Promise((w) => setTimeout(w, l));
1129
1130
  }
1130
1131
  throw s;
1131
1132
  }
1132
- function yt(i, r) {
1133
+ function kt(i, r) {
1133
1134
  let t;
1134
1135
  return r.backoff === "exponential" ? t = r.baseDelay * Math.pow(2, i - 1) : t = r.baseDelay, t = Math.min(t, r.maxDelay), r.jitter && (t = t * (0.5 + Math.random() * 0.5)), Math.round(t);
1135
1136
  }
1136
- class vt {
1137
+ class Et {
1137
1138
  constructor(r = {}) {
1138
1139
  F(this, "config");
1139
1140
  this.config = r;
@@ -1172,7 +1173,7 @@ class vt {
1172
1173
  answer: o,
1173
1174
  answerDuration: a
1174
1175
  }) {
1175
- const l = await xe(
1176
+ const l = await ye(
1176
1177
  `${this.getBaseUrl()}/questions/next`,
1177
1178
  {
1178
1179
  method: "POST",
@@ -1193,14 +1194,14 @@ class vt {
1193
1194
  return await l.json();
1194
1195
  }
1195
1196
  }
1196
- function jt() {
1197
- const i = ae();
1198
- return X(() => {
1197
+ function Tt() {
1198
+ const i = le();
1199
+ return ee(() => {
1199
1200
  const t = i.api || {};
1200
- return new vt(t);
1201
+ return new Et(t);
1201
1202
  }, [i.api]);
1202
1203
  }
1203
- const Nt = (i) => {
1204
+ const Ct = (i) => {
1204
1205
  C(() => {
1205
1206
  const r = (s) => {
1206
1207
  (s.ctrlKey || s.metaKey) && ["c", "v", "a", "t", "n", "w", "r", "s", "p"].includes(s.key.toLowerCase()) && (s.preventDefault(), i({
@@ -1240,12 +1241,12 @@ const Nt = (i) => {
1240
1241
  };
1241
1242
  }, [i]);
1242
1243
  };
1243
- class R extends Error {
1244
+ class I extends Error {
1244
1245
  constructor(r, t, s = !1) {
1245
1246
  super(r), this.code = t, this.recoverable = s, this.name = "STTError";
1246
1247
  }
1247
1248
  }
1248
- class kt {
1249
+ class St {
1249
1250
  constructor(r = {}) {
1250
1251
  F(this, "config");
1251
1252
  F(this, "mediaRecorder", null);
@@ -1280,13 +1281,13 @@ class kt {
1280
1281
  async startRecording(r, t) {
1281
1282
  var s;
1282
1283
  if (!this.isRecordingSupported())
1283
- throw new R(
1284
+ throw new I(
1284
1285
  "Audio recording is not supported in this browser",
1285
1286
  "RECORDING_NOT_SUPPORTED",
1286
1287
  !1
1287
1288
  );
1288
1289
  if (this.isRecording())
1289
- throw new R(
1290
+ throw new I(
1290
1291
  "Recording is already in progress",
1291
1292
  "ALREADY_RECORDING",
1292
1293
  !0
@@ -1310,7 +1311,7 @@ class kt {
1310
1311
  (o = t == null ? void 0 : t.onStop) == null || o.call(t);
1311
1312
  }, this.mediaRecorder.onerror = (o) => {
1312
1313
  var l;
1313
- const a = new R(
1314
+ const a = new I(
1314
1315
  `Recording failed: ${o.error}`,
1315
1316
  "RECORDING_ERROR",
1316
1317
  !0
@@ -1322,15 +1323,15 @@ class kt {
1322
1323
  } catch (n) {
1323
1324
  if (this.cleanup(), n instanceof Error) {
1324
1325
  if (n.name === "NotAllowedError" || n.name === "PermissionDeniedError")
1325
- throw new R(
1326
+ throw new I(
1326
1327
  "Microphone permission was denied",
1327
1328
  "PERMISSION_DENIED",
1328
1329
  !1
1329
1330
  );
1330
1331
  if (n.name === "NotFoundError")
1331
- throw new R("No microphone found", "NO_MICROPHONE", !1);
1332
+ throw new I("No microphone found", "NO_MICROPHONE", !1);
1332
1333
  }
1333
- throw new R(
1334
+ throw new I(
1334
1335
  `Failed to start recording: ${n instanceof Error ? n.message : String(n)}`,
1335
1336
  "START_RECORDING_FAILED",
1336
1337
  !0
@@ -1342,7 +1343,7 @@ class kt {
1342
1343
  */
1343
1344
  async stopRecording() {
1344
1345
  if (this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null), !this.mediaRecorder || !this.isRecording())
1345
- throw new R(
1346
+ throw new I(
1346
1347
  "No active recording to stop",
1347
1348
  "NO_ACTIVE_RECORDING",
1348
1349
  !1
@@ -1350,7 +1351,7 @@ class kt {
1350
1351
  return new Promise((r, t) => {
1351
1352
  if (!this.mediaRecorder) {
1352
1353
  t(
1353
- new R("MediaRecorder is null", "MEDIARECORDER_NULL", !1)
1354
+ new I("MediaRecorder is null", "MEDIARECORDER_NULL", !1)
1354
1355
  );
1355
1356
  return;
1356
1357
  }
@@ -1360,7 +1361,7 @@ class kt {
1360
1361
  this.cleanup(), r(a);
1361
1362
  } catch (o) {
1362
1363
  t(
1363
- new R(
1364
+ new I(
1364
1365
  `Failed to create audio blob: ${o instanceof Error ? o.message : String(o)}`,
1365
1366
  "BLOB_CREATION_FAILED",
1366
1367
  !1
@@ -1383,17 +1384,17 @@ class kt {
1383
1384
  temperature: a = this.config.temperature
1384
1385
  } = r;
1385
1386
  if (!t || t.size === 0)
1386
- throw new R(
1387
+ throw new I(
1387
1388
  "Audio blob is empty or invalid",
1388
1389
  "INVALID_AUDIO",
1389
1390
  !1
1390
1391
  );
1391
1392
  try {
1392
- const l = new FormData(), d = new File([t], "recording.wav", {
1393
+ const l = new FormData(), w = new File([t], "recording.wav", {
1393
1394
  type: t.type || "audio/wav"
1394
1395
  });
1395
- l.append("file", d), l.append("model", s || "whisper-large-v3-turbo"), l.append("language", n || "en"), l.append("include_timestamps", String(o || !1)), l.append("temperature", String(a || 0));
1396
- const c = await xe(
1396
+ l.append("file", w), l.append("model", s || "whisper-large-v3-turbo"), l.append("language", n || "en"), l.append("include_timestamps", String(o || !1)), l.append("temperature", String(a || 0));
1397
+ const d = await ye(
1397
1398
  `${this.config.baseUrl}/speech/transcribe`,
1398
1399
  {
1399
1400
  method: "POST",
@@ -1414,26 +1415,26 @@ class kt {
1414
1415
  jitter: !0
1415
1416
  }
1416
1417
  );
1417
- if (!c.ok) {
1418
- const h = await c.text();
1419
- let m = `STT request failed: ${c.status} ${c.statusText}`;
1418
+ if (!d.ok) {
1419
+ const h = await d.text();
1420
+ let m = `STT request failed: ${d.status} ${d.statusText}`;
1420
1421
  try {
1421
- const w = JSON.parse(h);
1422
- m = w.message || w.error || m;
1422
+ const c = JSON.parse(h);
1423
+ m = c.message || c.error || m;
1423
1424
  } catch {
1424
1425
  m = h || m;
1425
1426
  }
1426
- throw new R(
1427
+ throw new I(
1427
1428
  m,
1428
- `HTTP_${c.status}`,
1429
- c.status >= 500
1429
+ `HTTP_${d.status}`,
1430
+ d.status >= 500
1430
1431
  );
1431
1432
  }
1432
1433
  return {
1433
- transcript: (await c.json()).data.text ?? ""
1434
+ transcript: (await d.json()).data.text ?? ""
1434
1435
  };
1435
1436
  } catch (l) {
1436
- throw l instanceof R ? l : new R(
1437
+ throw l instanceof I ? l : new I(
1437
1438
  `Transcription failed: ${l instanceof Error ? l.message : String(l)}`,
1438
1439
  "TRANSCRIPTION_FAILED",
1439
1440
  !0
@@ -1475,84 +1476,84 @@ class kt {
1475
1476
  this.recordingStream && (this.recordingStream.getTracks().forEach((r) => r.stop()), this.recordingStream = null), this.mediaRecorder = null, this.audioChunks = [], this.autoStopTimeoutId && (clearTimeout(this.autoStopTimeoutId), this.autoStopTimeoutId = null);
1476
1477
  }
1477
1478
  }
1478
- const J = new kt(), Et = (i = {}) => {
1479
- const [r, t] = k(!1), [s, n] = k(!1), [o, a] = k(null), [l, d] = k(null), [c, u] = k(null);
1480
- i.config && J.updateConfig(i.config);
1481
- const h = N(async (v) => {
1479
+ const Z = new St(), It = (i = {}) => {
1480
+ const [r, t] = k(!1), [s, n] = k(!1), [o, a] = k(null), [l, w] = k(null), [d, u] = k(null);
1481
+ i.config && Z.updateConfig(i.config);
1482
+ const h = T(async (b) => {
1482
1483
  var j;
1483
1484
  try {
1484
- d(null), a(null), u(null), await J.startRecording(v, {
1485
+ w(null), a(null), u(null), await Z.startRecording(b, {
1485
1486
  onStart: () => {
1486
- var x;
1487
- t(!0), (x = i.onStart) == null || x.call(i);
1487
+ var g;
1488
+ t(!0), (g = i.onStart) == null || g.call(i);
1488
1489
  },
1489
1490
  onStop: () => {
1490
- var x;
1491
- t(!1), (x = i.onStop) == null || x.call(i);
1491
+ var g;
1492
+ t(!1), (g = i.onStop) == null || g.call(i);
1492
1493
  },
1493
- onError: (x) => {
1494
+ onError: (g) => {
1494
1495
  var S;
1495
- const E = x instanceof R ? x : new R(x.message, "RECORDING_ERROR", !0);
1496
- d(E), t(!1), (S = i.onError) == null || S.call(i, E);
1496
+ const v = g instanceof I ? g : new I(g.message, "RECORDING_ERROR", !0);
1497
+ w(v), t(!1), (S = i.onError) == null || S.call(i, v);
1497
1498
  }
1498
1499
  });
1499
- } catch (x) {
1500
- const E = x instanceof R ? x : new R(
1501
- x instanceof Error ? x.message : String(x),
1500
+ } catch (g) {
1501
+ const v = g instanceof I ? g : new I(
1502
+ g instanceof Error ? g.message : String(g),
1502
1503
  "START_FAILED",
1503
1504
  !1
1504
1505
  );
1505
- throw d(E), t(!1), (j = i.onError) == null || j.call(i, E), E;
1506
+ throw w(v), t(!1), (j = i.onError) == null || j.call(i, v), v;
1506
1507
  }
1507
- }, []), m = N(async () => {
1508
- var v, j;
1508
+ }, []), m = T(async () => {
1509
+ var b, j;
1509
1510
  try {
1510
- const x = await J.stopRecording();
1511
- return u(x), t(!1), (v = i.onStop) == null || v.call(i), x;
1512
- } catch (x) {
1513
- const E = x instanceof R ? x : new R(
1514
- x instanceof Error ? x.message : String(x),
1511
+ const g = await Z.stopRecording();
1512
+ return u(g), t(!1), (b = i.onStop) == null || b.call(i), g;
1513
+ } catch (g) {
1514
+ const v = g instanceof I ? g : new I(
1515
+ g instanceof Error ? g.message : String(g),
1515
1516
  "STOP_FAILED",
1516
1517
  !1
1517
1518
  );
1518
- throw d(E), t(!1), (j = i.onError) == null || j.call(i, E), E;
1519
+ throw w(v), t(!1), (j = i.onError) == null || j.call(i, v), v;
1519
1520
  }
1520
- }, []), w = N(
1521
- async (v, j = {}) => {
1522
- var x, E;
1521
+ }, []), c = T(
1522
+ async (b, j = {}) => {
1523
+ var g, v;
1523
1524
  try {
1524
- d(null), n(!0);
1525
+ w(null), n(!0);
1525
1526
  const S = {
1526
- audioBlob: v,
1527
+ audioBlob: b,
1527
1528
  ...j
1528
- }, y = await J.transcribe(S);
1529
- return a(y.transcript), n(!1), (x = i.onTranscriptionComplete) == null || x.call(i, y), y;
1529
+ }, N = await Z.transcribe(S);
1530
+ return a(N.transcript), n(!1), (g = i.onTranscriptionComplete) == null || g.call(i, N), N;
1530
1531
  } catch (S) {
1531
- const y = S instanceof R ? S : new R(
1532
+ const N = S instanceof I ? S : new I(
1532
1533
  S instanceof Error ? S.message : String(S),
1533
1534
  "TRANSCRIPTION_FAILED",
1534
1535
  !0
1535
1536
  );
1536
- throw d(y), n(!1), (E = i.onError) == null || E.call(i, y), y;
1537
+ throw w(N), n(!1), (v = i.onError) == null || v.call(i, N), N;
1537
1538
  }
1538
1539
  },
1539
1540
  []
1540
- ), f = N(() => {
1541
- J.cancelRecording(), t(!1), u(null);
1541
+ ), x = T(() => {
1542
+ Z.cancelRecording(), t(!1), u(null);
1542
1543
  }, []);
1543
1544
  return {
1544
1545
  startRecording: h,
1545
1546
  stopRecording: m,
1546
- transcribe: w,
1547
- cancelRecording: f,
1547
+ transcribe: c,
1548
+ cancelRecording: x,
1548
1549
  isRecording: r,
1549
1550
  isTranscribing: s,
1550
1551
  transcript: o,
1551
1552
  error: l,
1552
- audioBlob: c
1553
+ audioBlob: d
1553
1554
  };
1554
- }, Tt = (i) => {
1555
- const r = T(null), t = T(!1);
1555
+ }, Rt = (i) => {
1556
+ const r = E(null), t = E(!1);
1556
1557
  C(() => {
1557
1558
  const s = () => {
1558
1559
  document.hidden && (t.current = !0, r.current && (clearTimeout(r.current), r.current = null), i({
@@ -1581,7 +1582,7 @@ const J = new kt(), Et = (i = {}) => {
1581
1582
  document.removeEventListener("visibilitychange", s), window.removeEventListener("blur", n), r.current && clearTimeout(r.current);
1582
1583
  };
1583
1584
  }, [i]);
1584
- }, Ct = () => {
1585
+ }, At = () => {
1585
1586
  C(() => {
1586
1587
  const i = document.createElement("style");
1587
1588
  return i.textContent = `
@@ -1602,7 +1603,7 @@ const J = new kt(), Et = (i = {}) => {
1602
1603
  };
1603
1604
  }, []);
1604
1605
  };
1605
- class St {
1606
+ class Mt {
1606
1607
  constructor(r = {}) {
1607
1608
  F(this, "config");
1608
1609
  F(this, "currentAudio", null);
@@ -1630,7 +1631,7 @@ class St {
1630
1631
  speed: n = this.config.speed
1631
1632
  } = r, o = new URLSearchParams();
1632
1633
  o.append("text", t), o.append("voice", s || "string"), o.append("speed", (n == null ? void 0 : n.toString()) || "1");
1633
- const a = await xe(
1634
+ const a = await ye(
1634
1635
  `${this.config.baseUrl}/speech/synthesize`,
1635
1636
  {
1636
1637
  method: "POST",
@@ -1660,8 +1661,8 @@ class St {
1660
1661
  if (l && l.includes("audio/"))
1661
1662
  return a.blob();
1662
1663
  try {
1663
- const d = await a.json();
1664
- throw new Error(`TTS Error: ${JSON.stringify(d)}`);
1664
+ const w = await a.json();
1665
+ throw new Error(`TTS Error: ${JSON.stringify(w)}`);
1665
1666
  } catch {
1666
1667
  throw new Error("TTS request failed with unknown error");
1667
1668
  }
@@ -1674,25 +1675,25 @@ class St {
1674
1675
  try {
1675
1676
  this.stop(), (s = t == null ? void 0 : t.onStart) == null || s.call(t);
1676
1677
  const o = await this.synthesizeSpeech(r), a = URL.createObjectURL(o);
1677
- return this.currentAudio = new Audio(a), new Promise((l, d) => {
1678
+ return this.currentAudio = new Audio(a), new Promise((l, w) => {
1678
1679
  if (!this.currentAudio) {
1679
- d(new Error("Audio element not created"));
1680
+ w(new Error("Audio element not created"));
1680
1681
  return;
1681
1682
  }
1682
- const c = this.currentAudio;
1683
- c.onended = () => {
1683
+ const d = this.currentAudio;
1684
+ d.onended = () => {
1684
1685
  var u;
1685
1686
  URL.revokeObjectURL(a), this.currentAudio = null, (u = t == null ? void 0 : t.onEnd) == null || u.call(t), l();
1686
- }, c.onerror = (u) => {
1687
+ }, d.onerror = (u) => {
1687
1688
  var m;
1688
1689
  URL.revokeObjectURL(a), this.currentAudio = null;
1689
1690
  const h = new Error(`Audio playback failed: ${u}`);
1690
- (m = t == null ? void 0 : t.onError) == null || m.call(t, h), d(h);
1691
- }, c.play().catch((u) => {
1691
+ (m = t == null ? void 0 : t.onError) == null || m.call(t, h), w(h);
1692
+ }, d.play().catch((u) => {
1692
1693
  var m;
1693
1694
  URL.revokeObjectURL(a), this.currentAudio = null;
1694
1695
  const h = new Error(`Failed to play audio: ${u.message}`);
1695
- (m = t == null ? void 0 : t.onError) == null || m.call(t, h), d(h);
1696
+ (m = t == null ? void 0 : t.onError) == null || m.call(t, h), w(h);
1696
1697
  });
1697
1698
  });
1698
1699
  } catch (o) {
@@ -1713,76 +1714,76 @@ class St {
1713
1714
  return this.currentAudio !== null && !this.currentAudio.paused;
1714
1715
  }
1715
1716
  }
1716
- const we = new St(), It = (i = {}) => {
1717
+ const me = new Mt(), Dt = (i = {}) => {
1717
1718
  const [r, t] = k(!1), [s, n] = k(!1), [o, a] = k(null);
1718
- i.config && we.updateConfig(i.config);
1719
- const l = N(
1720
- async (c, u = {}) => {
1719
+ i.config && me.updateConfig(i.config);
1720
+ const l = T(
1721
+ async (d, u = {}) => {
1721
1722
  var h;
1722
1723
  try {
1723
1724
  a(null), n(!0);
1724
1725
  const m = {
1725
- text: c,
1726
+ text: d,
1726
1727
  ...u
1727
1728
  };
1728
- await we.speak(m, {
1729
+ await me.speak(m, {
1729
1730
  onStart: () => {
1730
- var w;
1731
- n(!1), t(!0), (w = i.onStart) == null || w.call(i);
1731
+ var c;
1732
+ n(!1), t(!0), (c = i.onStart) == null || c.call(i);
1732
1733
  },
1733
1734
  onEnd: () => {
1734
- var w;
1735
- t(!1), (w = i.onEnd) == null || w.call(i);
1735
+ var c;
1736
+ t(!1), (c = i.onEnd) == null || c.call(i);
1736
1737
  },
1737
- onError: (w) => {
1738
- var f;
1739
- t(!1), n(!1), a(w), (f = i.onError) == null || f.call(i, w);
1738
+ onError: (c) => {
1739
+ var x;
1740
+ t(!1), n(!1), a(c), (x = i.onError) == null || x.call(i, c);
1740
1741
  }
1741
1742
  });
1742
1743
  } catch (m) {
1743
- const w = m instanceof Error ? m : new Error(String(m));
1744
- throw a(w), t(!1), n(!1), (h = i.onError) == null || h.call(i, w), w;
1744
+ const c = m instanceof Error ? m : new Error(String(m));
1745
+ throw a(c), t(!1), n(!1), (h = i.onError) == null || h.call(i, c), c;
1745
1746
  }
1746
1747
  },
1747
1748
  [i]
1748
- ), d = N(() => {
1749
- we.stop(), t(!1), n(!1);
1749
+ ), w = T(() => {
1750
+ me.stop(), t(!1), n(!1);
1750
1751
  }, []);
1751
1752
  return {
1752
1753
  speak: l,
1753
- stop: d,
1754
+ stop: w,
1754
1755
  isPlaying: r,
1755
1756
  isLoading: s,
1756
1757
  error: o
1757
1758
  };
1758
- }, Rt = ({
1759
+ }, Pt = ({
1759
1760
  onViolation: i,
1760
1761
  onEnd: r,
1761
1762
  maxViolations: t = 5
1762
1763
  }) => {
1763
- const { addViolation: s } = tt(), n = Ze(), o = et(), a = T(o);
1764
+ const { addViolation: s } = nt(), n = rt(), o = st(), a = E(o);
1764
1765
  C(() => {
1765
1766
  a.current = o;
1766
1767
  }, [o]);
1767
- const l = N(
1768
- (c) => {
1769
- r && r(c, a.current);
1768
+ const l = T(
1769
+ (d) => {
1770
+ r && r(d, a.current);
1770
1771
  },
1771
1772
  [r]
1772
1773
  );
1773
1774
  return {
1774
- logViolation: N(
1775
- ({ type: c, severity: u, details: h }) => {
1775
+ logViolation: T(
1776
+ ({ type: d, severity: u, details: h }) => {
1776
1777
  const m = {
1777
- id: lt(),
1778
- type: c,
1778
+ id: ut(),
1779
+ type: d,
1779
1780
  severity: u,
1780
1781
  details: h,
1781
1782
  timestamp: Date.now()
1782
1783
  };
1783
1784
  s(m);
1784
- const w = a.current + 1;
1785
- i && i(m, w), w >= t && l("excessive_violations");
1785
+ const c = a.current + 1;
1786
+ i && i(m, c), c >= t && l("excessive_violations");
1786
1787
  },
1787
1788
  [s, i, t, l]
1788
1789
  ),
@@ -1790,7 +1791,7 @@ const we = new St(), It = (i = {}) => {
1790
1791
  violationCount: o,
1791
1792
  logList: n
1792
1793
  };
1793
- }, At = () => {
1794
+ }, _t = () => {
1794
1795
  C(() => {
1795
1796
  function i() {
1796
1797
  console.clear(), console.log(
@@ -1872,7 +1873,7 @@ const we = new St(), It = (i = {}) => {
1872
1873
  clearInterval(s), document.removeEventListener("keydown", n), document.removeEventListener("contextmenu", o), delete window.showStats, delete window.interviewTips;
1873
1874
  };
1874
1875
  }, []);
1875
- }, pe = (i) => /* @__PURE__ */ e.jsxs(
1876
+ }, ve = (i) => /* @__PURE__ */ e.jsxs(
1876
1877
  "svg",
1877
1878
  {
1878
1879
  xmlns: "http://www.w3.org/2000/svg",
@@ -1894,10 +1895,10 @@ const we = new St(), It = (i = {}) => {
1894
1895
  /* @__PURE__ */ e.jsx("path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" })
1895
1896
  ]
1896
1897
  }
1897
- ), Mt = (i, r, t) => Math.max(r, Math.min(t, i)), je = (i) => {
1898
+ ), Ft = (i, r, t) => Math.max(r, Math.min(t, i)), ke = (i) => {
1898
1899
  const r = Math.max(0, Math.floor(i)), t = Math.floor(r / 60).toString().padStart(2, "0"), s = (r % 60).toString().padStart(2, "0");
1899
1900
  return `${t}:${s}`;
1900
- }, be = ({
1901
+ }, je = ({
1901
1902
  total: i,
1902
1903
  remaining: r,
1903
1904
  size: t = 64,
@@ -1905,16 +1906,16 @@ const we = new St(), It = (i = {}) => {
1905
1906
  className: n = "",
1906
1907
  showLabel: o = !0
1907
1908
  }) => {
1908
- const a = Math.max(1, i || 1), l = Mt(r / a, 0, 1), { radius: d, circumference: c, dashOffset: u, center: h } = X(() => {
1909
- const f = (t - s) / 2, v = 2 * Math.PI * f, j = v * (1 - l), x = Math.round(s) % 2 === 1, E = t / 2 + (x ? 0.5 : 0);
1910
- return { radius: f, circumference: v, dashOffset: j, center: E };
1911
- }, [t, s, l]), m = X(() => l <= 0.25 ? "iw-stroke-red-500" : l <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [l]), w = l <= 0.25 ? "iw-animate-pulse" : "";
1909
+ const a = Math.max(1, i || 1), l = Ft(r / a, 0, 1), { radius: w, circumference: d, dashOffset: u, center: h } = ee(() => {
1910
+ const x = (t - s) / 2, b = 2 * Math.PI * x, j = b * (1 - l), g = Math.round(s) % 2 === 1, v = t / 2 + (g ? 0.5 : 0);
1911
+ return { radius: x, circumference: b, dashOffset: j, center: v };
1912
+ }, [t, s, l]), m = ee(() => l <= 0.25 ? "iw-stroke-red-500" : l <= 0.5 ? "iw-stroke-yellow-500" : "iw-stroke-green-500", [l]), c = l <= 0.25 ? "iw-animate-pulse" : "";
1912
1913
  return /* @__PURE__ */ e.jsxs(
1913
1914
  "div",
1914
1915
  {
1915
1916
  className: `iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${n}`,
1916
1917
  style: { width: t, height: t },
1917
- "aria-label": `Time remaining ${je(r)}`,
1918
+ "aria-label": `Time remaining ${ke(r)}`,
1918
1919
  role: "timer",
1919
1920
  "aria-live": "polite",
1920
1921
  children: [
@@ -1931,7 +1932,7 @@ const we = new St(), It = (i = {}) => {
1931
1932
  {
1932
1933
  cx: h,
1933
1934
  cy: h,
1934
- r: d,
1935
+ r: w,
1935
1936
  className: "iw-stroke-gray-200",
1936
1937
  strokeWidth: s,
1937
1938
  fill: "none",
@@ -1944,12 +1945,12 @@ const we = new St(), It = (i = {}) => {
1944
1945
  {
1945
1946
  cx: h,
1946
1947
  cy: h,
1947
- r: d,
1948
- className: `${m} ${w}`,
1948
+ r: w,
1949
+ className: `${m} ${c}`,
1949
1950
  strokeWidth: s,
1950
1951
  strokeLinecap: "round",
1951
1952
  fill: "none",
1952
- strokeDasharray: c,
1953
+ strokeDasharray: d,
1953
1954
  strokeDashoffset: u,
1954
1955
  shapeRendering: "geometricPrecision",
1955
1956
  vectorEffect: "non-scaling-stroke",
@@ -1965,13 +1966,13 @@ const we = new St(), It = (i = {}) => {
1965
1966
  "span",
1966
1967
  {
1967
1968
  className: `iw-text-[11px] iw-font-semibold iw-tabular-nums ${l <= 0.25 ? "iw-text-red-600" : l <= 0.5 ? "iw-text-yellow-600" : "iw-text-green-600"}`,
1968
- children: je(r)
1969
+ children: ke(r)
1969
1970
  }
1970
1971
  ) })
1971
1972
  ]
1972
1973
  }
1973
1974
  );
1974
- }, Dt = ({
1975
+ }, Lt = ({
1975
1976
  label: i,
1976
1977
  error: r,
1977
1978
  fullWidth: t = !1,
@@ -1979,7 +1980,7 @@ const we = new St(), It = (i = {}) => {
1979
1980
  id: n,
1980
1981
  ...o
1981
1982
  }) => {
1982
- const a = n || `textarea-${Math.random().toString(36).substring(2, 9)}`, l = "iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all", d = r ? "iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500" : "", c = t ? "iw-w-full" : "", u = s.includes("iw-h-full") || t ? "iw-h-full" : "";
1983
+ const a = n || `textarea-${Math.random().toString(36).substring(2, 9)}`, l = "iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all", w = r ? "iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500" : "", d = t ? "iw-w-full" : "", u = s.includes("iw-h-full") || t ? "iw-h-full" : "";
1983
1984
  return /* @__PURE__ */ e.jsxs(
1984
1985
  "div",
1985
1986
  {
@@ -1997,7 +1998,7 @@ const we = new St(), It = (i = {}) => {
1997
1998
  "textarea",
1998
1999
  {
1999
2000
  id: a,
2000
- className: `${l} ${d} ${c} ${u} ${s}`,
2001
+ className: `${l} ${w} ${d} ${u} ${s}`,
2001
2002
  "aria-invalid": r ? "true" : "false",
2002
2003
  ...o
2003
2004
  }
@@ -2006,7 +2007,7 @@ const we = new St(), It = (i = {}) => {
2006
2007
  ]
2007
2008
  }
2008
2009
  );
2009
- }, _t = ({
2010
+ }, $t = ({
2010
2011
  value: i,
2011
2012
  onChange: r,
2012
2013
  onSubmit: t,
@@ -2022,11 +2023,11 @@ const we = new St(), It = (i = {}) => {
2022
2023
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Your Answer" }),
2023
2024
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
2024
2025
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
2025
- /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
2026
+ /* @__PURE__ */ e.jsx(ve, { className: "iw-size-4 iw-text-orange-600" }),
2026
2027
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to edit: " })
2027
2028
  ] }),
2028
2029
  /* @__PURE__ */ e.jsx(
2029
- be,
2030
+ je,
2030
2031
  {
2031
2032
  total: o,
2032
2033
  remaining: n.currentPhaseTimeRemaining,
@@ -2038,7 +2039,7 @@ const we = new St(), It = (i = {}) => {
2038
2039
  ] }),
2039
2040
  /* @__PURE__ */ e.jsxs("div", { className: " iw-overflow-hidden iw-flex iw-flex-col iw-h-full iw-mt-2", children: [
2040
2041
  /* @__PURE__ */ e.jsx(
2041
- Dt,
2042
+ Lt,
2042
2043
  {
2043
2044
  value: i,
2044
2045
  onChange: r,
@@ -2055,9 +2056,9 @@ const we = new St(), It = (i = {}) => {
2055
2056
  /* @__PURE__ */ e.jsx("div", { className: "iw-w-full iw-grid iw-grid-cols-1 iw-mt-4", children: /* @__PURE__ */ e.jsx(V, { onClick: t, disabled: s, children: "Submit Answer" }) })
2056
2057
  ] })
2057
2058
  ] });
2058
- }, Pt = ({ className: i = "" }) => {
2059
+ }, Ot = ({ className: i = "" }) => {
2059
2060
  var n;
2060
- const { authToken: r } = Me(), t = r ? ct(r) : null, s = T(null);
2061
+ const { authToken: r } = Pe(), t = r ? ht(r) : null, s = E(null);
2061
2062
  return C(() => {
2062
2063
  let o = null;
2063
2064
  return (async () => {
@@ -2092,16 +2093,16 @@ const we = new St(), It = (i = {}) => {
2092
2093
  ] }),
2093
2094
  ((n = t == null ? void 0 : t.data) == null ? void 0 : n.user_name) && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-black/40 iw-px-4 iw-py-2 iw-backdrop-blur-md", children: /* @__PURE__ */ e.jsx("span", { className: "iw-font-medium iw-text-white", children: t.data.user_name }) })
2094
2095
  ] });
2095
- }, Ft = ({
2096
+ }, Ut = ({
2096
2097
  question: i,
2097
2098
  isLoading: r = !1
2098
2099
  }) => {
2099
- const { baseColor: t } = Z();
2100
+ const { baseColor: t } = te();
2100
2101
  return /* @__PURE__ */ e.jsx(
2101
2102
  "div",
2102
2103
  {
2103
2104
  className: "iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-p-6 ",
2104
- style: at(t, 0.85),
2105
+ style: dt(t, 0.85),
2105
2106
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-8", children: [
2106
2107
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-flex-col iw-items-center iw-relative iw-h-32 iw-w-32 iw-shrink-0 iw-shadow iw-rounded-lg iw-bg-white", children: /* @__PURE__ */ e.jsx("div", { className: "iw-mt-2", children: /* @__PURE__ */ e.jsx(
2107
2108
  "img",
@@ -2118,7 +2119,7 @@ const we = new St(), It = (i = {}) => {
2118
2119
  ] })
2119
2120
  }
2120
2121
  );
2121
- }, Ne = ({
2122
+ }, Ee = ({
2122
2123
  currentQuestion: i,
2123
2124
  phase: r,
2124
2125
  className: t = "",
@@ -2129,19 +2130,19 @@ const we = new St(), It = (i = {}) => {
2129
2130
  className: `iw-p-4 iw-space-y-4 iw-pb-6 ${t} iw-min-h-[calc(100vh_-_3.8rem)] iw-flex iw-flex-col iw-justify-between`,
2130
2131
  children: [
2131
2132
  /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-items-start iw-justify-between iw-gap-3", children: /* @__PURE__ */ e.jsx("div", { className: "iw-flex-1", children: /* @__PURE__ */ e.jsx(
2132
- Ft,
2133
+ Ut,
2133
2134
  {
2134
2135
  question: i,
2135
- isLoading: r === _.FETCHING_QUESTION || r === _.IDLE
2136
+ isLoading: r === D.FETCHING_QUESTION || r === D.IDLE
2136
2137
  }
2137
2138
  ) }) }),
2138
2139
  /* @__PURE__ */ e.jsxs("div", { className: "iw iw-bg-[#F6F6F6] iw-grid iw-grid-cols-2 iw-rounded-[14px] iw-p-6", children: [
2139
- /* @__PURE__ */ e.jsx("div", { className: "iw-min-h-[400px] iw-max-h-[600px]", children: /* @__PURE__ */ e.jsx(Pt, {}) }),
2140
+ /* @__PURE__ */ e.jsx("div", { className: "iw-min-h-[400px] iw-max-h-[600px]", children: /* @__PURE__ */ e.jsx(Ot, {}) }),
2140
2141
  /* @__PURE__ */ e.jsx("div", { className: "iw-bg-white iw-rounded-r-xl iw-shadow iw-p-6", children: s })
2141
2142
  ] })
2142
2143
  ]
2143
2144
  }
2144
- ), Oe = ({
2145
+ ), qe = ({
2145
2146
  isOpen: i,
2146
2147
  onClose: r,
2147
2148
  children: t,
@@ -2160,14 +2161,14 @@ const we = new St(), It = (i = {}) => {
2160
2161
  }, [i, a, r]), C(() => (i ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2161
2162
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2162
2163
  }), [i]), !i) return null;
2163
- const d = (u) => {
2164
+ const w = (u) => {
2164
2165
  o && u.target === u.currentTarget && r();
2165
- }, c = /* @__PURE__ */ e.jsxs("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center", children: [
2166
+ }, d = /* @__PURE__ */ e.jsxs("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center", children: [
2166
2167
  /* @__PURE__ */ e.jsx(
2167
2168
  "div",
2168
2169
  {
2169
2170
  className: "iw-fixed iw-inset-0 iw-bg-black iw-bg-opacity-50 iw-transition-opacity",
2170
- onClick: d
2171
+ onClick: w
2171
2172
  }
2172
2173
  ),
2173
2174
  /* @__PURE__ */ e.jsxs(
@@ -2219,13 +2220,13 @@ const we = new St(), It = (i = {}) => {
2219
2220
  }
2220
2221
  )
2221
2222
  ] });
2222
- return Be(c, document.body);
2223
- }, Lt = ({
2223
+ return ze(d, document.body);
2224
+ }, qt = ({
2224
2225
  confirmExitInterview: i,
2225
2226
  isOpen: r,
2226
2227
  onClose: t
2227
2228
  }) => /* @__PURE__ */ e.jsx(
2228
- Oe,
2229
+ qe,
2229
2230
  {
2230
2231
  isOpen: r,
2231
2232
  onClose: t,
@@ -2263,8 +2264,8 @@ const we = new St(), It = (i = {}) => {
2263
2264
  ] })
2264
2265
  ] })
2265
2266
  }
2266
- ), ke = ({ title: i, onExit: r }) => {
2267
- const { baseColor: t } = Z(), [s, n] = k(!1);
2267
+ ), Te = ({ title: i, onExit: r }) => {
2268
+ const { baseColor: t } = te(), [s, n] = k(!1);
2268
2269
  return /* @__PURE__ */ e.jsxs("header", { className: "iw-w-full iw-text-gray-900", children: [
2269
2270
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mx-auto iw-flex iw-items-center iw-justify-between iw-px-4 iw-pb-4 iw-pt-2", children: [
2270
2271
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-space-x-2", children: [
@@ -2293,7 +2294,7 @@ const we = new St(), It = (i = {}) => {
2293
2294
  ] }),
2294
2295
  /* @__PURE__ */ e.jsx("div", { className: "iw-h-px iw-bg-gray-200" }),
2295
2296
  /* @__PURE__ */ e.jsx(
2296
- Lt,
2297
+ qt,
2297
2298
  {
2298
2299
  isOpen: s,
2299
2300
  confirmExitInterview: () => {
@@ -2303,7 +2304,7 @@ const we = new St(), It = (i = {}) => {
2303
2304
  }
2304
2305
  )
2305
2306
  ] });
2306
- }, $t = ({
2307
+ }, Bt = ({
2307
2308
  className: i = "",
2308
2309
  width: r,
2309
2310
  height: t = 56,
@@ -2312,80 +2313,80 @@ const we = new St(), It = (i = {}) => {
2312
2313
  fftSize: o = 1024,
2313
2314
  smoothingTimeConstant: a = 0.8,
2314
2315
  mediaStream: l,
2315
- startOnMount: d = !0
2316
+ startOnMount: w = !0
2316
2317
  }) => {
2317
- const { baseColor: c } = Z(), u = T(null), h = T(null), m = T(null), w = T(null), f = T(null), v = T(null), j = T(!1), [x, E] = k(null);
2318
+ const { baseColor: d } = te(), u = E(null), h = E(null), m = E(null), c = E(null), x = E(null), b = E(null), j = E(!1), [g, v] = k(null);
2318
2319
  C(() => {
2319
2320
  if (r || !h.current) return;
2320
- const y = h.current, P = () => {
2321
- const D = u.current;
2322
- if (!D) return;
2323
- const A = y.clientWidth, g = t;
2324
- D.width = Math.max(1, Math.floor(A * window.devicePixelRatio || 1)), D.height = Math.max(1, Math.floor(g * window.devicePixelRatio || 1));
2325
- }, b = new ResizeObserver(P);
2326
- return b.observe(y), P(), () => b.disconnect();
2321
+ const N = h.current, P = () => {
2322
+ const R = u.current;
2323
+ if (!R) return;
2324
+ const A = N.clientWidth, f = t;
2325
+ R.width = Math.max(1, Math.floor(A * window.devicePixelRatio || 1)), R.height = Math.max(1, Math.floor(f * window.devicePixelRatio || 1));
2326
+ }, y = new ResizeObserver(P);
2327
+ return y.observe(N), P(), () => y.disconnect();
2327
2328
  }, [r, t]), C(() => {
2328
2329
  if (!r) return;
2329
- const y = u.current;
2330
- y && (y.width = Math.max(
2330
+ const N = u.current;
2331
+ N && (N.width = Math.max(
2331
2332
  1,
2332
2333
  Math.floor(r * (window.devicePixelRatio || 1))
2333
- ), y.height = Math.max(
2334
+ ), N.height = Math.max(
2334
2335
  1,
2335
2336
  Math.floor(t * (window.devicePixelRatio || 1))
2336
2337
  ));
2337
2338
  }, [r, t]), C(() => {
2338
- let y = !1;
2339
+ let N = !1;
2339
2340
  return (async () => {
2340
2341
  try {
2341
- const b = new (window.AudioContext || window.webkitAudioContext)();
2342
- m.current = b;
2343
- let D = l;
2344
- if (!D) {
2345
- if (!d) return;
2346
- D = await navigator.mediaDevices.getUserMedia({
2342
+ const y = new (window.AudioContext || window.webkitAudioContext)();
2343
+ m.current = y;
2344
+ let R = l;
2345
+ if (!R) {
2346
+ if (!w) return;
2347
+ R = await navigator.mediaDevices.getUserMedia({
2347
2348
  audio: !0,
2348
2349
  video: !1
2349
2350
  }), j.current = !0;
2350
2351
  }
2351
- if (y) return;
2352
- const A = b.createAnalyser();
2353
- A.fftSize = o, A.smoothingTimeConstant = a, w.current = A;
2354
- const g = b.createMediaStreamSource(D);
2355
- f.current = g, g.connect(A), S();
2356
- } catch (b) {
2357
- E((b == null ? void 0 : b.message) || "Failed to initialize microphone");
2352
+ if (N) return;
2353
+ const A = y.createAnalyser();
2354
+ A.fftSize = o, A.smoothingTimeConstant = a, c.current = A;
2355
+ const f = y.createMediaStreamSource(R);
2356
+ x.current = f, f.connect(A), S();
2357
+ } catch (y) {
2358
+ v((y == null ? void 0 : y.message) || "Failed to initialize microphone");
2358
2359
  }
2359
2360
  })(), () => {
2360
- var b, D, A, g;
2361
- y = !0, v.current && cancelAnimationFrame(v.current);
2361
+ var y, R, A, f;
2362
+ N = !0, b.current && cancelAnimationFrame(b.current);
2362
2363
  try {
2363
- (b = f.current) == null || b.disconnect();
2364
+ (y = x.current) == null || y.disconnect();
2364
2365
  } catch {
2365
2366
  }
2366
2367
  try {
2367
- (D = w.current) == null || D.disconnect();
2368
+ (R = c.current) == null || R.disconnect();
2368
2369
  } catch {
2369
2370
  }
2370
- j.current && ((g = ((A = f.current) == null ? void 0 : A.mediaStream) || void 0) == null || g.getTracks().forEach((I) => I.stop())), m.current && m.current.state !== "closed" && m.current.close();
2371
+ j.current && ((f = ((A = x.current) == null ? void 0 : A.mediaStream) || void 0) == null || f.getTracks().forEach((M) => M.stop())), m.current && m.current.state !== "closed" && m.current.close();
2371
2372
  };
2372
- }, [l, o, a, d]);
2373
+ }, [l, o, a, w]);
2373
2374
  const S = () => {
2374
- const y = u.current, P = w.current;
2375
- if (!y || !P) return;
2376
- const b = y.getContext("2d");
2377
- if (!b) return;
2378
- const D = window.devicePixelRatio || 1, A = y.width, g = y.height, I = P.frequencyBinCount, L = new Uint8Array(I), B = () => {
2379
- v.current = requestAnimationFrame(B), P.getByteTimeDomainData(L), b.clearRect(0, 0, A, g), b.fillStyle = "rgba(0,0,0,0)", b.fillRect(0, 0, A, g);
2380
- const q = Math.max(1, Math.floor(s * D)), z = Math.max(1, Math.floor(n * D)), H = q + z, O = Math.max(8, Math.floor((A + z) / H)), G = Math.floor(L.length / O);
2381
- for (let M = 0; M < O; M++) {
2382
- const Y = Math.min(L.length - 1, M * G), oe = L[Y] / 128 - 1, W = Math.abs(oe), le = Math.pow(W, 0.6), Q = Math.max(g * 0.06, le * (g * 0.9)), ce = M * H, de = (g - Q) / 2, K = 140 - Math.min(140, 140 * W), ee = 85, p = 48 + Math.floor(12 * (1 - W));
2383
- b.fillStyle = `${c}`, b.shadowColor = `hsla(${K}, ${ee}%, ${p}%, ${0.25 * W})`, b.shadowBlur = 8 * W;
2384
- const U = Math.min(q / 2, Q / 2);
2385
- Ot(b, ce, de, q, Q, U), b.fill();
2375
+ const N = u.current, P = c.current;
2376
+ if (!N || !P) return;
2377
+ const y = N.getContext("2d");
2378
+ if (!y) return;
2379
+ const R = window.devicePixelRatio || 1, A = N.width, f = N.height, M = P.frequencyBinCount, L = new Uint8Array(M), O = () => {
2380
+ b.current = requestAnimationFrame(O), P.getByteTimeDomainData(L), y.clearRect(0, 0, A, f), y.fillStyle = "rgba(0,0,0,0)", y.fillRect(0, 0, A, f);
2381
+ const q = Math.max(1, Math.floor(s * R)), z = Math.max(1, Math.floor(n * R)), H = q + z, Y = Math.max(8, Math.floor((A + z) / H)), B = Math.floor(L.length / Y);
2382
+ for (let U = 0; U < Y; U++) {
2383
+ const _ = Math.min(L.length - 1, U * B), Q = L[_] / 128 - 1, W = Math.abs(Q), ce = Math.pow(W, 0.6), K = Math.max(f * 0.06, ce * (f * 0.9)), de = U * H, we = (f - K) / 2, ue = 140 - Math.min(140, 140 * W), J = 85, ie = 48 + Math.floor(12 * (1 - W));
2384
+ y.fillStyle = `${d}`, y.shadowColor = `hsla(${ue}, ${J}%, ${ie}%, ${0.25 * W})`, y.shadowBlur = 8 * W;
2385
+ const p = Math.min(q / 2, K / 2);
2386
+ Wt(y, de, we, q, K, p), y.fill();
2386
2387
  }
2387
2388
  };
2388
- B();
2389
+ O();
2389
2390
  };
2390
2391
  return /* @__PURE__ */ e.jsxs(
2391
2392
  "div",
@@ -2395,16 +2396,16 @@ const we = new St(), It = (i = {}) => {
2395
2396
  style: { height: t },
2396
2397
  children: [
2397
2398
  /* @__PURE__ */ e.jsx("canvas", { ref: u, className: "iw-w-full iw-h-full" }),
2398
- x && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center", children: /* @__PURE__ */ e.jsx("span", { className: "iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded", children: x }) })
2399
+ g && /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center", children: /* @__PURE__ */ e.jsx("span", { className: "iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded", children: g }) })
2399
2400
  ]
2400
2401
  }
2401
2402
  );
2402
2403
  };
2403
- function Ot(i, r, t, s, n, o) {
2404
+ function Wt(i, r, t, s, n, o) {
2404
2405
  const a = Math.min(o, s / 2, n / 2);
2405
2406
  i.beginPath(), i.moveTo(r + a, t), i.lineTo(r + s - a, t), i.quadraticCurveTo(r + s, t, r + s, t + a), i.lineTo(r + s, t + n - a), i.quadraticCurveTo(r + s, t + n, r + s - a, t + n), i.lineTo(r + a, t + n), i.quadraticCurveTo(r, t + n, r, t + n - a), i.lineTo(r, t + a), i.quadraticCurveTo(r, t, r + a, t), i.closePath();
2406
2407
  }
2407
- const Ut = ({
2408
+ const Gt = ({
2408
2409
  state: i,
2409
2410
  answeringTime: r,
2410
2411
  nextPhase: t,
@@ -2415,11 +2416,11 @@ const Ut = ({
2415
2416
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "You may start speaking now. We're listening...." }),
2416
2417
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
2417
2418
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
2418
- /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
2419
+ /* @__PURE__ */ e.jsx(ve, { className: "iw-size-4 iw-text-orange-600" }),
2419
2420
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to talk: " })
2420
2421
  ] }),
2421
2422
  /* @__PURE__ */ e.jsx(
2422
- be,
2423
+ je,
2423
2424
  {
2424
2425
  total: r,
2425
2426
  remaining: i.currentPhaseTimeRemaining,
@@ -2432,7 +2433,7 @@ const Ut = ({
2432
2433
  /* @__PURE__ */ e.jsx("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." })
2433
2434
  ] }),
2434
2435
  /* @__PURE__ */ e.jsxs("div", { children: [
2435
- /* @__PURE__ */ e.jsx($t, {}),
2436
+ /* @__PURE__ */ e.jsx(Bt, {}),
2436
2437
  s && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2437
2438
  "Recording error: ",
2438
2439
  s.message
@@ -2448,8 +2449,8 @@ const Ut = ({
2448
2449
  }
2449
2450
  ) })
2450
2451
  ] });
2451
- function qt() {
2452
- const [i, r] = k(!0), t = X(
2452
+ function Vt() {
2453
+ const [i, r] = k(!0), t = ee(
2453
2454
  () => [0, 1, 2].map((s) => ({ id: s })),
2454
2455
  []
2455
2456
  );
@@ -2460,7 +2461,7 @@ function qt() {
2460
2461
  return () => clearInterval(s);
2461
2462
  }, []), /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full", children: [
2462
2463
  /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-w-80 iw-h-48 ", "aria-hidden": !0, children: t.map((s, n) => {
2463
- const o = n * 50, a = i ? o : o + 12, l = i ? 1 : 0.08, d = n * 140;
2464
+ const o = n * 50, a = i ? o : o + 12, l = i ? 1 : 0.08, w = n * 140;
2464
2465
  return /* @__PURE__ */ e.jsx(
2465
2466
  "div",
2466
2467
  {
@@ -2470,7 +2471,7 @@ function qt() {
2470
2471
  top: 0,
2471
2472
  transform: `translateY(${a}px)`,
2472
2473
  opacity: l,
2473
- transition: `transform 600ms cubic-bezier(.2,.9,.3,1) ${d}ms, opacity 400ms ease ${d}ms`
2474
+ transition: `transform 600ms cubic-bezier(.2,.9,.3,1) ${w}ms, opacity 400ms ease ${w}ms`
2474
2475
  },
2475
2476
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-gap-3 iw-items-center", children: [
2476
2477
  /* @__PURE__ */ e.jsx("div", { className: "iw-w-10 iw-h-10 iw-bg-gray-300 iw-rounded iw-flex-shrink-0" }),
@@ -2486,7 +2487,7 @@ function qt() {
2486
2487
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-center", children: /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-500 iw-font-medium", children: "Preparing your question..." }) })
2487
2488
  ] });
2488
2489
  }
2489
- const Bt = ({
2490
+ const zt = ({
2490
2491
  size: i = "192px",
2491
2492
  className: r,
2492
2493
  colors: t,
@@ -2500,7 +2501,7 @@ const Bt = ({
2500
2501
  // Pastel blue
2501
2502
  c3: "oklch(78% 0.14 280)"
2502
2503
  // Pastel purple/lavender
2503
- }, ...t }, a = parseInt(i.replace("px", ""), 10), l = a < 50 ? Math.max(a * 8e-3, 1) : Math.max(a * 0.015, 4), d = a < 50 ? Math.max(a * 4e-3, 1.2) : Math.max(a * 8e-3, 1.5), c = a < 50 ? Math.max(a * 4e-3, 0.05) : Math.max(a * 8e-3, 0.1), u = a < 50 ? Math.max(a * 4e-3, 0.5) : Math.max(a * 8e-3, 2), h = a < 30 ? "0%" : a < 50 ? "5%" : a < 100 ? "15%" : "25%", m = a < 30 ? 1.1 : a < 50 ? Math.max(d * 1.2, 1.3) : d;
2504
+ }, ...t }, a = parseInt(i.replace("px", ""), 10), l = a < 50 ? Math.max(a * 8e-3, 1) : Math.max(a * 0.015, 4), w = a < 50 ? Math.max(a * 4e-3, 1.2) : Math.max(a * 8e-3, 1.5), d = a < 50 ? Math.max(a * 4e-3, 0.05) : Math.max(a * 8e-3, 0.1), u = a < 50 ? Math.max(a * 4e-3, 0.5) : Math.max(a * 8e-3, 2), h = a < 30 ? "0%" : a < 50 ? "5%" : a < 100 ? "15%" : "25%", m = a < 30 ? 1.1 : a < 50 ? Math.max(w * 1.2, 1.3) : w;
2504
2505
  return /* @__PURE__ */ e.jsx(
2505
2506
  "div",
2506
2507
  {
@@ -2515,7 +2516,7 @@ const Bt = ({
2515
2516
  "--animation-duration": `${s}s`,
2516
2517
  "--blur-amount": `${l}px`,
2517
2518
  "--contrast-amount": m,
2518
- "--dot-size": `${c}px`,
2519
+ "--dot-size": `${d}px`,
2519
2520
  "--shadow-spread": `${u}px`,
2520
2521
  "--mask-radius": h
2521
2522
  },
@@ -2628,9 +2629,9 @@ const Bt = ({
2628
2629
  }
2629
2630
  );
2630
2631
  };
2631
- function Wt({ ttsError: i }) {
2632
+ function Ht({ ttsError: i }) {
2632
2633
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full", children: [
2633
- /* @__PURE__ */ e.jsx(Bt, { size: "80px" }),
2634
+ /* @__PURE__ */ e.jsx(zt, { size: "80px" }),
2634
2635
  i && /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-2 iw-text-xs iw-text-red-600", children: [
2635
2636
  "Audio playback failed: ",
2636
2637
  i.message
@@ -2638,18 +2639,18 @@ function Wt({ ttsError: i }) {
2638
2639
  /* @__PURE__ */ e.jsx("p", { className: "iw-text- iw-text-gray-700", children: "Your AI interviewer is speaking..." })
2639
2640
  ] });
2640
2641
  }
2641
- const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
2642
+ const Yt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ", children: [
2642
2643
  /* @__PURE__ */ e.jsxs("div", { children: [
2643
2644
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Get Ready to Answer" }),
2644
2645
  /* @__PURE__ */ e.jsx("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." })
2645
2646
  ] }),
2646
2647
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-justify-center iw-gap-2", children: [
2647
2648
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-1", children: [
2648
- /* @__PURE__ */ e.jsx(pe, { className: "iw-size-4 iw-text-orange-600" }),
2649
+ /* @__PURE__ */ e.jsx(ve, { className: "iw-size-4 iw-text-orange-600" }),
2649
2650
  /* @__PURE__ */ e.jsx("p", { className: "iw-text-gray-700 iw-text-sm", children: "Time to think: " })
2650
2651
  ] }),
2651
2652
  /* @__PURE__ */ e.jsx(
2652
- be,
2653
+ je,
2653
2654
  {
2654
2655
  total: r,
2655
2656
  remaining: i.currentPhaseTimeRemaining,
@@ -2667,7 +2668,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2667
2668
  children: "Start Answering"
2668
2669
  }
2669
2670
  ) })
2670
- ] }), Vt = ({ sttError: i }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2671
+ ] }), Qt = ({ sttError: i }) => /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full", children: [
2671
2672
  /* @__PURE__ */ e.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 60 60", fill: "none", children: [
2672
2673
  /* @__PURE__ */ e.jsx(
2673
2674
  "rect",
@@ -2708,7 +2709,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2708
2709
  i.message,
2709
2710
  i.recoverable && " (attempting to continue)"
2710
2711
  ] })
2711
- ] }), ie = (i) => /* @__PURE__ */ e.jsxs(
2712
+ ] }), se = (i) => /* @__PURE__ */ e.jsxs(
2712
2713
  "svg",
2713
2714
  {
2714
2715
  xmlns: "http://www.w3.org/2000/svg",
@@ -2727,7 +2728,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2727
2728
  /* @__PURE__ */ e.jsx("path", { d: "M12 17h.01" })
2728
2729
  ]
2729
2730
  }
2730
- ), zt = (i) => /* @__PURE__ */ e.jsxs(
2731
+ ), Kt = (i) => /* @__PURE__ */ e.jsxs(
2731
2732
  "svg",
2732
2733
  {
2733
2734
  xmlns: "http://www.w3.org/2000/svg",
@@ -2745,7 +2746,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2745
2746
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
2746
2747
  ]
2747
2748
  }
2748
- ), Ht = (i) => /* @__PURE__ */ e.jsxs(
2749
+ ), Jt = (i) => /* @__PURE__ */ e.jsxs(
2749
2750
  "svg",
2750
2751
  {
2751
2752
  xmlns: "http://www.w3.org/2000/svg",
@@ -2763,7 +2764,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2763
2764
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "3" })
2764
2765
  ]
2765
2766
  }
2766
- ), Yt = (i) => /* @__PURE__ */ e.jsxs(
2767
+ ), Xt = (i) => /* @__PURE__ */ e.jsxs(
2767
2768
  "svg",
2768
2769
  {
2769
2770
  xmlns: "http://www.w3.org/2000/svg",
@@ -2784,7 +2785,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2784
2785
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2785
2786
  ]
2786
2787
  }
2787
- ), ue = (i) => /* @__PURE__ */ e.jsxs(
2788
+ ), ge = (i) => /* @__PURE__ */ e.jsxs(
2788
2789
  "svg",
2789
2790
  {
2790
2791
  xmlns: "http://www.w3.org/2000/svg",
@@ -2805,7 +2806,7 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2805
2806
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2806
2807
  ]
2807
2808
  }
2808
- ), Qt = (i) => /* @__PURE__ */ e.jsxs(
2809
+ ), Zt = (i) => /* @__PURE__ */ e.jsxs(
2809
2810
  "svg",
2810
2811
  {
2811
2812
  xmlns: "http://www.w3.org/2000/svg",
@@ -2826,21 +2827,21 @@ const Gt = ({ state: i, thinkingTime: r, nextPhase: t }) => /* @__PURE__ */ e.js
2826
2827
  /* @__PURE__ */ e.jsx("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })
2827
2828
  ]
2828
2829
  }
2829
- ), te = 5;
2830
- function Kt({
2830
+ ), re = 5;
2831
+ function ei({
2831
2832
  isOpen: i,
2832
2833
  onClose: r,
2833
2834
  warningCount: t,
2834
2835
  violationType: s,
2835
2836
  onDisqualify: n
2836
2837
  }) {
2837
- const [o, a] = k(10), l = T(r);
2838
+ const [o, a] = k(10), l = E(r);
2838
2839
  if (C(() => {
2839
2840
  l.current = r;
2840
2841
  }, [r]), C(() => {
2841
2842
  if (!i) return;
2842
2843
  const m = setInterval(() => {
2843
- a((w) => w <= 1 ? (l.current(), 10) : w - 1);
2844
+ a((c) => c <= 1 ? (l.current(), 10) : c - 1);
2844
2845
  }, 1e3);
2845
2846
  return () => clearInterval(m);
2846
2847
  }, [i]), C(() => {
@@ -2848,80 +2849,80 @@ function Kt({
2848
2849
  }, [i]), C(() => (i ? (document.body.style.overflow = "hidden", document.body.classList.add("interview-widget-container")) : (document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container")), () => {
2849
2850
  document.body.style.overflow = "unset", document.body.classList.remove("interview-widget-container");
2850
2851
  }), [i]), !i) return null;
2851
- const c = (() => {
2852
+ const d = (() => {
2852
2853
  switch (s) {
2853
2854
  case "tab_switch":
2854
2855
  return {
2855
2856
  title: "Tab Switch Detected",
2856
2857
  description: "You attempted to switch to another tab or reload application.",
2857
- icon: /* @__PURE__ */ e.jsx(Ht, { className: "iw-h-5 iw-w-5" })
2858
+ icon: /* @__PURE__ */ e.jsx(Jt, { className: "iw-h-5 iw-w-5" })
2858
2859
  };
2859
2860
  case "fullscreen_exit":
2860
2861
  return {
2861
2862
  title: "Full Screen Exit Detected",
2862
2863
  description: "You attempted to exit full screen mode.",
2863
- icon: /* @__PURE__ */ e.jsx($e, { className: "iw-h-5 iw-w-5" })
2864
+ icon: /* @__PURE__ */ e.jsx(Ue, { className: "iw-h-5 iw-w-5" })
2864
2865
  };
2865
2866
  case "focus_loss":
2866
2867
  return {
2867
2868
  title: "Focus Loss Detected",
2868
2869
  description: "You lost focus from the interview window.",
2869
- icon: /* @__PURE__ */ e.jsx(Yt, { className: "iw-h-5 iw-w-5" })
2870
+ icon: /* @__PURE__ */ e.jsx(Xt, { className: "iw-h-5 iw-w-5" })
2870
2871
  };
2871
2872
  case "blocked_shortcut":
2872
2873
  return {
2873
2874
  title: "Keyboard Shortcut Blocked",
2874
2875
  description: "You attempted to use a blocked keyboard shortcut.",
2875
- icon: /* @__PURE__ */ e.jsx(ue, { className: "iw-h-5 iw-w-5" })
2876
+ icon: /* @__PURE__ */ e.jsx(ge, { className: "iw-h-5 iw-w-5" })
2876
2877
  };
2877
2878
  case "right_click_attempt":
2878
2879
  return {
2879
2880
  title: "Right Click Attempted",
2880
2881
  description: "You attempted to use the right click.",
2881
- icon: /* @__PURE__ */ e.jsx(Qt, { className: "iw-h-5 iw-w-5" })
2882
+ icon: /* @__PURE__ */ e.jsx(Zt, { className: "iw-h-5 iw-w-5" })
2882
2883
  };
2883
2884
  case "alt_tab_attempt":
2884
2885
  return {
2885
2886
  title: "Alt + Tab Attempted",
2886
2887
  description: "You attempted to use the Alt + Tab shortcut.",
2887
- icon: /* @__PURE__ */ e.jsx(ue, { className: "iw-h-5 iw-w-5" })
2888
+ icon: /* @__PURE__ */ e.jsx(ge, { className: "iw-h-5 iw-w-5" })
2888
2889
  };
2889
2890
  case "blocked_function_key":
2890
2891
  return {
2891
2892
  title: "Function Key Blocked",
2892
2893
  description: "You attempted to use a blocked function key.",
2893
- icon: /* @__PURE__ */ e.jsx(ue, { className: "iw-h-5 iw-w-5" })
2894
+ icon: /* @__PURE__ */ e.jsx(ge, { className: "iw-h-5 iw-w-5" })
2894
2895
  };
2895
2896
  default:
2896
2897
  return {
2897
2898
  title: "Violation Detected",
2898
2899
  description: "You attempted to perform an action that is not allowed.",
2899
- icon: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-5 iw-w-5" })
2900
+ icon: /* @__PURE__ */ e.jsx(se, { className: "iw-h-5 iw-w-5" })
2900
2901
  };
2901
2902
  }
2902
- })(), u = te - t, h = () => {
2903
- t + 1 > te ? n() : r();
2903
+ })(), u = re - t, h = () => {
2904
+ t + 1 > re ? n() : r();
2904
2905
  };
2905
2906
  return /* @__PURE__ */ e.jsx("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl", children: [
2906
2907
  /* @__PURE__ */ e.jsxs("div", { className: "iw-p-6 iw-pb-0", children: [
2907
2908
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mb-6 iw-flex iw-items-start iw-gap-4", children: [
2908
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50", children: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-6 iw-w-6 iw-text-red-500" }) }),
2909
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50", children: /* @__PURE__ */ e.jsx(se, { className: "iw-h-6 iw-w-6 iw-text-red-500" }) }),
2909
2910
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
2910
2911
  /* @__PURE__ */ e.jsx("h2", { className: "iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900", children: "Security Violation" }),
2911
2912
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-2", children: [
2912
2913
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-sm iw-text-gray-500", children: "Warning" }),
2913
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-gap-1", children: Array.from({ length: te }).map((m, w) => /* @__PURE__ */ e.jsx(
2914
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-gap-1", children: Array.from({ length: re }).map((m, c) => /* @__PURE__ */ e.jsx(
2914
2915
  "div",
2915
2916
  {
2916
- className: `iw-h-2 iw-w-2 iw-rounded-full ${w <= t - 1 ? "iw-bg-red-500" : "iw-bg-gray-200"}`
2917
+ className: `iw-h-2 iw-w-2 iw-rounded-full ${c <= t - 1 ? "iw-bg-red-500" : "iw-bg-gray-200"}`
2917
2918
  },
2918
- w
2919
+ c
2919
2920
  )) }),
2920
2921
  /* @__PURE__ */ e.jsxs("span", { className: "iw-text-sm iw-text-gray-500", children: [
2921
2922
  "(",
2922
2923
  t,
2923
2924
  "/",
2924
- te,
2925
+ re,
2925
2926
  ")"
2926
2927
  ] })
2927
2928
  ] })
@@ -2936,12 +2937,12 @@ function Kt({
2936
2937
  borderColor: "rgb(254, 226, 226)"
2937
2938
  },
2938
2939
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-start iw-gap-4", children: [
2939
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm", children: c.icon }),
2940
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm", children: d.icon }),
2940
2941
  /* @__PURE__ */ e.jsxs("div", { className: "iw-flex-1", children: [
2941
- /* @__PURE__ */ e.jsx("h3", { className: "iw-mb-2 iw-font-semibold iw-text-gray-900", children: c.title }),
2942
- /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-leading-relaxed iw-text-gray-700", children: c.description }),
2942
+ /* @__PURE__ */ e.jsx("h3", { className: "iw-mb-2 iw-font-semibold iw-text-gray-900", children: d.title }),
2943
+ /* @__PURE__ */ e.jsx("p", { className: "iw-text-sm iw-leading-relaxed iw-text-gray-700", children: d.description }),
2943
2944
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600", children: [
2944
- /* @__PURE__ */ e.jsx(Le, { className: "iw-h-3 iw-w-3" }),
2945
+ /* @__PURE__ */ e.jsx(Oe, { className: "iw-h-3 iw-w-3" }),
2945
2946
  /* @__PURE__ */ e.jsx("span", { children: "This action is monitored for interview integrity" })
2946
2947
  ] })
2947
2948
  ] })
@@ -2955,7 +2956,7 @@ function Kt({
2955
2956
  ] }) }),
2956
2957
  /* @__PURE__ */ e.jsx("div", { className: "iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-text-center", children: [
2957
2958
  /* @__PURE__ */ e.jsxs("div", { className: "iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5", children: [
2958
- /* @__PURE__ */ e.jsx(zt, { className: "iw-text-primary-600 iw-h-4 iw-w-4" }),
2959
+ /* @__PURE__ */ e.jsx(Kt, { className: "iw-text-primary-600 iw-h-4 iw-w-4" }),
2959
2960
  /* @__PURE__ */ e.jsx("span", { className: "iw-text-primary-600 iw-text-2xl iw-font-bold", children: o })
2960
2961
  ] }),
2961
2962
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-primary-700 iw-text-xs iw-font-medium", children: "Auto Close" })
@@ -2969,7 +2970,7 @@ function Kt({
2969
2970
  background: "linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"
2970
2971
  },
2971
2972
  children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-3", children: [
2972
- /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20", children: /* @__PURE__ */ e.jsx(ie, { className: "iw-h-4 iw-w-4" }) }),
2973
+ /* @__PURE__ */ e.jsx("div", { className: "iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20", children: /* @__PURE__ */ e.jsx(se, { className: "iw-h-4 iw-w-4" }) }),
2973
2974
  /* @__PURE__ */ e.jsxs("div", { children: [
2974
2975
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-sm iw-font-semibold", children: "Final Warning" }),
2975
2976
  /* @__PURE__ */ e.jsx("div", { className: "iw-text-xs iw-text-red-100", children: "Next violation will disqualify you from this interview" })
@@ -2991,7 +2992,7 @@ function Kt({
2991
2992
  ] })
2992
2993
  ] }) });
2993
2994
  }
2994
- const Jt = (i) => /* @__PURE__ */ e.jsxs(
2995
+ const ti = (i) => /* @__PURE__ */ e.jsxs(
2995
2996
  "svg",
2996
2997
  {
2997
2998
  xmlns: "http://www.w3.org/2000/svg",
@@ -3009,7 +3010,7 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3009
3010
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" })
3010
3011
  ]
3011
3012
  }
3012
- ), Xt = ({
3013
+ ), ii = ({
3013
3014
  showHardReloadWarning: i,
3014
3015
  onContinue: r
3015
3016
  }) => {
@@ -3017,7 +3018,7 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3017
3018
  r();
3018
3019
  };
3019
3020
  return /* @__PURE__ */ e.jsxs(
3020
- Oe,
3021
+ qe,
3021
3022
  {
3022
3023
  isOpen: i,
3023
3024
  onClose: t,
@@ -3028,7 +3029,7 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3028
3029
  children: [
3029
3030
  /* @__PURE__ */ e.jsx("div", { className: "iw-absolute iw-inset-x-0 iw-top-0 iw-h-1 iw-bg-gradient-to-r iw-from-red-500 iw-to-red-600" }),
3030
3031
  /* @__PURE__ */ e.jsx("div", { className: "iw-space-y-1 iw-pb-2 iw-pt-3", children: /* @__PURE__ */ e.jsxs("div", { className: "iw-flex iw-items-center iw-gap-2", children: [
3031
- /* @__PURE__ */ e.jsx(ie, { className: "iw-w-5 iw-h-5 iw-text-red-500" }),
3032
+ /* @__PURE__ */ e.jsx(se, { className: "iw-w-5 iw-h-5 iw-text-red-500" }),
3032
3033
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-xl iw-font-semibold iw-text-red-500", children: "Full Screen Exit Detected" })
3033
3034
  ] }) }),
3034
3035
  /* @__PURE__ */ e.jsx("div", { className: "iw-pt-4 iw-pb-6", children: /* @__PURE__ */ e.jsx("p", { className: "iw-text-center iw-text-sm iw-leading-relaxed iw-text-gray-500/90", children: "Exiting full screen mode or reloading this page during the session is strictly prohibited. Any attempt to do so will be recorded and may lead to penalties." }) }),
@@ -3038,7 +3039,7 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3038
3039
  onClick: t,
3039
3040
  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",
3040
3041
  children: [
3041
- /* @__PURE__ */ e.jsx(Jt, { className: "iw-size-4" }),
3042
+ /* @__PURE__ */ e.jsx(ti, { className: "iw-size-4" }),
3042
3043
  "Continue Session"
3043
3044
  ]
3044
3045
  }
@@ -3046,131 +3047,146 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3046
3047
  ]
3047
3048
  }
3048
3049
  );
3049
- }, Zt = ({ children: i, onDisqualify: r }) => {
3050
- const [t, s] = k(!1), [n, o] = k(!1), [a, l] = k("fullscreen_exit"), { logViolation: d, violationCount: c } = Rt({
3051
- maxViolations: 5,
3052
- onViolation: (f) => {
3053
- n || (s(!0), l(f.type));
3054
- }
3055
- }), { enterFullScreen: u, isFullScreen: h, exitFullScreen: m } = pt({
3056
- onFullScreenChange(f) {
3057
- !f && !n && (s(!0), d({
3058
- type: "fullscreen_exit",
3059
- severity: "high",
3060
- details: {
3061
- action: "fullscreen_exit",
3062
- reason: "Attempted to exit full screen mode"
3063
- }
3064
- }));
3065
- }
3066
- });
3067
- C(() => {
3068
- u();
3069
- }, []), Tt(d), Nt(d), Ct(), At();
3070
- const w = () => {
3071
- o(!0), m(), s(!1), r == null || r();
3072
- };
3073
- return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3074
- /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-h-full iw-w-full", children: i }),
3075
- /* @__PURE__ */ e.jsx(
3076
- Kt,
3077
- {
3078
- warningCount: c,
3079
- isOpen: t,
3080
- violationType: a,
3081
- onClose: () => {
3082
- s(!1), u();
3083
- },
3084
- onDisqualify: w
3050
+ }, ri = Ge(
3051
+ ({ children: i, onDisqualify: r }, t) => {
3052
+ const [s, n] = k(!1), [o, a] = k(!1), [l, w] = k(!1), [d, u] = k("fullscreen_exit"), { logViolation: h, violationCount: m } = Pt({
3053
+ maxViolations: 5,
3054
+ onViolation: (g) => {
3055
+ o || (n(!0), u(g.type));
3085
3056
  }
3086
- ),
3087
- !t && c > 0 && !n && /* @__PURE__ */ e.jsx(
3088
- Xt,
3089
- {
3090
- showHardReloadWarning: !h,
3091
- logViolation: d,
3092
- onContinue: u
3057
+ }), { enterFullScreen: c, isFullScreen: x, exitFullScreen: b } = jt({
3058
+ onFullScreenChange(g) {
3059
+ !g && !o && !l && (n(!0), h({
3060
+ type: "fullscreen_exit",
3061
+ severity: "high",
3062
+ details: {
3063
+ action: "fullscreen_exit",
3064
+ reason: "Attempted to exit full screen mode"
3065
+ }
3066
+ })), g && w(!1);
3093
3067
  }
3094
- )
3095
- ] });
3096
- }, ei = ({
3068
+ });
3069
+ C(() => {
3070
+ c();
3071
+ }, []), Ve(
3072
+ t,
3073
+ () => ({
3074
+ exitFullScreenIntentionally: async () => {
3075
+ w(!0), n(!1), a(!1);
3076
+ try {
3077
+ document.fullscreenElement && await document.exitFullscreen();
3078
+ } catch (g) {
3079
+ console.error("Failed to exit fullscreen:", g);
3080
+ }
3081
+ }
3082
+ }),
3083
+ []
3084
+ ), Rt(h), Ct(h), At(), _t();
3085
+ const j = () => {
3086
+ a(!0), b(), n(!1), r == null || r();
3087
+ };
3088
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3089
+ /* @__PURE__ */ e.jsx("div", { className: "iw-relative iw-h-full iw-w-full", children: i }),
3090
+ /* @__PURE__ */ e.jsx(
3091
+ ei,
3092
+ {
3093
+ warningCount: m,
3094
+ isOpen: s,
3095
+ violationType: d,
3096
+ onClose: () => {
3097
+ n(!1), c();
3098
+ },
3099
+ onDisqualify: j
3100
+ }
3101
+ ),
3102
+ !s && m > 0 && !o && !l && /* @__PURE__ */ e.jsx(
3103
+ ii,
3104
+ {
3105
+ showHardReloadWarning: !x,
3106
+ logViolation: h,
3107
+ onContinue: c
3108
+ }
3109
+ )
3110
+ ] });
3111
+ }
3112
+ ), si = ({
3097
3113
  interviewTitle: i,
3098
3114
  interviewId: r,
3099
3115
  onComplete: t,
3100
3116
  onDisqualify: s,
3101
3117
  className: n = ""
3102
3118
  }) => {
3103
- const o = jt(), { baseUrl: a, authToken: l } = Me(), { timers: d, stt: c, tts: u, proctoring: h } = rt(), [m, w] = k(null), [f, v] = k(""), j = T(""), x = T(null), E = {
3104
- thinkingTime: (d == null ? void 0 : d.thinkingDuration) || 30,
3105
- answeringTime: (d == null ? void 0 : d.answeringDuration) || 120,
3106
- editingTime: (d == null ? void 0 : d.editingDuration) || 30
3107
- }, { thinkingTime: S, answeringTime: y, editingTime: P } = E;
3119
+ const o = Tt(), { baseUrl: a, authToken: l } = Pe(), { timers: w, stt: d, tts: u, proctoring: h } = ot(), m = E(null), [c, x] = k(null), [b, j] = k(""), g = E(""), v = E(null), S = {
3120
+ thinkingTime: (w == null ? void 0 : w.thinkingDuration) || 30,
3121
+ answeringTime: (w == null ? void 0 : w.answeringDuration) || 120,
3122
+ editingTime: (w == null ? void 0 : w.editingDuration) || 30
3123
+ }, { thinkingTime: N, answeringTime: P, editingTime: y } = S;
3108
3124
  C(() => {
3109
- j.current = f;
3110
- }, [f]);
3111
- const b = T(!1), {
3112
- speak: D,
3113
- stop: A,
3114
- error: g
3115
- } = It({
3125
+ g.current = b;
3126
+ }, [b]);
3127
+ const R = E(!1), {
3128
+ speak: A,
3129
+ stop: f,
3130
+ error: M
3131
+ } = Dt({
3116
3132
  config: {
3117
3133
  baseUrl: a,
3118
3134
  provider: u == null ? void 0 : u.provider,
3119
3135
  authToken: l
3120
3136
  },
3121
3137
  onEnd: () => {
3122
- b.current = !1, M();
3138
+ R.current = !1, _();
3123
3139
  },
3124
3140
  onError: () => {
3125
- b.current || (b.current = !0, M());
3141
+ R.current || (R.current = !0, _());
3126
3142
  }
3127
- }), I = T(!1), L = T(!1), {
3128
- startRecording: B,
3129
- stopRecording: q,
3130
- transcribe: z,
3131
- error: H
3132
- } = Et({
3143
+ }), L = E(!1), O = E(!1), {
3144
+ startRecording: q,
3145
+ stopRecording: z,
3146
+ transcribe: H,
3147
+ error: Y
3148
+ } = It({
3133
3149
  config: {
3134
3150
  baseUrl: a,
3135
- provider: c == null ? void 0 : c.provider,
3136
- model: c == null ? void 0 : c.model,
3137
- language: c == null ? void 0 : c.language,
3151
+ provider: d == null ? void 0 : d.provider,
3152
+ model: d == null ? void 0 : d.model,
3153
+ language: d == null ? void 0 : d.language,
3138
3154
  authToken: l
3139
3155
  },
3140
3156
  onStart: () => {
3141
- I.current = !1, L.current = !1;
3157
+ L.current = !1, O.current = !1;
3142
3158
  },
3143
3159
  onStop: () => {
3144
3160
  },
3145
3161
  onTranscriptionComplete: (p) => {
3146
- v(p.transcript), L.current || (L.current = !0, M());
3162
+ j(p.transcript), O.current || (O.current = !0, _());
3147
3163
  },
3148
3164
  onError: (p) => {
3149
- console.error("STT Error:", p), I.current || (I.current = !0, M());
3165
+ console.error("STT Error:", p), L.current || (L.current = !0, _());
3150
3166
  }
3151
- }), { state: O, startQuestion: G, nextPhase: M, completeInterview: Y } = ft({
3167
+ }), { state: B, startQuestion: U, nextPhase: _, completeInterview: Q } = yt({
3152
3168
  config: {
3153
- thinkingDuration: S,
3154
- answeringDuration: y,
3155
- editingDuration: P
3169
+ thinkingDuration: N,
3170
+ answeringDuration: P,
3171
+ editingDuration: y
3156
3172
  },
3157
3173
  callbacks: {
3158
3174
  onPhaseChange: (p) => {
3159
3175
  switch (p) {
3160
- case _.FETCHING_QUESTION:
3161
- oe();
3176
+ case D.FETCHING_QUESTION:
3177
+ W();
3162
3178
  break;
3163
- case _.READING_QUESTION:
3164
- Q();
3179
+ case D.READING_QUESTION:
3180
+ de();
3165
3181
  break;
3166
- case _.ANSWERING:
3167
- ce();
3182
+ case D.ANSWERING:
3183
+ we();
3168
3184
  break;
3169
- case _.TRANSCRIBING:
3170
- de();
3185
+ case D.TRANSCRIBING:
3186
+ ue();
3171
3187
  break;
3172
- case _.SUBMITTING:
3173
- le();
3188
+ case D.SUBMITTING:
3189
+ K();
3174
3190
  break;
3175
3191
  }
3176
3192
  },
@@ -3180,169 +3196,171 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3180
3196
  }
3181
3197
  });
3182
3198
  C(() => {
3183
- G();
3199
+ U();
3184
3200
  }, []);
3185
- const { execute: oe, loading: W } = xt(
3201
+ const { execute: W, loading: ce } = vt(
3186
3202
  async () => {
3187
- var U, ye;
3203
+ var G, X;
3188
3204
  const p = await o.generateQuestion({
3189
3205
  interviewId: r,
3190
- question: ((U = x.current) == null ? void 0 : U.question) || "",
3191
- qnaId: ((ye = x.current) == null ? void 0 : ye.qna_id) || "",
3192
- answer: j.current
3206
+ question: ((G = v.current) == null ? void 0 : G.question) || "",
3207
+ qnaId: ((X = v.current) == null ? void 0 : X.qna_id) || "",
3208
+ answer: g.current
3193
3209
  });
3194
- return x.current = p.data, p;
3210
+ return v.current = p.data, p;
3195
3211
  },
3196
3212
  {
3197
3213
  onSuccess: async (p) => {
3198
- p && p.data && (v(""), w(p.data), M());
3214
+ p && p.data && (j(""), x(p.data), _());
3199
3215
  },
3200
3216
  onError: (p) => {
3201
3217
  console.error("Failed to fetch questions:", p);
3202
3218
  }
3203
3219
  }
3204
- ), le = N(async () => {
3205
- G();
3206
- }, [G]), Q = N(async () => {
3220
+ ), K = T(async () => {
3221
+ U();
3222
+ }, [U]), de = T(async () => {
3207
3223
  var p;
3208
- if ((p = x.current) != null && p.question)
3224
+ if ((p = v.current) != null && p.question)
3209
3225
  try {
3210
- b.current = !1, await D(x.current.question), x.current.is_interview_done && (await ot(2e3), Y());
3211
- } catch (U) {
3212
- console.error("Failed to speak question:", U);
3226
+ R.current = !1, await A(v.current.question), v.current.is_interview_done && (await wt(2e3), Q());
3227
+ } catch (G) {
3228
+ console.error("Failed to speak question:", G);
3213
3229
  }
3214
3230
  else
3215
- M();
3216
- }, [D, M, Y]), ce = N(async () => {
3231
+ _();
3232
+ }, [A, _, Q]), we = T(async () => {
3217
3233
  try {
3218
- await B(y);
3234
+ await q(P);
3219
3235
  } catch (p) {
3220
- console.error("Failed to start recording:", p), M();
3236
+ console.error("Failed to start recording:", p), _();
3221
3237
  }
3222
- }, [B, M]), de = N(async () => {
3238
+ }, [q, _]), ue = T(async () => {
3223
3239
  try {
3224
- const p = await q();
3225
- await z(p);
3240
+ const p = await z();
3241
+ await H(p);
3226
3242
  } catch (p) {
3227
- console.error("STT processing failed:", p), !I.current && !L.current && (I.current = !0, M());
3243
+ console.error("STT processing failed:", p), !L.current && !O.current && (L.current = !0, _());
3228
3244
  }
3229
- }, [q, z, M]), K = N(
3245
+ }, [z, H, _]), J = T(
3230
3246
  async (p) => {
3231
- A(), (await o.generateQuestion({
3247
+ var X;
3248
+ f(), await ((X = m.current) == null ? void 0 : X.exitFullScreenIntentionally()), (await o.generateQuestion({
3232
3249
  interviewId: r,
3233
3250
  isInterviewDone: !0
3234
- })).success && (p == null || p(), Y(), sessionStorage.removeItem(ge));
3251
+ })).success && (p == null || p(), Q(), sessionStorage.removeItem(pe));
3235
3252
  },
3236
- [r, A, o]
3237
- ), ee = () => {
3238
- const { phase: p } = O;
3253
+ [r, f, o]
3254
+ ), ie = () => {
3255
+ const { phase: p } = B;
3239
3256
  switch (p) {
3240
- case _.IDLE:
3257
+ case D.IDLE:
3241
3258
  return /* @__PURE__ */ e.jsxs("div", { className: "iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full", children: [
3242
3259
  /* @__PURE__ */ e.jsx("h3", { className: "iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1", children: "Ready to start the Interview?" }),
3243
3260
  /* @__PURE__ */ e.jsx("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.` }),
3244
- /* @__PURE__ */ e.jsx(V, { onClick: G, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
3261
+ /* @__PURE__ */ e.jsx(V, { onClick: U, className: "iw-mt-2 iw-w-40", children: "Start Interview" })
3245
3262
  ] });
3246
- case _.FETCHING_QUESTION:
3247
- return /* @__PURE__ */ e.jsx(qt, {});
3248
- case _.READING_QUESTION:
3249
- return /* @__PURE__ */ e.jsx(Wt, { ttsError: g });
3250
- case _.THINKING:
3263
+ case D.FETCHING_QUESTION:
3264
+ return /* @__PURE__ */ e.jsx(Vt, {});
3265
+ case D.READING_QUESTION:
3266
+ return /* @__PURE__ */ e.jsx(Ht, { ttsError: M });
3267
+ case D.THINKING:
3251
3268
  return /* @__PURE__ */ e.jsx(
3252
- Gt,
3269
+ Yt,
3253
3270
  {
3254
- state: O,
3255
- thinkingTime: S,
3256
- nextPhase: M
3271
+ state: B,
3272
+ thinkingTime: N,
3273
+ nextPhase: _
3257
3274
  }
3258
3275
  );
3259
- case _.ANSWERING:
3276
+ case D.ANSWERING:
3260
3277
  return /* @__PURE__ */ e.jsx(
3261
- Ut,
3278
+ Gt,
3262
3279
  {
3263
- state: O,
3264
- answeringTime: y,
3265
- nextPhase: M,
3266
- sttError: H
3280
+ state: B,
3281
+ answeringTime: P,
3282
+ nextPhase: _,
3283
+ sttError: Y
3267
3284
  }
3268
3285
  );
3269
- case _.TRANSCRIBING:
3270
- return /* @__PURE__ */ e.jsx(Vt, { sttError: H });
3271
- case _.EDITING:
3272
- case _.SUBMITTING:
3286
+ case D.TRANSCRIBING:
3287
+ return /* @__PURE__ */ e.jsx(Qt, { sttError: Y });
3288
+ case D.EDITING:
3289
+ case D.SUBMITTING:
3273
3290
  return /* @__PURE__ */ e.jsx("div", { className: "iw-space-y-4 iw-h-full", children: /* @__PURE__ */ e.jsx(
3274
- _t,
3291
+ $t,
3275
3292
  {
3276
- value: f,
3277
- onChange: (U) => v(U.target.value),
3278
- onSubmit: () => M(),
3279
- isSubmitDisabled: !f.trim() || W,
3280
- state: O,
3281
- editingTime: P
3293
+ value: b,
3294
+ onChange: (G) => j(G.target.value),
3295
+ onSubmit: () => _(),
3296
+ isSubmitDisabled: !b.trim() || ce,
3297
+ state: B,
3298
+ editingTime: y
3282
3299
  }
3283
3300
  ) });
3284
- case _.COMPLETED:
3301
+ case D.COMPLETED:
3285
3302
  return null;
3286
3303
  default:
3287
3304
  return null;
3288
3305
  }
3289
3306
  };
3290
3307
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: h != null && h.enabled ? /* @__PURE__ */ e.jsxs(
3291
- Zt,
3308
+ ri,
3292
3309
  {
3293
- onDisqualify: () => K(s),
3310
+ ref: m,
3311
+ onDisqualify: () => J(s),
3294
3312
  children: [
3295
3313
  /* @__PURE__ */ e.jsx(
3296
- ke,
3314
+ Te,
3297
3315
  {
3298
3316
  title: i,
3299
- onExit: () => K()
3317
+ onExit: () => J()
3300
3318
  }
3301
3319
  ),
3302
3320
  /* @__PURE__ */ e.jsx(
3303
- Ne,
3321
+ Ee,
3304
3322
  {
3305
- currentQuestion: m,
3306
- phase: O.phase,
3323
+ currentQuestion: c,
3324
+ phase: B.phase,
3307
3325
  className: n,
3308
- children: ee()
3326
+ children: ie()
3309
3327
  }
3310
3328
  )
3311
3329
  ]
3312
3330
  }
3313
3331
  ) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3314
3332
  /* @__PURE__ */ e.jsx(
3315
- ke,
3333
+ Te,
3316
3334
  {
3317
3335
  title: i,
3318
- onExit: () => K()
3336
+ onExit: () => J()
3319
3337
  }
3320
3338
  ),
3321
3339
  /* @__PURE__ */ e.jsx(
3322
- Ne,
3340
+ Ee,
3323
3341
  {
3324
- currentQuestion: m,
3325
- phase: O.phase,
3342
+ currentQuestion: c,
3343
+ phase: B.phase,
3326
3344
  className: n,
3327
- children: ee()
3345
+ children: ie()
3328
3346
  }
3329
3347
  )
3330
3348
  ] }) });
3331
- }, ti = ({
3349
+ }, ni = ({
3332
3350
  title: i,
3333
3351
  interviewId: r,
3334
3352
  onInterviewEnd: t,
3335
3353
  onInterviewDisqualify: s,
3336
3354
  className: n = ""
3337
3355
  }) => {
3338
- const [o, a] = he.useState(!1), [l, d] = he.useState(!0), c = T(null);
3356
+ const [o, a] = fe.useState(!1), [l, w] = fe.useState(!0), d = E(null);
3339
3357
  return o ? /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3340
3358
  "div",
3341
3359
  {
3342
- ref: c,
3360
+ ref: d,
3343
3361
  className: `iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${n}`,
3344
3362
  children: /* @__PURE__ */ e.jsx("div", { className: " iw-h-full iw-flex iw-flex-col", children: /* @__PURE__ */ e.jsx(
3345
- ei,
3363
+ si,
3346
3364
  {
3347
3365
  interviewTitle: i ?? "Interview",
3348
3366
  interviewId: r,
@@ -3354,21 +3372,21 @@ const Jt = (i) => /* @__PURE__ */ e.jsxs(
3354
3372
  ) })
3355
3373
  }
3356
3374
  ) }) : /* @__PURE__ */ e.jsx("div", { className: "interview-widget-container", children: /* @__PURE__ */ e.jsx(
3357
- ut,
3375
+ ft,
3358
3376
  {
3359
3377
  isOpen: l,
3360
3378
  onStart: () => {
3361
- a(!0), d(!1);
3379
+ a(!0), w(!1);
3362
3380
  }
3363
3381
  }
3364
3382
  ) });
3365
3383
  };
3366
3384
  typeof window < "u" && (window.InterviewWidget = {
3367
- InterviewWidget: ti,
3368
- InterviewWidgetProvider: it
3385
+ InterviewWidget: ni,
3386
+ InterviewWidgetProvider: at
3369
3387
  });
3370
3388
  export {
3371
- ti as InterviewWidget,
3372
- it as InterviewWidgetProvider,
3373
- ti as default
3389
+ ni as InterviewWidget,
3390
+ at as InterviewWidgetProvider,
3391
+ ni as default
3374
3392
  };