@factorialco/f0-react 7.33.0 → 7.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{ChatPdfThumbnail-CewvkWu-.js → ChatPdfThumbnail-CFEB3FYp.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-CKwdWt5B.js → ChatPostComposerDialog-DnuStGGi.js} +3 -3
  3. package/dist/{DocumentToolbar-BdgPc16e.js → DocumentToolbar-BT7Ks9jN.js} +2 -2
  4. package/dist/{DocxViewer-HWpF_G9w.js → DocxViewer-DzCul5m1.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-DxlgF3Pt.js → F0AiProcessingOverlay-C3q5kdSu.js} +960 -957
  6. package/dist/{F0CanvasPanel-BCZjxhVB.js → F0CanvasPanel-DB32LsaK.js} +12768 -12684
  7. package/dist/{F0Map-DZtgpSnS.js → F0Map-CFivWqOr.js} +4 -4
  8. package/dist/{F0VideoPlayer-EqXupZV9.js → F0VideoPlayer-C5TOVGjz.js} +356 -377
  9. package/dist/{MapProvider-C4K2ey4N.js → MapProvider-COBzcEBa.js} +214 -189
  10. package/dist/{SheetViewer-yK40OmE1.js → SheetViewer-Bvv7GLJ5.js} +2 -2
  11. package/dist/{TextViewer-BYFQn6S1.js → TextViewer-CTLt0pvu.js} +2 -2
  12. package/dist/ai.d.ts +13 -8
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +8 -8
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-BKF7swb0.js → experimental-B0saLXEl.js} +11986 -11293
  17. package/dist/experimental.d.ts +387 -40
  18. package/dist/experimental.js +280 -278
  19. package/dist/f0.d.ts +13 -8
  20. package/dist/f0.js +10 -10
  21. package/dist/i18n-provider-defaults.d.ts +13 -8
  22. package/dist/i18n-provider-defaults.js +8 -0
  23. package/dist/{index-C_LLYE_o.js → index-AqJa6oaL.js} +3 -3
  24. package/dist/{index-BzA0lEl1.js → index-BdKI708R.js} +2 -2
  25. package/dist/index-C2VXFg3o.js +4 -0
  26. package/dist/{index-DlMbfdLc.js → index-Dq029AUw.js} +1 -1
  27. package/dist/{index-Ca0rOdez.js → index-H07Crbx2.js} +3 -3
  28. package/dist/{pdfWorker-CA3xmb-5.js → pdfWorker-CJFmh5Jp.js} +2 -2
  29. package/dist/styles.css +1 -1
  30. package/icons/app/Floating.d.ts.map +1 -1
  31. package/icons/app/Floating.js +1 -1
  32. package/icons/app/Fullscreen.d.ts +4 -0
  33. package/icons/app/Fullscreen.d.ts.map +1 -0
  34. package/icons/app/Fullscreen.js +5 -0
  35. package/icons/app/PanelLeft.d.ts +4 -0
  36. package/icons/app/PanelLeft.d.ts.map +1 -0
  37. package/icons/app/PanelLeft.js +5 -0
  38. package/icons/app/PanelRight.d.ts +4 -0
  39. package/icons/app/PanelRight.d.ts.map +1 -0
  40. package/icons/app/PanelRight.js +5 -0
  41. package/icons/app/index.d.ts +3 -0
  42. package/icons/app/index.d.ts.map +1 -1
  43. package/icons/app/index.js +3 -0
  44. package/package.json +2 -2
  45. package/dist/index-Bt9DLm3D.js +0 -4
