@vocalstack/player 0.1.0-alpha.33 → 0.1.0-alpha.34

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/index.js CHANGED
@@ -2,7 +2,7 @@ var La = Object.defineProperty;
2
2
  var va = (t, e, n) => e in t ? La(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var Me = (t, e, n) => va(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as i, jsxs as g, Fragment as be } from "react/jsx-runtime";
5
- import { useState as j, useRef as k, useEffect as _, useLayoutEffect as Vt, createContext as ci, useMemo as Ie, useContext as ka, useCallback as qe, Fragment as ja, forwardRef as za, useImperativeHandle as Ia } from "react";
5
+ import { useState as k, useRef as j, useEffect as E, useLayoutEffect as Ht, createContext as ci, useMemo as Ie, useContext as ka, useCallback as qe, Fragment as ja, forwardRef as za, useImperativeHandle as Ia } from "react";
6
6
  import { createPortal as Oa } from "react-dom";
7
7
  import { VocalStackError as ui, VocalStack as di } from "@vocalstack/js-sdk";
8
8
  const hi = "https://vocalstack.com", Ca = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDUxLjY5MDciIGhlaWdodD0iMTU1LjMwNjQxIiB2aWV3Qm94PSIwIDAgMTA1MS42OTA2IDE1NS4zMDY0MSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMC44ODczNDc3MSwwLDAsMC44OTExODY4MiwtNDIuNzE2NjMsLTEyMy44NTM4OCkiPjxwYXRoIHN0eWxlPSJmaWxsOiM1NWFiZTU7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjAuMzcyOTYyIiBkPSJtIDE2NS43NDM2OSwzMTIuMzQ1MTQgYyAtMy42NTkwNCwtMC45NTg2MSAtNi44OTEzMSwtMy4zNTM0OCAtOS4yMTQ5NCwtNi44Mjc1OSAtMS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iIHg9IjExOS43ODkyNCIgeT0iMTc2LjI1OTA5IiByeT0iNS42MTA0OTYiLz48L2c+PC9nPjwvc3ZnPg==";
@@ -61,7 +61,7 @@ function Aa({ size: t = 15 }) {
61
61
  function Ir({ size: t = 13 }) {
62
62
  return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "currentColor", style: { marginLeft: 2 }, "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M7.5 5.6a1 1 0 0 1 1.52-.85l9.1 5.55a1 1 0 0 1 0 1.7l-9.1 5.55a1 1 0 0 1-1.52-.85V5.6Z" }) });
63
63
  }
64
- function ct({ size: t = 15, color: e = "currentColor", track: n = "rgba(127,127,127,.35)", sw: r }) {
64
+ function ut({ size: t = 15, color: e = "currentColor", track: n = "rgba(127,127,127,.35)", sw: r }) {
65
65
  return /* @__PURE__ */ i(
66
66
  "span",
67
67
  {
@@ -86,7 +86,7 @@ function Ea({ size: t = 12 }) {
86
86
  /* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
87
87
  ] });
88
88
  }
89
- function An({ dark: t, height: e = 20, link: n = !0 }) {
89
+ function En({ dark: t, height: e = 20, link: n = !0 }) {
90
90
  const r = /* @__PURE__ */ i("img", { src: t ? Ca : ba, alt: "VocalStack", decoding: "sync", style: { height: e, width: "auto", display: "block" } });
91
91
  return n ? /* @__PURE__ */ i("a", { href: hi, style: { display: "block" }, children: r }) : r;
92
92
  }
@@ -96,24 +96,24 @@ function Or({ dark: t, size: e = 30 }) {
96
96
  function Qs({ children: t, panel: e, inset: n, className: r = "", style: s }) {
97
97
  return /* @__PURE__ */ i("div", { className: `vs-card${e ? " panel" : ""}${n ? " vs-card--inset" : ""} ${r}`, style: s, children: t });
98
98
  }
99
- function mt({ checked: t, onChange: e, label: n, disabled: r }) {
99
+ function yt({ checked: t, onChange: e, label: n, disabled: r }) {
100
100
  return /* @__PURE__ */ i("button", { type: "button", role: "switch", "aria-checked": t, "aria-label": n, className: "vs-toggle", disabled: r, onClick: () => e(!t), children: /* @__PURE__ */ i("span", { className: "vs-toggle__knob" }) });
101
101
  }
102
102
  function gr({ value: t, onChange: e, options: n, size: r, bordered: s = !0, fill: a }) {
103
- const o = k(null), [l, c] = j(null), u = Math.max(0, n.findIndex((d) => d.value === t));
104
- return Vt(() => {
103
+ const o = j(null), [l, c] = k(null), u = Math.max(0, n.findIndex((d) => d.value === t));
104
+ return Ht(() => {
105
105
  const d = o.current;
106
106
  if (!d) return;
107
- const h = d.querySelectorAll(".vs-switch__opt")[u];
108
- h && c({ left: h.offsetLeft, width: h.offsetWidth });
109
- }, [u, n.length]), _(() => {
107
+ const M = d.querySelectorAll(".vs-switch__opt")[u];
108
+ M && c({ left: M.offsetLeft, width: M.offsetWidth });
109
+ }, [u, n.length]), E(() => {
110
110
  const d = o.current;
111
111
  if (!d || typeof ResizeObserver > "u") return;
112
- const h = new ResizeObserver(() => {
113
- const M = d.querySelectorAll(".vs-switch__opt")[u];
114
- M && c({ left: M.offsetLeft, width: M.offsetWidth });
112
+ const M = new ResizeObserver(() => {
113
+ const h = d.querySelectorAll(".vs-switch__opt")[u];
114
+ h && c({ left: h.offsetLeft, width: h.offsetWidth });
115
115
  });
116
- return h.observe(d), () => h.disconnect();
116
+ return M.observe(d), () => M.disconnect();
117
117
  }, [u]), /* @__PURE__ */ g("div", { ref: o, role: "tablist", className: `vs-switch${r === "sm" ? " vs-switch--sm" : ""}${s ? "" : " vs-switch--borderless"}${a ? " vs-switch--fill" : ""}`, children: [
118
118
  l && /* @__PURE__ */ i("span", { className: "vs-switch__thumb", style: { left: l.left, width: l.width }, "aria-hidden": "true" }),
119
119
  n.map((d) => /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": d.value === t, className: "vs-switch__opt", onClick: () => e(d.value), children: [
@@ -125,7 +125,7 @@ function gr({ value: t, onChange: e, options: n, size: r, bordered: s = !0, fill
125
125
  function _a({ children: t, onClick: e, label: n, size: r, variant: s, bordered: a = !0, active: o, title: l }) {
126
126
  return /* @__PURE__ */ i("button", { type: "button", className: `vs-icon-btn${r === "sm" ? " vs-icon-btn--sm" : ""}${s === "primary" ? " vs-icon-btn--primary" : ""}${o ? " vs-icon-btn--primary" : ""}${a ? "" : " vs-icon-btn--borderless"}`, onClick: e, "aria-label": n, title: l ?? n, children: t });
127
127
  }
128
- function bn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bordered: o = !0, size: l, style: c, flagOnly: u }) {
128
+ function xn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bordered: o = !0, size: l, style: c, flagOnly: u }) {
129
129
  if (u)
130
130
  return /* @__PURE__ */ i("button", { type: "button", className: "mutebtn vs-flagbtn", onClick: r, "aria-label": n ? e ? `${n} (${e})` : n : e || "Language", title: n ?? e, style: c, children: /* @__PURE__ */ i("span", { style: { fontSize: 20, lineHeight: 1, display: "flex" }, children: t }) });
131
131
  const d = a && !!e;
@@ -136,7 +136,7 @@ function bn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bord
136
136
  ] });
137
137
  }
138
138
  function Ya({ value: t, label: e = "Copy", onCopied: n }) {
139
- const [r, s] = j(!1), a = async () => {
139
+ const [r, s] = k(!1), a = async () => {
140
140
  try {
141
141
  await navigator.clipboard.writeText(t), s(!0), n == null || n(), setTimeout(() => s(!1), 1400);
142
142
  } catch {
@@ -161,7 +161,7 @@ function Ya({ value: t, label: e = "Copy", onCopied: n }) {
161
161
  );
162
162
  }
163
163
  function Ua(t, e) {
164
- Vt(() => {
164
+ Ht(() => {
165
165
  const n = t.current, r = window.visualViewport;
166
166
  if (!e || !n || !r) return;
167
167
  let s = 0;
@@ -178,41 +178,46 @@ function Ua(t, e) {
178
178
  }, [t, e]);
179
179
  }
180
180
  function fr({ children: t, ms: e = 220 }) {
181
- const [n] = j(() => {
181
+ const [n] = k(() => {
182
182
  var r;
183
183
  return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, "(hover: hover) and (pointer: fine)").matches);
184
184
  });
185
185
  return n ? /* @__PURE__ */ i(Ra, { ms: e, children: t }) : /* @__PURE__ */ i("div", { children: t });
186
186
  }
187
187
  function Ra({ children: t, ms: e }) {
188
- const n = k(null), r = k(null), [s, a] = j(null);
189
- return Vt(() => {
188
+ const n = j(null), r = j(null), [s, a] = k(null);
189
+ return Ht(() => {
190
190
  const o = r.current, l = n.current;
191
191
  if (!o || !l) return;
192
192
  let c;
193
193
  const u = () => {
194
- const M = l.closest(".vs-sheet"), N = M ? parseFloat(getComputedStyle(M).maxHeight) : NaN;
195
- return !M || !Number.isFinite(N) ? 1 / 0 : Math.max(0, N - (M.offsetHeight - l.offsetHeight));
194
+ const h = l.closest(".vs-sheet"), N = h ? parseFloat(getComputedStyle(h).maxHeight) : NaN;
195
+ return !h || !Number.isFinite(N) ? 1 / 0 : Math.max(0, N - (h.offsetHeight - l.offsetHeight));
196
196
  }, d = () => {
197
- const M = o.offsetHeight;
198
- clearTimeout(c), a(Math.min(M, u())), M > u() && (c = setTimeout(() => a(M), e));
197
+ const h = l.closest(".vs-sheet-scrim");
198
+ if (h && h.clientHeight <= 460) {
199
+ clearTimeout(c), a(null);
200
+ return;
201
+ }
202
+ const N = o.offsetHeight;
203
+ clearTimeout(c), a(Math.min(N, u())), N > u() && (c = setTimeout(() => a(N), e));
199
204
  };
200
205
  if (d(), typeof ResizeObserver > "u") return () => clearTimeout(c);
201
- const h = new ResizeObserver(d);
202
- return h.observe(o), () => {
203
- h.disconnect(), clearTimeout(c);
206
+ const M = new ResizeObserver(d);
207
+ return M.observe(o), () => {
208
+ M.disconnect(), clearTimeout(c);
204
209
  };
205
210
  }, [e]), /* @__PURE__ */ i("div", { ref: n, style: { height: s ?? void 0, overflow: "clip", transition: s == null ? void 0 : `height ${e}ms cubic-bezier(.32,.72,0,1)` }, children: /* @__PURE__ */ i("div", { ref: r, children: t }) });
206
211
  }
207
- function Ht({ open: t, onClose: e, title: n, titleNode: r, note: s, doneLabel: a = "Done", children: o, drawer: l = !1, header: c, kind: u, sticky: d = !1 }) {
208
- const h = k(null);
209
- return Ua(h, t), _(() => {
212
+ function Wt({ open: t, onClose: e, title: n, titleNode: r, note: s, doneLabel: a = "Done", children: o, drawer: l = !1, header: c, kind: u, sticky: d = !1 }) {
213
+ const M = j(null);
214
+ return Ua(M, t), E(() => {
210
215
  if (!t) return;
211
- const M = (N) => {
216
+ const h = (N) => {
212
217
  N.key === "Escape" && e();
213
218
  };
214
- return window.addEventListener("keydown", M), () => window.removeEventListener("keydown", M);
215
- }, [t, e]), t ? /* @__PURE__ */ i("div", { ref: h, className: `vs-sheet-scrim${l ? " drawer" : ""}${d ? " vs-sheet-scrim--sticky" : ""}`, onClick: d ? void 0 : e, children: /* @__PURE__ */ g("div", { className: `vs-sheet${u ? ` vs-sheet--${u}` : ""}`, role: "dialog", "aria-modal": "true", "aria-label": n, onClick: (M) => M.stopPropagation(), children: [
219
+ return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
220
+ }, [t, e]), t ? /* @__PURE__ */ i("div", { ref: M, className: `vs-sheet-scrim${l ? " drawer" : ""}${d ? " vs-sheet-scrim--sticky" : ""}`, onClick: d ? void 0 : e, children: /* @__PURE__ */ g("div", { className: `vs-sheet${u ? ` vs-sheet--${u}` : ""}`, role: "dialog", "aria-modal": "true", "aria-label": n, onClick: (h) => h.stopPropagation(), children: [
216
221
  /* @__PURE__ */ i("div", { className: "vs-sheet__grip" }),
217
222
  /* @__PURE__ */ g("div", { className: "vs-sheet__head", children: [
218
223
  r ?? /* @__PURE__ */ i("span", { className: "vs-sheet__title", children: n }),
@@ -227,14 +232,14 @@ ci(0);
227
232
  function pr({ children: t, style: e, className: n }) {
228
233
  return /* @__PURE__ */ i("div", { className: n ? `eyebrow ${n}` : "eyebrow", style: e, children: t });
229
234
  }
230
- let jn = null;
235
+ let zn = null;
231
236
  function hu(t) {
232
- jn = t;
237
+ zn = t;
233
238
  }
234
239
  function Mi(t) {
235
- jn == null || jn(t);
240
+ zn == null || zn(t);
236
241
  }
237
- function En() {
242
+ function _n() {
238
243
  try {
239
244
  return document.createElement("audio").canPlayType("audio/x-caf; codecs=opus") === "probably" ? "caf" : "ogg";
240
245
  } catch {
@@ -269,14 +274,14 @@ async function $a(t) {
269
274
  }
270
275
  }
271
276
  function Ba(t, e, n = {}) {
272
- const r = new URLSearchParams({ kind: "delivery", format: En() });
277
+ const r = new URLSearchParams({ kind: "delivery", format: _n() });
273
278
  return n.accessToken && r.set("access_token", n.accessToken), n.listenerToken && r.set("listenerToken", n.listenerToken), n.shareCode && r.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${r}`;
274
279
  }
275
280
  function $s(t, e, n = {}, r = "background") {
276
- const s = new URLSearchParams({ kind: r, format: En() });
281
+ const s = new URLSearchParams({ kind: r, format: _n() });
277
282
  return n.accessToken && s.set("access_token", n.accessToken), n.listenerToken && s.set("listenerToken", n.listenerToken), n.shareCode && s.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
278
283
  }
279
- function Ln(t, e, n, r = {}) {
284
+ function vn(t, e, n, r = {}) {
280
285
  const s = new URLSearchParams({ kind: n });
281
286
  return n === "delivery" && s.set("format", "mp3"), r.accessToken && s.set("access_token", r.accessToken), r.listenerToken && s.set("listenerToken", r.listenerToken), r.shareCode && s.set("shareCode", r.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
282
287
  }
@@ -712,16 +717,16 @@ const rt = class rt {
712
717
  let o = 0;
713
718
  if (a)
714
719
  if (this.within = null, r.total > 1) {
715
- const c = Array.from({ length: r.total }, (d, h) => {
716
- var M;
717
- return ((M = r.got.get(h)) == null ? void 0 : M.durationS) ?? 0;
718
- }), u = c.reduce((d, h) => d + h, 0);
720
+ const c = Array.from({ length: r.total }, (d, M) => {
721
+ var h;
722
+ return ((h = r.got.get(M)) == null ? void 0 : h.durationS) ?? 0;
723
+ }), u = c.reduce((d, M) => d + M, 0);
719
724
  if (u > 0 && c.every((d) => d > 0)) {
720
725
  const d = a.frac * u;
721
- let h = 0, M = 0;
722
- for (; h < c.length - 1 && M + c[h] <= d; ) M += c[h++];
723
- if (o = -(d - M), h !== n) {
724
- this.partBase = M, this.startPartAt(e, h, d - M);
726
+ let M = 0, h = 0;
727
+ for (; M < c.length - 1 && h + c[M] <= d; ) h += c[M++];
728
+ if (o = -(d - h), M !== n) {
729
+ this.partBase = h, this.startPartAt(e, M, d - h);
725
730
  return;
726
731
  }
727
732
  }
@@ -754,9 +759,9 @@ const rt = class rt {
754
759
  if (this.rank(c) <= l || !this.speakable(c)) continue;
755
760
  const u = this.clips.get(c);
756
761
  if (u)
757
- for (const d of [...u.got.keys()].sort((h, M) => h - M)) {
758
- const h = u.got.get(d);
759
- r.push(h), s += h.durationS || 0;
762
+ for (const d of [...u.got.keys()].sort((M, h) => M - h)) {
763
+ const M = u.got.get(d);
764
+ r.push(M), s += M.durationS || 0;
760
765
  }
761
766
  }
762
767
  return r;
@@ -896,19 +901,19 @@ function qa(t, e, n, r = {}, s) {
896
901
  if (!(a != null && a.length)) return [];
897
902
  const o = Pa(r), l = o ? `&${o}` : "", c = t.voiceKey ? `&voice=${encodeURIComponent(t.voiceKey)}` : "";
898
903
  return a.flatMap((u) => {
899
- var M, N;
900
- const d = (M = t.clipRev) == null ? void 0 : M[String(u)], h = Math.max(1, ((N = t.clipParts) == null ? void 0 : N[String(u)]) ?? 1);
901
- return Array.from({ length: h }, (p, y) => {
904
+ var h, N;
905
+ const d = (h = t.clipRev) == null ? void 0 : h[String(u)], M = Math.max(1, ((N = t.clipParts) == null ? void 0 : N[String(u)]) ?? 1);
906
+ return Array.from({ length: M }, (p, y) => {
902
907
  var v;
903
908
  return {
904
909
  sentenceId: u,
905
910
  lang: t.lang,
906
- src: `${n}/v1/recordings/${e}/voice/${u}?lang=${encodeURIComponent(t.lang)}${c}&format=${En()}${y > 0 ? `&part=${y}` : ""}${d ? `&v=${encodeURIComponent(d)}` : ""}${l}`,
907
- durationS: h === 1 ? ((v = t.clipDur) == null ? void 0 : v[String(u)]) ?? 0 : 0,
911
+ src: `${n}/v1/recordings/${e}/voice/${u}?lang=${encodeURIComponent(t.lang)}${c}&format=${_n()}${y > 0 ? `&part=${y}` : ""}${d ? `&v=${encodeURIComponent(d)}` : ""}${l}`,
912
+ durationS: M === 1 ? ((v = t.clipDur) == null ? void 0 : v[String(u)]) ?? 0 : 0,
908
913
  voice: t.voice ?? null,
909
914
  cloned: !1,
910
915
  part: y,
911
- parts: h
916
+ parts: M
912
917
  };
913
918
  });
914
919
  });
@@ -948,8 +953,8 @@ function Ti(t, e) {
948
953
  for (const n of yr) n();
949
954
  }
950
955
  function Cr(t, e) {
951
- const [n, r] = j(() => Tr(t, e));
952
- return _(() => {
956
+ const [n, r] = k(() => Tr(t, e));
957
+ return E(() => {
953
958
  const s = () => r(Tr(t, e));
954
959
  return yr.add(s), window.addEventListener("storage", s), () => {
955
960
  yr.delete(s), window.removeEventListener("storage", s);
@@ -982,27 +987,27 @@ function eo(t) {
982
987
  const [e, n] = Cr(t === "ga" ? "vs.colW.ga" : "vs.colW", null);
983
988
  return [typeof e == "number" && e > 0 ? e : t === "ga" ? 560 : Xa, n];
984
989
  }
985
- function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPlaceholder: a = "Search languages", none: o, pinned: l = [], recent: c = [], requireVoice: u, keepOpen: d, busy: h }) {
986
- const [M, N] = j(""), [p, y] = j(!1), [v, m] = j(null);
987
- _(() => {
990
+ function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPlaceholder: a = "Search languages", none: o, pinned: l = [], recent: c = [], requireVoice: u, keepOpen: d, busy: M }) {
991
+ const [h, N] = k(""), [p, y] = k(!1), [v, m] = k(null);
992
+ E(() => {
988
993
  t && (N(""), y(!1), m(null));
989
994
  }, [t]);
990
995
  const f = Ie(() => {
991
- const S = M.trim().toLowerCase();
996
+ const S = h.trim().toLowerCase();
992
997
  return [...S ? s.filter((O) => O.label.toLowerCase().includes(S) || O.native.toLowerCase().includes(S) || O.code.toLowerCase().includes(S)) : s].sort((O, te) => {
993
998
  const K = l.indexOf(O.code), L = l.indexOf(te.code);
994
999
  return K !== -1 || L !== -1 ? (K === -1 ? 999 : K) - (L === -1 ? 999 : L) : O.label.localeCompare(te.label);
995
1000
  });
996
- }, [s, M, l]), I = Ie(
997
- () => M ? [] : c.map((S) => f.find((T) => T.code === S)).filter((S) => !!S).sort((S, T) => S.label.localeCompare(T.label)),
998
- [c, f, M]
999
- ), C = Ie(() => I.length ? f.filter((S) => !I.some((T) => T.code === S.code)) : f, [f, I]), D = p || M ? C.length : 12, B = C, Y = C.length - Math.min(D, C.length), X = (S, T = !1, E = !1) => {
1001
+ }, [s, h, l]), I = Ie(
1002
+ () => h ? [] : c.map((S) => f.find((T) => T.code === S)).filter((S) => !!S).sort((S, T) => S.label.localeCompare(T.label)),
1003
+ [c, f, h]
1004
+ ), C = Ie(() => I.length ? f.filter((S) => !I.some((T) => T.code === S.code)) : f, [f, I]), D = p || h ? C.length : 12, B = C, Y = C.length - Math.min(D, C.length), X = (S, T = !1, _ = !1) => {
1000
1005
  const O = !!u && !S.voice;
1001
1006
  return /* @__PURE__ */ g(
1002
1007
  "button",
1003
1008
  {
1004
1009
  type: "button",
1005
- className: `vs-picker__row${O ? " vs-picker__row--off" : ""}${E ? " vs-picker__row--extra" : ""}`,
1010
+ className: `vs-picker__row${O ? " vs-picker__row--off" : ""}${_ ? " vs-picker__row--extra" : ""}`,
1006
1011
  "aria-selected": n === S.code,
1007
1012
  onClick: () => {
1008
1013
  if (O) {
@@ -1023,16 +1028,16 @@ function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
1023
1028
  (te.key === "Enter" || te.key === " ") && (te.preventDefault(), te.stopPropagation(), Bs(S.code));
1024
1029
  }, children: /* @__PURE__ */ i(oe, { d: ee.close, size: 16 }) }) }),
1025
1030
  /* @__PURE__ */ i("span", { className: `vs-picker__slot${O ? " vs-picker__slot--wide" : ""}`, title: S.voice ? "Voice available" : O ? "No voice speaks this language yet" : void 0, children: O ? v === S.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : S.voice && /* @__PURE__ */ i(oe, { d: ee.headphones, size: 16 }) }),
1026
- /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === S.code && (h === S.code ? /* @__PURE__ */ i(ct, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: ee.check, size: 16, sw: 2.2 })) })
1031
+ /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === S.code && (M === S.code ? /* @__PURE__ */ i(ut, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: ee.check, size: 16, sw: 2.2 })) })
1027
1032
  ]
1028
1033
  },
1029
1034
  S.code
1030
1035
  );
1031
1036
  }, z = /* @__PURE__ */ g("div", { className: "vs-picker__search", children: [
1032
1037
  /* @__PURE__ */ i(oe, { d: ee.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
1033
- /* @__PURE__ */ i("input", { value: M, onChange: (S) => N(S.target.value), placeholder: a, "aria-label": a })
1038
+ /* @__PURE__ */ i("input", { value: h, onChange: (S) => N(S.target.value), placeholder: a, "aria-label": a })
1034
1039
  ] }), F = /* @__PURE__ */ g("div", { className: "vs-picker__list", children: [
1035
- o && !M && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__row", "data-vs-original": "", "aria-selected": n === null, onClick: () => {
1040
+ o && !h && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__row", "data-vs-original": "", "aria-selected": n === null, onClick: () => {
1036
1041
  r(null), d || e();
1037
1042
  }, children: [
1038
1043
  /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d: ee.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
@@ -1057,7 +1062,7 @@ function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
1057
1062
  ] }),
1058
1063
  f.length === 0 && /* @__PURE__ */ g("div", { className: "vs-picker__more", children: [
1059
1064
  "No match for “",
1060
- M,
1065
+ h,
1061
1066
  "”"
1062
1067
  ] })
1063
1068
  ] });
@@ -1065,30 +1070,30 @@ function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
1065
1070
  }
1066
1071
  function to({ open: t, onClose: e, title: n, note: r, sticky: s, ...a }) {
1067
1072
  const { search: o, list: l } = br({ ...a, open: t, onClose: e });
1068
- return /* @__PURE__ */ i(Ht, { open: t, onClose: e, title: n, note: r, drawer: !1, sticky: s, kind: "picker", header: o, children: l });
1073
+ return /* @__PURE__ */ i(Wt, { open: t, onClose: e, title: n, note: r, drawer: !1, sticky: s, kind: "picker", header: o, children: l });
1069
1074
  }
1070
1075
  function no({ src: t, t: e, playing: n, seekN: r, onToggle: s }) {
1071
- const a = k(null), [o, l] = j(!1), [c, u] = j(!1), d = k(e);
1072
- return d.current = e, _(() => {
1076
+ const a = j(null), [o, l] = k(!1), [c, u] = k(!1), d = j(e);
1077
+ return d.current = e, E(() => {
1073
1078
  l(!1), u(!1);
1074
- }, [t]), _(() => {
1075
- const h = a.current;
1076
- !h || !o || (n ? h.play().catch(() => {
1077
- }) : h.pause());
1078
- }, [n, o]), _(() => {
1079
- const h = a.current;
1080
- if (!h || !o) return;
1081
- const M = Math.max(0, d.current);
1082
- Math.abs(h.currentTime - M) > (n ? 0.4 : 0.08) && (h.currentTime = M);
1083
- }, [e, r, o, n]), _(() => {
1084
- const h = a.current;
1085
- if (!h || !o || !n) return;
1086
- const M = setInterval(() => {
1087
- const N = h.currentTime - d.current;
1088
- Math.abs(N) > 0.4 ? h.currentTime = Math.max(0, d.current) : h.playbackRate = Math.abs(N) > 0.08 ? N > 0 ? 0.97 : 1.03 : 1;
1079
+ }, [t]), E(() => {
1080
+ const M = a.current;
1081
+ !M || !o || (n ? M.play().catch(() => {
1082
+ }) : M.pause());
1083
+ }, [n, o]), E(() => {
1084
+ const M = a.current;
1085
+ if (!M || !o) return;
1086
+ const h = Math.max(0, d.current);
1087
+ Math.abs(M.currentTime - h) > (n ? 0.4 : 0.08) && (M.currentTime = h);
1088
+ }, [e, r, o, n]), E(() => {
1089
+ const M = a.current;
1090
+ if (!M || !o || !n) return;
1091
+ const h = setInterval(() => {
1092
+ const N = M.currentTime - d.current;
1093
+ Math.abs(N) > 0.4 ? M.currentTime = Math.max(0, d.current) : M.playbackRate = Math.abs(N) > 0.08 ? N > 0 ? 0.97 : 1.03 : 1;
1089
1094
  }, 500);
1090
1095
  return () => {
1091
- clearInterval(M), h.playbackRate = 1;
1096
+ clearInterval(h), M.playbackRate = 1;
1092
1097
  };
1093
1098
  }, [o, n]), c ? null : /* @__PURE__ */ i(
1094
1099
  "video",
@@ -1108,24 +1113,24 @@ function no({ src: t, t: e, playing: n, seekN: r, onToggle: s }) {
1108
1113
  }
1109
1114
  );
1110
1115
  }
1111
- const Jt = /* @__PURE__ */ new Map();
1116
+ const Xt = /* @__PURE__ */ new Map();
1112
1117
  function ro(t) {
1113
- const [e, n] = j(() => t ? Jt.get(t) ?? null : null);
1114
- return _(() => {
1118
+ const [e, n] = k(() => t ? Xt.get(t) ?? null : null);
1119
+ return E(() => {
1115
1120
  if (!t) {
1116
1121
  n(null);
1117
1122
  return;
1118
1123
  }
1119
- if (Jt.has(t)) {
1120
- n(Jt.get(t) ?? null);
1124
+ if (Xt.has(t)) {
1125
+ n(Xt.get(t) ?? null);
1121
1126
  return;
1122
1127
  }
1123
1128
  let r = !0;
1124
1129
  return fetch(`https://www.youtube.com/oembed?format=json&url=${encodeURIComponent(`https://www.youtube.com/watch?v=${t}`)}`).then((s) => s.ok ? s.json() : null).then((s) => {
1125
1130
  const a = s && typeof s.title == "string" && s.title.trim() ? s.title.trim() : null;
1126
- Jt.set(t, a), r && n(a);
1131
+ Xt.set(t, a), r && n(a);
1127
1132
  }).catch(() => {
1128
- Jt.set(t, null);
1133
+ Xt.set(t, null);
1129
1134
  }), () => {
1130
1135
  r = !1;
1131
1136
  };
@@ -1151,7 +1156,7 @@ function Hs(t, e) {
1151
1156
  t.muted = e.muted, Math.abs(t.currentTime - e.t) > ao && (t.currentTime = Math.max(0, e.t)), e.playing ? t.paused && Promise.resolve(t.play()).catch(() => {
1152
1157
  }) : t.paused || t.pause();
1153
1158
  }
1154
- const xn = "Remove background sound", oo = "Takes out everything that isn't speech: music, ambience and noise.";
1159
+ const Dn = "Remove background sound", oo = "Takes out everything that isn't speech: music, ambience and noise.";
1155
1160
  function lo(t) {
1156
1161
  const e = Math.max(0, Math.floor(t)), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = String(e % 60).padStart(2, "0");
1157
1162
  return n ? `${n}:${String(r).padStart(2, "0")}:${s}` : `${r}:${s}`;
@@ -1213,22 +1218,22 @@ function ar(t) {
1213
1218
  t && (t.pause(), t.removeAttribute("src"), t.load());
1214
1219
  }
1215
1220
  function vi(t, e) {
1216
- const [n, r] = j("off"), [s, a] = j([]), [o, l] = j(!1), c = k(null), u = k([null, null]), d = k([NaN, NaN]), h = k(0);
1217
- return _(() => {
1221
+ const [n, r] = k("off"), [s, a] = k([]), [o, l] = k(!1), c = j(null), u = j([null, null]), d = j([NaN, NaN]), M = j(0);
1222
+ return E(() => {
1218
1223
  if (a([]), l(!1), !t) {
1219
1224
  r("off");
1220
1225
  return;
1221
1226
  }
1222
- let M = !1, N;
1227
+ let h = !1, N;
1223
1228
  r("making");
1224
1229
  const p = () => {
1225
1230
  yo(t).then((y) => {
1226
- if (!M) {
1231
+ if (!h) {
1227
1232
  if (y.ready) {
1228
1233
  const v = new Audio();
1229
1234
  v.preload = "auto";
1230
1235
  const m = () => {
1231
- !M && c.current === v && r("ready");
1236
+ !h && c.current === v && r("ready");
1232
1237
  };
1233
1238
  v.addEventListener("canplay", m, { once: !0 }), v.addEventListener("error", m, { once: !0 }), v.src = t, c.current = v;
1234
1239
  return;
@@ -1240,31 +1245,31 @@ function vi(t, e) {
1240
1245
  a((v) => v.length === y.parts.length && v.every((m, f) => m.startS === y.parts[f].startS) ? v : y.parts), N = setTimeout(p, y.retryS * 1e3);
1241
1246
  }
1242
1247
  }).catch(() => {
1243
- M || (N = setTimeout(p, 5e3));
1248
+ h || (N = setTimeout(p, 5e3));
1244
1249
  });
1245
1250
  };
1246
1251
  return p(), () => {
1247
- M = !0, N && clearTimeout(N), ar(c.current), c.current = null, ar(u.current[0]), ar(u.current[1]), u.current = [null, null], d.current = [NaN, NaN];
1252
+ h = !0, N && clearTimeout(N), ar(c.current), c.current = null, ar(u.current[0]), ar(u.current[1]), u.current = [null, null], d.current = [NaN, NaN];
1248
1253
  };
1249
- }, [t]), _(() => {
1250
- const M = () => {
1254
+ }, [t]), E(() => {
1255
+ const h = () => {
1251
1256
  for (const m of u.current) m && !m.paused && m.pause();
1252
1257
  };
1253
1258
  if (n === "ready" && c.current) {
1254
- M(), Hs(c.current, e), l(!0);
1259
+ h(), Hs(c.current, e), l(!0);
1255
1260
  return;
1256
1261
  }
1257
1262
  const N = n === "making" ? No(s, e.t) : -1;
1258
1263
  if (N < 0) {
1259
- M(), l(!1);
1264
+ h(), l(!1);
1260
1265
  return;
1261
1266
  }
1262
- const p = mo(s, N, d.current, h.current);
1267
+ const p = mo(s, N, d.current, M.current);
1263
1268
  for (const [m, f] of p.load) {
1264
1269
  let I = u.current[m];
1265
1270
  I || (I = new Audio(), I.preload = "auto", u.current[m] = I), I.pause(), I.src = s[f].url, d.current[m] = s[f].startS;
1266
1271
  }
1267
- h.current = p.play;
1272
+ M.current = p.play;
1268
1273
  const y = u.current[p.play], v = u.current[1 - p.play];
1269
1274
  v && !v.paused && v.pause(), Hs(y, { ...e, t: e.t - s[N].startS }), l(!e.playing || y.readyState >= 3);
1270
1275
  }, [n, s, e.t, e.playing, e.muted]), { state: n, on: o, untilS: n === "ready" ? 1 / 0 : s.length ? s[s.length - 1].endS : 0 };
@@ -1288,7 +1293,7 @@ function vo(t, e, n) {
1288
1293
  const o = Math.max(1, ...a.map((c) => c.parts));
1289
1294
  let l = Math.max(0, n - s.start);
1290
1295
  for (let c = 0; c < o; c++) {
1291
- const u = a.find((h) => h.part === c);
1296
+ const u = a.find((M) => M.part === c);
1292
1297
  if (!u) return { kind: "missing", sid: s.sid };
1293
1298
  const d = u.durationS && u.durationS > 0 ? u.durationS : 1 / 0;
1294
1299
  if (l < d) return { kind: "play", sid: s.sid, src: u.src, offset: l };
@@ -1316,49 +1321,49 @@ function zo(t) {
1316
1321
  const c = /* @__PURE__ */ new Map();
1317
1322
  for (const u of t.clips) c.set(u.sentenceId, [...c.get(u.sentenceId) ?? [], u]);
1318
1323
  return c;
1319
- }, [t.clips]), n = k(/* @__PURE__ */ new Map()), r = k(null), [s, a] = j({ missing: null, sid: null }), o = (c) => {
1324
+ }, [t.clips]), n = j(/* @__PURE__ */ new Map()), r = j(null), [s, a] = k({ missing: null, sid: null }), o = (c) => {
1320
1325
  let u = n.current.get(c);
1321
1326
  return u || (u = new Audio(), u.preload = "auto", u.src = c, n.current.set(c, u)), u;
1322
1327
  }, l = () => {
1323
1328
  var c;
1324
1329
  (c = r.current) == null || c.el.pause(), r.current = null;
1325
1330
  };
1326
- return _(() => () => {
1331
+ return E(() => () => {
1327
1332
  for (const c of n.current.values())
1328
1333
  c.pause(), c.removeAttribute("src");
1329
1334
  n.current.clear(), r.current = null;
1330
- }, []), _(() => {
1335
+ }, []), E(() => {
1331
1336
  if (!t.on) {
1332
1337
  l(), a((p) => p.missing == null && p.sid == null ? p : { missing: null, sid: null });
1333
1338
  return;
1334
1339
  }
1335
1340
  const c = vo(t.lines, e, t.t), u = c.kind === "missing" ? c.sid : null, d = c.kind === "none" ? null : c.sid;
1336
1341
  a((p) => p.missing === u && p.sid === d ? p : { missing: u, sid: d });
1337
- const h = new Set(jo(t.lines, e, t.t));
1338
- for (const p of h) o(p);
1339
- const M = r.current;
1340
- M && h.add(M.src);
1341
- for (const [p, y] of n.current) !h.has(p) && (!M || M.el !== y) && (y.pause(), n.current.delete(p));
1342
+ const M = new Set(jo(t.lines, e, t.t));
1343
+ for (const p of M) o(p);
1344
+ const h = r.current;
1345
+ h && M.add(h.src);
1346
+ for (const [p, y] of n.current) !M.has(p) && (!h || h.el !== y) && (y.pause(), n.current.delete(p));
1342
1347
  if (!t.playing) {
1343
- M == null || M.el.pause();
1348
+ h == null || h.el.pause();
1344
1349
  return;
1345
1350
  }
1346
1351
  if (c.kind !== "play") {
1347
- if (M && !M.el.paused && !M.el.ended && ko(t.lines, t.t, M.sid)) return;
1348
- M && M.el.pause(), r.current = null;
1352
+ if (h && !h.el.paused && !h.el.ended && ko(t.lines, t.t, h.sid)) return;
1353
+ h && h.el.pause(), r.current = null;
1349
1354
  return;
1350
1355
  }
1351
- if (M && M.src === c.src) {
1352
- if (M.el.muted = t.muted, !M.el.ended && Math.abs(M.el.currentTime - c.offset) > wo)
1356
+ if (h && h.src === c.src) {
1357
+ if (h.el.muted = t.muted, !h.el.ended && Math.abs(h.el.currentTime - c.offset) > wo)
1353
1358
  try {
1354
- M.el.currentTime = c.offset;
1359
+ h.el.currentTime = c.offset;
1355
1360
  } catch {
1356
1361
  }
1357
- M.el.paused && !M.el.ended && M.el.play().catch(() => {
1362
+ h.el.paused && !h.el.ended && h.el.play().catch(() => {
1358
1363
  });
1359
1364
  return;
1360
1365
  }
1361
- M == null || M.el.pause();
1366
+ h == null || h.el.pause();
1362
1367
  const N = o(c.src);
1363
1368
  N.muted = t.muted;
1364
1369
  try {
@@ -1404,19 +1409,19 @@ function Oo(t, e) {
1404
1409
  };
1405
1410
  }
1406
1411
  function Co(t, e) {
1407
- const n = k(t);
1412
+ const n = j(t);
1408
1413
  n.current = t;
1409
1414
  const r = !!t;
1410
- _(() => {
1415
+ E(() => {
1411
1416
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1412
1417
  if (!(!a || !r))
1413
1418
  return Oo(a, () => n.current);
1414
1419
  }, [r]);
1415
1420
  const s = !!(t != null && t.playing);
1416
- _(() => {
1421
+ E(() => {
1417
1422
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1418
1423
  !a || !r || (a.playbackState = s ? "playing" : "paused");
1419
- }, [r, s]), _(() => {
1424
+ }, [r, s]), E(() => {
1420
1425
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1421
1426
  if (!(!a || !r || !e || typeof MediaMetadata > "u"))
1422
1427
  try {
@@ -1425,11 +1430,11 @@ function Co(t, e) {
1425
1430
  }
1426
1431
  }, [r, e]);
1427
1432
  }
1428
- function kt(t) {
1433
+ function zt(t) {
1429
1434
  const e = Math.max(0, Math.floor(t)), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = e % 60, a = String(r).padStart(2, "0"), o = String(s).padStart(2, "0");
1430
1435
  return n > 0 ? `${n}:${a}:${o}` : `${a}:${o}`;
1431
1436
  }
1432
- function Bt() {
1437
+ function Vt() {
1433
1438
  return {
1434
1439
  segments: /* @__PURE__ */ new Map(),
1435
1440
  sentences: /* @__PURE__ */ new Map(),
@@ -1450,11 +1455,11 @@ function bo(t, e) {
1450
1455
  const n = t.spans[t.spans.length - 1];
1451
1456
  return n ? (n.wallEnd ?? n.wallStart) + Math.max(0, e - (n.mediaEnd ?? n.mediaStart)) : e;
1452
1457
  }
1453
- function tn(t, e) {
1458
+ function nn(t, e) {
1454
1459
  return (e ?? []).map((n, r) => ({ text: String(n.text ?? ""), prob: n.prob ?? null, start: n.start ?? 0, end: n.end ?? 0, alts: n.alts, ...n.script === !0 ? { script: !0 } : {}, ...n.script === !0 && typeof n.recognized == "string" ? { recognized: n.recognized } : {}, seq: t, idx: r }));
1455
1460
  }
1456
1461
  function or(t, e) {
1457
- const n = e ?? Bt();
1462
+ const n = e ?? Vt();
1458
1463
  delete n.numbers, n.state = t.state, t.speakerLabels && (n.labels = t.speakerLabels), n.lastSeq = Math.max(n.lastSeq, t.lastSeq), n.spans = t.spans.map((r) => ({ wallStart: r.wallStart, wallEnd: r.wallEnd ?? null, mediaStart: r.mediaStart, mediaEnd: r.mediaEnd ?? null }));
1459
1464
  for (const r of t.segments) {
1460
1465
  const s = r.scriptPos;
@@ -1466,7 +1471,7 @@ function or(t, e) {
1466
1471
  start: r.start,
1467
1472
  end: r.end,
1468
1473
  text: r.text,
1469
- words: tn(r.seq, r.words),
1474
+ words: nn(r.seq, r.words),
1470
1475
  catchup: !!r.catchup,
1471
1476
  corrected: !!r.corrected,
1472
1477
  settled: !!r.settled,
@@ -1547,7 +1552,7 @@ function Do(t, e) {
1547
1552
  start: r.start,
1548
1553
  end: r.end,
1549
1554
  text: r.text,
1550
- words: r.words ? tn(r.seq, r.words) : (s == null ? void 0 : s.words) ?? [],
1555
+ words: r.words ? nn(r.seq, r.words) : (s == null ? void 0 : s.words) ?? [],
1551
1556
  catchup: !!r.catchup,
1552
1557
  corrected: (s == null ? void 0 : s.corrected) ?? !1,
1553
1558
  settled: (s == null ? void 0 : s.settled) ?? !1,
@@ -1578,7 +1583,7 @@ function Do(t, e) {
1578
1583
  case "transcript.amended": {
1579
1584
  const r = t.segments.get(e.seq);
1580
1585
  if (r && r.corrected && xo(r.words, e)) {
1581
- r.text = e.text, r.words = tn(e.seq, e.tail.words);
1586
+ r.text = e.text, r.words = nn(e.seq, e.tail.words);
1582
1587
  break;
1583
1588
  }
1584
1589
  if (r && !r.corrected) {
@@ -1586,12 +1591,12 @@ function Do(t, e) {
1586
1591
  const s = String(e.text).split(/\s+/).filter(Boolean);
1587
1592
  if (e.tail && e.tail.replaced <= r.words.length) {
1588
1593
  const a = r.words.slice(0, r.words.length - e.tail.replaced);
1589
- r.words = tn(e.seq, [...a, ...e.tail.words]);
1594
+ r.words = nn(e.seq, [...a, ...e.tail.words]);
1590
1595
  } else s.length === r.words.length && (r.words = r.words.map((a, o) => ({ ...a, text: s[o] })));
1591
1596
  if ((n = e.scriptWords) != null && n.length) {
1592
1597
  const a = (c) => c.toLowerCase().replace(/[^\p{L}\p{N}]/gu, ""), o = (e.fixes ?? []).filter((c) => String(c.kind ?? "").endsWith("script") && String(c.orig ?? "").trim()), l = (c) => {
1593
1598
  var u, d;
1594
- return c.recognized ?? ((d = (u = o.find((h) => String(h.repl ?? "").split(/\s+/).map(a).includes(a(c.text)))) == null ? void 0 : u.orig) == null ? void 0 : d.trim());
1599
+ return c.recognized ?? ((d = (u = o.find((M) => String(M.repl ?? "").split(/\s+/).map(a).includes(a(c.text)))) == null ? void 0 : u.orig) == null ? void 0 : d.trim());
1595
1600
  };
1596
1601
  r.words = r.words.map((c, u) => {
1597
1602
  if (!e.scriptWords.includes(u)) return c;
@@ -1648,7 +1653,7 @@ function Do(t, e) {
1648
1653
  if (r) {
1649
1654
  r.text = e.text, r.corrected = !e.reverted || r.corrected;
1650
1655
  const s = String(e.text).split(/\s+/).filter(Boolean);
1651
- Array.isArray(e.words) ? r.words = tn(e.seq, e.words) : s.length === r.words.length && (r.words = r.words.map((a, o) => ({ ...a, text: s[o], prob: o === e.wordIdx ? 1 : a.prob }))), r.translations = {};
1656
+ Array.isArray(e.words) ? r.words = nn(e.seq, e.words) : s.length === r.words.length && (r.words = r.words.map((a, o) => ({ ...a, text: s[o], prob: o === e.wordIdx ? 1 : a.prob }))), r.translations = {};
1652
1657
  }
1653
1658
  if (typeof e.sentenceId == "number") {
1654
1659
  const s = t.sentences.get(e.sentenceId);
@@ -1717,9 +1722,9 @@ const _o = 0.85, Yo = 0.75;
1717
1722
  function Uo(t) {
1718
1723
  return t == null ? "" : t < Yo ? "low" : t < _o ? "mid" : "";
1719
1724
  }
1720
- const vn = ["a", "b", "c", "d", "e", "f", "g", "h"];
1725
+ const kn = ["a", "b", "c", "d", "e", "f", "g", "h"];
1721
1726
  function Ro(t) {
1722
- return vn[(t % vn.length + vn.length) % vn.length];
1727
+ return kn[(t % kn.length + kn.length) % kn.length];
1723
1728
  }
1724
1729
  function Po(t) {
1725
1730
  if (t.numbers) return t.numbers;
@@ -1735,7 +1740,7 @@ function Po(t) {
1735
1740
  const r = [...e].sort((a, o) => a[1] - o[1] || a[0] - o[0]).map(([a]) => a), s = [...new Set([...Object.keys(t.speakers), ...Object.keys(t.speakerIds)].map(Number))].filter((a) => a >= 0 && !e.has(a)).sort((a, o) => a - o);
1736
1741
  return t.numbers = new Map([...r, ...s].map((a, o) => [a, o + 1])), t.numbers;
1737
1742
  }
1738
- function Dn(t, e) {
1743
+ function Sn(t, e) {
1739
1744
  if (e < 0) return 0;
1740
1745
  const n = Po(t);
1741
1746
  return n.get(e) ?? n.size + 1 + e;
@@ -1749,12 +1754,12 @@ function ki(t, e) {
1749
1754
  return Gs(t.speakers[e]) ?? Gs((n = t.speakerIds[e]) == null ? void 0 : n.name);
1750
1755
  }
1751
1756
  function Dr(t, e) {
1752
- return e < 0 ? "" : ki(t, e) ?? `Speaker ${Dn(t, e)}`;
1757
+ return e < 0 ? "" : ki(t, e) ?? `Speaker ${Sn(t, e)}`;
1753
1758
  }
1754
1759
  function ji(t, e) {
1755
1760
  if (e < 0) return "?";
1756
1761
  const n = ki(t, e);
1757
- return n ? (n.split(" ").filter(Boolean).slice(0, 2).map((s) => s[0]).join("") || `S${Dn(t, e)}`).toUpperCase() : `S${Dn(t, e)}`;
1762
+ return n ? (n.split(" ").filter(Boolean).slice(0, 2).map((s) => s[0]).join("") || `S${Sn(t, e)}`).toUpperCase() : `S${Sn(t, e)}`;
1758
1763
  }
1759
1764
  function $o(t) {
1760
1765
  if (t) {
@@ -1766,7 +1771,7 @@ function $o(t) {
1766
1771
  }
1767
1772
  function Sr(t, e) {
1768
1773
  const n = t.speakerIds[e], r = $o(n == null ? void 0 : n.color);
1769
- return { fg: r == null ? void 0 : r.fg, soft: r == null ? void 0 : r.soft, lane: Ro(Dn(t, e) - 1), hasVoice: !!n };
1774
+ return { fg: r == null ? void 0 : r.fg, soft: r == null ? void 0 : r.soft, lane: Ro(Sn(t, e) - 1), hasVoice: !!n };
1770
1775
  }
1771
1776
  function Bo(t, e, n, r = !1) {
1772
1777
  const s = n ? n.speakerLabels ?? "auto" : null, a = (r ? s : null) ?? t.labels ?? s ?? "on";
@@ -1810,10 +1815,10 @@ const Vo = /* @__PURE__ */ new Set([
1810
1815
  timeout: "That took too long. Please try again."
1811
1816
  }, wr = zi.internal, lr = "Can't reach VocalStack. Check your connection.", Zs = {
1812
1817
  NotAllowedError: "The browser blocked this. Allow it for this site, then try again.",
1813
- NotSupportedError: "This browser cannot play this.",
1818
+ NotSupportedError: "The audio couldn't be loaded. Try again in a moment.",
1814
1819
  AbortError: "It was cancelled."
1815
1820
  };
1816
- function jt(t) {
1821
+ function It(t) {
1817
1822
  const e = t, n = typeof (e == null ? void 0 : e.code) == "string" ? e.code : void 0, r = typeof (e == null ? void 0 : e.status) == "number" ? e.status : void 0, s = e == null ? void 0 : e.details;
1818
1823
  if (n || r && r >= 400)
1819
1824
  return n && Vo.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: r, details: s } : n === "unavailable" && r === void 0 ? { message: lr, code: n, details: s } : r === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : lr, code: n, status: r, details: s } : { message: n && zi[n] || wr, code: n, status: r, details: s };
@@ -1821,7 +1826,7 @@ function jt(t) {
1821
1826
  return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && Mi(t instanceof Error ? t : new Error(String(t))), { message: lr }) : Zs[a] ? { message: Zs[a] } : t instanceof Error && a === "Error" && !(t instanceof ui) ? { message: t.message } : { message: wr };
1822
1827
  }
1823
1828
  const Ii = "https://api.vocalstack.com", Ar = ci(null);
1824
- function Ut() {
1829
+ function Rt() {
1825
1830
  const t = ka(Ar);
1826
1831
  if (!t) throw new Error("VocalStack player hooks must be used inside <VocalStackPlayer> or <PlayerApiProvider>");
1827
1832
  return t;
@@ -1838,18 +1843,31 @@ function Go(t) {
1838
1843
  return Fo.test(t);
1839
1844
  }
1840
1845
  function Oi(t) {
1841
- const e = t.listen ?? null, n = e ? null : t.listenerToken ?? null, r = !e && !n && !!t.token && (!t.id || Go(t.id)), s = (t.baseUrl ?? Ii).replace(/\/$/, ""), a = k(t.token);
1846
+ const e = t.listen ?? null, n = e ? null : t.listenerToken ?? null, r = !e && !n && !!t.token && (!t.id || Go(t.id)), s = (t.baseUrl ?? Ii).replace(/\/$/, ""), a = j(t.token);
1842
1847
  a.current = t.token;
1843
1848
  const o = !!t.token, l = Ie(() => async () => {
1844
- const d = a.current;
1845
- return (typeof d == "function" ? await d() : d) || void 0;
1846
- }, []), c = t.client ?? null, u = Ie(() => c ?? new di({ baseUrl: s, token: o && !e ? l : void 0 }), [c, s, o, l, e]);
1849
+ const h = a.current;
1850
+ return (typeof h == "function" ? await h() : h) || void 0;
1851
+ }, []), [c, u] = k(() => {
1852
+ const h = t.token, N = typeof h == "function" ? h() : h;
1853
+ return typeof N == "string" && N ? N : null;
1854
+ });
1855
+ E(() => {
1856
+ if (!r) return;
1857
+ let h = !0;
1858
+ return l().then((N) => {
1859
+ h && N && u((p) => p ?? N);
1860
+ }), () => {
1861
+ h = !1;
1862
+ };
1863
+ }, [r, l]);
1864
+ const d = t.client ?? null, M = Ie(() => d ?? new di({ baseUrl: s, token: o && !e ? l : void 0 }), [d, s, o, l, e]);
1847
1865
  return Ie(() => {
1848
- if (e) return { client: u, origin: s, owner: !1, shareCode: null, listen: e, bearer: l, cred: { listenerToken: e.token }, readAs: { listenerToken: e.token } };
1849
- if (n) return { client: u, origin: s, owner: !1, shareCode: null, listen: null, bearer: l, cred: { listenerToken: n }, readAs: { listenerToken: n } };
1850
- const d = r ? null : t.id || null;
1851
- return { client: u, origin: s, owner: r, shareCode: d, listen: null, bearer: l, cred: { shareCode: d }, readAs: d ? { shareCode: d } : {} };
1852
- }, [u, s, r, t.id, l, e, n]);
1866
+ if (e) return { client: M, origin: s, owner: !1, shareCode: null, listen: e, bearer: l, cred: { listenerToken: e.token }, readAs: { listenerToken: e.token } };
1867
+ if (n) return { client: M, origin: s, owner: !1, shareCode: null, listen: null, bearer: l, cred: { listenerToken: n }, readAs: { listenerToken: n } };
1868
+ const h = r ? null : t.id || null;
1869
+ return { client: M, origin: s, owner: r, shareCode: h, listen: null, bearer: l, cred: r ? { accessToken: c ?? void 0 } : { shareCode: h }, readAs: h ? { shareCode: h } : {} };
1870
+ }, [M, s, r, t.id, l, e, n, c]);
1853
1871
  }
1854
1872
  function Zo(t, e) {
1855
1873
  return e ? { ...t, cred: { media: e } } : t;
@@ -1880,23 +1898,23 @@ async function qo(t, e) {
1880
1898
  };
1881
1899
  }
1882
1900
  function Ko(t, e) {
1883
- const [n, r] = j(null), [s, a] = j(!1), [o, l] = j(null), [c, u] = j(0);
1884
- return _(() => {
1901
+ const [n, r] = k(null), [s, a] = k(!1), [o, l] = k(null), [c, u] = k(0);
1902
+ return E(() => {
1885
1903
  let d = !0;
1886
- return qo(t, e).then((h) => {
1887
- d && (r(h), a(!1), l(null));
1888
- }).catch((h) => {
1904
+ return qo(t, e).then((M) => {
1905
+ d && (r(M), a(!1), l(null));
1906
+ }).catch((M) => {
1889
1907
  if (!d) return;
1890
- const M = jt(h);
1891
- M.code === "not_found" || M.status === 404 ? a(!0) : l(M);
1908
+ const h = It(M);
1909
+ h.code === "not_found" || h.status === 404 ? a(!0) : l(h);
1892
1910
  }), () => {
1893
1911
  d = !1;
1894
1912
  };
1895
1913
  }, [t, e, c]), { source: n, gone: s, error: o, reload: () => u((d) => d + 1) };
1896
1914
  }
1897
1915
  function Jo(t, e) {
1898
- const [n, r] = j(null);
1899
- return _(() => {
1916
+ const [n, r] = k(null);
1917
+ return E(() => {
1900
1918
  if (!t.owner || !e) {
1901
1919
  r(null);
1902
1920
  return;
@@ -1929,8 +1947,8 @@ async function qs(t, e, n = {}) {
1929
1947
  }
1930
1948
  const cr = /* @__PURE__ */ new Map();
1931
1949
  function Ci() {
1932
- const t = Ut(), [e, n] = j(cr.get(t.origin) ?? null);
1933
- return _(() => {
1950
+ const t = Rt(), [e, n] = k(cr.get(t.origin) ?? null);
1951
+ return E(() => {
1934
1952
  cr.has(t.origin) || t.client.languages.list().then((r) => {
1935
1953
  cr.set(t.origin, r), n(r);
1936
1954
  }).catch(() => {
@@ -1938,27 +1956,27 @@ function Ci() {
1938
1956
  }, [t]), e;
1939
1957
  }
1940
1958
  function bi(t, e) {
1941
- const [n, r] = j(null), [s, a] = j(null), [o, l] = j(0);
1942
- return _(() => {
1959
+ const [n, r] = k(null), [s, a] = k(null), [o, l] = k(0);
1960
+ return E(() => {
1943
1961
  let c = !0;
1944
- return t().then((u) => c && r(u)).catch((u) => c && a(jt(u))), () => {
1962
+ return t().then((u) => c && r(u)).catch((u) => c && a(It(u))), () => {
1945
1963
  c = !1;
1946
1964
  };
1947
1965
  }, [...e, o]), { data: n, error: s, reload: () => l((c) => c + 1) };
1948
1966
  }
1949
1967
  const Xo = (t) => new Promise((e) => setTimeout(e, t)), el = 2500, tl = 72;
1950
1968
  function nl(t, e) {
1951
- const n = Ut(), r = k(n);
1969
+ const n = Rt(), r = j(n);
1952
1970
  r.current = n;
1953
- const [s, a] = j(Bt), o = k(Bt()), l = k(null), c = k(e.lang ?? null), [u, d] = j(!1), [h, M] = j(null), [N, p] = j(!1), y = qe(() => {
1971
+ const [s, a] = k(Vt), o = j(Vt()), l = j(null), c = j(e.lang ?? null), [u, d] = k(!1), [M, h] = k(null), [N, p] = k(!1), y = qe(() => {
1954
1972
  const S = o.current;
1955
1973
  a({ ...S });
1956
- }, []), v = k(e);
1957
- v.current = e, _(() => {
1974
+ }, []), v = j(e);
1975
+ v.current = e, E(() => {
1958
1976
  if (!t) return;
1959
1977
  let S = !0, T = 0;
1960
- o.current = Bt(), a(Bt()), p(!1);
1961
- const E = n.client;
1978
+ o.current = Vt(), a(Vt()), p(!1);
1979
+ const _ = n.client;
1962
1980
  let O = o.current.state;
1963
1981
  const te = () => {
1964
1982
  var L, ie;
@@ -1971,15 +1989,15 @@ function nl(t, e) {
1971
1989
  let G = null;
1972
1990
  try {
1973
1991
  const pe = c.current;
1974
- if (G = await E.recordings.subscribe(t, { lang: pe ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !S) {
1992
+ if (G = await _.recordings.subscribe(t, { lang: pe ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !S) {
1975
1993
  G.close();
1976
1994
  return;
1977
1995
  }
1978
- T = 0, l.current = G, c.current !== pe && G.setLanguage(c.current), d(!0), M(null), o.current = or(G.snapshot, o.current), y(), te();
1996
+ T = 0, l.current = G, c.current !== pe && G.setLanguage(c.current), d(!0), h(null), o.current = or(G.snapshot, o.current), y(), te();
1979
1997
  for await (const le of G) {
1980
1998
  if (!S) break;
1981
1999
  if (le.type === "snapshot")
1982
- o.current = or(le.snapshot, le.reason === "gap" ? o.current : Bt()), y(), te();
2000
+ o.current = or(le.snapshot, le.reason === "gap" ? o.current : Vt()), y(), te();
1983
2001
  else if (le.type === "frame") {
1984
2002
  Do(o.current, le.frame);
1985
2003
  const Te = le.frame;
@@ -1988,29 +2006,29 @@ function nl(t, e) {
1988
2006
  }
1989
2007
  } catch (pe) {
1990
2008
  if (!S) return;
1991
- const le = jt(pe);
2009
+ const le = It(pe);
1992
2010
  if (le.code === "not_found" || le.status === 404) {
1993
- p(!0), M(le);
2011
+ p(!0), h(le);
1994
2012
  return;
1995
2013
  }
1996
2014
  try {
1997
- await E.recordings.get(t, n.readAs);
2015
+ await _.recordings.get(t, n.readAs);
1998
2016
  } catch (Te) {
1999
- const je = jt(Te);
2017
+ const je = It(Te);
2000
2018
  if (je.code === "not_found" || je.status === 404) {
2001
- p(!0), M(je);
2019
+ p(!0), h(je);
2002
2020
  return;
2003
2021
  }
2004
2022
  if (je.code === "forbidden" || je.code === "invalid_token" || je.code === "password_required" || je.status === 401 || je.status === 403) {
2005
- M(je);
2023
+ h(je);
2006
2024
  return;
2007
2025
  }
2008
2026
  }
2009
2027
  if (le.code === "forbidden" || le.code === "invalid_token" || le.code === "password_required" || le.status === 401 || le.status === 403) {
2010
- M(le);
2028
+ h(le);
2011
2029
  return;
2012
2030
  }
2013
- M(le);
2031
+ h(le);
2014
2032
  } finally {
2015
2033
  l.current === G && (l.current = null), d(!1);
2016
2034
  }
@@ -2023,32 +2041,32 @@ function nl(t, e) {
2023
2041
  S = !1, (K = l.current) == null || K.close(), l.current = null, d(!1);
2024
2042
  };
2025
2043
  }, [t, n, e.voice]);
2026
- const [m, f] = j(!1), [I, C] = j(null), D = k(0), [B, Y] = j(null), X = qe((S) => {
2044
+ const [m, f] = k(!1), [I, C] = k(null), D = j(0), [B, Y] = k(null), X = qe((S) => {
2027
2045
  var te;
2028
2046
  if (c.current = S, (te = l.current) == null || te.setLanguage(S), !t) return;
2029
- const T = r.current.client, E = ++D.current;
2047
+ const T = r.current.client, _ = ++D.current;
2030
2048
  f(!0), C(null);
2031
2049
  const O = (K) => T.recordings.transcript(t, { lang: S ?? void 0, ...r.current.readAs, asListener: !r.current.owner }).then((L) => {
2032
- E === D.current && (o.current = or(L, o.current), Y(S), y(), L.translationPending && K > 0 && window.setTimeout(() => {
2033
- E === D.current && O(K - 1).catch(() => {
2050
+ _ === D.current && (o.current = or(L, o.current), Y(S), y(), L.translationPending && K > 0 && window.setTimeout(() => {
2051
+ _ === D.current && O(K - 1).catch(() => {
2034
2052
  });
2035
2053
  }, el));
2036
2054
  });
2037
2055
  O(tl).catch(() => {
2038
- E === D.current && S && C(S);
2056
+ _ === D.current && S && C(S);
2039
2057
  }).finally(() => {
2040
- E === D.current && f(!1);
2058
+ _ === D.current && f(!1);
2041
2059
  });
2042
2060
  }, [y, t]), z = qe((S, T) => {
2043
- const E = o.current;
2061
+ const _ = o.current;
2044
2062
  let O = !1;
2045
2063
  for (const [te, K] of Object.entries(T)) {
2046
- const L = E.sentences.get(Number(te));
2064
+ const L = _.sentences.get(Number(te));
2047
2065
  L && (L.translations = { ...L.translations, [S]: K }, O = !0);
2048
2066
  }
2049
2067
  O && y();
2050
- }, [y]), F = qe(() => M(null), []);
2051
- return { model: s, connected: u, error: h, notFound: N, clearError: F, setLanguage: X, mergeTranslations: z, translating: m, translateFailed: I, shownLang: B };
2068
+ }, [y]), F = qe(() => h(null), []);
2069
+ return { model: s, connected: u, error: M, notFound: N, clearError: F, setLanguage: X, mergeTranslations: z, translating: m, translateFailed: I, shownLang: B };
2052
2070
  }
2053
2071
  const Ks = {
2054
2072
  English: { vcFor: "Voice for", vcMute: "Mute", vcUnmute: "Unmute", vcMuted: "MUTED", vcShared: "Also used by", vcUsedBy: "Used by", vcUnknownSpk: "Unknown", vcUse: "Use this voice", vcGetting: "Downloading…", vcSample: "Here’s how it sounds.", vcPreview: "PREVIEW", vcMale: "Male", vcFemale: "Female", vcSynth: "SYNTHETIC", origAudio: "ORIGINAL AUDIO", vcCloned: "VOICES", vcBadge: "CLONED", vcNone: "TEXT ONLY", vcNoVoice: "No voice for ", vcSheet: "VOICE", vcNeutral: "SYNTHETIC VOICE", vcWarm: "SYNTHETIC VOICE", searchPlaceholder: "Search this broadcast", noise: "Audio unclear", newLines: "new", live: "LIVE", ended: "ENDED", waiting: "WAITING", corrected: "CORRECTED", hostLine: "Hosted by Marcus Reed · 4 speakers", langLabel: "LANGUAGE", langCount: "100+ languages", read: "Read", listen: "Listen", watch: "Watch", waitTitle: "The broadcast hasn’t started yet", waitBody: "The transcript appears here as soon as the host starts speaking.", english: "ENGLISH", playing: "Playing the live audio", ready: "Tap to start audio", readyNote: "Set your volume first", voiceMeta: "ORIGINAL AUDIO", voice: "Voice", sheetTitle: "APP LANGUAGE", done: "Done", search: "Search 100+ languages", sheetNote: "Follow along in your language.", moreLangs: "more", confTitle: "Some words weren't heard clearly", confBody: "The transcript marks words the model is unsure about with a dashed underline. The words keep their colour, so only the underline tells you where to look.", confMid: "Slightly unsure — probably right", confHigh: "Low confidence — may be wrong", settings: "BROADCAST", setOrig: "Show original language", setTheme: "Appearance", light: "Light", dark: "Dark", setConf: "Show uncertain words", setConfHint1: "Colours words the model is unsure about — ", setConfMid: "amber", setConfSep: " or ", setConfLow: "red", setConfHint2: "", behindLive: "TRANSLATION LATENCY", behindNote: "How far the translation trails the speaker right now.", shareLabel: "LIVE TRANSLATION LINK", copy: "Copy", copied: "Copied" },
@@ -2114,14 +2132,14 @@ async function al(t) {
2114
2132
  Er(t);
2115
2133
  }
2116
2134
  async function ol(t, e, n, r = {}) {
2117
- var M, N;
2135
+ var h, N;
2118
2136
  const s = await t.client.recordings.export(e, n, { lang: r.lang ?? void 0, ...t.readAs });
2119
2137
  if (!s.ok) throw await Di(s);
2120
- const a = await s.blob(), o = s.headers.get("content-disposition") ?? "", l = (M = /filename\*=UTF-8''([^;]+)/i.exec(o)) == null ? void 0 : M[1], c = (N = /filename="([^"]+)"/i.exec(o)) == null ? void 0 : N[1], u = l ? decodeURIComponent(l) : c ?? `transcript.${n}`, d = URL.createObjectURL(a), h = document.createElement("a");
2121
- h.href = d, h.download = u, h.style.display = "none", document.body.appendChild(h), h.click(), h.remove(), window.setTimeout(() => URL.revokeObjectURL(d), 6e4);
2138
+ const a = await s.blob(), o = s.headers.get("content-disposition") ?? "", l = (h = /filename\*=UTF-8''([^;]+)/i.exec(o)) == null ? void 0 : h[1], c = (N = /filename="([^"]+)"/i.exec(o)) == null ? void 0 : N[1], u = l ? decodeURIComponent(l) : c ?? `transcript.${n}`, d = URL.createObjectURL(a), M = document.createElement("a");
2139
+ M.href = d, M.download = u, M.style.display = "none", document.body.appendChild(M), M.click(), M.remove(), window.setTimeout(() => URL.revokeObjectURL(d), 6e4);
2122
2140
  }
2123
2141
  async function ll(t, e) {
2124
- const { recordingId: n, lang: r, voiceKey: s, cred: a } = e, o = async () => (await t.client.recordings.voice(n, r, t.readAs)).filter((h) => h.lang === r), l = (d) => mi(d, s);
2142
+ const { recordingId: n, lang: r, voiceKey: s, cred: a } = e, o = async () => (await t.client.recordings.voice(n, r, t.readAs)).filter((M) => M.lang === r), l = (d) => mi(d, s);
2125
2143
  let c = l(await o());
2126
2144
  (!c || c.state === "clips" || c.state === "failed") && await e.request();
2127
2145
  const u = Date.now() + (e.timeoutMs ?? 10 * 6e4);
@@ -2164,11 +2182,11 @@ function dr(t) {
2164
2182
  };
2165
2183
  }
2166
2184
  function Ml(t, e, n = 0) {
2167
- const r = k(() => {
2185
+ const r = j(() => {
2168
2186
  });
2169
- _(() => {
2187
+ E(() => {
2170
2188
  r.current();
2171
- }, [n]), _(() => {
2189
+ }, [n]), E(() => {
2172
2190
  const s = t.current, a = e.current;
2173
2191
  if (!s || !a) return;
2174
2192
  const o = () => {
@@ -2183,7 +2201,7 @@ function Ml(t, e, n = 0) {
2183
2201
  const Y = o(), X = Y ? Y.offsetHeight : 0, z = s.clientHeight - X - 36, F = s.scrollHeight - s.clientHeight, S = z > 0 ? Math.max(30, Math.round(z * (s.clientHeight - X) / s.scrollHeight)) : 0;
2184
2202
  return { vis: z, max: F, size: S };
2185
2203
  };
2186
- let c = -1, u = null, d = !1, h = 0, M = 0;
2204
+ let c = -1, u = null, d = !1, M = 0, h = 0;
2187
2205
  const N = () => {
2188
2206
  const Y = o();
2189
2207
  if (!Y) return;
@@ -2212,11 +2230,11 @@ function Ml(t, e, n = 0) {
2212
2230
  a.style.right = (f >= 12 ? -(f - 6) : 2) + "px";
2213
2231
  const I = () => m(!0), C = (Y) => {
2214
2232
  const X = l();
2215
- X.vis - X.size <= 0 || (Y.preventDefault(), Y.stopPropagation(), a.setPointerCapture(Y.pointerId), d = !0, h = Y.clientY, M = s.scrollTop, a.style.cursor = "grabbing", p());
2233
+ X.vis - X.size <= 0 || (Y.preventDefault(), Y.stopPropagation(), a.setPointerCapture(Y.pointerId), d = !0, M = Y.clientY, h = s.scrollTop, a.style.cursor = "grabbing", p());
2216
2234
  }, D = (Y) => {
2217
2235
  if (!d) return;
2218
2236
  const X = l();
2219
- s.scrollTop = M + (Y.clientY - h) / (X.vis - X.size) * X.max, p();
2237
+ s.scrollTop = h + (Y.clientY - M) / (X.vis - X.size) * X.max, p();
2220
2238
  }, B = () => {
2221
2239
  d && (d = !1, a.style.cursor = "grab", p());
2222
2240
  };
@@ -2230,8 +2248,8 @@ function gl({ thumbRef: t }) {
2230
2248
  return /* @__PURE__ */ i("div", { className: "feedbar", "aria-hidden": "true", children: /* @__PURE__ */ i("div", { ref: t, className: "feedbar__thumb" }) });
2231
2249
  }
2232
2250
  function fl({ error: t, onClose: e }) {
2233
- const n = k(e);
2234
- if (n.current = e, _(() => {
2251
+ const n = j(e);
2252
+ if (n.current = e, E(() => {
2235
2253
  if (!t) return;
2236
2254
  const s = setTimeout(() => n.current(), 8e3);
2237
2255
  return () => clearTimeout(s);
@@ -2270,9 +2288,9 @@ function Mu({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
2270
2288
  ] });
2271
2289
  }
2272
2290
  function pl({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek: a, onSeekFrac: o, onScrubStart: l, onScrubEnd: c, frac: u, glideMs: d = 260 }) {
2273
- const h = k(null), M = k(!1), [N, p] = j(null), y = Math.max(1, e), v = N ?? u, m = v != null ? Math.min(100, Math.max(0, v * 100)) : t / Math.max(1, y - 1) * 100, f = u != null && d > 0 && N == null ? `width ${d}ms linear, left ${d}ms linear` : "none", I = (D) => {
2291
+ const M = j(null), h = j(!1), [N, p] = k(null), y = Math.max(1, e), v = N ?? u, m = v != null ? Math.min(100, Math.max(0, v * 100)) : t / Math.max(1, y - 1) * 100, f = u != null && d > 0 && N == null ? `width ${d}ms linear, left ${d}ms linear` : "none", I = (D) => {
2274
2292
  var z;
2275
- const B = (z = h.current) == null ? void 0 : z.getBoundingClientRect();
2293
+ const B = (z = M.current) == null ? void 0 : z.getBoundingClientRect();
2276
2294
  if (!B) return;
2277
2295
  const Y = Math.min(1, Math.max(0, (D.clientX - B.left) / Math.max(1, B.width)));
2278
2296
  if (o) {
@@ -2282,20 +2300,20 @@ function pl({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
2282
2300
  const X = Math.round(Y * (y - 1));
2283
2301
  X !== t && a(X);
2284
2302
  }, C = () => {
2285
- M.current && (M.current = !1, p(null), c == null || c());
2303
+ h.current && (h.current = !1, p(null), c == null || c());
2286
2304
  };
2287
2305
  return /* @__PURE__ */ g("div", { className: "rscrub", children: [
2288
2306
  /* @__PURE__ */ g(
2289
2307
  "div",
2290
2308
  {
2291
- ref: h,
2309
+ ref: M,
2292
2310
  className: "rscrub__track",
2293
2311
  onPointerDown: (D) => {
2294
2312
  var B;
2295
- M.current = !0, (B = h.current) == null || B.setPointerCapture(D.pointerId), l == null || l(), I(D), D.preventDefault();
2313
+ h.current = !0, (B = M.current) == null || B.setPointerCapture(D.pointerId), l == null || l(), I(D), D.preventDefault();
2296
2314
  },
2297
2315
  onPointerMove: (D) => {
2298
- M.current && I(D);
2316
+ h.current && I(D);
2299
2317
  },
2300
2318
  onPointerUp: C,
2301
2319
  onPointerCancel: C,
@@ -2335,7 +2353,7 @@ function ml({ f: t, desk: e, onOpen: n }) {
2335
2353
  ] });
2336
2354
  }
2337
2355
  function yl({ onOpen: t, alone: e }) {
2338
- const [n, r] = j(!1);
2356
+ const [n, r] = k(!1);
2339
2357
  return /* @__PURE__ */ g("span", { role: "button", title: "Fix this line", className: `badge badge--pen${n ? " is-over" : ""}`, style: { marginLeft: e ? "auto" : 0 }, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), onClick: (s) => {
2340
2358
  s.stopPropagation(), t();
2341
2359
  }, children: [
@@ -2344,15 +2362,15 @@ function yl({ onOpen: t, alone: e }) {
2344
2362
  ] });
2345
2363
  }
2346
2364
  function Tl(t, e, n, r) {
2347
- const s = Ut(), [a, o] = j([]), [l, c] = j(0), u = k(/* @__PURE__ */ new Set()), d = k(!1), h = Ie(() => new Map(n.filter((N) => N.sentenceId != null).map((N) => [N.sentenceId, N])), [n]);
2348
- _(() => {
2365
+ const s = Rt(), [a, o] = k([]), [l, c] = k(0), u = j(/* @__PURE__ */ new Set()), d = j(!1), M = Ie(() => new Map(n.filter((N) => N.sentenceId != null).map((N) => [N.sentenceId, N])), [n]);
2366
+ E(() => {
2349
2367
  u.current = /* @__PURE__ */ new Set();
2350
2368
  }, [t, e]);
2351
- const M = qe((N) => o(N), []);
2352
- return _(() => {
2369
+ const h = qe((N) => o(N), []);
2370
+ return E(() => {
2353
2371
  if (!t || !e || !a.length || d.current) return;
2354
2372
  const N = a.filter((p) => {
2355
- const y = h.get(p);
2373
+ const y = M.get(p);
2356
2374
  return !y || !y.text.trim() || !y.settled || y.translations[e] || y.language && y.language.slice(0, 2).toLowerCase() === e.slice(0, 2).toLowerCase() ? !1 : !u.current.has(`${e}:${p}`);
2357
2375
  }).slice(0, 40);
2358
2376
  if (N.length) {
@@ -2368,22 +2386,22 @@ function Tl(t, e, n, r) {
2368
2386
  d.current = !1, c((p) => p + 1);
2369
2387
  });
2370
2388
  }
2371
- }, [t, e, a, l, h, r]), M;
2389
+ }, [t, e, a, l, M, r]), h;
2372
2390
  }
2373
2391
  function wl(t) {
2374
2392
  return t.live || t.auto ? "From this session" : t.cloned ? t.library === !1 ? "This transcription only" : "Saved in Voices" : "";
2375
2393
  }
2376
- function Xt(t, e) {
2394
+ function en(t, e) {
2377
2395
  return t.cloned ? { rank: 0, head: e.vcSheet } : t.gender === "male" ? { rank: 1, head: e.vcMale.toUpperCase() } : t.gender === "female" ? { rank: 2, head: e.vcFemale.toUpperCase() } : { rank: 3, head: e.vcSynth };
2378
2396
  }
2379
2397
  function Ll(t, e) {
2380
- const n = t.slice().sort((s, a) => Xt(s, e).rank - Xt(a, e).rank || s.name.localeCompare(a.name, void 0, { numeric: !0 })), r = {};
2398
+ const n = t.slice().sort((s, a) => en(s, e).rank - en(a, e).rank || s.name.localeCompare(a.name, void 0, { numeric: !0 })), r = {};
2381
2399
  for (const s of n) {
2382
- const a = Xt(s, e).head;
2400
+ const a = en(s, e).head;
2383
2401
  r[a] = (r[a] ?? 0) + 1;
2384
2402
  }
2385
2403
  return n.map((s, a) => {
2386
- const o = Xt(s, e).head, l = a === 0 || Xt(n[a - 1], e).head !== o;
2404
+ const o = en(s, e).head, l = a === 0 || en(n[a - 1], e).head !== o;
2387
2405
  return { v: s, headOn: l, head: o, headCount: r[o], rule: l ? "0" : "1px solid var(--hair)" };
2388
2406
  });
2389
2407
  }
@@ -2427,28 +2445,28 @@ function ei(t) {
2427
2445
  function ti(t, e, n = !0) {
2428
2446
  const r = e.filter((o) => !o.cloned), s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
2429
2447
  for (const o of t) {
2430
- const c = (o.voiceId ? e.find((M) => M.cloned && !M.auto && M.consent !== "pending" && M.id === `clone:${o.voiceId}`) : void 0) ?? (n ? (o.voiceId ? e.find((M) => M.cloned && M.consent !== "pending" && M.id === `clone:${o.voiceId}`) : void 0) ?? (o.key >= 0 ? e.find((M) => M.cloned && M.auto && M.consent !== "pending" && M.speaker === o.key) : void 0) : void 0);
2448
+ const c = (o.voiceId ? e.find((h) => h.cloned && !h.auto && h.consent !== "pending" && h.id === `clone:${o.voiceId}`) : void 0) ?? (n ? (o.voiceId ? e.find((h) => h.cloned && h.consent !== "pending" && h.id === `clone:${o.voiceId}`) : void 0) ?? (o.key >= 0 ? e.find((h) => h.cloned && h.auto && h.consent !== "pending" && h.speaker === o.key) : void 0) : void 0);
2431
2449
  if (c) {
2432
2450
  a.set(o.key, c.id), s.add(c.id);
2433
2451
  continue;
2434
2452
  }
2435
- const u = r.filter((M) => !s.has(M.id)), h = (o.sex ? u.filter((M) => M.gender === o.sex) : [])[0] ?? u[0] ?? r[0];
2436
- h && (a.set(o.key, h.id), s.add(h.id));
2453
+ const u = r.filter((h) => !s.has(h.id)), M = (o.sex ? u.filter((h) => h.gender === o.sex) : [])[0] ?? u[0] ?? r[0];
2454
+ M && (a.set(o.key, M.id), s.add(M.id));
2437
2455
  }
2438
2456
  return a;
2439
2457
  }
2440
2458
  function kl({ roster: t, selected: e, onSelect: n, noClone: r, building: s, short: a, warn: o, sexOf: l, t: c }) {
2441
2459
  const u = t.find((d) => d.key === e) ?? t[0] ?? null;
2442
2460
  return u ? /* @__PURE__ */ i("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, padding: "0 2px 9px", margin: "0 -2px" }, children: t.map((d) => {
2443
- const h = d.key === u.key, M = d.key >= 0 ? (o == null ? void 0 : o(d)) ?? null : null, N = d.key >= 0 && !M && !!(s != null && s(d)), p = d.key >= 0 && !M && !N && r(d), y = d.key >= 0 && !M && !N && !p && !d.hasVoice && !!(a != null && a(d));
2461
+ const M = d.key === u.key, h = d.key >= 0 ? (o == null ? void 0 : o(d)) ?? null : null, N = d.key >= 0 && !h && !!(s != null && s(d)), p = d.key >= 0 && !h && !N && r(d), y = d.key >= 0 && !h && !N && !p && !d.hasVoice && !!(a != null && a(d));
2444
2462
  return /* @__PURE__ */ g(
2445
2463
  "button",
2446
2464
  {
2447
2465
  type: "button",
2448
- "aria-selected": h,
2466
+ "aria-selected": M,
2449
2467
  onClick: () => n(d.key),
2450
2468
  title: d.name,
2451
- style: { flex: "none", boxSizing: "border-box", display: "flex", alignItems: "center", gap: 7, minHeight: 34, padding: "5px 11px", borderRadius: 9, font: "inherit", background: h ? "var(--brand-tint)" : "var(--fill-05)", border: `1px solid ${h ? "var(--brand-line)" : "transparent"}`, cursor: "pointer" },
2469
+ style: { flex: "none", boxSizing: "border-box", display: "flex", alignItems: "center", gap: 7, minHeight: 34, padding: "5px 11px", borderRadius: 9, font: "inherit", background: M ? "var(--brand-tint)" : "var(--fill-05)", border: `1px solid ${M ? "var(--brand-line)" : "transparent"}`, cursor: "pointer" },
2452
2470
  children: [
2453
2471
  /* @__PURE__ */ i(
2454
2472
  "span",
@@ -2458,32 +2476,32 @@ function kl({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
2458
2476
  children: d.initial
2459
2477
  }
2460
2478
  ),
2461
- /* @__PURE__ */ i("span", { style: { fontSize: 12.5, fontWeight: 500, color: h ? "var(--ink-96)" : "var(--ink-62)", whiteSpace: "nowrap" }, children: d.name }),
2462
- d.hasVoice && !M && /* @__PURE__ */ i(Ei, { color: d.fg ?? (h ? "var(--ink-62)" : "var(--ink-45)") }),
2463
- M && /* @__PURE__ */ i("span", { title: M, "aria-label": M, style: { flex: "none", width: 15, height: 15, marginRight: -2, borderRadius: "50%", background: "#c27c00", color: "#fff", font: "900 10.5px/1 system-ui, sans-serif", display: "flex", alignItems: "center", justifyContent: "center" }, children: "!" }),
2464
- y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: h ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: ee.micOff, size: 13, sw: 1.7 }) }),
2465
- (p || N) && /* @__PURE__ */ i("span", { title: N ? "Cloning this voice…" : "No voice clone yet", "aria-label": N ? "Cloning this voice" : "No voice clone yet", style: { flex: "none", width: 10, height: 10, marginRight: -2, display: "flex", alignItems: "center", justifyContent: "center" }, children: N ? /* @__PURE__ */ i(ct, { size: 10, color: "var(--brand)", track: "var(--fill-10)", sw: 1.6 }) : /* @__PURE__ */ i("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--brand)" } }) })
2479
+ /* @__PURE__ */ i("span", { style: { fontSize: 12.5, fontWeight: 500, color: M ? "var(--ink-96)" : "var(--ink-62)", whiteSpace: "nowrap" }, children: d.name }),
2480
+ d.hasVoice && !h && /* @__PURE__ */ i(Ei, { color: d.fg ?? (M ? "var(--ink-62)" : "var(--ink-45)") }),
2481
+ h && /* @__PURE__ */ i("span", { title: h, "aria-label": h, style: { flex: "none", width: 15, height: 15, marginRight: -2, borderRadius: "50%", background: "#c27c00", color: "#fff", font: "900 10.5px/1 system-ui, sans-serif", display: "flex", alignItems: "center", justifyContent: "center" }, children: "!" }),
2482
+ y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: M ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: ee.micOff, size: 13, sw: 1.7 }) }),
2483
+ (p || N) && /* @__PURE__ */ i("span", { title: N ? "Cloning this voice…" : "No voice clone yet", "aria-label": N ? "Cloning this voice" : "No voice clone yet", style: { flex: "none", width: 10, height: 10, marginRight: -2, display: "flex", alignItems: "center", justifyContent: "center" }, children: N ? /* @__PURE__ */ i(ut, { size: 10, color: "var(--brand)", track: "var(--fill-10)", sw: 1.6 }) : /* @__PURE__ */ i("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--brand)" } }) })
2466
2484
  ]
2467
2485
  },
2468
2486
  d.key
2469
2487
  );
2470
2488
  }) }) : null;
2471
2489
  }
2472
- function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s = null, dlId: a = null, onPick: o, onAdd: l, onUse: c, usedBy: u, foldKey: d, foldFor: h = null, problem: M, noClone: N = null, t: p }) {
2473
- const y = Ie(() => Ll(e, p), [e, p]), [v, m] = j({});
2474
- _(() => {
2490
+ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s = null, dlId: a = null, onPick: o, onAdd: l, onUse: c, usedBy: u, foldKey: d, foldFor: M = null, problem: h, noClone: N = null, t: p }) {
2491
+ const y = Ie(() => Ll(e, p), [e, p]), [v, m] = k({});
2492
+ E(() => {
2475
2493
  m({});
2476
- }, [d, h]);
2494
+ }, [d, M]);
2477
2495
  const f = (D) => D === p.vcMale.toUpperCase() || D === p.vcFemale.toUpperCase(), I = (D) => {
2478
2496
  if (D === p.vcSheet) return !0;
2479
2497
  const B = v[D];
2480
- return B != null ? !B : !h || !f(D) ? !0 : D === (h === "female" ? p.vcFemale : p.vcMale).toUpperCase();
2498
+ return B != null ? !B : !M || !f(D) ? !0 : D === (M === "female" ? p.vcFemale : p.vcMale).toUpperCase();
2481
2499
  }, C = !!r && r !== n;
2482
2500
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
2483
- M && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
2501
+ h && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
2484
2502
  /* @__PURE__ */ i(oe, { d: ee.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
2485
- /* @__PURE__ */ i("span", { style: { flex: 1, minWidth: 0, fontSize: 12.5, fontWeight: 300, lineHeight: 1.45, color: "var(--ink-80)", textWrap: "pretty" }, children: M }),
2486
- /* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(Ya, { value: M, label: "Copy this error" }) })
2503
+ /* @__PURE__ */ i("span", { style: { flex: 1, minWidth: 0, fontSize: 12.5, fontWeight: 300, lineHeight: 1.45, color: "var(--ink-80)", textWrap: "pretty" }, children: h }),
2504
+ /* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(Ya, { value: h, label: "Copy this error" }) })
2487
2505
  ] }),
2488
2506
  t,
2489
2507
  N && /* @__PURE__ */ g(be, { children: [
@@ -2499,7 +2517,7 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2499
2517
  ] })
2500
2518
  ] }),
2501
2519
  y.map(({ v: D, headOn: B, head: Y, headCount: X, rule: z }, F) => {
2502
- const S = wl(D), T = a === D.id, E = I(Y), O = (u == null ? void 0 : u(D)) ?? null;
2520
+ const S = wl(D), T = a === D.id, _ = I(Y), O = (u == null ? void 0 : u(D)) ?? null;
2503
2521
  return /* @__PURE__ */ g(ja, { children: [
2504
2522
  B && Y === p.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: F === 0 && !N ? "0" : "1px solid var(--hair)", userSelect: "none" }, children: /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: Y }) }),
2505
2523
  B && Y !== p.vcSheet && /* @__PURE__ */ g(
@@ -2509,11 +2527,11 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2509
2527
  onClick: (te) => {
2510
2528
  te.stopPropagation(), m((K) => ({ ...K, [Y]: I(Y) }));
2511
2529
  },
2512
- title: `${E ? "Hide " : "Show "}${Y.toLowerCase()} voices`,
2513
- "aria-expanded": E,
2514
- style: { width: "100%", textAlign: "left", font: "inherit", display: "flex", alignItems: "center", gap: 7, padding: E ? "14px 2px 6px" : "14px 2px 14px", border: 0, borderTop: F === 0 && !N ? "0" : "1px solid var(--hair)", background: "transparent", cursor: "pointer", userSelect: "none" },
2530
+ title: `${_ ? "Hide " : "Show "}${Y.toLowerCase()} voices`,
2531
+ "aria-expanded": _,
2532
+ style: { width: "100%", textAlign: "left", font: "inherit", display: "flex", alignItems: "center", gap: 7, padding: _ ? "14px 2px 6px" : "14px 2px 14px", border: 0, borderTop: F === 0 && !N ? "0" : "1px solid var(--hair)", background: "transparent", cursor: "pointer", userSelect: "none" },
2515
2533
  children: [
2516
- /* @__PURE__ */ i(oe, { d: ee.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${E ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2534
+ /* @__PURE__ */ i(oe, { d: ee.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${_ ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2517
2535
  /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: Y }),
2518
2536
  /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: X })
2519
2537
  ]
@@ -2524,10 +2542,10 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2524
2542
  {
2525
2543
  type: "button",
2526
2544
  "aria-selected": D.id === n,
2527
- "aria-hidden": !E,
2528
- tabIndex: E ? void 0 : -1,
2545
+ "aria-hidden": !_,
2546
+ tabIndex: _ ? void 0 : -1,
2529
2547
  onClick: () => o(D),
2530
- style: { width: "100%", textAlign: "left", font: "inherit", border: 0, borderTop: E ? z : "0", display: "flex", alignItems: "center", gap: 11, padding: E ? "11px 8px" : "0px 8px", margin: "0 -6px", borderRadius: 10, background: r === D.id ? "var(--brand-tint)" : "transparent", cursor: "pointer", opacity: E ? 1 : 0, maxHeight: E ? 120 : 0, overflow: "hidden", transition: "max-height 280ms cubic-bezier(.32,.72,0,1),padding 280ms cubic-bezier(.32,.72,0,1),opacity 200ms ease" },
2548
+ style: { width: "100%", textAlign: "left", font: "inherit", border: 0, borderTop: _ ? z : "0", display: "flex", alignItems: "center", gap: 11, padding: _ ? "11px 8px" : "0px 8px", margin: "0 -6px", borderRadius: 10, background: r === D.id ? "var(--brand-tint)" : "transparent", cursor: "pointer", opacity: _ ? 1 : 0, maxHeight: _ ? 120 : 0, overflow: "hidden", transition: "max-height 280ms cubic-bezier(.32,.72,0,1),padding 280ms cubic-bezier(.32,.72,0,1),opacity 200ms ease" },
2531
2549
  children: [
2532
2550
  /* @__PURE__ */ i("span", { title: T ? "Downloading this voice" : void 0, style: { flex: "none", width: 32, height: 32, borderRadius: "50%", background: T ? "transparent" : D.cloned ? "var(--brand-soft)" : "var(--fill-06)", display: "flex", alignItems: "center", justifyContent: "center" }, children: T ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : s === D.id ? /* @__PURE__ */ g("span", { className: "vcplay", children: [
2533
2551
  /* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(zl, { height: 13, width: 2.5 }) }),
@@ -2576,7 +2594,7 @@ function vr(t, e) {
2576
2594
  return { flag: e ? (n == null ? void 0 : n.flag) ?? "🌐" : Il, code: e ? e.toUpperCase() : "", label: (n == null ? void 0 : n.native) ?? "As spoken", name: (n == null ? void 0 : n.name) ?? "Original" };
2577
2595
  }
2578
2596
  function Ol(t, e, n = 0, r) {
2579
- const s = (r == null ? void 0 : r.id) ?? null, a = (r == null ? void 0 : r.token) ?? null, o = (r == null ? void 0 : r.shareCode) ?? null, l = Ut(), { data: c } = bi(async () => {
2597
+ const s = (r == null ? void 0 : r.id) ?? null, a = (r == null ? void 0 : r.token) ?? null, o = (r == null ? void 0 : r.shareCode) ?? null, l = Rt(), { data: c } = bi(async () => {
2580
2598
  if (!t || !e) return null;
2581
2599
  try {
2582
2600
  return await l.client.voices.available(t, { recording: s ?? void 0, shareCode: s ? o ?? void 0 : void 0, asOwner: l.owner });
@@ -2590,14 +2608,14 @@ function Cl(t) {
2590
2608
  return (/* @__PURE__ */ new Set([...Object.keys(t.speakers), ...Object.keys(t.speakerIds)])).size;
2591
2609
  }
2592
2610
  function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, sentenceIds: a }) {
2593
- const o = Ut(), { data: l, reload: c } = bi(async () => {
2611
+ const o = Rt(), { data: l, reload: c } = bi(async () => {
2594
2612
  if (!t || !e) return null;
2595
2613
  const K = await o.client.recordings.voice(t, e, o.readAs).catch(() => []);
2596
2614
  return { recordingId: t, lang: e, rows: K.filter((L) => L.lang === e) };
2597
2615
  }, [t, e, o, n]), u = Ie(
2598
2616
  () => l && l.lang === e && l.recordingId === t ? l.rows : [],
2599
2617
  [l, e, t]
2600
- ), d = Ie(() => mi(u, s), [u, s]), h = d ? d.voiceKey || null : s, [M, N] = j(null), [p, y] = j(null), v = k(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${h ?? ""}`, f = qe(async (K, L) => {
2618
+ ), d = Ie(() => mi(u, s), [u, s]), M = d ? d.voiceKey || null : s, [h, N] = k(null), [p, y] = k(null), v = j(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${M ?? ""}`, f = qe(async (K, L) => {
2601
2619
  if (!t || !e || !n) return;
2602
2620
  const ie = L != null && L.size ? null : ei(K), ne = L != null && L.size ? L : ie, G = ne && ne.size ? Object.fromEntries([...ne].map(([Te, je]) => [String(Te), je])) : null, J = `${t}|${e}|${G ? JSON.stringify(G) : K ?? ""}`;
2603
2621
  if (v.current.has(J)) return;
@@ -2616,25 +2634,25 @@ function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2616
2634
  const K = `${t ?? ""}|${e ?? ""}|`;
2617
2635
  for (const L of [...v.current]) L.startsWith(K) && v.current.delete(L);
2618
2636
  y(null);
2619
- }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || M === m, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, B = (a == null ? void 0 : a.join(",")) ?? "", [Y, X] = j(null), z = Ie(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = Ie(() => n && B ? B.split(",").map(Number).filter((K) => !z.has(K)) : [], [n, B, z]), S = k(null);
2620
- _(() => {
2637
+ }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || h === m, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, B = (a == null ? void 0 : a.join(",")) ?? "", [Y, X] = k(null), z = Ie(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = Ie(() => n && B ? B.split(",").map(Number).filter((K) => !z.has(K)) : [], [n, B, z]), S = j(null);
2638
+ E(() => {
2621
2639
  if (!n || !t || !e || !F.length) return;
2622
- const K = Y ?? F[0], L = F.find((pe) => pe >= K) ?? F[0], ie = `${t}|${e}|${h ?? ""}`, ne = S.current;
2640
+ const K = Y ?? F[0], L = F.find((pe) => pe >= K) ?? F[0], ie = `${t}|${e}|${M ?? ""}`, ne = S.current;
2623
2641
  if (ne && ne.key === ie && Math.abs(ne.near - L) < 12 && Date.now() - ne.at < 6e4) return;
2624
2642
  S.current = { key: ie, near: L, at: Date.now() };
2625
- const G = ei(h), J = { langs: [e], near: L };
2626
- G && G.size ? J.voiceBySpeaker = Object.fromEntries([...G].map(([pe, le]) => [String(pe), le])) : h && (J.voice = h), qs(o, `/v1/recordings/${t}/voice`, { method: "POST", body: J }).then((pe) => {
2643
+ const G = ei(M), J = { langs: [e], near: L };
2644
+ G && G.size ? J.voiceBySpeaker = Object.fromEntries([...G].map(([pe, le]) => [String(pe), le])) : M && (J.voice = M), qs(o, `/v1/recordings/${t}/voice`, { method: "POST", body: J }).then((pe) => {
2627
2645
  pe.ok || (S.current = null);
2628
2646
  }).catch(() => {
2629
2647
  S.current = null;
2630
2648
  });
2631
- }, [n, t, e, h, Y, F, o]);
2632
- const T = F.length > 0, E = k({ n: -1, at: 0 });
2633
- _(() => {
2649
+ }, [n, t, e, M, Y, F, o]);
2650
+ const T = F.length > 0, _ = j({ n: -1, at: 0 });
2651
+ E(() => {
2634
2652
  if (!T) return;
2635
2653
  const K = setInterval(() => {
2636
2654
  const L = z.size;
2637
- L !== E.current.n && (E.current = { n: L, at: Date.now() }), !(Date.now() - E.current.at > 10 * 6e4) && c();
2655
+ L !== _.current.n && (_.current = { n: L, at: Date.now() }), !(Date.now() - _.current.at > 10 * 6e4) && c();
2638
2656
  }, 3e3);
2639
2657
  return () => clearInterval(K);
2640
2658
  }, [T, c, z]);
@@ -2643,13 +2661,13 @@ function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2643
2661
  const K = B ? B.split(",").map(Number).filter((ie) => !n || z.has(ie)) : void 0, L = d ?? (K != null && K.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
2644
2662
  return qa(L, t, o.origin, r, K);
2645
2663
  }, [d, t, o, r, B, e, s, n, z]), te = Ie(() => new Set(F), [F]);
2646
- return { listed: l, rows: u, track: d, renderVoiceId: h, rendering: C, failed: D, clips: O, requestRender: f, forget: I, reload: c, setNear: X, missing: F.length, coming: te };
2664
+ return { listed: l, rows: u, track: d, renderVoiceId: M, rendering: C, failed: D, clips: O, requestRender: f, forget: I, reload: c, setNear: X, missing: F.length, coming: te };
2647
2665
  }
2648
2666
  const xl = { share: ee.share, delay: ee.tabGauge, video: ee.video, source: ee.tabSources, script: ee.tabScript, fix: ee.tabFix, ending: ee.tabEnding, summary: ee.tabSummary, export: ee.tabExport, settings: ee.tabSettings, sources: ee.tabSources, recs: ee.mic };
2649
2667
  function _i({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s }) {
2650
- const o = s && t.length <= 3, l = t.some((v) => v.key === e), [c, u] = j(null), d = k(null), [h, M] = j(0);
2651
- _(() => {
2652
- d.current && M(d.current.offsetWidth);
2668
+ const o = s && t.length <= 3, l = t.some((v) => v.key === e), [c, u] = k(null), d = j(null), [M, h] = k(0);
2669
+ E(() => {
2670
+ d.current && h(d.current.offsetWidth);
2653
2671
  }, [c == null ? void 0 : c.k]);
2654
2672
  const N = (v, m) => {
2655
2673
  const f = v.currentTarget.querySelector(".tabbar__label");
@@ -2663,7 +2681,7 @@ function _i({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
2663
2681
  }, p = () => u(null);
2664
2682
  let y = null;
2665
2683
  if (c) {
2666
- const v = { l: 0, r: typeof window < "u" ? window.innerWidth : 0 }, m = h || 80, f = Math.max(v.l + 8, Math.min(v.r - m - 8, c.x - m / 2));
2684
+ const v = { l: 0, r: typeof window < "u" ? window.innerWidth : 0 }, m = M || 80, f = Math.max(v.l + 8, Math.min(v.r - m - 8, c.x - m / 2));
2667
2685
  y = Oa(
2668
2686
  /* @__PURE__ */ i("div", { className: "vsp vsp-portal", "data-theme": "dark", children: /* @__PURE__ */ g("div", { ref: d, "data-theme": "dark", className: "vs-tip__bubble vs-tip__bubble--top tabtip", style: { position: "fixed", left: f, top: c.y - 8, bottom: "auto", width: "auto", whiteSpace: "nowrap", transform: "translateY(-100%)", zIndex: 2147483e3, pointerEvents: "none" }, children: [
2669
2687
  /* @__PURE__ */ i("span", { className: "vs-tip__row", children: /* @__PURE__ */ i("span", { className: "vs-tip__copy", children: c.label }) }),
@@ -2690,20 +2708,20 @@ function _i({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
2690
2708
  }
2691
2709
  const Dl = "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3", Sl = "m9 9 10.5-3m0 6.553v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 1 1-.99-3.467l2.31-.66a2.25 2.25 0 0 0 1.632-2.163Zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 0 1-.99-3.467l2.31-.66A2.25 2.25 0 0 0 9 15.553Z";
2692
2710
  function Al({ audio: t, video: e, formats: n, onExport: r }) {
2693
- const [s, a] = j(null), [o, l] = j(null), c = k(void 0), u = k(!0);
2694
- _(() => (u.current = !0, () => {
2711
+ const [s, a] = k(null), [o, l] = k(null), c = j(void 0), u = j(!0);
2712
+ E(() => (u.current = !0, () => {
2695
2713
  u.current = !1, window.clearTimeout(c.current);
2696
2714
  }), []);
2697
2715
  const d = (p) => {
2698
2716
  window.clearTimeout(c.current), a(p), c.current = window.setTimeout(() => a(null), 1600);
2699
- }, h = (p) => {
2717
+ }, M = (p) => {
2700
2718
  o || (l(p), Promise.resolve().then(() => r(p)).then(() => {
2701
2719
  u.current && d(p);
2702
2720
  }).catch(() => {
2703
2721
  }).finally(() => {
2704
2722
  u.current && l(null);
2705
2723
  }));
2706
- }, M = (p, y) => {
2724
+ }, h = (p, y) => {
2707
2725
  o || (l(p), Promise.resolve().then(() => y.onClick()).then(() => {
2708
2726
  u.current && d(p);
2709
2727
  }).catch(() => {
@@ -2712,8 +2730,8 @@ function Al({ audio: t, video: e, formats: n, onExport: r }) {
2712
2730
  }));
2713
2731
  }, N = (p, y, v, m) => /* @__PURE__ */ g(be, { children: [
2714
2732
  /* @__PURE__ */ i(pr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: m }),
2715
- /* @__PURE__ */ g("button", { type: "button", className: "dlrow", disabled: o != null, "aria-busy": o === p || void 0, onClick: () => M(p, y), style: o && o !== p ? { opacity: 0.45 } : void 0, children: [
2716
- o === p ? /* @__PURE__ */ i(ct, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: v, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2733
+ /* @__PURE__ */ g("button", { type: "button", className: "dlrow", disabled: o != null, "aria-busy": o === p || void 0, onClick: () => h(p, y), style: o && o !== p ? { opacity: 0.45 } : void 0, children: [
2734
+ o === p ? /* @__PURE__ */ i(ut, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: v, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2717
2735
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 1, textAlign: "left" }, children: [
2718
2736
  /* @__PURE__ */ i("span", { style: { fontSize: 13, fontWeight: 500, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: y.name }),
2719
2737
  /* @__PURE__ */ i("span", { style: { font: "500 9.5px var(--vs-font-mono)", color: "var(--ink-40)", letterSpacing: ".04em" }, children: y.meta })
@@ -2726,8 +2744,8 @@ function Al({ audio: t, video: e, formats: n, onExport: r }) {
2726
2744
  e && N("video", e, ee.video, "DOWNLOAD VIDEO"),
2727
2745
  n !== !1 && /* @__PURE__ */ g(be, { children: [
2728
2746
  /* @__PURE__ */ i(pr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
2729
- /* @__PURE__ */ i("div", { className: "fmtgrid", children: Lr.map((p) => /* @__PURE__ */ g("button", { type: "button", className: "fmtgrid__cell", title: o === p.key ? `Building the ${p.name}…` : p.note, disabled: o != null, "aria-busy": o === p.key || void 0, onClick: () => h(p.key), style: o && o !== p.key ? { opacity: 0.45 } : void 0, children: [
2730
- o === p.key ? /* @__PURE__ */ i(ct, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === p.key ? ee.check : p.icon, size: 16, sw: 1.6, style: { color: s === p.key ? "var(--brand)" : "var(--ink-62)" } }),
2747
+ /* @__PURE__ */ i("div", { className: "fmtgrid", children: Lr.map((p) => /* @__PURE__ */ g("button", { type: "button", className: "fmtgrid__cell", title: o === p.key ? `Building the ${p.name}…` : p.note, disabled: o != null, "aria-busy": o === p.key || void 0, onClick: () => M(p.key), style: o && o !== p.key ? { opacity: 0.45 } : void 0, children: [
2748
+ o === p.key ? /* @__PURE__ */ i(ut, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === p.key ? ee.check : p.icon, size: 16, sw: 1.6, style: { color: s === p.key ? "var(--brand)" : "var(--ink-62)" } }),
2731
2749
  /* @__PURE__ */ i("span", { children: p.name })
2732
2750
  ] }, p.key)) })
2733
2751
  ] })
@@ -2748,9 +2766,9 @@ function _r(t, e, n) {
2748
2766
  r();
2749
2767
  }
2750
2768
  function El(t, e, n) {
2751
- const [r, s] = j(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
2752
- ${t.summary}` : ""}`, l = Ut();
2753
- return _(() => {
2769
+ const [r, s] = k(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
2770
+ ${t.summary}` : ""}`, l = Rt();
2771
+ return E(() => {
2754
2772
  if (!e || !n || !a) return;
2755
2773
  let c = !0;
2756
2774
  return l.client.recordings.summary(e, { lang: n, ...l.readAs }).then((u) => u).then((u) => {
@@ -2770,8 +2788,8 @@ function _l(t) {
2770
2788
  } };
2771
2789
  }
2772
2790
  function Yl({ s: t }) {
2773
- const [e, n] = j(!1), r = k(void 0);
2774
- _(() => () => window.clearTimeout(r.current), []);
2791
+ const [e, n] = k(!1), r = j(void 0);
2792
+ E(() => () => window.clearTimeout(r.current), []);
2775
2793
  const s = t.title ?? "", a = t.summary ?? "", o = () => {
2776
2794
  var c;
2777
2795
  (c = navigator.clipboard) == null || c.writeText(`${s}
@@ -2794,7 +2812,7 @@ ${a}`).catch(() => {
2794
2812
  /* @__PURE__ */ i("div", { style: { fontSize: 15, fontWeight: 600, lineHeight: 1.3, letterSpacing: "-.15px", color: "var(--ink-96)", textWrap: "pretty" }, children: s }),
2795
2813
  /* @__PURE__ */ i("div", { style: { fontSize: 13, fontWeight: 300, lineHeight: 1.55, color: "var(--ink-80)", textWrap: "pretty", whiteSpace: "pre-line" }, children: a })
2796
2814
  ] }) : t.state === "unavailable" ? l("No summary for this recording.") : t.state === "not_requested" ? t.request ? l("This recording was made without a summary.", { label: "Summarize", onClick: t.request }) : l("Recordings under a minute and files of a batch are not summarised.") : /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 10, fontSize: 13, fontWeight: 300, color: "var(--ink-45)" }, children: [
2797
- /* @__PURE__ */ i(ct, { size: 14, color: "var(--brand)", track: "var(--fill-12)" }),
2815
+ /* @__PURE__ */ i(ut, { size: 14, color: "var(--brand)", track: "var(--fill-12)" }),
2798
2816
  t.slow ? "Still writing the summary…" : "Writing the summary…"
2799
2817
  ] })
2800
2818
  ] });
@@ -2808,18 +2826,18 @@ function Ul({ ytId: t, title: e, timeLabel: n, radius: r, style: s, large: a, ch
2808
2826
  ] });
2809
2827
  }
2810
2828
  function Rl(t = !0, e) {
2811
- const n = k(null), r = e ?? n;
2812
- return _(() => {
2829
+ const n = j(null), r = e ?? n;
2830
+ return E(() => {
2813
2831
  const s = r.current;
2814
2832
  if (!s || !t) return;
2815
2833
  let a = 0, o = 0, l = !1;
2816
- const c = (h) => {
2817
- h.button !== 0 || h.target.closest("button,a,input,textarea,select") || (l = !0, a = h.clientY, o = s.scrollTop, s.classList.add("is-dragging"));
2818
- }, u = (h) => {
2834
+ const c = (M) => {
2835
+ M.button !== 0 || M.target.closest("button,a,input,textarea,select") || (l = !0, a = M.clientY, o = s.scrollTop, s.classList.add("is-dragging"));
2836
+ }, u = (M) => {
2819
2837
  var N;
2820
2838
  if (!l) return;
2821
- const M = h.clientY - a;
2822
- Math.abs(M) > 2 && ((N = s.setPointerCapture) == null || N.call(s, h.pointerId)), s.scrollTop = o - M;
2839
+ const h = M.clientY - a;
2840
+ Math.abs(h) > 2 && ((N = s.setPointerCapture) == null || N.call(s, M.pointerId)), s.scrollTop = o - h;
2823
2841
  }, d = () => {
2824
2842
  l = !1, s.classList.remove("is-dragging");
2825
2843
  };
@@ -2839,13 +2857,13 @@ function Ql(t, e) {
2839
2857
  (e.forcePin ?? []).forEach((f) => {
2840
2858
  l = l.filter((I) => I !== `!${f}`), s.includes(f) && !l.includes(f) && (l = [f, ...l]);
2841
2859
  });
2842
- const u = (f) => (e.forcePin ?? []).includes(f) && !c.includes(f), d = a ? l.filter((f) => s.includes(f) && o.includes(f)) : [], h = s.filter((f) => !d.includes(f)), M = e.cur && e.cur !== "none" && h.includes(e.cur) ? e.cur : e.pref && h.includes(e.pref) ? e.pref : h[0] ?? null, N = (f) => {
2843
- const I = h.filter((C) => C !== f);
2844
- return I[h.indexOf(f)] ?? I[I.length - 1] ?? null;
2860
+ const u = (f) => (e.forcePin ?? []).includes(f) && !c.includes(f), d = a ? l.filter((f) => s.includes(f) && o.includes(f)) : [], M = s.filter((f) => !d.includes(f)), h = e.cur && e.cur !== "none" && M.includes(e.cur) ? e.cur : e.pref && M.includes(e.pref) ? e.pref : M[0] ?? null, N = (f) => {
2861
+ const I = M.filter((C) => C !== f);
2862
+ return I[M.indexOf(f)] ?? I[I.length - 1] ?? null;
2845
2863
  }, p = (f, I) => {
2846
2864
  if (!o.includes(f)) return;
2847
2865
  const C = d.filter((D) => D !== f);
2848
- if (C.splice(I ?? C.length, 0, f), M === f) {
2866
+ if (C.splice(I ?? C.length, 0, f), h === f) {
2849
2867
  const D = N(f);
2850
2868
  D && e.onPick(D);
2851
2869
  }
@@ -2858,15 +2876,15 @@ function Ql(t, e) {
2858
2876
  }, m = (f) => {
2859
2877
  const I = d.includes(f), C = s.includes(f);
2860
2878
  return {
2861
- show: C && (!a || I || M === f),
2879
+ show: C && (!a || I || h === f),
2862
2880
  pinned: I,
2863
2881
  order: I ? d.indexOf(f) + 1 : 1e3,
2864
- pill: a && C && o.includes(f) && h.length > 0 && (I || h.length > 1),
2882
+ pill: a && C && o.includes(f) && M.length > 0 && (I || M.length > 1),
2865
2883
  title: I ? `Unpin — return ${v(f)} to the tabs` : `Pin ${v(f)} open above the tabs`,
2866
2884
  toggle: () => I ? y(f) : p(f)
2867
2885
  };
2868
2886
  };
2869
- return { id: t, tabbed: a && h.length > 1, cur: M, seq: d, pinnable: o, tabKeys: h, stripTabs: e.tabs.filter((f) => h.includes(f.key)), panel: m, pin: p, unpin: y };
2887
+ return { id: t, tabbed: a && M.length > 1, cur: h, seq: d, pinnable: o, tabKeys: M, stripTabs: e.tabs.filter((f) => M.includes(f.key)), panel: m, pin: p, unpin: y };
2870
2888
  }
2871
2889
  function $l({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
2872
2890
  return Bl(t), /* @__PURE__ */ g(be, { children: [
@@ -2886,10 +2904,10 @@ function $l({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
2886
2904
  ] });
2887
2905
  }
2888
2906
  function Bl(t) {
2889
- const e = k(t);
2907
+ const e = j(t);
2890
2908
  e.current = t;
2891
2909
  const n = t.id;
2892
- _(() => {
2910
+ E(() => {
2893
2911
  let r = null, s = null;
2894
2912
  const a = (m) => {
2895
2913
  r !== m && (r && r.removeAttribute("data-grip-hot"), r = m, m && m.setAttribute("data-grip-hot", ""));
@@ -2925,7 +2943,7 @@ function Bl(t) {
2925
2943
  const f = e.current, I = m.key, C = o(m), D = f.seq.includes(I), B = D || f.tabKeys.length > 1, Y = C && m.tabsSnap, X = !Y || m.py < Y.top + Y.height / 2 ? B ? "pin" : null : "tabs";
2926
2944
  let z = null;
2927
2945
  if (X === "pin") {
2928
- const S = f.seq.filter((E) => E !== I).map((E) => m.snap[E]).filter(Boolean), T = m.grid ? S.filter((E) => E.bottom < m.py || E.top <= m.py && E.left + E.width / 2 < m.px).length : S.filter((E) => E.top + E.height / 2 < m.py).length;
2946
+ const S = f.seq.filter((_) => _ !== I).map((_) => m.snap[_]).filter(Boolean), T = m.grid ? S.filter((_) => _.bottom < m.py || _.top <= m.py && _.left + _.width / 2 < m.px).length : S.filter((_) => _.top + _.height / 2 < m.py).length;
2929
2947
  D && f.seq.indexOf(I) === T || (z = { zone: X, idx: T });
2930
2948
  } else X === "tabs" && D && (z = { zone: X });
2931
2949
  const F = z ? z.zone + (z.idx ?? "") : "";
@@ -2934,9 +2952,9 @@ function Bl(t) {
2934
2952
  S.style.order = T;
2935
2953
  }), (z == null ? void 0 : z.zone) === "pin") {
2936
2954
  const S = f.seq.filter((T) => T !== I);
2937
- S.splice(z.idx, 0, I), S.forEach((T, E) => {
2955
+ S.splice(z.idx, 0, I), S.forEach((T, _) => {
2938
2956
  const O = m.col.querySelector(`[data-panel-key="${T}"]`);
2939
- O && (O.style.order = String(E + 1));
2957
+ O && (O.style.order = String(_ + 1));
2940
2958
  });
2941
2959
  } else (z == null ? void 0 : z.zone) === "tabs" && (m.el.style.order = "998");
2942
2960
  C && ((z == null ? void 0 : z.zone) === "tabs" ? C.setAttribute("data-drop-hot", "") : C.removeAttribute("data-drop-hot"));
@@ -2953,7 +2971,7 @@ function Bl(t) {
2953
2971
  }, d = (m) => {
2954
2972
  const f = m instanceof Element ? m.closest("[data-tab-col]") : null;
2955
2973
  return f && f.getAttribute("data-tab-col") === n ? f : null;
2956
- }, h = (m) => {
2974
+ }, M = (m) => {
2957
2975
  var Y;
2958
2976
  if (s) {
2959
2977
  if (!s.on) {
@@ -2972,7 +2990,7 @@ function Bl(t) {
2972
2990
  if (!I || !C || !e.current.tabbed || !e.current.pinnable.includes(I.getAttribute("data-panel-key")) || f.closest("[role=button],[role=tab],button,a,input,textarea,select,iframe,[data-pin-pill],[contenteditable=true]")) return a(null);
2973
2991
  const D = C.getBoundingClientRect(), B = parseFloat(getComputedStyle(I).getPropertyValue("--grip-h")) || 30;
2974
2992
  a(m.clientY >= D.top && m.clientY <= D.top + B ? I : null);
2975
- }, M = (m) => {
2993
+ }, h = (m) => {
2976
2994
  if (!r || m.button !== 0) return;
2977
2995
  const f = d(r);
2978
2996
  f && (m.preventDefault(), m.stopImmediatePropagation(), s = { el: r, col: f, key: r.getAttribute("data-panel-key"), x0: m.clientX, y0: m.clientY, on: !1 });
@@ -2981,21 +2999,21 @@ function Bl(t) {
2981
2999
  }, v = () => {
2982
3000
  s || a(null);
2983
3001
  };
2984
- return document.addEventListener("pointermove", h, !0), document.addEventListener("pointerdown", M, !0), window.addEventListener("pointerup", N), window.addEventListener("pointercancel", p), window.addEventListener("keydown", y, !0), document.addEventListener("pointerleave", v), () => {
2985
- u(!1), a(null), document.removeEventListener("pointermove", h, !0), document.removeEventListener("pointerdown", M, !0), window.removeEventListener("pointerup", N), window.removeEventListener("pointercancel", p), window.removeEventListener("keydown", y, !0), document.removeEventListener("pointerleave", v);
3002
+ return document.addEventListener("pointermove", M, !0), document.addEventListener("pointerdown", h, !0), window.addEventListener("pointerup", N), window.addEventListener("pointercancel", p), window.addEventListener("keydown", y, !0), document.addEventListener("pointerleave", v), () => {
3003
+ u(!1), a(null), document.removeEventListener("pointermove", M, !0), document.removeEventListener("pointerdown", h, !0), window.removeEventListener("pointerup", N), window.removeEventListener("pointercancel", p), window.removeEventListener("keydown", y, !0), document.removeEventListener("pointerleave", v);
2986
3004
  };
2987
3005
  }, [n]);
2988
3006
  }
2989
3007
  function Vl({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
2990
- const [o, l] = eo(t), c = k(null), u = k(null);
2991
- Hl(u), _(() => {
3008
+ const [o, l] = eo(t), c = j(null), u = j(null);
3009
+ Hl(u), E(() => {
2992
3010
  document.documentElement.style.setProperty("--colw", `${o}px`);
2993
3011
  }, [o]);
2994
- const d = (M) => {
3012
+ const d = (h) => {
2995
3013
  const N = c.current, p = N == null ? void 0 : N.parentElement;
2996
- if (M.button !== 0 || !N || !p) return;
2997
- M.preventDefault();
2998
- const y = M.currentTarget, v = getComputedStyle(p), m = p.clientWidth - parseFloat(v.paddingLeft) - parseFloat(v.paddingRight) - (parseFloat(v.columnGap) || 0), f = 320, I = 320, C = Math.max(f, m - I), D = M.clientX, B = N.getBoundingClientRect().width;
3014
+ if (h.button !== 0 || !N || !p) return;
3015
+ h.preventDefault();
3016
+ const y = h.currentTarget, v = getComputedStyle(p), m = p.clientWidth - parseFloat(v.paddingLeft) - parseFloat(v.paddingRight) - (parseFloat(v.columnGap) || 0), f = 320, I = 320, C = Math.max(f, m - I), D = h.clientX, B = N.getBoundingClientRect().width;
2999
3017
  let Y = B;
3000
3018
  y.classList.add("is-on");
3001
3019
  const X = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
@@ -3006,14 +3024,14 @@ function Vl({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
3006
3024
  window.removeEventListener("pointermove", z), window.removeEventListener("pointerup", F), window.removeEventListener("pointercancel", F), document.body.style.cursor = X.cur, document.body.style.userSelect = X.sel, y.classList.remove("is-on"), l(Y);
3007
3025
  };
3008
3026
  window.addEventListener("pointermove", z), window.addEventListener("pointerup", F), window.addEventListener("pointercancel", F);
3009
- }, h = r ? { display: "none" } : void 0;
3027
+ }, M = r ? { display: "none" } : void 0;
3010
3028
  return /* @__PURE__ */ g(be, { children: [
3011
- /* @__PURE__ */ i("div", { "aria-hidden": "true", className: "colgrip", style: { marginRight: -n, ...h }, children: /* @__PURE__ */ i("div", { className: "colgrip__bar", style: { left: -(n / 2 + 6) }, title: "Drag to resize · double-click to reset", onPointerDown: d, onDoubleClick: () => l(null) }) }),
3012
- /* @__PURE__ */ i("div", { ref: c, "data-tab-col": t, className: `${e} sidecol`, style: { flex: `0 0 ${o}px`, ...h }, children: s ? a : /* @__PURE__ */ i("div", { ref: u, "data-panel-grid": "", className: "panelgrid", children: a }) })
3029
+ /* @__PURE__ */ i("div", { "aria-hidden": "true", className: "colgrip", style: { marginRight: -n, ...M }, children: /* @__PURE__ */ i("div", { className: "colgrip__bar", style: { left: -(n / 2 + 6) }, title: "Drag to resize · double-click to reset", onPointerDown: d, onDoubleClick: () => l(null) }) }),
3030
+ /* @__PURE__ */ i("div", { ref: c, "data-tab-col": t, className: `${e} sidecol`, style: { flex: `0 0 ${o}px`, ...M }, children: s ? a : /* @__PURE__ */ i("div", { ref: u, "data-panel-grid": "", className: "panelgrid", children: a }) })
3013
3031
  ] });
3014
3032
  }
3015
3033
  function Hl(t) {
3016
- _(() => {
3034
+ E(() => {
3017
3035
  const e = t.current;
3018
3036
  if (!e) return;
3019
3037
  const n = 16;
@@ -3022,13 +3040,13 @@ function Hl(t) {
3022
3040
  r = 0;
3023
3041
  const u = getComputedStyle(e).display === "grid";
3024
3042
  [...e.children].forEach((d) => {
3025
- const h = d;
3043
+ const M = d;
3026
3044
  if (!u) {
3027
- h.style.gridRowEnd && (h.style.gridRowEnd = "");
3045
+ M.style.gridRowEnd && (M.style.gridRowEnd = "");
3028
3046
  return;
3029
3047
  }
3030
- const M = h.getBoundingClientRect().height, N = M > 0 ? `span ${Math.ceil(M + n)}` : "span 1";
3031
- h.style.gridRowEnd !== N && (h.style.gridRowEnd = N);
3048
+ const h = M.getBoundingClientRect().height, N = h > 0 ? `span ${Math.ceil(h + n)}` : "span 1";
3049
+ M.style.gridRowEnd !== N && (M.style.gridRowEnd = N);
3032
3050
  });
3033
3051
  }, a = () => {
3034
3052
  r || (r = requestAnimationFrame(s));
@@ -3045,14 +3063,14 @@ function Wl(t) {
3045
3063
  }
3046
3064
  const Fl = 1500, Gl = 3e5;
3047
3065
  function Zl(t) {
3048
- const e = Ut(), [n, r] = j(null), [s, a] = j(null), [o, l] = j(null), [c, u] = j(null), d = k(null), h = k(null), M = k(null), N = k(0), p = qe(() => {
3049
- M.current && (clearTimeout(M.current), M.current = null), d.current && (d.current.pause(), d.current.removeAttribute("src"), d.current.load(), d.current = null), h.current && (URL.revokeObjectURL(h.current), h.current = null);
3066
+ const e = Rt(), [n, r] = k(null), [s, a] = k(null), [o, l] = k(null), [c, u] = k(null), d = j(null), M = j(null), h = j(null), N = j(0), p = qe(() => {
3067
+ h.current && (clearTimeout(h.current), h.current = null), d.current && (d.current.pause(), d.current.removeAttribute("src"), d.current.load(), d.current = null), M.current && (URL.revokeObjectURL(M.current), M.current = null);
3050
3068
  }, []), y = qe(() => {
3051
3069
  N.current += 1, p(), a(null), l(null);
3052
3070
  }, [p]), v = qe(() => {
3053
3071
  y(), r(null);
3054
3072
  }, [y]);
3055
- _(() => () => {
3073
+ E(() => () => {
3056
3074
  N.current += 1, p();
3057
3075
  }, [p]);
3058
3076
  const m = qe((f) => {
@@ -3060,7 +3078,7 @@ function Zl(t) {
3060
3078
  const I = N.current;
3061
3079
  if (p(), r(f.id), a(null), l(null), u(null), !t) return;
3062
3080
  let C = f.previewUrl ? `${e.origin}${f.previewUrl}` : `${e.origin}/v1/voices/preview?voice=${encodeURIComponent(f.id)}&lang=${encodeURIComponent(t)}`;
3063
- En() === "caf" && (C += `${C.includes("?") ? "&" : "?"}format=caf`);
3081
+ _n() === "caf" && (C += `${C.includes("?") ? "&" : "?"}format=caf`);
3064
3082
  const D = Date.now();
3065
3083
  e.shareCode && C.includes("recording=") && (C += `&shareCode=${encodeURIComponent(e.shareCode)}`);
3066
3084
  const B = async () => {
@@ -3071,7 +3089,7 @@ function Zl(t) {
3071
3089
  Y = await fetch(C, { headers: S ? { Authorization: `Bearer ${S}` } : {} });
3072
3090
  } catch (S) {
3073
3091
  if (N.current !== I) return;
3074
- l(null), u(jt(S));
3092
+ l(null), u(It(S));
3075
3093
  return;
3076
3094
  }
3077
3095
  if (N.current !== I) return;
@@ -3080,7 +3098,7 @@ function Zl(t) {
3080
3098
  l(null), u({ message: "This voice is still being fetched. Try it again in a moment." });
3081
3099
  return;
3082
3100
  }
3083
- l(f.id), M.current = setTimeout(() => {
3101
+ l(f.id), h.current = setTimeout(() => {
3084
3102
  B();
3085
3103
  }, Fl);
3086
3104
  return;
@@ -3093,8 +3111,8 @@ function Zl(t) {
3093
3111
  }
3094
3112
  const X = await Y.blob();
3095
3113
  if (N.current !== I) return;
3096
- l(null), h.current = URL.createObjectURL(X);
3097
- const z = new Audio(h.current);
3114
+ l(null), M.current = URL.createObjectURL(X);
3115
+ const z = new Audio(M.current);
3098
3116
  z.playsInline = !0;
3099
3117
  const F = () => {
3100
3118
  N.current === I && (p(), a(null));
@@ -3116,7 +3134,7 @@ function ql(t, e, n, r) {
3116
3134
  const s = Math.max(0, e), a = r > 0 && s >= r - kr, o = t.length && t[0].start <= s + 1e-6 ? Yi(t, s) : -1;
3117
3135
  return o < 0 ? { t: s, playing: n && !a, sentenceId: null, offset: 0, ended: a } : { t: s, playing: n && !a, sentenceId: t[o].sentenceId ?? null, offset: Math.max(0, s - t[o].start), ended: a };
3118
3136
  }
3119
- function zn(t, e, n) {
3137
+ function In(t, e, n) {
3120
3138
  var l;
3121
3139
  const r = Math.max(0, n);
3122
3140
  if (t.ended) return { t: r, playing: !1, index: Math.max(0, e.length - 1) };
@@ -3145,42 +3163,42 @@ function ni(t, e, n) {
3145
3163
  for (let a = 0; a < n.length && n[a].start <= r; a++) s = a;
3146
3164
  return s;
3147
3165
  }
3148
- function kn(t, e) {
3166
+ function jn(t, e) {
3149
3167
  var l;
3150
3168
  const n = t.clipPos;
3151
3169
  if (t.wordSync || t.timed || !n || !(n.dur > 0)) return t.t;
3152
- const r = e[t.idx], s = (r == null ? void 0 : r.start) ?? t.t, a = ((l = e[t.idx + 1]) == null ? void 0 : l.start) ?? Yt(r, s, t.dur), o = Math.max(0, a - s);
3170
+ const r = e[t.idx], s = (r == null ? void 0 : r.start) ?? t.t, a = ((l = e[t.idx + 1]) == null ? void 0 : l.start) ?? Ut(r, s, t.dur), o = Math.max(0, a - s);
3153
3171
  return s + Math.min(o, n.t / n.dur * o);
3154
3172
  }
3155
- function Yt(t, e, n) {
3173
+ function Ut(t, e, n) {
3156
3174
  var s;
3157
3175
  const r = (s = t == null ? void 0 : t.words[t.words.length - 1]) == null ? void 0 : s.end;
3158
3176
  return r != null && r > e ? r : (t == null ? void 0 : t.end) != null && t.end > e ? t.end : n > e ? n : e + 4;
3159
3177
  }
3160
- function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd: o, endT: l, onGone: c, onKnown: u, lead: d, onTime: h, waiting: M = !1 }) {
3161
- const N = k(null), [p, y] = j(!1);
3162
- _(() => {
3163
- if (!M) {
3178
+ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd: o, endT: l, onGone: c, onKnown: u, lead: d, onTime: M, waiting: h = !1 }) {
3179
+ const N = j(null), [p, y] = k(!1);
3180
+ E(() => {
3181
+ if (!h) {
3164
3182
  y(!1);
3165
3183
  return;
3166
3184
  }
3167
3185
  const W = setTimeout(() => y(!0), 300);
3168
3186
  return () => clearTimeout(W);
3169
- }, [M]);
3170
- const v = r && !p, m = k(!1), [f, I] = j(!1), C = (W, ye = []) => {
3187
+ }, [h]);
3188
+ const v = r && !p, m = j(!1), [f, I] = k(!1), C = (W, ye = []) => {
3171
3189
  var Z, ke;
3172
3190
  if (!(m.current && (W === "pauseVideo" || W === "seekTo" || W === "setPlaybackRate")))
3173
3191
  try {
3174
3192
  (ke = (Z = N.current) == null ? void 0 : Z.contentWindow) == null || ke.postMessage(JSON.stringify({ event: "command", func: W, args: ye }), "*");
3175
3193
  } catch {
3176
3194
  }
3177
- }, D = k(null), B = k(!1), Y = k(!1), X = k(!1), z = k(a);
3195
+ }, D = j(null), B = j(!1), Y = j(!1), X = j(!1), z = j(a);
3178
3196
  z.current = a;
3179
- const F = k(d);
3197
+ const F = j(d);
3180
3198
  F.current = d;
3181
- const S = k(o);
3199
+ const S = j(o);
3182
3200
  S.current = o;
3183
- const T = k(!1), E = () => {
3201
+ const T = j(!1), _ = () => {
3184
3202
  var ye, Z;
3185
3203
  const W = Y.current || X.current;
3186
3204
  if (W !== m.current)
@@ -3188,16 +3206,16 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3188
3206
  if (C("playVideo"), F.current) return;
3189
3207
  we.current && z.current && (T.current = !0, z.current());
3190
3208
  } else T.current && !F.current && (T.current = !1, we.current || (Z = z.current) == null || Z.call(z));
3191
- }, O = k(n);
3209
+ }, O = j(n);
3192
3210
  O.current = n;
3193
- const te = k(h);
3194
- te.current = h;
3195
- const K = k(null), L = k(null), [ie, ne] = j(!0), [G, J] = j(!1), pe = () => {
3211
+ const te = j(M);
3212
+ te.current = M;
3213
+ const K = j(null), L = j(null), [ie, ne] = k(!0), [G, J] = k(!1), pe = () => {
3196
3214
  C("unloadModule", ["captions"]), C("unloadModule", ["cc"]);
3197
- }, le = k([]), Te = () => {
3215
+ }, le = j([]), Te = () => {
3198
3216
  pe(), le.current.forEach(clearTimeout), le.current = [400, 1200, 2500, 5e3].map((W) => window.setTimeout(pe, W));
3199
3217
  };
3200
- _(() => () => le.current.forEach(clearTimeout), []);
3218
+ E(() => () => le.current.forEach(clearTimeout), []);
3201
3219
  const je = () => {
3202
3220
  var W, ye;
3203
3221
  try {
@@ -3206,72 +3224,72 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3206
3224
  }
3207
3225
  (!F.current || F.current.muted) && C("mute"), J(!0);
3208
3226
  };
3209
- _(() => (d == null || d.bind(C), () => d == null ? void 0 : d.bind(null)), [!!d]), _(() => {
3227
+ E(() => (d == null || d.bind(C), () => d == null ? void 0 : d.bind(null)), [!!d]), E(() => {
3210
3228
  !d && G && C("mute");
3211
3229
  }, [!!d]);
3212
- const Ae = k(null), Le = k(l);
3230
+ const De = j(null), Le = j(l);
3213
3231
  Le.current = l;
3214
- const we = k(v);
3232
+ const we = j(v);
3215
3233
  we.current = v;
3216
- const Ee = k(!1), Re = k(c);
3234
+ const Ee = j(!1), Re = j(c);
3217
3235
  Re.current = c;
3218
- const De = k(u);
3219
- De.current = u;
3220
- const $ = k(!1), [H, A] = j(!1), b = (W) => {
3221
- const ye = Ae.current;
3236
+ const Se = j(u);
3237
+ Se.current = u;
3238
+ const $ = j(!1), [H, A] = k(!1), b = (W) => {
3239
+ const ye = De.current;
3222
3240
  return !!ye && (W < ye.start - 1 || W > ye.end + 5);
3223
3241
  }, V = () => {
3224
3242
  b(O.current) || C("seekTo", [O.current, !0]);
3225
3243
  }, ce = () => K.current;
3226
- return _(() => {
3244
+ return E(() => {
3227
3245
  const W = (ye) => {
3228
- var Fe, Se, ge, _e, Be, Q, he, ue, ae, fe, Ye, U, R, q, re, de;
3229
- if (ye.source !== ((Fe = N.current) == null ? void 0 : Fe.contentWindow) || typeof ye.data != "string") return;
3246
+ var Ge, Ae, ge, _e, Ve, Q, he, ue, ae, fe, Ye, U, R, q, re, de;
3247
+ if (ye.source !== ((Ge = N.current) == null ? void 0 : Ge.contentWindow) || typeof ye.data != "string") return;
3230
3248
  let Z = null;
3231
3249
  try {
3232
3250
  Z = JSON.parse(ye.data);
3233
3251
  } catch {
3234
3252
  return;
3235
3253
  }
3236
- (ge = (Se = Z == null ? void 0 : Z.info) == null ? void 0 : Se.videoData) != null && ge.isLive && (B.current = !0);
3254
+ (ge = (Ae = Z == null ? void 0 : Z.info) == null ? void 0 : Ae.videoData) != null && ge.isLive && (B.current = !0);
3237
3255
  const ke = (_e = Z == null ? void 0 : Z.info) == null ? void 0 : _e.duration;
3238
- typeof ke == "number" && ke > 0 && !B.current && (D.current == null ? D.current = ke : (Y.current = Math.abs(ke - D.current) > 1.5, E())), (Z == null ? void 0 : Z.event) === "onReady" && ((!F.current || F.current.muted) && C("mute"), Te(), (Be = F.current) == null || Be.onInfo({ ready: !0 })), typeof ((Q = Z == null ? void 0 : Z.info) == null ? void 0 : Q.playerState) == "number" && (Z.info.playerState !== L.current && (Z.info.playerState === 1 || Z.info.playerState === 2) && Te(), L.current = Z.info.playerState, ne(Z.info.playerState !== 1 && Z.info.playerState !== 3), (he = F.current) == null || he.onInfo({ state: Z.info.playerState }));
3256
+ typeof ke == "number" && ke > 0 && !B.current && (D.current == null ? D.current = ke : (Y.current = Math.abs(ke - D.current) > 1.5, _())), (Z == null ? void 0 : Z.event) === "onReady" && ((!F.current || F.current.muted) && C("mute"), Te(), (Ve = F.current) == null || Ve.onInfo({ ready: !0 })), typeof ((Q = Z == null ? void 0 : Z.info) == null ? void 0 : Q.playerState) == "number" && (Z.info.playerState !== L.current && (Z.info.playerState === 1 || Z.info.playerState === 2) && Te(), L.current = Z.info.playerState, ne(Z.info.playerState !== 1 && Z.info.playerState !== 3), (he = F.current) == null || he.onInfo({ state: Z.info.playerState }));
3239
3257
  const ze = (ue = Z == null ? void 0 : Z.info) == null ? void 0 : ue.progressState;
3240
3258
  if (ze && typeof ze.seekableStart == "number" && typeof ze.seekableEnd == "number" && ze.seekableEnd > ze.seekableStart) {
3241
- const Oe = Ae.current == null;
3242
- if (Ae.current = { start: ze.seekableStart, end: ze.seekableEnd }, Oe && !we.current && (C("pauseVideo"), b(O.current) || C("seekTo", [O.current, !0])), !$.current && Le.current != null) {
3259
+ const Oe = De.current == null;
3260
+ if (De.current = { start: ze.seekableStart, end: ze.seekableEnd }, Oe && !we.current && (C("pauseVideo"), b(O.current) || C("seekTo", [O.current, !0])), !$.current && Le.current != null) {
3243
3261
  $.current = !0;
3244
3262
  const me = Le.current < ze.seekableStart - 1;
3245
- (ae = De.current) == null || ae.call(De, me), me && ((fe = Re.current) == null || fe.call(Re));
3263
+ (ae = Se.current) == null || ae.call(Se, me), me && ((fe = Re.current) == null || fe.call(Re));
3246
3264
  }
3247
3265
  }
3248
3266
  typeof ((Ye = Z == null ? void 0 : Z.info) == null ? void 0 : Ye.currentTime) == "number" && (K.current = Z.info.currentTime, (U = F.current) == null || U.onInfo({ t: Z.info.currentTime }), !m.current && L.current === 1 && ((R = te.current) == null || R.call(te, Z.info.currentTime))), ((q = Z == null ? void 0 : Z.info) == null ? void 0 : q.muted) === !1 && !F.current && C("mute"), typeof ((re = Z == null ? void 0 : Z.info) == null ? void 0 : re.muted) == "boolean" && ((de = F.current) == null || de.onInfo({ muted: Z.info.muted }));
3249
3267
  };
3250
3268
  return window.addEventListener("message", W), () => window.removeEventListener("message", W);
3251
- }, []), _(() => {
3269
+ }, []), E(() => {
3252
3270
  if (d) return;
3253
3271
  const W = b(n);
3254
3272
  W !== H && (A(W), W ? C("pauseVideo") : G && (C("seekTo", [n, !0]), v && C("playVideo")));
3255
- }), _(() => {
3273
+ }), E(() => {
3256
3274
  if (!G || H || d) return;
3257
- if (!v && Ae.current == null && !Ee.current) {
3275
+ if (!v && De.current == null && !Ee.current) {
3258
3276
  Ee.current = !0, C("seekTo", [O.current, !0]), C("playVideo");
3259
3277
  return;
3260
3278
  }
3261
3279
  const W = ce();
3262
3280
  v && (W == null || Math.abs(W - O.current) > 1.5) && V(), C(v ? "playVideo" : "pauseVideo");
3263
- }, [v, G, H]), _(() => {
3281
+ }, [v, G, H]), E(() => {
3264
3282
  if (!G || s === 0 || H || d) return;
3265
3283
  const W = ce();
3266
3284
  (W == null || Math.abs(W - O.current) > 0.5) && V(), v || C("pauseVideo");
3267
- }, [s, G]), _(() => {
3285
+ }, [s, G]), E(() => {
3268
3286
  if (!G) return;
3269
3287
  let W = null, ye = 0;
3270
3288
  const Z = setInterval(() => {
3271
3289
  const ke = K.current;
3272
3290
  ye = L.current === 1 && ke != null && W != null && Math.abs(ke - W) < 0.05 ? ye + 1 : 0, W = ke;
3273
3291
  const ze = ye >= 3;
3274
- ze !== X.current && (X.current = ze, E());
3292
+ ze !== X.current && (X.current = ze, _());
3275
3293
  }, 1e3);
3276
3294
  return () => clearInterval(Z);
3277
3295
  }, [G]), /* @__PURE__ */ g("div", { className: `txyt${f ? " txyt--ad" : ""}`, children: [
@@ -3294,46 +3312,46 @@ function ec({ player: t, size: e }) {
3294
3312
  return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(oe, { d: t.muted ? ee.volumeOff : ee.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3295
3313
  }
3296
3314
  function tc() {
3297
- const [t, e] = j(""), n = k(null), r = qe((s) => {
3315
+ const [t, e] = k(""), n = j(null), r = qe((s) => {
3298
3316
  clearTimeout(n.current), e(s), n.current = setTimeout(() => e(""), 3e3);
3299
3317
  }, []);
3300
- return _(() => () => clearTimeout(n.current), []), [t, r];
3318
+ return E(() => () => clearTimeout(n.current), []), [t, r];
3301
3319
  }
3302
3320
  const nc = 0.2, rc = 140, sc = 320;
3303
3321
  function ic(t, e) {
3304
- const n = k(t);
3322
+ const n = j(t);
3305
3323
  n.current = t;
3306
- const r = k(0), s = k(1), a = qe((o, l) => {
3324
+ const r = j(0), s = j(1), a = qe((o, l) => {
3307
3325
  cancelAnimationFrame(r.current);
3308
3326
  const c = s.current, u = performance.now(), d = () => {
3309
- const h = l > 0 ? Math.min(1, (performance.now() - u) / l) : 1;
3310
- s.current = c + (o - c) * h;
3311
- for (const M of n.current) M.setVolume(s.current);
3312
- h < 1 && (r.current = requestAnimationFrame(d));
3327
+ const M = l > 0 ? Math.min(1, (performance.now() - u) / l) : 1;
3328
+ s.current = c + (o - c) * M;
3329
+ for (const h of n.current) h.setVolume(s.current);
3330
+ M < 1 && (r.current = requestAnimationFrame(d));
3313
3331
  };
3314
3332
  d();
3315
3333
  }, []);
3316
- _(() => {
3334
+ E(() => {
3317
3335
  a(e ? nc : 1, e ? rc : sc);
3318
- }, [e, a]), _(() => () => {
3336
+ }, [e, a]), E(() => () => {
3319
3337
  cancelAnimationFrame(r.current), s.current = 1;
3320
3338
  for (const o of n.current) o.setVolume(1);
3321
3339
  }, []);
3322
3340
  }
3323
3341
  function ac(t, e, n, r) {
3324
- var De;
3325
- const s = k(null), a = k(!1), o = k(!1), [l, c] = j(null), [u, d] = j(!0), h = k(!0), M = k(!1), [N, p] = j(0), y = k(0);
3342
+ var Se;
3343
+ const s = j(null), a = j(!1), o = j(!1), [l, c] = k(null), [u, d] = k(!0), M = j(!0), h = j(!1), [N, p] = k(0), y = j(0);
3326
3344
  y.current = N;
3327
- const v = k({ t: 0, at: 0 }), m = k(n);
3345
+ const v = j({ t: 0, at: 0 }), m = j(n);
3328
3346
  m.current = n;
3329
- const f = k(r);
3347
+ const f = j(r);
3330
3348
  f.current = r;
3331
- const [I, C] = j(!1), D = k(!1), B = ($) => {
3349
+ const [I, C] = k(!1), D = j(!1), B = ($) => {
3332
3350
  D.current = $, C($);
3333
3351
  }, Y = ($, H) => {
3334
3352
  var A;
3335
3353
  return (A = s.current) == null ? void 0 : A.call(s, $, H);
3336
- }, X = l === 1 || l === 3, z = k(null), F = k(null), S = Ie(() => ({
3354
+ }, X = l === 1 || l === 3, z = j(null), F = j(null), S = Ie(() => ({
3337
3355
  muted: !0,
3338
3356
  bind: ($) => {
3339
3357
  s.current = $, $ || (a.current = !1);
@@ -3345,7 +3363,7 @@ function ac(t, e, n, r) {
3345
3363
  }
3346
3364
  }
3347
3365
  }), []);
3348
- S.muted = h.current || M.current, _(() => {
3366
+ S.muted = M.current || h.current, E(() => {
3349
3367
  if (l !== 1) return;
3350
3368
  let $ = 0;
3351
3369
  const H = () => {
@@ -3357,25 +3375,25 @@ function ac(t, e, n, r) {
3357
3375
  b > y.current && p(b), $ = requestAnimationFrame(H);
3358
3376
  };
3359
3377
  return $ = requestAnimationFrame(H), () => cancelAnimationFrame($);
3360
- }, [l]), _(() => {
3378
+ }, [l]), E(() => {
3361
3379
  !I || r == null || r < N + 1.5 || (B(!1), Y("playVideo"));
3362
- }, [I, r, N]), _(() => {
3380
+ }, [I, r, N]), E(() => {
3363
3381
  r == null && D.current && (B(!1), Y("playVideo"));
3364
3382
  }, [r]);
3365
- const T = t.length ? ((De = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : De.end) ?? t[t.length - 1].start + 4 : 0, E = e || T || 1, O = Ie(() => {
3383
+ const T = t.length ? ((Se = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : Se.end) ?? t[t.length - 1].start + 4 : 0, _ = e || T || 1, O = Ie(() => {
3366
3384
  if (!t.length) return 0;
3367
3385
  let $ = 0;
3368
3386
  for (let H = 0; H < t.length; H++) t[H].start <= N + 0.05 && ($ = H);
3369
3387
  return $;
3370
- }, [t, N]), [te, K] = j(0), L = ($) => {
3388
+ }, [t, N]), [te, K] = k(0), L = ($) => {
3371
3389
  const H = Math.max(0, f.current != null ? Math.min($, Math.max(0, f.current - 0.5)) : $);
3372
3390
  Y("seekTo", [H + m.current, !0]), v.current = { t: H, at: performance.now() }, p(H), K((A) => A + 1);
3373
- }, ie = k(!1), ne = k(void 0), G = ($) => {
3391
+ }, ie = j(!1), ne = j(void 0), G = ($) => {
3374
3392
  window.clearTimeout(ne.current), ne.current = window.setTimeout(() => {
3375
3393
  !ie.current || $ <= 0 || z.current === 1 || z.current === 3 || (Y("playVideo"), G($ - 1));
3376
3394
  }, 1200);
3377
3395
  };
3378
- _(() => () => window.clearTimeout(ne.current), []);
3396
+ E(() => () => window.clearTimeout(ne.current), []);
3379
3397
  const J = () => {
3380
3398
  if (ie.current = !0, !a.current) {
3381
3399
  o.current = !0;
@@ -3397,17 +3415,17 @@ function ac(t, e, n, r) {
3397
3415
  B(!1);
3398
3416
  return;
3399
3417
  }
3400
- N >= E - 0.25 && L(0), J();
3418
+ N >= _ - 0.25 && L(0), J();
3401
3419
  }, Te = ($) => {
3402
3420
  const H = t[Math.max(0, Math.min(t.length - 1, $))];
3403
3421
  H && L(H.start);
3404
- }, je = k(!1), Ae = () => {
3405
- const $ = h.current || M.current;
3422
+ }, je = j(!1), De = () => {
3423
+ const $ = M.current || h.current;
3406
3424
  S.muted = $, Y($ ? "mute" : "unMute");
3407
3425
  }, Le = ($) => {
3408
- h.current = $, d($), Ae();
3426
+ M.current = $, d($), De();
3409
3427
  }, we = ($) => {
3410
- M.current !== !$ && (M.current = !$, Ae());
3428
+ h.current !== !$ && (h.current = !$, De());
3411
3429
  };
3412
3430
  return { player: {
3413
3431
  autoplay: async () => {
@@ -3419,24 +3437,24 @@ function ac(t, e, n, r) {
3419
3437
  Le(!0);
3420
3438
  for (let A = 0; A < 5 && z.current !== 1; A++)
3421
3439
  Y("playVideo"), await H(() => z.current === 1, 1500);
3422
- return z.current !== 1 ? null : M.current ? (Le(!0), !1) : (Le(!1), await $(1200), z.current === 1 && F.current === !1 ? !0 : (Le(!0), Y("playVideo"), !1));
3440
+ return z.current !== 1 ? null : h.current ? (Le(!0), !1) : (Le(!1), await $(1200), z.current === 1 && F.current === !1 ? !0 : (Le(!0), Y("playVideo"), !1));
3423
3441
  },
3424
3442
  playing: X,
3425
3443
  ended: l === 0,
3426
3444
  t: N,
3427
3445
  idx: O,
3428
- dur: E,
3446
+ dur: _,
3429
3447
  muted: u,
3430
3448
  seekN: te,
3431
3449
  toggle: le,
3432
3450
  seekRow: Te,
3433
3451
  toggleMute: () => {
3434
- const $ = !h.current;
3435
- Le($), !$ && !M.current && z.current === 1 && setTimeout(() => {
3436
- z.current === 2 && !h.current && (Le(!0), Y("playVideo"));
3452
+ const $ = !M.current;
3453
+ Le($), !$ && !h.current && z.current === 1 && setTimeout(() => {
3454
+ z.current === 2 && !M.current && (Le(!0), Y("playVideo"));
3437
3455
  }, 900);
3438
3456
  },
3439
- seekFrac: ($) => L(Math.max(0, Math.min(1, $)) * E),
3457
+ seekFrac: ($) => L(Math.max(0, Math.min(1, $)) * _),
3440
3458
  seekWord: ($) => L($.start),
3441
3459
  playRow: ($) => {
3442
3460
  Te($), X || J();
@@ -3465,12 +3483,12 @@ function ac(t, e, n, r) {
3465
3483
  }
3466
3484
  function oc(t, e, n, r, s = 0, a = null) {
3467
3485
  var A;
3468
- const o = k(null), [l, c] = j(!1), [u, d] = j(0), [h, M] = j(!1), N = k(h);
3469
- N.current = h;
3470
- const p = k(!1), [y, v] = j(null), [m, f] = j(!1), I = k(s);
3486
+ const o = j(null), [l, c] = k(!1), [u, d] = k(0), [M, h] = k(!1), N = j(M);
3487
+ N.current = M;
3488
+ const p = j(!1), [y, v] = k(null), [m, f] = k(!1), I = j(s);
3471
3489
  I.current = s;
3472
- const C = k(null), [D, B] = j(0);
3473
- _(() => {
3490
+ const C = j(null), [D, B] = k(0);
3491
+ E(() => {
3474
3492
  f(!1);
3475
3493
  const b = C.current;
3476
3494
  if (C.current = null, b || d(0), !t) {
@@ -3480,7 +3498,7 @@ function oc(t, e, n, r, s = 0, a = null) {
3480
3498
  const V = pi(t), ce = I.current;
3481
3499
  return V.preload = "metadata", V.muted = N.current || p.current, V.onplay = () => c(!0), V.onpause = () => c(!1), V.onended = () => c(!1), V.onloadedmetadata = () => {
3482
3500
  f(!0), V.currentTime = ((b == null ? void 0 : b.t) ?? 0) + ce, b != null && b.playing && V.play().catch((W) => {
3483
- b.asked && (W == null ? void 0 : W.name) === "NotAllowedError" || v(jt(W));
3501
+ b.asked && (W == null ? void 0 : W.name) === "NotAllowedError" || v(It(W));
3484
3502
  });
3485
3503
  }, V.onerror = () => {
3486
3504
  c(!1);
@@ -3491,27 +3509,27 @@ function oc(t, e, n, r, s = 0, a = null) {
3491
3509
  }, o.current = V, () => {
3492
3510
  C.current = { t: Math.max(0, V.currentTime - ce), playing: !V.paused && !V.ended }, V.pause(), V.onplay = V.onpause = V.onended = V.onloadedmetadata = V.onerror = null, o.current = null;
3493
3511
  };
3494
- }, [t, D]), _(() => () => {
3512
+ }, [t, D]), E(() => () => {
3495
3513
  C.current = null;
3496
3514
  }, []);
3497
- const Y = n.length ? ((A = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : A.end) ?? n[n.length - 1].start + 4 : 0, X = s > 0 || r != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > r + 1, z = !X && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || r || Y || 1, F = k(z);
3515
+ const Y = n.length ? ((A = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : A.end) ?? n[n.length - 1].start + 4 : 0, X = s > 0 || r != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > r + 1, z = !X && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || r || Y || 1, F = j(z);
3498
3516
  F.current = z;
3499
- const S = k(X);
3517
+ const S = j(X);
3500
3518
  S.current = X;
3501
- const T = k(a);
3519
+ const T = j(a);
3502
3520
  T.current = a;
3503
- const [E, O] = j(!1), te = k(!1), K = (b) => {
3521
+ const [_, O] = k(!1), te = j(!1), K = (b) => {
3504
3522
  te.current = b, O(b);
3505
3523
  };
3506
- _(() => {
3524
+ E(() => {
3507
3525
  var b;
3508
3526
  a == null && te.current && (K(!1), (b = o.current) == null || b.play().catch(() => {
3509
3527
  }));
3510
- }, [a]), _(() => {
3528
+ }, [a]), E(() => {
3511
3529
  var b;
3512
- !E || a == null || a < u + 1.5 || (K(!1), (b = o.current) == null || b.play().catch(() => {
3530
+ !_ || a == null || a < u + 1.5 || (K(!1), (b = o.current) == null || b.play().catch(() => {
3513
3531
  }));
3514
- }, [E, a, u]), _(() => {
3532
+ }, [_, a, u]), E(() => {
3515
3533
  if (!l) return;
3516
3534
  let b = 0;
3517
3535
  const V = () => {
@@ -3537,11 +3555,11 @@ function oc(t, e, n, r, s = 0, a = null) {
3537
3555
  let b = 0;
3538
3556
  for (let V = 0; V < n.length; V++) n[V].start <= u + 0.05 && (b = V);
3539
3557
  return b;
3540
- }, [n, u]), [ie, ne] = j(0), G = (b) => {
3558
+ }, [n, u]), [ie, ne] = k(0), G = (b) => {
3541
3559
  const V = T.current != null ? Math.min(b, Math.max(0, T.current - 0.5)) : b, ce = o.current;
3542
3560
  d(V), ce && (ce.currentTime = V + I.current), ne((W) => W + 1);
3543
3561
  }, J = (b) => {
3544
- (b == null ? void 0 : b.name) !== "AbortError" && v(jt(b));
3562
+ (b == null ? void 0 : b.name) !== "AbortError" && v(It(b));
3545
3563
  }, pe = () => {
3546
3564
  var V;
3547
3565
  const b = o.current;
@@ -3566,7 +3584,7 @@ function oc(t, e, n, r, s = 0, a = null) {
3566
3584
  const V = n[Math.max(0, Math.min(n.length - 1, b))];
3567
3585
  V && G(V.start);
3568
3586
  }, Te = (b) => G(Math.max(0, Math.min(1, b)) * z), je = (b) => {
3569
- const V = zn(b, n, z);
3587
+ const V = In(b, n, z);
3570
3588
  G(V.t);
3571
3589
  const ce = o.current;
3572
3590
  if (ce) {
@@ -3576,14 +3594,14 @@ function oc(t, e, n, r, s = 0, a = null) {
3576
3594
  }
3577
3595
  K(!1), ce.play().catch(J);
3578
3596
  }
3579
- }, Ae = (b) => G(b.start), Le = (b) => {
3597
+ }, De = (b) => G(b.start), Le = (b) => {
3580
3598
  le(b);
3581
3599
  const V = o.current;
3582
3600
  V && V.paused && V.play().catch(J);
3583
- }, we = k(!1), Ee = k(0), Re = () => {
3601
+ }, we = j(!1), Ee = j(0), Re = () => {
3584
3602
  var b;
3585
3603
  l && ((b = o.current) == null || b.pause(), we.current = !0);
3586
- }, De = () => {
3604
+ }, Se = () => {
3587
3605
  var b;
3588
3606
  we.current && (we.current = !1, (b = o.current) == null || b.play().catch(J));
3589
3607
  };
@@ -3593,7 +3611,7 @@ function oc(t, e, n, r, s = 0, a = null) {
3593
3611
  if (!b) return null;
3594
3612
  b.currentTime < I.current && (b.currentTime = I.current);
3595
3613
  const V = (ce) => {
3596
- N.current = ce, b.muted = ce || p.current, M(ce);
3614
+ N.current = ce, b.muted = ce || p.current, h(ce);
3597
3615
  };
3598
3616
  try {
3599
3617
  return V(!1), await b.play(), !0;
@@ -3611,16 +3629,16 @@ function oc(t, e, n, r, s = 0, a = null) {
3611
3629
  t: u,
3612
3630
  idx: L,
3613
3631
  dur: z,
3614
- muted: h,
3632
+ muted: M,
3615
3633
  toggleMute: () => {
3616
3634
  const b = !N.current;
3617
- N.current = b, o.current && (o.current.muted = b || p.current), M(b);
3635
+ N.current = b, o.current && (o.current.muted = b || p.current), h(b);
3618
3636
  },
3619
3637
  toggle: pe,
3620
3638
  seekRow: le,
3621
3639
  seekFrac: Te,
3622
3640
  resumeAt: je,
3623
- seekWord: Ae,
3641
+ seekWord: De,
3624
3642
  playRow: Le,
3625
3643
  seekN: ie,
3626
3644
  stop: () => {
@@ -3637,15 +3655,15 @@ function oc(t, e, n, r, s = 0, a = null) {
3637
3655
  prev: () => le(L - 1),
3638
3656
  next: () => le(L + 1),
3639
3657
  hold: Re,
3640
- release: De,
3658
+ release: Se,
3641
3659
  error: y,
3642
3660
  clearError: () => v(null),
3643
3661
  has: e,
3644
- edgeWait: E,
3662
+ edgeWait: _,
3645
3663
  wordSync: !0,
3646
3664
  pause: () => {
3647
- var b;
3648
- K(!1), (b = o.current) == null || b.pause();
3665
+ var b, V;
3666
+ K(!1), (b = C.current) != null && b.asked && (C.current = null), (V = o.current) == null || V.pause();
3649
3667
  },
3650
3668
  setVolume: (b) => {
3651
3669
  o.current && (o.current.volume = b);
@@ -3656,27 +3674,27 @@ function oc(t, e, n, r, s = 0, a = null) {
3656
3674
  };
3657
3675
  }
3658
3676
  function lc(t, e, n, r, s, a, o = !1, l) {
3659
- const c = k(/* @__PURE__ */ new Set());
3677
+ const c = j(/* @__PURE__ */ new Set());
3660
3678
  c.current = l ?? c.current;
3661
- const u = k(null), [d, h] = j(!1), [M, N] = j(0), [p, y] = j(0), [v, m] = j(!1), f = k(v);
3679
+ const u = j(null), [d, M] = k(!1), [h, N] = k(0), [p, y] = k(0), [v, m] = k(!1), f = j(v);
3662
3680
  f.current = v;
3663
- const [I, C] = j(null), [D, B] = j(null), [Y, X] = j(null), [z, F] = j(null), S = k(z);
3681
+ const [I, C] = k(null), [D, B] = k(null), [Y, X] = k(null), [z, F] = k(null), S = j(z);
3664
3682
  S.current = z;
3665
- const [T, E] = j(null), [O, te] = j(null), [K, L] = j(null), [ie, ne] = j(!1), G = k(e);
3683
+ const [T, _] = k(null), [O, te] = k(null), [K, L] = k(null), [ie, ne] = k(!1), G = j(e);
3666
3684
  G.current = e;
3667
- const J = k(o), pe = k([]);
3685
+ const J = j(o), pe = j([]);
3668
3686
  J.current = o, u.current && (u.current.flow = o);
3669
- const le = k(null), Te = k(s);
3687
+ const le = j(null), Te = j(s);
3670
3688
  Te.current = s;
3671
- const je = k(a);
3689
+ const je = j(a);
3672
3690
  je.current = a;
3673
- const Ae = qe((U) => {
3691
+ const De = qe((U) => {
3674
3692
  U.finite = !0, U.coming = (R) => c.current.has(R), U.readAhead = 6, U.readAheadS = 45, U.onWaiting = (R) => B(R), U.onStarting = (R) => X(R), U.onSentence = (R) => {
3675
- if (h(U.playing), R == null) return;
3693
+ if (M(U.playing), R == null) return;
3676
3694
  const q = G.current.findIndex((re) => re.sentenceId === R);
3677
3695
  q >= 0 && N(q);
3678
3696
  }, U.onError = (R) => {
3679
- h(U.playing), C(R instanceof Ni ? { message: "The voice could not be started. Press Play to try again.", code: "voice_not_started" } : { message: "A line of this reading could not be played." });
3697
+ M(U.playing), C(R instanceof Ni ? { message: "The voice could not be started. Press Play to try again.", code: "voice_not_started" } : { message: "A line of this reading could not be played." });
3680
3698
  }, U.gapBefore = (R, q) => {
3681
3699
  if (!J.current) return 0;
3682
3700
  const re = G.current, de = re.find((Ce) => Ce.sentenceId === R), Oe = re.find((Ce) => Ce.sentenceId === q);
@@ -3684,32 +3702,32 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3684
3702
  const me = S.current;
3685
3703
  if (R == null) return me && me.sid === q ? Math.max(0, Oe.start - me.t) : 0;
3686
3704
  const ve = le.current;
3687
- return ve && Date.now() - ve.at < 2e3 ? Math.max(0, Oe.start - (ve.t + (Date.now() - ve.at) / 1e3 * U.rate)) : !de || Oe.start <= de.start ? 0 : Math.max(0, Oe.start - Yt(de, de.start, de.start + 4));
3705
+ return ve && Date.now() - ve.at < 2e3 ? Math.max(0, Oe.start - (ve.t + (Date.now() - ve.at) / 1e3 * U.rate)) : !de || Oe.start <= de.start ? 0 : Math.max(0, Oe.start - Ut(de, de.start, de.start + 4));
3688
3706
  }, U.flow = J.current, U.silentSpan = (R) => {
3689
- var Ve;
3690
- const q = G.current, re = q.findIndex((ut) => ut.sentenceId === R), de = q[re];
3707
+ var Be;
3708
+ const q = G.current, re = q.findIndex((ot) => ot.sentenceId === R), de = q[re];
3691
3709
  if (!de) return null;
3692
- const Oe = ((Ve = q[re + 1]) == null ? void 0 : Ve.start) ?? Yt(de, de.start, de.start + 4), me = Math.max(0, Oe - de.start), ve = le.current, Ce = ve && Date.now() - ve.at < 2e3 ? ve.t + (Date.now() - ve.at) / 1e3 * (U.rate || 1) : de.start, Ge = Math.max(0, Math.min(me, Ce - de.start));
3693
- return { fromS: Ge, ms: (me - Ge) * 1e3 / (U.rate || 1) };
3710
+ const Oe = ((Be = q[re + 1]) == null ? void 0 : Be.start) ?? Ut(de, de.start, de.start + 4), me = Math.max(0, Oe - de.start), ve = le.current, Ce = ve && Date.now() - ve.at < 2e3 ? ve.t + (Date.now() - ve.at) / 1e3 * (U.rate || 1) : de.start, We = Math.max(0, Math.min(me, Ce - de.start));
3711
+ return { fromS: We, ms: (me - We) * 1e3 / (U.rate || 1) };
3694
3712
  }, U.speakable = (R) => {
3695
3713
  const q = Te.current;
3696
3714
  if (!q || !q.size) return !0;
3697
3715
  const re = G.current.find((de) => de.sentenceId === R);
3698
3716
  return !re || !q.has(re.speaker);
3699
3717
  };
3700
- }, []), Le = k(null), we = k(null), Ee = k(null), [Re, De] = j(!1), $ = k(() => {
3718
+ }, []), Le = j(null), we = j(null), Ee = j(null), [Re, Se] = k(!1), $ = j(() => {
3701
3719
  }), H = (U) => {
3702
- if (Ee.current = U, De(!!(U != null && U.playing)), !U) return;
3703
- const R = zn(U, G.current, ze).index;
3704
- N(R), Se.current = R;
3720
+ if (Ee.current = U, Se(!!(U != null && U.playing)), !U) return;
3721
+ const R = In(U, G.current, ze).index;
3722
+ N(R), Ae.current = R;
3705
3723
  }, A = () => {
3706
3724
  Ee.current && H(null);
3707
3725
  };
3708
- _(() => {
3726
+ E(() => {
3709
3727
  var q;
3710
3728
  if (Le.current !== r) {
3711
3729
  const re = Le.current != null ? we.current : null;
3712
- Le.current = r, (q = u.current) == null || q.stop(), u.current = new Nr(), Ae(u.current), u.current.setSequence(pe.current), h(!1), N(0), C(null), X(null), F(null), H(re && (re.playing || re.t > 0) ? re : null);
3730
+ Le.current = r, (q = u.current) == null || q.stop(), u.current = new Nr(), De(u.current), u.current.setSequence(pe.current), M(!1), N(0), C(null), X(null), F(null), H(re && (re.playing || re.t > 0) ? re : null);
3713
3731
  }
3714
3732
  const U = u.current;
3715
3733
  U.setMuted(f.current);
@@ -3718,17 +3736,17 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3718
3736
  R && (J.current || t.some((re) => re.sentenceId >= (R.sentenceId ?? 0))) && (H(null), $.current(R));
3719
3737
  }, [r, t]);
3720
3738
  const b = Ie(() => o ? e.map((U) => U.sentenceId).filter((U) => U != null) : [], [e, o]);
3721
- pe.current = b, _(() => {
3739
+ pe.current = b, E(() => {
3722
3740
  var U;
3723
3741
  (U = u.current) == null || U.setSequence(b);
3724
- }, [b, r]), _(() => () => {
3742
+ }, [b, r]), E(() => () => {
3725
3743
  var U;
3726
3744
  (U = u.current) == null || U.stop(), u.current = null, Le.current = null;
3727
3745
  }, []);
3728
3746
  const V = T != null || O != null;
3729
- _(() => {
3747
+ E(() => {
3730
3748
  if (!d && !V) {
3731
- E(null), te(null);
3749
+ _(null), te(null);
3732
3750
  return;
3733
3751
  }
3734
3752
  const U = () => {
@@ -3738,7 +3756,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3738
3756
  const re = S.current;
3739
3757
  q == null ? L(null) : re && re.sid === q.sentenceId && (L(re.t), S.current = null, F(null));
3740
3758
  const de = ((ve = u.current) == null ? void 0 : ve.position()) ?? null, Oe = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
3741
- re && de && de.sentenceId === re.sid && de.t > 0.1 && F(null), E((Ce) => de ? Ce && Math.abs(Ce.t - de.t) < 0.05 && Ce.dur === de.dur && Ce.words === Oe ? Ce : { t: de.t, dur: de.dur, words: Oe } : Ce == null ? Ce : null);
3759
+ re && de && de.sentenceId === re.sid && de.t > 0.1 && F(null), _((Ce) => de ? Ce && Math.abs(Ce.t - de.t) < 0.05 && Ce.dur === de.dur && Ce.words === Oe ? Ce : { t: de.t, dur: de.dur, words: Oe } : Ce == null ? Ce : null);
3742
3760
  };
3743
3761
  U();
3744
3762
  const R = setInterval(U, 100);
@@ -3751,24 +3769,24 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3751
3769
  }, ye = (U, R) => {
3752
3770
  for (let q = U; q >= 0 && q < e.length; q += R) if (W(q)) return q;
3753
3771
  return null;
3754
- }, Z = Math.max(0, Math.min(M, Math.max(0, e.length - 1))), ke = e.length ? e[e.length - 1].start + 4 : 0, ze = n || ke || 1, Fe = k(!1), Se = k(M);
3755
- Se.current = M;
3772
+ }, Z = Math.max(0, Math.min(h, Math.max(0, e.length - 1))), ke = e.length ? e[e.length - 1].start + 4 : 0, ze = n || ke || 1, Ge = j(!1), Ae = j(h);
3773
+ Ae.current = h;
3756
3774
  const ge = (U) => {
3757
3775
  var R, q, re;
3758
- (q = u.current) == null || q.play(((R = e[U]) == null ? void 0 : R.sentenceId) ?? null), h(!!((re = u.current) != null && re.playing));
3776
+ (q = u.current) == null || q.play(((R = e[U]) == null ? void 0 : R.sentenceId) ?? null), M(!!((re = u.current) != null && re.playing));
3759
3777
  }, _e = (U) => {
3760
3778
  var q, re, de;
3761
3779
  const R = Math.max(0, Math.min(Math.max(0, e.length - 1), U));
3762
- N(R), Se.current = R, y((Oe) => Oe + 1), (re = u.current) == null || re.seek(((q = e[R]) == null ? void 0 : q.sentenceId) ?? null), h(!!((de = u.current) != null && de.playing));
3763
- }, Be = (U) => {
3780
+ N(R), Ae.current = R, y((Oe) => Oe + 1), (re = u.current) == null || re.seek(((q = e[R]) == null ? void 0 : q.sentenceId) ?? null), M(!!((de = u.current) != null && de.playing));
3781
+ }, Ve = (U) => {
3764
3782
  var R;
3765
3783
  A(), F(null), (R = u.current) == null || R.startWithin(-1, 0), _e(U);
3766
3784
  }, Q = (U) => {
3767
3785
  var de;
3768
- const R = e[U], q = (R == null ? void 0 : R.start) ?? 0, re = ((de = e[U + 1]) == null ? void 0 : de.start) ?? Yt(R, q, ze);
3786
+ const R = e[U], q = (R == null ? void 0 : R.start) ?? 0, re = ((de = e[U + 1]) == null ? void 0 : de.start) ?? Ut(R, q, ze);
3769
3787
  return { from: q, span: Math.max(0, re - q) };
3770
- }, he = Q(Z), ue = Math.max(0, Math.min(he.span, Yt(e[Z], he.from, he.from + 4) - he.from)), ae = z ? z.t : o ? O != null && ie ? he.from + Math.min(he.span, O) : O != null ? K != null ? Math.min(he.from, K + O) : he.from + Math.min(he.span, ue + O) : T && T.dur > 0 ? he.from + Math.min(ue, T.t / T.dur * ue) : he.from : T && T.dur > 0 ? he.from + Math.min(he.span, T.t / T.dur * he.span) : he.from;
3771
- _(() => {
3788
+ }, he = Q(Z), ue = Math.max(0, Math.min(he.span, Ut(e[Z], he.from, he.from + 4) - he.from)), ae = z ? z.t : o ? O != null && ie ? he.from + Math.min(he.span, O) : O != null ? K != null ? Math.min(he.from, K + O) : he.from + Math.min(he.span, ue + O) : T && T.dur > 0 ? he.from + Math.min(ue, T.t / T.dur * ue) : he.from : T && T.dur > 0 ? he.from + Math.min(he.span, T.t / T.dur * he.span) : he.from;
3789
+ E(() => {
3772
3790
  we.current = Ee.current ?? ql(e, ae, d, ze);
3773
3791
  });
3774
3792
  const fe = {
@@ -3802,53 +3820,53 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3802
3820
  return;
3803
3821
  }
3804
3822
  if (A(), d) {
3805
- (R = u.current) == null || R.pause(), h(!1);
3823
+ (R = u.current) == null || R.pause(), M(!1);
3806
3824
  return;
3807
3825
  }
3808
3826
  C(null);
3809
- const U = Se.current;
3827
+ const U = Ae.current;
3810
3828
  if (!S.current && ((re = u.current) != null && re.resume(((q = e[U]) == null ? void 0 : q.sentenceId) ?? null))) {
3811
- h(!0);
3829
+ M(!0);
3812
3830
  return;
3813
3831
  }
3814
3832
  ge(U);
3815
3833
  },
3816
3834
  pause: () => {
3817
3835
  var U;
3818
- A(), (U = u.current) == null || U.pause(), h(!1);
3836
+ A(), (U = u.current) == null || U.pause(), M(!1);
3819
3837
  },
3820
3838
  stop: () => {
3821
3839
  var U, R, q;
3822
- A(), (U = u.current) == null || U.pause(), h(!1), N(0), E(null), (q = u.current) == null || q.seek(((R = e[0]) == null ? void 0 : R.sentenceId) ?? null);
3840
+ A(), (U = u.current) == null || U.pause(), M(!1), N(0), _(null), (q = u.current) == null || q.seek(((R = e[0]) == null ? void 0 : R.sentenceId) ?? null);
3823
3841
  },
3824
- seekRow: Be,
3842
+ seekRow: Ve,
3825
3843
  resumeAt: (U) => {
3826
3844
  H(U), t.some((R) => R.sentenceId >= (U.sentenceId ?? 0)) && (H(null), $.current(U));
3827
3845
  },
3828
3846
  seekFrac: (U) => {
3829
- var ut, st, ft;
3847
+ var ot, st, pt;
3830
3848
  A();
3831
3849
  const R = Math.max(0, Math.min(1, U)) * ze;
3832
3850
  let q = 0;
3833
3851
  for (let Ze = 0; Ze < e.length; Ze++) e[Ze].start <= R && (q = Ze);
3834
3852
  const re = e[q], de = o && re && R < re.start - 0.05;
3835
- if (o && re && (de || e[q + 1] && R >= Yt(re, re.start, re.start + 4))) {
3853
+ if (o && re && (de || e[q + 1] && R >= Ut(re, re.start, re.start + 4))) {
3836
3854
  const Ze = de ? q : q + 1, it = e[Ze];
3837
- (ut = u.current) == null || ut.startWithin(-1, 0);
3855
+ (ot = u.current) == null || ot.startWithin(-1, 0);
3838
3856
  const dt = { t: R, sid: it.sentenceId ?? null };
3839
3857
  S.current = dt, F(dt), _e(Ze);
3840
3858
  return;
3841
3859
  }
3842
3860
  const Oe = (re == null ? void 0 : re.sentenceId) ?? null, { from: me, span: ve } = Q(q);
3843
3861
  let Ce = ve > 0 ? Math.max(0, Math.min(1, (R - me) / ve)) : 0;
3844
- const Ge = Oe != null ? (st = je.current) == null ? void 0 : st[String(Oe)] : void 0, Ve = Ge != null && Ge.length ? Ge[Ge.length - 1][1] : 0;
3845
- if (re && Ge && Ge.length === re.words.length && Ve > 0) {
3862
+ const We = Oe != null ? (st = je.current) == null ? void 0 : st[String(Oe)] : void 0, Be = We != null && We.length ? We[We.length - 1][1] : 0;
3863
+ if (re && We && We.length === re.words.length && Be > 0) {
3846
3864
  let Ze = 0;
3847
3865
  for (let Qe = 0; Qe < re.words.length; Qe++) re.words[Qe].start <= R && (Ze = Qe);
3848
3866
  const it = re.words[Ze], dt = it.end > it.start ? Math.max(0, Math.min(1, (R - it.start) / (it.end - it.start))) : 0;
3849
- Ce = Math.min(1, (Ge[Ze][0] + dt * (Ge[Ze][1] - Ge[Ze][0])) / Ve);
3867
+ Ce = Math.min(1, (We[Ze][0] + dt * (We[Ze][1] - We[Ze][0])) / Be);
3850
3868
  }
3851
- Oe != null && ((ft = u.current) == null || ft.startWithin(Oe, Ce)), F(Ce > 0.01 ? { t: R, sid: Oe } : null), _e(q);
3869
+ Oe != null && ((pt = u.current) == null || pt.startWithin(Oe, Ce)), F(Ce > 0.01 ? { t: R, sid: Oe } : null), _e(q);
3852
3870
  },
3853
3871
  seekWord: a ? (U) => {
3854
3872
  var de, Oe, me, ve;
@@ -3861,22 +3879,22 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3861
3879
  var q;
3862
3880
  A();
3863
3881
  const R = Math.max(0, Math.min(Math.max(0, e.length - 1), U));
3864
- F(null), (q = u.current) == null || q.startWithin(-1, 0), N(R), Se.current = R, y((re) => re + 1), ge(R);
3882
+ F(null), (q = u.current) == null || q.startWithin(-1, 0), N(R), Ae.current = R, y((re) => re + 1), ge(R);
3865
3883
  },
3866
3884
  prev: () => {
3867
3885
  const U = ye(Z - 1, -1);
3868
- U != null && Be(U);
3886
+ U != null && Ve(U);
3869
3887
  },
3870
3888
  next: () => {
3871
3889
  const U = ye(Z + 1, 1);
3872
- U != null && Be(U);
3890
+ U != null && Ve(U);
3873
3891
  },
3874
3892
  hold: () => {
3875
3893
  var U;
3876
- d && ((U = u.current) == null || U.pause(), Fe.current = !0);
3894
+ d && ((U = u.current) == null || U.pause(), Ge.current = !0);
3877
3895
  },
3878
3896
  release: () => {
3879
- Fe.current && (Fe.current = !1, ge(Se.current));
3897
+ Ge.current && (Ge.current = !1, ge(Ae.current));
3880
3898
  },
3881
3899
  clearError: () => C(null),
3882
3900
  setVolume: (U) => {
@@ -3888,114 +3906,117 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3888
3906
  var re, de, Oe, me;
3889
3907
  const R = (re = e[U]) == null ? void 0 : re.sentenceId;
3890
3908
  if (R == null) return;
3891
- N(U), Se.current = U, F(null), S.current = null, (de = u.current) == null || de.joinSilently(R);
3909
+ N(U), Ae.current = U, F(null), S.current = null, (de = u.current) == null || de.joinSilently(R);
3892
3910
  const q = ((Oe = u.current) == null ? void 0 : Oe.resting()) ?? null;
3893
- te((q == null ? void 0 : q.s) ?? null), ne(!!(q != null && q.silent)), h(!!((me = u.current) != null && me.playing));
3911
+ te((q == null ? void 0 : q.s) ?? null), ne(!!(q != null && q.silent)), M(!!((me = u.current) != null && me.playing));
3894
3912
  }
3895
3913
  return fe.joinAt = o ? (U) => {
3896
- A(), Ye(zn({ t: U, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, ze).index);
3914
+ A(), Ye(In({ t: U, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, ze).index);
3897
3915
  } : void 0, $.current = (U) => {
3898
3916
  var q;
3899
- const R = zn(U, e, ze);
3917
+ const R = In(U, e, ze);
3900
3918
  if (J.current) {
3901
- N(R.index), Se.current = R.index, R.playing && Ye(R.index);
3919
+ N(R.index), Ae.current = R.index, R.playing && Ye(R.index);
3902
3920
  return;
3903
3921
  }
3904
- (q = fe.seekFrac) == null || q.call(fe, R.t / ze), R.playing && ge(Se.current);
3922
+ (q = fe.seekFrac) == null || q.call(fe, R.t / ze), R.playing && ge(Ae.current);
3905
3923
  }, fe;
3906
3924
  }
3907
3925
  const cc = () => {
3908
3926
  }, uc = "The language this recording is read aloud in.", dc = { title: "READ IN", note: "The transcript and its voice switch to this language." };
3909
- function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: h, hearOriginal: M = !1, timed: N = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: v = null, voiceSheet: m, forcedVoice: f = null }) {
3910
- var wt, cn, un, qt;
3911
- const { onAddVoice: I, onPickVoice: C, onSelectSpeaker: D, noCloneFor: B, castNoClone: Y, castShort: X, castBuilding: z, castWarn: F, badge: S, titleNode: T } = m ?? {}, E = !!m, O = !!(m != null && m.pendingClones), [te, K] = wi(), [L, ie] = j(null), [ne, G] = j(!1), [J, pe] = j(!1), [le, Te] = j(!1), [je, Ae] = j(!1), Le = u ?? l, we = u === null, Ee = u != null || L != null, De = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : Le) ? we ? l : Le : "en", $ = Zl(De), H = (m == null ? void 0 : m.cloneOn) ?? !0, [A, b] = j(0), V = k(H);
3912
- _(() => {
3927
+ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: M, hearOriginal: h = !1, timed: N = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: v = null, voiceSheet: m, forcedVoice: f = null }) {
3928
+ var Lt, un, dn, Kt;
3929
+ const { onAddVoice: I, onPickVoice: C, onSelectSpeaker: D, noCloneFor: B, castNoClone: Y, castShort: X, castBuilding: z, castWarn: F, badge: S, titleNode: T } = m ?? {}, _ = !!m, O = !!(m != null && m.pendingClones), [te, K] = wi(), [L, ie] = k(null), [ne, G] = k(!1), [J, pe] = k(!1), [le, Te] = k(!1), [je, De] = k(!1), Le = u ?? l, we = u === null, Ee = u != null || L != null, Se = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : Le) ? we ? l : Le : "en", $ = Zl(Se), H = (m == null ? void 0 : m.cloneOn) ?? !0, [A, b] = k(0), V = j(H);
3930
+ E(() => {
3913
3931
  V.current !== H && (V.current = H, b((P) => P + 1));
3914
3932
  }, [H]);
3915
- const ce = Ol(De, Ee || s || J, Cl(e) * 1e3 + A, { id: t ?? null, shareCode: a.shareCode ?? null }), W = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => E || !P.cloned || P.speaker != null), [ce, E]), ye = W.length > 1, Z = vr(o, Le), ke = xi(), ze = Ie(() => Li(o, "translation"), [o]), [Fe, Se] = j(null), [ge] = j(() => /* @__PURE__ */ new Set()), [_e, Be] = j({}), Q = Ie(() => vl(n, e, ke.vcUnknownSpk), [n, e, ke]), he = ye && Q.filter((P) => P.key >= 0).length > 1, ue = Fe != null && Q.some((P) => P.key === Fe) ? Fe : ((wt = Q[0]) == null ? void 0 : wt.key) ?? null, ae = Ie(() => {
3933
+ const ce = Ol(Se, Ee || s || J, Cl(e) * 1e3 + A, { id: t ?? null, shareCode: a.shareCode ?? null }), W = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => _ || !P.cloned || P.speaker != null), [ce, _]), ye = W.length > 1, Z = vr(o, Le), ke = xi(), ze = Ie(() => Li(o, "translation"), [o]), [Ge, Ae] = k(null), [ge] = k(() => /* @__PURE__ */ new Set()), [_e, Ve] = k({}), Q = Ie(() => vl(n, e, ke.vcUnknownSpk), [n, e, ke]), he = ye && Q.filter((P) => P.key >= 0).length > 1, ue = Ge != null && Q.some((P) => P.key === Ge) ? Ge : ((Lt = Q[0]) == null ? void 0 : Lt.key) ?? null, ae = Ie(() => {
3916
3934
  const P = ti(Q, W, H);
3917
- for (const [xe, He] of Object.entries(_e[De ?? ""] ?? {})) P.set(Number(xe), He);
3935
+ for (const [xe, He] of Object.entries(_e[Se ?? ""] ?? {})) P.set(Number(xe), He);
3918
3936
  return P;
3919
- }, [Q, W, _e, De, H]), fe = he && Object.keys(_e[De ?? ""] ?? {}).length > 0, Ye = Ie(() => p && !fe ? ti(Q, W, !1) : null, [p, fe, Q, W]), U = Ie(() => fe ? Xs(ae) || null : Ye && Xs(Ye) || null, [fe, ae, Ye]), R = fe ? ae : Ye, q = W.some((P) => P.cloned && P.consent !== "pending"), re = !!Le && !!(o != null && o.voice.includes(Le)), de = re && !M, Oe = Ie(
3937
+ }, [Q, W, _e, Se, H]), fe = he && Object.keys(_e[Se ?? ""] ?? {}).length > 0, Ye = Ie(() => p && !fe ? ti(Q, W, !1) : null, [p, fe, Q, W]), U = Ie(() => fe ? Xs(ae) || null : Ye && Xs(Ye) || null, [fe, ae, Ye]), R = fe ? ae : Ye, q = W.some((P) => P.cloned && P.consent !== "pending"), re = !!Le && !!(o != null && o.voice.includes(Le)), de = re && !h, Oe = Ie(
3920
3938
  () => n.filter((P) => !P.suppressed && !P.unclear).map((P) => P.sentenceId).filter((P) => P != null),
3921
3939
  [n]
3922
3940
  ), me = bl({ recordingId: t, lang: Le, ended: s, cred: a, pickedVoice: f || (U ?? L), sentenceIds: s && de ? Oe : void 0 }), ve = W.find((P) => P.id === L) ?? W.find((P) => {
3923
3941
  var xe;
3924
3942
  return P.id === ((xe = me.track) == null ? void 0 : xe.voice);
3925
3943
  }) ?? W.find((P) => P.default) ?? W[0] ?? null, Ce = (ve == null ? void 0 : ve.id) ?? null;
3926
- _(() => {
3944
+ E(() => {
3927
3945
  if (!me.rendering) return;
3928
3946
  const P = setInterval(me.reload, 4e3);
3929
3947
  return () => clearInterval(P);
3930
3948
  }, [me.rendering, me.reload]);
3931
- const Ge = `${t ?? ""}|${Le ?? ""}|${f || (U ?? L ?? ((cn = me.track) == null ? void 0 : cn.voiceKey) ?? "default")}`, Ve = lc(me.clips, n, r, Ge, ge, (un = me.track) == null ? void 0 : un.wordTimes, N, me.coming);
3932
- _(() => {
3949
+ const We = `${t ?? ""}|${Le ?? ""}|${f || (U ?? L ?? ((un = me.track) == null ? void 0 : un.voiceKey) ?? "default")}`, Be = lc(me.clips, n, r, We, ge, (dn = me.track) == null ? void 0 : dn.wordTimes, N, me.coming);
3950
+ E(() => {
3933
3951
  var xe;
3934
- const P = (xe = n[Ve.idx]) == null ? void 0 : xe.sentenceId;
3952
+ const P = (xe = n[Be.idx]) == null ? void 0 : xe.sentenceId;
3935
3953
  P != null && me.setNear(P);
3936
- }, [Ve.idx]), _(() => {
3937
- !je || !Ve.has || (Ae(!1), Ve.playing || Ve.toggle());
3938
- }, [je, Ve.has]);
3939
- const ut = me.rendering, st = ut ? null : me.failed ?? null, ft = !1, Ze = Ee && de, it = Ee && !we && de && !(me.listed && me.listed.lang === Le && me.listed.recordingId === t), dt = {
3940
- ...Ve,
3941
- has: Ve.has || Ze && s,
3954
+ }, [Be.idx]), E(() => {
3955
+ !je || !Be.has || (De(!1), Be.playing || Be.toggle());
3956
+ }, [je, Be.has]);
3957
+ const ot = me.rendering, st = ot ? null : me.failed ?? null, pt = !1, Ze = Ee && de, it = Ee && !we && de && !(me.listed && me.listed.lang === Le && me.listed.recordingId === t), dt = {
3958
+ ...Be,
3959
+ has: Be.has || Ze && s,
3942
3960
  toggle: () => {
3943
- if (!Ve.has && !Ve.playing) {
3944
- Ae(!0);
3961
+ if (!Be.has && !Be.playing) {
3962
+ De(!0);
3945
3963
  return;
3946
3964
  }
3947
- Ve.toggle();
3965
+ Be.toggle();
3966
+ },
3967
+ pause: () => {
3968
+ De(!1), Be.pause();
3948
3969
  }
3949
- }, Qe = () => G(!0), Wt = () => {
3970
+ }, Qe = () => G(!0), Ft = () => {
3950
3971
  G(!1), pe(le), Te(!1);
3951
- }, xt = (P) => {
3952
- if (d(P), K(P), !((h || y) && !le)) {
3972
+ }, Dt = (P) => {
3973
+ if (d(P), K(P), !((M || y) && !le)) {
3953
3974
  if (P != null) {
3954
- Wt();
3975
+ Ft();
3955
3976
  return;
3956
3977
  }
3957
3978
  $.reset(), G(!1), pe(!1), Te(!1);
3958
3979
  }
3959
3980
  }, Ke = () => {
3960
3981
  $.reset(), pe(!0);
3961
- }, zt = () => {
3982
+ }, ht = () => {
3962
3983
  $.reset(), pe(!1);
3963
- }, ot = ne && !le, yt = J || ne && le, se = () => {
3964
- if (ot) {
3984
+ }, lt = ne && !le, Tt = J || ne && le, se = () => {
3985
+ if (lt) {
3965
3986
  G(!1);
3966
3987
  return;
3967
3988
  }
3968
3989
  $.reset(), pe(!1), Te(!1), G(!0);
3969
- }, Ft = () => {
3970
- if ($.reset(), yt) {
3990
+ }, Gt = () => {
3991
+ if ($.reset(), Tt) {
3971
3992
  pe(!1), G(!1), Te(!1);
3972
3993
  return;
3973
3994
  }
3974
3995
  G(!1), Te(!1), pe(!0);
3975
3996
  }, x = (P) => {
3976
- if ($.reset(), pe(he), (Le !== De || we) && d(De), me.forget(), Ae(!0), he && ue != null && De) {
3997
+ if ($.reset(), pe(he), (Le !== Se || we) && d(Se), me.forget(), De(!0), he && ue != null && Se) {
3977
3998
  const xe = new Map(ae);
3978
- xe.set(ue, P), Be((He) => ({ ...He, [De]: Object.fromEntries(xe) })), ie(null);
3999
+ xe.set(ue, P), Ve((He) => ({ ...He, [Se]: Object.fromEntries(xe) })), ie(null);
3979
4000
  return;
3980
4001
  }
3981
4002
  ie(P);
3982
- }, ht = we ? { ...vr(o, null), flag: /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, Dt = c ? h ? /* @__PURE__ */ i("span", { className: "barchip", style: ot ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(bn, { flag: ht.flag, code: ht.code, bordered: !1, onClick: se, flagOnly: !0, label: ht.label }) }) : /* @__PURE__ */ i(bn, { flag: ht.flag, code: ht.code, bordered: !1, onClick: Qe, flagOnly: !0, label: ht.label }) : null, Rt = ee.voiceClone, It = Ee && (!!me.track || ut), _n = st ? "var(--conf-low)" : It || h && yt ? "var(--brand)" : "var(--ink-55)", Pt = ut || !!Ve.preparing && Ee, Je = Ve.preparing ? `Speaking this line in ${(ve == null ? void 0 : ve.name) ?? "this voice"}…` : ut ? `Preparing this recording in ${(ve == null ? void 0 : ve.name) ?? "this voice"} — it will play as soon as it is ready` : st ? `This voice could not be prepared: ${st}` : re ? ye ? "Choose a voice" : ve ? ve.name : ke.vcNoVoice + Z.label : `${ke.vcNoVoice}${Z.label}`, Mt = /* @__PURE__ */ i(to, { open: ne, onClose: Wt, keepOpen: (!!h || y) && !le, value: we ? null : Le, onSelect: xt, languages: ze, title: (h == null ? void 0 : h.title) ?? "SPOKEN LANGUAGE", note: (h == null ? void 0 : h.note) ?? uc, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te, requireVoice: le, sticky: y, busy: v }), Ot = Ie(() => W.filter((P) => P.cloned && !P.auto), [W]), lt = (P) => P.voiceId ? Ot.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, et = Ie(() => Q.filter((P) => P.key >= 0), [Q]), Gt = Ie(() => {
4003
+ }, Mt = we ? { ...vr(o, null), flag: /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, St = c ? M ? /* @__PURE__ */ i("span", { className: "barchip", style: lt ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: se, flagOnly: !0, label: Mt.label }) }) : /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: Qe, flagOnly: !0, label: Mt.label }) : null, Pt = ee.voiceClone, Ot = Ee && (!!me.track || ot), Yn = st ? "var(--conf-low)" : Ot || M && Tt ? "var(--brand)" : "var(--ink-55)", Qt = ot || !!Be.preparing && Ee, Je = Be.preparing ? `Speaking this line in ${(ve == null ? void 0 : ve.name) ?? "this voice"}…` : ot ? `Preparing this recording in ${(ve == null ? void 0 : ve.name) ?? "this voice"} — it will play as soon as it is ready` : st ? `This voice could not be prepared: ${st}` : re ? ye ? "Choose a voice" : ve ? ve.name : ke.vcNoVoice + Z.label : `${ke.vcNoVoice}${Z.label}`, gt = /* @__PURE__ */ i(to, { open: ne, onClose: Ft, keepOpen: (!!M || y) && !le, value: we ? null : Le, onSelect: Dt, languages: ze, title: (M == null ? void 0 : M.title) ?? "SPOKEN LANGUAGE", note: (M == null ? void 0 : M.note) ?? uc, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te, requireVoice: le, sticky: y, busy: v }), Ct = Ie(() => W.filter((P) => P.cloned && !P.auto), [W]), ct = (P) => P.voiceId ? Ct.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, et = Ie(() => Q.filter((P) => P.key >= 0), [Q]), Zt = Ie(() => {
3983
4004
  const P = W.filter((He) => !He.cloned);
3984
- if (!he) return [...P, ...s && et.length === 1 ? Ot.filter((He) => He.id === `clone:${et[0].voiceId}`) : []];
4005
+ if (!he) return [...P, ...s && et.length === 1 ? Ct.filter((He) => He.id === `clone:${et[0].voiceId}`) : []];
3985
4006
  const xe = [];
3986
4007
  for (const He of et) {
3987
- if (lt(He)) continue;
3988
- const Lt = W.find((At) => At.cloned && At.auto && At.speaker === He.key);
3989
- !Lt || Lt.ready === !1 || Lt.consent === "pending" && !O || xe.push({ id: Lt.id, name: He.name, cloned: !0, default: !1, live: !0, auto: !0, gender: He.sex ?? Lt.gender ?? null, speaker: He.key, consent: Lt.consent ?? null });
4008
+ if (ct(He)) continue;
4009
+ const vt = W.find((Et) => Et.cloned && Et.auto && Et.speaker === He.key);
4010
+ !vt || vt.ready === !1 || vt.consent === "pending" && !O || xe.push({ id: vt.id, name: He.name, cloned: !0, default: !1, live: !0, auto: !0, gender: He.sex ?? vt.gender ?? null, speaker: He.key, consent: vt.consent ?? null });
3990
4011
  }
3991
- return [...P, ...Ot, ...xe];
3992
- }, [W, Ot, he, et, O, s]), at = he ? et.find((P) => P.key === ue) ?? null : null, rn = (P) => {
4012
+ return [...P, ...Ct, ...xe];
4013
+ }, [W, Ct, he, et, O, s]), at = he ? et.find((P) => P.key === ue) ?? null : null, sn = (P) => {
3993
4014
  var xe;
3994
4015
  return P ? ((xe = W.find((He) => He.id === P)) == null ? void 0 : xe.gender) ?? null : null;
3995
- }, sn = at ? at.sex ?? rn(ae.get(at.key)) : null, Zt = Ie(() => at ? Gt.filter((P) => P.cloned ? P.live ? P.speaker === at.key : P.id === `clone:${at.voiceId}` : !0) : Gt, [Gt, at, sn, et]), Tt = (P) => W.find((xe) => xe.cloned && xe.auto && xe.speaker === P) ?? null, $e = { people: et, gvList: W, autoOf: Tt, savedFor: lt }, Ct = (S == null ? void 0 : S($e)) ?? 0, an = F ? et.map((P) => F(P, $e)).filter((P) => !!P) : [], on = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": h ? yt : void 0, title: Pt || st ? Je : void 0, style: { cursor: "pointer", background: It || Pt || h && yt ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: h && yt ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: h ? Ft : Ke, children: [
3996
- Pt ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: Rt, size: 17, sw: 1.6, style: { color: _n } }),
3997
- an.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: an.join(" · "), children: "!" }) : !!Ct && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${Ct} speaker${Ct === 1 ? "" : "s"} can get a cloned voice`, children: Ct })
3998
- ] }), tt = /* @__PURE__ */ i(Ht, { open: J, onClose: zt, title: ke.vcSheet, titleNode: T, doneLabel: ke.done, children: /* @__PURE__ */ i(
4016
+ }, an = at ? at.sex ?? sn(ae.get(at.key)) : null, qt = Ie(() => at ? Zt.filter((P) => P.cloned ? P.live ? P.speaker === at.key : P.id === `clone:${at.voiceId}` : !0) : Zt, [Zt, at, an, et]), wt = (P) => W.find((xe) => xe.cloned && xe.auto && xe.speaker === P) ?? null, $e = { people: et, gvList: W, autoOf: wt, savedFor: ct }, bt = (S == null ? void 0 : S($e)) ?? 0, on = F ? et.map((P) => F(P, $e)).filter((P) => !!P) : [], ln = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": M ? Tt : void 0, title: Qt || st ? Je : void 0, style: { cursor: "pointer", background: Ot || Qt || M && Tt ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: M && Tt ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: M ? Gt : Ke, children: [
4017
+ Qt ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: Pt, size: 17, sw: 1.6, style: { color: Yn } }),
4018
+ on.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: on.join(" · "), children: "!" }) : !!bt && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${bt} speaker${bt === 1 ? "" : "s"} can get a cloned voice`, children: bt })
4019
+ ] }), tt = /* @__PURE__ */ i(Wt, { open: J, onClose: ht, title: ke.vcSheet, titleNode: T, doneLabel: ke.done, children: /* @__PURE__ */ i(
3999
4020
  jl,
4000
4021
  {
4001
4022
  t: ke,
@@ -4006,26 +4027,26 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4006
4027
  roster: Q,
4007
4028
  selected: ue,
4008
4029
  onSelect: (P) => {
4009
- $.reset(), Se(P), D == null || D(P);
4030
+ $.reset(), Ae(P), D == null || D(P);
4010
4031
  },
4011
4032
  noClone: (P) => !!(Y != null && Y(P, $e)),
4012
4033
  short: (P) => !!(X != null && X(P, $e)),
4013
4034
  warn: (P) => (F == null ? void 0 : F(P, $e)) ?? null,
4014
- building: (P) => !lt(P) && (W.some((xe) => xe.cloned && xe.speaker === P.key && xe.ready === !1) || !!(z != null && z(P, $e))),
4015
- sexOf: (P) => P.sex ?? rn(ae.get(P.key))
4035
+ building: (P) => !ct(P) && (W.some((xe) => xe.cloned && xe.speaker === P.key && xe.ready === !1) || !!(z != null && z(P, $e))),
4036
+ sexOf: (P) => P.sex ?? sn(ae.get(P.key))
4016
4037
  }
4017
4038
  ),
4018
- voices: Zt,
4039
+ voices: qt,
4019
4040
  onAdd: (P) => {
4020
4041
  $.reset(), I == null || I(P);
4021
4042
  },
4022
- noClone: at && !Zt.some((P) => P.cloned) ? (B == null ? void 0 : B(at, Tt(at.key), $e)) ?? null : null,
4043
+ noClone: at && !qt.some((P) => P.cloned) ? (B == null ? void 0 : B(at, wt(at.key), $e)) ?? null : null,
4023
4044
  usedBy: he && ue != null ? (P) => {
4024
4045
  const xe = Q.filter((He) => He.key !== ue && ae.get(He.key) === P.id);
4025
4046
  return xe.length ? xe.map((He) => He.name).join(", ") : null;
4026
4047
  } : void 0,
4027
4048
  foldKey: ue,
4028
- foldFor: sn,
4049
+ foldFor: an,
4029
4050
  currentId: he && ue != null ? ae.get(ue) ?? null : Ce,
4030
4051
  armedId: $.armId,
4031
4052
  sampleId: $.sampleId,
@@ -4043,25 +4064,25 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4043
4064
  },
4044
4065
  onUse: x
4045
4066
  }
4046
- ) }), ln = h ? null : /* @__PURE__ */ g(be, { children: [
4047
- Mt,
4067
+ ) }), cn = M ? null : /* @__PURE__ */ g(be, { children: [
4068
+ gt,
4048
4069
  tt
4049
- ] }), St = h && (ne || J) ? /* @__PURE__ */ i("div", { className: "vs-side", children: ne ? Mt : tt }) : null, Yn = Ze && st ? `This voice could not be prepared: ${st}` : null, Un = ft;
4070
+ ] }), At = M && (ne || J) ? /* @__PURE__ */ i("div", { className: "vs-side", children: ne ? gt : tt }) : null, Un = Ze && st ? `This voice could not be prepared: ${st}` : null, Rn = pt;
4050
4071
  return {
4051
- barChip: { flag: ht.flag, code: ht.code, label: ht.label, onClick: h || y ? se : Qe, active: !!((h || y) && ot), can: c },
4072
+ barChip: { flag: Mt.flag, code: Mt.code, label: Mt.label, onClick: M || y ? se : Qe, active: !!((M || y) && lt), can: c },
4052
4073
  sheetsOpen: ne || J,
4053
4074
  on: Ze,
4054
4075
  player: dt,
4055
- chip: Dt,
4056
- voiceBtn: on,
4057
- sheets: ln,
4058
- sidePanel: St,
4059
- voicesMine: yt,
4060
- toggleVoices: Ft,
4076
+ chip: St,
4077
+ voiceBtn: ln,
4078
+ sheets: cn,
4079
+ sidePanel: At,
4080
+ voicesMine: Tt,
4081
+ toggleVoices: Gt,
4061
4082
  cloningOn: H,
4062
- playTitle: Yn,
4063
- noVoice: ft,
4064
- noVoiceNote: Un,
4083
+ playTitle: Un,
4084
+ noVoice: pt,
4085
+ noVoiceNote: Rn,
4065
4086
  relang: it,
4066
4087
  sampling: $.sampleId != null,
4067
4088
  error: $.error,
@@ -4073,17 +4094,17 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4073
4094
  voicesVer: A,
4074
4095
  people: et,
4075
4096
  gvList: W,
4076
- autoOf: Tt,
4077
- savedFor: lt,
4078
- closeVoices: zt,
4097
+ autoOf: wt,
4098
+ savedFor: ct,
4099
+ closeVoices: ht,
4079
4100
  setSheet: pe,
4080
4101
  selectedSpeaker: at,
4081
4102
  armVoice: $.arm,
4082
4103
  resetPreview: $.reset,
4083
4104
  armedId: $.armId,
4084
- resetCast: () => Be((P) => ({ ...P, [De ?? ""]: {} })),
4105
+ resetCast: () => Ve((P) => ({ ...P, [Se ?? ""]: {} })),
4085
4106
  readLang: typeof u == "string" && u !== l ? u : null,
4086
- readVoiceKey: f || (U ?? L ?? ((qt = me.track) == null ? void 0 : qt.voiceKey) ?? ""),
4107
+ readVoiceKey: f || (U ?? L ?? ((Kt = me.track) == null ? void 0 : Kt.voiceKey) ?? ""),
4087
4108
  pickedVoiceKey: U ?? L ?? null,
4088
4109
  readVoiceName: (ve == null ? void 0 : ve.name) ?? null,
4089
4110
  canSpeak: re,
@@ -4092,21 +4113,21 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4092
4113
  clips: me.clips,
4093
4114
  setNear: me.setNear,
4094
4115
  closePicker: () => {
4095
- ot && Wt();
4116
+ lt && Ft();
4096
4117
  },
4097
- langList: { value: we ? null : Le, onSelect: xt, languages: ze, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te }
4118
+ langList: { value: we ? null : Le, onSelect: Dt, languages: ze, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te }
4098
4119
  };
4099
4120
  }
4100
- function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: h = !0, tail: M, tailFg: N, running: p, desk: y, feedRef: v, listener: m, showLabels: f, find: I, findOpen: C, lang: D, warm: B, onVisible: Y, wordHl: X = !0 }) {
4101
- const { playing: z, engaged: F, t: S, idx: T, seekN: E, wordSync: O, clipPos: te } = n;
4121
+ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: M = !0, tail: h, tailFg: N, running: p, desk: y, feedRef: v, listener: m, showLabels: f, find: I, findOpen: C, lang: D, warm: B, onVisible: Y, wordHl: X = !0 }) {
4122
+ const { playing: z, engaged: F, t: S, idx: T, seekN: _, wordSync: O, clipPos: te } = n;
4102
4123
  Rl(!0, v);
4103
- const K = k(null);
4124
+ const K = j(null);
4104
4125
  Ml(v, K);
4105
- const [L, ie] = j(null), ne = (I ?? "").trim().toLowerCase(), [G, J] = j(0), pe = k(0), le = k(null), Te = k(T), je = (H) => {
4126
+ const [L, ie] = k(null), ne = (I ?? "").trim().toLowerCase(), [G, J] = k(0), pe = j(0), le = j(null), Te = j(T), je = (H) => {
4106
4127
  var A;
4107
4128
  return ((A = v.current) == null ? void 0 : A.querySelector(`[data-tx-row="${H}"]`)) ?? null;
4108
- }, Ae = k("");
4109
- _(() => {
4129
+ }, De = j("");
4130
+ E(() => {
4110
4131
  const H = v.current;
4111
4132
  if (!H || !Y) return;
4112
4133
  const A = () => {
@@ -4116,7 +4137,7 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4116
4137
  ze.bottom > W.top && ze.top < W.bottom && ye.push(Number(ke.dataset.sentence));
4117
4138
  }
4118
4139
  const Z = ye.join(",");
4119
- Z !== Ae.current && (Ae.current = Z, Y(ye));
4140
+ Z !== De.current && (De.current = Z, Y(ye));
4120
4141
  }, b = window.setTimeout(A, 120);
4121
4142
  let V;
4122
4143
  const ce = () => {
@@ -4140,22 +4161,22 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4140
4161
  pe.current = performance.now() + 420;
4141
4162
  const A = v.current, b = je(H);
4142
4163
  if (!A || !A.clientHeight || !b) return;
4143
- const V = b.getBoundingClientRect(), ce = A.getBoundingClientRect(), W = A.scrollHeight - A.clientHeight, ye = A.scrollTop, Z = dr(A), ke = Math.max(80, A.clientHeight - Z.top - Z.bottom), ze = V.height > ke ? 8 : (ke - V.height) / 2, Fe = Math.max(0, Math.min(W, ye + (V.top - ce.top) - Z.top - ze));
4144
- if (le.current && cancelAnimationFrame(le.current), Math.abs(Fe - ye) < 2) {
4145
- A.scrollTop = Fe, le.current = null;
4164
+ const V = b.getBoundingClientRect(), ce = A.getBoundingClientRect(), W = A.scrollHeight - A.clientHeight, ye = A.scrollTop, Z = dr(A), ke = Math.max(80, A.clientHeight - Z.top - Z.bottom), ze = V.height > ke ? 8 : (ke - V.height) / 2, Ge = Math.max(0, Math.min(W, ye + (V.top - ce.top) - Z.top - ze));
4165
+ if (le.current && cancelAnimationFrame(le.current), Math.abs(Ge - ye) < 2) {
4166
+ A.scrollTop = Ge, le.current = null;
4146
4167
  return;
4147
4168
  }
4148
- const Se = performance.now(), ge = 360, _e = () => {
4149
- const Be = Math.min(1, (performance.now() - Se) / ge);
4150
- A.scrollTop = ye + (Fe - ye) * (1 - Math.pow(1 - Be, 3)), le.current = Be < 1 ? requestAnimationFrame(_e) : null;
4169
+ const Ae = performance.now(), ge = 360, _e = () => {
4170
+ const Ve = Math.min(1, (performance.now() - Ae) / ge);
4171
+ A.scrollTop = ye + (Ge - ye) * (1 - Math.pow(1 - Ve, 3)), le.current = Ve < 1 ? requestAnimationFrame(_e) : null;
4151
4172
  };
4152
4173
  le.current = requestAnimationFrame(_e);
4153
4174
  };
4154
- _(() => () => {
4175
+ E(() => () => {
4155
4176
  le.current && cancelAnimationFrame(le.current);
4156
4177
  }, []);
4157
- const Re = k(0);
4158
- _(() => {
4178
+ const Re = j(0);
4179
+ E(() => {
4159
4180
  if (!z) {
4160
4181
  Te.current = T, Re.current = 0, J(0);
4161
4182
  return;
@@ -4169,12 +4190,12 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4169
4190
  H();
4170
4191
  const A = setInterval(H, 200);
4171
4192
  return () => clearInterval(A);
4172
- }, [T, z]), _(() => {
4173
- E && Ee(T);
4174
- }, [E]);
4175
- const De = () => {
4193
+ }, [T, z]), E(() => {
4194
+ _ && Ee(T);
4195
+ }, [_]);
4196
+ const Se = () => {
4176
4197
  Ee(T), Re.current = 0, J(0);
4177
- }, $ = (H) => /* @__PURE__ */ i("div", { className: `txfollow txfollow--${H}`, children: /* @__PURE__ */ g("button", { type: "button", className: "txfollow__pill", title: "Jump to the line playing now", onClick: De, children: [
4198
+ }, $ = (H) => /* @__PURE__ */ i("div", { className: `txfollow txfollow--${H}`, children: /* @__PURE__ */ g("button", { type: "button", className: "txfollow__pill", title: "Jump to the line playing now", onClick: Se, children: [
4178
4199
  /* @__PURE__ */ i(oe, { d: H === "up" ? "m4.5 15.75 7.5-7.5 7.5 7.5" : "m19.5 8.25-7.5 7.5-7.5-7.5", size: 15, sw: 2 }),
4179
4200
  "Now playing"
4180
4201
  ] }) });
@@ -4185,21 +4206,21 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4185
4206
  var he;
4186
4207
  const b = z && A === T, V = F && A === T, ce = !!u && u === H.id, W = ne && !H.text.toLowerCase().includes(ne) && !(D && ((he = H.translations[D]) != null && he.toLowerCase().includes(ne))) ? 0.22 : !F || A <= T || ce ? 1 : 0.38, ye = m ? () => n.playRow(A) : c && l ? () => {
4187
4208
  z && !b && n.seekRow(A), l(H);
4188
- } : z && b ? void 0 : () => n.playRow(A), Z = m ? null : Nl(H, s, r), ke = !!Z && (Z.script > 0 || Z.manual), ze = y && !!a && L === H.id && !!Z && !ke, Fe = Dr(t, H.speaker), Se = Sr(t, H.speaker), ge = Se.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Be = Ui(e, A, D), Q = V && !O && te ? yi(Be.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4209
+ } : z && b ? void 0 : () => n.playRow(A), Z = m ? null : Nl(H, s, r), ke = !!Z && (Z.script > 0 || Z.manual), ze = y && !!a && L === H.id && !!Z && !ke, Ge = Dr(t, H.speaker), Ae = Sr(t, H.speaker), ge = Ae.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Ve = Ui(e, A, D), Q = V && !O && te ? yi(Ve.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4189
4210
  return /* @__PURE__ */ g("div", { "data-tx-row": A, "data-sentence": H.sentenceId, className: `txline${B ? " txline--warm" : ""}${ce ? " txline--fixing" : ""}`, "aria-current": ce || void 0, style: { opacity: W }, onClick: ye, onMouseEnter: y && a ? () => ie(H.id) : void 0, onMouseLeave: y && a ? () => ie(null) : void 0, children: [
4190
4211
  /* @__PURE__ */ g("div", { className: "txline__meta", children: [
4191
- /* @__PURE__ */ i("span", { className: "txline__at", children: kt(H.start) }),
4212
+ /* @__PURE__ */ i("span", { className: "txline__at", children: zt(H.start) }),
4192
4213
  f && H.speaker >= 0 && /* @__PURE__ */ g(be, { children: [
4193
- /* @__PURE__ */ i("div", { className: `lanechip bg-lane-${ge}`, style: Se.soft ? { background: Se.soft, color: Se.fg } : void 0, children: ji(t, H.speaker) }),
4194
- /* @__PURE__ */ i("span", { className: `txline__who lane-${ge}`, style: Se.fg ? { color: Se.fg } : void 0, children: Fe }),
4195
- Se.hasVoice && /* @__PURE__ */ i(Ei, { color: Se.fg ?? `var(--lane-${ge})` })
4214
+ /* @__PURE__ */ i("div", { className: `lanechip bg-lane-${ge}`, style: Ae.soft ? { background: Ae.soft, color: Ae.fg } : void 0, children: ji(t, H.speaker) }),
4215
+ /* @__PURE__ */ i("span", { className: `txline__who lane-${ge}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Ge }),
4216
+ Ae.hasVoice && /* @__PURE__ */ i(Ei, { color: Ae.fg ?? `var(--lane-${ge})` })
4196
4217
  ] }),
4197
- b && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: ee.headphones, size: y ? 15 : 14, sw: 1.6, stroke: f && H.speaker >= 0 ? Se.fg ?? `var(--lane-${ge})` : "var(--ink-45)" }) }),
4198
- Z && h && /* @__PURE__ */ i(ml, { f: Z, desk: y, onOpen: a ? () => a(H, !0) : void 0 }),
4218
+ b && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: ee.headphones, size: y ? 15 : 14, sw: 1.6, stroke: f && H.speaker >= 0 ? Ae.fg ?? `var(--lane-${ge})` : "var(--ink-45)" }) }),
4219
+ Z && M && /* @__PURE__ */ i(ml, { f: Z, desk: y, onOpen: a ? () => a(H, !0) : void 0 }),
4199
4220
  ze && /* @__PURE__ */ i(yl, { alone: !0, onOpen: () => a == null ? void 0 : a(H, !1) })
4200
4221
  ] }),
4201
- /* @__PURE__ */ i("div", { className: "txline__text", children: Be.map((ue, ae) => {
4202
- const fe = `${ue.seq}:${ue.idx}`, Ye = Uo(ue.prob), U = V && X, R = U && (O ? S >= ue.start && (S < ue.end || ae === Be.length - 1 || S < Be[ae + 1].start) : ae === Q), q = U && !R && (O ? ue.start > S : Q != null && ae > Q), re = !_e && !m && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !m && d && !!Ye && !re, Oe = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, me = re ? "var(--brand)" : q ? "var(--ink-40)" : Oe ?? "var(--ink-96)";
4222
+ /* @__PURE__ */ i("div", { className: "txline__text", children: Ve.map((ue, ae) => {
4223
+ const fe = `${ue.seq}:${ue.idx}`, Ye = Uo(ue.prob), U = V && X, R = U && (O ? S >= ue.start && (S < ue.end || ae === Ve.length - 1 || S < Ve[ae + 1].start) : ae === Q), q = U && !R && (O ? ue.start > S : Q != null && ae > Q), re = !_e && !m && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !m && d && !!Ye && !re, Oe = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, me = re ? "var(--brand)" : q ? "var(--ink-40)" : Oe ?? "var(--ink-96)";
4203
4224
  return /* @__PURE__ */ g("span", { children: [
4204
4225
  /* @__PURE__ */ i(
4205
4226
  "span",
@@ -4231,7 +4252,7 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4231
4252
  /* @__PURE__ */ i("span", {}),
4232
4253
  /* @__PURE__ */ i("span", {}),
4233
4254
  /* @__PURE__ */ i("span", {})
4234
- ] }) }) : /* @__PURE__ */ i("div", { className: "txtail", style: { color: N }, children: M }),
4255
+ ] }) }) : /* @__PURE__ */ i("div", { className: "txtail", style: { color: N }, children: h }),
4235
4256
  z && G === 1 && $("down")
4236
4257
  ] });
4237
4258
  }
@@ -4250,35 +4271,35 @@ function gc({ open: t, q: e, onQ: n, onClose: r, hits: s, desk: a, inline: o, fl
4250
4271
  ] }) });
4251
4272
  }
4252
4273
  function fc(t, e, n, r, s) {
4253
- const a = k(n);
4274
+ const a = j(n);
4254
4275
  a.current = n;
4255
- const o = k(r);
4276
+ const o = j(r);
4256
4277
  o.current = r;
4257
- const [l, c] = j(0), u = r.trim().toLowerCase();
4258
- return _(() => {
4278
+ const [l, c] = k(0), u = r.trim().toLowerCase();
4279
+ return E(() => {
4259
4280
  c(u ? e.filter((d) => d.text.toLowerCase().includes(u)).length : 0);
4260
- }, [e, u]), _(() => {
4281
+ }, [e, u]), E(() => {
4261
4282
  const d = t.current;
4262
4283
  if (!d) return;
4263
- let h = d.scrollTop, M = 0, N = 0;
4284
+ let M = d.scrollTop, h = 0, N = 0;
4264
4285
  const p = () => {
4265
4286
  N = Date.now() + 1500;
4266
4287
  }, y = (m) => {
4267
4288
  m.buttons && p();
4268
4289
  }, v = () => {
4269
- const m = d.scrollTop, f = m - h;
4270
- if (h = m, Date.now() > N) {
4271
- M = 0;
4290
+ const m = d.scrollTop, f = m - M;
4291
+ if (M = m, Date.now() > N) {
4292
+ h = 0;
4272
4293
  return;
4273
4294
  }
4274
- M = f < 0 == M < 0 ? M + f : f, M < -14 && !a.current ? (M = 0, s(!0)) : M > 56 && a.current && !o.current.trim() && (M = 0, s(!1));
4295
+ h = f < 0 == h < 0 ? h + f : f, h < -14 && !a.current ? (h = 0, s(!0)) : h > 56 && a.current && !o.current.trim() && (h = 0, s(!1));
4275
4296
  };
4276
4297
  return d.addEventListener("wheel", p, { passive: !0 }), d.addEventListener("touchmove", p, { passive: !0 }), d.addEventListener("pointermove", y), d.addEventListener("scroll", v, { passive: !0 }), () => {
4277
4298
  d.removeEventListener("wheel", p), d.removeEventListener("touchmove", p), d.removeEventListener("pointermove", y), d.removeEventListener("scroll", v);
4278
4299
  };
4279
4300
  }, []), l;
4280
4301
  }
4281
- const nn = { formatBits: 0, perBlock: [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28], blocks: [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49] };
4302
+ const rn = { formatBits: 0, perBlock: [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28], blocks: [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49] };
4282
4303
  function Ri(t) {
4283
4304
  let e = (16 * t + 128) * t + 64;
4284
4305
  if (t >= 2) {
@@ -4287,7 +4308,7 @@ function Ri(t) {
4287
4308
  }
4288
4309
  return e;
4289
4310
  }
4290
- const ri = (t) => Math.floor(Ri(t) / 8) - nn.perBlock[t] * nn.blocks[t];
4311
+ const ri = (t) => Math.floor(Ri(t) / 8) - rn.perBlock[t] * rn.blocks[t];
4291
4312
  function jr(t, e) {
4292
4313
  let n = 0;
4293
4314
  for (let r = 7; r >= 0; r--)
@@ -4326,47 +4347,47 @@ function yc(t) {
4326
4347
  for (; n <= 40 && !(4 + (n <= 9 ? 8 : 16) + e.length * 8 <= ri(n) * 8); n++)
4327
4348
  ;
4328
4349
  if (n > 40) throw new Error("Text too long for a QR code");
4329
- const r = n * 4 + 17, s = ri(n) * 8, a = [], o = (T, E) => {
4330
- for (let O = E - 1; O >= 0; O--) a.push(T >>> O & 1);
4350
+ const r = n * 4 + 17, s = ri(n) * 8, a = [], o = (T, _) => {
4351
+ for (let O = _ - 1; O >= 0; O--) a.push(T >>> O & 1);
4331
4352
  };
4332
4353
  o(4, 4), o(e.length, n <= 9 ? 8 : 16);
4333
4354
  for (const T of e) o(T, 8);
4334
4355
  for (o(0, Math.min(4, s - a.length)); a.length % 8; ) a.push(0);
4335
4356
  for (let T = 236; a.length < s; T ^= 253) o(T, 8);
4336
4357
  const l = [];
4337
- for (let T = 0; T < a.length; T += 8) l.push(a.slice(T, T + 8).reduce((E, O) => E << 1 | O, 0));
4338
- const c = nn.blocks[n], u = nn.perBlock[n], d = Math.floor(Ri(n) / 8), h = c - d % c, M = Math.floor(d / c), N = [], p = pc(u);
4339
- for (let T = 0, E = 0; T < c; T++) {
4340
- const O = l.slice(E, E + M - u + (T < h ? 0 : 1));
4341
- E += O.length;
4358
+ for (let T = 0; T < a.length; T += 8) l.push(a.slice(T, T + 8).reduce((_, O) => _ << 1 | O, 0));
4359
+ const c = rn.blocks[n], u = rn.perBlock[n], d = Math.floor(Ri(n) / 8), M = c - d % c, h = Math.floor(d / c), N = [], p = pc(u);
4360
+ for (let T = 0, _ = 0; T < c; T++) {
4361
+ const O = l.slice(_, _ + h - u + (T < M ? 0 : 1));
4362
+ _ += O.length;
4342
4363
  const te = Nc(O, p);
4343
- T < h && O.push(0), N.push(O.concat(te));
4364
+ T < M && O.push(0), N.push(O.concat(te));
4344
4365
  }
4345
4366
  const y = [];
4346
- for (let T = 0; T < N[0].length; T++) N.forEach((E, O) => {
4347
- (T !== M - u || O >= h) && y.push(E[T]);
4367
+ for (let T = 0; T < N[0].length; T++) N.forEach((_, O) => {
4368
+ (T !== h - u || O >= M) && y.push(_[T]);
4348
4369
  });
4349
- const v = Array.from({ length: r }, () => new Array(r).fill(!1)), m = Array.from({ length: r }, () => new Array(r).fill(!1)), f = (T, E, O) => {
4350
- v[E][T] = O, m[E][T] = !0;
4370
+ const v = Array.from({ length: r }, () => new Array(r).fill(!1)), m = Array.from({ length: r }, () => new Array(r).fill(!1)), f = (T, _, O) => {
4371
+ v[_][T] = O, m[_][T] = !0;
4351
4372
  };
4352
4373
  for (let T = 0; T < r; T++)
4353
4374
  f(6, T, T % 2 === 0), f(T, 6, T % 2 === 0);
4354
- const I = (T, E) => {
4375
+ const I = (T, _) => {
4355
4376
  for (let O = -4; O <= 4; O++) for (let te = -4; te <= 4; te++) {
4356
- const K = Math.max(Math.abs(te), Math.abs(O)), L = T + te, ie = E + O;
4377
+ const K = Math.max(Math.abs(te), Math.abs(O)), L = T + te, ie = _ + O;
4357
4378
  L >= 0 && L < r && ie >= 0 && ie < r && f(L, ie, K !== 2 && K !== 4);
4358
4379
  }
4359
4380
  };
4360
4381
  I(3, 3), I(r - 4, 3), I(3, r - 4);
4361
4382
  const C = mc(n);
4362
- for (let T = 0; T < C.length; T++) for (let E = 0; E < C.length; E++)
4363
- if (!(T === 0 && E === 0 || T === 0 && E === C.length - 1 || T === C.length - 1 && E === 0))
4364
- for (let O = -2; O <= 2; O++) for (let te = -2; te <= 2; te++) f(C[T] + te, C[E] + O, Math.max(Math.abs(te), Math.abs(O)) !== 1);
4383
+ for (let T = 0; T < C.length; T++) for (let _ = 0; _ < C.length; _++)
4384
+ if (!(T === 0 && _ === 0 || T === 0 && _ === C.length - 1 || T === C.length - 1 && _ === 0))
4385
+ for (let O = -2; O <= 2; O++) for (let te = -2; te <= 2; te++) f(C[T] + te, C[_] + O, Math.max(Math.abs(te), Math.abs(O)) !== 1);
4365
4386
  const D = (T) => {
4366
- const E = nn.formatBits << 3 | T;
4367
- let O = E;
4387
+ const _ = rn.formatBits << 3 | T;
4388
+ let O = _;
4368
4389
  for (let L = 0; L < 10; L++) O = O << 1 ^ (O >>> 9) * 1335;
4369
- const te = (E << 10 | O) ^ 21522, K = (L) => (te >>> L & 1) !== 0;
4390
+ const te = (_ << 10 | O) ^ 21522, K = (L) => (te >>> L & 1) !== 0;
4370
4391
  for (let L = 0; L <= 5; L++) f(8, L, K(L));
4371
4392
  f(8, 7, K(6)), f(8, 8, K(7)), f(7, 8, K(8));
4372
4393
  for (let L = 9; L < 15; L++) f(14 - L, 8, K(L));
@@ -4377,53 +4398,53 @@ function yc(t) {
4377
4398
  if (D(0), n >= 7) {
4378
4399
  let T = n;
4379
4400
  for (let O = 0; O < 12; O++) T = T << 1 ^ (T >>> 11) * 7973;
4380
- const E = n << 12 | T;
4401
+ const _ = n << 12 | T;
4381
4402
  for (let O = 0; O < 18; O++) {
4382
- const te = (E >>> O & 1) !== 0, K = r - 11 + O % 3, L = Math.floor(O / 3);
4403
+ const te = (_ >>> O & 1) !== 0, K = r - 11 + O % 3, L = Math.floor(O / 3);
4383
4404
  f(K, L, te), f(L, K, te);
4384
4405
  }
4385
4406
  }
4386
4407
  let B = 0;
4387
4408
  for (let T = r - 1; T >= 1; T -= 2) {
4388
4409
  T === 6 && (T = 5);
4389
- for (let E = 0; E < r; E++) for (let O = 0; O < 2; O++) {
4390
- const te = T - O, K = T + 1 & 2 ? E : r - 1 - E;
4410
+ for (let _ = 0; _ < r; _++) for (let O = 0; O < 2; O++) {
4411
+ const te = T - O, K = T + 1 & 2 ? _ : r - 1 - _;
4391
4412
  !m[K][te] && B < y.length * 8 && (v[K][te] = (y[B >>> 3] >>> 7 - (B & 7) & 1) !== 0, B++);
4392
4413
  }
4393
4414
  }
4394
- const Y = (T, E, O) => {
4415
+ const Y = (T, _, O) => {
4395
4416
  switch (T) {
4396
4417
  case 0:
4397
- return (E + O) % 2 === 0;
4418
+ return (_ + O) % 2 === 0;
4398
4419
  case 1:
4399
4420
  return O % 2 === 0;
4400
4421
  case 2:
4401
- return E % 3 === 0;
4422
+ return _ % 3 === 0;
4402
4423
  case 3:
4403
- return (E + O) % 3 === 0;
4424
+ return (_ + O) % 3 === 0;
4404
4425
  case 4:
4405
- return (Math.floor(E / 3) + Math.floor(O / 2)) % 2 === 0;
4426
+ return (Math.floor(_ / 3) + Math.floor(O / 2)) % 2 === 0;
4406
4427
  case 5:
4407
- return E * O % 2 + E * O % 3 === 0;
4428
+ return _ * O % 2 + _ * O % 3 === 0;
4408
4429
  case 6:
4409
- return (E * O % 2 + E * O % 3) % 2 === 0;
4430
+ return (_ * O % 2 + _ * O % 3) % 2 === 0;
4410
4431
  default:
4411
- return ((E + O) % 2 + E * O % 3) % 2 === 0;
4432
+ return ((_ + O) % 2 + _ * O % 3) % 2 === 0;
4412
4433
  }
4413
4434
  }, X = (T) => {
4414
- for (let E = 0; E < r; E++) for (let O = 0; O < r; O++) !m[E][O] && Y(T, O, E) && (v[E][O] = !v[E][O]);
4435
+ for (let _ = 0; _ < r; _++) for (let O = 0; O < r; O++) !m[_][O] && Y(T, O, _) && (v[_][O] = !v[_][O]);
4415
4436
  }, z = () => {
4416
4437
  let T = 0;
4417
- const E = (ne) => {
4438
+ const _ = (ne) => {
4418
4439
  const G = ne[1], J = G > 0 && ne[2] === G && ne[3] === G * 3 && ne[4] === G && ne[5] === G;
4419
4440
  return (J && ne[0] >= G * 4 && ne[6] >= G ? 1 : 0) + (J && ne[6] >= G * 4 && ne[0] >= G ? 1 : 0);
4420
4441
  }, O = (ne, G) => {
4421
4442
  ne[0] === 0 && (G += r), ne.pop(), ne.unshift(G);
4422
- }, te = (ne, G, J) => (G && (O(ne, J), J = 0), O(ne, J + r), E(ne)), K = (ne) => {
4443
+ }, te = (ne, G, J) => (G && (O(ne, J), J = 0), O(ne, J + r), _(ne)), K = (ne) => {
4423
4444
  let G = !1, J = 0;
4424
4445
  const pe = [0, 0, 0, 0, 0, 0, 0];
4425
4446
  for (let le = 0; le < r; le++)
4426
- ne(le) === G ? (J++, J === 5 ? T += 3 : J > 5 && T++) : (O(pe, J), G || (T += E(pe) * 40), G = ne(le), J = 1);
4447
+ ne(le) === G ? (J++, J === 5 ? T += 3 : J > 5 && T++) : (O(pe, J), G || (T += _(pe) * 40), G = ne(le), J = 1);
4427
4448
  T += te(pe, G, J) * 40;
4428
4449
  };
4429
4450
  for (let ne = 0; ne < r; ne++) K((G) => v[ne][G]);
@@ -4440,8 +4461,8 @@ function yc(t) {
4440
4461
  let F = 0, S = 1 / 0;
4441
4462
  for (let T = 0; T < 8; T++) {
4442
4463
  X(T), D(T);
4443
- const E = z();
4444
- E < S && (S = E, F = T), X(T);
4464
+ const _ = z();
4465
+ _ < S && (S = _, F = T), X(T);
4445
4466
  }
4446
4467
  return X(F), D(F), v;
4447
4468
  }
@@ -4471,11 +4492,11 @@ function Lc() {
4471
4492
  const t = Yr ?? document.documentElement;
4472
4493
  return !t.requestFullscreen && !t.webkitRequestFullscreen;
4473
4494
  }
4474
- function en(t) {
4495
+ function tn(t) {
4475
4496
  var e;
4476
- typeof document > "u" || !((e = window.matchMedia) != null && e.call(window, "(pointer: coarse)").matches) || In(t);
4497
+ typeof document > "u" || !((e = window.matchMedia) != null && e.call(window, "(pointer: coarse)").matches) || On(t);
4477
4498
  }
4478
- function In(t) {
4499
+ function On(t) {
4479
4500
  var s, a, o, l;
4480
4501
  if (typeof document > "u") return;
4481
4502
  const e = document, n = Yr ?? document.documentElement, r = e.fullscreenElement ?? e.webkitFullscreenElement;
@@ -4487,11 +4508,11 @@ function In(t) {
4487
4508
  }
4488
4509
  }
4489
4510
  function vc(t) {
4490
- const [e, n] = j(() => {
4511
+ const [e, n] = k(() => {
4491
4512
  var r;
4492
4513
  return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, t).matches);
4493
4514
  });
4494
- return _(() => {
4515
+ return E(() => {
4495
4516
  var a;
4496
4517
  const r = (a = window.matchMedia) == null ? void 0 : a.call(window, t);
4497
4518
  if (!r) return;
@@ -4499,8 +4520,8 @@ function vc(t) {
4499
4520
  return s(), r.addEventListener("change", s), () => r.removeEventListener("change", s);
4500
4521
  }, [t]), e;
4501
4522
  }
4502
- function On({ pos: t, interactive: e, axis: n = "x" }) {
4503
- const [r, s] = j(null), a = (c) => {
4523
+ function Cn({ pos: t, interactive: e, axis: n = "x" }) {
4524
+ const [r, s] = k(null), a = (c) => {
4504
4525
  const u = c.currentTarget.getBoundingClientRect(), d = n === "y" ? (c.clientY - u.top) / Math.max(1, u.height) : (c.clientX - u.left) / Math.max(1, u.width);
4505
4526
  return Math.min(1, Math.max(0, d));
4506
4527
  }, o = (c) => {
@@ -4539,7 +4560,7 @@ function On({ pos: t, interactive: e, axis: n = "x" }) {
4539
4560
  ] });
4540
4561
  }
4541
4562
  function gu({ pos: t }) {
4542
- const [e, n] = j(null), r = (l) => {
4563
+ const [e, n] = k(null), r = (l) => {
4543
4564
  const c = l.currentTarget.getBoundingClientRect();
4544
4565
  return Math.min(1, Math.max(0, (l.clientX - c.left) / Math.max(1, c.width)));
4545
4566
  }, s = (l) => {
@@ -4579,7 +4600,7 @@ function gu({ pos: t }) {
4579
4600
  ] })
4580
4601
  ] });
4581
4602
  }
4582
- function Cn({ t, mini: e }) {
4603
+ function bn({ t, mini: e }) {
4583
4604
  return /* @__PURE__ */ g("div", { className: "gfull__transport", children: [
4584
4605
  /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
4585
4606
  /* @__PURE__ */ i(
@@ -4600,7 +4621,7 @@ function Cn({ t, mini: e }) {
4600
4621
  }
4601
4622
  function zr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
4602
4623
  return /* @__PURE__ */ g("div", { className: `gfull__brand${s ? " gfull__brand--mark" : ""}`, children: [
4603
- /* @__PURE__ */ i("a", { href: hi, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(Or, { dark: !0, size: 22 }) : /* @__PURE__ */ i(An, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
4624
+ /* @__PURE__ */ i("a", { href: hi, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(Or, { dark: !0, size: 22 }) : /* @__PURE__ */ i(En, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
4604
4625
  t && /* @__PURE__ */ g("span", { className: "gfull__live", children: [
4605
4626
  /* @__PURE__ */ i("i", {}),
4606
4627
  "LIVE"
@@ -4616,9 +4637,9 @@ function kc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
4616
4637
  /* @__PURE__ */ i("div", { className: "gmini__shade", "aria-hidden": "true" }),
4617
4638
  /* @__PURE__ */ i("div", { className: "gmini__top", children: /* @__PURE__ */ i(zr, { live: t.live, mini: !0 }) }),
4618
4639
  /* @__PURE__ */ g("div", { className: "gmini__foot", children: [
4619
- /* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(On, { pos: t, interactive: !0 }) }),
4640
+ /* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(Cn, { pos: t, interactive: !0 }) }),
4620
4641
  /* @__PURE__ */ g("div", { className: "gmini__row gmini__row--ctl", children: [
4621
- /* @__PURE__ */ i(Cn, { t: e, mini: !0 }),
4642
+ /* @__PURE__ */ i(bn, { t: e, mini: !0 }),
4622
4643
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
4623
4644
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: n }),
4624
4645
  /* @__PURE__ */ i(Qi, { v: r, size: 14 }),
@@ -4632,20 +4653,20 @@ function kc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
4632
4653
  ] });
4633
4654
  }
4634
4655
  const jc = { color: "rgba(255,255,255,.4)" };
4635
- function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: h, ad: M, chip: N, transport: p, picker: y, sheet: v, voices: m, voicesBtn: f, sheetOpen: I, onShare: C, onSettings: D, paused: B, copied: Y, onTouch: X, onClose: z }) {
4636
- const [F, S] = j(() => !!hr());
4637
- _(() => {
4656
+ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: M, ad: h, chip: N, transport: p, picker: y, sheet: v, voices: m, voicesBtn: f, sheetOpen: I, onShare: C, onSettings: D, paused: B, copied: Y, onTouch: X, onClose: z }) {
4657
+ const [F, S] = k(() => !!hr());
4658
+ E(() => {
4638
4659
  const Q = () => S(!!hr());
4639
4660
  return document.addEventListener("fullscreenchange", Q), document.addEventListener("webkitfullscreenchange", Q), () => {
4640
4661
  document.removeEventListener("fullscreenchange", Q), document.removeEventListener("webkitfullscreenchange", Q);
4641
4662
  };
4642
4663
  }, []);
4643
- const T = k(z);
4664
+ const T = j(z);
4644
4665
  T.current = z;
4645
- const E = k(p.playable ? p.onPlay : void 0);
4646
- E.current = p.playable ? p.onPlay : void 0;
4647
- const [O, te] = j(!1), [K, L] = j(0), ie = k(!1);
4648
- _(() => () => In(!1), []), _(() => {
4666
+ const _ = j(p.playable ? p.onPlay : void 0);
4667
+ _.current = p.playable ? p.onPlay : void 0;
4668
+ const [O, te] = k(!1), [K, L] = k(0), ie = j(!1);
4669
+ E(() => () => On(!1), []), E(() => {
4649
4670
  if (!n) return;
4650
4671
  const Q = [document.documentElement, document.body], he = Q.map((fe) => fe.style.background);
4651
4672
  Q.forEach((fe) => {
@@ -4658,8 +4679,8 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4658
4679
  }), ue && ae && (ue.content = ae);
4659
4680
  };
4660
4681
  }, []);
4661
- const ne = Ie(() => n && Lc(), [n]), [G, J] = j(ne);
4662
- _(() => {
4682
+ const ne = Ie(() => n && Lc(), [n]), [G, J] = k(ne);
4683
+ E(() => {
4663
4684
  if (!n) return;
4664
4685
  const Q = [document.documentElement, document.body], he = Q.map((fe) => [fe.style.overflow, fe.style.overscrollBehavior]);
4665
4686
  if (!ne)
@@ -4677,11 +4698,11 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4677
4698
  window.removeEventListener("scroll", ae), ue.remove(), document.documentElement.style.overscrollBehavior = he[0][1], window.scrollTo(0, 0);
4678
4699
  };
4679
4700
  }, [ne, n]);
4680
- const pe = k(I);
4681
- pe.current = I, _(() => {
4701
+ const pe = j(I);
4702
+ pe.current = I, E(() => {
4682
4703
  const Q = (ae) => ae instanceof HTMLElement && (ae.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(ae.tagName)), he = (ae) => {
4683
4704
  var fe;
4684
- ae.key === "Escape" && !pe.current && T.current && (ae.stopPropagation(), T.current()), ae.key === " " && !pe.current && !Q(ae.target) && (ae.preventDefault(), ae.stopPropagation(), ae.repeat || (fe = E.current) == null || fe.call(E)), (ae.key === "f" || ae.key === "F") && !ae.metaKey && !ae.ctrlKey && !ae.altKey && !pe.current && !Q(ae.target) && ii() && (ae.preventDefault(), ae.repeat || In(!hr()));
4705
+ ae.key === "Escape" && !pe.current && T.current && (ae.stopPropagation(), T.current()), ae.key === " " && !pe.current && !Q(ae.target) && (ae.preventDefault(), ae.stopPropagation(), ae.repeat || (fe = _.current) == null || fe.call(_)), (ae.key === "f" || ae.key === "F") && !ae.metaKey && !ae.ctrlKey && !ae.altKey && !pe.current && !Q(ae.target) && ii() && (ae.preventDefault(), ae.repeat || On(!hr()));
4685
4706
  }, ue = (ae) => {
4686
4707
  ae.key === " " && !pe.current && !Q(ae.target) && ae.preventDefault();
4687
4708
  };
@@ -4689,27 +4710,27 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4689
4710
  window.removeEventListener("keydown", he, !0), window.removeEventListener("keyup", ue, !0);
4690
4711
  };
4691
4712
  }, []);
4692
- const le = vc("(orientation: landscape) and (max-height: 540px)"), Te = k(null), [je, Ae] = j(null);
4693
- Vt(() => {
4713
+ const le = vc("(orientation: landscape) and (max-height: 540px)"), Te = j(null), [je, De] = k(null);
4714
+ Ht(() => {
4694
4715
  const Q = Te.current;
4695
- if (!Q || (Ae(Q.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
4696
- const he = new ResizeObserver(([ue]) => Ae(ue.contentRect.width));
4716
+ if (!Q || (De(Q.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
4717
+ const he = new ResizeObserver(([ue]) => De(ue.contentRect.width));
4697
4718
  return he.observe(Q), () => he.disconnect();
4698
4719
  }, []);
4699
4720
  const Le = t && !F, we = !Le && a && !le && (je == null || je >= 880), Ee = !we;
4700
- _(() => {
4721
+ E(() => {
4701
4722
  if (te(!1), !p.playing || I) return;
4702
4723
  const Q = setTimeout(() => te(!0), 3e3);
4703
4724
  return () => clearTimeout(Q);
4704
4725
  }, [p.playing, I, K]);
4705
- const Re = k(O);
4726
+ const Re = j(O);
4706
4727
  Re.current = O;
4707
- const De = k(0), $ = (Q) => {
4728
+ const Se = j(0), $ = (Q) => {
4708
4729
  if (Q.pointerType !== "mouse") return;
4709
4730
  const he = Date.now();
4710
- !Re.current && he - De.current < 1e3 || (De.current = he, L((ue) => ue + 1));
4711
- }, H = !we && le, A = k(null), b = l ? l.words.map((Q) => Q.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4712
- Vt(() => {
4731
+ !Re.current && he - Se.current < 1e3 || (Se.current = he, L((ue) => ue + 1));
4732
+ }, H = !we && le, A = j(null), b = l ? l.words.map((Q) => Q.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4733
+ Ht(() => {
4713
4734
  const Q = A.current;
4714
4735
  if (!Q) return;
4715
4736
  const he = !!(l != null && l.words.some((de) => de.dim)) || (l == null ? void 0 : l.cursor) != null, ue = Q.querySelectorAll((l == null ? void 0 : l.cursor) != null && !l.words.some((de) => de.dim) ? "[data-at]" : "[data-said]"), ae = parseFloat(getComputedStyle(Q).lineHeight) || 24, fe = Math.round(Q.scrollHeight / ae) - Math.round(Q.clientHeight / ae), Ye = Math.max(0, fe) * ae;
@@ -4720,26 +4741,26 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4720
4741
  const U = (de) => Math.round((de.getBoundingClientRect().top - Q.getBoundingClientRect().top + Q.scrollTop) / ae), R = Math.max(1, Math.round(Q.clientHeight / ae)), q = he ? ue.length ? Math.floor(U(ue[ue.length - 1]) / R) * R * ae : 0 : Ye, re = Math.max(0, Math.min(Ye, q));
4721
4742
  Math.abs(re - Q.scrollTop) > 1 && (Q.scrollTop = re);
4722
4743
  }, [b, H]);
4723
- const [V, ce] = j(!0), [W, ye] = j(!1), Z = k(void 0);
4724
- _(() => () => window.clearTimeout(Z.current), []);
4725
- const ke = B != null && B.share ? B.share.url(V && B.share.at >= 1 ? Math.floor(B.share.at) : null) : "", ze = Ie(() => we && ke && !p.playing ? Tc(ke) : "", [we, ke, p.playing]), Fe = () => {
4744
+ const [V, ce] = k(!0), [W, ye] = k(!1), Z = j(void 0);
4745
+ E(() => () => window.clearTimeout(Z.current), []);
4746
+ const ke = B != null && B.share ? B.share.url(V && B.share.at >= 1 ? Math.floor(B.share.at) : null) : "", ze = Ie(() => we && ke && !p.playing ? Tc(ke) : "", [we, ke, p.playing]), Ge = () => {
4726
4747
  var Q;
4727
4748
  (Q = navigator.clipboard) == null || Q.writeText(ke).then(() => {
4728
4749
  ye(!0), window.clearTimeout(Z.current), Z.current = window.setTimeout(() => ye(!1), 1800);
4729
4750
  }, () => {
4730
4751
  });
4731
- }, Se = we && (B == null ? void 0 : B.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: (Q) => Q.stopPropagation(), onClick: (Q) => Q.stopPropagation(), children: [
4752
+ }, Ae = we && (B == null ? void 0 : B.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: (Q) => Q.stopPropagation(), onClick: (Q) => Q.stopPropagation(), children: [
4732
4753
  ze && /* @__PURE__ */ i("div", { className: "gfull__shareqr", role: "img", "aria-label": "QR code for this link", style: { backgroundImage: `url("${ze}")` } }),
4733
4754
  /* @__PURE__ */ g("div", { className: "gfull__sharebody", children: [
4734
4755
  /* @__PURE__ */ i("div", { className: "gfull__shareeyebrow", children: "SHARE THIS MOMENT" }),
4735
4756
  /* @__PURE__ */ g("label", { className: "gfull__shareat", children: [
4736
4757
  /* @__PURE__ */ i("input", { type: "checkbox", checked: V, onChange: (Q) => ce(Q.target.checked), disabled: B.share.at < 1 }),
4737
4758
  "Start at ",
4738
- kt(Math.floor(B.share.at))
4759
+ zt(Math.floor(B.share.at))
4739
4760
  ] }),
4740
4761
  /* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: ke.replace(/^https?:\/\//, "") }) }),
4741
4762
  /* @__PURE__ */ g("div", { className: "gfull__shareacts", children: [
4742
- /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: Fe, children: [
4763
+ /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: Ge, children: [
4743
4764
  /* @__PURE__ */ i(oe, { d: W ? ee.check : ee.copy, size: 14, sw: 1.8 }),
4744
4765
  W ? "Copied" : "Copy link"
4745
4766
  ] }),
@@ -4752,18 +4773,18 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4752
4773
  ] }), ge = (Q, he, ue, ae, fe, Ye = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: Q, "aria-label": Q, onClick: ae, children: /* @__PURE__ */ i(oe, { d: he, size: (we ? 20 : Ee ? 15 : 18) + Ye, sw: ue, style: fe }) }), _e = /* @__PURE__ */ g("div", { className: "gfull__acts", children: [
4753
4774
  f && /* @__PURE__ */ i(Qi, { v: f, size: we ? 20 : Ee ? 15 : 18 }),
4754
4775
  C && ge("Share", ee.share, 1.6, C),
4755
- ii() && !e && ge(F ? "Exit full screen" : "Full screen", F ? wc : Pi, 1.7, () => In(!F)),
4776
+ ii() && !e && ge(F ? "Exit full screen" : "Full screen", F ? wc : Pi, 1.7, () => On(!F)),
4756
4777
  z && ge("Close player", ee.close, 1.7, z)
4757
- ] }), Be = (d || h || D) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
4778
+ ] }), Ve = (d || M || D) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
4758
4779
  d && ge(d.muted ? "Unmute" : "Mute", d.muted ? ee.volumeOff : ee.volume, 1.6, d.onToggle),
4759
- h && ge(h.on ? "Hide subtitles" : "Show subtitles", h.on ? ee.cc : ee.ccOff, 1.7, h.onToggle, void 0, 4),
4780
+ M && ge(M.on ? "Hide subtitles" : "Show subtitles", M.on ? ee.cc : ee.ccOff, 1.7, M.onToggle, void 0, 4),
4760
4781
  D && ge("Settings", ee.cog, 1.6, D)
4761
4782
  ] });
4762
4783
  return /* @__PURE__ */ g(
4763
4784
  "div",
4764
4785
  {
4765
4786
  ref: Te,
4766
- className: `gfull${we ? " gfull--desk" : ""}${Ee ? " gfull--mini" : ""}${Le ? " gfull--small" : ""}${ne ? " gfull--swipe" : ""}${M ? " gfull--ad" : ""}${O ? " gfull--calm" : ""}`,
4787
+ className: `gfull${we ? " gfull--desk" : ""}${Ee ? " gfull--mini" : ""}${Le ? " gfull--small" : ""}${ne ? " gfull--swipe" : ""}${h ? " gfull--ad" : ""}${O ? " gfull--calm" : ""}`,
4767
4788
  "data-theme": "dark",
4768
4789
  role: "dialog",
4769
4790
  "aria-label": s,
@@ -4783,7 +4804,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4783
4804
  /* @__PURE__ */ g("div", { className: `gfull__frame${H ? " gfull__frame--land" : ""}`, children: [
4784
4805
  r,
4785
4806
  /* @__PURE__ */ i("div", { className: "gfull__shade", "aria-hidden": "true" }),
4786
- B && !M && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${p.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": p.playing, children: [
4807
+ B && !h && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${p.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": p.playing, children: [
4787
4808
  /* @__PURE__ */ g("div", { className: "gfull__pausedtext", children: [
4788
4809
  /* @__PURE__ */ g("div", { className: "gfull__pausedhead", children: [
4789
4810
  (Ee || Le) && /* @__PURE__ */ i("span", { className: "gfull__pausedmark", "aria-hidden": "true", children: /* @__PURE__ */ i(Or, { dark: !0, size: 20 }) }),
@@ -4791,9 +4812,9 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4791
4812
  ] }),
4792
4813
  B.summary && /* @__PURE__ */ i("div", { className: "gfull__pausedsum", children: B.summary })
4793
4814
  ] }),
4794
- Se
4815
+ Ae
4795
4816
  ] }),
4796
- Be,
4817
+ Ve,
4797
4818
  Y,
4798
4819
  c ? typeof c == "string" ? /* @__PURE__ */ i("div", { className: "gfull__sub", "aria-live": "polite", children: /* @__PURE__ */ g("div", { className: "gfull__wait", children: [
4799
4820
  /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }),
@@ -4825,22 +4846,22 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4825
4846
  ] }) }),
4826
4847
  /* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ g(be, { children: [
4827
4848
  /* @__PURE__ */ i(zr, { live: o.live, desk: !0, pct: u }),
4828
- /* @__PURE__ */ i(Cn, { t: p }),
4829
- /* @__PURE__ */ i(On, { pos: o, interactive: !0 }),
4849
+ /* @__PURE__ */ i(bn, { t: p }),
4850
+ /* @__PURE__ */ i(Cn, { pos: o, interactive: !0 }),
4830
4851
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: N }),
4831
4852
  _e
4832
4853
  ] }) : Ee ? /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4833
- /* @__PURE__ */ i(Cn, { t: p, mini: !0 }),
4834
- /* @__PURE__ */ i(On, { pos: o, interactive: !0 }),
4854
+ /* @__PURE__ */ i(bn, { t: p, mini: !0 }),
4855
+ /* @__PURE__ */ i(Cn, { pos: o, interactive: !0 }),
4835
4856
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: N }),
4836
4857
  _e
4837
4858
  ] }) : /* @__PURE__ */ g(be, { children: [
4838
4859
  /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4839
4860
  /* @__PURE__ */ i(zr, { live: o.live, pct: u, mark: !0 }),
4840
- /* @__PURE__ */ i(On, { pos: o, interactive: !0 })
4861
+ /* @__PURE__ */ i(Cn, { pos: o, interactive: !0 })
4841
4862
  ] }),
4842
4863
  /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4843
- /* @__PURE__ */ i(Cn, { t: p }),
4864
+ /* @__PURE__ */ i(bn, { t: p }),
4844
4865
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
4845
4866
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: N }),
4846
4867
  _e
@@ -4858,7 +4879,7 @@ function zc({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o
4858
4879
  return /* @__PURE__ */ g("div", { className: "ghead", children: [
4859
4880
  e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 19, sw: 1.7 }) }),
4860
4881
  r && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(Or, { dark: t, size: 30 }) }),
4861
- /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(An, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
4882
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(En, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
4862
4883
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
4863
4884
  /* @__PURE__ */ i("span", { className: "ghead__name", children: s }),
4864
4885
  a
@@ -4879,8 +4900,8 @@ function Cc(t) {
4879
4900
  return t.translateFailed === t.lang ? { kind: "translateFailed", lang: e } : t.voiceFailed ? { kind: "voiceFailed", lang: e } : t.translating ? { kind: "translating", lang: e } : t.starting != null ? { kind: "starting", lang: e, since: t.starting } : t.relang || t.slowLine ? { kind: "voice", lang: e, since: t.lineSince } : null;
4880
4901
  }
4881
4902
  function bc(t, e) {
4882
- const [n, r] = j(null), [s, a] = j(!1);
4883
- return _(() => {
4903
+ const [n, r] = k(null), [s, a] = k(!1);
4904
+ return E(() => {
4884
4905
  if (!t) {
4885
4906
  r(null), a(!1);
4886
4907
  return;
@@ -4893,8 +4914,8 @@ function bc(t, e) {
4893
4914
  }
4894
4915
  const xc = (t) => `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
4895
4916
  function Dc({ state: t, line: e, onRetry: n, onOriginal: r }) {
4896
- const [s, a] = j(() => Date.now());
4897
- _(() => {
4917
+ const [s, a] = k(() => Date.now());
4918
+ E(() => {
4898
4919
  if (t.since == null) return;
4899
4920
  const d = setInterval(() => a(Date.now()), 1e3);
4900
4921
  return () => clearInterval(d);
@@ -4947,7 +4968,7 @@ function Bi(t, e, n) {
4947
4968
  const r = new URL(t ?? Ur), s = Ac(), a = new URL(Sc, r);
4948
4969
  e.url && a.searchParams.set("url", e.url), e.transcription && a.searchParams.set("transcription", e.transcription), e.ask && a.searchParams.set("ask", "1"), e.connect && a.searchParams.set("connect", "1"), a.searchParams.set("origin", window.location.origin), a.searchParams.set("nonce", s);
4949
4970
  const o = 480, l = 640, c = Math.max(0, (window.screenX ?? 0) + ((window.outerWidth ?? o) - o) / 2), u = Math.max(0, (window.screenY ?? 0) + ((window.outerHeight ?? l) - l) / 2), d = window.open(a.toString(), "vocalstack-connect", `popup=yes,width=${o},height=${l},left=${Math.round(c)},top=${Math.round(u)}`);
4950
- return d ? new Promise((h, M) => {
4971
+ return d ? new Promise((M, h) => {
4951
4972
  let N = !1;
4952
4973
  const p = (m) => {
4953
4974
  N || (N = !0, window.removeEventListener("message", y), clearInterval(v), m());
@@ -4964,23 +4985,23 @@ function Bi(t, e, n) {
4964
4985
  return;
4965
4986
  }
4966
4987
  if (f.type === "vocalstack:started" || f.type === "vocalstack:token" || f.type === "vocalstack:found") {
4967
- p(() => h({ transcriptionId: String(f.transcriptionId), recordingId: String(f.recordingId), token: String(f.token), expiresAt: f.expiresAt ?? null }));
4988
+ p(() => M({ transcriptionId: String(f.transcriptionId), recordingId: String(f.recordingId), token: String(f.token), expiresAt: f.expiresAt ?? null }));
4968
4989
  return;
4969
4990
  }
4970
4991
  if (f.type === "vocalstack:connected") {
4971
- p(() => h("connected"));
4992
+ p(() => M("connected"));
4972
4993
  return;
4973
4994
  }
4974
4995
  if (f.type === "vocalstack:declined") {
4975
- p(() => h(null));
4996
+ p(() => M(null));
4976
4997
  return;
4977
4998
  }
4978
- f.type === "vocalstack:error" && p(() => M(new Error(typeof f.message == "string" && f.message ? f.message : "VocalStack could not start this transcription.")));
4999
+ f.type === "vocalstack:error" && p(() => h(new Error(typeof f.message == "string" && f.message ? f.message : "VocalStack could not start this transcription.")));
4979
5000
  }
4980
5001
  };
4981
5002
  window.addEventListener("message", y);
4982
5003
  const v = setInterval(() => {
4983
- d.closed && p(() => h(null));
5004
+ d.closed && p(() => M(null));
4984
5005
  }, 500);
4985
5006
  }) : Promise.reject(new Error("Your browser blocked the VocalStack window. Allow pop-ups for this site and try again."));
4986
5007
  }
@@ -5011,23 +5032,23 @@ const Uc = {
5011
5032
  starting: "Starting the transcription…"
5012
5033
  }, Rc = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
5013
5034
  function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5014
- const [s, a] = j(""), [o, l] = j(!1), [c, u] = j(null), [d, h] = j(null);
5015
- _(() => {
5035
+ const [s, a] = k(""), [o, l] = k(!1), [c, u] = k(null), [d, M] = k(null);
5036
+ E(() => {
5016
5037
  const y = (v) => {
5017
5038
  v.key === "Escape" && r();
5018
5039
  };
5019
5040
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
5020
5041
  }, [r]);
5021
- const M = s.trim(), N = Rc.test(M), p = async () => {
5042
+ const h = s.trim(), N = Rc.test(h), p = async () => {
5022
5043
  if (!(!N || o)) {
5023
5044
  l(!0), u(null);
5024
5045
  try {
5025
- const y = await Ec(t.appUrl, /^https?:\/\//i.test(M) ? M : `https://${M}`, h);
5046
+ const y = await Ec(t.appUrl, /^https?:\/\//i.test(h) ? h : `https://${h}`, M);
5026
5047
  y && e(y);
5027
5048
  } catch (y) {
5028
5049
  u(y instanceof Error ? y.message : "Something went wrong. Please try again.");
5029
5050
  } finally {
5030
- l(!1), h(null);
5051
+ l(!1), M(null);
5031
5052
  }
5032
5053
  }
5033
5054
  };
@@ -5035,7 +5056,7 @@ function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5035
5056
  y.stopPropagation(), y.target === y.currentTarget && r();
5036
5057
  }, children: /* @__PURE__ */ g("div", { className: "vsp-end__card", children: [
5037
5058
  /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: r, children: /* @__PURE__ */ i(oe, { d: ee.close, size: 16, sw: 1.8 }) }),
5038
- /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(An, { dark: !0, link: !1, height: 16 }) }),
5059
+ /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(En, { dark: !0, link: !1, height: 16 }) }),
5039
5060
  /* @__PURE__ */ i("div", { className: "vsp-end__title", children: t.title ?? "Transcribe and translate any video" }),
5040
5061
  /* @__PURE__ */ i("div", { className: "vsp-end__note", children: t.note ?? "Paste a link from YouTube, Vimeo or any page with a video. It plays right here with subtitles and spoken translations." }),
5041
5062
  /* @__PURE__ */ g("form", { className: "vsp-end__row", onSubmit: (y) => {
@@ -5044,7 +5065,7 @@ function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5044
5065
  /* @__PURE__ */ i("input", { className: "vsp-end__input", type: "url", inputMode: "url", autoComplete: "off", spellCheck: !1, placeholder: "https://youtube.com/watch?v=…", value: s, onChange: (y) => {
5045
5066
  a(y.target.value), u(null);
5046
5067
  }, "aria-label": "Video link" }),
5047
- /* @__PURE__ */ i("button", { type: "submit", className: "vsp-end__go", disabled: !N || o, children: o ? /* @__PURE__ */ i(ct, { size: 15, color: "#050507", track: "rgba(5,5,7,.2)" }) : "Transcribe" })
5068
+ /* @__PURE__ */ i("button", { type: "submit", className: "vsp-end__go", disabled: !N || o, children: o ? /* @__PURE__ */ i(ut, { size: 15, color: "#050507", track: "rgba(5,5,7,.2)" }) : "Transcribe" })
5048
5069
  ] }),
5049
5070
  o && /* @__PURE__ */ i("div", { className: "vsp-end__note", role: "status", children: Uc[d ?? "checking"] }),
5050
5071
  c && /* @__PURE__ */ i("div", { className: "vsp-end__err", role: "alert", children: c }),
@@ -5058,8 +5079,8 @@ function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5058
5079
  ] }) });
5059
5080
  }
5060
5081
  function Hi(t) {
5061
- const [e, n] = j(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
5062
- return _(() => {
5082
+ const [e, n] = k(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
5083
+ return E(() => {
5063
5084
  if (t != null) return;
5064
5085
  const r = () => n(window.innerWidth >= 880);
5065
5086
  return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
@@ -5067,9 +5088,9 @@ function Hi(t) {
5067
5088
  }
5068
5089
  const Qc = { lang: null, subtitles: !0, speakerLabels: !1, wordHighlight: !0, translateAudio: !0, voices: "cloned", removeBackground: !1, muted: !1 };
5069
5090
  function $c(t, e) {
5070
- const n = Ci(), [r, s] = wi(), [a, o] = j(null), [l, c] = j("main"), u = vr(n, t.lang), d = Ie(() => Li(n, "translation"), [n]), h = (Y) => {
5091
+ const n = Ci(), [r, s] = wi(), [a, o] = k(null), [l, c] = k("main"), u = vr(n, t.lang), d = Ie(() => Li(n, "translation"), [n]), M = (Y) => {
5071
5092
  e({ lang: Y }), s(Y);
5072
- }, M = br({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: h, languages: d, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: r, keepOpen: !0 }), N = () => {
5093
+ }, h = br({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: M, languages: d, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: r, keepOpen: !0 }), N = () => {
5073
5094
  o(null), c("main");
5074
5095
  }, p = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: u.flag }) : /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 19, sw: 1.7 }), y = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? u.label : "As spoken"}`, title: t.lang ? u.label : "As spoken", onClick: (Y) => {
5075
5096
  Y.stopPropagation(), c("main"), o((X) => X === "lang" ? null : "lang");
@@ -5086,16 +5107,16 @@ function $c(t, e) {
5086
5107
  ] }),
5087
5108
  z
5088
5109
  ] }), C = /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5089
- /* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: M.search }),
5090
- M.list
5110
+ /* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: h.search }),
5111
+ h.list
5091
5112
  ] }), D = l === "lang" ? C : l === "subs" ? /* @__PURE__ */ g("div", { style: f, children: [
5092
- I("Show subtitles", "Captions over the video", /* @__PURE__ */ i(mt, { checked: t.subtitles, onChange: (Y) => e({ subtitles: Y }), label: "Show subtitles" })),
5093
- I("Show speaker labels", "Who is speaking, before each line", /* @__PURE__ */ i(mt, { checked: t.speakerLabels, onChange: (Y) => e({ speakerLabels: Y }), label: "Show speaker labels" })),
5094
- I("Highlight words", "Follow each word as it is spoken", /* @__PURE__ */ i(mt, { checked: t.wordHighlight, onChange: (Y) => e({ wordHighlight: Y }), label: "Highlight words" }))
5113
+ I("Show subtitles", "Captions over the video", /* @__PURE__ */ i(yt, { checked: t.subtitles, onChange: (Y) => e({ subtitles: Y }), label: "Show subtitles" })),
5114
+ I("Show speaker labels", "Who is speaking, before each line", /* @__PURE__ */ i(yt, { checked: t.speakerLabels, onChange: (Y) => e({ speakerLabels: Y }), label: "Show speaker labels" })),
5115
+ I("Highlight words", "Follow each word as it is spoken", /* @__PURE__ */ i(yt, { checked: t.wordHighlight, onChange: (Y) => e({ wordHighlight: Y }), label: "Highlight words" }))
5095
5116
  ] }) : l === "audio" ? /* @__PURE__ */ g("div", { style: f, children: [
5096
- I("Translate audio", t.lang ? "Hear the translation read aloud instead of the original speech" : "Pick a language to hear the translation read aloud", /* @__PURE__ */ i(mt, { checked: t.translateAudio && !!t.lang, onChange: (Y) => e({ translateAudio: Y }), label: "Translate audio", disabled: !t.lang })),
5117
+ I("Translate audio", t.lang ? "Hear the translation read aloud instead of the original speech" : "Pick a language to hear the translation read aloud", /* @__PURE__ */ i(yt, { checked: t.translateAudio && !!t.lang, onChange: (Y) => e({ translateAudio: Y }), label: "Translate audio", disabled: !t.lang })),
5097
5118
  I("Voices", t.voices === "cloned" ? "Each speaker in their own cloned voice, where they agreed to it" : "Synthetic voices matched to each speaker", /* @__PURE__ */ i(gr, { value: t.voices, onChange: (Y) => e({ voices: Y }), size: "sm", options: [{ value: "synthetic", label: "Synthetic" }, { value: "cloned", label: "Cloned" }] })),
5098
- I(xn, "Takes out everything that isn't speech: music, ambience and noise.", /* @__PURE__ */ i(mt, { checked: t.removeBackground, onChange: (Y) => e({ removeBackground: Y }), label: xn }))
5119
+ I(Dn, "Takes out everything that isn't speech: music, ambience and noise.", /* @__PURE__ */ i(yt, { checked: t.removeBackground, onChange: (Y) => e({ removeBackground: Y }), label: Dn }))
5099
5120
  ] }) : /* @__PURE__ */ g("div", { style: f, children: [
5100
5121
  /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => c("lang"), children: [
5101
5122
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -5122,8 +5143,8 @@ function $c(t, e) {
5122
5143
  v
5123
5144
  ] })
5124
5145
  ] }), B = /* @__PURE__ */ g(be, { children: [
5125
- /* @__PURE__ */ i(Ht, { open: a === "lang", onClose: N, title: "LANGUAGE", kind: "picker", header: M.search, sticky: !0, children: /* @__PURE__ */ i(fr, { children: M.list }) }),
5126
- /* @__PURE__ */ i(Ht, { open: a === "settings", onClose: N, title: { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO" }[l], titleNode: l === "main" ? void 0 : m, kind: l === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: D }) })
5146
+ /* @__PURE__ */ i(Wt, { open: a === "lang", onClose: N, title: "LANGUAGE", kind: "picker", header: h.search, sticky: !0, children: /* @__PURE__ */ i(fr, { children: h.list }) }),
5147
+ /* @__PURE__ */ i(Wt, { open: a === "settings", onClose: N, title: { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO" }[l], titleNode: l === "main" ? void 0 : m, kind: l === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: D }) })
5127
5148
  ] });
5128
5149
  return {
5129
5150
  chip: y,
@@ -5134,33 +5155,33 @@ function $c(t, e) {
5134
5155
  }
5135
5156
  };
5136
5157
  }
5137
- const Nt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), _t = (t) => /* @__PURE__ */ g(be, { children: [
5158
+ const mt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Yt = (t) => /* @__PURE__ */ g(be, { children: [
5138
5159
  /* @__PURE__ */ i("path", { d: "M6.5 2.75h7.25l4.75 4.75v12.25a1.5 1.5 0 0 1-1.5 1.5H6.5a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5Z", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
5139
5160
  /* @__PURE__ */ i("path", { d: "M13.75 2.75V7.5h4.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
5140
5161
  /* @__PURE__ */ i("text", { x: "11.75", y: "17.4", textAnchor: "middle", fontSize: t.length > 3 ? 4.4 : 5.2, fontWeight: "800", fill: "currentColor", fontFamily: "inherit", letterSpacing: ".2", children: t })
5141
5162
  ] }), ai = [
5142
- { name: "YouTube", tint: "#ff3b30", glyph: Nt("M21.6 7.2a2.7 2.7 0 0 0-1.9-1.9C18 4.8 12 4.8 12 4.8s-6 0-7.7.5a2.7 2.7 0 0 0-1.9 1.9C2 8.9 2 12 2 12s0 3.1.4 4.8a2.7 2.7 0 0 0 1.9 1.9c1.7.5 7.7.5 7.7.5s6 0 7.7-.5a2.7 2.7 0 0 0 1.9-1.9c.4-1.7.4-4.8.4-4.8s0-3.1-.4-4.8ZM10 15.1V8.9l5.3 3.1L10 15.1Z", "evenodd") },
5143
- { name: "MP3", tint: "#f78472", glyph: _t("MP3") },
5144
- { name: "Vimeo", tint: "#1ab7ea", glyph: Nt("M22 7.4c-.1 2-1.5 4.7-4.2 8.1-2.8 3.6-5.1 5.4-7 5.4-1.2 0-2.2-1.1-3-3.3L6.2 11.6C5.6 9.4 5 8.3 4.3 8.3c-.1 0-.6.3-1.4.9L2 8l2.7-2.4C5.9 4.6 6.8 4 7.4 4c1.4-.1 2.3.9 2.6 2.9.4 2.2.6 3.6.8 4.1.4 1.8.9 2.7 1.4 2.7.4 0 1-.6 1.8-1.9.8-1.2 1.2-2.2 1.3-2.8.1-1.1-.3-1.6-1.3-1.6-.5 0-.9.1-1.4.3.9-3 2.7-4.5 5.3-4.4 1.9.1 2.8 1.3 2.7 3.7Z") },
5163
+ { name: "YouTube", tint: "#ff3b30", glyph: mt("M21.6 7.2a2.7 2.7 0 0 0-1.9-1.9C18 4.8 12 4.8 12 4.8s-6 0-7.7.5a2.7 2.7 0 0 0-1.9 1.9C2 8.9 2 12 2 12s0 3.1.4 4.8a2.7 2.7 0 0 0 1.9 1.9c1.7.5 7.7.5 7.7.5s6 0 7.7-.5a2.7 2.7 0 0 0 1.9-1.9c.4-1.7.4-4.8.4-4.8s0-3.1-.4-4.8ZM10 15.1V8.9l5.3 3.1L10 15.1Z", "evenodd") },
5164
+ { name: "MP3", tint: "#f78472", glyph: Yt("MP3") },
5165
+ { name: "Vimeo", tint: "#1ab7ea", glyph: mt("M22 7.4c-.1 2-1.5 4.7-4.2 8.1-2.8 3.6-5.1 5.4-7 5.4-1.2 0-2.2-1.1-3-3.3L6.2 11.6C5.6 9.4 5 8.3 4.3 8.3c-.1 0-.6.3-1.4.9L2 8l2.7-2.4C5.9 4.6 6.8 4 7.4 4c1.4-.1 2.3.9 2.6 2.9.4 2.2.6 3.6.8 4.1.4 1.8.9 2.7 1.4 2.7.4 0 1-.6 1.8-1.9.8-1.2 1.2-2.2 1.3-2.8.1-1.1-.3-1.6-1.3-1.6-.5 0-.9.1-1.4.3.9-3 2.7-4.5 5.3-4.4 1.9.1 2.8 1.3 2.7 3.7Z") },
5145
5166
  { name: "Video", tint: "#55abe5", glyph: /* @__PURE__ */ g(be, { children: [
5146
5167
  /* @__PURE__ */ i("rect", { x: "3", y: "5.5", width: "13", height: "13", rx: "2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
5147
- Nt("M16 10.2 21 7v10l-5-3.2v-3.6Z")
5168
+ mt("M16 10.2 21 7v10l-5-3.2v-3.6Z")
5148
5169
  ] }) },
5149
- { name: "Twitch", tint: "#a970ff", glyph: Nt("M5 2.5 3 6.5v13h4.5V22H10l2.5-2.5h3.8L21 14.8V2.5H5Zm14 11.4-2.9 2.9h-4.3L9.4 19.2v-2.4H6V4.5h13v9.4ZM15.2 7.4h1.9v5.2h-1.9V7.4Zm-5 0h1.9v5.2h-1.9V7.4Z", "evenodd") },
5150
- { name: "WAV", tint: "#7ee0b4", glyph: _t("WAV") },
5170
+ { name: "Twitch", tint: "#a970ff", glyph: mt("M5 2.5 3 6.5v13h4.5V22H10l2.5-2.5h3.8L21 14.8V2.5H5Zm14 11.4-2.9 2.9h-4.3L9.4 19.2v-2.4H6V4.5h13v9.4ZM15.2 7.4h1.9v5.2h-1.9V7.4Zm-5 0h1.9v5.2h-1.9V7.4Z", "evenodd") },
5171
+ { name: "WAV", tint: "#7ee0b4", glyph: Yt("WAV") },
5151
5172
  { name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ g(be, { children: [
5152
- Nt("M11 8.6a5 5 0 0 1 7.8 3.1 3 3 0 0 1-.3 6H11V8.6Z"),
5173
+ mt("M11 8.6a5 5 0 0 1 7.8 3.1 3 3 0 0 1-.3 6H11V8.6Z"),
5153
5174
  /* @__PURE__ */ i("rect", { x: "8.6", y: "9.4", width: "1.3", height: "8.3", rx: ".65", fill: "currentColor" }),
5154
5175
  /* @__PURE__ */ i("rect", { x: "6.2", y: "10.6", width: "1.3", height: "7.1", rx: ".65", fill: "currentColor" }),
5155
5176
  /* @__PURE__ */ i("rect", { x: "3.8", y: "12.2", width: "1.3", height: "5.5", rx: ".65", fill: "currentColor" }),
5156
5177
  /* @__PURE__ */ i("rect", { x: "1.4", y: "13.8", width: "1.3", height: "3.9", rx: ".65", fill: "currentColor" })
5157
5178
  ] }) },
5158
- { name: "MP4", tint: "#5b63d7", glyph: _t("MP4") },
5159
- { name: "TikTok", tint: "#25f4ee", glyph: Nt("M16.6 2.5c.3 2.3 1.7 3.8 3.9 4v2.7a6.8 6.8 0 0 1-3.9-1.3v6.5a5.7 5.7 0 1 1-5.7-5.7l.9.1v2.8a2.9 2.9 0 1 0 2 2.8V2.5h2.8Z") },
5179
+ { name: "MP4", tint: "#5b63d7", glyph: Yt("MP4") },
5180
+ { name: "TikTok", tint: "#25f4ee", glyph: mt("M16.6 2.5c.3 2.3 1.7 3.8 3.9 4v2.7a6.8 6.8 0 0 1-3.9-1.3v6.5a5.7 5.7 0 1 1-5.7-5.7l.9.1v2.8a2.9 2.9 0 1 0 2 2.8V2.5h2.8Z") },
5160
5181
  { name: "Audio", tint: "#f7c948", glyph: /* @__PURE__ */ i("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: /* @__PURE__ */ i("path", { d: "M3 10.5v3M6.5 7.5v9M10 4.5v15M13.5 8v8M17 6v12M20.5 10v4" }) }) },
5161
- { name: "X", tint: "#e8eaf2", glyph: Nt("M17.8 3h3.1l-6.7 7.7L22 21h-6.2l-4.8-6.3L5.5 21H2.4l7.2-8.2L2.1 3h6.3l4.4 5.8L17.8 3Zm-1.1 16.2h1.7L7.4 4.7H5.6l11.1 14.5Z") },
5162
- { name: "MOV", tint: "#55abe5", glyph: _t("MOV") },
5163
- { name: "Facebook", tint: "#3b82f6", glyph: Nt("M13.9 21.5v-8h2.7l.4-3.1h-3.1V8.4c0-.9.3-1.5 1.6-1.5H17V4.1c-.3 0-1.3-.1-2.4-.1-2.4 0-4 1.4-4 4.1v2.3H7.9v3.1h2.7v8h3.3Z") },
5182
+ { name: "X", tint: "#e8eaf2", glyph: mt("M17.8 3h3.1l-6.7 7.7L22 21h-6.2l-4.8-6.3L5.5 21H2.4l7.2-8.2L2.1 3h6.3l4.4 5.8L17.8 3Zm-1.1 16.2h1.7L7.4 4.7H5.6l11.1 14.5Z") },
5183
+ { name: "MOV", tint: "#55abe5", glyph: Yt("MOV") },
5184
+ { name: "Facebook", tint: "#3b82f6", glyph: mt("M13.9 21.5v-8h2.7l.4-3.1h-3.1V8.4c0-.9.3-1.5 1.6-1.5H17V4.1c-.3 0-1.3-.1-2.4-.1-2.4 0-4 1.4-4 4.1v2.3H7.9v3.1h2.7v8h3.3Z") },
5164
5185
  { name: "Podcast", tint: "#c46bff", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5165
5186
  /* @__PURE__ */ i("rect", { x: "9", y: "3", width: "6", height: "10.5", rx: "3" }),
5166
5187
  /* @__PURE__ */ i("path", { d: "M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M8.5 21h7" })
@@ -5170,15 +5191,15 @@ const Nt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "curren
5170
5191
  /* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "4" }),
5171
5192
  /* @__PURE__ */ i("circle", { cx: "17.2", cy: "6.8", r: ".9", fill: "currentColor", stroke: "none" })
5172
5193
  ] }) },
5173
- { name: "M4A", tint: "#f78472", glyph: _t("M4A") },
5174
- { name: "Dailymotion", tint: "#4aa3ff", glyph: Nt("M14.6 3.5h3.2V20h-3v-1.2a5.4 5.4 0 0 1-3.6 1.4c-3.3 0-5.9-2.7-5.9-6.1S7.9 8 11.2 8c1.3 0 2.5.4 3.4 1.2V3.5Zm-3.1 7.4a3.2 3.2 0 1 0 0 6.4 3.2 3.2 0 0 0 0-6.4Z", "evenodd") },
5194
+ { name: "M4A", tint: "#f78472", glyph: Yt("M4A") },
5195
+ { name: "Dailymotion", tint: "#4aa3ff", glyph: mt("M14.6 3.5h3.2V20h-3v-1.2a5.4 5.4 0 0 1-3.6 1.4c-3.3 0-5.9-2.7-5.9-6.1S7.9 8 11.2 8c1.3 0 2.5.4 3.4 1.2V3.5Zm-3.1 7.4a3.2 3.2 0 1 0 0 6.4 3.2 3.2 0 0 0 0-6.4Z", "evenodd") },
5175
5196
  { name: "Radio", tint: "#7ee0b4", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5176
5197
  /* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "1.8", fill: "currentColor", stroke: "none" }),
5177
5198
  /* @__PURE__ */ i("path", { d: "M8.5 15.5a5 5 0 0 1 0-7M15.5 8.5a5 5 0 0 1 0 7M5.6 18.4a9 9 0 0 1 0-12.8M18.4 5.6a9 9 0 0 1 0 12.8" })
5178
5199
  ] }) },
5179
- { name: "WEBM", tint: "#5b63d7", glyph: _t("WEBM") },
5180
- { name: "Loom", tint: "#8f7bff", glyph: Nt("M21 11h-5.2l4.5-2.6-1-1.7-4.5 2.6 2.6-4.5-1.7-1-2.6 4.5V3h-2v5.3L8.5 3.8l-1.7 1 2.6 4.5-4.5-2.6-1 1.7L8.2 11H3v2h5.2l-4.5 2.6 1 1.7 4.5-2.6-2.6 4.5 1.7 1 2.6-4.5V21h2v-5.2l2.6 4.5 1.7-1-2.6-4.5 4.5 2.6 1-1.7-4.5-2.6H21v-2Zm-9 3.4a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8Z", "evenodd") },
5181
- { name: "FLAC", tint: "#f7c948", glyph: _t("FLAC") },
5200
+ { name: "WEBM", tint: "#5b63d7", glyph: Yt("WEBM") },
5201
+ { name: "Loom", tint: "#8f7bff", glyph: mt("M21 11h-5.2l4.5-2.6-1-1.7-4.5 2.6 2.6-4.5-1.7-1-2.6 4.5V3h-2v5.3L8.5 3.8l-1.7 1 2.6 4.5-4.5-2.6-1 1.7L8.2 11H3v2h5.2l-4.5 2.6 1 1.7 4.5-2.6-2.6 4.5 1.7 1 2.6-4.5V21h2v-5.2l2.6 4.5 1.7-1-2.6-4.5 4.5 2.6 1-1.7-4.5-2.6H21v-2Zm-9 3.4a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8Z", "evenodd") },
5202
+ { name: "FLAC", tint: "#f7c948", glyph: Yt("FLAC") },
5182
5203
  { name: "Live", tint: "#ff5a5a", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5183
5204
  /* @__PURE__ */ i("rect", { x: "3", y: "6", width: "18", height: "12", rx: "3" }),
5184
5205
  /* @__PURE__ */ i("circle", { cx: "8", cy: "12", r: "1.6", fill: "currentColor", stroke: "none" }),
@@ -5197,8 +5218,8 @@ function Wc({ t }) {
5197
5218
  ] });
5198
5219
  }
5199
5220
  function Fc() {
5200
- const t = k(null), [e, n] = j(!0), [r, s] = j(() => typeof document > "u" || !document.hidden);
5201
- return _(() => {
5221
+ const t = j(null), [e, n] = k(!0), [r, s] = k(() => typeof document > "u" || !document.hidden);
5222
+ return E(() => {
5202
5223
  const a = () => s(!document.hidden);
5203
5224
  document.addEventListener("visibilitychange", a);
5204
5225
  const o = t.current;
@@ -5208,7 +5229,7 @@ function Fc() {
5208
5229
  };
5209
5230
  }, []), /* @__PURE__ */ i("div", { ref: t, className: `vsp-prov${e && r ? "" : " vsp-prov--still"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("div", { className: "vsp-prov__plane", children: Array.from({ length: Bc }, (a, o) => {
5210
5231
  const l = Hc(o);
5211
- return /* @__PURE__ */ i("div", { className: `vsp-prov__row${o % 2 ? " vsp-prov__row--rev" : ""}`, style: { animationDuration: `${80 + o * 11}s`, animationDelay: `-${o * 17}s` }, children: Array.from({ length: Vc }, (c, u) => l.map((d, h) => /* @__PURE__ */ i(Wc, { t: d }, `${u}-${h}`))) }, o);
5232
+ return /* @__PURE__ */ i("div", { className: `vsp-prov__row${o % 2 ? " vsp-prov__row--rev" : ""}`, style: { animationDuration: `${80 + o * 11}s`, animationDelay: `-${o * 17}s` }, children: Array.from({ length: Vc }, (c, u) => l.map((d, M) => /* @__PURE__ */ i(Wc, { t: d }, `${u}-${M}`))) }, o);
5212
5233
  }) }) });
5213
5234
  }
5214
5235
  const Wi = {
@@ -5227,7 +5248,7 @@ function Mr(t) {
5227
5248
  }
5228
5249
  }
5229
5250
  function Gc(t, e) {
5230
- const [n, r] = j(!1), [s, a] = j(null), [o, l] = j(null), [c, u] = j(() => _c(t)), d = qe((N) => {
5251
+ const [n, r] = k(!1), [s, a] = k(null), [o, l] = k(null), [c, u] = k(() => _c(t)), d = qe((N) => {
5231
5252
  if (n) return;
5232
5253
  r(!0), l(null);
5233
5254
  let p;
@@ -5241,8 +5262,8 @@ function Gc(t, e) {
5241
5262
  }).catch((y) => l(y instanceof Error ? y.message : "Something went wrong. Please try again.")).finally(() => {
5242
5263
  r(!1), a(null);
5243
5264
  });
5244
- }, [t, n, e]), h = qe(() => d({ connect: !0 }), [d]), M = qe((N, p) => d({ url: N, ask: p }), [d]);
5245
- return { busy: n, status: s, err: o, connected: c, connect: h, start: M };
5265
+ }, [t, n, e]), M = qe(() => d({ connect: !0 }), [d]), h = qe((N, p) => d({ url: N, ask: p }), [d]);
5266
+ return { busy: n, status: s, err: o, connected: c, connect: M, start: h };
5246
5267
  }
5247
5268
  function Zc(t) {
5248
5269
  return /\.(mp4|webm|mov|m4v|ogv|mkv)(\?|#|$)/i.test(t);
@@ -5256,22 +5277,22 @@ function qc({ poster: t, src: e }) {
5256
5277
  }
5257
5278
  const Kc = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
5258
5279
  } };
5259
- function Sn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
5260
- const l = $c(t.prefs, t.set), c = Hi(), u = k(null), [d, h] = j(!1);
5261
- Vt(() => {
5280
+ function An({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
5281
+ const l = $c(t.prefs, t.set), c = Hi(), u = j(null), [d, M] = k(!1);
5282
+ Ht(() => {
5262
5283
  var v;
5263
5284
  const N = (v = u.current) == null ? void 0 : v.parentElement;
5264
5285
  if (!N) return;
5265
- const p = () => h(N.getBoundingClientRect().width < 560);
5286
+ const p = () => M(N.getBoundingClientRect().width < 560);
5266
5287
  if (p(), typeof ResizeObserver > "u") return;
5267
5288
  const y = new ResizeObserver(p);
5268
5289
  return y.observe(N), () => y.disconnect();
5269
5290
  }, []);
5270
- const M = { prevOn: !1, nextOn: !1, onPrev: () => {
5291
+ const h = { prevOn: !1, nextOn: !1, onPrev: () => {
5271
5292
  }, onNext: () => {
5272
5293
  }, playing: !1, playable: !0, playTitle: "Connect to play", onPlay: a };
5273
5294
  return /* @__PURE__ */ g("div", { ref: u, className: `vsp-idleroot${d ? " vsp-idleroot--small" : ""}`, children: [
5274
- /* @__PURE__ */ i($i, { page: s, picture: /* @__PURE__ */ i(qc, { poster: e, src: n }), title: r, desk: c, pos: Kc, sub: null, mute: { muted: t.prefs.muted, onToggle: () => t.set({ muted: !t.prefs.muted }) }, cc: { on: t.prefs.subtitles, onToggle: () => t.set({ subtitles: !t.prefs.subtitles }) }, chip: l.chip, transport: M, picker: l.sheets, sheet: null, voices: null, voicesBtn: null, sheetOpen: l.sheetOpen, onSettings: l.openSettings, onShare: () => _r(t.shareUrl ?? window.location.href, r), copied: null, onTouch: () => {
5295
+ /* @__PURE__ */ i($i, { page: s, picture: /* @__PURE__ */ i(qc, { poster: e, src: n }), title: r, desk: c, pos: Kc, sub: null, mute: { muted: t.prefs.muted, onToggle: () => t.set({ muted: !t.prefs.muted }) }, cc: { on: t.prefs.subtitles, onToggle: () => t.set({ subtitles: !t.prefs.subtitles }) }, chip: l.chip, transport: h, picker: l.sheets, sheet: null, voices: null, voicesBtn: null, sheetOpen: l.sheetOpen, onSettings: l.openSettings, onShare: () => _r(t.shareUrl ?? window.location.href, r), copied: null, onTouch: () => {
5275
5296
  } }),
5276
5297
  !l.sheetOpen && /* @__PURE__ */ i("div", { className: "vsp-idle", "data-theme": "dark", children: /* @__PURE__ */ i("div", { className: "vsp-idle__box", children: o }) })
5277
5298
  ] });
@@ -5279,7 +5300,7 @@ function Sn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
5279
5300
  function Fi({ connect: t, onClick: e, label: n }) {
5280
5301
  return /* @__PURE__ */ g(be, { children: [
5281
5302
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
5282
- t.busy ? /* @__PURE__ */ i(ct, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: ee.link, size: 18, sw: 1.8 }),
5303
+ t.busy ? /* @__PURE__ */ i(ut, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: ee.link, size: 18, sw: 1.8 }),
5283
5304
  /* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
5284
5305
  ] }),
5285
5306
  t.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", role: "status", children: Wi[t.status ?? "checking"] }),
@@ -5288,26 +5309,26 @@ function Fi({ connect: t, onClick: e, label: n }) {
5288
5309
  }
5289
5310
  function Jc({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, onClear: o }) {
5290
5311
  const l = () => r.start(e, n);
5291
- return /* @__PURE__ */ g(Sn, { idle: t, poster: a, src: e, title: Mr(e), page: s, onAct: l, children: [
5312
+ return /* @__PURE__ */ g(An, { idle: t, poster: a, src: e, title: Mr(e), page: s, onAct: l, children: [
5292
5313
  /* @__PURE__ */ i(Fi, { connect: r, onClick: l, label: r.connected ? "Play with VocalStack" : "Connect to VocalStack" }),
5293
5314
  !r.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: r.connected ? `Plays ${Mr(e)} with subtitles and spoken translations.` : `Connect to play ${Mr(e)} with subtitles and spoken translations.` }),
5294
5315
  o && !r.busy && /* @__PURE__ */ i("button", { type: "button", className: "vsp-idle__other", onClick: o, children: "Choose another video" })
5295
5316
  ] });
5296
5317
  }
5297
5318
  function Xc({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5298
- const [a, o] = j(""), l = k(null), c = k(null), u = a.trim(), d = oi.test(u), h = () => {
5319
+ const [a, o] = k(""), l = j(null), c = j(null), u = a.trim(), d = oi.test(u), M = () => {
5299
5320
  if (!d || e.busy) return;
5300
5321
  const p = /^https?:\/\//i.test(u) ? u : `https://${u}`;
5301
5322
  s(p), e.start(p, !1);
5302
5323
  };
5303
5324
  if (!e.connected)
5304
- return /* @__PURE__ */ g(Sn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: e.connect, children: [
5325
+ return /* @__PURE__ */ g(An, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: e.connect, children: [
5305
5326
  /* @__PURE__ */ i(Fi, { connect: e, onClick: e.connect, label: "Connect to VocalStack" }),
5306
5327
  !e.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: "Connect your VocalStack account to watch any video with subtitles and spoken translations." })
5307
5328
  ] });
5308
- const M = () => {
5329
+ const h = () => {
5309
5330
  var p;
5310
- d ? h() : (p = l.current) == null || p.focus();
5331
+ d ? M() : (p = l.current) == null || p.focus();
5311
5332
  }, N = (p) => {
5312
5333
  const y = p.trim();
5313
5334
  if (!oi.test(y) || e.busy || y === c.current) return;
@@ -5315,23 +5336,23 @@ function Xc({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5315
5336
  const v = /^https?:\/\//i.test(y) ? y : `https://${y}`;
5316
5337
  s(v), e.start(v, !1);
5317
5338
  };
5318
- return /* @__PURE__ */ g(Sn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: M, children: [
5339
+ return /* @__PURE__ */ g(An, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: h, children: [
5319
5340
  /* @__PURE__ */ i("form", { className: "vsp-idle__form", onSubmit: (p) => {
5320
- p.preventDefault(), h();
5341
+ p.preventDefault(), M();
5321
5342
  }, children: /* @__PURE__ */ g("span", { className: "vsp-idle__field", children: [
5322
5343
  /* @__PURE__ */ i(oe, { d: ee.link, size: 16, sw: 1.8 }),
5323
5344
  /* @__PURE__ */ i("input", { ref: l, className: "vsp-idle__input", type: "url", inputMode: "url", enterKeyHint: "go", autoComplete: "off", spellCheck: !1, placeholder: "Paste a video link", value: a, onChange: (p) => o(p.target.value), onPaste: (p) => {
5324
5345
  const y = p.clipboardData.getData("text");
5325
5346
  y && (o(y.trim()), N(y), p.preventDefault());
5326
5347
  }, "aria-label": "Video link", autoFocus: !0 }),
5327
- e.busy && /* @__PURE__ */ i(ct, { size: 15, color: "#eef0f8", track: "rgba(255,255,255,.2)" })
5348
+ e.busy && /* @__PURE__ */ i(ut, { size: 15, color: "#eef0f8", track: "rgba(255,255,255,.2)" })
5328
5349
  ] }) }),
5329
5350
  e.busy ? /* @__PURE__ */ i("div", { className: "vsp-idle__note", role: "status", children: Wi[e.status ?? "checking"] }) : /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: "YouTube, Vimeo, an mp3 or any video link. Press Enter or ▶ to play it here with subtitles and spoken translations." }),
5330
5351
  e.err && /* @__PURE__ */ i("div", { className: "vsp-end__err", role: "alert", children: e.err })
5331
5352
  ] });
5332
5353
  }
5333
5354
  function eu({ idle: t, message: e, onRetry: n, page: r }) {
5334
- return /* @__PURE__ */ g(Sn, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
5355
+ return /* @__PURE__ */ g(An, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
5335
5356
  /* @__PURE__ */ g("div", { className: "vsp-idle__err", role: "alert", children: [
5336
5357
  /* @__PURE__ */ i(oe, { d: ee.warn, size: 16, sw: 1.8 }),
5337
5358
  e
@@ -5343,8 +5364,8 @@ function eu({ idle: t, message: e, onRetry: n, page: r }) {
5343
5364
  ] });
5344
5365
  }
5345
5366
  function tu(t, e, n) {
5346
- const [r, s] = j(t && e ? void 0 : null);
5347
- return _(() => {
5367
+ const [r, s] = k(t && e ? void 0 : null);
5368
+ return E(() => {
5348
5369
  if (!t) {
5349
5370
  s(null);
5350
5371
  return;
@@ -5385,7 +5406,7 @@ function ru(t) {
5385
5406
  }
5386
5407
  const fu = za(function(e, n) {
5387
5408
  var K;
5388
- const r = k(null);
5409
+ const r = j(null);
5389
5410
  Ia(n, () => ({
5390
5411
  seek: (L) => {
5391
5412
  var ie;
@@ -5408,127 +5429,127 @@ const fu = za(function(e, n) {
5408
5429
  return (L = r.current) == null ? void 0 : L.toggle();
5409
5430
  }
5410
5431
  }), []);
5411
- const [s, a] = j({ id: e.id ?? "", token: e.token });
5412
- _(() => {
5432
+ const [s, a] = k({ id: e.id ?? "", token: e.token });
5433
+ E(() => {
5413
5434
  a({ id: e.id ?? "", token: e.token });
5414
5435
  }, [e.id, e.token, e.src]);
5415
5436
  const o = tu(e.src ?? null, e.token ?? null, e.baseUrl ?? null);
5416
- _(() => {
5437
+ E(() => {
5417
5438
  o != null && o.id && a({ id: o.id, token: e.token });
5418
5439
  }, [o == null ? void 0 : o.id]);
5419
- const [l, c] = j(null), [u, d] = j(() => ({ ...Qc, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, L]) => L !== void 0)) })), [h, M] = j({}), N = { prefs: u, set: (L) => {
5420
- d((ie) => ({ ...ie, ...L })), M((ie) => ({ ...ie, ...L }));
5421
- }, shareUrl: (K = e.shareUrl) == null ? void 0 : K.call(e, null) }, { muted: p, ...y } = h;
5422
- _(() => {
5440
+ const [l, c] = k(null), [u, d] = k(() => ({ ...Qc, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, L]) => L !== void 0)) })), [M, h] = k({}), N = { prefs: u, set: (L) => {
5441
+ d((ie) => ({ ...ie, ...L })), h((ie) => ({ ...ie, ...L }));
5442
+ }, shareUrl: (K = e.shareUrl) == null ? void 0 : K.call(e, null) }, { muted: p, ...y } = M;
5443
+ E(() => {
5423
5444
  c(null);
5424
5445
  }, [e.id, e.src]);
5425
5446
  const v = e.src ?? l, m = !s.id && !!v && (l != null || o !== void 0), f = !s.id && !e.src && !l, I = Oi({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: C, gone: D, error: B, reload: Y } = Ko(I, s.id), X = Jo(I, (C == null ? void 0 : C.recording.id) ?? null), z = Ie(() => Zo(I, X), [I, X]);
5426
- _(() => {
5447
+ E(() => {
5427
5448
  var L;
5428
5449
  C && ((L = e.onSource) == null || L.call(e, C));
5429
- }, [C]), _(() => {
5450
+ }, [C]), E(() => {
5430
5451
  var L;
5431
5452
  B && ((L = e.onError) == null || L.call(e, B));
5432
5453
  }, [B]);
5433
- const F = Hi(e.desk), S = (e.layout ?? "embed") === "embed", T = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), E = qe((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), O = Gc(T, E), te = k(null);
5434
- return _(() => (si(S ? te.current : null), () => si(null)), [S]), /* @__PURE__ */ i(Ho, { value: z, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${S ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Xc, { idle: N, connect: O, page: !S, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Jc, { idle: N, src: v, ask: !l, connect: O, page: !S, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? B && !C ? /* @__PURE__ */ i(eu, { idle: N, message: B.message, onRetry: Y, page: !S }) : /* @__PURE__ */ i(su, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: z, shared: C, gone: D, loadError: B, reread: Y, desk: F, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5454
+ const F = Hi(e.desk), S = (e.layout ?? "embed") === "embed", T = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), _ = qe((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), O = Gc(T, _), te = j(null);
5455
+ return E(() => (si(S ? te.current : null), () => si(null)), [S]), /* @__PURE__ */ i(Ho, { value: z, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${S ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Xc, { idle: N, connect: O, page: !S, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Jc, { idle: N, src: v, ask: !l, connect: O, page: !S, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? B && !C ? /* @__PURE__ */ i(eu, { idle: N, message: B.message, onRetry: Y, page: !S }) : /* @__PURE__ */ i(su, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: z, shared: C, gone: D, loadError: B, reread: Y, desk: F, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5435
5456
  });
5436
5457
  function su(t) {
5437
5458
  var fs, ps, Ns, ms, ys, Ts, ws, Ls, vs, ks, js, zs, Is, Os, Cs, bs, xs, Ds, Ss, As, Es, _s, Ys, Us, Rs, Ps;
5438
- const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => ru(t), []), u = (t.mode ?? "video") === "video", [d, h] = j(t.loadError);
5439
- _(() => {
5440
- t.loadError && h(t.loadError);
5459
+ const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => ru(t), []), u = (t.mode ?? "video") === "video", [d, M] = k(t.loadError);
5460
+ E(() => {
5461
+ t.loadError && M(t.loadError);
5441
5462
  }, [t.loadError]);
5442
- const [M, N] = j("none"), [p, y] = j(!1), [v, m] = j(""), [f, I] = tc(), [C, D] = j(null), [B, Y] = j(u ? "listen" : "read"), [X, z] = j(!1), F = k(null), S = k(/* @__PURE__ */ new Map()), [T, E] = j("main"), O = (w) => {
5463
+ const [h, N] = k("none"), [p, y] = k(!1), [v, m] = k(""), [f, I] = tc(), [C, D] = k(null), [B, Y] = k(u ? "listen" : "read"), [X, z] = k(!1), F = j(null), S = j(/* @__PURE__ */ new Map()), [T, _] = k("main"), O = (w) => {
5443
5464
  const Ne = document.querySelector(".vs-sheet--settings"), Pe = Ne == null ? void 0 : Ne.parentElement;
5444
- Ne && Pe && T === "main" && w !== "main" && Pe.style.setProperty("--vs-sheet-top", `${Math.round(Ne.getBoundingClientRect().top - Pe.getBoundingClientRect().top)}px`), E(w);
5465
+ Ne && Pe && T === "main" && w !== "main" && Pe.style.setProperty("--vs-sheet-top", `${Math.round(Ne.getBoundingClientRect().top - Pe.getBoundingClientRect().top)}px`), _(w);
5445
5466
  };
5446
- _(() => {
5467
+ E(() => {
5447
5468
  X || O("main");
5448
5469
  }, [X]);
5449
- const [te, K] = j(u), L = (n == null ? void 0 : n.recording) ?? null, ie = (L == null ? void 0 : L.id) ?? null, [ne, G] = j(l.lang), J = typeof ne == "string" ? ne : null, [pe, le] = j(l.labels), [Te, je] = j(l.words), [Ae, Le] = j(l.cc), [we, Ee] = j(l.translateAudio), [Re, De] = j(l.clonedVoices), [$, H] = j(l.removeBackground), A = t.settings;
5450
- _(() => {
5470
+ const [te, K] = k(u), L = (n == null ? void 0 : n.recording) ?? null, ie = (L == null ? void 0 : L.id) ?? null, [ne, G] = k(l.lang), J = typeof ne == "string" ? ne : null, [pe, le] = k(l.labels), [Te, je] = k(l.words), [De, Le] = k(l.cc), [we, Ee] = k(l.translateAudio), [Re, Se] = k(l.clonedVoices), [$, H] = k(l.removeBackground), A = t.settings;
5471
+ E(() => {
5451
5472
  (A == null ? void 0 : A.lang) !== void 0 && G(A.lang);
5452
- }, [A == null ? void 0 : A.lang]), _(() => {
5473
+ }, [A == null ? void 0 : A.lang]), E(() => {
5453
5474
  (A == null ? void 0 : A.speakerLabels) !== void 0 && le(A.speakerLabels ? "on" : "off");
5454
- }, [A == null ? void 0 : A.speakerLabels]), _(() => {
5475
+ }, [A == null ? void 0 : A.speakerLabels]), E(() => {
5455
5476
  (A == null ? void 0 : A.wordHighlight) !== void 0 && je(A.wordHighlight ? "on" : "off");
5456
- }, [A == null ? void 0 : A.wordHighlight]), _(() => {
5477
+ }, [A == null ? void 0 : A.wordHighlight]), E(() => {
5457
5478
  (A == null ? void 0 : A.subtitles) !== void 0 && Le(A.subtitles);
5458
- }, [A == null ? void 0 : A.subtitles]), _(() => {
5479
+ }, [A == null ? void 0 : A.subtitles]), E(() => {
5459
5480
  (A == null ? void 0 : A.translateAudio) !== void 0 && Ee(A.translateAudio);
5460
- }, [A == null ? void 0 : A.translateAudio]), _(() => {
5461
- (A == null ? void 0 : A.voices) !== void 0 && De(A.voices === "cloned");
5462
- }, [A == null ? void 0 : A.voices]), _(() => {
5481
+ }, [A == null ? void 0 : A.translateAudio]), E(() => {
5482
+ (A == null ? void 0 : A.voices) !== void 0 && Se(A.voices === "cloned");
5483
+ }, [A == null ? void 0 : A.voices]), E(() => {
5463
5484
  (A == null ? void 0 : A.removeBackground) !== void 0 && H(A.removeBackground);
5464
5485
  }, [A == null ? void 0 : A.removeBackground]);
5465
5486
  const b = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, V = u && !we;
5466
- _(() => {
5487
+ E(() => {
5467
5488
  if (!t.syncUrl) return;
5468
5489
  const w = new URL(window.location.href);
5469
- J ? w.searchParams.set("lang", J) : w.searchParams.delete("lang"), pe ? w.searchParams.set("labels", pe) : w.searchParams.delete("labels"), Te ? w.searchParams.set("words", Te) : w.searchParams.delete("words"), Ae ? w.searchParams.delete("cc") : w.searchParams.set("cc", "off"), we ? w.searchParams.delete("audio") : w.searchParams.set("audio", "original"), Re ? w.searchParams.delete("voices") : w.searchParams.set("voices", "stock"), Mo(w, $), w.href !== window.location.href && window.history.replaceState(window.history.state, "", w);
5470
- }, [J, pe, Te, Ae, we, Re, $]), _(() => {
5490
+ J ? w.searchParams.set("lang", J) : w.searchParams.delete("lang"), pe ? w.searchParams.set("labels", pe) : w.searchParams.delete("labels"), Te ? w.searchParams.set("words", Te) : w.searchParams.delete("words"), De ? w.searchParams.delete("cc") : w.searchParams.set("cc", "off"), we ? w.searchParams.delete("audio") : w.searchParams.set("audio", "original"), Re ? w.searchParams.delete("voices") : w.searchParams.set("voices", "stock"), Mo(w, $), w.href !== window.location.href && window.history.replaceState(window.history.state, "", w);
5491
+ }, [J, pe, Te, De, we, Re, $]), E(() => {
5471
5492
  n && !n.allowTranslate && J && G(null);
5472
5493
  }, [n, J]);
5473
- const { model: ce, error: W, clearError: ye, setLanguage: Z, mergeTranslations: ke, translating: ze, translateFailed: Fe, shownLang: Se } = nl(ie, {
5494
+ const { model: ce, error: W, clearError: ye, setLanguage: Z, mergeTranslations: ke, translating: ze, translateFailed: Ge, shownLang: Ae } = nl(ie, {
5474
5495
  lang: null,
5475
5496
  onFrame: (w) => {
5476
5497
  w.type === "job.progress" && D({ state: w.state, processedS: w.processedS ?? 0, totalS: w.totalS ?? null, segmentsDone: w.segmentsDone ?? 0, segmentsTotal: w.segmentsTotal ?? null, pct: w.pct ?? 0, error: w.error ?? null });
5477
5498
  }
5478
- }), ge = Ie(() => So(ce).filter((w) => !w.suppressed), [ce]), _e = rl((n == null ? void 0 : n.job) ?? null), Be = ["done", "failed", "stopped"].includes(ur((_e == null ? void 0 : _e.state) ?? ((fs = n == null ? void 0 : n.job) == null ? void 0 : fs.state))), Q = Be ? _e : C ?? _e, he = !!C && !["done", "failed", "stopped"].includes(ur(C.state)), ue = k(0);
5479
- _(() => {
5480
- !Be || !he || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
5481
- }, [Be, he, C == null ? void 0 : C.state, C == null ? void 0 : C.processedS, o]);
5482
- const ae = ur((Q == null ? void 0 : Q.state) ?? ((ps = n == null ? void 0 : n.job) == null ? void 0 : ps.state) ?? (e.listen ? (L == null ? void 0 : L.state) === "finalized" ? "done" : L != null && L.state ? "transcribing" : void 0 : void 0)), fe = !!ie && (ae === "transcribing" || ae === "queued"), Ye = u && !r && (!n || (fe || ae === "cropping") && ge.length === 0), U = fe ? (Q == null ? void 0 : Q.pct) ?? 0 : 100, R = il(n == null ? void 0 : n.job, Q) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, q = ((Ns = ce.segments.values().next().value) == null ? void 0 : Ns.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, re = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((Ts = (ys = (ms = n == null ? void 0 : n.job) == null ? void 0 : ms.source) == null ? void 0 : ys.name) == null ? void 0 : Ts.trim()) || null, Oe = n ? ((ws = n.name) == null ? void 0 : ws.trim()) || de : null, me = !!((Ls = n == null ? void 0 : n.job) != null && Ls.hasAudio), ve = (vs = n == null ? void 0 : n.job) == null ? void 0 : vs.source, Ce = !me && !!ve && (ve.kind !== "url" || ve.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), Ge = ie && (n != null && n.allowDownload) && me ? Ba(e.origin, ie, e.cred) : null, Ve = !!ve && (ve.kind !== "url" || ve.bytes != null), ut = iu(Ge && Ve ? Ge : null), st = Ge && (!Ve || ut) ? Ge : ie && (n != null && n.allowDownload) && (Ce || me && Ve) ? Ln(e.origin, ie, "source", e.cred) : null, ft = ge[ge.length - 1], Ze = ft ? ((ks = ft.words[ft.words.length - 1]) == null ? void 0 : ks.end) ?? ft.start : 0, it = u && fe ? Math.max(Ze, (Q == null ? void 0 : Q.processedS) ?? 0) : null, dt = oc(st, (me || Ce) && !!(n != null && n.allowDownload), ge, R, Ce ? ((zs = (js = n == null ? void 0 : n.job) == null ? void 0 : js.crop) == null ? void 0 : zs.startS) ?? 0 : 0, it), Qe = ((Os = (Is = n == null ? void 0 : n.job) == null ? void 0 : Is.source) == null ? void 0 : Os.kind) === "url" ? Si(n.job.source.url) : null, Wt = ro(Qe), xt = ac(ge, R, ((bs = (Cs = n == null ? void 0 : n.job) == null ? void 0 : Cs.crop) == null ? void 0 : bs.startS) ?? 0, it), Ke = !!Qe, zt = Ke ? xt.player : dt, ot = Ci(), yt = k(null), se = hc({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: ge, lenS: R, ended: !!ie && !fe, cred: e.cred, langs: ot, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: G, side: s && !te ? dc : void 0, hearOriginal: V, timed: !!Qe, stockVoices: u && !Re, stickyPicker: u, pickerBusy: yt.current }), Ft = k(null);
5483
- _(() => {
5484
- !ie || Ft.current === J || (Ft.current = J, Z(J));
5499
+ }), ge = Ie(() => So(ce).filter((w) => !w.suppressed), [ce]), _e = rl((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(ur((_e == null ? void 0 : _e.state) ?? ((fs = n == null ? void 0 : n.job) == null ? void 0 : fs.state))), Q = Ve ? _e : C ?? _e, he = !!C && !["done", "failed", "stopped"].includes(ur(C.state)), ue = j(0);
5500
+ E(() => {
5501
+ !Ve || !he || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
5502
+ }, [Ve, he, C == null ? void 0 : C.state, C == null ? void 0 : C.processedS, o]);
5503
+ const ae = ur((Q == null ? void 0 : Q.state) ?? ((ps = n == null ? void 0 : n.job) == null ? void 0 : ps.state) ?? (e.listen ? (L == null ? void 0 : L.state) === "finalized" ? "done" : L != null && L.state ? "transcribing" : void 0 : void 0)), fe = !!ie && (ae === "transcribing" || ae === "queued"), Ye = u && !r && (!n || (fe || ae === "cropping") && ge.length === 0), U = fe ? (Q == null ? void 0 : Q.pct) ?? 0 : 100, R = il(n == null ? void 0 : n.job, Q) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, q = ((Ns = ce.segments.values().next().value) == null ? void 0 : Ns.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, re = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((Ts = (ys = (ms = n == null ? void 0 : n.job) == null ? void 0 : ms.source) == null ? void 0 : ys.name) == null ? void 0 : Ts.trim()) || null, Oe = n ? ((ws = n.name) == null ? void 0 : ws.trim()) || de : null, me = !!((Ls = n == null ? void 0 : n.job) != null && Ls.hasAudio), ve = (vs = n == null ? void 0 : n.job) == null ? void 0 : vs.source, Ce = !me && !!ve && (ve.kind !== "url" || ve.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), We = ie && (n != null && n.allowDownload) && me ? Ba(e.origin, ie, e.cred) : null, Be = !!ve && (ve.kind !== "url" || ve.bytes != null), ot = iu(We && Be ? We : null), st = We && (!Be || ot === "yes") ? We : We && ot === "unknown" ? null : ie && (n != null && n.allowDownload) && (Ce || me && Be) ? vn(e.origin, ie, "source", e.cred) : null, pt = ge[ge.length - 1], Ze = pt ? ((ks = pt.words[pt.words.length - 1]) == null ? void 0 : ks.end) ?? pt.start : 0, it = u && fe ? Math.max(Ze, (Q == null ? void 0 : Q.processedS) ?? 0) : null, dt = oc(st, (me || Ce) && !!(n != null && n.allowDownload), ge, R, Ce ? ((zs = (js = n == null ? void 0 : n.job) == null ? void 0 : js.crop) == null ? void 0 : zs.startS) ?? 0 : 0, it), Qe = ((Os = (Is = n == null ? void 0 : n.job) == null ? void 0 : Is.source) == null ? void 0 : Os.kind) === "url" ? Si(n.job.source.url) : null, Ft = ro(Qe), Dt = ac(ge, R, ((bs = (Cs = n == null ? void 0 : n.job) == null ? void 0 : Cs.crop) == null ? void 0 : bs.startS) ?? 0, it), Ke = !!Qe, ht = Ke ? Dt.player : dt, lt = Ci(), Tt = j(null), se = hc({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: ge, lenS: R, ended: !!ie && !fe, cred: e.cred, langs: lt, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: G, side: s && !te ? dc : void 0, hearOriginal: V, timed: !!Qe, stockVoices: u && !Re, stickyPicker: u, pickerBusy: Tt.current }), Gt = j(null);
5504
+ E(() => {
5505
+ !ie || Gt.current === J || (Gt.current = J, Z(J));
5485
5506
  }, [J, ie]);
5486
- const x = Ke ? xt.player : se.on ? se.player : zt;
5487
- _(() => {
5507
+ const x = Ke ? Dt.player : se.on ? se.player : ht;
5508
+ E(() => {
5488
5509
  if (Ke) {
5489
5510
  se.player.pause();
5490
5511
  return;
5491
5512
  }
5492
- (se.on ? zt : se.player).pause();
5513
+ (se.on ? ht : se.player).pause();
5493
5514
  }, [se.on, Ke]);
5494
- const ht = Ie(() => ge.filter((w) => w.sentenceId != null).map((w, Ne, Pe) => {
5495
- var We;
5496
- return { sid: w.sentenceId, start: w.start, end: ((We = Pe[Ne + 1]) == null ? void 0 : We.start) ?? Yt(w, w.start, w.start + 4) };
5497
- }), [ge]), Dt = zo({ on: Ke && se.on, lines: ht, clips: se.clips, t: x.t, playing: x.playing, muted: x.muted }), Rt = !!J && (ze || se.relang || se.on && Dt.missing != null);
5498
- yt.current = Rt ? J : null, _(() => {
5499
- Ke && se.on && Dt.sid != null && se.setNear(Dt.sid);
5500
- }, [Dt.sid, Ke, se.on]), ic([zt, se.player], se.sampling);
5501
- const It = k(null);
5502
- _(() => {
5503
- fe && !x.playing && It.current && (It.current.scrollTop = It.current.scrollHeight);
5515
+ const Mt = Ie(() => ge.filter((w) => w.sentenceId != null).map((w, Ne, Pe) => {
5516
+ var Fe;
5517
+ return { sid: w.sentenceId, start: w.start, end: ((Fe = Pe[Ne + 1]) == null ? void 0 : Fe.start) ?? Ut(w, w.start, w.start + 4) };
5518
+ }), [ge]), St = zo({ on: Ke && se.on, lines: Mt, clips: se.clips, t: x.t, playing: x.playing, muted: x.muted }), Pt = !!J && (ze || se.relang || se.on && St.missing != null);
5519
+ Tt.current = Pt ? J : null, E(() => {
5520
+ Ke && se.on && St.sid != null && se.setNear(St.sid);
5521
+ }, [St.sid, Ke, se.on]), ic([ht, se.player], se.sampling);
5522
+ const Ot = j(null);
5523
+ E(() => {
5524
+ fe && !x.playing && Ot.current && (Ot.current.scrollTop = Ot.current.scrollHeight);
5504
5525
  }, [fe, ge.length]);
5505
- const _n = fc(It, ge, p, v, y), Pt = /* @__PURE__ */ i(gc, { open: p, q: v, onQ: m, onClose: () => y(!1), hits: _n, desk: s, inline: s }), Je = io({ name: n == null ? void 0 : n.name, sourceName: (Ds = (xs = n == null ? void 0 : n.job) == null ? void 0 : xs.source) == null ? void 0 : Ds.name, ytTitle: Wt, url: ((As = (Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.source) == null ? void 0 : As.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), Mt = !!(n != null && n.allowDownload), Ot = !!(n != null && n.allowExport), lt = se.readLang, et = lt ? ((Es = ot == null ? void 0 : ot.languages.find((w) => w.code === lt)) == null ? void 0 : Es.name) ?? lt.toUpperCase() : null, Gt = async () => {
5526
+ const Yn = fc(Ot, ge, p, v, y), Qt = /* @__PURE__ */ i(gc, { open: p, q: v, onQ: m, onClose: () => y(!1), hits: Yn, desk: s, inline: s }), Je = io({ name: n == null ? void 0 : n.name, sourceName: (Ds = (xs = n == null ? void 0 : n.job) == null ? void 0 : xs.source) == null ? void 0 : Ds.name, ytTitle: Ft, url: ((As = (Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.source) == null ? void 0 : As.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), gt = !!(n != null && n.allowDownload), Ct = !!(n != null && n.allowExport), ct = se.readLang, et = ct ? ((Es = lt == null ? void 0 : lt.languages.find((w) => w.code === ct)) == null ? void 0 : Es.name) ?? ct.toUpperCase() : null, Zt = async () => {
5506
5527
  if (ie)
5507
5528
  try {
5508
- if (lt && se.canSpeak) {
5509
- I(`Preparing ${Je} in ${et}${se.readVoiceName ? `, read by ${se.readVoiceName}` : ""} — the download starts when it is ready.`), await ll(e, { recordingId: ie, lang: lt, voiceKey: se.readVoiceKey, cred: e.cred, request: se.requestTrack }), I(`Downloading ${Je} in ${et}.`);
5529
+ if (ct && se.canSpeak) {
5530
+ I(`Preparing ${Je} in ${et}${se.readVoiceName ? `, read by ${se.readVoiceName}` : ""} — the download starts when it is ready.`), await ll(e, { recordingId: ie, lang: ct, voiceKey: se.readVoiceKey, cred: e.cred, request: se.requestTrack }), I(`Downloading ${Je} in ${et}.`);
5510
5531
  return;
5511
5532
  }
5512
5533
  if (me) {
5513
- I(`Preparing ${Je} as MP3 — the download starts when it is ready.`), await al(Ln(e.origin, ie, "delivery", e.cred)), I(`Downloading ${Je}.`);
5534
+ I(`Preparing ${Je} as MP3 — the download starts when it is ready.`), await al(vn(e.origin, ie, "delivery", e.cred)), I(`Downloading ${Je}.`);
5514
5535
  return;
5515
5536
  }
5516
- Er(Ln(e.origin, ie, "source", e.cred)), I(`Downloading ${Je} — the full audio, since the transcript is still being written.`);
5537
+ Er(vn(e.origin, ie, "source", e.cred)), I(`Downloading ${Je} — the full audio, since the transcript is still being written.`);
5517
5538
  } catch (w) {
5518
- throw h(jt(w)), w;
5539
+ throw M(It(w)), w;
5519
5540
  }
5520
5541
  }, at = (w) => {
5521
5542
  if (!ie) return;
5522
- const Ne = Lr.find((We) => We.key === w).name, Pe = et ? ` in ${et}` : "";
5523
- return ol(e, ie, w, { lang: lt }).then(() => I(fe ? `${Ne} exported${Pe} for the first ${ge.length} segments — the rest is still transcribing.` : `${Ne} exported${Pe}.`)).catch((We) => {
5524
- throw h(jt(We)), We;
5543
+ const Ne = Lr.find((Fe) => Fe.key === w).name, Pe = et ? ` in ${et}` : "";
5544
+ return ol(e, ie, w, { lang: ct }).then(() => I(fe ? `${Ne} exported${Pe} for the first ${ge.length} segments — the rest is still transcribing.` : `${Ne} exported${Pe}.`)).catch((Fe) => {
5545
+ throw M(It(Fe)), Fe;
5525
5546
  });
5526
- }, rn = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", sn = fe ? "var(--brand)" : "var(--ink-28)", Zt = sl(Q, ge.length), Tt = x.has && (!se.relang || !!Qe), $e = k(x);
5547
+ }, sn = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", an = fe ? "var(--brand)" : "var(--ink-28)", qt = sl(Q, ge.length), wt = x.has && (!se.relang || !!Qe), $e = j(x);
5527
5548
  $e.current = x;
5528
- const Ct = `${J ?? ""}|${se.on ? "voice" : "source"}`, an = k({ key: Ct, idx: 0, t: 0, playing: !1, until: 0 });
5529
- _(() => {
5530
- const w = an.current;
5531
- if (w.key !== Ct && (w.key = Ct, w.until = Date.now() + 15e3), !Ke) {
5549
+ const bt = `${J ?? ""}|${se.on ? "voice" : "source"}`, on = j({ key: bt, idx: 0, t: 0, playing: !1, until: 0 });
5550
+ E(() => {
5551
+ const w = on.current;
5552
+ if (w.key !== bt && (w.key = bt, w.until = Date.now() + 15e3), !Ke) {
5532
5553
  if (!w.until) {
5533
5554
  w.idx = x.idx, w.t = x.t, w.playing = x.playing;
5534
5555
  return;
@@ -5537,77 +5558,81 @@ function su(t) {
5537
5558
  w.until = 0;
5538
5559
  return;
5539
5560
  }
5540
- !x.has || se.relang || (w.until = 0, Math.abs(x.t - w.t) > 0.5 && (x.seekFrac && x.dur > 0 ? x.seekFrac(w.t / x.dur) : x.seekRow(w.idx)), w.playing && !x.playing && (tt.current = !0, x.toggle()));
5561
+ !x.has || se.relang || (w.until = 0, Math.abs(x.t - w.t) > 0.5 && (x.seekFrac && x.dur > 0 ? x.seekFrac(w.t / x.dur) : x.seekRow(w.idx)), w.playing && !x.playing && B === "listen" && (tt.current = !0, x.toggle()));
5541
5562
  }
5542
5563
  });
5543
- const on = k(!1), tt = k(!1);
5564
+ const ln = j(!1), tt = j(!1);
5544
5565
  u && (fi.video = !0);
5545
- const [ln, St] = j(!1), [Yn, Un] = j(!1);
5546
- _(() => {
5547
- if (!u || on.current || !Tt || !te || Ye || t.autoplay === !1) return;
5548
- on.current = !0;
5549
- const w = (We) => {
5550
- $e.current.playing || tt.current || ($e.current.toggle(), We > 0 && setTimeout(() => w(We - 1), 1500));
5566
+ const [cn, At] = k(!1), [Un, Rn] = k(!1);
5567
+ E(() => {
5568
+ if (!u || ln.current || !wt || !te || Ye || t.autoplay === !1) return;
5569
+ ln.current = !0;
5570
+ const w = (Fe) => {
5571
+ $e.current.playing || tt.current || ($e.current.toggle(), Fe > 0 && setTimeout(() => w(Fe - 1), 1500));
5551
5572
  }, Ne = () => {
5552
- $e.current.muted || $e.current.toggleMute(), St(!0), w(3);
5573
+ $e.current.muted || $e.current.toggleMute(), At(!0), w(3);
5553
5574
  }, Pe = $e.current;
5554
5575
  if (!Pe.autoplay || t.startMuted) {
5555
5576
  Ne();
5556
5577
  return;
5557
5578
  }
5558
- Pe.autoplay().then((We) => {
5559
- We === !1 ? St(!0) : We == null && !tt.current && Ne();
5579
+ Pe.autoplay().then((Fe) => {
5580
+ Fe === !1 ? At(!0) : Fe == null && !tt.current && Ne();
5560
5581
  });
5561
- }, [u, Tt, te, Ye]);
5562
- const wt = k(!1), cn = () => {
5563
- ln && (St(!1), wt.current = !0, setTimeout(() => {
5564
- wt.current = !1;
5582
+ }, [u, wt, te, Ye]);
5583
+ const Lt = j(!1), un = () => {
5584
+ cn && (At(!1), Lt.current = !0, setTimeout(() => {
5585
+ Lt.current = !1;
5565
5586
  }, 500), $e.current.muted && $e.current.toggleMute());
5566
- }, un = () => {
5567
- if (wt.current) {
5568
- wt.current = !1;
5587
+ }, dn = () => {
5588
+ if (Lt.current) {
5589
+ Lt.current = !1;
5569
5590
  return;
5570
5591
  }
5571
- St(!1), $e.current.toggleMute();
5572
- }, qt = () => {
5573
- if (wt.current) {
5574
- wt.current = !1;
5592
+ At(!1), $e.current.toggleMute();
5593
+ }, Kt = () => {
5594
+ if (Lt.current) {
5595
+ Lt.current = !1;
5575
5596
  return;
5576
5597
  }
5577
5598
  tt.current = !0, $e.current.toggle();
5578
- }, P = (w) => /* @__PURE__ */ i(ec, { player: x, size: w }), xe = !!ie && !fe, [He, Lt] = j(!1);
5579
- _(() => {
5599
+ }, P = (w) => /* @__PURE__ */ i(ec, { player: x, size: w }), xe = !!ie && !fe, [He, vt] = k(!1);
5600
+ E(() => {
5580
5601
  if (!ze) {
5581
- Lt(!1);
5602
+ vt(!1);
5582
5603
  return;
5583
5604
  }
5584
- const w = setTimeout(() => Lt(!0), 180);
5605
+ const w = setTimeout(() => vt(!0), 180);
5585
5606
  return () => clearTimeout(w);
5586
5607
  }, [ze]);
5587
- const At = He ? Se : J, Gi = Tl(ie, J, ge, ke), Rn = El(_l(L), ie, se.readLang), Zi = Mt || Ot, qi = (((Ys = (_s = n == null ? void 0 : n.job) == null ? void 0 : _s.crop) == null ? void 0 : Ys.startS) ?? 0) + kn(x, ge), Pn = B === "listen", Et = Pn && (!!Qe || u), Ki = (w) => {
5588
- zt.pause(), se.player.pause(), Y(w), w === "read" && te && (en(!1), K(!1));
5589
- }, Ue = se.barChip, Qt = xi(Ue.label), Rr = /* @__PURE__ */ i(gr, { value: B, onChange: Ki, bordered: !1, options: Oc(Qt, !!Qe) }), $t = [...xe ? [{ key: "summary", label: "Summary" }] : [], ...Zi ? [{ key: "export", label: "Export" }] : []], Pr = (w) => /* @__PURE__ */ g(be, { children: [
5590
- w === "summary" && xe && /* @__PURE__ */ i(Yl, { s: Rn }),
5591
- w === "export" && /* @__PURE__ */ i(Al, { audio: Mt ? { name: Je, meta: lt && se.canSpeak || me ? `MP3${R ? ` · ${kt(R)}` : ""}` : "ORIGINAL AUDIO", onClick: Gt } : null, formats: Ot, onExport: at })
5592
- ] }), Ji = (w) => /* @__PURE__ */ i(pl, { index: x.idx, total: Math.max(1, ge.length), frac: x.dur > 0 ? Math.min(1, x.t / x.dur) : 0, glideMs: x.wordSync ? 0 : 220, atLabel: kt(x.t), durLabel: kt(x.dur), stepLabel: w ? `${x.idx + 1} / ${ge.length}` : "", onSeek: se.relang ? cc : x.seekRow, onSeekFrac: se.relang ? void 0 : x.seekFrac, onScrubStart: x.hold, onScrubEnd: x.release }), Qr = {
5608
+ const Et = He ? Ae : J, Gi = Tl(ie, J, ge, ke), Pn = El(_l(L), ie, se.readLang), Zi = gt || Ct, qi = (((Ys = (_s = n == null ? void 0 : n.job) == null ? void 0 : _s.crop) == null ? void 0 : Ys.startS) ?? 0) + jn(x, ge), kt = B === "listen", _t = kt && (!!Qe || u), Ki = (w) => {
5609
+ ht.pause(), se.player.pause(), Y(w), w === "read" && te && (tn(!1), K(!1));
5610
+ };
5611
+ E(() => {
5612
+ kt || (ht.playing && ht.pause(), se.player.playing && se.player.pause());
5613
+ }, [kt, ht.playing, se.player.playing]);
5614
+ const Ue = se.barChip, $t = xi(Ue.label), Rr = /* @__PURE__ */ i(gr, { value: B, onChange: Ki, bordered: !1, options: Oc($t, !!Qe) }), Bt = [...xe ? [{ key: "summary", label: "Summary" }] : [], ...Zi ? [{ key: "export", label: "Export" }] : []], Pr = (w) => /* @__PURE__ */ g(be, { children: [
5615
+ w === "summary" && xe && /* @__PURE__ */ i(Yl, { s: Pn }),
5616
+ w === "export" && /* @__PURE__ */ i(Al, { audio: gt ? { name: Je, meta: ct && se.canSpeak || me ? `MP3${R ? ` · ${zt(R)}` : ""}` : "ORIGINAL AUDIO", onClick: Zt } : null, formats: Ct, onExport: at })
5617
+ ] }), Ji = (w) => /* @__PURE__ */ i(pl, { index: x.idx, total: Math.max(1, ge.length), frac: x.dur > 0 ? Math.min(1, x.t / x.dur) : 0, glideMs: x.wordSync ? 0 : 220, atLabel: zt(x.t), durLabel: zt(x.dur), stepLabel: w ? `${x.idx + 1} / ${ge.length}` : "", onSeek: se.relang ? cc : x.seekRow, onSeekFrac: se.relang ? void 0 : x.seekFrac, onScrubStart: x.hold, onScrubEnd: x.release }), Qr = {
5593
5618
  live: !1,
5594
5619
  atEdge: !1,
5595
5620
  edgeFrac: null,
5596
5621
  readyFrac: it != null && x.dur > 0 ? Math.min(1, it / x.dur) : null,
5597
5622
  pct: x.dur > 0 ? Math.min(100, Math.round(x.t / x.dur * 1e3) / 10) : 0,
5598
- atLabel: kt(x.t),
5599
- labelAt: (w) => kt(w * x.dur),
5600
- endLabel: kt(x.dur),
5623
+ atLabel: zt(x.t),
5624
+ labelAt: (w) => zt(w * x.dur),
5625
+ endLabel: zt(x.dur),
5601
5626
  onSeek: (w) => {
5602
5627
  var Ne;
5603
5628
  se.relang || (Ne = x.seekFrac) == null || Ne.call(x, w);
5604
5629
  }
5605
- }, [Xi, ea] = bc(se.on && !!x.preparing && x.playing, 1500), Qn = se.on && ((Us = x.error) == null ? void 0 : Us.code) === "voice_not_started", $n = se.canSpeak && !se.error && !Qn, dn = J ? ((Rs = ot == null ? void 0 : ot.languages.find((w) => w.code === J)) == null ? void 0 : Rs.name) ?? Ue.label : "", nt = te ? Cc({ lang: J, langName: dn, translating: ze && !!J, translateFailed: Fe, voiceFailed: Qn, relang: se.relang, starting: se.on ? x.starting : null, slowLine: Xi, lineSince: ea }) : null, Bn = !!Qe && !!nt && (nt.kind === "translating" || nt.kind === "voice" && se.relang), $r = !Bn || !nt ? null : nt.kind === "translating" ? `Translating into ${dn || "the new language"}…` : `Preparing the ${dn || "translated"} voice…`, Kt = !Bn && ((nt == null ? void 0 : nt.kind) === "voice" || (nt == null ? void 0 : nt.kind) === "starting"), Br = br({ ...se.langList, keepOpen: !0, open: T === "lang", onClose: () => O("main") }), Vr = uo($, se.on), ta = u && Vr.bed && Mt && ie && (!fe || st) ? $s(e.origin, ie, e.cred) : null, Hr = To(ta, { t: kn(x, ge), playing: x.playing && !Kt && !(x.timed && x.preparing), muted: x.muted }), na = u && Vr.speech && Mt && ie && (!fe || st) ? $s(e.origin, ie, e.cred, "speech") : null, Vn = vi(na, { t: kn(x, ge), playing: !se.on && x.playing, muted: x.muted }), Hn = !se.on && Vn.on;
5606
- _(() => {
5630
+ }, [Xi, ea] = bc(se.on && !!x.preparing && x.playing, 1500), Qn = se.on && ((Us = x.error) == null ? void 0 : Us.code) === "voice_not_started", $n = se.canSpeak && !se.error && !Qn, hn = J ? ((Rs = lt == null ? void 0 : lt.languages.find((w) => w.code === J)) == null ? void 0 : Rs.name) ?? Ue.label : "", nt = te ? Cc({ lang: J, langName: hn, translating: ze && !!J, translateFailed: Ge, voiceFailed: Qn, relang: se.relang, starting: se.on ? x.starting : null, slowLine: Xi, lineSince: ea }) : null, Bn = !!Qe && !!nt && (nt.kind === "translating" || nt.kind === "voice" && se.relang), $r = !Bn || !nt ? null : nt.kind === "translating" ? `Translating into ${hn || "the new language"}…` : `Preparing the ${hn || "translated"} voice…`, Jt = !Bn && ((nt == null ? void 0 : nt.kind) === "voice" || (nt == null ? void 0 : nt.kind) === "starting"), Br = br({ ...se.langList, keepOpen: !0, open: T === "lang", onClose: () => O("main") }), Vr = uo($, se.on), ta = u && Vr.bed && gt && ie && (!fe || st) ? $s(e.origin, ie, e.cred) : null, Hr = To(ta, { t: jn(x, ge), playing: x.playing && !Jt && !(x.timed && x.preparing), muted: x.muted }), na = u && Vr.speech && gt && ie && (!fe || st) ? $s(e.origin, ie, e.cred, "speech") : null, Vn = vi(na, { t: jn(x, ge), playing: !se.on && x.playing, muted: x.muted }), Hn = !se.on && Vn.on;
5631
+ E(() => {
5607
5632
  var w;
5608
- xt.setVideoSound(!(Ke && (se.on || Hn))), (w = dt.silence) == null || w.call(dt, !Ke && Hn);
5633
+ Dt.setVideoSound(!(Ke && (se.on || Hn))), (w = dt.silence) == null || w.call(dt, !Ke && Hn);
5609
5634
  }, [Ke, se.on, Hn, st]);
5610
- const Wn = Mt ? se.on ? Hr : Vn.state : "unavailable", Fn = we && $n && !!J, ra = Fn ? [`Translated${se.hasClone ? Re ? ", cloned voices" : ", synthetic voices" : ""}`, !$ && Mt && Hr !== "unavailable" ? "with background sound" : null].filter(Boolean).join(" ") : $ && Wn !== "unavailable" ? "Original speech, background removed" : "Original sound", sa = () => {
5635
+ const Wn = gt ? se.on ? Hr : Vn.state : "unavailable", Fn = we && $n && !!J, ra = Fn ? [`Translated${se.hasClone ? Re ? ", cloned voices" : ", synthetic voices" : ""}`, !$ && gt && Hr !== "unavailable" ? "with background sound" : null].filter(Boolean).join(" ") : $ && Wn !== "unavailable" ? "Original speech, background removed" : "Original sound", sa = () => {
5611
5636
  if ((nt == null ? void 0 : nt.kind) === "translateFailed") {
5612
5637
  Z(J);
5613
5638
  return;
@@ -5615,28 +5640,28 @@ function su(t) {
5615
5640
  tt.current = !0, x.toggle();
5616
5641
  }, ia = () => {
5617
5642
  const w = x.idx;
5618
- x.pause(), G(null), tt.current = !0, zt.playRow(w);
5619
- }, Wr = { prevOn: x.idx > 0, nextOn: x.idx < ge.length - 1, onPrev: x.prev, onNext: x.next, playing: x.playing, playable: Tt, playTitle: se.playTitle ?? (x.playing ? "Pause" : "Play"), onPlay: () => {
5643
+ x.pause(), G(null), tt.current = !0, ht.playRow(w);
5644
+ }, Wr = { prevOn: x.idx > 0, nextOn: x.idx < ge.length - 1, onPrev: x.prev, onNext: x.next, playing: x.playing, playable: wt, playTitle: se.playTitle ?? (x.playing ? "Pause" : "Play"), onPlay: () => {
5620
5645
  tt.current = !0, x.toggle();
5621
- }, busy: se.relang && !Qe || Kt };
5622
- Co(Tt ? { playing: x.playing, toggle: () => {
5646
+ }, busy: se.relang && !Qe || Jt };
5647
+ Co(wt && kt ? { playing: x.playing, toggle: () => {
5623
5648
  tt.current = !0, x.toggle();
5624
5649
  }, next: x.next, prev: x.prev } : null, Oe);
5625
- const Gn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, Zn = (w, Ne) => !Ue.can || !b.language ? null : u ? /* @__PURE__ */ g("button", { type: "button", className: "gfull__btn", title: Rt ? `${Ue.label ?? Ue.code}: still being prepared` : Ue.label ?? Ue.code, "aria-label": `Language: ${Ue.label ?? Ue.code}`, "aria-busy": Rt || void 0, onClick: () => {
5650
+ const Gn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, Zn = (w, Ne) => !Ue.can || !b.language ? null : u ? /* @__PURE__ */ g("button", { type: "button", className: "gfull__btn", title: Pt ? `${Ue.label ?? Ue.code}: still being prepared` : Ue.label ?? Ue.code, "aria-label": `Language: ${Ue.label ?? Ue.code}`, "aria-busy": Pt || void 0, onClick: () => {
5626
5651
  z(!1), Ue.onClick();
5627
5652
  }, style: { position: "relative" }, children: [
5628
5653
  /* @__PURE__ */ i("span", { style: { fontSize: Ne === "sm" ? 17 : 21, lineHeight: 1 }, children: Ue.flag }),
5629
- Rt && /* @__PURE__ */ i("span", { style: { position: "absolute", right: 2, bottom: 2, display: "flex", borderRadius: 999, background: "rgba(5,6,21,.7)", padding: 1 }, children: /* @__PURE__ */ i(ct, { size: 11, color: "#eef0f8", track: "rgba(255,255,255,.25)" }) })
5630
- ] }) : /* @__PURE__ */ i(bn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, size: Ne, onClick: Ue.onClick, style: w }), Fr = { on: !1, title: "Voices", onClick: () => {
5631
- } }, [aa, oa] = j(!1);
5632
- _(() => {
5654
+ Pt && /* @__PURE__ */ i("span", { style: { position: "absolute", right: 2, bottom: 2, display: "flex", borderRadius: 999, background: "rgba(5,6,21,.7)", padding: 1 }, children: /* @__PURE__ */ i(ut, { size: 11, color: "#eef0f8", track: "rgba(255,255,255,.25)" }) })
5655
+ ] }) : /* @__PURE__ */ i(xn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, size: Ne, onClick: Ue.onClick, style: w }), Fr = { on: !1, title: "Voices", onClick: () => {
5656
+ } }, [aa, oa] = k(!1);
5657
+ E(() => {
5633
5658
  x.t > 0.3 && oa(!0);
5634
5659
  }, [x.t]);
5635
- const la = !Qe && u && ie && (n != null && n.allowDownload) && !fe ? /* @__PURE__ */ i(no, { src: Ln(e.origin, ie, "video", e.cred), t: kn(x, ge), playing: x.playing && !Kt, seekN: x.seekN, onToggle: x.has ? qt : void 0 }, ie) : null, Gr = Qe ? /* @__PURE__ */ g(be, { children: [
5636
- /* @__PURE__ */ i(Kl, { ytId: Qe, title: Je, t: qi, playing: x.playing && !Kt, waiting: se.on && !!x.timed && !!x.preparing, seekN: x.seekN, onTime: (w) => {
5637
- var Ne, Pe, We;
5638
- return (We = x.videoAt) == null ? void 0 : We.call(x, w - (((Pe = (Ne = n == null ? void 0 : n.job) == null ? void 0 : Ne.crop) == null ? void 0 : Pe.startS) ?? 0));
5639
- }, onToggle: x.has ? qt : void 0, onAd: Un, lead: Ke ? xt.lead : void 0 }),
5660
+ const la = !Qe && u && ie && (n != null && n.allowDownload) && !fe ? /* @__PURE__ */ i(no, { src: vn(e.origin, ie, "video", e.cred), t: jn(x, ge), playing: x.playing && !Jt, seekN: x.seekN, onToggle: x.has ? Kt : void 0 }, ie) : null, Gr = Qe ? /* @__PURE__ */ g(be, { children: [
5661
+ /* @__PURE__ */ i(Kl, { ytId: Qe, title: Je, t: qi, playing: x.playing && !Jt, waiting: se.on && !!x.timed && !!x.preparing, seekN: x.seekN, onTime: (w) => {
5662
+ var Ne, Pe, Fe;
5663
+ return (Fe = x.videoAt) == null ? void 0 : Fe.call(x, w - (((Pe = (Ne = n == null ? void 0 : n.job) == null ? void 0 : Ne.crop) == null ? void 0 : Pe.startS) ?? 0));
5664
+ }, onToggle: x.has ? Kt : void 0, onAd: Rn, lead: Ke ? Dt.lead : void 0 }),
5640
5665
  /* @__PURE__ */ g("div", { className: "vsp-poster", "aria-hidden": "true", style: { opacity: aa ? 0 : 1 }, children: [
5641
5666
  /* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Qe}/hqdefault.jpg)` } }),
5642
5667
  /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(Ir, { size: 44 }) })
@@ -5644,26 +5669,26 @@ function su(t) {
5644
5669
  ] }) : u ? /* @__PURE__ */ g(be, { children: [
5645
5670
  /* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
5646
5671
  la
5647
- ] }) : null, Zr = Et && Qe && !te ? /* @__PURE__ */ i(Ul, { ytId: Qe, title: Je, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: Gr, children: /* @__PURE__ */ i(kc, { pos: Qr, transport: Wr, chip: Zn({ ...Gn, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: Fr, onFull: () => {
5648
- en(!0), K(!0);
5672
+ ] }) : null, Zr = _t && Qe && !te ? /* @__PURE__ */ i(Ul, { ytId: Qe, title: Je, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: Gr, children: /* @__PURE__ */ i(kc, { pos: Qr, transport: Wr, chip: Zn({ ...Gn, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: Fr, onFull: () => {
5673
+ tn(!0), K(!0);
5649
5674
  }, copied: null }) }) : null, Xe = x.wordSync ? dl(ge, x.idx, x.t) ? ge[x.idx] : void 0 : ge[x.idx];
5650
5675
  for (const w of ge) for (const [Ne, Pe] of Object.entries(w.translations)) Pe && S.current.set(`${w.sentenceId ?? w.start}|${Ne}`, Pe);
5651
- const qr = (w, Ne) => w.translations[Ne] || S.current.get(`${w.sentenceId ?? w.start}|${Ne}`) || null, qn = (w, Ne) => !w || !Ne || w.language === Ne || !!qr(w, Ne), vt = qn(Xe, J) ? J : qn(Xe, F.current) ? F.current : J;
5652
- Xe && qn(Xe, vt) && (F.current = vt);
5653
- const Kr = Xe && vt && Xe.language !== vt ? qr(Xe, vt) : null, ca = Xe && Kr && vt && !Xe.translations[vt] ? Object.assign([...ge], { [x.idx]: { ...Xe, translations: { ...Xe.translations, [vt]: Kr } } }) : ge, hn = Xe ? Ui(ca, x.idx, vt) : [], Mn = Te ? Te === "on" : !u || se.on || !At || At === q, Jr = Mn ? ni(x, x.idx, hn) : null, Xr = hn.map((w, Ne) => ({ t: w.text, sp: Ne < hn.length - 1 ? " " : "", dim: Jr != null && Ne > Jr })), gn = pe ? pe === "on" : u ? !1 : Bo(ce, ge, L == null ? void 0 : L.settings), es = { lang: J, subtitles: Ae, speakerLabels: gn, wordHighlight: Mn, translateAudio: we, voices: Re ? "cloned" : "synthetic", removeBackground: $ }, ua = JSON.stringify(es), fn = k(t.onSettingsChange);
5654
- fn.current = t.onSettingsChange, _(() => {
5676
+ const qr = (w, Ne) => w.translations[Ne] || S.current.get(`${w.sentenceId ?? w.start}|${Ne}`) || null, qn = (w, Ne) => !w || !Ne || w.language === Ne || !!qr(w, Ne), jt = qn(Xe, J) ? J : qn(Xe, F.current) ? F.current : J;
5677
+ Xe && qn(Xe, jt) && (F.current = jt);
5678
+ const Kr = Xe && jt && Xe.language !== jt ? qr(Xe, jt) : null, ca = Xe && Kr && jt && !Xe.translations[jt] ? Object.assign([...ge], { [x.idx]: { ...Xe, translations: { ...Xe.translations, [jt]: Kr } } }) : ge, Mn = Xe ? Ui(ca, x.idx, jt) : [], gn = Te ? Te === "on" : !u || se.on || !Et || Et === q, Jr = gn ? ni(x, x.idx, Mn) : null, Xr = Mn.map((w, Ne) => ({ t: w.text, sp: Ne < Mn.length - 1 ? " " : "", dim: Jr != null && Ne > Jr })), fn = pe ? pe === "on" : u ? !1 : Bo(ce, ge, L == null ? void 0 : L.settings), es = { lang: J, subtitles: De, speakerLabels: fn, wordHighlight: gn, translateAudio: we, voices: Re ? "cloned" : "synthetic", removeBackground: $ }, ua = JSON.stringify(es), pn = j(t.onSettingsChange);
5679
+ pn.current = t.onSettingsChange, E(() => {
5655
5680
  var w;
5656
- (w = fn.current) == null || w.call(fn, es);
5681
+ (w = pn.current) == null || w.call(pn, es);
5657
5682
  }, [ua]);
5658
- const pn = Xe && Xe.speaker >= 0 && gn ? Sr(ce, Xe.speaker) : null, [da, ts] = j(!1), [Kn, ns] = j(null), [ha, rs] = j(null), Jn = k(void 0);
5659
- _(() => () => window.clearTimeout(Jn.current), []);
5660
- const Xn = k(void 0);
5661
- _(() => () => window.clearTimeout(Xn.current), []);
5683
+ const Nn = Xe && Xe.speaker >= 0 && fn ? Sr(ce, Xe.speaker) : null, [da, ts] = k(!1), [Kn, ns] = k(null), [ha, rs] = k(null), Jn = j(void 0);
5684
+ E(() => () => window.clearTimeout(Jn.current), []);
5685
+ const Xn = j(void 0);
5686
+ E(() => () => window.clearTimeout(Xn.current), []);
5662
5687
  const ss = (w) => {
5663
5688
  if (t.shareUrl) return t.shareUrl(w);
5664
5689
  const Ne = new URL(window.location.href);
5665
5690
  return w != null && w > 0 ? Ne.searchParams.set("t", String(w)) : Ne.searchParams.delete("t"), Ne.href;
5666
- }, Nn = k(l.startAt), er = (w) => {
5691
+ }, mn = j(l.startAt), er = (w) => {
5667
5692
  if (x.seekFrac && x.dur > 0) {
5668
5693
  x.seekFrac(Math.min(1, w / x.dur));
5669
5694
  return;
@@ -5671,44 +5696,44 @@ function su(t) {
5671
5696
  let Ne = 0;
5672
5697
  for (let Pe = 0; Pe < ge.length; Pe++) ge[Pe].start <= w && (Ne = Pe);
5673
5698
  x.seekRow(Ne);
5674
- }, is = k(!1);
5675
- _(() => {
5676
- const w = Nn.current;
5699
+ }, is = j(!1);
5700
+ E(() => {
5701
+ const w = mn.current;
5677
5702
  w == null || is.current || !x.has || ge.length === 0 || (is.current = !0, er(w));
5678
- }, [x.has, ge.length]), _(() => {
5679
- const w = Nn.current;
5680
- w == null || !x.playing || (Nn.current = null, Math.abs(x.t - w) > 2 && er(w));
5703
+ }, [x.has, ge.length]), E(() => {
5704
+ const w = mn.current;
5705
+ w == null || !x.playing || (mn.current = null, Math.abs(x.t - w) > 2 && er(w));
5681
5706
  }, [x.playing]);
5682
5707
  const Ma = (w) => {
5683
- tt.current = !0, Nn.current = null, er(Math.max(0, w));
5708
+ tt.current = !0, mn.current = null, er(Math.max(0, w));
5684
5709
  };
5685
5710
  t.handle.current = {
5686
5711
  seek: (w) => Ma(w),
5687
5712
  play: () => {
5688
- tt.current = !0, $e.current.playing || $e.current.toggle();
5713
+ tt.current = !0, kt && !$e.current.playing && $e.current.toggle();
5689
5714
  },
5690
5715
  pause: () => {
5691
5716
  tt.current = !0, $e.current.pause();
5692
5717
  },
5693
5718
  toggle: () => {
5694
- tt.current = !0, $e.current.toggle();
5719
+ tt.current = !0, (kt || $e.current.playing) && $e.current.toggle();
5695
5720
  },
5696
5721
  toggleMute: () => {
5697
- St(!1), $e.current.toggleMute();
5722
+ At(!1), $e.current.toggleMute();
5698
5723
  }
5699
- }, _(() => () => {
5724
+ }, E(() => () => {
5700
5725
  t.handle.current = null;
5701
5726
  }, []);
5702
- const as = k(t.onPlayback);
5727
+ const as = j(t.onPlayback);
5703
5728
  as.current = t.onPlayback;
5704
- const os = k(J);
5705
- os.current = J, _(() => {
5729
+ const os = j(J);
5730
+ os.current = J, E(() => {
5706
5731
  let w = "";
5707
5732
  const Ne = () => {
5708
- const We = as.current;
5709
- if (!We) return;
5710
- const pt = $e.current, gt = { t: pt.t, dur: pt.dur, playing: pt.playing, idx: pt.idx, seekN: pt.seekN, lang: os.current, muted: pt.muted }, wn = `${gt.t.toFixed(2)}|${gt.dur}|${gt.playing}|${gt.idx}|${gt.seekN}|${gt.lang}|${gt.muted}`;
5711
- wn !== w && (w = wn, We(gt));
5733
+ const Fe = as.current;
5734
+ if (!Fe) return;
5735
+ const Nt = $e.current, ft = { t: Nt.t, dur: Nt.dur, playing: Nt.playing, idx: Nt.idx, seekN: Nt.seekN, lang: os.current, muted: Nt.muted }, Ln = `${ft.t.toFixed(2)}|${ft.dur}|${ft.playing}|${ft.idx}|${ft.seekN}|${ft.lang}|${ft.muted}`;
5736
+ Ln !== w && (w = Ln, Fe(ft));
5712
5737
  };
5713
5738
  Ne();
5714
5739
  const Pe = window.setInterval(Ne, nu);
@@ -5717,19 +5742,19 @@ function su(t) {
5717
5742
  const ga = () => t.onShare ? t.onShare() : _r(ss(null), Je, () => {
5718
5743
  window.clearTimeout(Xn.current), ts(!0), Xn.current = window.setTimeout(() => ts(!1), 2200);
5719
5744
  }), ls = (w, Ne, Pe) => {
5720
- const We = Lr.find((wn) => wn.key === w), pt = Kn === w, gt = ha === w;
5721
- return /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", "aria-busy": pt || void 0, style: Kn && !pt ? { opacity: 0.45, pointerEvents: "none" } : void 0, onClick: () => {
5745
+ const Fe = Lr.find((Ln) => Ln.key === w), Nt = Kn === w, ft = ha === w;
5746
+ return /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", "aria-busy": Nt || void 0, style: Kn && !Nt ? { opacity: 0.45, pointerEvents: "none" } : void 0, onClick: () => {
5722
5747
  Kn || (ns(w), Promise.resolve().then(() => at(w)).then(() => {
5723
5748
  rs(w), window.clearTimeout(Jn.current), Jn.current = window.setTimeout(() => rs(null), 1600);
5724
5749
  }).catch(() => {
5725
5750
  }).finally(() => ns(null)));
5726
5751
  }, children: [
5727
- pt ? /* @__PURE__ */ i(ct, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: We.icon, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
5752
+ Nt ? /* @__PURE__ */ i(ut, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: Fe.icon, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
5728
5753
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5729
5754
  /* @__PURE__ */ i("div", { className: "srow__t", children: Ne }),
5730
5755
  /* @__PURE__ */ i("div", { className: "srow__s", children: Pe })
5731
5756
  ] }),
5732
- /* @__PURE__ */ i(oe, { d: gt ? ee.check : ee.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: gt ? "var(--brand)" : "var(--ink-62)" } })
5757
+ /* @__PURE__ */ i(oe, { d: ft ? ee.check : ee.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: ft ? "var(--brand)" : "var(--ink-62)" } })
5733
5758
  ] });
5734
5759
  }, fa = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
5735
5760
  " ",
@@ -5737,80 +5762,80 @@ function su(t) {
5737
5762
  /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 18, sw: 1.8 }),
5738
5763
  "Back"
5739
5764
  ] })
5740
- ] }), mn = /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), pa = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[T], yn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, tr = u ? /* @__PURE__ */ i(Ht, { open: X, onClose: () => z(!1), title: pa, titleNode: T === "main" ? void 0 : fa, doneLabel: Qt.done, kind: T === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: T === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5765
+ ] }), yn = /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), pa = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[T], Tn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, tr = u ? /* @__PURE__ */ i(Wt, { open: X, onClose: () => z(!1), title: pa, titleNode: T === "main" ? void 0 : fa, doneLabel: $t.done, kind: T === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: T === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5741
5766
  /* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: Br.search }),
5742
5767
  Br.list
5743
- ] }) : T === "subs" ? /* @__PURE__ */ g("div", { style: yn, children: [
5768
+ ] }) : T === "subs" ? /* @__PURE__ */ g("div", { style: Tn, children: [
5744
5769
  /* @__PURE__ */ g("div", { className: "srow", children: [
5745
5770
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5746
5771
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Show subtitles" }),
5747
5772
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Captions over the video" })
5748
5773
  ] }),
5749
- /* @__PURE__ */ i(mt, { checked: Ae, onChange: Le, label: "Show subtitles" })
5774
+ /* @__PURE__ */ i(yt, { checked: De, onChange: Le, label: "Show subtitles" })
5750
5775
  ] }),
5751
5776
  /* @__PURE__ */ g("div", { className: "srow", children: [
5752
5777
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5753
5778
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Show speaker labels" }),
5754
5779
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Who is speaking, before each line" })
5755
5780
  ] }),
5756
- /* @__PURE__ */ i(mt, { checked: gn, onChange: (w) => le(w ? "on" : "off"), label: "Show speaker labels" })
5781
+ /* @__PURE__ */ i(yt, { checked: fn, onChange: (w) => le(w ? "on" : "off"), label: "Show speaker labels" })
5757
5782
  ] }),
5758
5783
  /* @__PURE__ */ g("div", { className: "srow", children: [
5759
5784
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5760
5785
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Highlight words" }),
5761
5786
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Follow each word as it is spoken" })
5762
5787
  ] }),
5763
- /* @__PURE__ */ i(mt, { checked: Mn, onChange: (w) => je(w ? "on" : "off"), label: "Highlight words" })
5788
+ /* @__PURE__ */ i(yt, { checked: gn, onChange: (w) => je(w ? "on" : "off"), label: "Highlight words" })
5764
5789
  ] })
5765
- ] }) : T === "audio" ? /* @__PURE__ */ g("div", { style: yn, children: [
5790
+ ] }) : T === "audio" ? /* @__PURE__ */ g("div", { style: Tn, children: [
5766
5791
  /* @__PURE__ */ g("div", { className: "srow", children: [
5767
5792
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5768
5793
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Translate audio" }),
5769
5794
  /* @__PURE__ */ i("div", { className: "srow__s", children: J ? $n ? "Hear the translation read aloud instead of the original speech" : se.canSpeak ? "Not available right now" : "Not available in this language" : "Pick a language to hear the translation read aloud" })
5770
5795
  ] }),
5771
- /* @__PURE__ */ i(mt, { checked: Fn, onChange: Ee, label: "Translate audio", disabled: !$n || !J })
5796
+ /* @__PURE__ */ i(yt, { checked: Fn, onChange: Ee, label: "Translate audio", disabled: !$n || !J })
5772
5797
  ] }),
5773
5798
  Fn && se.hasClone && /* @__PURE__ */ g("div", { className: "srow", children: [
5774
5799
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5775
5800
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Voices" }),
5776
5801
  /* @__PURE__ */ i("div", { className: "srow__s", children: Re ? "Each speaker in their own cloned voice" : "Synthetic voices matched to each speaker" })
5777
5802
  ] }),
5778
- /* @__PURE__ */ i(gr, { value: Re ? "clone" : "stock", onChange: (w) => De(w === "clone"), size: "sm", options: [{ value: "stock", label: "Synthetic" }, { value: "clone", label: "Cloned" }] })
5803
+ /* @__PURE__ */ i(gr, { value: Re ? "clone" : "stock", onChange: (w) => Se(w === "clone"), size: "sm", options: [{ value: "stock", label: "Synthetic" }, { value: "clone", label: "Cloned" }] })
5779
5804
  ] }),
5780
5805
  /* @__PURE__ */ g("div", { className: "srow", children: [
5781
5806
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5782
- /* @__PURE__ */ i("div", { className: "srow__t", children: xn }),
5807
+ /* @__PURE__ */ i("div", { className: "srow__t", children: Dn }),
5783
5808
  /* @__PURE__ */ i("div", { className: "srow__s", children: co($, Wn, "video", se.on ? 0 : Vn.untilS) })
5784
5809
  ] }),
5785
- /* @__PURE__ */ i(mt, { checked: $ && Mt, onChange: H, label: xn, disabled: !Mt || Wn === "unavailable" && !$ })
5810
+ /* @__PURE__ */ i(yt, { checked: $ && gt, onChange: H, label: Dn, disabled: !gt || Wn === "unavailable" && !$ })
5786
5811
  ] })
5787
- ] }) : T === "export" ? /* @__PURE__ */ g("div", { style: yn, children: [
5812
+ ] }) : T === "export" ? /* @__PURE__ */ g("div", { style: Tn, children: [
5788
5813
  ls("srt", "Subtitles", "SRT / VTT caption cues, ready for a video editor or a player"),
5789
5814
  ls("pdf", "PDF", "Formatted transcript in paragraphs, with timestamps and speaker labels")
5790
- ] }) : /* @__PURE__ */ i("div", { style: yn, children: [
5815
+ ] }) : /* @__PURE__ */ i("div", { style: Tn, children: [
5791
5816
  Ue.can && b.language && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => O("lang"), children: [
5792
5817
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5793
5818
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Language" }),
5794
5819
  /* @__PURE__ */ i("div", { className: "srow__s", children: J ? `Translated to ${Ue.label ?? J.toUpperCase()}` : "Original language" })
5795
5820
  ] }),
5796
5821
  /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ue.flag }),
5797
- mn
5822
+ yn
5798
5823
  ] }, "lang"),
5799
5824
  b.subtitles && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => O("subs"), children: [
5800
5825
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5801
5826
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Subtitles" }),
5802
- /* @__PURE__ */ i("div", { className: "srow__s", children: Ae ? "On · speaker labels and word highlighting" : "Off" })
5827
+ /* @__PURE__ */ i("div", { className: "srow__s", children: De ? "On · speaker labels and word highlighting" : "Off" })
5803
5828
  ] }),
5804
- mn
5829
+ yn
5805
5830
  ] }, "subs"),
5806
5831
  b.audio && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => O("audio"), children: [
5807
5832
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5808
5833
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Audio" }),
5809
5834
  /* @__PURE__ */ i("div", { className: "srow__s", children: ra })
5810
5835
  ] }),
5811
- mn
5836
+ yn
5812
5837
  ] }, "audio"),
5813
- b.export && Ot && !!ie && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => O("export"), children: [
5838
+ b.export && Ct && !!ie && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => O("export"), children: [
5814
5839
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5815
5840
  /* @__PURE__ */ g("div", { className: "srow__t", children: [
5816
5841
  "Export",
@@ -5818,16 +5843,16 @@ function su(t) {
5818
5843
  ] }),
5819
5844
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Subtitles (SRT / VTT) or a PDF of the transcript" })
5820
5845
  ] }),
5821
- mn
5846
+ yn
5822
5847
  ] }, "export")
5823
- ].filter(Boolean).flatMap((w, Ne) => Ne ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${Ne}`), w] : [w]) }) }) }) : /* @__PURE__ */ i(Ht, { open: X, onClose: () => z(!1), title: Qt.settings, doneLabel: Qt.done, drawer: s, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5848
+ ].filter(Boolean).flatMap((w, Ne) => Ne ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${Ne}`), w] : [w]) }) }) }) : /* @__PURE__ */ i(Wt, { open: X, onClose: () => z(!1), title: $t.settings, doneLabel: $t.done, drawer: s, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5824
5849
  Ue.can && /* @__PURE__ */ g(be, { children: [
5825
5850
  /* @__PURE__ */ g("div", { className: "srow srow--tap", onClick: () => {
5826
5851
  z(!1), Ue.onClick();
5827
5852
  }, children: [
5828
5853
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5829
- /* @__PURE__ */ i("div", { className: "srow__t", children: Qt.langLabel }),
5830
- /* @__PURE__ */ i("div", { className: "srow__s", children: Qt.langCount })
5854
+ /* @__PURE__ */ i("div", { className: "srow__t", children: $t.langLabel }),
5855
+ /* @__PURE__ */ i("div", { className: "srow__s", children: $t.langCount })
5831
5856
  ] }),
5832
5857
  /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ue.flag }),
5833
5858
  se.original ? null : /* @__PURE__ */ i("span", { style: { fontSize: 14, fontWeight: 600, color: "var(--ink-96)" }, children: Ue.label }),
@@ -5836,7 +5861,7 @@ function su(t) {
5836
5861
  /* @__PURE__ */ i("div", { className: "sdiv" })
5837
5862
  ] }),
5838
5863
  t.settingsExtra
5839
- ] }) }), bt = te && Et && (!!Qe || u) && /* @__PURE__ */ i(
5864
+ ] }) }), xt = te && _t && (!!Qe || u) && /* @__PURE__ */ i(
5840
5865
  $i,
5841
5866
  {
5842
5867
  page: (t.layout ?? "embed") === "page",
@@ -5844,13 +5869,13 @@ function su(t) {
5844
5869
  title: Je,
5845
5870
  desk: s,
5846
5871
  pos: Qr,
5847
- mute: { muted: x.muted, onToggle: un },
5848
- cc: b.subtitles ? { on: Ae, onToggle: () => Le((w) => !w) } : void 0,
5872
+ mute: { muted: x.muted, onToggle: dn },
5873
+ cc: b.subtitles ? { on: De, onToggle: () => Le((w) => !w) } : void 0,
5849
5874
  noFull: !b.fullscreen,
5850
- ad: Yn,
5851
- wait: nt && !Bn ? /* @__PURE__ */ i(Dc, { state: nt, line: Kt ? Xr.map((w) => w.t + w.sp).join("") : null, onRetry: sa, onOriginal: ia }) : x.edgeWait ? `Transcribing ${Math.round(U)}% — it plays on as more is written` : null,
5875
+ ad: Un,
5876
+ wait: nt && !Bn ? /* @__PURE__ */ i(Dc, { state: nt, line: Jt ? Xr.map((w) => w.t + w.sp).join("") : null, onRetry: sa, onOriginal: ia }) : x.edgeWait ? `Transcribing ${Math.round(U)}% — it plays on as more is written` : null,
5852
5877
  pct: fe ? Math.round(U) : null,
5853
- sub: Ae && Xe ? { who: pn ? Dr(ce, Xe.speaker) : null, color: pn ? pn.fg ?? `var(--lane-${pn.lane})` : "#fff", words: Xr, cursor: ni(x, x.idx, hn) } : null,
5878
+ sub: De && Xe ? { who: Nn ? Dr(ce, Xe.speaker) : null, color: Nn ? Nn.fg ?? `var(--lane-${Nn.lane})` : "#fff", words: Xr, cursor: ni(x, x.idx, Mn) } : null,
5854
5879
  chip: Zn(s ? Gn : { ...Gn, width: 64, padding: "0 6px" }, s ? void 0 : "sm"),
5855
5880
  transport: Wr,
5856
5881
  picker: se.sheets,
@@ -5863,53 +5888,53 @@ function su(t) {
5863
5888
  se.closePicker(), z((w) => !w);
5864
5889
  } : void 0,
5865
5890
  compact: !!t.compact,
5866
- paused: { title: Je, summary: Rn.state === "ready" ? Rn.summary ?? null : null, share: b.share && (t.shareUrl || !t.onShare) ? { url: ss, at: x.t } : null },
5891
+ paused: { title: Je, summary: Pn.state === "ready" ? Pn.summary ?? null : null, share: b.share && (t.shareUrl || !t.onShare) ? { url: ss, at: x.t } : null },
5867
5892
  copied: da ? /* @__PURE__ */ g("div", { className: "gfull__toast", "aria-live": "polite", children: [
5868
5893
  /* @__PURE__ */ i(oe, { d: ee.check, size: 13, sw: 2 }),
5869
5894
  "Link copied"
5870
- ] }) : ln ? /* @__PURE__ */ g("div", { className: "gfull__toast gfull__soundtip", "aria-live": "polite", children: [
5895
+ ] }) : cn ? /* @__PURE__ */ g("div", { className: "gfull__toast gfull__soundtip", "aria-live": "polite", children: [
5871
5896
  /* @__PURE__ */ i(oe, { d: ee.volumeOff, size: 14, sw: 1.8 }),
5872
5897
  "Tap for sound"
5873
5898
  ] }) : $r ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5874
- /* @__PURE__ */ i(ct, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5899
+ /* @__PURE__ */ i(ut, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5875
5900
  $r
5876
- ] }) : se.on && (Ke ? Dt.missing != null : x.silent) ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5877
- /* @__PURE__ */ i(ct, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5878
- `${dn || "Translated"} voice is still being prepared · playing with subtitles`
5901
+ ] }) : se.on && (Ke ? St.missing != null : x.silent) ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5902
+ /* @__PURE__ */ i(ut, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5903
+ `${hn || "Translated"} voice is still being prepared · playing with subtitles`
5879
5904
  ] }) : null,
5880
5905
  onTouch: () => {
5881
- en(!0), cn();
5906
+ tn(!0), un();
5882
5907
  },
5883
5908
  onClose: u ? void 0 : () => {
5884
- en(!1), K(!1);
5909
+ tn(!1), K(!1);
5885
5910
  }
5886
5911
  }
5887
5912
  );
5888
- _(() => {
5889
- !u && te && !Et && (en(!1), K(!1));
5890
- }, [u, te, Et]);
5913
+ E(() => {
5914
+ !u && te && !_t && (tn(!1), K(!1));
5915
+ }, [u, te, _t]);
5891
5916
  const cs = fe && /* @__PURE__ */ g("div", { className: `pubprog${s ? " pubprog--desk" : ""}${p ? " pubprog--find" : ""}`, children: [
5892
5917
  /* @__PURE__ */ g("div", { className: "pubprog__row", children: [
5893
5918
  /* @__PURE__ */ i("span", { className: "l", children: `TRANSCRIBING ${U}%` }),
5894
5919
  !s && /* @__PURE__ */ i("div", { style: { flex: 1 } }),
5895
5920
  s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { flex: 1 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) }),
5896
- /* @__PURE__ */ i("span", { className: "s", children: Zt })
5921
+ /* @__PURE__ */ i("span", { className: "s", children: qt })
5897
5922
  ] }),
5898
5923
  !s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
5899
- ] }), nr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), us = /* @__PURE__ */ i(Mc, { model: ce, rows: ge, player: x, tail: rn, tailFg: sn, running: fe, desk: s, feedRef: It, listener: !0, showLabels: gn, find: v, findOpen: !s && p, lang: At, warm: He, onVisible: Gi, wordHl: Mn }), rr = /* @__PURE__ */ i(fl, { error: d ?? W ?? (Qn && te ? null : x.error) ?? se.error, onClose: () => {
5900
- h(null), ye(), x.clearError(), se.clearError();
5901
- } }), ds = [R ? kt(R) : null, q ? q.toUpperCase() : null, re || "Read-only copy"].filter(Boolean).join(" · "), hs = (w) => /* @__PURE__ */ i("div", { className: "ctrans", children: se.noVoice ? se.noVoiceNote : /* @__PURE__ */ g(be, { children: [
5924
+ ] }), nr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), us = /* @__PURE__ */ i(Mc, { model: ce, rows: ge, player: kt ? x : { ...x, playRow: x.seekRow }, tail: sn, tailFg: an, running: fe, desk: s, feedRef: Ot, listener: !0, showLabels: fn, find: v, findOpen: !s && p, lang: Et, warm: He, onVisible: Gi, wordHl: gn }), rr = /* @__PURE__ */ i(fl, { error: d ?? W ?? (Qn && te ? null : x.error) ?? se.error, onClose: () => {
5925
+ M(null), ye(), x.clearError(), se.clearError();
5926
+ } }), ds = [R ? zt(R) : null, q ? q.toUpperCase() : null, re || "Read-only copy"].filter(Boolean).join(" · "), hs = (w) => /* @__PURE__ */ i("div", { className: "ctrans", children: se.noVoice ? se.noVoiceNote : /* @__PURE__ */ g(be, { children: [
5902
5927
  /* @__PURE__ */ g("div", { className: "ctrans__row", children: [
5903
5928
  /* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
5904
5929
  /* @__PURE__ */ g("div", { className: "ctrans__mid", children: [
5905
5930
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: x.idx <= 0 ? 0.3 : 1 }, onClick: x.prev, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 16, sw: 1.8 }) }),
5906
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": se.relang ? "Preparing audio" : x.playing ? "Pause" : "Play", title: se.relang ? "Preparing audio…" : se.playTitle ?? (x.playing ? "Pause" : "Play"), disabled: !Tt, onClick: x.toggle, children: se.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: x.playing ? void 0 : { marginLeft: 2 }, children: x.playing ? Jl : Xl }) }),
5931
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": se.relang ? "Preparing audio" : x.playing ? "Pause" : "Play", title: se.relang ? "Preparing audio…" : se.playTitle ?? (x.playing ? "Pause" : "Play"), disabled: !wt, onClick: x.toggle, children: se.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: x.playing ? void 0 : { marginLeft: 2 }, children: x.playing ? Jl : Xl }) }),
5907
5932
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: x.idx >= ge.length - 1 ? 0.3 : 1 }, onClick: x.next, children: /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 16, sw: 1.8 }) })
5908
5933
  ] }),
5909
5934
  /* @__PURE__ */ i("span", { className: "ctrans__mute", children: P(36) })
5910
5935
  ] }),
5911
5936
  /* @__PURE__ */ i("div", { className: "ctrans__scrub", children: Ji(w) })
5912
- ] }) }), Na = Ql("ga", { tabs: $t, cur: M, pref: (Ps = $t[0]) == null ? void 0 : Ps.key, onPick: N }), Ms = Math.max(0, Math.min(100, Math.round(U))), ma = Ye && /* @__PURE__ */ g("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
5937
+ ] }) }), Na = Ql("ga", { tabs: Bt, cur: h, pref: (Ps = Bt[0]) == null ? void 0 : Ps.key, onPick: N }), Ms = Math.max(0, Math.min(100, Math.round(U))), ma = Ye && /* @__PURE__ */ g("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
5913
5938
  Qe && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Qe}/hqdefault.jpg)` } }),
5914
5939
  /* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(be, { children: [
5915
5940
  Je && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: Je }),
@@ -5917,33 +5942,33 @@ function su(t) {
5917
5942
  /* @__PURE__ */ i("div", { className: "gfull__holdbar", children: /* @__PURE__ */ i("div", { style: { width: `${ae === "transcribing" ? Ms : 0}%` } }) }),
5918
5943
  /* @__PURE__ */ g("div", { className: "gfull__holds", children: [
5919
5944
  ae === "transcribing" ? "Transcribing" : ae === "cropping" ? "Preparing the video" : "Waiting to start",
5920
- ae === "transcribing" && (Q != null && Q.segmentsDone) ? ` · ${Zt.toLowerCase()}` : ""
5945
+ ae === "transcribing" && (Q != null && Q.segmentsDone) ? ` · ${qt.toLowerCase()}` : ""
5921
5946
  ] }),
5922
5947
  /* @__PURE__ */ i("div", { className: "gfull__holdn", children: "The video starts as soon as the first lines are transcribed." })
5923
5948
  ] }) : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) })
5924
- ] }), gs = u && n && (fe || ae === "cropping") ? Math.max(0, Math.min(100, Math.round(U))) : null, Tn = k(t.onProgress);
5925
- Tn.current = t.onProgress, _(() => {
5949
+ ] }), gs = u && n && (fe || ae === "cropping") ? Math.max(0, Math.min(100, Math.round(U))) : null, wn = j(t.onProgress);
5950
+ wn.current = t.onProgress, E(() => {
5926
5951
  var w;
5927
- (w = Tn.current) == null || w.call(Tn, gs);
5952
+ (w = wn.current) == null || w.call(wn, gs);
5928
5953
  }, [gs]);
5929
- const [ya, sr] = j(!1), ir = !!bt && !Ye && (Ke ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5930
- _(() => {
5954
+ const [ya, sr] = k(!1), ir = !!xt && !Ye && (Ke ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5955
+ E(() => {
5931
5956
  ir || sr(!1);
5932
5957
  }, [ir]);
5933
5958
  const Ta = t.endCard !== !1 && ir && !ya && /* @__PURE__ */ i(Pc, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => sr(!0), onReplay: () => {
5934
5959
  sr(!0), tt.current = !0, x.seekFrac ? x.seekFrac(0) : x.seekRow(0), x.playing || x.toggle();
5935
5960
  } });
5936
5961
  if (u) return /* @__PURE__ */ g(be, { children: [
5937
- r ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: nr }) : ma || bt || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
5962
+ r ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: nr }) : ma || xt || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
5938
5963
  Ta,
5939
5964
  rr
5940
5965
  ] });
5941
5966
  if (s) {
5942
- const w = Pn && !Et && !r && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: hs(!0) }), Ne = !r && ($t.length > 0 || Et || !!se.sidePanel || !!w);
5967
+ const w = kt && !_t && !r && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: hs(!0) }), Ne = !r && (Bt.length > 0 || _t || !!se.sidePanel || !!w);
5943
5968
  return /* @__PURE__ */ g(be, { children: [
5944
5969
  /* @__PURE__ */ i("div", { className: "dhead dhead--listener dhead--cols", children: /* @__PURE__ */ g("div", { className: "gcolhead", children: [
5945
5970
  /* @__PURE__ */ i("div", { className: "gcolhead__main", children: /* @__PURE__ */ g("div", { className: "gcolhead__col", children: [
5946
- /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(An, { dark: a, height: 20.38 }) }),
5971
+ /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(En, { dark: a, height: 20.38 }) }),
5947
5972
  !r && /* @__PURE__ */ g("div", { className: "dhead__session", children: [
5948
5973
  /* @__PURE__ */ i("span", { className: "t", children: n ? Je : "" }),
5949
5974
  /* @__PURE__ */ i("span", { className: "s", children: n ? ds : "" })
@@ -5954,31 +5979,31 @@ function su(t) {
5954
5979
  /* @__PURE__ */ g("div", { className: "listenerlive listenerlive--cols listenerlive--pub", children: [
5955
5980
  /* @__PURE__ */ g("div", { className: "listenerlive__main", children: [
5956
5981
  nr,
5957
- !r && Pt,
5982
+ !r && Qt,
5958
5983
  cs,
5959
5984
  f && /* @__PURE__ */ i("div", { className: "pubflash", children: f }),
5960
5985
  !r && /* @__PURE__ */ i("div", { className: "listenerlive__inner", style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", marginTop: 6 }, children: us }),
5961
5986
  !r && /* @__PURE__ */ g("div", { className: "listenerlive__inner gdeskbar", "data-transport": "1", children: [
5962
- Ue.can && /* @__PURE__ */ i("span", { className: "barchip", style: Ue.active ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)", borderRadius: 12 } : void 0, children: /* @__PURE__ */ i(bn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, onClick: Ue.onClick }) }),
5987
+ Ue.can && /* @__PURE__ */ i("span", { className: "barchip", style: Ue.active ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)", borderRadius: 12 } : void 0, children: /* @__PURE__ */ i(xn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, onClick: Ue.onClick }) }),
5963
5988
  Rr
5964
5989
  ] })
5965
5990
  ] }),
5966
5991
  Ne && /* @__PURE__ */ g(Vl, { id: "ga", className: "listenerside", gap: 20, plain: !0, children: [
5967
5992
  !se.sidePanel && w,
5968
5993
  !se.sidePanel && Zr,
5969
- !se.sidePanel && $t.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i($l, { col: Na, order: ["summary", "export"], onPick: N, grip: { summary: 40, export: 28 }, render: (Pe) => /* @__PURE__ */ i(Qs, { panel: !0, children: Pr(Pe) }) }) }),
5994
+ !se.sidePanel && Bt.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i($l, { col: Na, order: ["summary", "export"], onPick: N, grip: { summary: 40, export: 28 }, render: (Pe) => /* @__PURE__ */ i(Qs, { panel: !0, children: Pr(Pe) }) }) }),
5970
5995
  se.sidePanel
5971
5996
  ] })
5972
5997
  ] }),
5973
- !bt && se.sheets,
5974
- !(u && bt) && tr,
5975
- bt,
5998
+ !xt && se.sheets,
5999
+ !(u && xt) && tr,
6000
+ xt,
5976
6001
  rr
5977
6002
  ] });
5978
6003
  }
5979
- const wa = $t.length > 0 && !p && /* @__PURE__ */ i("div", { className: "txwidget", children: /* @__PURE__ */ g(Qs, { panel: !0, children: [
5980
- /* @__PURE__ */ i(_i, { tabs: $t, current: M, onPick: N, gap: M !== "none" }),
5981
- M !== "none" && Pr(M)
6004
+ const wa = Bt.length > 0 && !p && /* @__PURE__ */ i("div", { className: "txwidget", children: /* @__PURE__ */ g(Qs, { panel: !0, children: [
6005
+ /* @__PURE__ */ i(_i, { tabs: Bt, current: h, onPick: N, gap: h !== "none" }),
6006
+ h !== "none" && Pr(h)
5982
6007
  ] }) });
5983
6008
  return /* @__PURE__ */ g(be, { children: [
5984
6009
  /* @__PURE__ */ i(zc, { dark: a, title: n ? Je : "", subline: n ? ds : "", onOptions: () => z(!0), optionsActive: X }),
@@ -5987,37 +6012,37 @@ function su(t) {
5987
6012
  !r && wa,
5988
6013
  !r && Zr,
5989
6014
  !r && /* @__PURE__ */ g("div", { style: { position: "relative", flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
5990
- Pt,
6015
+ Qt,
5991
6016
  us,
5992
6017
  f && /* @__PURE__ */ i("div", { className: "txflash", children: f })
5993
6018
  ] }),
5994
6019
  !r && /* @__PURE__ */ g("div", { className: "gbottom", "data-transport": "1", children: [
5995
- Pn && !Et && /* @__PURE__ */ i("div", { className: "pubctl", children: hs(!1) }),
6020
+ kt && !_t && /* @__PURE__ */ i("div", { className: "pubctl", children: hs(!1) }),
5996
6021
  /* @__PURE__ */ g("div", { className: "gbottom__bar", children: [
5997
6022
  Ue.can && /* @__PURE__ */ i("div", { style: { flex: "none" }, children: Zn({ width: 87 }, void 0) }),
5998
6023
  /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: Rr })
5999
6024
  ] })
6000
6025
  ] }),
6001
- !bt && se.sheets,
6002
- !(u && bt) && tr,
6003
- bt,
6026
+ !xt && se.sheets,
6027
+ !(u && xt) && tr,
6028
+ xt,
6004
6029
  rr
6005
6030
  ] });
6006
6031
  }
6007
6032
  function iu(t) {
6008
- const [e, n] = j(null);
6009
- return _(() => {
6010
- if (!t || e === t) return;
6033
+ const [e, n] = k(null);
6034
+ return E(() => {
6035
+ if (!t || (e == null ? void 0 : e.url) === t && e.ok) return;
6011
6036
  let r = !0, s;
6012
6037
  const a = () => {
6013
6038
  $a(t).then((o) => {
6014
- r && (o ? n(t) : s = setTimeout(a, 3e3));
6039
+ r && (n({ url: t, ok: o }), o || (s = setTimeout(a, 3e3)));
6015
6040
  });
6016
6041
  };
6017
6042
  return a(), () => {
6018
6043
  r = !1, s && clearTimeout(s);
6019
6044
  };
6020
- }, [t, e]), !!t && e === t;
6045
+ }, [t, (e == null ? void 0 : e.url) === t && (e == null ? void 0 : e.ok)]), !t || (e == null ? void 0 : e.url) !== t ? "unknown" : e.ok ? "yes" : "no";
6021
6046
  }
6022
6047
  export {
6023
6048
  Al as ExportPanel,
@@ -6030,7 +6055,7 @@ export {
6030
6055
  dc as PUB_SIDE,
6031
6056
  gu as PanelSeek,
6032
6057
  Ho as PlayerApiProvider,
6033
- xn as REMOVE_BG_LABEL,
6058
+ Dn as REMOVE_BG_LABEL,
6034
6059
  oo as REMOVE_BG_NOTE,
6035
6060
  pl as ReplayScrub,
6036
6061
  kl as SpeakerCast,
@@ -6042,12 +6067,12 @@ export {
6042
6067
  jl as VoiceSheetBody,
6043
6068
  Kl as YtFollow,
6044
6069
  co as bedNote,
6045
- en as browserFull,
6046
- Yt as lineEnd,
6070
+ tn as browserFull,
6071
+ Ut as lineEnd,
6047
6072
  Ui as lineWords,
6048
- kn as pictureT,
6049
- zn as placePosition,
6050
- In as realFull,
6073
+ jn as pictureT,
6074
+ In as placePosition,
6075
+ On as realFull,
6051
6076
  hu as setErrorReporter,
6052
6077
  si as setFullTarget,
6053
6078
  ql as snapPosition,
@@ -6059,7 +6084,7 @@ export {
6059
6084
  ic as useDuck,
6060
6085
  fc as useFindPull,
6061
6086
  tc as useFlash,
6062
- Ut as usePlayerApi,
6087
+ Rt as usePlayerApi,
6063
6088
  vi as useSeparatedTrack,
6064
6089
  El as useSummaryIn,
6065
6090
  nl as useTranscript,