@vocalstack/player 0.1.0-alpha.45 → 0.1.0-alpha.46
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 +83 -80
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
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
|
|
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";
|
|
@@ -1049,7 +1049,7 @@ 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(
|
|
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" })
|
|
@@ -1229,7 +1229,7 @@ function Hi(t, e) {
|
|
|
1229
1229
|
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
1230
|
}
|
|
1231
1231
|
case "facebook":
|
|
1232
|
-
return `https://www.facebook.com/plugins/video.php?${new URLSearchParams({ href: t, autoplay: String(!!e.play), mute: "1", show_text: "false" })}`;
|
|
1232
|
+
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
1233
|
case "tiktok": {
|
|
1234
1234
|
const u = /\/video\/(\d+)/.exec(((s = zt(t)) == null ? void 0 : s.pathname) ?? "");
|
|
1235
1235
|
return u ? `https://www.tiktok.com/embed/v2/${u[1]}?${new URLSearchParams({ autoplay: String(r), muted: "1", controls: "0" })}` : null;
|
|
@@ -1294,21 +1294,24 @@ function Yo({ url: t, t: e, playing: n, seekN: r, title: s }) {
|
|
|
1294
1294
|
const a = j(e);
|
|
1295
1295
|
a.current = e;
|
|
1296
1296
|
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__ */
|
|
1298
|
-
"
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1297
|
+
return u ? /* @__PURE__ */ g(be, { children: [
|
|
1298
|
+
o && /* @__PURE__ */ i("div", { className: "vsp-embed__bg", "aria-hidden": "true" }),
|
|
1299
|
+
/* @__PURE__ */ i(
|
|
1300
|
+
"iframe",
|
|
1301
|
+
{
|
|
1302
|
+
className: "vsp-embed",
|
|
1303
|
+
src: u,
|
|
1304
|
+
title: s,
|
|
1305
|
+
style: { opacity: o ? 1 : 0 },
|
|
1306
|
+
onLoad: () => l(!0),
|
|
1307
|
+
allow: "autoplay; encrypted-media; picture-in-picture; fullscreen",
|
|
1308
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
1309
|
+
tabIndex: -1,
|
|
1310
|
+
"aria-hidden": "true"
|
|
1311
|
+
},
|
|
1312
|
+
u
|
|
1313
|
+
)
|
|
1314
|
+
] }) : null;
|
|
1312
1315
|
}
|
|
1313
1316
|
let Sn = null;
|
|
1314
1317
|
function Uo() {
|
|
@@ -2592,7 +2595,7 @@ Request id: ${t.requestId}` : t.message;
|
|
|
2592
2595
|
/* @__PURE__ */ i(oe, { d: X.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
|
|
2593
2596
|
/* @__PURE__ */ g("span", { style: { flex: 1 }, children: [
|
|
2594
2597
|
t.message,
|
|
2595
|
-
u && /* @__PURE__ */ g(
|
|
2598
|
+
u && /* @__PURE__ */ g(be, { children: [
|
|
2596
2599
|
" ",
|
|
2597
2600
|
/* @__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
2601
|
] })
|
|
@@ -2608,7 +2611,7 @@ function ed({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
|
|
|
2608
2611
|
return /* @__PURE__ */ g("div", { className: "vs-tt", children: [
|
|
2609
2612
|
/* @__PURE__ */ g("div", { className: "vs-tt__r1", children: [
|
|
2610
2613
|
/* @__PURE__ */ i("div", { className: "vs-tt__chip", children: t }),
|
|
2611
|
-
e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(
|
|
2614
|
+
e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(be, { children: [
|
|
2612
2615
|
/* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: n }),
|
|
2613
2616
|
/* @__PURE__ */ i("div", { className: "vs-tt__spk", children: r }),
|
|
2614
2617
|
/* @__PURE__ */ i("div", { className: "vs-tt__voice", children: s })
|
|
@@ -2681,7 +2684,7 @@ function sc({ f: t, desk: e, onOpen: n }) {
|
|
|
2681
2684
|
s,
|
|
2682
2685
|
a > 0 && /* @__PURE__ */ i("span", { className: "badge__n", children: a })
|
|
2683
2686
|
] }, s);
|
|
2684
|
-
return /* @__PURE__ */ g(
|
|
2687
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
2685
2688
|
t.script > 0 && r(e ? "SCRIPT FIX" : "SCRIPT", t.script, !0),
|
|
2686
2689
|
t.manual && r(e ? "MANUAL FIX" : "MANUAL", t.manualCount, t.script === 0)
|
|
2687
2690
|
] });
|
|
@@ -2838,7 +2841,7 @@ function dc({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
2838
2841
|
/* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(lo, { value: h, label: "Copy this error" }) })
|
|
2839
2842
|
] }),
|
|
2840
2843
|
t,
|
|
2841
|
-
f && /* @__PURE__ */ g(
|
|
2844
|
+
f && /* @__PURE__ */ g(be, { children: [
|
|
2842
2845
|
/* @__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
2846
|
/* @__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
2847
|
(D.key === "Enter" || D.key === " ") && (D.preventDefault(), f.action());
|
|
@@ -3062,7 +3065,7 @@ function Tc({ audio: t, video: e, formats: n, onExport: r }) {
|
|
|
3062
3065
|
}).finally(() => {
|
|
3063
3066
|
u.current && l(null);
|
|
3064
3067
|
}));
|
|
3065
|
-
}, f = (p, y, T, N) => /* @__PURE__ */ g(
|
|
3068
|
+
}, f = (p, y, T, N) => /* @__PURE__ */ g(be, { children: [
|
|
3066
3069
|
/* @__PURE__ */ i(zr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: N }),
|
|
3067
3070
|
/* @__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
3071
|
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 +3079,7 @@ function Tc({ audio: t, video: e, formats: n, onExport: r }) {
|
|
|
3076
3079
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
3077
3080
|
t && f("audio", t, yc, "DOWNLOAD AUDIO"),
|
|
3078
3081
|
e && f("video", e, X.video, "DOWNLOAD VIDEO"),
|
|
3079
|
-
n !== !1 && /* @__PURE__ */ g(
|
|
3082
|
+
n !== !1 && /* @__PURE__ */ g(be, { children: [
|
|
3080
3083
|
/* @__PURE__ */ i(zr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
|
|
3081
3084
|
/* @__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
3085
|
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 +3145,7 @@ ${a}`).catch(() => {
|
|
|
3142
3145
|
e ? "Copied" : "Copy"
|
|
3143
3146
|
] })
|
|
3144
3147
|
] }),
|
|
3145
|
-
t.state === "ready" ? /* @__PURE__ */ g(
|
|
3148
|
+
t.state === "ready" ? /* @__PURE__ */ g(be, { children: [
|
|
3146
3149
|
/* @__PURE__ */ i("div", { style: { fontSize: 15, fontWeight: 600, lineHeight: 1.3, letterSpacing: "-.15px", color: "var(--ink-96)", textWrap: "pretty" }, children: s }),
|
|
3147
3150
|
/* @__PURE__ */ i("div", { style: { fontSize: 13, fontWeight: 300, lineHeight: 1.55, color: "var(--ink-80)", textWrap: "pretty", whiteSpace: "pre-line" }, children: a })
|
|
3148
3151
|
] }) : 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 +3224,7 @@ function Ic(t, e) {
|
|
|
3221
3224
|
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
3225
|
}
|
|
3223
3226
|
function bc({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
|
|
3224
|
-
return Oc(t), /* @__PURE__ */ g(
|
|
3227
|
+
return Oc(t), /* @__PURE__ */ g(be, { children: [
|
|
3225
3228
|
e.map((o) => {
|
|
3226
3229
|
const l = t.panel(o);
|
|
3227
3230
|
if (!l.show) return null;
|
|
@@ -3359,7 +3362,7 @@ function Cc({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
|
|
|
3359
3362
|
};
|
|
3360
3363
|
window.addEventListener("pointermove", I), window.addEventListener("pointerup", F), window.addEventListener("pointercancel", F);
|
|
3361
3364
|
}, M = r ? { display: "none" } : void 0;
|
|
3362
|
-
return /* @__PURE__ */ g(
|
|
3365
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
3363
3366
|
/* @__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
3367
|
/* @__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
3368
|
] });
|
|
@@ -3659,8 +3662,8 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3659
3662
|
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 }));
|
|
3660
3663
|
const Ie = (ue = G == null ? void 0 : G.info) == null ? void 0 : ue.progressState;
|
|
3661
3664
|
if (Ie && typeof Ie.seekableStart == "number" && typeof Ie.seekableEnd == "number" && Ie.seekableEnd > Ie.seekableStart) {
|
|
3662
|
-
const
|
|
3663
|
-
if (Se.current = { start: Ie.seekableStart, end: Ie.seekableEnd },
|
|
3665
|
+
const Oe = Se.current == null;
|
|
3666
|
+
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
3667
|
Q.current = !0;
|
|
3665
3668
|
const Ne = ve.current < Ie.seekableStart - 1;
|
|
3666
3669
|
(ae = De.current) == null || ae.call(De, Ne), Ne && ((fe = Re.current) == null || fe.call(Re));
|
|
@@ -3706,7 +3709,7 @@ function $c({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3706
3709
|
] })
|
|
3707
3710
|
] });
|
|
3708
3711
|
}
|
|
3709
|
-
const Qc = /* @__PURE__ */ g(
|
|
3712
|
+
const Qc = /* @__PURE__ */ g(be, { children: [
|
|
3710
3713
|
/* @__PURE__ */ i("rect", { x: "6.5", y: "5", width: "3.75", height: "14", rx: "1.2" }),
|
|
3711
3714
|
/* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
|
|
3712
3715
|
] }), 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" });
|
|
@@ -4100,17 +4103,17 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
|
|
|
4100
4103
|
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
4104
|
}, U.gapBefore = (R, q) => {
|
|
4102
4105
|
if (!J.current) return 0;
|
|
4103
|
-
const se = Z.current, de = se.find((
|
|
4104
|
-
if (!
|
|
4106
|
+
const se = Z.current, de = se.find((Ce) => Ce.sentenceId === R), Oe = se.find((Ce) => Ce.sentenceId === q);
|
|
4107
|
+
if (!Oe) return 0;
|
|
4105
4108
|
const Ne = A.current;
|
|
4106
|
-
if (R == null) return Ne && Ne.sid === q ? Math.max(0,
|
|
4109
|
+
if (R == null) return Ne && Ne.sid === q ? Math.max(0, Oe.start - Ne.t) : 0;
|
|
4107
4110
|
const Le = le.current;
|
|
4108
|
-
return Le && Date.now() - Le.at < 2e3 ? Math.max(0,
|
|
4111
|
+
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
4112
|
}, U.flow = J.current, U.silentSpan = (R) => {
|
|
4110
4113
|
var $e;
|
|
4111
4114
|
const q = Z.current, se = q.findIndex((ut) => ut.sentenceId === R), de = q[se];
|
|
4112
4115
|
if (!de) return null;
|
|
4113
|
-
const
|
|
4116
|
+
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
4117
|
return { fromS: He, ms: (Ne - He) * 1e3 / (U.rate || 1) };
|
|
4115
4118
|
}, U.speakable = (R) => {
|
|
4116
4119
|
const q = Te.current;
|
|
@@ -4155,11 +4158,11 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
|
|
|
4155
4158
|
const U = () => {
|
|
4156
4159
|
var Ne, Le;
|
|
4157
4160
|
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((
|
|
4161
|
+
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
4162
|
const se = A.current;
|
|
4160
4163
|
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,
|
|
4162
|
-
se && de && de.sentenceId === se.sid && de.t > 0.1 && F(null), _((
|
|
4164
|
+
const de = ((Le = u.current) == null ? void 0 : Le.position()) ?? null, Oe = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
|
|
4165
|
+
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
4166
|
};
|
|
4164
4167
|
U();
|
|
4165
4168
|
const R = setInterval(U, 100);
|
|
@@ -4180,7 +4183,7 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
|
|
|
4180
4183
|
}, _e = (U) => {
|
|
4181
4184
|
var q, se, de;
|
|
4182
4185
|
const R = Math.max(0, Math.min(Math.max(0, e.length - 1), U));
|
|
4183
|
-
f(R), Ae.current = R, y((
|
|
4186
|
+
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));
|
|
4184
4187
|
}, Be = (U) => {
|
|
4185
4188
|
var R;
|
|
4186
4189
|
E(), F(null), (R = u.current) == null || R.startWithin(-1, 0), _e(U);
|
|
@@ -4260,22 +4263,22 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
|
|
|
4260
4263
|
A.current = Mt, F(Mt), _e(Ge);
|
|
4261
4264
|
return;
|
|
4262
4265
|
}
|
|
4263
|
-
const
|
|
4264
|
-
let
|
|
4265
|
-
const He =
|
|
4266
|
+
const Oe = (se == null ? void 0 : se.sentenceId) ?? null, { from: Ne, span: Le } = $(q);
|
|
4267
|
+
let Ce = Le > 0 ? Math.max(0, Math.min(1, (R - Ne) / Le)) : 0;
|
|
4268
|
+
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
4269
|
if (se && He && He.length === se.words.length && $e > 0) {
|
|
4267
4270
|
let Ge = 0;
|
|
4268
4271
|
for (let st = 0; st < se.words.length; st++) se.words[st].start <= R && (Ge = st);
|
|
4269
4272
|
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
|
-
|
|
4273
|
+
Ce = Math.min(1, (He[Ge][0] + Mt * (He[Ge][1] - He[Ge][0])) / $e);
|
|
4271
4274
|
}
|
|
4272
|
-
|
|
4275
|
+
Oe != null && ((pt = u.current) == null || pt.startWithin(Oe, Ce)), F(Ce > 0.01 ? { t: R, sid: Oe } : null), _e(q);
|
|
4273
4276
|
},
|
|
4274
4277
|
seekWord: a ? (U) => {
|
|
4275
|
-
var de,
|
|
4278
|
+
var de, Oe, Ne, Le;
|
|
4276
4279
|
const R = e[G];
|
|
4277
4280
|
if (!R || R.sentenceId == null) return;
|
|
4278
|
-
const q = R.words.findIndex((
|
|
4281
|
+
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
4282
|
se != null && ((Le = u.current) == null || Le.seekWithin(se));
|
|
4280
4283
|
} : void 0,
|
|
4281
4284
|
playRow: (U) => {
|
|
@@ -4306,11 +4309,11 @@ function Jc(t, e, n, r, s, a, o = !1, l) {
|
|
|
4306
4309
|
}
|
|
4307
4310
|
};
|
|
4308
4311
|
function Ye(U) {
|
|
4309
|
-
var se, de,
|
|
4312
|
+
var se, de, Oe, Ne;
|
|
4310
4313
|
const R = (se = e[U]) == null ? void 0 : se.sentenceId;
|
|
4311
4314
|
if (R == null) return;
|
|
4312
4315
|
f(U), Ae.current = U, F(null), A.current = null, (de = u.current) == null || de.joinSilently(R);
|
|
4313
|
-
const q = ((
|
|
4316
|
+
const q = ((Oe = u.current) == null ? void 0 : Oe.resting()) ?? null;
|
|
4314
4317
|
te((q == null ? void 0 : q.s) ?? null), ne(!!(q != null && q.silent)), M(!!((Ne = u.current) != null && Ne.playing));
|
|
4315
4318
|
}
|
|
4316
4319
|
return fe.joinAt = o ? (U) => {
|
|
@@ -4337,13 +4340,13 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4337
4340
|
const P = Ti($, W, H);
|
|
4338
4341
|
for (const [xe, Qe] of Object.entries(_e[De ?? ""] ?? {})) P.set(Number(xe), Qe);
|
|
4339
4342
|
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,
|
|
4343
|
+
}, [$, 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
4344
|
() => n.filter((P) => !P.suppressed && !P.unclear).map((P) => P.sentenceId).filter((P) => P != null),
|
|
4342
4345
|
[n]
|
|
4343
|
-
), Ne = pc({ recordingId: t, lang: ve, ended: s, cred: a, pickedVoice: m || (U ?? L), sentenceIds: s && de ?
|
|
4346
|
+
), 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
4347
|
var xe;
|
|
4345
4348
|
return P.id === ((xe = Ne.track) == null ? void 0 : xe.voice);
|
|
4346
|
-
}) ?? W.find((P) => P.default) ?? W[0] ?? null,
|
|
4349
|
+
}) ?? W.find((P) => P.default) ?? W[0] ?? null, Ce = (Le == null ? void 0 : Le.id) ?? null;
|
|
4347
4350
|
S(() => {
|
|
4348
4351
|
if (!Ne.rendering) return;
|
|
4349
4352
|
const P = setInterval(Ne.reload, 4e3);
|
|
@@ -4451,7 +4454,7 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4451
4454
|
} : void 0,
|
|
4452
4455
|
foldKey: ue,
|
|
4453
4456
|
foldFor: bt,
|
|
4454
|
-
currentId: Me && ue != null ? ae.get(ue) ?? null :
|
|
4457
|
+
currentId: Me && ue != null ? ae.get(ue) ?? null : Ce,
|
|
4455
4458
|
armedId: Q.armId,
|
|
4456
4459
|
sampleId: Q.sampleId,
|
|
4457
4460
|
dlId: Q.dlId,
|
|
@@ -4468,7 +4471,7 @@ function nu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4468
4471
|
},
|
|
4469
4472
|
onUse: gn
|
|
4470
4473
|
}
|
|
4471
|
-
) }), Fn = M ? null : /* @__PURE__ */ g(
|
|
4474
|
+
) }), Fn = M ? null : /* @__PURE__ */ g(be, { children: [
|
|
4472
4475
|
mt,
|
|
4473
4476
|
Ot
|
|
4474
4477
|
] }), 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;
|
|
@@ -4615,7 +4618,7 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4615
4618
|
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: [
|
|
4616
4619
|
/* @__PURE__ */ g("div", { className: "txline__meta", children: [
|
|
4617
4620
|
/* @__PURE__ */ i("span", { className: "txline__at", children: jt(H.start) }),
|
|
4618
|
-
m && H.speaker >= 0 && /* @__PURE__ */ g(
|
|
4621
|
+
m && H.speaker >= 0 && /* @__PURE__ */ g(be, { children: [
|
|
4619
4622
|
/* @__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
4623
|
/* @__PURE__ */ i("span", { className: `txline__who lane-${he}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Fe }),
|
|
4621
4624
|
Ae.hasVoice && /* @__PURE__ */ i(sa, { color: Ae.fg ?? `var(--lane-${he})` })
|
|
@@ -4625,7 +4628,7 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4625
4628
|
Ie && /* @__PURE__ */ i(ic, { alone: !0, onOpen: () => a == null ? void 0 : a(H, !1) })
|
|
4626
4629
|
] }),
|
|
4627
4630
|
/* @__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,
|
|
4631
|
+
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, 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
4632
|
return /* @__PURE__ */ g("span", { children: [
|
|
4630
4633
|
/* @__PURE__ */ i(
|
|
4631
4634
|
"span",
|
|
@@ -4633,18 +4636,18 @@ function ru({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4633
4636
|
className: "txw",
|
|
4634
4637
|
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
4638
|
onClick: o && !_e ? (Le) => {
|
|
4636
|
-
var
|
|
4639
|
+
var Ce;
|
|
4637
4640
|
if (Le.stopPropagation(), c) {
|
|
4638
4641
|
o(H, ue);
|
|
4639
4642
|
return;
|
|
4640
4643
|
}
|
|
4641
4644
|
if (I && x) {
|
|
4642
|
-
(
|
|
4645
|
+
(Ce = n.seekWord) == null || Ce.call(n, ue);
|
|
4643
4646
|
return;
|
|
4644
4647
|
}
|
|
4645
4648
|
n.playRow(E);
|
|
4646
4649
|
} : 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)" :
|
|
4650
|
+
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
4651
|
children: ue.text
|
|
4649
4652
|
}
|
|
4650
4653
|
),
|
|
@@ -4934,7 +4937,7 @@ function Yn({ pos: t, interactive: e, axis: n = "x" }) {
|
|
|
4934
4937
|
const u = a(c);
|
|
4935
4938
|
s(null), t.onSeek(u);
|
|
4936
4939
|
}, l = r != null ? r * 100 : t.pct;
|
|
4937
|
-
return /* @__PURE__ */ g(
|
|
4940
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
4938
4941
|
/* @__PURE__ */ i("span", { className: `gfull__t${e ? " gfull__t--at" : ""}`, children: r != null ? t.labelAt(r) : t.atLabel }),
|
|
4939
4942
|
/* @__PURE__ */ i(
|
|
4940
4943
|
"div",
|
|
@@ -5229,7 +5232,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5229
5232
|
c
|
|
5230
5233
|
] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: E, children: [
|
|
5231
5234
|
/* @__PURE__ */ i("div", { className: "gfull__subback", "aria-hidden": "true", children: /* @__PURE__ */ g("span", { children: [
|
|
5232
|
-
l.who && /* @__PURE__ */ g(
|
|
5235
|
+
l.who && /* @__PURE__ */ g(be, { children: [
|
|
5233
5236
|
/* @__PURE__ */ g("b", { children: [
|
|
5234
5237
|
l.who,
|
|
5235
5238
|
":"
|
|
@@ -5239,7 +5242,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5239
5242
|
l.words.map(($) => $.t + $.sp).join("")
|
|
5240
5243
|
] }) }),
|
|
5241
5244
|
/* @__PURE__ */ g("span", { children: [
|
|
5242
|
-
l.who && /* @__PURE__ */ g(
|
|
5245
|
+
l.who && /* @__PURE__ */ g(be, { children: [
|
|
5243
5246
|
/* @__PURE__ */ g("b", { style: { color: l.color }, children: [
|
|
5244
5247
|
l.who,
|
|
5245
5248
|
":"
|
|
@@ -5252,7 +5255,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5252
5255
|
] }, Me))
|
|
5253
5256
|
] })
|
|
5254
5257
|
] }) }),
|
|
5255
|
-
/* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ g(
|
|
5258
|
+
/* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ g(be, { children: [
|
|
5256
5259
|
/* @__PURE__ */ i(_r, { live: o.live, desk: !0, pct: u }),
|
|
5257
5260
|
/* @__PURE__ */ i(Un, { t: p }),
|
|
5258
5261
|
/* @__PURE__ */ i(Yn, { pos: o, interactive: !0 }),
|
|
@@ -5263,7 +5266,7 @@ function ha({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5263
5266
|
/* @__PURE__ */ i(Yn, { pos: o, interactive: !0 }),
|
|
5264
5267
|
/* @__PURE__ */ i("div", { className: "gfull__chip", children: f }),
|
|
5265
5268
|
_e
|
|
5266
|
-
] }) : /* @__PURE__ */ g(
|
|
5269
|
+
] }) : /* @__PURE__ */ g(be, { children: [
|
|
5267
5270
|
/* @__PURE__ */ g("div", { className: "gfull__row", children: [
|
|
5268
5271
|
/* @__PURE__ */ i(_r, { live: o.live, pct: u, mark: !0 }),
|
|
5269
5272
|
/* @__PURE__ */ i(Yn, { pos: o, interactive: !0 })
|
|
@@ -5484,7 +5487,7 @@ function bu(t, e) {
|
|
|
5484
5487
|
] }),
|
|
5485
5488
|
T
|
|
5486
5489
|
] })
|
|
5487
|
-
] }), B = /* @__PURE__ */ g(
|
|
5490
|
+
] }), B = /* @__PURE__ */ g(be, { children: [
|
|
5488
5491
|
/* @__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
5492
|
/* @__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
5493
|
] });
|
|
@@ -5497,7 +5500,7 @@ function bu(t, e) {
|
|
|
5497
5500
|
}
|
|
5498
5501
|
};
|
|
5499
5502
|
}
|
|
5500
|
-
const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Vt = (t) => /* @__PURE__ */ g(
|
|
5503
|
+
const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Vt = (t) => /* @__PURE__ */ g(be, { children: [
|
|
5501
5504
|
/* @__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
5505
|
/* @__PURE__ */ i("path", { d: "M13.75 2.75V7.5h4.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
|
|
5503
5506
|
/* @__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 })
|
|
@@ -5505,13 +5508,13 @@ const yt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "curren
|
|
|
5505
5508
|
{ 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
5509
|
{ name: "MP3", tint: "#f78472", glyph: Vt("MP3") },
|
|
5507
5510
|
{ 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(
|
|
5511
|
+
{ name: "Video", tint: "#55abe5", glyph: /* @__PURE__ */ g(be, { children: [
|
|
5509
5512
|
/* @__PURE__ */ i("rect", { x: "3", y: "5.5", width: "13", height: "13", rx: "2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5510
5513
|
yt("M16 10.2 21 7v10l-5-3.2v-3.6Z")
|
|
5511
5514
|
] }) },
|
|
5512
5515
|
{ 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
5516
|
{ name: "WAV", tint: "#7ee0b4", glyph: Vt("WAV") },
|
|
5514
|
-
{ name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ g(
|
|
5517
|
+
{ name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ g(be, { children: [
|
|
5515
5518
|
yt("M11 8.6a5 5 0 0 1 7.8 3.1 3 3 0 0 1-.3 6H11V8.6Z"),
|
|
5516
5519
|
/* @__PURE__ */ i("rect", { x: "8.6", y: "9.4", width: "1.3", height: "8.3", rx: ".65", fill: "currentColor" }),
|
|
5517
5520
|
/* @__PURE__ */ i("rect", { x: "6.2", y: "10.6", width: "1.3", height: "7.1", rx: ".65", fill: "currentColor" }),
|
|
@@ -5613,7 +5616,7 @@ function Eu(t) {
|
|
|
5613
5616
|
function _u({ poster: t, src: e }) {
|
|
5614
5617
|
var s;
|
|
5615
5618
|
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(
|
|
5619
|
+
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
5620
|
/* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
|
|
5618
5621
|
/* @__PURE__ */ i(Du, {})
|
|
5619
5622
|
] });
|
|
@@ -5641,7 +5644,7 @@ function Bn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
|
|
|
5641
5644
|
] });
|
|
5642
5645
|
}
|
|
5643
5646
|
function ma({ connect: t, onClick: e, label: n }) {
|
|
5644
|
-
return /* @__PURE__ */ g(
|
|
5647
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
5645
5648
|
/* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
|
|
5646
5649
|
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
5650
|
/* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
|
|
@@ -5843,7 +5846,7 @@ function Vu(t) {
|
|
|
5843
5846
|
S(() => {
|
|
5844
5847
|
!Be || !Me || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
|
|
5845
5848
|
}, [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,
|
|
5849
|
+
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), 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);
|
|
5847
5850
|
S(() => {
|
|
5848
5851
|
!ie || gn.current === J || (gn.current = J, G(J));
|
|
5849
5852
|
}, [J, ie]);
|
|
@@ -5954,7 +5957,7 @@ function Vu(t) {
|
|
|
5954
5957
|
S(() => {
|
|
5955
5958
|
vt || (lt.playing && lt.pause(), re.player.playing && re.player.pause());
|
|
5956
5959
|
}, [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(
|
|
5960
|
+
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(be, { children: [
|
|
5958
5961
|
v === "summary" && an && /* @__PURE__ */ i(Lc, { s: Pt }),
|
|
5959
5962
|
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
5963
|
] }), 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 = {
|
|
@@ -5989,7 +5992,7 @@ function Vu(t) {
|
|
|
5989
5992
|
}, busy: re.relang && !Ve || Lt };
|
|
5990
5993
|
fl(bt && vt ? { playing: z.playing, toggle: () => {
|
|
5991
5994
|
et.current = !0, z.toggle();
|
|
5992
|
-
}, next: z.next, prev: z.prev } : null,
|
|
5995
|
+
}, next: z.next, prev: z.prev } : null, Oe);
|
|
5993
5996
|
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
5997
|
I(!1), Ue.onClick();
|
|
5995
5998
|
}, style: { position: "relative" }, children: [
|
|
@@ -6003,7 +6006,7 @@ function Vu(t) {
|
|
|
6003
6006
|
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: [
|
|
6004
6007
|
/* @__PURE__ */ i("div", { "aria-hidden": "true", className: "txyt__tap", onClick: xt, style: { cursor: "pointer" } }),
|
|
6005
6008
|
/* @__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(
|
|
6009
|
+
] }) : null, ss = Ve ? /* @__PURE__ */ g(be, { children: [
|
|
6007
6010
|
/* @__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) => {
|
|
6008
6011
|
var me, Pe, We;
|
|
6009
6012
|
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));
|
|
@@ -6012,7 +6015,7 @@ function Vu(t) {
|
|
|
6012
6015
|
/* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Ve}/hqdefault.jpg)` } }),
|
|
6013
6016
|
/* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(Xt, { size: 44 }) })
|
|
6014
6017
|
] })
|
|
6015
|
-
] }) : u ? /* @__PURE__ */ g(
|
|
6018
|
+
] }) : u ? /* @__PURE__ */ g(be, { children: [
|
|
6016
6019
|
/* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
|
|
6017
6020
|
Da,
|
|
6018
6021
|
Sa,
|
|
@@ -6194,7 +6197,7 @@ function Vu(t) {
|
|
|
6194
6197
|
In
|
|
6195
6198
|
] }, "export")
|
|
6196
6199
|
].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(
|
|
6200
|
+
Ue.can && /* @__PURE__ */ g(be, { children: [
|
|
6198
6201
|
/* @__PURE__ */ g("div", { className: "srow srow--tap", onClick: () => {
|
|
6199
6202
|
I(!1), Ue.onClick();
|
|
6200
6203
|
}, children: [
|
|
@@ -6271,7 +6274,7 @@ function Vu(t) {
|
|
|
6271
6274
|
!s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
|
|
6272
6275
|
] }), 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
6276
|
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(
|
|
6277
|
+
} }), 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
6278
|
/* @__PURE__ */ g("div", { className: "ctrans__row", children: [
|
|
6276
6279
|
/* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
|
|
6277
6280
|
/* @__PURE__ */ g("div", { className: "ctrans__mid", children: [
|
|
@@ -6284,7 +6287,7 @@ function Vu(t) {
|
|
|
6284
6287
|
/* @__PURE__ */ i("div", { className: "ctrans__scrub", children: wa(v) })
|
|
6285
6288
|
] }) }), 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
6289
|
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(
|
|
6290
|
+
/* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(be, { children: [
|
|
6288
6291
|
qe && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: qe }),
|
|
6289
6292
|
/* @__PURE__ */ i("div", { className: "gfull__holdpct", children: ae === "transcribing" ? `${Ls}%` : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin" }) }),
|
|
6290
6293
|
/* @__PURE__ */ i("div", { className: "gfull__holdbar", children: /* @__PURE__ */ i("div", { style: { width: `${ae === "transcribing" ? Ls : 0}%` } }) }),
|
|
@@ -6306,14 +6309,14 @@ function Vu(t) {
|
|
|
6306
6309
|
const Ha = t.endCard !== !1 && fr && !Va && /* @__PURE__ */ i(zu, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => gr(!0), onReplay: () => {
|
|
6307
6310
|
gr(!0), et.current = !0, z.seekFrac ? z.seekFrac(0) : z.seekRow(0), z.playing || z.toggle();
|
|
6308
6311
|
} });
|
|
6309
|
-
if (u) return /* @__PURE__ */ g(
|
|
6312
|
+
if (u) return /* @__PURE__ */ g(be, { children: [
|
|
6310
6313
|
r ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: hr }) : Ba || Dt || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
|
|
6311
6314
|
Ha,
|
|
6312
6315
|
Mr
|
|
6313
6316
|
] });
|
|
6314
6317
|
if (s) {
|
|
6315
6318
|
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(
|
|
6319
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
6317
6320
|
/* @__PURE__ */ i("div", { className: "dhead dhead--listener dhead--cols", children: /* @__PURE__ */ g("div", { className: "gcolhead", children: [
|
|
6318
6321
|
/* @__PURE__ */ i("div", { className: "gcolhead__main", children: /* @__PURE__ */ g("div", { className: "gcolhead__col", children: [
|
|
6319
6322
|
/* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(Vn, { dark: a, height: 20.38 }) }),
|
|
@@ -6353,7 +6356,7 @@ function Vu(t) {
|
|
|
6353
6356
|
/* @__PURE__ */ i(ia, { tabs: qt, current: h, onPick: f, gap: h !== "none" }),
|
|
6354
6357
|
h !== "none" && Gr(h)
|
|
6355
6358
|
] }) });
|
|
6356
|
-
return /* @__PURE__ */ g(
|
|
6359
|
+
return /* @__PURE__ */ g(be, { children: [
|
|
6357
6360
|
/* @__PURE__ */ i(pu, { dark: a, title: n ? qe : "", subline: n ? ws : "", onOptions: () => I(!0), optionsActive: ee }),
|
|
6358
6361
|
hr,
|
|
6359
6362
|
ys,
|