@@ -1,25 +1,26 @@
1
- import { u as W, H as je, J as Xe, y as $, K as Ge, L as Ze, M as qe, N as Ye, O as Je, Q as Qe, R as et, U as tt, V as nt, W as rt, X as at, Y as ot, Z as st, _ as ye, $ as it, a0 as Ce, l as ct, a1 as lt, a2 as ut, v as dt, B as ft, E as mt } from "./F0CanvasPanel-BCZjxhVB.js";
2
- import { jsxs as S, jsx as c } from "react/jsx-runtime";
3
- import { forwardRef as re, useId as pt, useState as E, useRef as F, useEffect as N, useMemo as J, useCallback as T } from "react";
4
- import { d as H, f as ue } from "./tooltip-CrXp1Uaz.js";
5
- import { F as Pe, a as ht, b as gt } from "./VolumeMuted-UfTwt2zn.js";
6
- function Se(e) {
1
+ import { u as W, H as je, J as Xe, y as $, K as Ge, L as Ze, M as Ye, N as qe, O as Je, Q as Qe, R as et, U as tt, V as nt, W as rt, X as at, Y as ot, Z as st, _ as ye, $ as it, a0 as Pe, l as ct, a1 as lt, a2 as dt, v as ut, B as ft, E as mt } from "./F0CanvasPanel-DB32LsaK.js";
2
+ import { jsxs as R, jsx as c } from "react/jsx-runtime";
3
+ import { forwardRef as re, useId as pt, useState as x, useRef as F, useEffect as _, useMemo as J, useCallback as M } from "react";
4
+ import { d as H, f as de } from "./tooltip-CrXp1Uaz.js";
5
+ import { F as Ce, a as ht, b as gt } from "./VolumeMuted-UfTwt2zn.js";
6
+ import { b as vt } from "./MapProvider-COBzcEBa.js";
7
+ function Re(e) {
7
8
  return Array.isArray(e) && e.every(
8
9
  (t) => typeof t == "object" && t !== null && "locale" in t && "value" in t
9
10
  );
10
11
  }
11
12
  function ee(e, t) {
12
- return e === void 0 ? void 0 : Se(e) ? e.length === 0 ? void 0 : ((t ? e.find((n) => n.locale === t) : void 0) ?? e[0]).value : e;
13
+ return e === void 0 ? void 0 : Re(e) ? e.length === 0 ? void 0 : ((t ? e.find((r) => r.locale === t) : void 0) ?? e[0]).value : e;
13
14
  }
14
15
  function ae(...e) {
15
16
  const t = /* @__PURE__ */ new Map();
16
17
  for (const a of e)
17
- if (Se(a))
18
- for (const n of a) {
19
- const o = t.get(n.locale);
20
- o ? !o.label && n.label && (o.label = n.label) : t.set(n.locale, {
21
- locale: n.locale,
22
- label: n.label
18
+ if (Re(a))
19
+ for (const r of a) {
20
+ const o = t.get(r.locale);
21
+ o ? !o.label && r.label && (o.label = r.label) : t.set(r.locale, {
22
+ locale: r.locale,
23
+ label: r.label
23
24
  });
24
25
  }
25
26
  return Array.from(t.values());
@@ -37,21 +38,21 @@ function Le(e, t) {
37
38
  function Z(e, t) {
38
39
  if (e.length === 0)
39
40
  return;
40
- const a = e.map((r) => r.locale), n = (r) => r.split("-")[0], o = (r) => a.find((d) => d === r) ?? a.find((d) => n(d) === n(r));
41
+ const a = e.map((n) => n.locale), r = (n) => n.split("-")[0], o = (n) => a.find((u) => u === n) ?? a.find((u) => r(u) === r(n));
41
42
  if (t) {
42
- const r = o(t);
43
- if (r)
44
- return r;
43
+ const n = o(t);
44
+ if (n)
45
+ return n;
45
46
  }
46
47
  const s = typeof navigator < "u" ? navigator.language : void 0;
47
48
  if (s) {
48
- const r = o(s);
49
- if (r)
50
- return r;
49
+ const n = o(s);
50
+ if (n)
51
+ return n;
51
52
  }
52
53
  return a[0];
53
54
  }
54
- const Re = [0.5, 0.75, 1, 1.25, 1.5], oe = 1, le = 0.25, Q = 5, te = 0.1, q = 12, vt = 1, bt = 250, yt = [25, 50, 75], Lt = 300 * 1e3, wt = 10, kt = 0.03;
55
+ const Se = [0.5, 0.75, 1, 1.25, 1.5], oe = 1, le = 0.25, Q = 5, te = 0.1, Y = 12, bt = 1, yt = 250, Lt = [25, 50, 75], wt = 300 * 1e3, kt = 10, xt = 0.03;
55
56
  function ne(e) {
56
57
  if (!Number.isFinite(e) || e < 0)
57
58
  return "0:00";
@@ -62,7 +63,7 @@ function se(e) {
62
63
  return `${e}x`;
63
64
  }
64
65
  function Et(e) {
65
- return Re.includes(e);
66
+ return Se.includes(e);
66
67
  }
67
68
  const De = {
68
69
  x: 12,
@@ -72,7 +73,7 @@ const De = {
72
73
  fontWeight: 700,
73
74
  fontFamily: "inherit",
74
75
  letterSpacing: -0.4
75
- }, de = re(({ animate: e, ...t }, a) => /* @__PURE__ */ S(
76
+ }, ue = re(({ animate: e, ...t }, a) => /* @__PURE__ */ R(
76
77
  "svg",
77
78
  {
78
79
  xmlns: "http://www.w3.org/2000/svg",
@@ -98,10 +99,10 @@ const De = {
98
99
  ]
99
100
  }
100
101
  ));
101
- de.displayName = "AudioDescriptionLineIcon";
102
+ ue.displayName = "AudioDescriptionLineIcon";
102
103
  const Te = re(({ animate: e, ...t }, a) => {
103
- const n = `ad-mask-${pt().replace(/:/g, "")}`;
104
- return /* @__PURE__ */ S(
104
+ const r = `ad-mask-${pt().replace(/:/g, "")}`;
105
+ return /* @__PURE__ */ R(
105
106
  "svg",
106
107
  {
107
108
  xmlns: "http://www.w3.org/2000/svg",
@@ -111,7 +112,7 @@ const Te = re(({ animate: e, ...t }, a) => {
111
112
  ...t,
112
113
  "aria-hidden": "true",
113
114
  children: [
114
- /* @__PURE__ */ S("mask", { id: n, maskUnits: "userSpaceOnUse", children: [
115
+ /* @__PURE__ */ R("mask", { id: r, maskUnits: "userSpaceOnUse", children: [
115
116
  /* @__PURE__ */ c("rect", { x: 3, y: 6, width: 18, height: 12, rx: 3, fill: "white" }),
116
117
  /* @__PURE__ */ c("text", { ...De, fill: "black", children: "AD" })
117
118
  ] }),
@@ -124,7 +125,7 @@ const Te = re(({ animate: e, ...t }, a) => {
124
125
  height: 12,
125
126
  rx: 3,
126
127
  fill: "currentColor",
127
- mask: `url(#${n})`
128
+ mask: `url(#${r})`
128
129
  }
129
130
  )
130
131
  ]
@@ -133,7 +134,7 @@ const Te = re(({ animate: e, ...t }, a) => {
133
134
  });
134
135
  Te.displayName = "AudioDescriptionFilledIcon";
135
136
  const fe = re(
136
- ({ animate: e, ...t }, a) => /* @__PURE__ */ S(
137
+ ({ animate: e, ...t }, a) => /* @__PURE__ */ R(
137
138
  "svg",
138
139
  {
139
140
  xmlns: "http://www.w3.org/2000/svg",
@@ -200,47 +201,47 @@ const Me = re(
200
201
  )
201
202
  );
202
203
  Me.displayName = "CaptionsFilledIcon";
203
- function xt({
204
+ function Pt({
204
205
  value: e,
205
206
  onChange: t,
206
207
  containerRef: a
207
208
  }) {
208
- const { t: n } = W(), [o, s] = E(!1), r = (d) => {
209
- const u = Array.from(
210
- d.currentTarget.querySelectorAll(
209
+ const { t: r } = W(), [o, s] = x(!1), n = (u) => {
210
+ const d = Array.from(
211
+ u.currentTarget.querySelectorAll(
211
212
  '[role="menuitemradio"]'
212
213
  )
213
214
  );
214
- if (u.length === 0)
215
+ if (d.length === 0)
215
216
  return;
216
- const m = u.indexOf(document.activeElement);
217
+ const m = d.indexOf(document.activeElement);
217
218
  let g;
218
- switch (d.key) {
219
+ switch (u.key) {
219
220
  case "ArrowDown":
220
- g = m < 0 ? 0 : (m + 1) % u.length;
221
+ g = m < 0 ? 0 : (m + 1) % d.length;
221
222
  break;
222
223
  case "ArrowUp":
223
- g = m <= 0 ? u.length - 1 : m - 1;
224
+ g = m <= 0 ? d.length - 1 : m - 1;
224
225
  break;
225
226
  case "Home":
226
227
  g = 0;
227
228
  break;
228
229
  case "End":
229
- g = u.length - 1;
230
+ g = d.length - 1;
230
231
  break;
231
232
  default:
232
233
  return;
233
234
  }
234
- d.preventDefault(), u[g]?.focus();
235
+ u.preventDefault(), d[g]?.focus();
235
236
  };
236
- return /* @__PURE__ */ S(je, { open: o, onOpenChange: s, children: [
237
+ return /* @__PURE__ */ R(je, { open: o, onOpenChange: s, children: [
237
238
  /* @__PURE__ */ c(Xe, { asChild: !0, children: /* @__PURE__ */ c(
238
239
  $,
239
240
  {
240
241
  variant: "ghost",
241
242
  size: "sm",
242
243
  label: se(e),
243
- "aria-label": n("videoPlayer.playbackSpeed", {
244
+ "aria-label": r("videoPlayer.playbackSpeed", {
244
245
  rate: se(e)
245
246
  })
246
247
  }
@@ -257,16 +258,16 @@ function xt({
257
258
  "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"
258
259
  ),
259
260
  role: "menu",
260
- "aria-label": n("videoPlayer.playbackSpeedLabel"),
261
- onKeyDown: r,
262
- children: Re.map((d) => {
263
- const u = d === e;
264
- return /* @__PURE__ */ S(
261
+ "aria-label": r("videoPlayer.playbackSpeedLabel"),
262
+ onKeyDown: n,
263
+ children: Se.map((u) => {
264
+ const d = u === e;
265
+ return /* @__PURE__ */ R(
265
266
  "button",
266
267
  {
267
268
  type: "button",
268
269
  role: "menuitemradio",
269
- "aria-checked": u,
270
+ "aria-checked": d,
270
271
  className: H(
271
272
  "relative flex items-center rounded-xs py-1.5 pl-8 pr-3",
272
273
  "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums",
@@ -275,14 +276,14 @@ function xt({
275
276
  "[&_svg]:h-3.5 [&_svg]:w-3.5"
276
277
  ),
277
278
  onClick: () => {
278
- t(d), s(!1);
279
+ t(u), s(!1);
279
280
  },
280
281
  children: [
281
- u ? /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }) : null,
282
- se(d)
282
+ d ? /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }) : null,
283
+ se(u)
283
284
  ]
284
285
  },
285
- d
286
+ u
286
287
  );
287
288
  })
288
289
  }
@@ -293,53 +294,53 @@ function Ct({
293
294
  currentTime: e,
294
295
  duration: t,
295
296
  markerTime: a,
296
- blockSeekPastMarker: n = !1,
297
+ blockSeekPastMarker: r = !1,
297
298
  onSeek: o
298
299
  }) {
299
- const { t: s } = W(), r = F(null), [d, u] = E(!1), [m, g] = E(null), y = t > 0 ? Math.min(1, e / t) : 0, l = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
300
- const P = r.current;
301
- if (!P)
300
+ const { t: s } = W(), n = F(null), [u, d] = x(!1), [m, g] = x(null), y = t > 0 ? Math.min(1, e / t) : 0, l = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
301
+ const C = n.current;
302
+ if (!C)
302
303
  return 0;
303
- const A = P.getBoundingClientRect();
304
+ const A = C.getBoundingClientRect();
304
305
  return Math.max(0, Math.min(1, (v - A.left) / A.width));
305
306
  }, b = (v) => {
306
307
  t && o(h(v) * t);
307
- }, x = (v) => {
308
- t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), u(!0), b(v.clientX));
309
- }, M = (v) => {
310
- t && (g(h(v.clientX)), d && b(v.clientX));
308
+ }, E = (v) => {
309
+ t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), d(!0), b(v.clientX));
310
+ }, T = (v) => {
311
+ t && (g(h(v.clientX)), u && b(v.clientX));
311
312
  }, k = (v) => {
312
- d && (u(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
313
- }, w = m !== null && n && a !== void 0 && m > l, O = (v) => {
313
+ u && (d(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
314
+ }, w = m !== null && r && a !== void 0 && m > l, O = (v) => {
314
315
  if (!t)
315
316
  return;
316
- let P = null;
317
+ let C = null;
317
318
  switch (v.key) {
318
319
  case "ArrowLeft":
319
- P = Math.max(0, e - Q);
320
+ C = Math.max(0, e - Q);
320
321
  break;
321
322
  case "ArrowRight":
322
- P = Math.min(t, e + Q);
323
+ C = Math.min(t, e + Q);
323
324
  break;
324
325
  case "Home":
325
- P = 0;
326
+ C = 0;
326
327
  break;
327
328
  case "End":
328
- P = t;
329
+ C = t;
329
330
  break;
330
331
  default:
331
332
  return;
332
333
  }
333
- v.preventDefault(), v.stopPropagation(), o(P);
334
+ v.preventDefault(), v.stopPropagation(), o(C);
334
335
  };
335
- return /* @__PURE__ */ S(
336
+ return /* @__PURE__ */ R(
336
337
  "div",
337
338
  {
338
- ref: r,
339
+ ref: n,
339
340
  className: H(
340
341
  "relative flex h-4 flex-1 items-center rounded-sm",
341
342
  "cursor-pointer touch-none",
342
- ue()
343
+ de()
343
344
  ),
344
345
  role: "slider",
345
346
  tabIndex: 0,
@@ -351,11 +352,11 @@ function Ct({
351
352
  current: ne(e),
352
353
  total: ne(t)
353
354
  }),
354
- onPointerDown: x,
355
- onPointerMove: M,
355
+ onPointerDown: E,
356
+ onPointerMove: T,
356
357
  onPointerUp: k,
357
358
  onPointerCancel: k,
358
- onLostPointerCapture: () => u(!1),
359
+ onLostPointerCapture: () => d(!1),
359
360
  onPointerLeave: () => g(null),
360
361
  onKeyDown: O,
361
362
  children: [
@@ -387,32 +388,32 @@ function Ct({
387
388
  }
388
389
  );
389
390
  }
390
- const ie = "off", we = "py-2 pr-4 text-base font-medium", Pt = "gap-2 py-2 pl-3 pr-2 text-base font-medium", Ae = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
391
+ const ie = "off", we = "py-2 pr-4 text-base font-medium", Rt = "gap-2 py-2 pl-3 pr-2 text-base font-medium", Ae = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
391
392
  function ce({
392
393
  icon: e,
393
394
  label: t,
394
395
  container: a,
395
- options: n,
396
+ options: r,
396
397
  value: o,
397
398
  onLanguageChange: s,
398
- on: r,
399
- onOff: d,
400
- offLabel: u
399
+ on: n,
400
+ onOff: u,
401
+ offLabel: d
401
402
  }) {
402
- const m = d !== void 0, g = n.find((l) => l.locale === o), y = m && !r ? u : g ? Le(g) : u;
403
- return /* @__PURE__ */ S(tt, { children: [
404
- /* @__PURE__ */ S(nt, { className: Pt, children: [
403
+ const m = u !== void 0, g = r.find((l) => l.locale === o), y = m && !n ? d : g ? Le(g) : d;
404
+ return /* @__PURE__ */ R(tt, { children: [
405
+ /* @__PURE__ */ R(nt, { className: Rt, children: [
405
406
  /* @__PURE__ */ c(rt, { icon: e }),
406
407
  /* @__PURE__ */ c("span", { className: "flex-1", children: t }),
407
408
  /* @__PURE__ */ c("span", { className: "text-f1-foreground-secondary", children: y })
408
409
  ] }),
409
- /* @__PURE__ */ c(at, { container: a ?? void 0, children: /* @__PURE__ */ c(ot, { className: Ae, children: /* @__PURE__ */ S(
410
+ /* @__PURE__ */ c(at, { container: a ?? void 0, children: /* @__PURE__ */ c(ot, { className: Ae, children: /* @__PURE__ */ R(
410
411
  st,
411
412
  {
412
- value: m ? r ? o : ie : o,
413
- onValueChange: (l) => m && l === ie ? d() : s(l),
413
+ value: m ? n ? o : ie : o,
414
+ onValueChange: (l) => m && l === ie ? u() : s(l),
414
415
  children: [
415
- n.map((l) => /* @__PURE__ */ c(
416
+ r.map((l) => /* @__PURE__ */ c(
416
417
  ye,
417
418
  {
418
419
  value: l.locale,
@@ -421,7 +422,7 @@ function ce({
421
422
  },
422
423
  l.locale
423
424
  )),
424
- m ? /* @__PURE__ */ c(ye, { value: ie, className: we, children: u }) : null
425
+ m ? /* @__PURE__ */ c(ye, { value: ie, className: we, children: d }) : null
425
426
  ]
426
427
  }
427
428
  ) }) })
@@ -431,21 +432,21 @@ function St({
431
432
  containerRef: e,
432
433
  audioLanguages: t,
433
434
  audioLanguage: a,
434
- onAudioLanguageChange: n,
435
+ onAudioLanguageChange: r,
435
436
  captionLanguages: o,
436
437
  captionLanguage: s,
437
- captionsOn: r,
438
- onCaptionLanguageChange: d,
439
- onCaptionsOff: u,
438
+ captionsOn: n,
439
+ onCaptionLanguageChange: u,
440
+ onCaptionsOff: d,
440
441
  audioDescriptionLanguages: m,
441
442
  audioDescriptionLanguage: g,
442
443
  audioDescriptionOn: y,
443
444
  onAudioDescriptionLanguageChange: l,
444
445
  onAudioDescriptionOff: f
445
446
  }) {
446
- const { t: h } = W(), b = e.current, x = h("videoPlayer.off");
447
- return /* @__PURE__ */ S(qe, { children: [
448
- /* @__PURE__ */ c(Ye, { asChild: !0, children: /* @__PURE__ */ c(
447
+ const { t: h } = W(), b = e.current, E = h("videoPlayer.off");
448
+ return /* @__PURE__ */ R(Ye, { children: [
449
+ /* @__PURE__ */ c(qe, { asChild: !0, children: /* @__PURE__ */ c(
449
450
  $,
450
451
  {
451
452
  variant: "ghost",
@@ -455,7 +456,7 @@ function St({
455
456
  label: h("videoPlayer.settings")
456
457
  }
457
458
  ) }),
458
- /* @__PURE__ */ S(
459
+ /* @__PURE__ */ R(
459
460
  Qe,
460
461
  {
461
462
  container: b,
@@ -471,8 +472,8 @@ function St({
471
472
  container: b,
472
473
  options: t,
473
474
  value: a,
474
- onLanguageChange: n,
475
- offLabel: x
475
+ onLanguageChange: r,
476
+ offLabel: E
476
477
  }
477
478
  ) : null,
478
479
  o.length > 1 ? /* @__PURE__ */ c(
@@ -483,16 +484,16 @@ function St({
483
484
  container: b,
484
485
  options: o,
485
486
  value: s,
486
- on: r,
487
- onLanguageChange: d,
488
- onOff: u,
489
- offLabel: x
487
+ on: n,
488
+ onLanguageChange: u,
489
+ onOff: d,
490
+ offLabel: E
490
491
  }
491
492
  ) : null,
492
493
  m.length > 1 ? /* @__PURE__ */ c(
493
494
  ce,
494
495
  {
495
- icon: de,
496
+ icon: ue,
496
497
  label: h("videoPlayer.audioDescription"),
497
498
  container: b,
498
499
  options: m,
@@ -500,7 +501,7 @@ function St({
500
501
  on: y,
501
502
  onLanguageChange: l,
502
503
  onOff: f,
503
- offLabel: x
504
+ offLabel: E
504
505
  }
505
506
  ) : null
506
507
  ]
@@ -508,20 +509,20 @@ function St({
508
509
  )
509
510
  ] });
510
511
  }
511
- function Rt(e) {
512
+ function Dt(e) {
512
513
  return e.audioLanguages > 1 || e.captionLanguages > 1 || e.audioDescriptionLanguages > 1;
513
514
  }
514
- function Dt(e, t) {
515
- return t || e === 0 ? Pe : e <= 0.5 ? ht : gt;
515
+ function Tt(e, t) {
516
+ return t || e === 0 ? Ce : e <= 0.5 ? ht : gt;
516
517
  }
517
- function Tt({
518
+ function Mt({
518
519
  volume: e,
519
520
  isMuted: t,
520
521
  onToggleMute: a,
521
- onVolumeChange: n,
522
+ onVolumeChange: r,
522
523
  silent: o = !1
523
524
  }) {
524
- const { t: s } = W(), r = t || e === 0;
525
+ const { t: s } = W(), n = t || e === 0;
525
526
  return o ? /* @__PURE__ */ c(
526
527
  $,
527
528
  {
@@ -529,38 +530,38 @@ function Tt({
529
530
  size: "sm",
530
531
  hideLabel: !0,
531
532
  disabled: !0,
532
- icon: Pe,
533
+ icon: Ce,
533
534
  label: s("videoPlayer.noAudio")
534
535
  }
535
- ) : /* @__PURE__ */ S("div", { className: "flex items-center gap-1", children: [
536
+ ) : /* @__PURE__ */ R("div", { className: "flex items-center gap-1", children: [
536
537
  /* @__PURE__ */ c(
537
538
  $,
538
539
  {
539
540
  variant: "ghost",
540
541
  size: "sm",
541
542
  hideLabel: !0,
542
- icon: Dt(e, r),
543
- label: s(r ? "videoPlayer.unmute" : "videoPlayer.mute"),
543
+ icon: Tt(e, n),
544
+ label: s(n ? "videoPlayer.unmute" : "videoPlayer.mute"),
544
545
  onClick: a
545
546
  }
546
547
  ),
547
- /* @__PURE__ */ c(Mt, { value: r ? 0 : e, onChange: n })
548
+ /* @__PURE__ */ c(At, { value: n ? 0 : e, onChange: r })
548
549
  ] });
549
550
  }
550
- function Mt({ value: e, onChange: t }) {
551
- const { t: a } = W(), n = F(null), [o, s] = E(!1), r = Math.max(0, Math.min(1, e)), d = (l) => {
552
- const f = n.current;
551
+ function At({ value: e, onChange: t }) {
552
+ const { t: a } = W(), r = F(null), [o, s] = x(!1), n = Math.max(0, Math.min(1, e)), u = (l) => {
553
+ const f = r.current;
553
554
  if (!f)
554
555
  return 0;
555
- const h = f.getBoundingClientRect(), b = h.width - q;
556
+ const h = f.getBoundingClientRect(), b = h.width - Y;
556
557
  return b <= 0 ? 0 : Math.max(
557
558
  0,
558
- Math.min(1, (l - h.left - q / 2) / b)
559
+ Math.min(1, (l - h.left - Y / 2) / b)
559
560
  );
560
- }, u = (l) => {
561
- l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(d(l.clientX));
561
+ }, d = (l) => {
562
+ l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(u(l.clientX));
562
563
  }, m = (l) => {
563
- o && t(d(l.clientX));
564
+ o && t(u(l.clientX));
564
565
  }, g = (l) => {
565
566
  o && (s(!1), l.currentTarget.hasPointerCapture(l.pointerId) && l.currentTarget.releasePointerCapture(l.pointerId));
566
567
  }, y = (l) => {
@@ -568,11 +569,11 @@ function Mt({ value: e, onChange: t }) {
568
569
  switch (l.key) {
569
570
  case "ArrowRight":
570
571
  case "ArrowUp":
571
- f = Math.min(1, r + te);
572
+ f = Math.min(1, n + te);
572
573
  break;
573
574
  case "ArrowLeft":
574
575
  case "ArrowDown":
575
- f = Math.max(0, r - te);
576
+ f = Math.max(0, n - te);
576
577
  break;
577
578
  case "Home":
578
579
  f = 0;
@@ -585,23 +586,23 @@ function Mt({ value: e, onChange: t }) {
585
586
  }
586
587
  l.preventDefault(), l.stopPropagation(), t(f);
587
588
  };
588
- return /* @__PURE__ */ S(
589
+ return /* @__PURE__ */ R(
589
590
  "div",
590
591
  {
591
- ref: n,
592
+ ref: r,
592
593
  className: H(
593
594
  "relative flex h-4 w-[60px] items-center rounded-sm",
594
595
  "cursor-pointer touch-none",
595
- ue()
596
+ de()
596
597
  ),
597
598
  role: "slider",
598
599
  tabIndex: 0,
599
600
  "aria-label": a("videoPlayer.volume"),
600
601
  "aria-valuemin": 0,
601
602
  "aria-valuemax": 1,
602
- "aria-valuenow": Number(r.toFixed(2)),
603
- "aria-valuetext": `${Math.round(r * 100)}%`,
604
- onPointerDown: u,
603
+ "aria-valuenow": Number(n.toFixed(2)),
604
+ "aria-valuetext": `${Math.round(n * 100)}%`,
605
+ onPointerDown: d,
605
606
  onPointerMove: m,
606
607
  onPointerUp: g,
607
608
  onPointerCancel: g,
@@ -614,7 +615,7 @@ function Mt({ value: e, onChange: t }) {
614
615
  {
615
616
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
616
617
  style: {
617
- width: `calc(${q}px + (100% - ${q}px) * ${r})`
618
+ width: `calc(${Y}px + (100% - ${Y}px) * ${n})`
618
619
  }
619
620
  }
620
621
  ),
@@ -623,7 +624,7 @@ function Mt({ value: e, onChange: t }) {
623
624
  {
624
625
  className: "pointer-events-none absolute h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
625
626
  style: {
626
- left: `calc(${q / 2}px + (100% - ${q}px) * ${r})`
627
+ left: `calc(${Y / 2}px + (100% - ${Y}px) * ${n})`
627
628
  }
628
629
  }
629
630
  )
@@ -631,16 +632,16 @@ function Mt({ value: e, onChange: t }) {
631
632
  }
632
633
  );
633
634
  }
634
- function At({
635
+ function It({
635
636
  isPlaying: e,
636
637
  currentTime: t,
637
638
  duration: a,
638
- volume: n,
639
+ volume: r,
639
640
  isMuted: o,
640
641
  playbackRate: s,
641
- isFullscreen: r,
642
- markerTime: d,
643
- blockSeekPastMarker: u,
642
+ isFullscreen: n,
643
+ markerTime: u,
644
+ blockSeekPastMarker: d,
644
645
  containerRef: m,
645
646
  captionsAvailable: g,
646
647
  captionsOn: y,
@@ -648,33 +649,33 @@ function At({
648
649
  audioDescriptionOn: f,
649
650
  silent: h,
650
651
  persist: b,
651
- audioLanguages: x,
652
- audioLanguage: M,
652
+ audioLanguages: E,
653
+ audioLanguage: T,
653
654
  onAudioLanguageChange: k,
654
655
  captionLanguages: w,
655
656
  captionLanguage: O,
656
657
  onCaptionLanguageChange: v,
657
- onCaptionsOff: P,
658
+ onCaptionsOff: C,
658
659
  audioDescriptionLanguages: A,
659
- audioDescriptionLanguage: C,
660
+ audioDescriptionLanguage: P,
660
661
  onAudioDescriptionLanguageChange: i,
661
662
  onAudioDescriptionOff: D,
662
- onTogglePlay: R,
663
+ onTogglePlay: S,
663
664
  onToggleMute: B,
664
665
  onVolumeChange: j,
665
666
  onPlaybackRateChange: K,
666
667
  onToggleFullscreen: X,
667
- onToggleCaptions: _,
668
+ onToggleCaptions: N,
668
669
  onToggleAudioDescription: U,
669
- onSeek: Y,
670
+ onSeek: q,
670
671
  download: G
671
672
  }) {
672
- const { t: p } = W(), I = g && w.length <= 1, z = l && A.length <= 1, V = Rt({
673
- audioLanguages: x.length,
673
+ const { t: p } = W(), I = g && w.length <= 1, z = l && A.length <= 1, V = Dt({
674
+ audioLanguages: E.length,
674
675
  captionLanguages: w.length,
675
676
  audioDescriptionLanguages: A.length
676
677
  });
677
- return /* @__PURE__ */ S(
678
+ return /* @__PURE__ */ R(
678
679
  "div",
679
680
  {
680
681
  className: H(
@@ -701,9 +702,9 @@ function At({
701
702
  variant: "ghost",
702
703
  size: "sm",
703
704
  hideLabel: !0,
704
- icon: e ? it : Ce,
705
+ icon: e ? it : Pe,
705
706
  label: p(e ? "videoPlayer.pause" : "videoPlayer.play"),
706
- onClick: R
707
+ onClick: S
707
708
  }
708
709
  ),
709
710
  /* @__PURE__ */ c(
@@ -711,20 +712,20 @@ function At({
711
712
  {
712
713
  currentTime: t,
713
714
  duration: a,
714
- markerTime: d,
715
- blockSeekPastMarker: u,
716
- onSeek: Y
715
+ markerTime: u,
716
+ blockSeekPastMarker: d,
717
+ onSeek: q
717
718
  }
718
719
  ),
719
- /* @__PURE__ */ S("span", { className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground", children: [
720
+ /* @__PURE__ */ R("span", { className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground", children: [
720
721
  ne(t),
721
722
  " / ",
722
723
  ne(a)
723
724
  ] }),
724
725
  /* @__PURE__ */ c(
725
- Tt,
726
+ Mt,
726
727
  {
727
- volume: n,
728
+ volume: r,
728
729
  isMuted: o,
729
730
  onToggleMute: B,
730
731
  onVolumeChange: j,
@@ -732,7 +733,7 @@ function At({
732
733
  }
733
734
  ),
734
735
  /* @__PURE__ */ c(
735
- xt,
736
+ Pt,
736
737
  {
737
738
  value: s,
738
739
  onChange: K,
@@ -751,7 +752,7 @@ function At({
751
752
  icon: y ? Me : fe,
752
753
  label: p("videoPlayer.captions"),
753
754
  "aria-pressed": y,
754
- onClick: _
755
+ onClick: N
755
756
  }
756
757
  )
757
758
  ) : null,
@@ -765,7 +766,7 @@ function At({
765
766
  variant: "ghost",
766
767
  size: "sm",
767
768
  hideLabel: !0,
768
- icon: f ? Te : de,
769
+ icon: f ? Te : ue,
769
770
  label: p("videoPlayer.audioDescription"),
770
771
  "aria-pressed": f,
771
772
  onClick: U
@@ -776,16 +777,16 @@ function At({
776
777
  St,
777
778
  {
778
779
  containerRef: m,
779
- audioLanguages: x,
780
- audioLanguage: M,
780
+ audioLanguages: E,
781
+ audioLanguage: T,
781
782
  onAudioLanguageChange: k,
782
783
  captionLanguages: w,
783
784
  captionLanguage: O,
784
785
  captionsOn: y,
785
786
  onCaptionLanguageChange: v,
786
- onCaptionsOff: P,
787
+ onCaptionsOff: C,
787
788
  audioDescriptionLanguages: A,
788
- audioDescriptionLanguage: C,
789
+ audioDescriptionLanguage: P,
789
790
  audioDescriptionOn: f,
790
791
  onAudioDescriptionLanguageChange: i,
791
792
  onAudioDescriptionOff: D
@@ -808,8 +809,8 @@ function At({
808
809
  variant: "ghost",
809
810
  size: "sm",
810
811
  hideLabel: !0,
811
- icon: r ? lt : ut,
812
- label: p(r ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
812
+ icon: n ? lt : dt,
813
+ label: p(n ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
813
814
  onClick: X
814
815
  }
815
816
  )
@@ -819,127 +820,105 @@ function At({
819
820
  }
820
821
  const ke = (e) => e.trimStart().startsWith("WEBVTT");
821
822
  function Ie(e) {
822
- const t = e !== void 0 && ke(e), [a, n] = E();
823
- return N(() => {
823
+ const t = e !== void 0 && ke(e), [a, r] = x();
824
+ return _(() => {
824
825
  if (e === void 0 || !ke(e)) {
825
- n(void 0);
826
+ r(void 0);
826
827
  return;
827
828
  }
828
829
  const o = URL.createObjectURL(new Blob([e], { type: "text/vtt" }));
829
- return n(o), () => URL.revokeObjectURL(o);
830
+ return r(o), () => URL.revokeObjectURL(o);
830
831
  }, [e]), {
831
832
  trackSrc: e === void 0 ? void 0 : t ? a : e,
832
833
  needsCrossOrigin: e !== void 0 && !t
833
834
  };
834
835
  }
835
- const Ee = "descriptions";
836
- function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
837
- const o = a !== void 0, { trackSrc: s, needsCrossOrigin: r } = Ie(n), [d, u] = E(!1), m = o || n !== void 0 || d, [g, y] = E(), l = F(!1);
838
- return N(() => {
836
+ const xe = "descriptions";
837
+ function Nt(e, { enabled: t, describedSrc: a, descriptions: r }) {
838
+ const o = a !== void 0, { trackSrc: s, needsCrossOrigin: n } = Ie(r), [u, d] = x(!1), m = o || r !== void 0 || u, [g, y] = x(), l = F(!1);
839
+ return _(() => {
839
840
  if (!e)
840
841
  return;
841
- const f = e.textTracks, h = typeof window < "u" && "speechSynthesis" in window, b = t && !o && h, x = () => {
842
+ const f = e.textTracks, h = typeof window < "u" && "speechSynthesis" in window, b = t && !o && h, E = () => {
842
843
  l.current && (l.current = !1, e.play().catch(() => {
843
844
  }));
844
- }, M = (C) => {
845
+ }, T = (P) => {
845
846
  window.speechSynthesis.cancel();
846
- const i = new SpeechSynthesisUtterance(C);
847
- i.onend = x, i.onerror = x, window.speechSynthesis.speak(i);
848
- }, k = /* @__PURE__ */ new WeakSet(), w = [], O = (C) => {
849
- if (C.kind !== Ee || (C.mode = "hidden", k.has(C)) || typeof C.addEventListener != "function")
847
+ const i = new SpeechSynthesisUtterance(P);
848
+ i.onend = E, i.onerror = E, window.speechSynthesis.speak(i);
849
+ }, k = /* @__PURE__ */ new WeakSet(), w = [], O = (P) => {
850
+ if (P.kind !== xe || (P.mode = "hidden", k.has(P)) || typeof P.addEventListener != "function")
850
851
  return;
851
- k.add(C);
852
+ k.add(P);
852
853
  const i = () => {
853
- const R = C.activeCues?.[0]?.text || void 0;
854
- y(R), b && R && (e.paused || (e.pause(), l.current = !0), M(R));
854
+ const S = P.activeCues?.[0]?.text || void 0;
855
+ y(S), b && S && (e.paused || (e.pause(), l.current = !0), T(S));
855
856
  };
856
- C.addEventListener("cuechange", i), w.push(() => C.removeEventListener("cuechange", i));
857
+ P.addEventListener("cuechange", i), w.push(() => P.removeEventListener("cuechange", i));
857
858
  }, v = () => {
858
- let C = !1;
859
+ let P = !1;
859
860
  for (const i of Array.from(f))
860
- i.kind === Ee && (n === void 0 && (C = !0), O(i));
861
- u(C);
861
+ i.kind === xe && (r === void 0 && (P = !0), O(i));
862
+ d(P);
862
863
  };
863
864
  v();
864
- const P = typeof f.addEventListener == "function", A = () => v();
865
- return P && (f.addEventListener("addtrack", A), f.addEventListener("removetrack", A)), () => {
866
- P && (f.removeEventListener("addtrack", A), f.removeEventListener("removetrack", A)), w.forEach((C) => C()), h && window.speechSynthesis.cancel(), x();
865
+ const C = typeof f.addEventListener == "function", A = () => v();
866
+ return C && (f.addEventListener("addtrack", A), f.addEventListener("removetrack", A)), () => {
867
+ C && (f.removeEventListener("addtrack", A), f.removeEventListener("removetrack", A)), w.forEach((P) => P()), h && window.speechSynthesis.cancel(), E();
867
868
  };
868
- }, [e, t, o, n, s]), J(
869
- () => ({ trackSrc: s, needsCrossOrigin: r, available: m, activeCue: g }),
870
- [s, r, m, g]
869
+ }, [e, t, o, r, s]), J(
870
+ () => ({ trackSrc: s, needsCrossOrigin: n, available: m, activeCue: g }),
871
+ [s, n, m, g]
871
872
  );
872
873
  }
873
- function Nt({
874
- targetRef: e
875
- }) {
876
- const [t, a] = E(!1);
877
- N(() => {
878
- const o = () => {
879
- a(document.fullscreenElement === e.current);
880
- };
881
- return document.addEventListener("fullscreenchange", o), () => {
882
- document.removeEventListener("fullscreenchange", o);
883
- };
884
- }, [e]);
885
- const n = T(async () => {
886
- const o = e.current;
887
- if (o)
888
- try {
889
- document.fullscreenElement ? await document.exitFullscreen() : await o.requestFullscreen();
890
- } catch {
891
- }
892
- }, [e]);
893
- return { isFullscreen: t, toggleFullscreen: n };
894
- }
895
874
  function _t({
896
875
  videoRef: e,
897
876
  seek: t,
898
877
  togglePlay: a,
899
- toggleMute: n,
878
+ toggleMute: r,
900
879
  toggleFullscreen: o,
901
880
  setVolume: s
902
881
  }) {
903
- return T(
904
- (r) => {
905
- const d = r.target;
906
- if (d instanceof HTMLElement && (d.closest(
882
+ return M(
883
+ (n) => {
884
+ const u = n.target;
885
+ if (u instanceof HTMLElement && (u.closest(
907
886
  'button, a, input, textarea, select, [role="button"], [contenteditable="true"]'
908
- ) || d.closest('[role="menu"], [role^="menuitem"]') || d.getAttribute("role") === "slider"))
887
+ ) || u.closest('[role="menu"], [role^="menuitem"]') || u.getAttribute("role") === "slider"))
909
888
  return;
910
- const u = e.current;
911
- if (!u)
889
+ const d = e.current;
890
+ if (!d)
912
891
  return;
913
- switch (r.key.length === 1 ? r.key.toLowerCase() : r.key) {
892
+ switch (n.key.length === 1 ? n.key.toLowerCase() : n.key) {
914
893
  case " ":
915
- r.preventDefault(), a();
894
+ n.preventDefault(), a();
916
895
  return;
917
896
  case "ArrowLeft":
918
- r.preventDefault(), t(Math.max(0, u.currentTime - Q));
897
+ n.preventDefault(), t(Math.max(0, d.currentTime - Q));
919
898
  return;
920
899
  case "ArrowRight": {
921
- r.preventDefault();
922
- const g = u.duration || u.currentTime + Q;
923
- t(Math.min(g, u.currentTime + Q));
900
+ n.preventDefault();
901
+ const g = d.duration || d.currentTime + Q;
902
+ t(Math.min(g, d.currentTime + Q));
924
903
  return;
925
904
  }
926
905
  case "ArrowUp":
927
- r.preventDefault(), s(Math.min(1, u.volume + te));
906
+ n.preventDefault(), s(Math.min(1, d.volume + te));
928
907
  return;
929
908
  case "ArrowDown":
930
- r.preventDefault(), s(Math.max(0, u.volume - te));
909
+ n.preventDefault(), s(Math.max(0, d.volume - te));
931
910
  return;
932
911
  case "m":
933
- r.preventDefault(), n();
912
+ n.preventDefault(), r();
934
913
  return;
935
914
  case "f":
936
- r.preventDefault(), o();
915
+ n.preventDefault(), o();
937
916
  return;
938
917
  default:
939
918
  return;
940
919
  }
941
920
  },
942
- [e, t, a, n, o, s]
921
+ [e, t, a, r, o, s]
943
922
  );
944
923
  }
945
924
  function Ft({
@@ -947,26 +926,26 @@ function Ft({
947
926
  enabled: t,
948
927
  resetKey: a
949
928
  }) {
950
- const n = F(0), o = F(0), s = F(t);
929
+ const r = F(0), o = F(0), s = F(t);
951
930
  s.current = t;
952
- const [r, d] = E(0);
953
- N(() => {
954
- n.current = 0, o.current = 0, d(0);
955
- }, [a]), N(() => {
931
+ const [n, u] = x(0);
932
+ _(() => {
933
+ r.current = 0, o.current = 0, u(0);
934
+ }, [a]), _(() => {
956
935
  if (!e)
957
936
  return;
958
937
  const m = () => {
959
- s.current && e.currentTime > n.current + le && (e.currentTime = n.current);
938
+ s.current && e.currentTime > r.current + le && (e.currentTime = r.current);
960
939
  }, g = () => {
961
- d((h) => {
962
- const b = n.current;
940
+ u((h) => {
941
+ const b = r.current;
963
942
  return b - h >= 1 ? b : h;
964
943
  });
965
944
  }, y = () => {
966
- d((h) => Math.max(h, n.current));
945
+ u((h) => Math.max(h, r.current));
967
946
  }, l = () => {
968
947
  const h = e.currentTime - o.current;
969
- h >= 0 && h < vt && e.currentTime > n.current && (n.current = e.currentTime, g()), m(), o.current = e.currentTime;
948
+ h >= 0 && h < bt && e.currentTime > r.current && (r.current = e.currentTime, g()), m(), o.current = e.currentTime;
970
949
  }, f = () => {
971
950
  m(), y();
972
951
  };
@@ -974,18 +953,18 @@ function Ft({
974
953
  e.removeEventListener("timeupdate", l), e.removeEventListener("seeking", f), e.removeEventListener("seeked", f), e.removeEventListener("pause", y), e.removeEventListener("ended", y);
975
954
  };
976
955
  }, [e]);
977
- const u = T((m) => s.current ? Math.min(m, n.current) : m, []);
978
- return { maxWatchedTime: r, clampSeek: u };
956
+ const d = M((m) => s.current ? Math.min(m, r.current) : m, []);
957
+ return { maxWatchedTime: n, clampSeek: d };
979
958
  }
980
- const xe = /* @__PURE__ */ new Set([
959
+ const Ee = /* @__PURE__ */ new Set([
981
960
  "captions",
982
961
  "subtitles"
983
962
  ]), Ot = 2, Vt = 3;
984
963
  function Ut(e, t) {
985
- const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, s] = E(!1), [r, d] = E(!1), [u, m] = E(!1), y = r || t !== void 0 && !u;
986
- return N(() => {
987
- m(!1), d(!1);
988
- }, [a]), N(() => {
964
+ const { trackSrc: a, needsCrossOrigin: r } = Ie(t), [o, s] = x(!1), [n, u] = x(!1), [d, m] = x(!1), y = n || t !== void 0 && !d;
965
+ return _(() => {
966
+ m(!1), u(!1);
967
+ }, [a]), _(() => {
989
968
  if (!e)
990
969
  return;
991
970
  const l = e.textTracks, f = e.querySelector(
@@ -993,8 +972,8 @@ function Ut(e, t) {
993
972
  ), h = () => {
994
973
  let k = !1;
995
974
  for (const w of Array.from(l))
996
- xe.has(w.kind) && (w.mode = o ? "showing" : "hidden", w.cues && w.cues.length > 0 && (k = !0));
997
- if (d(k), f) {
975
+ Ee.has(w.kind) && (w.mode = o ? "showing" : "hidden", w.cues && w.cues.length > 0 && (k = !0));
976
+ if (u(k), f) {
998
977
  if (f.readyState === Vt)
999
978
  m(!0);
1000
979
  else if (f.readyState === Ot) {
@@ -1012,30 +991,30 @@ function Ut(e, t) {
1012
991
  });
1013
992
  }
1014
993
  for (const k of Array.from(l)) {
1015
- if (!xe.has(k.kind) || typeof k.addEventListener != "function")
994
+ if (!Ee.has(k.kind) || typeof k.addEventListener != "function")
1016
995
  continue;
1017
996
  const w = () => h();
1018
997
  k.addEventListener("cuechange", w), b.push(() => k.removeEventListener("cuechange", w));
1019
998
  }
1020
- const x = typeof l.addEventListener == "function", M = () => h();
1021
- return x && (l.addEventListener("addtrack", M), l.addEventListener("removetrack", M)), e.addEventListener("loadedmetadata", h), () => {
1022
- b.forEach((k) => k()), x && (l.removeEventListener("addtrack", M), l.removeEventListener("removetrack", M)), e.removeEventListener("loadedmetadata", h);
999
+ const E = typeof l.addEventListener == "function", T = () => h();
1000
+ return E && (l.addEventListener("addtrack", T), l.addEventListener("removetrack", T)), e.addEventListener("loadedmetadata", h), () => {
1001
+ b.forEach((k) => k()), E && (l.removeEventListener("addtrack", T), l.removeEventListener("removetrack", T)), e.removeEventListener("loadedmetadata", h);
1023
1002
  };
1024
1003
  }, [e, t, o, a]), J(
1025
1004
  () => ({
1026
1005
  trackSrc: a,
1027
- needsCrossOrigin: n,
1006
+ needsCrossOrigin: r,
1028
1007
  available: y,
1029
1008
  showing: o,
1030
1009
  toggle: () => s((l) => !l)
1031
1010
  }),
1032
- [a, n, y, o]
1011
+ [a, r, y, o]
1033
1012
  );
1034
1013
  }
1035
1014
  function $t(e) {
1036
1015
  const t = Math.min(
1037
- wt,
1038
- e * kt
1016
+ kt,
1017
+ e * xt
1039
1018
  );
1040
1019
  return e - t;
1041
1020
  }
@@ -1044,19 +1023,19 @@ function Kt({
1044
1023
  onComplete: t,
1045
1024
  resetKey: a
1046
1025
  }) {
1047
- const n = F(t);
1048
- n.current = t;
1026
+ const r = F(t);
1027
+ r.current = t;
1049
1028
  const o = F(!1), s = !!t;
1050
- N(() => {
1029
+ _(() => {
1051
1030
  o.current = !1;
1052
- }, [a]), N(() => {
1031
+ }, [a]), _(() => {
1053
1032
  if (!e || !s)
1054
1033
  return;
1055
- const r = () => {
1056
- o.current || !e.duration || e.currentTime >= $t(e.duration) && (o.current = !0, n.current?.(e));
1034
+ const n = () => {
1035
+ o.current || !e.duration || e.currentTime >= $t(e.duration) && (o.current = !0, r.current?.(e));
1057
1036
  };
1058
- return e.addEventListener("timeupdate", r), e.addEventListener("ended", r), () => {
1059
- e.removeEventListener("timeupdate", r), e.removeEventListener("ended", r);
1037
+ return e.addEventListener("timeupdate", n), e.addEventListener("ended", n), () => {
1038
+ e.removeEventListener("timeupdate", n), e.removeEventListener("ended", n);
1060
1039
  };
1061
1040
  }, [e, s]);
1062
1041
  }
@@ -1065,92 +1044,92 @@ function zt({
1065
1044
  onMilestone: t,
1066
1045
  resetKey: a
1067
1046
  }) {
1068
- const n = F(t);
1069
- n.current = t;
1047
+ const r = F(t);
1048
+ r.current = t;
1070
1049
  const o = F(/* @__PURE__ */ new Set()), s = !!t;
1071
- N(() => {
1050
+ _(() => {
1072
1051
  o.current.clear();
1073
- }, [a]), N(() => {
1052
+ }, [a]), _(() => {
1074
1053
  if (!e || !s)
1075
1054
  return;
1076
- const r = () => {
1055
+ const n = () => {
1077
1056
  if (!e.duration)
1078
1057
  return;
1079
- const d = Math.round(e.currentTime / e.duration * 100);
1080
- for (const u of yt)
1081
- o.current.has(u) || d >= u && (o.current.add(u), n.current?.(u, e));
1058
+ const u = Math.round(e.currentTime / e.duration * 100);
1059
+ for (const d of Lt)
1060
+ o.current.has(d) || u >= d && (o.current.add(d), r.current?.(d, e));
1082
1061
  };
1083
- return e.addEventListener("timeupdate", r), () => {
1084
- e.removeEventListener("timeupdate", r);
1062
+ return e.addEventListener("timeupdate", n), () => {
1063
+ e.removeEventListener("timeupdate", n);
1085
1064
  };
1086
1065
  }, [e, s]);
1087
1066
  }
1088
1067
  function Bt(e) {
1089
- const t = F(null), [a, n] = E(
1068
+ const t = F(null), [a, r] = x(
1090
1069
  null
1091
- ), o = F(0), s = T((i) => {
1092
- t.current = i, n(i);
1093
- }, []), [r, d] = E(!1), [u, m] = E(!1), [g, y] = E(0), [l, f] = E(0), [h, b] = E(1), [x, M] = E(!1), [k, w] = E(
1070
+ ), o = F(0), s = M((i) => {
1071
+ t.current = i, r(i);
1072
+ }, []), [n, u] = x(!1), [d, m] = x(!1), [g, y] = x(0), [l, f] = x(0), [h, b] = x(1), [E, T] = x(!1), [k, w] = x(
1094
1073
  oe
1095
1074
  );
1096
- N(() => {
1097
- o.current = 0, t.current && (t.current.playbackRate = oe), d(!1), m(!1), y(0), f(0), w(oe);
1098
- }, [e]), N(() => {
1075
+ _(() => {
1076
+ o.current = 0, t.current && (t.current.playbackRate = oe), u(!1), m(!1), y(0), f(0), w(oe);
1077
+ }, [e]), _(() => {
1099
1078
  const i = a;
1100
1079
  if (!i)
1101
1080
  return;
1102
- const D = () => m(!0), R = () => m(!1), B = () => m(!1), j = () => {
1103
- b(i.volume), M(i.muted);
1081
+ const D = () => m(!0), S = () => m(!1), B = () => m(!1), j = () => {
1082
+ b(i.volume), T(i.muted);
1104
1083
  }, K = () => f(i.duration || 0), X = () => {
1105
1084
  Et(i.playbackRate) && w(i.playbackRate);
1106
- }, _ = () => {
1085
+ }, N = () => {
1107
1086
  const U = performance.now();
1108
- U - o.current >= bt && (o.current = U, y(i.currentTime));
1087
+ U - o.current >= yt && (o.current = U, y(i.currentTime));
1109
1088
  };
1110
- return i.addEventListener("play", D), i.addEventListener("pause", R), i.addEventListener("ended", B), i.addEventListener("volumechange", j), i.addEventListener("loadedmetadata", K), i.addEventListener("ratechange", X), i.addEventListener("timeupdate", _), i.readyState >= 1 && i.duration && f(i.duration), () => {
1111
- i.removeEventListener("play", D), i.removeEventListener("pause", R), i.removeEventListener("ended", B), i.removeEventListener("volumechange", j), i.removeEventListener("loadedmetadata", K), i.removeEventListener("ratechange", X), i.removeEventListener("timeupdate", _);
1089
+ return i.addEventListener("play", D), i.addEventListener("pause", S), i.addEventListener("ended", B), i.addEventListener("volumechange", j), i.addEventListener("loadedmetadata", K), i.addEventListener("ratechange", X), i.addEventListener("timeupdate", N), i.readyState >= 1 && i.duration && f(i.duration), () => {
1090
+ i.removeEventListener("play", D), i.removeEventListener("pause", S), i.removeEventListener("ended", B), i.removeEventListener("volumechange", j), i.removeEventListener("loadedmetadata", K), i.removeEventListener("ratechange", X), i.removeEventListener("timeupdate", N);
1112
1091
  };
1113
1092
  }, [a]);
1114
- const O = T(() => {
1093
+ const O = M(() => {
1115
1094
  const i = t.current;
1116
1095
  i && (i.paused || i.ended ? i.play().catch(() => {
1117
1096
  }) : i.pause());
1118
- }, []), v = T(() => {
1097
+ }, []), v = M(() => {
1119
1098
  const i = t.current;
1120
1099
  i && (i.muted = !i.muted);
1121
- }, []), P = T((i) => {
1100
+ }, []), C = M((i) => {
1122
1101
  const D = t.current;
1123
1102
  if (!D)
1124
1103
  return;
1125
- const R = Math.max(0, Math.min(1, i));
1126
- D.volume = R, D.muted = R === 0;
1127
- }, []), A = T((i) => {
1104
+ const S = Math.max(0, Math.min(1, i));
1105
+ D.volume = S, D.muted = S === 0;
1106
+ }, []), A = M((i) => {
1128
1107
  const D = t.current;
1129
1108
  D && (D.playbackRate = i);
1130
- }, []), C = T((i) => {
1109
+ }, []), P = M((i) => {
1131
1110
  const D = t.current;
1132
1111
  if (!D)
1133
1112
  return;
1134
- const R = Math.max(0, Math.min(i, D.duration || i));
1135
- D.currentTime = R, y(R);
1113
+ const S = Math.max(0, Math.min(i, D.duration || i));
1114
+ D.currentTime = S, y(S);
1136
1115
  }, []);
1137
1116
  return {
1138
1117
  videoRef: t,
1139
1118
  videoElement: a,
1140
1119
  setVideoNode: s,
1141
- videoLoaded: r,
1142
- isPlaying: u,
1120
+ videoLoaded: n,
1121
+ isPlaying: d,
1143
1122
  currentTime: g,
1144
1123
  duration: l,
1145
1124
  volume: h,
1146
- isMuted: x,
1125
+ isMuted: E,
1147
1126
  playbackRate: k,
1148
- setVideoLoaded: d,
1127
+ setVideoLoaded: u,
1149
1128
  togglePlay: O,
1150
1129
  toggleMute: v,
1151
- setVolume: P,
1130
+ setVolume: C,
1152
1131
  setPlaybackRate: A,
1153
- seekTo: C
1132
+ seekTo: P
1154
1133
  };
1155
1134
  }
1156
1135
  function Ht({
@@ -1159,35 +1138,35 @@ function Ht({
1159
1138
  }) {
1160
1139
  const a = F(t);
1161
1140
  a.current = t;
1162
- const n = !!t;
1163
- N(() => {
1164
- if (!e || !n)
1141
+ const r = !!t;
1142
+ _(() => {
1143
+ if (!e || !r)
1165
1144
  return;
1166
1145
  let o = null;
1167
1146
  const s = () => {
1168
1147
  o && (clearInterval(o), o = null);
1169
- }, r = () => {
1148
+ }, n = () => {
1170
1149
  a.current?.(), s(), o = setInterval(() => {
1171
1150
  a.current?.();
1172
- }, Lt);
1173
- }, d = () => {
1151
+ }, wt);
1152
+ }, u = () => {
1174
1153
  a.current?.(), s();
1175
- }, u = () => s();
1176
- return e.addEventListener("play", r), e.addEventListener("pause", d), e.addEventListener("ended", u), () => {
1177
- s(), e.removeEventListener("play", r), e.removeEventListener("pause", d), e.removeEventListener("ended", u);
1154
+ }, d = () => s();
1155
+ return e.addEventListener("play", n), e.addEventListener("pause", u), e.addEventListener("ended", d), () => {
1156
+ s(), e.removeEventListener("play", n), e.removeEventListener("pause", u), e.removeEventListener("ended", d);
1178
1157
  };
1179
- }, [e, n]);
1158
+ }, [e, r]);
1180
1159
  }
1181
1160
  function Wt({
1182
1161
  src: e,
1183
1162
  poster: t,
1184
1163
  ariaLabel: a,
1185
- silent: n = !1,
1164
+ silent: r = !1,
1186
1165
  persistControls: o = !1,
1187
1166
  content: s,
1188
- defaultLanguage: r,
1189
- autoPlay: d = !1,
1190
- autoFocus: u = !1,
1167
+ defaultLanguage: n,
1168
+ autoPlay: u = !1,
1169
+ autoFocus: d = !1,
1191
1170
  download: m,
1192
1171
  restrictForwardSeek: g = !1,
1193
1172
  onTrackAction: y,
@@ -1195,33 +1174,33 @@ function Wt({
1195
1174
  onComplete: f,
1196
1175
  ...h
1197
1176
  }) {
1198
- const { t: b } = W(), x = F(null), M = J(() => ae(e), [e]), [k, w] = E(
1199
- () => Z(M, r)
1200
- ), O = M.some((L) => L.locale === k) ? k : Z(M, r), v = ee(e, O) ?? "", P = J(
1177
+ const { t: b } = W(), E = F(null), T = J(() => ae(e), [e]), [k, w] = x(
1178
+ () => Z(T, n)
1179
+ ), O = T.some((L) => L.locale === k) ? k : Z(T, n), v = ee(e, O) ?? "", C = J(
1201
1180
  () => ae(s?.captions),
1202
1181
  [s?.captions]
1203
- ), [A, C] = E(
1204
- () => Z(P, r)
1205
- ), i = P.some(
1182
+ ), [A, P] = x(
1183
+ () => Z(C, n)
1184
+ ), i = C.some(
1206
1185
  (L) => L.locale === A
1207
- ) ? A : Z(P, r), D = ee(s?.captions, i), R = J(
1186
+ ) ? A : Z(C, n), D = ee(s?.captions, i), S = J(
1208
1187
  () => ae(s?.descriptions, s?.describedSrc),
1209
1188
  [s?.descriptions, s?.describedSrc]
1210
- ), [B, j] = E(
1211
- () => Z(R, r)
1212
- ), K = R.some(
1189
+ ), [B, j] = x(
1190
+ () => Z(S, n)
1191
+ ), K = S.some(
1213
1192
  (L) => L.locale === B
1214
- ) ? B : Z(R, r), X = ee(
1193
+ ) ? B : Z(S, n), X = ee(
1215
1194
  s?.descriptions,
1216
1195
  K
1217
- ), _ = ee(
1196
+ ), N = ee(
1218
1197
  s?.describedSrc,
1219
1198
  K
1220
- ), [U, Y] = E(!1), G = U && _ ? _ : v, p = Bt(G), I = Ut(p.videoElement, D), z = It(p.videoElement, {
1199
+ ), [U, q] = x(!1), G = U && N ? N : v, p = Bt(G), I = Ut(p.videoElement, D), z = Nt(p.videoElement, {
1221
1200
  enabled: U,
1222
- describedSrc: _,
1201
+ describedSrc: N,
1223
1202
  descriptions: X
1224
- }), V = T(() => {
1203
+ }), V = M(() => {
1225
1204
  const L = p.videoRef.current;
1226
1205
  if (!L)
1227
1206
  return;
@@ -1230,28 +1209,28 @@ function Wt({
1230
1209
  }), L.removeEventListener("loadedmetadata", be);
1231
1210
  };
1232
1211
  L.addEventListener("loadedmetadata", be);
1233
- }, [p.videoRef]), Ne = T(
1212
+ }, [p.videoRef]), Ne = M(
1234
1213
  (L) => {
1235
1214
  V(), w(L);
1236
1215
  },
1237
1216
  [V]
1238
- ), _e = T(() => {
1239
- _ && V(), Y((L) => !L);
1240
- }, [_, V]), Fe = T(
1217
+ ), _e = M(() => {
1218
+ N && V(), q((L) => !L);
1219
+ }, [N, V]), Fe = M(
1241
1220
  (L) => {
1242
- C(L), I.showing || I.toggle();
1221
+ P(L), I.showing || I.toggle();
1243
1222
  },
1244
1223
  [I]
1245
- ), Oe = T(() => {
1224
+ ), Oe = M(() => {
1246
1225
  I.showing && I.toggle();
1247
- }, [I]), Ve = T(
1226
+ }, [I]), Ve = M(
1248
1227
  (L) => {
1249
- _ && V(), j(L), Y(!0);
1228
+ N && V(), j(L), q(!0);
1250
1229
  },
1251
- [_, V]
1252
- ), Ue = T(() => {
1253
- _ && V(), Y(!1);
1254
- }, [_, V]);
1230
+ [N, V]
1231
+ ), Ue = M(() => {
1232
+ N && V(), q(!1);
1233
+ }, [N, V]);
1255
1234
  Ht({ video: p.videoElement, onTrackAction: y }), zt({
1256
1235
  video: p.videoElement,
1257
1236
  onMilestone: l,
@@ -1265,50 +1244,50 @@ function Wt({
1265
1244
  video: p.videoElement,
1266
1245
  enabled: g,
1267
1246
  resetKey: v
1268
- }), pe = T(
1247
+ }), pe = M(
1269
1248
  (L) => p.seekTo(me(L)),
1270
1249
  [p, me]
1271
- ), { isFullscreen: Ke, toggleFullscreen: he } = Nt({
1272
- targetRef: x
1273
- }), ge = T(() => {
1274
- }, []), ve = !!(U && _);
1275
- N(() => {
1250
+ ), { isFullscreen: Ke, toggleFullscreen: he } = vt({
1251
+ targetRef: E
1252
+ }), ge = M(() => {
1253
+ }, []), ve = !!(U && N);
1254
+ _(() => {
1276
1255
  const L = p.videoRef.current;
1277
- n && L && (L.muted = !ve);
1278
- }, [n, ve, p.videoElement, p.videoRef]);
1256
+ r && L && (L.muted = !ve);
1257
+ }, [r, ve, p.videoElement, p.videoRef]);
1279
1258
  const ze = _t({
1280
1259
  videoRef: p.videoRef,
1281
1260
  seek: pe,
1282
1261
  togglePlay: p.togglePlay,
1283
- toggleMute: n ? ge : p.toggleMute,
1262
+ toggleMute: r ? ge : p.toggleMute,
1284
1263
  toggleFullscreen: he,
1285
- setVolume: n ? ge : p.setVolume
1264
+ setVolume: r ? ge : p.setVolume
1286
1265
  });
1287
- N(() => {
1288
- u && x.current?.focus({ preventScroll: !0 });
1289
- }, [u]);
1266
+ _(() => {
1267
+ d && E.current?.focus({ preventScroll: !0 });
1268
+ }, [d]);
1290
1269
  const Be = (L) => L.preventDefault();
1291
- return /* @__PURE__ */ S(
1270
+ return /* @__PURE__ */ R(
1292
1271
  "div",
1293
1272
  {
1294
- ref: x,
1273
+ ref: E,
1295
1274
  className: H(
1296
1275
  "group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background",
1297
1276
  "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none",
1298
- ue()
1277
+ de()
1299
1278
  ),
1300
1279
  role: "region",
1301
1280
  "aria-label": a ?? b("videoPlayer.regionLabel"),
1302
1281
  tabIndex: 0,
1303
1282
  onKeyDown: ze,
1304
- "data-video-captions": n ? "no-audio" : I.available ? "available" : "missing",
1283
+ "data-video-captions": r ? "no-audio" : I.available ? "available" : "missing",
1305
1284
  ...h,
1306
1285
  children: [
1307
- /* @__PURE__ */ S(
1286
+ /* @__PURE__ */ R(
1308
1287
  "video",
1309
1288
  {
1310
1289
  ref: p.setVideoNode,
1311
- autoPlay: d,
1290
+ autoPlay: u,
1312
1291
  playsInline: !0,
1313
1292
  disablePictureInPicture: !0,
1314
1293
  disableRemotePlayback: !0,
@@ -1362,7 +1341,7 @@ function Wt({
1362
1341
  tabIndex: -1,
1363
1342
  onClick: p.togglePlay,
1364
1343
  className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
1365
- children: /* @__PURE__ */ c(dt, { icon: Ce, size: "lg", color: "#fff" })
1344
+ children: /* @__PURE__ */ c(ut, { icon: Pe, size: "lg", color: "#fff" })
1366
1345
  }
1367
1346
  )
1368
1347
  }
@@ -1372,8 +1351,8 @@ function Wt({
1372
1351
  {
1373
1352
  "aria-hidden": !0,
1374
1353
  className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
1375
- children: /* @__PURE__ */ S("p", { className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]", children: [
1376
- /* @__PURE__ */ S("span", { className: "pr-1 font-medium not-italic opacity-70", children: [
1354
+ children: /* @__PURE__ */ R("p", { className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]", children: [
1355
+ /* @__PURE__ */ R("span", { className: "pr-1 font-medium not-italic opacity-70", children: [
1377
1356
  "[",
1378
1357
  b("videoPlayer.audioDescription"),
1379
1358
  "]"
@@ -1384,7 +1363,7 @@ function Wt({
1384
1363
  ) : null,
1385
1364
  /* @__PURE__ */ c("span", { className: "sr-only", "aria-live": "polite", children: p.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused") }),
1386
1365
  p.videoLoaded ? /* @__PURE__ */ c(
1387
- At,
1366
+ It,
1388
1367
  {
1389
1368
  isPlaying: p.isPlaying,
1390
1369
  currentTime: p.currentTime,
@@ -1395,21 +1374,21 @@ function Wt({
1395
1374
  isFullscreen: Ke,
1396
1375
  markerTime: g ? $e : void 0,
1397
1376
  blockSeekPastMarker: g,
1398
- containerRef: x,
1377
+ containerRef: E,
1399
1378
  captionsAvailable: I.available,
1400
1379
  captionsOn: I.showing,
1401
1380
  audioDescriptionAvailable: z.available,
1402
1381
  audioDescriptionOn: U,
1403
- silent: n,
1382
+ silent: r,
1404
1383
  persist: o,
1405
- audioLanguages: M,
1384
+ audioLanguages: T,
1406
1385
  audioLanguage: O,
1407
1386
  onAudioLanguageChange: Ne,
1408
- captionLanguages: P,
1387
+ captionLanguages: C,
1409
1388
  captionLanguage: i,
1410
1389
  onCaptionLanguageChange: Fe,
1411
1390
  onCaptionsOff: Oe,
1412
- audioDescriptionLanguages: R,
1391
+ audioDescriptionLanguages: S,
1413
1392
  audioDescriptionLanguage: K,
1414
1393
  onAudioDescriptionLanguageChange: Ve,
1415
1394
  onAudioDescriptionOff: Ue,
@@ -1430,11 +1409,11 @@ function Wt({
1430
1409
  }
1431
1410
  );
1432
1411
  }
1433
- const Yt = ft(
1412
+ const Jt = ft(
1434
1413
  mt("F0VideoPlayer", Wt)
1435
1414
  );
1436
1415
  export {
1437
- Yt as F,
1416
+ Jt as F,
1438
1417
  ae as c,
1439
1418
  Z as d,
1440
1419
  Le as l,