@vocalstack/player 0.1.0-alpha.45 → 0.1.0-alpha.47

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
@@ -1,7 +1,7 @@
1
1
  var Fa = Object.defineProperty;
2
2
  var Za = (t, e, n) => e in t ? Fa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var ge = (t, e, n) => Za(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { jsx as i, jsxs as g, Fragment as Ce } from "react/jsx-runtime";
4
+ import { jsx as i, jsxs as g, Fragment as be } from "react/jsx-runtime";
5
5
  import { useState as k, useRef as j, useEffect as S, useLayoutEffect as Jt, createContext as Oi, useMemo as ze, useContext as Ga, useCallback as Ke, Fragment as qa, forwardRef as Ka, useImperativeHandle as Ja } from "react";
6
6
  import { createPortal as Xa } from "react-dom";
7
7
  import { VocalStackError as Ci, VocalStack as xi } from "@vocalstack/js-sdk";
@@ -86,7 +86,7 @@ function ao({ 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 Vn({ dark: t, height: e = 20, link: n = !0 }) {
89
+ function Bn({ dark: t, height: e = 20, link: n = !0 }) {
90
90
  const r = /* @__PURE__ */ i("img", { src: t ? eo : to, alt: "VocalStack", decoding: "sync", style: { height: e, width: "auto", display: "block" } });
91
91
  return n ? /* @__PURE__ */ i("a", { href: Si, style: { display: "block" }, children: r }) : r;
92
92
  }
@@ -1001,7 +1001,7 @@ function Rr({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
1001
1001
  }, [s, h, l]), b = ze(
1002
1002
  () => h ? [] : c.map((A) => m.find((w) => w.code === A)).filter((A) => !!A).sort((A, w) => A.label.localeCompare(w.label)),
1003
1003
  [c, m, h]
1004
- ), C = ze(() => b.length ? m.filter((A) => !b.some((w) => w.code === A.code)) : m, [m, b]), D = p || h ? C.length : 12, B = C, Y = C.length - Math.min(D, C.length), ee = (A, w = !1, _ = !1) => {
1004
+ ), C = ze(() => b.length ? m.filter((A) => !b.some((w) => w.code === A.code)) : m, [m, b]), D = p || h ? C.length : 12, V = C, Y = C.length - Math.min(D, C.length), ee = (A, w = !1, _ = !1) => {
1005
1005
  const O = !!u && !A.voice;
1006
1006
  return /* @__PURE__ */ g(
1007
1007
  "button",
@@ -1049,12 +1049,12 @@ function Rr({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
1049
1049
  /* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
1050
1050
  /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: X.check, size: 16, sw: 2.2 }) })
1051
1051
  ] }),
1052
- b.length > 0 && /* @__PURE__ */ g(Ce, { children: [
1052
+ b.length > 0 && /* @__PURE__ */ g(be, { children: [
1053
1053
  /* @__PURE__ */ i("div", { className: "vs-picker__head", children: "RECENT" }),
1054
1054
  b.map((A) => ee(A, !0)),
1055
1055
  /* @__PURE__ */ i("div", { className: "vs-picker__rule" })
1056
1056
  ] }),
1057
- B.map((A, w) => ee(A, !1, w >= D)),
1057
+ V.map((A, w) => ee(A, !1, w >= D)),
1058
1058
  Y > 0 && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__more vs-picker__more--btn", style: { background: "none", border: 0, cursor: "pointer", width: "100%", textAlign: "left" }, onClick: () => y(!0), children: [
1059
1059
  "+ ",
1060
1060
  Y,
@@ -1123,7 +1123,7 @@ function li({ src: t, setup: e, t: n, playing: r, seekN: s, onToggle: a, seekOve
1123
1123
  c && /* @__PURE__ */ i("div", { className: `txyt__paused${r ? "" : " txyt__paused--on"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(Xt, { size: 44 }) }) })
1124
1124
  ] });
1125
1125
  }
1126
- const Bi = [
1126
+ const Vi = [
1127
1127
  { id: "youtube", name: "YouTube", color: "#ff3b30", hosts: /(^|\.)(youtube\.com|youtu\.be|youtube-nocookie\.com)$/, glyph: "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" },
1128
1128
  { id: "loom", name: "Loom", color: "#8f7bff", hosts: /(^|\.)loom\.com$/, glyph: "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" },
1129
1129
  { id: "vimeo", name: "Vimeo", color: "#1ab7ea", hosts: /(^|\.)vimeo\.com$/, glyph: "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" },
@@ -1137,8 +1137,26 @@ const Bi = [
1137
1137
  { id: "kick", name: "Kick", color: "#53fc18", hosts: /(^|\.)kick\.com$/, glyph: "M4 3h5.5v5H11V6h2V3h5.5v6.5h-2V11h-2v2h2v1.5h2V21H13v-3h-2v-2H9.5v5H4V3Z" },
1138
1138
  { id: "mixcloud", name: "Mixcloud", color: "#7f8cff", hosts: /(^|\.)mixcloud\.com$/, audioOnly: !0, glyph: "M17.5 9.5a5.5 5.5 0 0 0-10.6 1.2A3.8 3.8 0 0 0 7.3 18h10.2a4.25 4.25 0 0 0 0-8.5Z" },
1139
1139
  { id: "streamable", name: "Streamable", color: "#0f90fa", hosts: /(^|\.)streamable\.com$/, glyph: "M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 17.5v-11Zm6 2.3v6.4l5.2-3.2L10 8.8Z" },
1140
- { id: "bandcamp", name: "Bandcamp", color: "#1da0c3", hosts: /(^|\.)bandcamp\.com$/, audioOnly: !0, glyph: "M2 18 8.5 6H22l-6.5 12H2Z" }
1141
- ], bo = new Map(Bi.map((t) => [t.id, t]));
1140
+ { id: "bandcamp", name: "Bandcamp", color: "#1da0c3", hosts: /(^|\.)bandcamp\.com$/, audioOnly: !0, glyph: "M2 18 8.5 6H22l-6.5 12H2Z" },
1141
+ { id: "ted", name: "TED", color: "#e62b1e", hosts: /(^|\.)ted\.com$/, glyph: "M2 6h6.5v2.3H6.4V18H4V8.3H2V6Zm7.5 0h5.3v2.3h-2.9v2.6h2.6v2.3h-2.6v2.5h2.9V18H9.5V6Zm6.4 0h2.3A3.8 3.8 0 0 1 22 9.8v4.4a3.8 3.8 0 0 1-3.8 3.8h-2.3V6Zm2.4 2.3v7.4c.9 0 1.4-.7 1.4-1.6v-4.2c0-.9-.5-1.6-1.4-1.6Z" },
1142
+ { id: "linkedin", name: "LinkedIn", color: "#0a66c2", hosts: /(^|\.)linkedin\.com$/, glyph: "M5 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5ZM3 9.5h4V21H3V9.5Zm6.5 0h3.8v1.6h.1c.5-1 1.8-2 3.8-2 4 0 4.8 2.6 4.8 6V21h-4v-5.2c0-1.2 0-2.8-1.7-2.8s-2 1.3-2 2.7V21h-4V9.5Z" },
1143
+ { id: "archive", name: "Internet Archive", color: "#c8c8c8", hosts: /(^|\.)archive\.org$/, glyph: "M3 19h18v2H3v-2Zm1-2h16v1.2H4V17Zm1.5-9h2v8h-2V8Zm5.5 0h2v8h-2V8Zm5.5 0h2v8h-2V8ZM3 5.5 12 3l9 2.5V7H3V5.5Z" },
1144
+ { id: "odysee", name: "Odysee", color: "#ef1970", hosts: /(^|\.)(odysee\.com|lbry\.tv)$/, glyph: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm0 4a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z" },
1145
+ { id: "niconico", name: "Niconico", color: "#e6e6e6", hosts: /(^|\.)(nicovideo\.jp|nico\.ms)$/, glyph: "M4 8h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2Zm3.5-5L11 7H9.3L6.5 4.2 7.5 3Zm9 0 1 1.2L14.7 7H13l3.5-4Z" },
1146
+ { id: "vk", name: "VK", color: "#0077ff", hosts: /(^|\.)(vk\.com|vkvideo\.ru)$/, glyph: "M12.8 17.5c-5.5 0-8.6-3.8-8.8-10h2.8c.1 4.6 2.1 6.5 3.7 6.9V7.5h2.6v3.9c1.6-.2 3.3-2 3.8-3.9h2.6c-.4 2.4-2.2 4.2-3.4 4.9 1.3.6 3.3 2.1 4.1 5.1h-2.9c-.6-1.9-2.2-3.4-4.2-3.6v3.6h-.3Z" },
1147
+ { id: "bitchute", name: "BitChute", color: "#ef4137", hosts: /(^|\.)bitchute\.com$/, glyph: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm-2 5.5v7l6-3.5-6-3.5Z" },
1148
+ { id: "wistia", name: "Wistia", color: "#54bbff", hosts: /(^|\.)(wistia\.com|wistia\.net|wi\.st)$/, glyph: "M3 7h13l-2.5 4H3V7Zm0 6h15.5L21 9v4.5L18.5 17H3v-4Z" },
1149
+ { id: "vidyard", name: "Vidyard", color: "#38c172", hosts: /(^|\.)vidyard\.com$/, glyph: "M3 5h4l5 9 5-9h4l-9 15L3 5Z" },
1150
+ { id: "kaltura", name: "Kaltura", color: "#00a8e1", hosts: /(^|\.)kaltura\.com$/, glyph: "M5 4h3v7l6-7h4l-6.5 7.3L18.5 20h-4l-5-6.4L8 15.3V20H5V4Z" },
1151
+ { id: "jwplayer", name: "JW Player", color: "#ff0046", hosts: /(^|\.)(jwplayer\.com|jwplatform\.com)$/, glyph: "M6 5h3v9.5a4 4 0 0 1-4 4H4v-2.8h1c.6 0 1-.5 1-1.2V5Zm5 0h3l1.5 7L17 5h3l-3 13h-3l-1.5-6.5L11.9 18H9.5L11 5Z" },
1152
+ { id: "pinterest", name: "Pinterest", color: "#e60023", hosts: /(^|\.)(pinterest\.[a-z.]+|pin\.it)$/, glyph: "M12 2.5a9.5 9.5 0 0 0-3.5 18.3c-.1-.8-.2-2 0-2.9l1.3-5.4s-.3-.7-.3-1.6c0-1.5.9-2.7 2-2.7.9 0 1.4.7 1.4 1.6 0 1-.6 2.4-.9 3.7-.3 1.1.6 2 1.7 2 2 0 3.5-2.1 3.5-5.2 0-2.7-2-4.6-4.8-4.6-3.3 0-5.2 2.5-5.2 5 0 1 .4 2.1.9 2.7l.1.4-.3 1.3c0 .2-.2.3-.4.2-1.4-.7-2.3-2.7-2.3-4.4 0-3.6 2.6-6.9 7.5-6.9 3.9 0 7 2.8 7 6.6 0 3.9-2.5 7.1-5.9 7.1-1.2 0-2.2-.6-2.6-1.3l-.7 2.7c-.3 1-.9 2.2-1.4 2.9A9.5 9.5 0 1 0 12 2.5Z" },
1153
+ { id: "bluesky", name: "Bluesky", color: "#1185fe", hosts: /(^|\.)bsky\.app$/, glyph: "M6.3 4.4c2.3 1.7 4.7 5.2 5.7 7 1-1.8 3.4-5.3 5.7-7 1.6-1.2 4.3-2.2 4.3.9 0 .6-.4 5.2-.6 5.9-.7 2.6-3.3 3.2-5.6 2.8 4 .7 5 2.9 2.8 5.2-4.2 4.3-6-1.1-6.5-2.5l-.1-.4-.1.4c-.5 1.4-2.3 6.8-6.5 2.5-2.2-2.3-1.2-4.5 2.8-5.2-2.3.4-4.9-.2-5.6-2.8C2.4 10.5 2 5.9 2 5.3c0-3.1 2.7-2.1 4.3-.9Z" },
1154
+ { id: "gdrive", name: "Google Drive", color: "#34a853", hosts: /^drive\.google\.com$/, glyph: "M8.2 3h7.6l6.2 10.8-3.8 6.6H5.8L2 13.8 8.2 3Zm1.2 2L5 12.6h4.4L13.8 5H9.4Zm6.4 1.2-2.2 3.8 4 6.8 2.2-3.8-4-6.8ZM4.4 14.6l2.2 3.8h8.8l2.2-3.8H4.4Z" },
1155
+ { id: "spreaker", name: "Spreaker", color: "#f5c300", hosts: /(^|\.)spreaker\.com$/, audioOnly: !0, glyph: "M12 9a3 3 0 1 1 0 6 3 3 0 0 1 0-6ZM6.3 6.3l1.4 1.4a6 6 0 0 0 0 8.6l-1.4 1.4a8 8 0 0 1 0-11.4Zm11.4 0a8 8 0 0 1 0 11.4l-1.4-1.4a6 6 0 0 0 0-8.6l1.4-1.4Z" },
1156
+ { id: "iheart", name: "iHeartRadio", color: "#c6002b", hosts: /(^|\.)iheart\.com$/, audioOnly: !0, glyph: "M12 21s-7.5-4.6-9.4-9.4C1.2 8 3.4 4 7.3 4c2 0 3.6 1.1 4.7 2.6C13.1 5.1 14.7 4 16.7 4c3.9 0 6.1 4 4.7 7.6C19.5 16.4 12 21 12 21Z" },
1157
+ { id: "audioboom", name: "Audioboom", color: "#1ea2e0", hosts: /(^|\.)audioboom\.com$/, audioOnly: !0, glyph: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm-4 6v6h2V9H8Zm3-2v10h2V7h-2Zm3 3v4h2v-4h-2Z" },
1158
+ { id: "cnn", name: "CNN", color: "#cc0000", hosts: /(^|\.)cnn\.com$/, glyph: "M2 7h20v10H2V7Zm3.5 2.2a2.8 2.8 0 1 0 0 5.6h1.4v-1.6H5.6a1.2 1.2 0 1 1 0-2.4h1.3V9.2H5.5Zm3 0v5.6h1.6v-3.3l2.4 3.3H14V9.2h-1.6v3.3L10 9.2H8.5Zm6.2 0v5.6h1.6v-3.3l2.4 3.3h1.5V9.2h-1.6v3.3l-2.4-3.3h-1.5Z" }
1159
+ ], bo = new Map(Vi.map((t) => [t.id, t]));
1142
1160
  function Xu(t) {
1143
1161
  return t ? bo.get(t) ?? null : null;
1144
1162
  }
@@ -1153,7 +1171,7 @@ function Oo(t) {
1153
1171
  }
1154
1172
  function Pn(t) {
1155
1173
  const e = Oo(t);
1156
- return e ? Bi.find((n) => n.hosts.test(e)) ?? null : null;
1174
+ return e ? Vi.find((n) => n.hosts.test(e)) ?? null : null;
1157
1175
  }
1158
1176
  function zt(t) {
1159
1177
  try {
@@ -1163,7 +1181,7 @@ function zt(t) {
1163
1181
  }
1164
1182
  }
1165
1183
  const un = (t) => Math.max(0, Math.floor(t));
1166
- function Vi(t) {
1184
+ function Bi(t) {
1167
1185
  var n;
1168
1186
  const e = /\/(?:share|embed)\/(?:[^/?#]*-)?([0-9a-f]{32})(?:[/?#]|$)/i.exec(((n = zt(t)) == null ? void 0 : n.pathname) ?? "");
1169
1187
  return e ? e[1].toLowerCase() : null;
@@ -1204,7 +1222,7 @@ function Hi(t, e) {
1204
1222
  const r = e.play ? 1 : 0;
1205
1223
  switch (n.id) {
1206
1224
  case "loom": {
1207
- const u = Vi(t);
1225
+ const u = Bi(t);
1208
1226
  if (!u) return null;
1209
1227
  const d = new URLSearchParams({ hide_owner: "true", hide_share: "true", hide_title: "true", hideEmbedTopBar: "true", hide_speed: "true", muted: "true", autoplay: e.play ? "true" : "false", t: String(un(e.t)) });
1210
1228
  return `https://www.loom.com/embed/${u}?${d}`;
@@ -1229,7 +1247,7 @@ function Hi(t, e) {
1229
1247
  return u.video ? (d.set("video", `v${u.video}`), d.set("time", Do(e.t))) : u.channel && d.set("channel", u.channel), `https://player.twitch.tv/?${d}`;
1230
1248
  }
1231
1249
  case "facebook":
1232
- return `https://www.facebook.com/plugins/video.php?${new URLSearchParams({ href: t, autoplay: String(!!e.play), mute: "1", show_text: "false" })}`;
1250
+ return `https://www.facebook.com/plugins/video.php?${new URLSearchParams({ href: t, autoplay: String(!!e.play), mute: "1", show_text: "false", show_captions: "false" })}`;
1233
1251
  case "tiktok": {
1234
1252
  const u = /\/video\/(\d+)/.exec(((s = zt(t)) == null ? void 0 : s.pathname) ?? "");
1235
1253
  return u ? `https://www.tiktok.com/embed/v2/${u[1]}?${new URLSearchParams({ autoplay: String(r), muted: "1", controls: "0" })}` : null;
@@ -1294,21 +1312,24 @@ function Yo({ url: t, t: e, playing: n, seekN: r, title: s }) {
1294
1312
  const a = j(e);
1295
1313
  a.current = e;
1296
1314
  const [o, l] = k(!1), c = typeof window < "u" ? window.location.hostname : "localhost", u = ze(() => Hi(t, { t: a.current, play: n, host: c }), [t, n, r, c]);
1297
- return u ? /* @__PURE__ */ i(
1298
- "iframe",
1299
- {
1300
- className: "vsp-embed",
1301
- src: u,
1302
- title: s,
1303
- style: { opacity: o ? 1 : 0 },
1304
- onLoad: () => l(!0),
1305
- allow: "autoplay; encrypted-media; picture-in-picture; fullscreen",
1306
- referrerPolicy: "strict-origin-when-cross-origin",
1307
- tabIndex: -1,
1308
- "aria-hidden": "true"
1309
- },
1310
- u
1311
- ) : null;
1315
+ return u ? /* @__PURE__ */ g(be, { children: [
1316
+ o && /* @__PURE__ */ i("div", { className: "vsp-embed__bg", "aria-hidden": "true" }),
1317
+ /* @__PURE__ */ i(
1318
+ "iframe",
1319
+ {
1320
+ className: "vsp-embed",
1321
+ src: u,
1322
+ title: s,
1323
+ style: { opacity: o ? 1 : 0 },
1324
+ onLoad: () => l(!0),
1325
+ allow: "autoplay; encrypted-media; picture-in-picture; fullscreen",
1326
+ referrerPolicy: "strict-origin-when-cross-origin",
1327
+ tabIndex: -1,
1328
+ "aria-hidden": "true"
1329
+ },
1330
+ u
1331
+ )
1332
+ ] }) : null;
1312
1333
  }
1313
1334
  let Sn = null;
1314
1335
  function Uo() {
@@ -1344,7 +1365,7 @@ function Po({ url: t, t: e, playing: n, seekN: r, onToggle: s }) {
1344
1365
  if (!(!M || T.type !== "video" || T.id !== d)) {
1345
1366
  o.current = T.instance;
1346
1367
  try {
1347
- T.instance.mute(), T.instance.seek(Math.max(0, l.current));
1368
+ T.instance.setVolume(0), T.instance.unmute(), T.instance.setVolume(0), T.instance.seek(Math.max(0, l.current));
1348
1369
  } catch {
1349
1370
  }
1350
1371
  u(!0);
@@ -1364,7 +1385,7 @@ function Po({ url: t, t: e, playing: n, seekN: r, onToggle: s }) {
1364
1385
  const M = o.current;
1365
1386
  if (!(!M || !c))
1366
1387
  try {
1367
- n ? M.play() : M.pause();
1388
+ n ? (M.setVolume(0), M.play()) : M.pause();
1368
1389
  } catch {
1369
1390
  }
1370
1391
  }, [n, c]), S(() => {
@@ -1406,7 +1427,7 @@ function Qo(t) {
1406
1427
  e && !r.includes("Signature=") && n.open("GET", r + (r.includes("?") ? "&" : "?") + e, !0);
1407
1428
  };
1408
1429
  }
1409
- function Bo(t) {
1430
+ function Vo(t) {
1410
1431
  return (e, n) => {
1411
1432
  let r = !0, s = null;
1412
1433
  return (async () => {
@@ -1433,7 +1454,7 @@ function Bo(t) {
1433
1454
  };
1434
1455
  }
1435
1456
  const on = /* @__PURE__ */ new Map();
1436
- function Vo(t) {
1457
+ function Bo(t) {
1437
1458
  const [e, n] = k(() => t ? on.get(t) ?? null : null);
1438
1459
  return S(() => {
1439
1460
  if (!t) {
@@ -2146,18 +2167,18 @@ function It(t) {
2146
2167
  const a = (e == null ? void 0 : e.name) ?? "";
2147
2168
  return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && Di(t instanceof Error ? t : new Error(String(t))), { message: Nr }) : gi[a] ? { message: gi[a] } : t instanceof Error && a === "Error" && !(t instanceof Ci) ? { message: t.message } : { message: xr };
2148
2169
  }
2149
- const qi = "https://api.vocalstack.com", Br = Oi(null);
2170
+ const qi = "https://api.vocalstack.com", Vr = Oi(null);
2150
2171
  function Wt() {
2151
- const t = Ga(Br);
2172
+ const t = Ga(Vr);
2152
2173
  if (!t) throw new Error("VocalStack player hooks must be used inside <VocalStackPlayer> or <PlayerApiProvider>");
2153
2174
  return t;
2154
2175
  }
2155
2176
  function xl(t) {
2156
- return t.value ? /* @__PURE__ */ i(Br.Provider, { value: t.value, children: t.children }) : /* @__PURE__ */ i(Sl, { ...t });
2177
+ return t.value ? /* @__PURE__ */ i(Vr.Provider, { value: t.value, children: t.children }) : /* @__PURE__ */ i(Sl, { ...t });
2157
2178
  }
2158
2179
  function Sl({ children: t, ...e }) {
2159
2180
  const n = Ki(e);
2160
- return /* @__PURE__ */ i(Br.Provider, { value: n, children: t });
2181
+ return /* @__PURE__ */ i(Vr.Provider, { value: n, children: t });
2161
2182
  }
2162
2183
  const Dl = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
2163
2184
  function Al(t) {
@@ -2362,7 +2383,7 @@ function Ql(t, e) {
2362
2383
  A = !1, (K = l.current) == null || K.close(), l.current = null, d(!1);
2363
2384
  };
2364
2385
  }, [t, n, e.voice]);
2365
- const [N, m] = k(!1), [b, C] = k(null), D = j(0), [B, Y] = k(null), ee = Ke((A) => {
2386
+ const [N, m] = k(!1), [b, C] = k(null), D = j(0), [V, Y] = k(null), ee = Ke((A) => {
2366
2387
  var te;
2367
2388
  if (c.current = A, (te = l.current) == null || te.setLanguage(A), !t) return;
2368
2389
  const w = r.current.client, _ = ++D.current;
@@ -2387,7 +2408,7 @@ function Ql(t, e) {
2387
2408
  }
2388
2409
  O && y();
2389
2410
  }, [y]), F = Ke(() => h(null), []);
2390
- return { model: s, connected: u, error: M, notFound: f, clearError: F, setLanguage: ee, mergeTranslations: I, translating: N, translateFailed: b, shownLang: B };
2411
+ return { model: s, connected: u, error: M, notFound: f, clearError: F, setLanguage: ee, mergeTranslations: I, translating: N, translateFailed: b, shownLang: V };
2391
2412
  }
2392
2413
  const pi = {
2393
2414
  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" },
@@ -2421,10 +2442,10 @@ function Tr(t) {
2421
2442
  return "queued";
2422
2443
  }
2423
2444
  }
2424
- function Bl(t) {
2445
+ function Vl(t) {
2425
2446
  return t ? t.progress ? { state: t.state, processedS: t.progress.processedS, totalS: t.progress.totalS ?? null, segmentsDone: t.progress.segmentsDone, segmentsTotal: t.progress.segmentsTotal ?? null, pct: t.progress.pct, error: t.error ?? null } : t.state ? { state: t.state, processedS: 0, totalS: null, segmentsDone: 0, segmentsTotal: null, pct: 0, error: t.error ?? null } : null : null;
2426
2447
  }
2427
- const Vl = (t, e) => {
2448
+ const Bl = (t, e) => {
2428
2449
  const n = (t == null ? void 0 : t.segmentsDone) ?? e, r = Math.max(n, (t == null ? void 0 : t.segmentsTotal) ?? n);
2429
2450
  return `${n} / ${r} SEGMENTS`;
2430
2451
  };
@@ -2443,14 +2464,14 @@ const Sr = [
2443
2464
  { key: "srt", name: "Subtitles", ext: "SRT / VTT", note: "Timed caption cues, ready for a video editor or a player.", icon: "M2.25 15.75V8.25A2.25 2.25 0 0 1 4.5 6h15a2.25 2.25 0 0 1 2.25 2.25v7.5A2.25 2.25 0 0 1 19.5 18h-15a2.25 2.25 0 0 1-2.25-2.25Zm4.5-4.5h4.5m-4.5 3h1.5m3 0h6m-3-3h3" },
2444
2465
  { key: "json", name: "JSON", ext: "JSON", note: "Word-level timings, confidence scores and speaker turns.", icon: "M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" }
2445
2466
  ];
2446
- function Vr(t) {
2467
+ function Br(t) {
2447
2468
  const e = document.createElement("a");
2448
2469
  e.href = t, e.style.display = "none", document.body.appendChild(e), e.click(), e.remove();
2449
2470
  }
2450
2471
  async function Wl(t) {
2451
2472
  const e = await fetch(t, { redirect: "manual" });
2452
2473
  if (e.type !== "opaqueredirect" && !e.ok) throw await ta(e);
2453
- Vr(t);
2474
+ Br(t);
2454
2475
  }
2455
2476
  async function Fl(t, e, n, r = {}) {
2456
2477
  var h, f;
@@ -2469,7 +2490,7 @@ async function Zl(t, e) {
2469
2490
  if (Date.now() > u) throw new Error("The spoken track is taking too long; try again in a moment.");
2470
2491
  await new Promise((d) => setTimeout(d, 4e3)), c = l(await o());
2471
2492
  }
2472
- Vr(po(t.origin, n, r, c.voiceKey, a));
2493
+ Br(po(t.origin, n, r, c.voiceKey, a));
2473
2494
  }
2474
2495
  const na = (t) => {
2475
2496
  var e;
@@ -2556,12 +2577,12 @@ function Xl(t, e, n = 0) {
2556
2577
  if (!d) return;
2557
2578
  const ee = l();
2558
2579
  s.scrollTop = h + (Y.clientY - M) / (ee.vis - ee.size) * ee.max, p();
2559
- }, B = () => {
2580
+ }, V = () => {
2560
2581
  d && (d = !1, a.style.cursor = "grab", p());
2561
2582
  };
2562
- return s.addEventListener("scroll", b, { passive: !0 }), a.addEventListener("pointerdown", C), a.addEventListener("pointermove", D), a.addEventListener("pointerup", B), a.addEventListener("pointercancel", B), typeof ResizeObserver < "u" && (y = new ResizeObserver(() => N()), y.observe(s)), r.current = () => N(), N(), () => {
2583
+ return s.addEventListener("scroll", b, { passive: !0 }), a.addEventListener("pointerdown", C), a.addEventListener("pointermove", D), a.addEventListener("pointerup", V), a.addEventListener("pointercancel", V), typeof ResizeObserver < "u" && (y = new ResizeObserver(() => N()), y.observe(s)), r.current = () => N(), N(), () => {
2563
2584
  r.current = () => {
2564
- }, s.removeEventListener("scroll", b), a.removeEventListener("pointerdown", C), a.removeEventListener("pointermove", D), a.removeEventListener("pointerup", B), a.removeEventListener("pointercancel", B), y == null || y.disconnect(), clearTimeout(u);
2585
+ }, s.removeEventListener("scroll", b), a.removeEventListener("pointerdown", C), a.removeEventListener("pointermove", D), a.removeEventListener("pointerup", V), a.removeEventListener("pointercancel", V), y == null || y.disconnect(), clearTimeout(u);
2565
2586
  };
2566
2587
  }, []);
2567
2588
  }
@@ -2592,7 +2613,7 @@ Request id: ${t.requestId}` : t.message;
2592
2613
  /* @__PURE__ */ i(oe, { d: X.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
2593
2614
  /* @__PURE__ */ g("span", { style: { flex: 1 }, children: [
2594
2615
  t.message,
2595
- u && /* @__PURE__ */ g(Ce, { children: [
2616
+ u && /* @__PURE__ */ g(be, { children: [
2596
2617
  " ",
2597
2618
  /* @__PURE__ */ i("a", { href: "https://app.vocalstack.com/billing", target: "_blank", rel: "noopener", className: "dev-link", style: { fontSize: "inherit", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add credit" })
2598
2619
  ] })
@@ -2608,7 +2629,7 @@ function ed({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
2608
2629
  return /* @__PURE__ */ g("div", { className: "vs-tt", children: [
2609
2630
  /* @__PURE__ */ g("div", { className: "vs-tt__r1", children: [
2610
2631
  /* @__PURE__ */ i("div", { className: "vs-tt__chip", children: t }),
2611
- e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(Ce, { children: [
2632
+ e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(be, { children: [
2612
2633
  /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: n }),
2613
2634
  /* @__PURE__ */ i("div", { className: "vs-tt__spk", children: r }),
2614
2635
  /* @__PURE__ */ i("div", { className: "vs-tt__voice", children: s })
@@ -2624,9 +2645,9 @@ function ed({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
2624
2645
  function nc({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek: a, onSeekFrac: o, onScrubStart: l, onScrubEnd: c, frac: u, glideMs: d = 260 }) {
2625
2646
  const M = j(null), h = j(!1), [f, p] = k(null), y = Math.max(1, e), T = f ?? u, N = T != null ? Math.min(100, Math.max(0, T * 100)) : t / Math.max(1, y - 1) * 100, m = u != null && d > 0 && f == null ? `width ${d}ms linear, left ${d}ms linear` : "none", b = (D) => {
2626
2647
  var I;
2627
- const B = (I = M.current) == null ? void 0 : I.getBoundingClientRect();
2628
- if (!B) return;
2629
- const Y = Math.min(1, Math.max(0, (D.clientX - B.left) / Math.max(1, B.width)));
2648
+ const V = (I = M.current) == null ? void 0 : I.getBoundingClientRect();
2649
+ if (!V) return;
2650
+ const Y = Math.min(1, Math.max(0, (D.clientX - V.left) / Math.max(1, V.width)));
2630
2651
  if (o) {
2631
2652
  p(Y), o(Y);
2632
2653
  return;
@@ -2643,8 +2664,8 @@ function nc({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
2643
2664
  ref: M,
2644
2665
  className: "rscrub__track",
2645
2666
  onPointerDown: (D) => {
2646
- var B;
2647
- h.current = !0, (B = M.current) == null || B.setPointerCapture(D.pointerId), l == null || l(), b(D), D.preventDefault();
2667
+ var V;
2668
+ h.current = !0, (V = M.current) == null || V.setPointerCapture(D.pointerId), l == null || l(), b(D), D.preventDefault();
2648
2669
  },
2649
2670
  onPointerMove: (D) => {
2650
2671
  h.current && b(D);
@@ -2681,7 +2702,7 @@ function sc({ f: t, desk: e, onOpen: n }) {
2681
2702
  s,
2682
2703
  a > 0 && /* @__PURE__ */ i("span", { className: "badge__n", children: a })
2683
2704
  ] }, s);
2684
- return /* @__PURE__ */ g(Ce, { children: [
2705
+ return /* @__PURE__ */ g(be, { children: [
2685
2706
  t.script > 0 && r(e ? "SCRIPT FIX" : "SCRIPT", t.script, !0),
2686
2707
  t.manual && r(e ? "MANUAL FIX" : "MANUAL", t.manualCount, t.script === 0)
2687
2708
  ] });
@@ -2828,8 +2849,8 @@ function dc({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2828
2849
  }, [d, M]);
2829
2850
  const m = (D) => D === p.vcMale.toUpperCase() || D === p.vcFemale.toUpperCase(), b = (D) => {
2830
2851
  if (D === p.vcSheet) return !0;
2831
- const B = T[D];
2832
- return B != null ? !B : !M || !m(D) ? !0 : D === (M === "female" ? p.vcFemale : p.vcMale).toUpperCase();
2852
+ const V = T[D];
2853
+ return V != null ? !V : !M || !m(D) ? !0 : D === (M === "female" ? p.vcFemale : p.vcMale).toUpperCase();
2833
2854
  }, C = !!r && r !== n;
2834
2855
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
2835
2856
  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: [
@@ -2838,7 +2859,7 @@ function dc({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2838
2859
  /* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(lo, { value: h, label: "Copy this error" }) })
2839
2860
  ] }),
2840
2861
  t,
2841
- f && /* @__PURE__ */ g(Ce, { children: [
2862
+ f && /* @__PURE__ */ g(be, { children: [
2842
2863
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, padding: "14px 2px 6px", userSelect: "none" }, children: /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: p.vcSheet }) }),
2843
2864
  /* @__PURE__ */ g("div", { role: f.action ? "button" : "status", tabIndex: f.action ? 0 : void 0, title: f.tip, onClick: f.action, onKeyDown: f.action ? (D) => {
2844
2865
  (D.key === "Enter" || D.key === " ") && (D.preventDefault(), f.action());
@@ -2850,11 +2871,11 @@ function dc({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2850
2871
  ] })
2851
2872
  ] })
2852
2873
  ] }),
2853
- y.map(({ v: D, headOn: B, head: Y, headCount: ee, rule: I }, F) => {
2874
+ y.map(({ v: D, headOn: V, head: Y, headCount: ee, rule: I }, F) => {
2854
2875
  const A = oc(D), w = a === D.id, _ = b(Y), O = (u == null ? void 0 : u(D)) ?? null;
2855
2876
  return /* @__PURE__ */ g(qa, { children: [
2856
- B && Y === p.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: F === 0 && !f ? "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 }) }),
2857
- B && Y !== p.vcSheet && /* @__PURE__ */ g(
2877
+ V && Y === p.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: F === 0 && !f ? "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 }) }),
2878
+ V && Y !== p.vcSheet && /* @__PURE__ */ g(
2858
2879
  "button",
2859
2880
  {
2860
2881
  type: "button",
@@ -2968,7 +2989,7 @@ function pc({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2968
2989
  const K = `${t ?? ""}|${e ?? ""}|`;
2969
2990
  for (const L of [...T.current]) L.startsWith(K) && T.current.delete(L);
2970
2991
  y(null);
2971
- }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || h === N, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, B = (a == null ? void 0 : a.join(",")) ?? "", [Y, ee] = k(null), I = ze(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = ze(() => n && B ? B.split(",").map(Number).filter((K) => !I.has(K)) : [], [n, B, I]), A = j(null);
2992
+ }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || h === N, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, V = (a == null ? void 0 : a.join(",")) ?? "", [Y, ee] = k(null), I = ze(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = ze(() => n && V ? V.split(",").map(Number).filter((K) => !I.has(K)) : [], [n, V, I]), A = j(null);
2972
2993
  S(() => {
2973
2994
  if (!n || !t || !e || !F.length) return;
2974
2995
  const K = Y ?? F[0], L = F.find((pe) => pe >= K) ?? F[0], ie = `${t}|${e}|${M ?? ""}`, ne = A.current;
@@ -2992,9 +3013,9 @@ function pc({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2992
3013
  }, [w, c, I]);
2993
3014
  const O = ze(() => {
2994
3015
  if (!t) return [];
2995
- const K = B ? B.split(",").map(Number).filter((ie) => !n || I.has(ie)) : void 0, L = d ?? (K != null && K.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
3016
+ const K = V ? V.split(",").map(Number).filter((ie) => !n || I.has(ie)) : void 0, L = d ?? (K != null && K.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
2996
3017
  return vo(L, t, o.origin, r, K);
2997
- }, [d, t, o, r, B, e, s, n, I]), te = ze(() => new Set(F), [F]);
3018
+ }, [d, t, o, r, V, e, s, n, I]), te = ze(() => new Set(F), [F]);
2998
3019
  return { listed: l, rows: u, track: d, renderVoiceId: M, rendering: C, failed: D, clips: O, requestRender: m, forget: b, reload: c, setNear: ee, missing: F.length, coming: te };
2999
3020
  }
3000
3021
  const mc = { share: X.share, delay: X.tabGauge, video: X.video, source: X.tabSources, script: X.tabScript, fix: X.tabFix, ending: X.tabEnding, summary: X.tabSummary, export: X.tabExport, settings: X.tabSettings, sources: X.tabSources, recs: X.mic };
@@ -3032,7 +3053,7 @@ function ia({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
3032
3053
  return s ? /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": N, title: T.label, className: `tabbar__tab${N ? " is-on" : ""}`, style: { flex: b }, onClick: D, children: [
3033
3054
  C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: T.sw ?? 2, style: { flex: "none" } }),
3034
3055
  m && /* @__PURE__ */ i("span", { className: "tabbar__label", children: T.label })
3035
- ] }, T.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: b }, onMouseEnter: (B) => f(B, T), onMouseMove: (B) => f(B, T), onClick: D, children: /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": N, "aria-label": T.label, className: `tabbar__tab${N ? " is-on" : ""}${(c == null ? void 0 : c.k) === T.key ? " is-tip" : ""}`, children: [
3056
+ ] }, T.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: b }, onMouseEnter: (V) => f(V, T), onMouseMove: (V) => f(V, T), onClick: D, children: /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": N, "aria-label": T.label, className: `tabbar__tab${N ? " is-on" : ""}${(c == null ? void 0 : c.k) === T.key ? " is-tip" : ""}`, children: [
3036
3057
  C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: T.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: N && !o ? "scale(1.12)" : "none" } }),
3037
3058
  /* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: m ? "1fr" : "0fr", marginLeft: m && C ? 6 : 0 }, children: /* @__PURE__ */ i("span", { className: "tabbar__label", "data-tab-l": "", style: { opacity: m ? 1 : 0, transform: m ? "none" : "translateX(-6px)" }, children: T.label }) })
3038
3059
  ] }) }, T.key);
@@ -3062,7 +3083,7 @@ function Tc({ audio: t, video: e, formats: n, onExport: r }) {
3062
3083
  }).finally(() => {
3063
3084
  u.current && l(null);
3064
3085
  }));
3065
- }, f = (p, y, T, N) => /* @__PURE__ */ g(Ce, { children: [
3086
+ }, f = (p, y, T, N) => /* @__PURE__ */ g(be, { children: [
3066
3087
  /* @__PURE__ */ i(zr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: N }),
3067
3088
  /* @__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: [
3068
3089
  o === p ? /* @__PURE__ */ i(ht, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: T, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
@@ -3076,7 +3097,7 @@ function Tc({ audio: t, video: e, formats: n, onExport: r }) {
3076
3097
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
3077
3098
  t && f("audio", t, yc, "DOWNLOAD AUDIO"),
3078
3099
  e && f("video", e, X.video, "DOWNLOAD VIDEO"),
3079
- n !== !1 && /* @__PURE__ */ g(Ce, { children: [
3100
+ n !== !1 && /* @__PURE__ */ g(be, { children: [
3080
3101
  /* @__PURE__ */ i(zr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
3081
3102
  /* @__PURE__ */ i("div", { className: "fmtgrid", children: Sr.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: [
3082
3103
  o === p.key ? /* @__PURE__ */ i(ht, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === p.key ? X.check : p.icon, size: 16, sw: 1.6, style: { color: s === p.key ? "var(--brand)" : "var(--ink-62)" } }),
@@ -3142,7 +3163,7 @@ ${a}`).catch(() => {
3142
3163
  e ? "Copied" : "Copy"
3143
3164
  ] })
3144
3165
  ] }),
3145
- t.state === "ready" ? /* @__PURE__ */ g(Ce, { children: [
3166
+ t.state === "ready" ? /* @__PURE__ */ g(be, { children: [
3146
3167
  /* @__PURE__ */ i("div", { style: { fontSize: 15, fontWeight: 600, lineHeight: 1.3, letterSpacing: "-.15px", color: "var(--ink-96)", textWrap: "pretty" }, children: s }),
3147
3168
  /* @__PURE__ */ i("div", { style: { fontSize: 13, fontWeight: 300, lineHeight: 1.55, color: "var(--ink-80)", textWrap: "pretty", whiteSpace: "pre-line" }, children: a })
3148
3169
  ] }) : 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: [
@@ -3221,7 +3242,7 @@ function Ic(t, e) {
3221
3242
  return { id: t, tabbed: a && M.length > 1, cur: h, seq: d, pinnable: o, tabKeys: M, stripTabs: e.tabs.filter((m) => M.includes(m.key)), panel: N, pin: p, unpin: y };
3222
3243
  }
3223
3244
  function bc({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
3224
- return Oc(t), /* @__PURE__ */ g(Ce, { children: [
3245
+ return Oc(t), /* @__PURE__ */ g(be, { children: [
3225
3246
  e.map((o) => {
3226
3247
  const l = t.panel(o);
3227
3248
  if (!l.show) return null;
@@ -3260,12 +3281,12 @@ function Oc(t) {
3260
3281
  F.startsWith("--") && b.style.setProperty(F, C.getPropertyValue(F));
3261
3282
  }
3262
3283
  b.style.fontFamily = C.fontFamily, b.style.color = C.color;
3263
- let D = N.el.parentElement, B = "";
3264
- for (; D && !B; ) {
3284
+ let D = N.el.parentElement, V = "";
3285
+ for (; D && !V; ) {
3265
3286
  const I = getComputedStyle(D).backgroundColor;
3266
- I && !/rgba?\(0, 0, 0, 0\)|transparent/.test(I) && !/\/ 0\.|, 0\.\d+\)$/.test(I) && (B = I), D = D.parentElement;
3287
+ I && !/rgba?\(0, 0, 0, 0\)|transparent/.test(I) && !/\/ 0\.|, 0\.\d+\)$/.test(I) && (V = I), D = D.parentElement;
3267
3288
  }
3268
- b.style.background = B || getComputedStyle(document.body).backgroundColor, document.body.appendChild(b), N.orig = [...N.col.querySelectorAll("[data-panel-key]")].map((I) => [I, I.style.order]), N.snap = {}, N.orig.forEach(([I]) => {
3289
+ b.style.background = V || getComputedStyle(document.body).backgroundColor, document.body.appendChild(b), N.orig = [...N.col.querySelectorAll("[data-panel-key]")].map((I) => [I, I.style.order]), N.snap = {}, N.orig.forEach(([I]) => {
3269
3290
  N.snap[I.getAttribute("data-panel-key")] = I.getBoundingClientRect();
3270
3291
  }), N.tabsSnap = ((ee = o(N)) == null ? void 0 : ee.getBoundingClientRect()) ?? null;
3271
3292
  const Y = N.col.querySelector("[data-panel-grid]");
@@ -3274,7 +3295,7 @@ function Oc(t) {
3274
3295
  const N = s;
3275
3296
  if (!N || !N.on || N.px == null || N.py == null) return;
3276
3297
  N.raf = 0, N.clone.style.transform = `translate3d(${N.px - N.x0}px,${N.py - N.y0}px,0)`;
3277
- const m = e.current, b = N.key, C = o(N), D = m.seq.includes(b), B = D || m.tabKeys.length > 1, Y = C && N.tabsSnap, ee = !Y || N.py < Y.top + Y.height / 2 ? B ? "pin" : null : "tabs";
3298
+ const m = e.current, b = N.key, C = o(N), D = m.seq.includes(b), V = D || m.tabKeys.length > 1, Y = C && N.tabsSnap, ee = !Y || N.py < Y.top + Y.height / 2 ? V ? "pin" : null : "tabs";
3278
3299
  let I = null;
3279
3300
  if (ee === "pin") {
3280
3301
  const A = m.seq.filter((_) => _ !== b).map((_) => N.snap[_]).filter(Boolean), w = N.grid ? A.filter((_) => _.bottom < N.py || _.top <= N.py && _.left + _.width / 2 < N.px).length : A.filter((_) => _.top + _.height / 2 < N.py).length;
@@ -3322,8 +3343,8 @@ function Oc(t) {
3322
3343
  }
3323
3344
  const b = m.closest("[data-panel-key]"), C = b == null ? void 0 : b.firstElementChild;
3324
3345
  if (!b || !C || !e.current.tabbed || !e.current.pinnable.includes(b.getAttribute("data-panel-key")) || m.closest("[role=button],[role=tab],button,a,input,textarea,select,iframe,[data-pin-pill],[contenteditable=true]")) return a(null);
3325
- const D = C.getBoundingClientRect(), B = parseFloat(getComputedStyle(b).getPropertyValue("--grip-h")) || 30;
3326
- a(N.clientY >= D.top && N.clientY <= D.top + B ? b : null);
3346
+ const D = C.getBoundingClientRect(), V = parseFloat(getComputedStyle(b).getPropertyValue("--grip-h")) || 30;
3347
+ a(N.clientY >= D.top && N.clientY <= D.top + V ? b : null);
3327
3348
  }, h = (N) => {
3328
3349
  if (!r || N.button !== 0) return;
3329
3350
  const m = d(r);
@@ -3347,19 +3368,19 @@ function Cc({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
3347
3368
  const f = c.current, p = f == null ? void 0 : f.parentElement;
3348
3369
  if (h.button !== 0 || !f || !p) return;
3349
3370
  h.preventDefault();
3350
- const y = h.currentTarget, T = getComputedStyle(p), N = p.clientWidth - parseFloat(T.paddingLeft) - parseFloat(T.paddingRight) - (parseFloat(T.columnGap) || 0), m = 320, b = 320, C = Math.max(m, N - b), D = h.clientX, B = f.getBoundingClientRect().width;
3351
- let Y = B;
3371
+ const y = h.currentTarget, T = getComputedStyle(p), N = p.clientWidth - parseFloat(T.paddingLeft) - parseFloat(T.paddingRight) - (parseFloat(T.columnGap) || 0), m = 320, b = 320, C = Math.max(m, N - b), D = h.clientX, V = f.getBoundingClientRect().width;
3372
+ let Y = V;
3352
3373
  y.classList.add("is-on");
3353
3374
  const ee = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
3354
3375
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
3355
3376
  const I = (A) => {
3356
- Y = Math.round(Math.min(C, Math.max(m, B + (D - A.clientX)))), f.style.flexBasis = `${Y}px`, document.documentElement.style.setProperty("--colw", `${Y}px`);
3377
+ Y = Math.round(Math.min(C, Math.max(m, V + (D - A.clientX)))), f.style.flexBasis = `${Y}px`, document.documentElement.style.setProperty("--colw", `${Y}px`);
3357
3378
  }, F = () => {
3358
3379
  window.removeEventListener("pointermove", I), window.removeEventListener("pointerup", F), window.removeEventListener("pointercancel", F), document.body.style.cursor = ee.cur, document.body.style.userSelect = ee.sel, y.classList.remove("is-on"), l(Y);
3359
3380
  };
3360
3381
  window.addEventListener("pointermove", I), window.addEventListener("pointerup", F), window.addEventListener("pointercancel", F);
3361
3382
  }, M = r ? { display: "none" } : void 0;
3362
- return /* @__PURE__ */ g(Ce, { children: [
3383
+ return /* @__PURE__ */ g(be, { children: [
3363
3384
  /* @__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) }) }),
3364
3385
  /* @__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 }) })
3365
3386
  ] });
@@ -3415,7 +3436,7 @@ function Ec(t) {
3415
3436
  Hn() === "caf" && (C += `${C.includes("?") ? "&" : "?"}format=caf`);
3416
3437
  const D = Date.now();
3417
3438
  e.shareCode && C.includes("recording=") && (C += `&shareCode=${encodeURIComponent(e.shareCode)}`);
3418
- const B = async () => {
3439
+ const V = async () => {
3419
3440
  if (f.current !== b) return;
3420
3441
  let Y;
3421
3442
  try {
@@ -3433,7 +3454,7 @@ function Ec(t) {
3433
3454
  return;
3434
3455
  }
3435
3456
  l(m.id), h.current = setTimeout(() => {
3436
- B();
3457
+ V();
3437
3458
  }, Dc);
3438
3459
  return;
3439
3460
  }
@@ -3455,7 +3476,7 @@ function Ec(t) {
3455
3476
  f.current === b && a(m.id);
3456
3477
  }).catch(F);
3457
3478
  };
3458
- B();
3479
+ V();
3459
3480
  }, [t, p, e]);
3460
3481
  return { armId: n, sampleId: s, dlId: o, error: c, clearError: () => u(null), arm: N, stop: y, reset: T };
3461
3482
  }
@@ -3566,7 +3587,7 @@ function vi(t, e, n) {
3566
3587
  for (let a = 0; a < n.length && n[a].start <= r; a++) s = a;
3567
3588
  return s;
3568
3589
  }
3569
- function Bt(t, e) {
3590
+ function Vt(t, e) {
3570
3591
  var l;
3571
3592
  const n = t.clipPos;
3572
3593
  if (t.wordSync || t.timed || !n || !(n.dur > 0)) return t.t;
@@ -3595,7 +3616,7 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3595
3616
  (ke = (G = f.current) == null ? void 0 : G.contentWindow) == null || ke.postMessage(JSON.stringify({ event: "command", func: W, args: ye }), "*");
3596
3617
  } catch {
3597
3618
  }
3598
- }, D = j(null), B = j(!1), Y = j(!1), ee = j(!1), I = j(a);
3619
+ }, D = j(null), V = j(!1), Y = j(!1), ee = j(!1), I = j(a);
3599
3620
  I.current = a;
3600
3621
  const F = j(d);
3601
3622
  F.current = d;
@@ -3641,12 +3662,12 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3641
3662
  const Q = j(!1), [H, E] = k(!1), x = (W) => {
3642
3663
  const ye = Se.current;
3643
3664
  return !!ye && (W < ye.start - 1 || W > ye.end + 5);
3644
- }, V = () => {
3665
+ }, B = () => {
3645
3666
  x(O.current) || C("seekTo", [O.current, !0]);
3646
3667
  }, ce = () => K.current;
3647
3668
  return S(() => {
3648
3669
  const W = (ye) => {
3649
- var Fe, Ae, he, _e, Be, $, Me, ue, ae, fe, Ye, U, R, q, se, de;
3670
+ var Fe, Ae, he, _e, Ve, $, Me, ue, ae, fe, Ye, U, R, q, se, de;
3650
3671
  if (ye.source !== ((Fe = f.current) == null ? void 0 : Fe.contentWindow) || typeof ye.data != "string") return;
3651
3672
  let G = null;
3652
3673
  try {
@@ -3654,13 +3675,13 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3654
3675
  } catch {
3655
3676
  return;
3656
3677
  }
3657
- (he = (Ae = G == null ? void 0 : G.info) == null ? void 0 : Ae.videoData) != null && he.isLive && (B.current = !0);
3678
+ (he = (Ae = G == null ? void 0 : G.info) == null ? void 0 : Ae.videoData) != null && he.isLive && (V.current = !0);
3658
3679
  const ke = (_e = G == null ? void 0 : G.info) == null ? void 0 : _e.duration;
3659
- typeof ke == "number" && ke > 0 && !B.current && (D.current == null ? D.current = ke : (Y.current = Math.abs(ke - D.current) > 1.5, _())), (G == null ? void 0 : G.event) === "onReady" && ((!F.current || F.current.muted) && C("mute"), Te(), (Be = F.current) == null || Be.onInfo({ ready: !0 })), typeof (($ = G == null ? void 0 : G.info) == null ? void 0 : $.playerState) == "number" && (G.info.playerState !== L.current && (G.info.playerState === 1 || G.info.playerState === 2) && Te(), L.current = G.info.playerState, ne(G.info.playerState !== 1 && G.info.playerState !== 3), (Me = F.current) == null || Me.onInfo({ state: G.info.playerState }));
3680
+ typeof ke == "number" && ke > 0 && !V.current && (D.current == null ? D.current = ke : (Y.current = Math.abs(ke - D.current) > 1.5, _())), (G == null ? void 0 : G.event) === "onReady" && ((!F.current || F.current.muted) && C("mute"), Te(), (Ve = F.current) == null || Ve.onInfo({ ready: !0 })), typeof (($ = G == null ? void 0 : G.info) == null ? void 0 : $.playerState) == "number" && (G.info.playerState !== L.current && (G.info.playerState === 1 || G.info.playerState === 2) && Te(), L.current = G.info.playerState, ne(G.info.playerState !== 1 && G.info.playerState !== 3), (Me = F.current) == null || Me.onInfo({ state: G.info.playerState }));
3660
3681
  const Ie = (ue = G == null ? void 0 : G.info) == null ? void 0 : ue.progressState;
3661
3682
  if (Ie && typeof Ie.seekableStart == "number" && typeof Ie.seekableEnd == "number" && Ie.seekableEnd > Ie.seekableStart) {
3662
- const be = Se.current == null;
3663
- if (Se.current = { start: Ie.seekableStart, end: Ie.seekableEnd }, be && !we.current && (C("pauseVideo"), x(O.current) || C("seekTo", [O.current, !0])), !Q.current && ve.current != null) {
3683
+ const Oe = Se.current == null;
3684
+ if (Se.current = { start: Ie.seekableStart, end: Ie.seekableEnd }, Oe && !we.current && (C("pauseVideo"), x(O.current) || C("seekTo", [O.current, !0])), !Q.current && ve.current != null) {
3664
3685
  Q.current = !0;
3665
3686
  const Ne = ve.current < Ie.seekableStart - 1;
3666
3687
  (ae = De.current) == null || ae.call(De, Ne), Ne && ((fe = Re.current) == null || fe.call(Re));
@@ -3680,11 +3701,11 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3680
3701
  return;
3681
3702
  }
3682
3703
  const W = ce();
3683
- T && (W == null || Math.abs(W - O.current) > 1.5) && V(), C(T ? "playVideo" : "pauseVideo");
3704
+ T && (W == null || Math.abs(W - O.current) > 1.5) && B(), C(T ? "playVideo" : "pauseVideo");
3684
3705
  }, [T, Z, H]), S(() => {
3685
3706
  if (!Z || s === 0 || H || d) return;
3686
3707
  const W = ce();
3687
- (W == null || Math.abs(W - O.current) > 0.5) && V(), T || C("pauseVideo");
3708
+ (W == null || Math.abs(W - O.current) > 0.5) && B(), T || C("pauseVideo");
3688
3709
  }, [s, Z]), S(() => {
3689
3710
  if (!Z) return;
3690
3711
  let W = null, ye = 0;
@@ -3706,11 +3727,11 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3706
3727
  ] })
3707
3728
  ] });
3708
3729
  }
3709
- const Qc = /* @__PURE__ */ g(Ce, { children: [
3730
+ const Qc = /* @__PURE__ */ g(be, { children: [
3710
3731
  /* @__PURE__ */ i("rect", { x: "6.5", y: "5", width: "3.75", height: "14", rx: "1.2" }),
3711
3732
  /* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
3712
- ] }), Bc = /* @__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" });
3713
- function Vc({ player: t, size: e }) {
3733
+ ] }), Vc = /* @__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" });
3734
+ function Bc({ player: t, size: e }) {
3714
3735
  const n = t.muted ? "Unmute" : "Mute";
3715
3736
  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 ? X.volumeOff : X.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3716
3737
  }
@@ -3749,7 +3770,7 @@ function qc(t, e, n, r) {
3749
3770
  N.current = n;
3750
3771
  const m = j(r);
3751
3772
  m.current = r;
3752
- const [b, C] = k(!1), D = j(!1), B = (Q) => {
3773
+ const [b, C] = k(!1), D = j(!1), V = (Q) => {
3753
3774
  D.current = Q, C(Q);
3754
3775
  }, Y = (Q, H) => {
3755
3776
  var E;
@@ -3772,16 +3793,16 @@ function qc(t, e, n, r) {
3772
3793
  const H = () => {
3773
3794
  const E = T.current, x = E.t + Math.min(1.2, (performance.now() - E.at) / 1e3);
3774
3795
  if (m.current != null && x >= m.current) {
3775
- B(!0), Y("pauseVideo"), p(x);
3796
+ V(!0), Y("pauseVideo"), p(x);
3776
3797
  return;
3777
3798
  }
3778
3799
  x > y.current && p(x), Q = requestAnimationFrame(H);
3779
3800
  };
3780
3801
  return Q = requestAnimationFrame(H), () => cancelAnimationFrame(Q);
3781
3802
  }, [l]), S(() => {
3782
- !b || r == null || r < f + 1.5 || (B(!1), Y("playVideo"));
3803
+ !b || r == null || r < f + 1.5 || (V(!1), Y("playVideo"));
3783
3804
  }, [b, r, f]), S(() => {
3784
- r == null && D.current && (B(!1), Y("playVideo"));
3805
+ r == null && D.current && (V(!1), Y("playVideo"));
3785
3806
  }, [r]);
3786
3807
  const w = 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 || w || 1, O = ze(() => {
3787
3808
  if (!t.length) return 0;
@@ -3804,7 +3825,7 @@ function qc(t, e, n, r) {
3804
3825
  }
3805
3826
  Y("playVideo"), Z(3);
3806
3827
  }, pe = () => {
3807
- ie.current = !1, window.clearTimeout(ne.current), o.current = !1, B(!1), Y("pauseVideo");
3828
+ ie.current = !1, window.clearTimeout(ne.current), o.current = !1, V(!1), Y("pauseVideo");
3808
3829
  }, le = () => {
3809
3830
  if (!a.current) {
3810
3831
  o.current = !0;
@@ -3815,7 +3836,7 @@ function qc(t, e, n, r) {
3815
3836
  return;
3816
3837
  }
3817
3838
  if (D.current) {
3818
- B(!1);
3839
+ V(!1);
3819
3840
  return;
3820
3841
  }
3821
3842
  f >= _ - 0.25 && L(0), J();
@@ -3833,7 +3854,7 @@ function qc(t, e, n, r) {
3833
3854
  return { player: {
3834
3855
  autoplay: async () => {
3835
3856
  const Q = (E) => new Promise((x) => setTimeout(x, E)), H = async (E, x) => {
3836
- for (let V = 0; V < x / 250 && !E(); V++) await Q(250);
3857
+ for (let B = 0; B < x / 250 && !E(); B++) await Q(250);
3837
3858
  return E();
3838
3859
  };
3839
3860
  if (!await H(() => a.current, 1e4)) return null;
@@ -3890,7 +3911,7 @@ function Kc(t, e, n, r, s = 0, a = null) {
3890
3911
  f.current = M;
3891
3912
  const p = j(!1), [y, T] = k(null), [N, m] = k(!1), b = j(s);
3892
3913
  b.current = s;
3893
- const C = j(null), [D, B] = k(0);
3914
+ const C = j(null), [D, V] = k(0);
3894
3915
  S(() => {
3895
3916
  m(!1);
3896
3917
  const x = C.current;
@@ -3898,19 +3919,19 @@ function Kc(t, e, n, r, s = 0, a = null) {
3898
3919
  c(!1), o.current = null;
3899
3920
  return;
3900
3921
  }
3901
- const V = _i(t), ce = b.current;
3902
- return V.preload = "metadata", V.muted = f.current || p.current, V.onplay = () => c(!0), V.onpause = () => c(!1), V.onended = () => c(!1), V.onloadedmetadata = () => {
3903
- m(!0), V.currentTime = ((x == null ? void 0 : x.t) ?? 0) + ce, x != null && x.playing && V.play().catch((W) => {
3922
+ const B = _i(t), ce = b.current;
3923
+ return B.preload = "metadata", B.muted = f.current || p.current, B.onplay = () => c(!0), B.onpause = () => c(!1), B.onended = () => c(!1), B.onloadedmetadata = () => {
3924
+ m(!0), B.currentTime = ((x == null ? void 0 : x.t) ?? 0) + ce, x != null && x.playing && B.play().catch((W) => {
3904
3925
  x.asked && (W == null ? void 0 : W.name) === "NotAllowedError" || T(It(W));
3905
3926
  });
3906
- }, V.onerror = () => {
3927
+ }, B.onerror = () => {
3907
3928
  c(!1);
3908
- const W = V.error, ye = No(W, !1);
3929
+ const W = B.error, ye = No(W, !1);
3909
3930
  Mo(t).then((G) => {
3910
- Sc(G == null ? void 0 : G.message) || Ai(W), o.current === V && (T({ message: (G == null ? void 0 : G.message) ?? ye }), G != null && G.permanent || (o.current = null));
3931
+ Sc(G == null ? void 0 : G.message) || Ai(W), o.current === B && (T({ message: (G == null ? void 0 : G.message) ?? ye }), G != null && G.permanent || (o.current = null));
3911
3932
  });
3912
- }, o.current = V, () => {
3913
- 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;
3933
+ }, o.current = B, () => {
3934
+ C.current = { t: Math.max(0, B.currentTime - ce), playing: !B.paused && !B.ended }, B.pause(), B.onplay = B.onpause = B.onended = B.onloadedmetadata = B.onerror = null, o.current = null;
3914
3935
  };
3915
3936
  }, [t, D]), S(() => () => {
3916
3937
  C.current = null;
@@ -3935,7 +3956,7 @@ function Kc(t, e, n, r, s = 0, a = null) {
3935
3956
  }, [_, a, u]), S(() => {
3936
3957
  if (!l) return;
3937
3958
  let x = 0;
3938
- const V = () => {
3959
+ const B = () => {
3939
3960
  const ce = o.current;
3940
3961
  if (ce) {
3941
3962
  const W = ce.currentTime - b.current;
@@ -3949,29 +3970,29 @@ function Kc(t, e, n, r, s = 0, a = null) {
3949
3970
  }
3950
3971
  d(W);
3951
3972
  }
3952
- x = requestAnimationFrame(V);
3973
+ x = requestAnimationFrame(B);
3953
3974
  };
3954
- return x = requestAnimationFrame(V), () => cancelAnimationFrame(x);
3975
+ return x = requestAnimationFrame(B), () => cancelAnimationFrame(x);
3955
3976
  }, [l]);
3956
3977
  const L = ze(() => {
3957
3978
  if (!n.length) return 0;
3958
3979
  let x = 0;
3959
- for (let V = 0; V < n.length; V++) n[V].start <= u + 0.05 && (x = V);
3980
+ for (let B = 0; B < n.length; B++) n[B].start <= u + 0.05 && (x = B);
3960
3981
  return x;
3961
3982
  }, [n, u]), [ie, ne] = k(0), Z = (x) => {
3962
- const V = w.current != null ? Math.min(x, Math.max(0, w.current - 0.5)) : x, ce = o.current;
3963
- d(V), ce && (ce.currentTime = V + b.current), ne((W) => W + 1);
3983
+ const B = w.current != null ? Math.min(x, Math.max(0, w.current - 0.5)) : x, ce = o.current;
3984
+ d(B), ce && (ce.currentTime = B + b.current), ne((W) => W + 1);
3964
3985
  }, J = (x) => {
3965
3986
  (x == null ? void 0 : x.name) !== "AbortError" && T(It(x));
3966
3987
  }, pe = () => {
3967
- var V;
3988
+ var B;
3968
3989
  const x = o.current;
3969
3990
  if (!x) {
3970
3991
  if (!t && e) {
3971
- C.current = (V = C.current) != null && V.asked ? null : { t: u, playing: !0, asked: !0 };
3992
+ C.current = (B = C.current) != null && B.asked ? null : { t: u, playing: !0, asked: !0 };
3972
3993
  return;
3973
3994
  }
3974
- t && B((ce) => ce + 1), T({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3995
+ t && V((ce) => ce + 1), T({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3975
3996
  return;
3976
3997
  }
3977
3998
  if (l) {
@@ -3984,14 +4005,14 @@ function Kc(t, e, n, r, s = 0, a = null) {
3984
4005
  }
3985
4006
  x.currentTime < b.current && (x.currentTime = b.current), u >= I - 0.25 && Z(0), x.play().catch(J);
3986
4007
  }, le = (x) => {
3987
- const V = n[Math.max(0, Math.min(n.length - 1, x))];
3988
- V && Z(V.start);
4008
+ const B = n[Math.max(0, Math.min(n.length - 1, x))];
4009
+ B && Z(B.start);
3989
4010
  }, Te = (x) => Z(Math.max(0, Math.min(1, x)) * I), je = (x) => {
3990
- const V = En(x, n, I);
3991
- Z(V.t);
4011
+ const B = En(x, n, I);
4012
+ Z(B.t);
3992
4013
  const ce = o.current;
3993
4014
  if (ce) {
3994
- if (!V.playing) {
4015
+ if (!B.playing) {
3995
4016
  ce.pause();
3996
4017
  return;
3997
4018
  }
@@ -3999,8 +4020,8 @@ function Kc(t, e, n, r, s = 0, a = null) {
3999
4020
  }
4000
4021
  }, Se = (x) => Z(x.start), ve = (x) => {
4001
4022
  le(x);
4002
- const V = o.current;
4003
- V && V.paused && V.play().catch(J);
4023
+ const B = o.current;
4024
+ B && B.paused && B.play().catch(J);
4004
4025
  }, we = j(!1), Ee = j(0), Re = () => {
4005
4026
  var x;
4006
4027
  l && ((x = o.current) == null || x.pause(), we.current = !0);
@@ -4013,17 +4034,17 @@ function Kc(t, e, n, r, s = 0, a = null) {
4013
4034
  const x = o.current;
4014
4035
  if (!x) return null;
4015
4036
  x.currentTime < b.current && (x.currentTime = b.current);
4016
- const V = (ce) => {
4037
+ const B = (ce) => {
4017
4038
  f.current = ce, x.muted = ce || p.current, h(ce);
4018
4039
  };
4019
4040
  try {
4020
- return V(!1), await x.play(), !0;
4041
+ return B(!1), await x.play(), !0;
4021
4042
  } catch (ce) {
4022
4043
  if ((ce == null ? void 0 : ce.name) !== "NotAllowedError")
4023
- return V(!0), null;
4044
+ return B(!0), null;
4024
4045
  }
4025
4046
  try {
4026
- return V(!0), await x.play(), !1;
4047
+ return B(!0), await x.play(), !1;
4027
4048
  } catch {
4028
4049
  return null;
4029
4050
  }
@@ -4049,10 +4070,10 @@ function Kc(t, e, n, r, s = 0, a = null) {
4049
4070
  x && (x.pause(), x.currentTime = b.current), d(0);
4050
4071
  },
4051
4072
  videoAt: (x) => {
4052
- const V = o.current;
4053
- if (!V || V.paused || V.ended || we.current || Date.now() - Ee.current < 3e3) return;
4073
+ const B = o.current;
4074
+ if (!B || B.paused || B.ended || we.current || Date.now() - Ee.current < 3e3) return;
4054
4075
  const ce = x + b.current;
4055
- Math.abs(V.currentTime - ce) <= 0.2 || (Ee.current = Date.now(), V.currentTime = ce);
4076
+ Math.abs(B.currentTime - ce) <= 0.2 || (Ee.current = Date.now(), B.currentTime = ce);
4056
4077
  },
4057
4078
  engaged: l || u > 0,
4058
4079
  prev: () => le(L - 1),
@@ -4065,8 +4086,8 @@ function Kc(t, e, n, r, s = 0, a = null) {
4065
4086
  edgeWait: _,
4066
4087
  wordSync: !0,
4067
4088
  pause: () => {
4068
- var x, V;
4069
- K(!1), (x = C.current) != null && x.asked && (C.current = null), (V = o.current) == null || V.pause();
4089
+ var x, B;
4090
+ K(!1), (x = C.current) != null && x.asked && (C.current = null), (B = o.current) == null || B.pause();
4070
4091
  },
4071
4092
  setVolume: (x) => {
4072
4093
  o.current && (o.current.volume = x);
@@ -4081,7 +4102,7 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4081
4102
  c.current = l ?? c.current;
4082
4103
  const u = j(null), [d, M] = k(!1), [h, f] = k(0), [p, y] = k(0), [T, N] = k(!1), m = j(T);
4083
4104
  m.current = T;
4084
- const [b, C] = k(null), [D, B] = k(null), [Y, ee] = k(null), [I, F] = k(null), A = j(I);
4105
+ const [b, C] = k(null), [D, V] = k(null), [Y, ee] = k(null), [I, F] = k(null), A = j(I);
4085
4106
  A.current = I;
4086
4107
  const [w, _] = k(null), [O, te] = k(null), [K, L] = k(null), [ie, ne] = k(!1), Z = j(e);
4087
4108
  Z.current = e;
@@ -4092,7 +4113,7 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4092
4113
  const je = j(a);
4093
4114
  je.current = a;
4094
4115
  const Se = Ke((U) => {
4095
- U.finite = !0, U.coming = (R) => c.current.has(R), U.readAhead = 6, U.readAheadS = 45, U.onWaiting = (R) => B(R), U.onStarting = (R) => ee(R), U.onSentence = (R) => {
4116
+ U.finite = !0, U.coming = (R) => c.current.has(R), U.readAhead = 6, U.readAheadS = 45, U.onWaiting = (R) => V(R), U.onStarting = (R) => ee(R), U.onSentence = (R) => {
4096
4117
  if (M(U.playing), R == null) return;
4097
4118
  const q = Z.current.findIndex((se) => se.sentenceId === R);
4098
4119
  q >= 0 && f(q);
@@ -4100,17 +4121,17 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4100
4121
  M(U.playing), C(R instanceof Yi ? { 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." });
4101
4122
  }, U.gapBefore = (R, q) => {
4102
4123
  if (!J.current) return 0;
4103
- const se = Z.current, de = se.find((Oe) => Oe.sentenceId === R), be = se.find((Oe) => Oe.sentenceId === q);
4104
- if (!be) return 0;
4124
+ const se = Z.current, de = se.find((Ce) => Ce.sentenceId === R), Oe = se.find((Ce) => Ce.sentenceId === q);
4125
+ if (!Oe) return 0;
4105
4126
  const Ne = A.current;
4106
- if (R == null) return Ne && Ne.sid === q ? Math.max(0, be.start - Ne.t) : 0;
4127
+ if (R == null) return Ne && Ne.sid === q ? Math.max(0, Oe.start - Ne.t) : 0;
4107
4128
  const Le = le.current;
4108
- return Le && Date.now() - Le.at < 2e3 ? Math.max(0, be.start - (Le.t + (Date.now() - Le.at) / 1e3 * U.rate)) : !de || be.start <= de.start ? 0 : Math.max(0, be.start - Ht(de, de.start, de.start + 4));
4129
+ return Le && Date.now() - Le.at < 2e3 ? Math.max(0, Oe.start - (Le.t + (Date.now() - Le.at) / 1e3 * U.rate)) : !de || Oe.start <= de.start ? 0 : Math.max(0, Oe.start - Ht(de, de.start, de.start + 4));
4109
4130
  }, U.flow = J.current, U.silentSpan = (R) => {
4110
4131
  var $e;
4111
4132
  const q = Z.current, se = q.findIndex((ut) => ut.sentenceId === R), de = q[se];
4112
4133
  if (!de) return null;
4113
- const be = (($e = q[se + 1]) == null ? void 0 : $e.start) ?? Ht(de, de.start, de.start + 4), Ne = Math.max(0, be - de.start), Le = le.current, Oe = Le && Date.now() - Le.at < 2e3 ? Le.t + (Date.now() - Le.at) / 1e3 * (U.rate || 1) : de.start, He = Math.max(0, Math.min(Ne, Oe - de.start));
4134
+ const Oe = (($e = q[se + 1]) == null ? void 0 : $e.start) ?? Ht(de, de.start, de.start + 4), Ne = Math.max(0, Oe - de.start), Le = le.current, Ce = Le && Date.now() - Le.at < 2e3 ? Le.t + (Date.now() - Le.at) / 1e3 * (U.rate || 1) : de.start, He = Math.max(0, Math.min(Ne, Ce - de.start));
4114
4135
  return { fromS: He, ms: (Ne - He) * 1e3 / (U.rate || 1) };
4115
4136
  }, U.speakable = (R) => {
4116
4137
  const q = Te.current;
@@ -4146,25 +4167,25 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4146
4167
  var U;
4147
4168
  (U = u.current) == null || U.stop(), u.current = null, ve.current = null;
4148
4169
  }, []);
4149
- const V = w != null || O != null;
4170
+ const B = w != null || O != null;
4150
4171
  S(() => {
4151
- if (!d && !V) {
4172
+ if (!d && !B) {
4152
4173
  _(null), te(null);
4153
4174
  return;
4154
4175
  }
4155
4176
  const U = () => {
4156
4177
  var Ne, Le;
4157
4178
  const q = ((Ne = u.current) == null ? void 0 : Ne.resting()) ?? null;
4158
- ne(!!(q != null && q.silent)), q != null && q.silent && A.current && (A.current = null, F(null)), te((Oe) => q == null ? null : Oe != null && Math.abs(Oe - q.s) < 0.05 ? Oe : q.s);
4179
+ ne(!!(q != null && q.silent)), q != null && q.silent && A.current && (A.current = null, F(null)), te((Ce) => q == null ? null : Ce != null && Math.abs(Ce - q.s) < 0.05 ? Ce : q.s);
4159
4180
  const se = A.current;
4160
4181
  q == null ? L(null) : se && se.sid === q.sentenceId && (L(se.t), A.current = null, F(null));
4161
- const de = ((Le = u.current) == null ? void 0 : Le.position()) ?? null, be = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
4162
- se && de && de.sentenceId === se.sid && de.t > 0.1 && F(null), _((Oe) => de ? Oe && Math.abs(Oe.t - de.t) < 0.05 && Oe.dur === de.dur && Oe.words === be ? Oe : { t: de.t, dur: de.dur, words: be } : Oe == null ? Oe : null);
4182
+ const de = ((Le = u.current) == null ? void 0 : Le.position()) ?? null, Oe = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
4183
+ se && de && de.sentenceId === se.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);
4163
4184
  };
4164
4185
  U();
4165
4186
  const R = setInterval(U, 100);
4166
4187
  return () => clearInterval(R);
4167
- }, [d, V]);
4188
+ }, [d, B]);
4168
4189
  const ce = ze(() => new Set(t.map((U) => U.sentenceId)), [t]), W = (U) => {
4169
4190
  var q;
4170
4191
  const R = (q = e[U]) == null ? void 0 : q.sentenceId;
@@ -4180,8 +4201,8 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4180
4201
  }, _e = (U) => {
4181
4202
  var q, se, de;
4182
4203
  const R = Math.max(0, Math.min(Math.max(0, e.length - 1), U));
4183
- f(R), Ae.current = R, y((be) => be + 1), (se = u.current) == null || se.seek(((q = e[R]) == null ? void 0 : q.sentenceId) ?? null), M(!!((de = u.current) != null && de.playing));
4184
- }, Be = (U) => {
4204
+ f(R), Ae.current = R, y((Oe) => Oe + 1), (se = u.current) == null || se.seek(((q = e[R]) == null ? void 0 : q.sentenceId) ?? null), M(!!((de = u.current) != null && de.playing));
4205
+ }, Ve = (U) => {
4185
4206
  var R;
4186
4207
  E(), F(null), (R = u.current) == null || R.startWithin(-1, 0), _e(U);
4187
4208
  }, $ = (U) => {
@@ -4242,7 +4263,7 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4242
4263
  var U, R, q;
4243
4264
  E(), (U = u.current) == null || U.pause(), M(!1), f(0), _(null), (q = u.current) == null || q.seek(((R = e[0]) == null ? void 0 : R.sentenceId) ?? null);
4244
4265
  },
4245
- seekRow: Be,
4266
+ seekRow: Ve,
4246
4267
  resumeAt: (U) => {
4247
4268
  H(U), t.some((R) => R.sentenceId >= (U.sentenceId ?? 0)) && (H(null), Q.current(U));
4248
4269
  },
@@ -4260,22 +4281,22 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4260
4281
  A.current = Mt, F(Mt), _e(Ge);
4261
4282
  return;
4262
4283
  }
4263
- const be = (se == null ? void 0 : se.sentenceId) ?? null, { from: Ne, span: Le } = $(q);
4264
- let Oe = Le > 0 ? Math.max(0, Math.min(1, (R - Ne) / Le)) : 0;
4265
- const He = be != null ? (it = je.current) == null ? void 0 : it[String(be)] : void 0, $e = He != null && He.length ? He[He.length - 1][1] : 0;
4284
+ const Oe = (se == null ? void 0 : se.sentenceId) ?? null, { from: Ne, span: Le } = $(q);
4285
+ let Ce = Le > 0 ? Math.max(0, Math.min(1, (R - Ne) / Le)) : 0;
4286
+ const He = Oe != null ? (it = je.current) == null ? void 0 : it[String(Oe)] : void 0, $e = He != null && He.length ? He[He.length - 1][1] : 0;
4266
4287
  if (se && He && He.length === se.words.length && $e > 0) {
4267
4288
  let Ge = 0;
4268
4289
  for (let st = 0; st < se.words.length; st++) se.words[st].start <= R && (Ge = st);
4269
4290
  const rt = se.words[Ge], Mt = rt.end > rt.start ? Math.max(0, Math.min(1, (R - rt.start) / (rt.end - rt.start))) : 0;
4270
- Oe = Math.min(1, (He[Ge][0] + Mt * (He[Ge][1] - He[Ge][0])) / $e);
4291
+ Ce = Math.min(1, (He[Ge][0] + Mt * (He[Ge][1] - He[Ge][0])) / $e);
4271
4292
  }
4272
- be != null && ((pt = u.current) == null || pt.startWithin(be, Oe)), F(Oe > 0.01 ? { t: R, sid: be } : null), _e(q);
4293
+ Oe != null && ((pt = u.current) == null || pt.startWithin(Oe, Ce)), F(Ce > 0.01 ? { t: R, sid: Oe } : null), _e(q);
4273
4294
  },
4274
4295
  seekWord: a ? (U) => {
4275
- var de, be, Ne, Le;
4296
+ var de, Oe, Ne, Le;
4276
4297
  const R = e[G];
4277
4298
  if (!R || R.sentenceId == null) return;
4278
- const q = R.words.findIndex((Oe) => Oe.seq === U.seq && Oe.idx === U.idx), se = q >= 0 ? (Ne = (be = (de = je.current) == null ? void 0 : de[String(R.sentenceId)]) == null ? void 0 : be[q]) == null ? void 0 : Ne[0] : void 0;
4299
+ const q = R.words.findIndex((Ce) => Ce.seq === U.seq && Ce.idx === U.idx), se = q >= 0 ? (Ne = (Oe = (de = je.current) == null ? void 0 : de[String(R.sentenceId)]) == null ? void 0 : Oe[q]) == null ? void 0 : Ne[0] : void 0;
4279
4300
  se != null && ((Le = u.current) == null || Le.seekWithin(se));
4280
4301
  } : void 0,
4281
4302
  playRow: (U) => {
@@ -4286,11 +4307,11 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4286
4307
  },
4287
4308
  prev: () => {
4288
4309
  const U = ye(G - 1, -1);
4289
- U != null && Be(U);
4310
+ U != null && Ve(U);
4290
4311
  },
4291
4312
  next: () => {
4292
4313
  const U = ye(G + 1, 1);
4293
- U != null && Be(U);
4314
+ U != null && Ve(U);
4294
4315
  },
4295
4316
  hold: () => {
4296
4317
  var U;
@@ -4306,11 +4327,11 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
4306
4327
  }
4307
4328
  };
4308
4329
  function Ye(U) {
4309
- var se, de, be, Ne;
4330
+ var se, de, Oe, Ne;
4310
4331
  const R = (se = e[U]) == null ? void 0 : se.sentenceId;
4311
4332
  if (R == null) return;
4312
4333
  f(U), Ae.current = U, F(null), A.current = null, (de = u.current) == null || de.joinSilently(R);
4313
- const q = ((be = u.current) == null ? void 0 : be.resting()) ?? null;
4334
+ const q = ((Oe = u.current) == null ? void 0 : Oe.resting()) ?? null;
4314
4335
  te((q == null ? void 0 : q.s) ?? null), ne(!!(q != null && q.silent)), M(!!((Ne = u.current) != null && Ne.playing));
4315
4336
  }
4316
4337
  return fe.joinAt = o ? (U) => {
@@ -4329,21 +4350,21 @@ const Xc = () => {
4329
4350
  }, eu = "The language this recording is read aloud in.", tu = { title: "READ IN", note: "The transcript and its voice switch to this language." };
4330
4351
  function nu({ 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: f = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: T = null, voiceSheet: N, forcedVoice: m = null }) {
4331
4352
  var mn, xt, Nn, an;
4332
- const { onAddVoice: b, onPickVoice: C, onSelectSpeaker: D, noCloneFor: B, castNoClone: Y, castShort: ee, castBuilding: I, castWarn: F, badge: A, titleNode: w } = N ?? {}, _ = !!N, O = !!(N != null && N.pendingClones), [te, K] = $i(), [L, ie] = k(null), [ne, Z] = k(!1), [J, pe] = k(!1), [le, Te] = k(!1), [je, Se] = k(!1), ve = u ?? l, we = u === null, Ee = u != null || L != null, De = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : ve) ? we ? l : ve : "en", Q = Ec(De), H = (N == null ? void 0 : N.cloneOn) ?? !0, [E, x] = k(0), V = j(H);
4353
+ const { onAddVoice: b, onPickVoice: C, onSelectSpeaker: D, noCloneFor: V, castNoClone: Y, castShort: ee, castBuilding: I, castWarn: F, badge: A, titleNode: w } = N ?? {}, _ = !!N, O = !!(N != null && N.pendingClones), [te, K] = $i(), [L, ie] = k(null), [ne, Z] = k(!1), [J, pe] = k(!1), [le, Te] = k(!1), [je, Se] = k(!1), ve = u ?? l, we = u === null, Ee = u != null || L != null, De = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : ve) ? we ? l : ve : "en", Q = Ec(De), H = (N == null ? void 0 : N.cloneOn) ?? !0, [E, x] = k(0), B = j(H);
4333
4354
  S(() => {
4334
- V.current !== H && (V.current = H, x((P) => P + 1));
4355
+ B.current !== H && (B.current = H, x((P) => P + 1));
4335
4356
  }, [H]);
4336
- const ce = gc(De, Ee || s || J, fc(e) * 1e3 + E, { id: t ?? null, shareCode: a.shareCode ?? null }), W = ze(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => _ || !P.cloned || P.speaker != null), [ce, _]), ye = W.length > 1, G = Dr(o, ve), ke = ea(), Ie = ze(() => Qi(o, "translation"), [o]), [Fe, Ae] = k(null), [he] = k(() => /* @__PURE__ */ new Set()), [_e, Be] = k({}), $ = ze(() => cc(n, e, ke.vcUnknownSpk), [n, e, ke]), Me = ye && $.filter((P) => P.key >= 0).length > 1, ue = Fe != null && $.some((P) => P.key === Fe) ? Fe : ((mn = $[0]) == null ? void 0 : mn.key) ?? null, ae = ze(() => {
4357
+ const ce = gc(De, Ee || s || J, fc(e) * 1e3 + E, { id: t ?? null, shareCode: a.shareCode ?? null }), W = ze(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => _ || !P.cloned || P.speaker != null), [ce, _]), ye = W.length > 1, G = Dr(o, ve), ke = ea(), Ie = ze(() => Qi(o, "translation"), [o]), [Fe, Ae] = k(null), [he] = k(() => /* @__PURE__ */ new Set()), [_e, Ve] = k({}), $ = ze(() => cc(n, e, ke.vcUnknownSpk), [n, e, ke]), Me = ye && $.filter((P) => P.key >= 0).length > 1, ue = Fe != null && $.some((P) => P.key === Fe) ? Fe : ((mn = $[0]) == null ? void 0 : mn.key) ?? null, ae = ze(() => {
4337
4358
  const P = Ti($, W, H);
4338
4359
  for (const [xe, Qe] of Object.entries(_e[De ?? ""] ?? {})) P.set(Number(xe), Qe);
4339
4360
  return P;
4340
- }, [$, W, _e, De, H]), fe = Me && Object.keys(_e[De ?? ""] ?? {}).length > 0, Ye = ze(() => p && !fe ? Ti($, W, !1) : null, [p, fe, $, W]), U = ze(() => fe ? Ni(ae) || null : Ye && Ni(Ye) || null, [fe, ae, Ye]), R = fe ? ae : Ye, q = W.some((P) => P.cloned && P.consent !== "pending"), se = !!ve && !!(o != null && o.voice.includes(ve)), de = se && !h, be = ze(
4361
+ }, [$, W, _e, De, H]), fe = Me && Object.keys(_e[De ?? ""] ?? {}).length > 0, Ye = ze(() => p && !fe ? Ti($, W, !1) : null, [p, fe, $, W]), U = ze(() => fe ? Ni(ae) || null : Ye && Ni(Ye) || null, [fe, ae, Ye]), R = fe ? ae : Ye, q = W.some((P) => P.cloned && P.consent !== "pending"), se = !!ve && !!(o != null && o.voice.includes(ve)), de = se && !h, Oe = ze(
4341
4362
  () => n.filter((P) => !P.suppressed && !P.unclear).map((P) => P.sentenceId).filter((P) => P != null),
4342
4363
  [n]
4343
- ), Ne = pc({ recordingId: t, lang: ve, ended: s, cred: a, pickedVoice: m || (U ?? L), sentenceIds: s && de ? be : void 0 }), Le = W.find((P) => P.id === L) ?? W.find((P) => {
4364
+ ), Ne = pc({ recordingId: t, lang: ve, ended: s, cred: a, pickedVoice: m || (U ?? L), sentenceIds: s && de ? Oe : void 0 }), Le = W.find((P) => P.id === L) ?? W.find((P) => {
4344
4365
  var xe;
4345
4366
  return P.id === ((xe = Ne.track) == null ? void 0 : xe.voice);
4346
- }) ?? W.find((P) => P.default) ?? W[0] ?? null, Oe = (Le == null ? void 0 : Le.id) ?? null;
4367
+ }) ?? W.find((P) => P.default) ?? W[0] ?? null, Ce = (Le == null ? void 0 : Le.id) ?? null;
4347
4368
  S(() => {
4348
4369
  if (!Ne.rendering) return;
4349
4370
  const P = setInterval(Ne.reload, 4e3);
@@ -4370,12 +4391,12 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4370
4391
  pause: () => {
4371
4392
  Se(!1), $e.pause();
4372
4393
  }
4373
- }, st = () => Z(!0), Ve = () => {
4394
+ }, st = () => Z(!0), Be = () => {
4374
4395
  Z(!1), pe(le), Te(!1);
4375
4396
  }, Mn = (P) => {
4376
4397
  if (d(P), K(P), !((M || y) && !le)) {
4377
4398
  if (P != null) {
4378
- Ve();
4399
+ Be();
4379
4400
  return;
4380
4401
  }
4381
4402
  Q.reset(), Z(!1), pe(!1), Te(!1);
@@ -4399,11 +4420,11 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4399
4420
  }, gn = (P) => {
4400
4421
  if (Q.reset(), pe(Me), (ve !== De || we) && d(De), Ne.forget(), Se(!0), Me && ue != null && De) {
4401
4422
  const xe = new Map(ae);
4402
- xe.set(ue, P), Be((Qe) => ({ ...Qe, [De]: Object.fromEntries(xe) })), ie(null);
4423
+ xe.set(ue, P), Ve((Qe) => ({ ...Qe, [De]: Object.fromEntries(xe) })), ie(null);
4403
4424
  return;
4404
4425
  }
4405
4426
  ie(P);
4406
- }, z = we ? { ...Dr(o, null), flag: /* @__PURE__ */ i(oe, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : G, Wn = 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(Rn, { flag: z.flag, code: z.code, bordered: !1, onClick: tn, flagOnly: !0, label: z.label }) }) : /* @__PURE__ */ i(Rn, { flag: z.flag, code: z.code, bordered: !1, onClick: st, flagOnly: !0, label: z.label }) : null, Et = X.voiceClone, _t = Ee && (!!Ne.track || ut), Yt = it ? "var(--conf-low)" : _t || M && at ? "var(--brand)" : "var(--ink-55)", Ft = Yc({ on: Ee, want: je, relang: rt, playing: $e.playing, preparing: !!$e.preparing, starting: $e.starting }), [fn] = oa(Ft === "line", 400), qe = Ft === "asked" || Ft === "line" && fn, ot = ut || qe, nn = Ft === "asked" ? wi : $e.preparing ? `Speaking this line in ${(Le == null ? void 0 : Le.name) ?? "this voice"}…` : ut ? `Preparing this recording in ${(Le == null ? void 0 : Le.name) ?? "this voice"} — it will play as soon as it is ready` : it ? `This voice could not be prepared: ${it}` : se ? ye ? "Choose a voice" : Le ? Le.name : ke.vcNoVoice + G.label : `${ke.vcNoVoice}${G.label}`, mt = /* @__PURE__ */ i(Io, { open: ne, onClose: Ve, keepOpen: (!!M || y) && !le, value: we ? null : ve, onSelect: Mn, languages: Ie, title: (M == null ? void 0 : M.title) ?? "SPOKEN LANGUAGE", note: (M == null ? void 0 : M.note) ?? eu, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : ve) ? [we ? l : ve] : [], recent: te, requireVoice: le, sticky: y, busy: T }), gt = ze(() => W.filter((P) => P.cloned && !P.auto), [W]), Zt = (P) => P.voiceId ? gt.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, dt = ze(() => $.filter((P) => P.key >= 0), [$]), rn = ze(() => {
4427
+ }, z = we ? { ...Dr(o, null), flag: /* @__PURE__ */ i(oe, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : G, Wn = 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(Rn, { flag: z.flag, code: z.code, bordered: !1, onClick: tn, flagOnly: !0, label: z.label }) }) : /* @__PURE__ */ i(Rn, { flag: z.flag, code: z.code, bordered: !1, onClick: st, flagOnly: !0, label: z.label }) : null, Et = X.voiceClone, _t = Ee && (!!Ne.track || ut), Yt = it ? "var(--conf-low)" : _t || M && at ? "var(--brand)" : "var(--ink-55)", Ft = Yc({ on: Ee, want: je, relang: rt, playing: $e.playing, preparing: !!$e.preparing, starting: $e.starting }), [fn] = oa(Ft === "line", 400), qe = Ft === "asked" || Ft === "line" && fn, ot = ut || qe, nn = Ft === "asked" ? wi : $e.preparing ? `Speaking this line in ${(Le == null ? void 0 : Le.name) ?? "this voice"}…` : ut ? `Preparing this recording in ${(Le == null ? void 0 : Le.name) ?? "this voice"} — it will play as soon as it is ready` : it ? `This voice could not be prepared: ${it}` : se ? ye ? "Choose a voice" : Le ? Le.name : ke.vcNoVoice + G.label : `${ke.vcNoVoice}${G.label}`, mt = /* @__PURE__ */ i(Io, { open: ne, onClose: Be, keepOpen: (!!M || y) && !le, value: we ? null : ve, onSelect: Mn, languages: Ie, title: (M == null ? void 0 : M.title) ?? "SPOKEN LANGUAGE", note: (M == null ? void 0 : M.note) ?? eu, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : ve) ? [we ? l : ve] : [], recent: te, requireVoice: le, sticky: y, busy: T }), gt = ze(() => W.filter((P) => P.cloned && !P.auto), [W]), Zt = (P) => P.voiceId ? gt.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, dt = ze(() => $.filter((P) => P.key >= 0), [$]), rn = ze(() => {
4407
4428
  const P = W.filter((Qe) => !Qe.cloned);
4408
4429
  if (!Me) return [...P, ...s && dt.length === 1 ? gt.filter((Qe) => Qe.id === `clone:${dt[0].voiceId}`) : []];
4409
4430
  const xe = [];
@@ -4444,14 +4465,14 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4444
4465
  onAdd: (P) => {
4445
4466
  Q.reset(), b == null || b(P);
4446
4467
  },
4447
- noClone: ct && !Ze.some((P) => P.cloned) ? (B == null ? void 0 : B(ct, Ut(ct.key), wt)) ?? null : null,
4468
+ noClone: ct && !Ze.some((P) => P.cloned) ? (V == null ? void 0 : V(ct, Ut(ct.key), wt)) ?? null : null,
4448
4469
  usedBy: Me && ue != null ? (P) => {
4449
4470
  const xe = $.filter((Qe) => Qe.key !== ue && ae.get(Qe.key) === P.id);
4450
4471
  return xe.length ? xe.map((Qe) => Qe.name).join(", ") : null;
4451
4472
  } : void 0,
4452
4473
  foldKey: ue,
4453
4474
  foldFor: bt,
4454
- currentId: Me && ue != null ? ae.get(ue) ?? null : Oe,
4475
+ currentId: Me && ue != null ? ae.get(ue) ?? null : Ce,
4455
4476
  armedId: Q.armId,
4456
4477
  sampleId: Q.sampleId,
4457
4478
  dlId: Q.dlId,
@@ -4468,7 +4489,7 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4468
4489
  },
4469
4490
  onUse: gn
4470
4491
  }
4471
- ) }), Fn = M ? null : /* @__PURE__ */ g(Ce, { children: [
4492
+ ) }), Fn = M ? null : /* @__PURE__ */ g(be, { children: [
4472
4493
  mt,
4473
4494
  Ot
4474
4495
  ] }), Zn = M && (ne || J) ? /* @__PURE__ */ i("div", { className: "vs-side", children: ne ? mt : Ot }) : null, Ct = Ge ? it ? `This voice could not be prepared: ${it}` : qe && (je || $e.playing) ? wi : null : null, Gn = pt;
@@ -4507,7 +4528,7 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4507
4528
  armVoice: Q.arm,
4508
4529
  resetPreview: Q.reset,
4509
4530
  armedId: Q.armId,
4510
- resetCast: () => Be((P) => ({ ...P, [De ?? ""]: {} })),
4531
+ resetCast: () => Ve((P) => ({ ...P, [De ?? ""]: {} })),
4511
4532
  readLang: typeof u == "string" && u !== l ? u : null,
4512
4533
  readVoiceKey: m || (U ?? L ?? ((an = Ne.track) == null ? void 0 : an.voiceKey) ?? ""),
4513
4534
  pickedVoiceKey: U ?? L ?? null,
@@ -4518,12 +4539,12 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4518
4539
  clips: Ne.clips,
4519
4540
  setNear: Ne.setNear,
4520
4541
  closePicker: () => {
4521
- lt && Ve();
4542
+ lt && Be();
4522
4543
  },
4523
4544
  langList: { value: we ? null : ve, onSelect: Mn, languages: Ie, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : ve) ? [we ? l : ve] : [], recent: te }
4524
4545
  };
4525
4546
  }
4526
- function ru({ 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: f, running: p, desk: y, feedRef: T, listener: N, showLabels: m, find: b, findOpen: C, lang: D, warm: B, onVisible: Y, wordHl: ee = !0 }) {
4547
+ function ru({ 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: f, running: p, desk: y, feedRef: T, listener: N, showLabels: m, find: b, findOpen: C, lang: D, warm: V, onVisible: Y, wordHl: ee = !0 }) {
4527
4548
  const { playing: I, engaged: F, t: A, idx: w, seekN: _, wordSync: O, clipPos: te } = n;
4528
4549
  jc(!0, T);
4529
4550
  const K = j(null);
@@ -4544,36 +4565,36 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4544
4565
  const G = ye.join(",");
4545
4566
  G !== Se.current && (Se.current = G, Y(ye));
4546
4567
  }, x = window.setTimeout(E, 120);
4547
- let V;
4568
+ let B;
4548
4569
  const ce = () => {
4549
- window.clearTimeout(V), V = window.setTimeout(E, 120);
4570
+ window.clearTimeout(B), B = window.setTimeout(E, 120);
4550
4571
  };
4551
4572
  return H.addEventListener("scroll", ce, { passive: !0 }), () => {
4552
- window.clearTimeout(x), window.clearTimeout(V), H.removeEventListener("scroll", ce);
4573
+ window.clearTimeout(x), window.clearTimeout(B), H.removeEventListener("scroll", ce);
4553
4574
  };
4554
4575
  }, [e, Y, T]);
4555
4576
  const ve = (H) => {
4556
4577
  const E = T.current, x = je(H);
4557
4578
  if (!E || !x) return;
4558
- const V = x.getBoundingClientRect().top - E.getBoundingClientRect().top + E.scrollTop, ce = E.scrollHeight - E.clientHeight, W = wr(E), ye = Math.max(80, E.clientHeight - W.top - W.bottom), G = x.offsetHeight > ye ? 8 : (ye - x.offsetHeight) / 2;
4559
- E.scrollTop = Math.max(0, Math.min(ce, V - W.top - G));
4579
+ const B = x.getBoundingClientRect().top - E.getBoundingClientRect().top + E.scrollTop, ce = E.scrollHeight - E.clientHeight, W = wr(E), ye = Math.max(80, E.clientHeight - W.top - W.bottom), G = x.offsetHeight > ye ? 8 : (ye - x.offsetHeight) / 2;
4580
+ E.scrollTop = Math.max(0, Math.min(ce, B - W.top - G));
4560
4581
  }, we = (H) => {
4561
4582
  const E = T.current, x = je(H);
4562
4583
  if (!E || !E.clientHeight || !E.offsetParent || !x) return 0;
4563
- const V = x.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = wr(E), ye = ce.top + W.top, G = ce.bottom - W.bottom;
4564
- return V.height > G - ye ? V.top < ye - 4 ? -1 : V.top > G - 60 ? 1 : 0 : V.bottom < ye + 10 ? -1 : V.bottom > G - 4 ? 1 : 0;
4584
+ const B = x.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = wr(E), ye = ce.top + W.top, G = ce.bottom - W.bottom;
4585
+ return B.height > G - ye ? B.top < ye - 4 ? -1 : B.top > G - 60 ? 1 : 0 : B.bottom < ye + 10 ? -1 : B.bottom > G - 4 ? 1 : 0;
4565
4586
  }, Ee = (H) => {
4566
4587
  pe.current = performance.now() + 420;
4567
4588
  const E = T.current, x = je(H);
4568
4589
  if (!E || !E.clientHeight || !x) return;
4569
- const V = x.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = E.scrollHeight - E.clientHeight, ye = E.scrollTop, G = wr(E), ke = Math.max(80, E.clientHeight - G.top - G.bottom), Ie = V.height > ke ? 8 : (ke - V.height) / 2, Fe = Math.max(0, Math.min(W, ye + (V.top - ce.top) - G.top - Ie));
4590
+ const B = x.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = E.scrollHeight - E.clientHeight, ye = E.scrollTop, G = wr(E), ke = Math.max(80, E.clientHeight - G.top - G.bottom), Ie = B.height > ke ? 8 : (ke - B.height) / 2, Fe = Math.max(0, Math.min(W, ye + (B.top - ce.top) - G.top - Ie));
4570
4591
  if (le.current && cancelAnimationFrame(le.current), Math.abs(Fe - ye) < 2) {
4571
4592
  E.scrollTop = Fe, le.current = null;
4572
4593
  return;
4573
4594
  }
4574
4595
  const Ae = performance.now(), he = 360, _e = () => {
4575
- const Be = Math.min(1, (performance.now() - Ae) / he);
4576
- E.scrollTop = ye + (Fe - ye) * (1 - Math.pow(1 - Be, 3)), le.current = Be < 1 ? requestAnimationFrame(_e) : null;
4596
+ const Ve = Math.min(1, (performance.now() - Ae) / he);
4597
+ E.scrollTop = ye + (Fe - ye) * (1 - Math.pow(1 - Ve, 3)), le.current = Ve < 1 ? requestAnimationFrame(_e) : null;
4577
4598
  };
4578
4599
  le.current = requestAnimationFrame(_e);
4579
4600
  };
@@ -4589,8 +4610,8 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4589
4610
  const H = () => {
4590
4611
  const x = w !== Te.current;
4591
4612
  Te.current = w;
4592
- let V = performance.now() < pe.current ? 0 : we(w);
4593
- x && V && !Re.current && (ve(w), V = 0), Re.current = V, J(V);
4613
+ let B = performance.now() < pe.current ? 0 : we(w);
4614
+ x && B && !Re.current && (ve(w), B = 0), Re.current = B, J(B);
4594
4615
  };
4595
4616
  H();
4596
4617
  const E = setInterval(H, 200);
@@ -4609,13 +4630,13 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4609
4630
  I && Z === -1 && Q("up"),
4610
4631
  e.map((H, E) => {
4611
4632
  var Me;
4612
- const x = I && E === w, V = F && E === w, ce = !!u && u === H.id, W = ne && !H.text.toLowerCase().includes(ne) && !(D && ((Me = H.translations[D]) != null && Me.toLowerCase().includes(ne))) ? 0.22 : !F || E <= w || ce ? 1 : 0.38, ye = N ? () => n.playRow(E) : c && l ? () => {
4633
+ const x = I && E === w, B = F && E === w, ce = !!u && u === H.id, W = ne && !H.text.toLowerCase().includes(ne) && !(D && ((Me = H.translations[D]) != null && Me.toLowerCase().includes(ne))) ? 0.22 : !F || E <= w || ce ? 1 : 0.38, ye = N ? () => n.playRow(E) : c && l ? () => {
4613
4634
  I && !x && n.seekRow(E), l(H);
4614
- } : I && x ? void 0 : () => n.playRow(E), G = N ? null : rc(H, s, r), ke = !!G && (G.script > 0 || G.manual), Ie = y && !!a && L === H.id && !!G && !ke, Fe = $r(t, H.speaker), Ae = Qr(t, H.speaker), he = Ae.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Be = la(e, E, D), $ = V && !O && te ? Ri(Be.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4615
- return /* @__PURE__ */ g("div", { "data-tx-row": E, "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: [
4635
+ } : I && x ? void 0 : () => n.playRow(E), G = N ? null : rc(H, s, r), ke = !!G && (G.script > 0 || G.manual), Ie = y && !!a && L === H.id && !!G && !ke, Fe = $r(t, H.speaker), Ae = Qr(t, H.speaker), he = Ae.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Ve = la(e, E, D), $ = B && !O && te ? Ri(Ve.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4636
+ return /* @__PURE__ */ g("div", { "data-tx-row": E, "data-sentence": H.sentenceId, className: `txline${V ? " 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: [
4616
4637
  /* @__PURE__ */ g("div", { className: "txline__meta", children: [
4617
4638
  /* @__PURE__ */ i("span", { className: "txline__at", children: jt(H.start) }),
4618
- m && H.speaker >= 0 && /* @__PURE__ */ g(Ce, { children: [
4639
+ m && H.speaker >= 0 && /* @__PURE__ */ g(be, { children: [
4619
4640
  /* @__PURE__ */ i("div", { className: `lanechip bg-lane-${he}`, style: Ae.soft ? { background: Ae.soft, color: Ae.fg } : void 0, children: Zi(t, H.speaker) }),
4620
4641
  /* @__PURE__ */ i("span", { className: `txline__who lane-${he}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Fe }),
4621
4642
  Ae.hasVoice && /* @__PURE__ */ i(sa, { color: Ae.fg ?? `var(--lane-${he})` })
@@ -4624,8 +4645,8 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4624
4645
  G && M && /* @__PURE__ */ i(sc, { f: G, desk: y, onOpen: a ? () => a(H, !0) : void 0 }),
4625
4646
  Ie && /* @__PURE__ */ i(ic, { alone: !0, onOpen: () => a == null ? void 0 : a(H, !1) })
4626
4647
  ] }),
4627
- /* @__PURE__ */ i("div", { className: "txline__text", children: Be.map((ue, ae) => {
4628
- const fe = `${ue.seq}:${ue.idx}`, Ye = kl(ue.prob), U = V && ee, R = U && (O ? A >= ue.start && (A < ue.end || ae === Be.length - 1 || A < Be[ae + 1].start) : ae === $), q = U && !R && (O ? ue.start > A : $ != null && ae > $), se = !_e && !N && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !N && d && !!Ye && !se, be = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, Ne = se ? "var(--brand)" : q ? "var(--ink-40)" : be ?? "var(--ink-96)";
4648
+ /* @__PURE__ */ i("div", { className: "txline__text", children: Ve.map((ue, ae) => {
4649
+ const fe = `${ue.seq}:${ue.idx}`, Ye = kl(ue.prob), U = B && ee, R = U && (O ? A >= ue.start && (A < ue.end || ae === Ve.length - 1 || A < Ve[ae + 1].start) : ae === $), q = U && !R && (O ? ue.start > A : $ != null && ae > $), se = !_e && !N && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !N && d && !!Ye && !se, Oe = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, Ne = se ? "var(--brand)" : q ? "var(--ink-40)" : Oe ?? "var(--ink-96)";
4629
4650
  return /* @__PURE__ */ g("span", { children: [
4630
4651
  /* @__PURE__ */ i(
4631
4652
  "span",
@@ -4633,18 +4654,18 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4633
4654
  className: "txw",
4634
4655
  title: o && !_e ? c ? "Correct this word" : x && I && n.seekWord ? "Play from this word" : "Play from this line" : x ? "" : "Play from this line",
4635
4656
  onClick: o && !_e ? (Le) => {
4636
- var Oe;
4657
+ var Ce;
4637
4658
  if (Le.stopPropagation(), c) {
4638
4659
  o(H, ue);
4639
4660
  return;
4640
4661
  }
4641
4662
  if (I && x) {
4642
- (Oe = n.seekWord) == null || Oe.call(n, ue);
4663
+ (Ce = n.seekWord) == null || Ce.call(n, ue);
4643
4664
  return;
4644
4665
  }
4645
4666
  n.playRow(E);
4646
4667
  } : void 0,
4647
- style: { color: Ne, opacity: q ? 0.45 : 1, fontWeight: 300, cursor: o && !_e ? c || !x || !I || n.seekWord ? "pointer" : "default" : x ? "default" : "pointer", textShadow: R ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: de || se ? "underline" : "none", textDecorationStyle: se ? "solid" : "dotted", textDecorationColor: se ? "var(--brand)" : be ?? "currentColor", textDecorationThickness: de || se ? "1.5px" : void 0, textUnderlineOffset: de || se ? "3px" : void 0 },
4668
+ style: { color: Ne, opacity: q ? 0.45 : 1, fontWeight: 300, cursor: o && !_e ? c || !x || !I || n.seekWord ? "pointer" : "default" : x ? "default" : "pointer", textShadow: R ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: de || se ? "underline" : "none", textDecorationStyle: se ? "solid" : "dotted", textDecorationColor: se ? "var(--brand)" : Oe ?? "currentColor", textDecorationThickness: de || se ? "1.5px" : void 0, textUnderlineOffset: de || se ? "3px" : void 0 },
4648
4669
  children: ue.text
4649
4670
  }
4650
4671
  ),
@@ -4809,12 +4830,12 @@ function cu(t) {
4809
4830
  m(K, L, te), m(L, K, te);
4810
4831
  }
4811
4832
  }
4812
- let B = 0;
4833
+ let V = 0;
4813
4834
  for (let w = r - 1; w >= 1; w -= 2) {
4814
4835
  w === 6 && (w = 5);
4815
4836
  for (let _ = 0; _ < r; _++) for (let O = 0; O < 2; O++) {
4816
4837
  const te = w - O, K = w + 1 & 2 ? _ : r - 1 - _;
4817
- !N[K][te] && B < y.length * 8 && (T[K][te] = (y[B >>> 3] >>> 7 - (B & 7) & 1) !== 0, B++);
4838
+ !N[K][te] && V < y.length * 8 && (T[K][te] = (y[V >>> 3] >>> 7 - (V & 7) & 1) !== 0, V++);
4818
4839
  }
4819
4840
  }
4820
4841
  const Y = (w, _, O) => {
@@ -4934,7 +4955,7 @@ function Yn({ pos: t, interactive: e, axis: n = "x" }) {
4934
4955
  const u = a(c);
4935
4956
  s(null), t.onSeek(u);
4936
4957
  }, l = r != null ? r * 100 : t.pct;
4937
- return /* @__PURE__ */ g(Ce, { children: [
4958
+ return /* @__PURE__ */ g(be, { children: [
4938
4959
  /* @__PURE__ */ i("span", { className: `gfull__t${e ? " gfull__t--at" : ""}`, children: r != null ? t.labelAt(r) : t.atLabel }),
4939
4960
  /* @__PURE__ */ i(
4940
4961
  "div",
@@ -5026,7 +5047,7 @@ function Un({ t, mini: e }) {
5026
5047
  }
5027
5048
  function _r({ live: t, mini: e, desk: n, pct: r, mark: s }) {
5028
5049
  return /* @__PURE__ */ g("div", { className: `gfull__brand${s ? " gfull__brand--mark" : ""}`, children: [
5029
- /* @__PURE__ */ i("a", { href: Si, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(Yr, { dark: !0, size: 22 }) : /* @__PURE__ */ i(Vn, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
5050
+ /* @__PURE__ */ i("a", { href: Si, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(Yr, { dark: !0, size: 22 }) : /* @__PURE__ */ i(Bn, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
5030
5051
  t && /* @__PURE__ */ g("span", { className: "gfull__live", children: [
5031
5052
  /* @__PURE__ */ i("i", {}),
5032
5053
  "LIVE"
@@ -5061,7 +5082,7 @@ function gu({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
5061
5082
  ] });
5062
5083
  }
5063
5084
  const fu = { color: "rgba(255,255,255,.4)" };
5064
- function ha({ 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: f, transport: p, picker: y, sheet: T, voices: N, voicesBtn: m, sheetOpen: b, onShare: C, onSettings: D, paused: B, copied: Y, onTouch: ee, onClose: I }) {
5085
+ function ha({ 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: f, transport: p, picker: y, sheet: T, voices: N, voicesBtn: m, sheetOpen: b, onShare: C, onSettings: D, paused: V, copied: Y, onTouch: ee, onClose: I }) {
5065
5086
  const [F, A] = k(() => !!vr());
5066
5087
  S(() => {
5067
5088
  const $ = () => A(!!vr());
@@ -5149,22 +5170,22 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5149
5170
  const U = (de) => Math.round((de.getBoundingClientRect().top - $.getBoundingClientRect().top + $.scrollTop) / ae), R = Math.max(1, Math.round($.clientHeight / ae)), q = Me ? ue.length ? Math.floor(U(ue[ue.length - 1]) / R) * R * ae : 0 : Ye, se = Math.max(0, Math.min(Ye, q));
5150
5171
  Math.abs(se - $.scrollTop) > 1 && ($.scrollTop = se);
5151
5172
  }, [x, H]);
5152
- const [V, ce] = k(!0), [W, ye] = k(!1), G = j(void 0);
5173
+ const [B, ce] = k(!0), [W, ye] = k(!1), G = j(void 0);
5153
5174
  S(() => () => window.clearTimeout(G.current), []);
5154
- const ke = B != null && B.share ? B.share.url(V && B.share.at >= 1 ? Math.floor(B.share.at) : null) : "", Ie = ze(() => we && ke && !p.playing ? uu(ke) : "", [we, ke, p.playing]), Fe = () => {
5175
+ const ke = V != null && V.share ? V.share.url(B && V.share.at >= 1 ? Math.floor(V.share.at) : null) : "", Ie = ze(() => we && ke && !p.playing ? uu(ke) : "", [we, ke, p.playing]), Fe = () => {
5155
5176
  var $;
5156
5177
  ($ = navigator.clipboard) == null || $.writeText(ke).then(() => {
5157
5178
  ye(!0), window.clearTimeout(G.current), G.current = window.setTimeout(() => ye(!1), 1800);
5158
5179
  }, () => {
5159
5180
  });
5160
- }, Ae = we && (B == null ? void 0 : B.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: ($) => $.stopPropagation(), onClick: ($) => $.stopPropagation(), children: [
5181
+ }, Ae = we && (V == null ? void 0 : V.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: ($) => $.stopPropagation(), onClick: ($) => $.stopPropagation(), children: [
5161
5182
  Ie && /* @__PURE__ */ i("div", { className: "gfull__shareqr", role: "img", "aria-label": "QR code for this link", style: { backgroundImage: `url("${Ie}")` } }),
5162
5183
  /* @__PURE__ */ g("div", { className: "gfull__sharebody", children: [
5163
5184
  /* @__PURE__ */ i("div", { className: "gfull__shareeyebrow", children: "SHARE THIS MOMENT" }),
5164
5185
  /* @__PURE__ */ g("label", { className: "gfull__shareat", children: [
5165
- /* @__PURE__ */ i("input", { type: "checkbox", checked: V, onChange: ($) => ce($.target.checked), disabled: B.share.at < 1 }),
5186
+ /* @__PURE__ */ i("input", { type: "checkbox", checked: B, onChange: ($) => ce($.target.checked), disabled: V.share.at < 1 }),
5166
5187
  "Start at ",
5167
- jt(Math.floor(B.share.at))
5188
+ jt(Math.floor(V.share.at))
5168
5189
  ] }),
5169
5190
  /* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: ke.replace(/^https?:\/\//, "") }) }),
5170
5191
  /* @__PURE__ */ g("div", { className: "gfull__shareacts", children: [
@@ -5183,7 +5204,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5183
5204
  C && he("Share", X.share, 1.6, C),
5184
5205
  ji() && !e && he(F ? "Exit full screen" : "Full screen", F ? du : ua, 1.7, () => _n(!F)),
5185
5206
  I && he("Close player", X.close, 1.7, I)
5186
- ] }), Be = (d || M || D) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
5207
+ ] }), Ve = (d || M || D) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
5187
5208
  d && he(d.muted ? "Unmute" : "Mute", d.muted ? X.volumeOff : X.volume, 1.6, d.onToggle),
5188
5209
  M && he(M.on ? "Hide subtitles" : "Show subtitles", M.on ? X.cc : X.ccOff, 1.7, M.onToggle, void 0, 4),
5189
5210
  D && he("Settings", X.cog, 1.6, D)
@@ -5212,24 +5233,24 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5212
5233
  /* @__PURE__ */ g("div", { className: `gfull__frame${H ? " gfull__frame--land" : ""}`, children: [
5213
5234
  r,
5214
5235
  /* @__PURE__ */ i("div", { className: "gfull__shade", "aria-hidden": "true" }),
5215
- B && !h && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${p.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": p.playing, children: [
5236
+ V && !h && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${p.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": p.playing, children: [
5216
5237
  /* @__PURE__ */ g("div", { className: "gfull__pausedtext", children: [
5217
5238
  /* @__PURE__ */ g("div", { className: "gfull__pausedhead", children: [
5218
5239
  (Ee || ve) && /* @__PURE__ */ i("span", { className: "gfull__pausedmark", "aria-hidden": "true", children: /* @__PURE__ */ i(Yr, { dark: !0, size: 20 }) }),
5219
- /* @__PURE__ */ i("div", { className: "gfull__pausedtitle", children: B.title })
5240
+ /* @__PURE__ */ i("div", { className: "gfull__pausedtitle", children: V.title })
5220
5241
  ] }),
5221
- B.summary && /* @__PURE__ */ i("div", { className: "gfull__pausedsum", children: B.summary })
5242
+ V.summary && /* @__PURE__ */ i("div", { className: "gfull__pausedsum", children: V.summary })
5222
5243
  ] }),
5223
5244
  Ae
5224
5245
  ] }),
5225
- Be,
5246
+ Ve,
5226
5247
  Y,
5227
5248
  c ? typeof c == "string" ? /* @__PURE__ */ i("div", { className: "gfull__sub", "aria-live": "polite", children: /* @__PURE__ */ g("div", { className: "gfull__wait", children: [
5228
5249
  /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }),
5229
5250
  c
5230
5251
  ] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: E, children: [
5231
5252
  /* @__PURE__ */ i("div", { className: "gfull__subback", "aria-hidden": "true", children: /* @__PURE__ */ g("span", { children: [
5232
- l.who && /* @__PURE__ */ g(Ce, { children: [
5253
+ l.who && /* @__PURE__ */ g(be, { children: [
5233
5254
  /* @__PURE__ */ g("b", { children: [
5234
5255
  l.who,
5235
5256
  ":"
@@ -5239,7 +5260,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5239
5260
  l.words.map(($) => $.t + $.sp).join("")
5240
5261
  ] }) }),
5241
5262
  /* @__PURE__ */ g("span", { children: [
5242
- l.who && /* @__PURE__ */ g(Ce, { children: [
5263
+ l.who && /* @__PURE__ */ g(be, { children: [
5243
5264
  /* @__PURE__ */ g("b", { style: { color: l.color }, children: [
5244
5265
  l.who,
5245
5266
  ":"
@@ -5252,7 +5273,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5252
5273
  ] }, Me))
5253
5274
  ] })
5254
5275
  ] }) }),
5255
- /* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ g(Ce, { children: [
5276
+ /* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ g(be, { children: [
5256
5277
  /* @__PURE__ */ i(_r, { live: o.live, desk: !0, pct: u }),
5257
5278
  /* @__PURE__ */ i(Un, { t: p }),
5258
5279
  /* @__PURE__ */ i(Yn, { pos: o, interactive: !0 }),
@@ -5263,7 +5284,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
5263
5284
  /* @__PURE__ */ i(Yn, { pos: o, interactive: !0 }),
5264
5285
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: f }),
5265
5286
  _e
5266
- ] }) : /* @__PURE__ */ g(Ce, { children: [
5287
+ ] }) : /* @__PURE__ */ g(be, { children: [
5267
5288
  /* @__PURE__ */ g("div", { className: "gfull__row", children: [
5268
5289
  /* @__PURE__ */ i(_r, { live: o.live, pct: u, mark: !0 }),
5269
5290
  /* @__PURE__ */ i(Yn, { pos: o, interactive: !0 })
@@ -5287,7 +5308,7 @@ function pu({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o
5287
5308
  return /* @__PURE__ */ g("div", { className: "ghead", children: [
5288
5309
  e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 19, sw: 1.7 }) }),
5289
5310
  r && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(Yr, { dark: t, size: 30 }) }),
5290
- /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(Vn, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
5311
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(Bn, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
5291
5312
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
5292
5313
  /* @__PURE__ */ i("span", { className: "ghead__name", children: s }),
5293
5314
  a
@@ -5398,7 +5419,7 @@ function zu({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5398
5419
  y.stopPropagation(), y.target === y.currentTarget && r();
5399
5420
  }, children: /* @__PURE__ */ g("div", { className: "vsp-end__card", children: [
5400
5421
  /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: r, children: /* @__PURE__ */ i(oe, { d: X.close, size: 16, sw: 1.8 }) }),
5401
- /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(Vn, { dark: !0, link: !1, height: 16 }) }),
5422
+ /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(Bn, { dark: !0, link: !1, height: 16 }) }),
5402
5423
  /* @__PURE__ */ i("div", { className: "vsp-end__title", children: t.title ?? "Transcribe and translate any video" }),
5403
5424
  /* @__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." }),
5404
5425
  /* @__PURE__ */ g("form", { className: "vsp-end__row", onSubmit: (y) => {
@@ -5484,45 +5505,45 @@ function bu(t, e) {
5484
5505
  ] }),
5485
5506
  T
5486
5507
  ] })
5487
- ] }), B = /* @__PURE__ */ g(Ce, { children: [
5508
+ ] }), V = /* @__PURE__ */ g(be, { children: [
5488
5509
  /* @__PURE__ */ i(en, { open: a === "lang", onClose: f, title: "LANGUAGE", kind: "picker", header: h.search, sticky: !0, children: /* @__PURE__ */ i(jr, { children: h.list }) }),
5489
5510
  /* @__PURE__ */ i(en, { open: a === "settings", onClose: f, title: { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO" }[l], titleNode: l === "main" ? void 0 : N, kind: l === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(jr, { children: D }) })
5490
5511
  ] });
5491
5512
  return {
5492
5513
  chip: y,
5493
- sheets: B,
5514
+ sheets: V,
5494
5515
  sheetOpen: a != null,
5495
5516
  openSettings: () => {
5496
5517
  c("main"), o((Y) => Y === "settings" ? null : "settings");
5497
5518
  }
5498
5519
  };
5499
5520
  }
5500
- const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Vt = (t) => /* @__PURE__ */ g(Ce, { children: [
5521
+ const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Bt = (t) => /* @__PURE__ */ g(be, { children: [
5501
5522
  /* @__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" }),
5502
5523
  /* @__PURE__ */ i("path", { d: "M13.75 2.75V7.5h4.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
5503
5524
  /* @__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 })
5504
5525
  ] }), zi = [
5505
5526
  { name: "YouTube", tint: "#ff3b30", glyph: yt("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") },
5506
- { name: "MP3", tint: "#f78472", glyph: Vt("MP3") },
5527
+ { name: "MP3", tint: "#f78472", glyph: Bt("MP3") },
5507
5528
  { name: "Vimeo", tint: "#1ab7ea", glyph: yt("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") },
5508
- { name: "Video", tint: "#55abe5", glyph: /* @__PURE__ */ g(Ce, { children: [
5529
+ { name: "Video", tint: "#55abe5", glyph: /* @__PURE__ */ g(be, { children: [
5509
5530
  /* @__PURE__ */ i("rect", { x: "3", y: "5.5", width: "13", height: "13", rx: "2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
5510
5531
  yt("M16 10.2 21 7v10l-5-3.2v-3.6Z")
5511
5532
  ] }) },
5512
5533
  { name: "Twitch", tint: "#a970ff", glyph: yt("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") },
5513
- { name: "WAV", tint: "#7ee0b4", glyph: Vt("WAV") },
5514
- { name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ g(Ce, { children: [
5534
+ { name: "WAV", tint: "#7ee0b4", glyph: Bt("WAV") },
5535
+ { name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ g(be, { children: [
5515
5536
  yt("M11 8.6a5 5 0 0 1 7.8 3.1 3 3 0 0 1-.3 6H11V8.6Z"),
5516
5537
  /* @__PURE__ */ i("rect", { x: "8.6", y: "9.4", width: "1.3", height: "8.3", rx: ".65", fill: "currentColor" }),
5517
5538
  /* @__PURE__ */ i("rect", { x: "6.2", y: "10.6", width: "1.3", height: "7.1", rx: ".65", fill: "currentColor" }),
5518
5539
  /* @__PURE__ */ i("rect", { x: "3.8", y: "12.2", width: "1.3", height: "5.5", rx: ".65", fill: "currentColor" }),
5519
5540
  /* @__PURE__ */ i("rect", { x: "1.4", y: "13.8", width: "1.3", height: "3.9", rx: ".65", fill: "currentColor" })
5520
5541
  ] }) },
5521
- { name: "MP4", tint: "#5b63d7", glyph: Vt("MP4") },
5542
+ { name: "MP4", tint: "#5b63d7", glyph: Bt("MP4") },
5522
5543
  { name: "TikTok", tint: "#25f4ee", glyph: yt("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") },
5523
5544
  { 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" }) }) },
5524
5545
  { name: "X", tint: "#e8eaf2", glyph: yt("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") },
5525
- { name: "MOV", tint: "#55abe5", glyph: Vt("MOV") },
5546
+ { name: "MOV", tint: "#55abe5", glyph: Bt("MOV") },
5526
5547
  { name: "Facebook", tint: "#3b82f6", glyph: yt("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") },
5527
5548
  { name: "Podcast", tint: "#c46bff", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5528
5549
  /* @__PURE__ */ i("rect", { x: "9", y: "3", width: "6", height: "10.5", rx: "3" }),
@@ -5533,15 +5554,15 @@ const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "curren
5533
5554
  /* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "4" }),
5534
5555
  /* @__PURE__ */ i("circle", { cx: "17.2", cy: "6.8", r: ".9", fill: "currentColor", stroke: "none" })
5535
5556
  ] }) },
5536
- { name: "M4A", tint: "#f78472", glyph: Vt("M4A") },
5557
+ { name: "M4A", tint: "#f78472", glyph: Bt("M4A") },
5537
5558
  { name: "Dailymotion", tint: "#4aa3ff", glyph: yt("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") },
5538
5559
  { name: "Radio", tint: "#7ee0b4", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5539
5560
  /* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "1.8", fill: "currentColor", stroke: "none" }),
5540
5561
  /* @__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" })
5541
5562
  ] }) },
5542
- { name: "WEBM", tint: "#5b63d7", glyph: Vt("WEBM") },
5563
+ { name: "WEBM", tint: "#5b63d7", glyph: Bt("WEBM") },
5543
5564
  { name: "Loom", tint: "#8f7bff", glyph: yt("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") },
5544
- { name: "FLAC", tint: "#f7c948", glyph: Vt("FLAC") },
5565
+ { name: "FLAC", tint: "#f7c948", glyph: Bt("FLAC") },
5545
5566
  { name: "Live", tint: "#ff5a5a", glyph: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
5546
5567
  /* @__PURE__ */ i("rect", { x: "3", y: "6", width: "18", height: "12", rx: "3" }),
5547
5568
  /* @__PURE__ */ i("circle", { cx: "8", cy: "12", r: "1.6", fill: "currentColor", stroke: "none" }),
@@ -5613,14 +5634,14 @@ function Eu(t) {
5613
5634
  function _u({ poster: t, src: e }) {
5614
5635
  var s;
5615
5636
  const n = e && ((s = Pn(e)) == null ? void 0 : s.id) === "youtube" ? na(e) : null, r = t ?? (n ? `https://i.ytimg.com/vi/${n}/hqdefault.jpg` : null);
5616
- return r ? /* @__PURE__ */ i("div", { className: "vsp-idle__pic", style: { backgroundImage: `url(${r})` } }) : e && Eu(e) ? /* @__PURE__ */ i("video", { className: "vsp-idle__pic vsp-idle__frame", src: `${e}#t=1`, muted: !0, playsInline: !0, preload: "metadata", "aria-hidden": "true" }) : /* @__PURE__ */ g(Ce, { children: [
5637
+ return r ? /* @__PURE__ */ i("div", { className: "vsp-idle__pic", style: { backgroundImage: `url(${r})` } }) : e && Eu(e) ? /* @__PURE__ */ i("video", { className: "vsp-idle__pic vsp-idle__frame", src: `${e}#t=1`, muted: !0, playsInline: !0, preload: "metadata", "aria-hidden": "true" }) : /* @__PURE__ */ g(be, { children: [
5617
5638
  /* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
5618
5639
  /* @__PURE__ */ i(Du, {})
5619
5640
  ] });
5620
5641
  }
5621
5642
  const Yu = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
5622
5643
  } };
5623
- function Bn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
5644
+ function Vn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
5624
5645
  const l = bu(t.prefs, t.set), c = fa(), u = j(null), [d, M] = k(!1);
5625
5646
  Jt(() => {
5626
5647
  var T;
@@ -5641,7 +5662,7 @@ function Bn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
5641
5662
  ] });
5642
5663
  }
5643
5664
  function ma({ connect: t, onClick: e, label: n }) {
5644
- return /* @__PURE__ */ g(Ce, { children: [
5665
+ return /* @__PURE__ */ g(be, { children: [
5645
5666
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
5646
5667
  t.busy ? /* @__PURE__ */ i(ht, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: X.link, size: 18, sw: 1.8 }),
5647
5668
  /* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
@@ -5652,7 +5673,7 @@ function ma({ connect: t, onClick: e, label: n }) {
5652
5673
  }
5653
5674
  function Uu({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, onClear: o }) {
5654
5675
  const l = () => r.start(e, n);
5655
- return /* @__PURE__ */ g(Bn, { idle: t, poster: a, src: e, title: Lr(e), page: s, onAct: l, children: [
5676
+ return /* @__PURE__ */ g(Vn, { idle: t, poster: a, src: e, title: Lr(e), page: s, onAct: l, children: [
5656
5677
  /* @__PURE__ */ i(ma, { connect: r, onClick: l, label: r.connected ? "Play with VocalStack" : "Connect to VocalStack" }),
5657
5678
  !r.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: r.connected ? `Plays ${Lr(e)} with subtitles and spoken translations.` : `Connect to play ${Lr(e)} with subtitles and spoken translations.` }),
5658
5679
  o && !r.busy && /* @__PURE__ */ i("button", { type: "button", className: "vsp-idle__other", onClick: o, children: "Choose another video" })
@@ -5665,7 +5686,7 @@ function Ru({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5665
5686
  s(p), e.start(p, !1);
5666
5687
  };
5667
5688
  if (!e.connected)
5668
- return /* @__PURE__ */ g(Bn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: e.connect, children: [
5689
+ return /* @__PURE__ */ g(Vn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: e.connect, children: [
5669
5690
  /* @__PURE__ */ i(ma, { connect: e, onClick: e.connect, label: "Connect to VocalStack" }),
5670
5691
  !e.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: "Connect your VocalStack account to watch any video with subtitles and spoken translations." })
5671
5692
  ] });
@@ -5679,7 +5700,7 @@ function Ru({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5679
5700
  const T = /^https?:\/\//i.test(y) ? y : `https://${y}`;
5680
5701
  s(T), e.start(T, !1);
5681
5702
  };
5682
- return /* @__PURE__ */ g(Bn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: h, children: [
5703
+ return /* @__PURE__ */ g(Vn, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: h, children: [
5683
5704
  /* @__PURE__ */ i("form", { className: "vsp-idle__form", onSubmit: (p) => {
5684
5705
  p.preventDefault(), M();
5685
5706
  }, children: /* @__PURE__ */ g("span", { className: "vsp-idle__field", children: [
@@ -5695,7 +5716,7 @@ function Ru({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5695
5716
  ] });
5696
5717
  }
5697
5718
  function Pu({ idle: t, message: e, onRetry: n, page: r }) {
5698
- return /* @__PURE__ */ g(Bn, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
5719
+ return /* @__PURE__ */ g(Vn, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
5699
5720
  /* @__PURE__ */ g("div", { className: "vsp-idle__err", role: "alert", children: [
5700
5721
  /* @__PURE__ */ i(oe, { d: X.warn, size: 16, sw: 1.8 }),
5701
5722
  e
@@ -5734,7 +5755,7 @@ function $u(t, e, n) {
5734
5755
  }, [t, e, n]), r;
5735
5756
  }
5736
5757
  const Qu = 100, bi = (t) => t == null ? null : t ? "on" : "off";
5737
- function Bu(t) {
5758
+ function Vu(t) {
5738
5759
  const e = t.syncUrl && typeof window < "u" ? new URLSearchParams(window.location.search) : null, n = { ...t.initial ?? {}, ...t.settings ?? {} }, r = (a) => a === "on" || a === "off" ? a : null, s = Number(e == null ? void 0 : e.get("t"));
5739
5760
  return {
5740
5761
  lang: (e == null ? void 0 : e.get("lang")) || n.lang || null,
@@ -5786,24 +5807,24 @@ const nd = Ka(function(e, n) {
5786
5807
  S(() => {
5787
5808
  c(null);
5788
5809
  }, [e.id, e.src]);
5789
- const T = e.src ?? l, N = !s.id && !!T && (l != null || o !== void 0), m = !s.id && !e.src && !l, b = Ki({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: C, gone: D, error: B, reload: Y } = Yl(b, s.id), ee = Ul(b, (C == null ? void 0 : C.recording.id) ?? null), I = ze(() => El(b, ee), [b, ee]);
5810
+ const T = e.src ?? l, N = !s.id && !!T && (l != null || o !== void 0), m = !s.id && !e.src && !l, b = Ki({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: C, gone: D, error: V, reload: Y } = Yl(b, s.id), ee = Ul(b, (C == null ? void 0 : C.recording.id) ?? null), I = ze(() => El(b, ee), [b, ee]);
5790
5811
  S(() => {
5791
5812
  var L;
5792
5813
  C && ((L = e.onSource) == null || L.call(e, C));
5793
5814
  }, [C]), S(() => {
5794
5815
  var L;
5795
- B && ((L = e.onError) == null || L.call(e, B));
5796
- }, [B]);
5816
+ V && ((L = e.onError) == null || L.call(e, V));
5817
+ }, [V]);
5797
5818
  const F = fa(e.desk), A = (e.layout ?? "embed") === "embed", w = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), _ = Ke((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), O = Au(w, _), te = j(null);
5798
- return S(() => (ki(A ? te.current : null), () => ki(null)), [A]), /* @__PURE__ */ i(xl, { value: I, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${A ? " 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: m ? /* @__PURE__ */ i(Ru, { idle: f, connect: O, page: !A, poster: e.poster ?? null, onPick: c }) : N ? /* @__PURE__ */ i(Uu, { idle: f, src: T, ask: !l, connect: O, page: !A, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? B && !C ? /* @__PURE__ */ i(Pu, { idle: f, message: B.message, onRetry: Y, page: !A }) : /* @__PURE__ */ i(Vu, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: I, 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" }) }) }) });
5819
+ return S(() => (ki(A ? te.current : null), () => ki(null)), [A]), /* @__PURE__ */ i(xl, { value: I, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${A ? " 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: m ? /* @__PURE__ */ i(Ru, { idle: f, connect: O, page: !A, poster: e.poster ?? null, onPick: c }) : N ? /* @__PURE__ */ i(Uu, { idle: f, src: T, ask: !l, connect: O, page: !A, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? V && !C ? /* @__PURE__ */ i(Pu, { idle: f, message: V.message, onRetry: Y, page: !A }) : /* @__PURE__ */ i(Bu, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: I, shared: C, gone: D, loadError: V, 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" }) }) }) });
5799
5820
  });
5800
- function Vu(t) {
5801
- var js, zs, Is, bs, Os, Cs, xs, Ss, Ds, As, Es, _s, Ys, Us, Rs, Ps, $s, Qs, Bs, Vs, Hs, Ws, Fs, Zs, Gs, qs, Ks, Js, Xs, ei, ti, ni, ri, si;
5802
- const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = ze(() => Bu(t), []), u = (t.mode ?? "video") === "video", [d, M] = k(t.loadError);
5821
+ function Bu(t) {
5822
+ var js, zs, Is, bs, Os, Cs, xs, Ss, Ds, As, Es, _s, Ys, Us, Rs, Ps, $s, Qs, Vs, Bs, Hs, Ws, Fs, Zs, Gs, qs, Ks, Js, Xs, ei, ti, ni, ri, si;
5823
+ const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = ze(() => Vu(t), []), u = (t.mode ?? "video") === "video", [d, M] = k(t.loadError);
5803
5824
  S(() => {
5804
5825
  t.loadError && M(t.loadError);
5805
5826
  }, [t.loadError]);
5806
- const [h, f] = k("none"), [p, y] = k(!1), [T, N] = k(""), [m, b] = Hc(), [C, D] = k(null), [B, Y] = k(u ? "listen" : "read"), [ee, I] = k(!1), F = j(null), A = j(/* @__PURE__ */ new Map()), [w, _] = k("main"), O = (v) => {
5827
+ const [h, f] = k("none"), [p, y] = k(!1), [T, N] = k(""), [m, b] = Hc(), [C, D] = k(null), [V, Y] = k(u ? "listen" : "read"), [ee, I] = k(!1), F = j(null), A = j(/* @__PURE__ */ new Map()), [w, _] = k("main"), O = (v) => {
5807
5828
  const me = document.querySelector(".vs-sheet--settings"), Pe = me == null ? void 0 : me.parentElement;
5808
5829
  me && Pe && w === "main" && v !== "main" && Pe.style.setProperty("--vs-sheet-top", `${Math.round(me.getBoundingClientRect().top - Pe.getBoundingClientRect().top)}px`), _(v);
5809
5830
  };
@@ -5826,7 +5847,7 @@ function Vu(t) {
5826
5847
  }, [E == null ? void 0 : E.voices]), S(() => {
5827
5848
  (E == null ? void 0 : E.removeBackground) !== void 0 && H(E.removeBackground);
5828
5849
  }, [E == null ? void 0 : E.removeBackground]);
5829
- const x = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, V = u && !we;
5850
+ const x = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, B = u && !we;
5830
5851
  S(() => {
5831
5852
  if (!t.syncUrl) return;
5832
5853
  const v = new URL(window.location.href);
@@ -5839,11 +5860,11 @@ function Vu(t) {
5839
5860
  onFrame: (v) => {
5840
5861
  v.type === "job.progress" && D({ state: v.state, processedS: v.processedS ?? 0, totalS: v.totalS ?? null, segmentsDone: v.segmentsDone ?? 0, segmentsTotal: v.segmentsTotal ?? null, pct: v.pct ?? 0, error: v.error ?? null });
5841
5862
  }
5842
- }), he = ze(() => yl(ce).filter((v) => !v.suppressed), [ce]), _e = Bl((n == null ? void 0 : n.job) ?? null), Be = ["done", "failed", "stopped"].includes(Tr((_e == null ? void 0 : _e.state) ?? ((js = n == null ? void 0 : n.job) == null ? void 0 : js.state))), $ = Be ? _e : C ?? _e, Me = !!C && !["done", "failed", "stopped"].includes(Tr(C.state)), ue = j(0);
5863
+ }), he = ze(() => yl(ce).filter((v) => !v.suppressed), [ce]), _e = Vl((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(Tr((_e == null ? void 0 : _e.state) ?? ((js = n == null ? void 0 : n.job) == null ? void 0 : js.state))), $ = Ve ? _e : C ?? _e, Me = !!C && !["done", "failed", "stopped"].includes(Tr(C.state)), ue = j(0);
5843
5864
  S(() => {
5844
- !Be || !Me || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
5845
- }, [Be, Me, C == null ? void 0 : C.state, C == null ? void 0 : C.processedS, o]);
5846
- const ae = Tr(($ == null ? void 0 : $.state) ?? ((zs = n == null ? void 0 : n.job) == null ? void 0 : zs.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") && he.length === 0), U = fe ? ($ == null ? void 0 : $.pct) ?? 0 : 100, R = Hl(n == null ? void 0 : n.job, $) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, q = ((Is = ce.segments.values().next().value) == null ? void 0 : Is.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, se = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((Cs = (Os = (bs = n == null ? void 0 : n.job) == null ? void 0 : bs.source) == null ? void 0 : Os.name) == null ? void 0 : Cs.trim()) || null, be = n ? ((xs = n.name) == null ? void 0 : xs.trim()) || de : null, Ne = !!((Ss = n == null ? void 0 : n.job) != null && Ss.hasAudio), Le = (Ds = n == null ? void 0 : n.job) == null ? void 0 : Ds.source, Oe = !Ne && !!Le && (Le.kind !== "url" || Le.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), He = ie && (n != null && n.allowDownload) && Ne ? fo(e.origin, ie, e.cred) : null, $e = !!Le && (Le.kind !== "url" || Le.bytes != null), ut = Hu(He && $e ? He : null), it = He && (!$e || ut === "yes") ? He : He && ut === "unknown" ? null : ie && (n != null && n.allowDownload) && (Oe || Ne && $e) ? xn(e.origin, ie, "source", e.cred) : null, pt = he[he.length - 1], Ge = pt ? ((As = pt.words[pt.words.length - 1]) == null ? void 0 : As.end) ?? pt.start : 0, rt = u && fe ? Math.max(Ge, ($ == null ? void 0 : $.processedS) ?? 0) : null, Mt = Kc(it, (Ne || Oe) && !!(n != null && n.allowDownload), he, R, Oe ? ((_s = (Es = n == null ? void 0 : n.job) == null ? void 0 : Es.crop) == null ? void 0 : _s.startS) ?? 0 : 0, rt), st = _o((Ys = n == null ? void 0 : n.job) == null ? void 0 : Ys.source), Ve = st && ((Us = Pn(st)) == null ? void 0 : Us.id) === "youtube" ? na(st) : null, Mn = Vo(Ve), At = qc(he, R, ((Ps = (Rs = n == null ? void 0 : n.job) == null ? void 0 : Rs.crop) == null ? void 0 : Ps.startS) ?? 0, rt), Je = !!Ve, lt = Je ? At.player : Mt, at = Ji(), tn = j(null), re = nu({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: he, lenS: R, ended: !!ie && !fe, cred: e.cred, langs: at, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: Z, side: s && !te ? tu : void 0, hearOriginal: V, timed: !!Ve, stockVoices: u && !Re, stickyPicker: u, pickerBusy: tn.current }), gn = j(null);
5865
+ !Ve || !Me || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
5866
+ }, [Ve, Me, C == null ? void 0 : C.state, C == null ? void 0 : C.processedS, o]);
5867
+ const ae = Tr(($ == null ? void 0 : $.state) ?? ((zs = n == null ? void 0 : n.job) == null ? void 0 : zs.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") && he.length === 0), U = fe ? ($ == null ? void 0 : $.pct) ?? 0 : 100, R = Hl(n == null ? void 0 : n.job, $) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, q = ((Is = ce.segments.values().next().value) == null ? void 0 : Is.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, se = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((Cs = (Os = (bs = n == null ? void 0 : n.job) == null ? void 0 : bs.source) == null ? void 0 : Os.name) == null ? void 0 : Cs.trim()) || null, Oe = n ? ((xs = n.name) == null ? void 0 : xs.trim()) || de : null, Ne = !!((Ss = n == null ? void 0 : n.job) != null && Ss.hasAudio), Le = (Ds = n == null ? void 0 : n.job) == null ? void 0 : Ds.source, Ce = !Ne && !!Le && (Le.kind !== "url" || Le.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), He = ie && (n != null && n.allowDownload) && Ne ? fo(e.origin, ie, e.cred) : null, $e = !!Le && (Le.kind !== "url" || Le.bytes != null), ut = Hu(He && $e ? He : null), it = He && (!$e || ut === "yes") ? He : He && ut === "unknown" ? null : ie && (n != null && n.allowDownload) && (Ce || Ne && $e) ? xn(e.origin, ie, "source", e.cred) : null, pt = he[he.length - 1], Ge = pt ? ((As = pt.words[pt.words.length - 1]) == null ? void 0 : As.end) ?? pt.start : 0, rt = u && fe ? Math.max(Ge, ($ == null ? void 0 : $.processedS) ?? 0) : null, Mt = Kc(it, (Ne || Ce) && !!(n != null && n.allowDownload), he, R, Ce ? ((_s = (Es = n == null ? void 0 : n.job) == null ? void 0 : Es.crop) == null ? void 0 : _s.startS) ?? 0 : 0, rt), st = _o((Ys = n == null ? void 0 : n.job) == null ? void 0 : Ys.source), Be = st && ((Us = Pn(st)) == null ? void 0 : Us.id) === "youtube" ? na(st) : null, Mn = Bo(Be), At = qc(he, R, ((Ps = (Rs = n == null ? void 0 : n.job) == null ? void 0 : Rs.crop) == null ? void 0 : Ps.startS) ?? 0, rt), Je = !!Be, lt = Je ? At.player : Mt, at = Ji(), tn = j(null), re = nu({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: he, lenS: R, ended: !!ie && !fe, cred: e.cred, langs: at, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: Z, side: s && !te ? tu : void 0, hearOriginal: B, timed: !!Be, stockVoices: u && !Re, stickyPicker: u, pickerBusy: tn.current }), gn = j(null);
5847
5868
  S(() => {
5848
5869
  !ie || gn.current === J || (gn.current = J, G(J));
5849
5870
  }, [J, ie]);
@@ -5866,7 +5887,7 @@ function Vu(t) {
5866
5887
  S(() => {
5867
5888
  fe && !z.playing && Yt.current && (Yt.current.scrollTop = Yt.current.scrollHeight);
5868
5889
  }, [fe, he.length]);
5869
- const Ft = iu(Yt, he, p, T, y), fn = /* @__PURE__ */ i(su, { open: p, q: T, onQ: N, onClose: () => y(!1), hits: Ft, desk: s, inline: s }), qe = Wo({ name: n == null ? void 0 : n.name, sourceName: (Qs = ($s = n == null ? void 0 : n.job) == null ? void 0 : $s.source) == null ? void 0 : Qs.name, ytTitle: Mn, url: ((Vs = (Bs = n == null ? void 0 : n.job) == null ? void 0 : Bs.source) == null ? void 0 : Vs.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), ot = !!(n != null && n.allowDownload), nn = !!(n != null && n.allowExport), mt = re.readLang, gt = mt ? ((Hs = at == null ? void 0 : at.languages.find((v) => v.code === mt)) == null ? void 0 : Hs.name) ?? mt.toUpperCase() : null, Zt = async () => {
5890
+ const Ft = iu(Yt, he, p, T, y), fn = /* @__PURE__ */ i(su, { open: p, q: T, onQ: N, onClose: () => y(!1), hits: Ft, desk: s, inline: s }), qe = Wo({ name: n == null ? void 0 : n.name, sourceName: (Qs = ($s = n == null ? void 0 : n.job) == null ? void 0 : $s.source) == null ? void 0 : Qs.name, ytTitle: Mn, url: ((Bs = (Vs = n == null ? void 0 : n.job) == null ? void 0 : Vs.source) == null ? void 0 : Bs.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), ot = !!(n != null && n.allowDownload), nn = !!(n != null && n.allowExport), mt = re.readLang, gt = mt ? ((Hs = at == null ? void 0 : at.languages.find((v) => v.code === mt)) == null ? void 0 : Hs.name) ?? mt.toUpperCase() : null, Zt = async () => {
5870
5891
  if (ie)
5871
5892
  try {
5872
5893
  if (mt && re.canSpeak) {
@@ -5877,7 +5898,7 @@ function Vu(t) {
5877
5898
  b(`Preparing ${qe} as MP3 — the download starts when it is ready.`), await Wl(xn(e.origin, ie, "delivery", e.cred)), b(`Downloading ${qe}.`);
5878
5899
  return;
5879
5900
  }
5880
- Vr(xn(e.origin, ie, "source", e.cred)), b(`Downloading ${qe} — the full audio, since the transcript is still being written.`);
5901
+ Br(xn(e.origin, ie, "source", e.cred)), b(`Downloading ${qe} — the full audio, since the transcript is still being written.`);
5881
5902
  } catch (v) {
5882
5903
  throw M(It(v)), v;
5883
5904
  }
@@ -5887,7 +5908,7 @@ function Vu(t) {
5887
5908
  return Fl(e, ie, v, { lang: mt }).then(() => b(fe ? `${me} exported${Pe} for the first ${he.length} segments — the rest is still transcribing.` : `${me} exported${Pe}.`)).catch((We) => {
5888
5909
  throw M(It(We)), We;
5889
5910
  });
5890
- }, rn = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", ct = fe ? "var(--brand)" : "var(--ink-28)", sn = Vl($, he.length), bt = z.has && (!re.relang || !!Ve), Ze = j(z);
5911
+ }, rn = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", ct = fe ? "var(--brand)" : "var(--ink-28)", sn = Bl($, he.length), bt = z.has && (!re.relang || !!Be), Ze = j(z);
5891
5912
  Ze.current = z;
5892
5913
  const Ut = `${J ?? ""}|${re.on ? "voice" : "source"}`, wt = j({ key: Ut, idx: 0, t: 0, playing: !1, until: 0 });
5893
5914
  S(() => {
@@ -5901,7 +5922,7 @@ function Vu(t) {
5901
5922
  v.until = 0;
5902
5923
  return;
5903
5924
  }
5904
- !z.has || re.relang || (v.until = 0, Math.abs(z.t - v.t) > 0.5 && (z.seekFrac && z.dur > 0 ? z.seekFrac(v.t / z.dur) : z.seekRow(v.idx)), v.playing && !z.playing && B === "listen" && (et.current = !0, z.toggle()));
5925
+ !z.has || re.relang || (v.until = 0, Math.abs(z.t - v.t) > 0.5 && (z.seekFrac && z.dur > 0 ? z.seekFrac(v.t / z.dur) : z.seekRow(v.idx)), v.playing && !z.playing && V === "listen" && (et.current = !0, z.toggle()));
5905
5926
  }
5906
5927
  });
5907
5928
  const Rt = j(!1), et = j(!1);
@@ -5939,7 +5960,7 @@ function Vu(t) {
5939
5960
  return;
5940
5961
  }
5941
5962
  et.current = !0, Ze.current.toggle();
5942
- }, Nn = (v) => /* @__PURE__ */ i(Vc, { player: z, size: v }), an = !!ie && !fe, [P, xe] = k(!1);
5963
+ }, Nn = (v) => /* @__PURE__ */ i(Bc, { player: z, size: v }), an = !!ie && !fe, [P, xe] = k(!1);
5943
5964
  S(() => {
5944
5965
  if (!Ie) {
5945
5966
  xe(!1);
@@ -5948,13 +5969,13 @@ function Vu(t) {
5948
5969
  const v = setTimeout(() => xe(!0), 180);
5949
5970
  return () => clearTimeout(v);
5950
5971
  }, [Ie]);
5951
- const Qe = P ? Ae : J, St = ac(ie, J, he, ke), Pt = wc(vc(L), ie, re.readLang), Na = ot || nn, ya = (((Fs = (Ws = n == null ? void 0 : n.job) == null ? void 0 : Ws.crop) == null ? void 0 : Fs.startS) ?? 0) + Bt(z, he), vt = B === "listen", $t = vt && (!!Ve || u), Ta = (v) => {
5972
+ const Qe = P ? Ae : J, St = ac(ie, J, he, ke), Pt = wc(vc(L), ie, re.readLang), Na = ot || nn, ya = (((Fs = (Ws = n == null ? void 0 : n.job) == null ? void 0 : Ws.crop) == null ? void 0 : Fs.startS) ?? 0) + Vt(z, he), vt = V === "listen", $t = vt && (!!Be || u), Ta = (v) => {
5952
5973
  lt.pause(), re.player.pause(), Y(v), v === "read" && te && (cn(!1), K(!1));
5953
5974
  };
5954
5975
  S(() => {
5955
5976
  vt || (lt.playing && lt.pause(), re.player.playing && re.player.pause());
5956
5977
  }, [vt, lt.playing, re.player.playing]);
5957
- const Ue = re.barChip, Gt = ea(Ue.label), Zr = /* @__PURE__ */ i(kr, { value: B, onChange: Ta, bordered: !1, options: Nu(Gt, !!Ve) }), qt = [...an ? [{ key: "summary", label: "Summary" }] : [], ...Na ? [{ key: "export", label: "Export" }] : []], Gr = (v) => /* @__PURE__ */ g(Ce, { children: [
5978
+ const Ue = re.barChip, Gt = ea(Ue.label), Zr = /* @__PURE__ */ i(kr, { value: V, onChange: Ta, bordered: !1, options: Nu(Gt, !!Be) }), qt = [...an ? [{ key: "summary", label: "Summary" }] : [], ...Na ? [{ key: "export", label: "Export" }] : []], Gr = (v) => /* @__PURE__ */ g(be, { children: [
5958
5979
  v === "summary" && an && /* @__PURE__ */ i(Lc, { s: Pt }),
5959
5980
  v === "export" && /* @__PURE__ */ i(Tc, { audio: ot ? { name: qe, meta: mt && re.canSpeak || Ne ? `MP3${R ? ` · ${jt(R)}` : ""}` : "ORIGINAL AUDIO", onClick: Zt } : null, formats: nn, onExport: dt })
5960
5981
  ] }), wa = (v) => /* @__PURE__ */ i(nc, { index: z.idx, total: Math.max(1, he.length), frac: z.dur > 0 ? Math.min(1, z.t / z.dur) : 0, glideMs: z.wordSync ? 0 : 220, atLabel: jt(z.t), durLabel: jt(z.dur), stepLabel: v ? `${z.idx + 1} / ${he.length}` : "", onSeek: re.relang ? Xc : z.seekRow, onSeekFrac: re.relang ? void 0 : z.seekFrac, onScrubStart: z.hold, onScrubEnd: z.release }), qr = {
@@ -5970,7 +5991,7 @@ function Vu(t) {
5970
5991
  var me;
5971
5992
  re.relang || (me = z.seekFrac) == null || me.call(z, v);
5972
5993
  }
5973
- }, [va, La] = oa(re.on && !!z.preparing && z.playing, 1500), qn = re.on && ((Zs = z.error) == null ? void 0 : Zs.code) === "voice_not_started", Kn = re.canSpeak && !re.error && !qn, yn = J ? ((Gs = at == null ? void 0 : at.languages.find((v) => v.code === J)) == null ? void 0 : Gs.name) ?? Ue.label : "", tt = te ? Uc({ lang: J, langName: yn, translating: Ie && !!J, translateFailed: Fe, voiceFailed: qn, relang: re.relang, starting: re.on ? z.starting : null, slowLine: va, lineSince: La }) : null, Jn = !!Ve && !!tt && (tt.kind === "translating" || tt.kind === "voice" && re.relang), Kr = !Jn || !tt ? null : tt.kind === "translating" ? `Translating into ${yn || "the new language"}…` : `Preparing the ${yn || "translated"} voice…`, Lt = !Jn && ((tt == null ? void 0 : tt.kind) === "voice" || (tt == null ? void 0 : tt.kind) === "starting"), Jr = Rr({ ...re.langList, keepOpen: !0, open: w === "lang", onClose: () => O("main") }), Xr = Ko(Q, re.on), ka = u && Xr.bed && ot && ie && (!fe || it) ? ai(e.origin, ie, e.cred) : null, es = al(ka, { t: Bt(z, he), playing: z.playing && !Lt && !(z.timed && z.preparing), muted: z.muted }), ja = u && Xr.speech && ot && ie && (!fe || it) ? ai(e.origin, ie, e.cred, "speech") : null, Xn = Wi(ja, { t: Bt(z, he), playing: !re.on && z.playing, muted: z.muted }), er = !re.on && Xn.on;
5994
+ }, [va, La] = oa(re.on && !!z.preparing && z.playing, 1500), qn = re.on && ((Zs = z.error) == null ? void 0 : Zs.code) === "voice_not_started", Kn = re.canSpeak && !re.error && !qn, yn = J ? ((Gs = at == null ? void 0 : at.languages.find((v) => v.code === J)) == null ? void 0 : Gs.name) ?? Ue.label : "", tt = te ? Uc({ lang: J, langName: yn, translating: Ie && !!J, translateFailed: Fe, voiceFailed: qn, relang: re.relang, starting: re.on ? z.starting : null, slowLine: va, lineSince: La }) : null, Jn = !!Be && !!tt && (tt.kind === "translating" || tt.kind === "voice" && re.relang), Kr = !Jn || !tt ? null : tt.kind === "translating" ? `Translating into ${yn || "the new language"}…` : `Preparing the ${yn || "translated"} voice…`, Lt = !Jn && ((tt == null ? void 0 : tt.kind) === "voice" || (tt == null ? void 0 : tt.kind) === "starting"), Jr = Rr({ ...re.langList, keepOpen: !0, open: w === "lang", onClose: () => O("main") }), Xr = Ko(Q, re.on), ka = u && Xr.bed && ot && ie && (!fe || it) ? ai(e.origin, ie, e.cred) : null, es = al(ka, { t: Vt(z, he), playing: z.playing && !Lt && !(z.timed && z.preparing), muted: z.muted }), ja = u && Xr.speech && ot && ie && (!fe || it) ? ai(e.origin, ie, e.cred, "speech") : null, Xn = Wi(ja, { t: Vt(z, he), playing: !re.on && z.playing, muted: z.muted }), er = !re.on && Xn.on;
5974
5995
  S(() => {
5975
5996
  var v;
5976
5997
  At.setVideoSound(!(Je && (re.on || er))), (v = Mt.silence) == null || v.call(Mt, !Je && er);
@@ -5986,10 +6007,10 @@ function Vu(t) {
5986
6007
  z.pause(), Z(null), et.current = !0, lt.playRow(v);
5987
6008
  }, ts = { prevOn: z.idx > 0, nextOn: z.idx < he.length - 1, onPrev: z.prev, onNext: z.next, playing: z.playing, playable: bt, playTitle: re.playTitle ?? (z.playing ? "Pause" : "Play"), onPlay: () => {
5988
6009
  et.current = !0, z.toggle();
5989
- }, busy: re.relang && !Ve || Lt };
6010
+ }, busy: re.relang && !Be || Lt };
5990
6011
  fl(bt && vt ? { playing: z.playing, toggle: () => {
5991
6012
  et.current = !0, z.toggle();
5992
- }, next: z.next, prev: z.prev } : null, be);
6013
+ }, next: z.next, prev: z.prev } : null, Oe);
5993
6014
  const rr = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, sr = (v, me) => !Ue.can || !x.language ? null : u ? /* @__PURE__ */ g("button", { type: "button", className: "gfull__btn", title: _t ? `${Ue.label ?? Ue.code}: still being prepared` : Ue.label ?? Ue.code, "aria-label": `Language: ${Ue.label ?? Ue.code}`, "aria-busy": _t || void 0, onClick: () => {
5994
6015
  I(!1), Ue.onClick();
5995
6016
  }, style: { position: "relative" }, children: [
@@ -6000,24 +6021,24 @@ function Vu(t) {
6000
6021
  S(() => {
6001
6022
  z.t > 0.3 && Ca(!0);
6002
6023
  }, [z.t]);
6003
- const xa = !Ve && u && ie && (n != null && n.allowDownload) && !fe && ((qs = n == null ? void 0 : n.job) == null ? void 0 : qs.hasVideo) !== !1 ? /* @__PURE__ */ i(li, { src: xn(e.origin, ie, "video", e.cred), t: Bt(z, he), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, ie) : null, Qt = !Ve && u && st && Ao(st) ? st : null, Tn = Qt ? Vi(Qt) : null, rs = ze(() => Tn ? Bo(Tn) : void 0, [Tn]), ir = Qt && ((Ks = Pn(Qt)) == null ? void 0 : Ks.id) === "facebook" ? Qt : null, Sa = ir ? /* @__PURE__ */ i(Po, { url: ir, t: Bt(z, he) + (((Xs = (Js = n == null ? void 0 : n.job) == null ? void 0 : Js.crop) == null ? void 0 : Xs.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, ir) : rs ? /* @__PURE__ */ i(li, { setup: rs, seekOver: 1, t: Bt(z, he) + (((ti = (ei = n == null ? void 0 : n.job) == null ? void 0 : ei.crop) == null ? void 0 : ti.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, Tn) : Qt ? /* @__PURE__ */ i(Yo, { url: Qt, t: Bt(z, he) + (((ri = (ni = n == null ? void 0 : n.job) == null ? void 0 : ni.crop) == null ? void 0 : ri.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, title: qe }) : null, Da = z.has ? /* @__PURE__ */ g("div", { className: "txyt vsp-follow", children: [
6024
+ const xa = !Be && u && ie && (n != null && n.allowDownload) && !fe && ((qs = n == null ? void 0 : n.job) == null ? void 0 : qs.hasVideo) !== !1 ? /* @__PURE__ */ i(li, { src: xn(e.origin, ie, "video", e.cred), t: Vt(z, he), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, ie) : null, Qt = !Be && u && st && Ao(st) ? st : null, Tn = Qt ? Bi(Qt) : null, rs = ze(() => Tn ? Vo(Tn) : void 0, [Tn]), ir = Qt && ((Ks = Pn(Qt)) == null ? void 0 : Ks.id) === "facebook" ? Qt : null, Sa = ir ? /* @__PURE__ */ i(Po, { url: ir, t: Vt(z, he) + (((Xs = (Js = n == null ? void 0 : n.job) == null ? void 0 : Js.crop) == null ? void 0 : Xs.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, ir) : rs ? /* @__PURE__ */ i(li, { setup: rs, seekOver: 1, t: Vt(z, he) + (((ti = (ei = n == null ? void 0 : n.job) == null ? void 0 : ei.crop) == null ? void 0 : ti.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, onToggle: z.has ? xt : void 0 }, Tn) : Qt ? /* @__PURE__ */ i(Yo, { url: Qt, t: Vt(z, he) + (((ri = (ni = n == null ? void 0 : n.job) == null ? void 0 : ni.crop) == null ? void 0 : ri.startS) ?? 0), playing: z.playing && !Lt, seekN: z.seekN, title: qe }) : null, Da = z.has ? /* @__PURE__ */ g("div", { className: "txyt vsp-follow", children: [
6004
6025
  /* @__PURE__ */ i("div", { "aria-hidden": "true", className: "txyt__tap", onClick: xt, style: { cursor: "pointer" } }),
6005
6026
  /* @__PURE__ */ i("div", { className: `txyt__paused${z.playing ? "" : " txyt__paused--on"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(Xt, { size: 44 }) }) })
6006
- ] }) : null, ss = Ve ? /* @__PURE__ */ g(Ce, { children: [
6007
- /* @__PURE__ */ i($c, { ytId: Ve, title: qe, t: ya, playing: z.playing && !Lt, waiting: re.on && !!z.timed && !!z.preparing, seekN: z.seekN, onTime: (v) => {
6027
+ ] }) : null, ss = Be ? /* @__PURE__ */ g(be, { children: [
6028
+ /* @__PURE__ */ i($c, { ytId: Be, title: qe, t: ya, playing: z.playing && !Lt, waiting: re.on && !!z.timed && !!z.preparing, seekN: z.seekN, onTime: (v) => {
6008
6029
  var me, Pe, We;
6009
6030
  return (We = z.videoAt) == null ? void 0 : We.call(z, v - (((Pe = (me = n == null ? void 0 : n.job) == null ? void 0 : me.crop) == null ? void 0 : Pe.startS) ?? 0));
6010
6031
  }, onToggle: z.has ? xt : void 0, onAd: Zn, lead: Je ? At.lead : void 0 }),
6011
6032
  /* @__PURE__ */ g("div", { className: "vsp-poster", "aria-hidden": "true", style: { opacity: Oa ? 0 : 1 }, children: [
6012
- /* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Ve}/hqdefault.jpg)` } }),
6033
+ /* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Be}/hqdefault.jpg)` } }),
6013
6034
  /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(Xt, { size: 44 }) })
6014
6035
  ] })
6015
- ] }) : u ? /* @__PURE__ */ g(Ce, { children: [
6036
+ ] }) : u ? /* @__PURE__ */ g(be, { children: [
6016
6037
  /* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
6017
6038
  Da,
6018
6039
  Sa,
6019
6040
  xa
6020
- ] }) : null, is = $t && Ve && !te ? /* @__PURE__ */ i(kc, { ytId: Ve, title: qe, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: ss, children: /* @__PURE__ */ i(gu, { pos: qr, transport: ts, chip: sr({ ...rr, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: ns, onFull: () => {
6041
+ ] }) : null, is = $t && Be && !te ? /* @__PURE__ */ i(kc, { ytId: Be, title: qe, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: ss, children: /* @__PURE__ */ i(gu, { pos: qr, transport: ts, chip: sr({ ...rr, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: ns, onFull: () => {
6021
6042
  cn(!0), K(!0);
6022
6043
  }, copied: null }) }) : null, Xe = z.wordSync ? Kl(he, z.idx, z.t) ? he[z.idx] : void 0 : he[z.idx];
6023
6044
  for (const v of he) for (const [me, Pe] of Object.entries(v.translations)) Pe && A.current.set(`${v.sentenceId ?? v.start}|${me}`, Pe);
@@ -6194,7 +6215,7 @@ function Vu(t) {
6194
6215
  In
6195
6216
  ] }, "export")
6196
6217
  ].filter(Boolean).flatMap((v, me) => me ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${me}`), v] : [v]) }) }) }) : /* @__PURE__ */ i(en, { open: ee, onClose: () => I(!1), title: Gt.settings, doneLabel: Gt.done, drawer: s, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
6197
- Ue.can && /* @__PURE__ */ g(Ce, { children: [
6218
+ Ue.can && /* @__PURE__ */ g(be, { children: [
6198
6219
  /* @__PURE__ */ g("div", { className: "srow srow--tap", onClick: () => {
6199
6220
  I(!1), Ue.onClick();
6200
6221
  }, children: [
@@ -6209,7 +6230,7 @@ function Vu(t) {
6209
6230
  /* @__PURE__ */ i("div", { className: "sdiv" })
6210
6231
  ] }),
6211
6232
  t.settingsExtra
6212
- ] }) }), Dt = te && $t && (!!Ve || u) && /* @__PURE__ */ i(
6233
+ ] }) }), Dt = te && $t && (!!Be || u) && /* @__PURE__ */ i(
6213
6234
  ha,
6214
6235
  {
6215
6236
  page: (t.layout ?? "embed") === "page",
@@ -6271,20 +6292,20 @@ function Vu(t) {
6271
6292
  !s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
6272
6293
  ] }), hr = 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." }), Ts = /* @__PURE__ */ i(ru, { model: ce, rows: he, player: vt ? z : { ...z, playRow: z.seekRow }, tail: rn, tailFg: ct, running: fe, desk: s, feedRef: Yt, listener: !0, showLabels: Ln, find: T, findOpen: !s && p, lang: Qe, warm: P, onVisible: St, wordHl: vn }), Mr = /* @__PURE__ */ i(tc, { error: d ?? W ?? (qn && te ? null : z.error) ?? re.error, onClose: () => {
6273
6294
  M(null), ye(), z.clearError(), re.clearError();
6274
- } }), ws = [R ? jt(R) : null, q ? q.toUpperCase() : null, se || "Read-only copy"].filter(Boolean).join(" · "), vs = (v) => /* @__PURE__ */ i("div", { className: "ctrans", children: re.noVoice ? re.noVoiceNote : /* @__PURE__ */ g(Ce, { children: [
6295
+ } }), ws = [R ? jt(R) : null, q ? q.toUpperCase() : null, se || "Read-only copy"].filter(Boolean).join(" · "), vs = (v) => /* @__PURE__ */ i("div", { className: "ctrans", children: re.noVoice ? re.noVoiceNote : /* @__PURE__ */ g(be, { children: [
6275
6296
  /* @__PURE__ */ g("div", { className: "ctrans__row", children: [
6276
6297
  /* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
6277
6298
  /* @__PURE__ */ g("div", { className: "ctrans__mid", children: [
6278
6299
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: z.idx <= 0 ? 0.3 : 1 }, onClick: z.prev, children: /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 16, sw: 1.8 }) }),
6279
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": re.relang ? "Preparing audio" : z.playing ? "Pause" : "Play", title: re.relang ? "Preparing audio…" : re.playTitle ?? (z.playing ? "Pause" : "Play"), disabled: !bt, onClick: z.toggle, children: re.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: z.playing ? void 0 : { marginLeft: 2 }, children: z.playing ? Qc : Bc }) }),
6300
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": re.relang ? "Preparing audio" : z.playing ? "Pause" : "Play", title: re.relang ? "Preparing audio…" : re.playTitle ?? (z.playing ? "Pause" : "Play"), disabled: !bt, onClick: z.toggle, children: re.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: z.playing ? void 0 : { marginLeft: 2 }, children: z.playing ? Qc : Vc }) }),
6280
6301
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: z.idx >= he.length - 1 ? 0.3 : 1 }, onClick: z.next, children: /* @__PURE__ */ i(oe, { d: X.chevronRight, size: 16, sw: 1.8 }) })
6281
6302
  ] }),
6282
6303
  /* @__PURE__ */ i("span", { className: "ctrans__mute", children: Nn(36) })
6283
6304
  ] }),
6284
6305
  /* @__PURE__ */ i("div", { className: "ctrans__scrub", children: wa(v) })
6285
- ] }) }), Qa = Ic("ga", { tabs: qt, cur: h, pref: (si = qt[0]) == null ? void 0 : si.key, onPick: f }), Ls = Math.max(0, Math.min(100, Math.round(U))), Ba = Ye && /* @__PURE__ */ g("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
6286
- Ve && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Ve}/hqdefault.jpg)` } }),
6287
- /* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(Ce, { children: [
6306
+ ] }) }), Qa = Ic("ga", { tabs: qt, cur: h, pref: (si = qt[0]) == null ? void 0 : si.key, onPick: f }), Ls = Math.max(0, Math.min(100, Math.round(U))), Va = Ye && /* @__PURE__ */ g("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
6307
+ Be && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Be}/hqdefault.jpg)` } }),
6308
+ /* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(be, { children: [
6288
6309
  qe && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: qe }),
6289
6310
  /* @__PURE__ */ i("div", { className: "gfull__holdpct", children: ae === "transcribing" ? `${Ls}%` : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin" }) }),
6290
6311
  /* @__PURE__ */ i("div", { className: "gfull__holdbar", children: /* @__PURE__ */ i("div", { style: { width: `${ae === "transcribing" ? Ls : 0}%` } }) }),
@@ -6299,24 +6320,24 @@ function Vu(t) {
6299
6320
  var v;
6300
6321
  (v = On.current) == null || v.call(On, ks);
6301
6322
  }, [ks]);
6302
- const [Va, gr] = k(!1), fr = !!Dt && !Ye && (Je ? !!z.ended : !z.playing && z.dur > 0 && z.t >= z.dur - 0.5);
6323
+ const [Ba, gr] = k(!1), fr = !!Dt && !Ye && (Je ? !!z.ended : !z.playing && z.dur > 0 && z.t >= z.dur - 0.5);
6303
6324
  S(() => {
6304
6325
  fr || gr(!1);
6305
6326
  }, [fr]);
6306
- const Ha = t.endCard !== !1 && fr && !Va && /* @__PURE__ */ i(zu, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => gr(!0), onReplay: () => {
6327
+ const Ha = t.endCard !== !1 && fr && !Ba && /* @__PURE__ */ i(zu, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => gr(!0), onReplay: () => {
6307
6328
  gr(!0), et.current = !0, z.seekFrac ? z.seekFrac(0) : z.seekRow(0), z.playing || z.toggle();
6308
6329
  } });
6309
- if (u) return /* @__PURE__ */ g(Ce, { children: [
6310
- r ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: hr }) : Ba || Dt || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
6330
+ if (u) return /* @__PURE__ */ g(be, { children: [
6331
+ r ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: hr }) : Va || Dt || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
6311
6332
  Ha,
6312
6333
  Mr
6313
6334
  ] });
6314
6335
  if (s) {
6315
6336
  const v = vt && !$t && !r && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: vs(!0) }), me = !r && (qt.length > 0 || $t || !!re.sidePanel || !!v);
6316
- return /* @__PURE__ */ g(Ce, { children: [
6337
+ return /* @__PURE__ */ g(be, { children: [
6317
6338
  /* @__PURE__ */ i("div", { className: "dhead dhead--listener dhead--cols", children: /* @__PURE__ */ g("div", { className: "gcolhead", children: [
6318
6339
  /* @__PURE__ */ i("div", { className: "gcolhead__main", children: /* @__PURE__ */ g("div", { className: "gcolhead__col", children: [
6319
- /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(Vn, { dark: a, height: 20.38 }) }),
6340
+ /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(Bn, { dark: a, height: 20.38 }) }),
6320
6341
  !r && /* @__PURE__ */ g("div", { className: "dhead__session", children: [
6321
6342
  /* @__PURE__ */ i("span", { className: "t", children: n ? qe : "" }),
6322
6343
  /* @__PURE__ */ i("span", { className: "s", children: n ? ws : "" })
@@ -6353,7 +6374,7 @@ function Vu(t) {
6353
6374
  /* @__PURE__ */ i(ia, { tabs: qt, current: h, onPick: f, gap: h !== "none" }),
6354
6375
  h !== "none" && Gr(h)
6355
6376
  ] }) });
6356
- return /* @__PURE__ */ g(Ce, { children: [
6377
+ return /* @__PURE__ */ g(be, { children: [
6357
6378
  /* @__PURE__ */ i(pu, { dark: a, title: n ? qe : "", subline: n ? ws : "", onOptions: () => I(!0), optionsActive: ee }),
6358
6379
  hr,
6359
6380
  ys,
@@ -6399,17 +6420,17 @@ export {
6399
6420
  Tc as ExportPanel,
6400
6421
  ha as FullVideo,
6401
6422
  gu as MiniPlayer,
6402
- Vc as MuteButton,
6423
+ Bc as MuteButton,
6403
6424
  Xc as NO_SEEK,
6404
6425
  Qc as PAUSE_D,
6405
- Bc as PLAY_D,
6426
+ Vc as PLAY_D,
6406
6427
  tu as PUB_SIDE,
6407
6428
  td as PanelSeek,
6408
6429
  xl as PlayerApiProvider,
6409
6430
  $n as REMOVE_BG_LABEL,
6410
6431
  Zo as REMOVE_BG_NOTE,
6411
6432
  nc as ReplayScrub,
6412
- Bi as SITES,
6433
+ Vi as SITES,
6413
6434
  rd as SiteIcon,
6414
6435
  uc as SpeakerCast,
6415
6436
  Lc as SummaryPanel,
@@ -6424,7 +6445,7 @@ export {
6424
6445
  Oo as hostOfUrl,
6425
6446
  Ht as lineEnd,
6426
6447
  la as lineWords,
6427
- Bt as pictureT,
6448
+ Vt as pictureT,
6428
6449
  En as placePosition,
6429
6450
  _n as realFull,
6430
6451
  Ju as setErrorReporter,