@factorialco/f0-react 10.1.0 → 10.2.1
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/{ChatDocxThumbnail-CX5HYrKS.js → ChatDocxThumbnail-DdI_ITWn.js} +1 -1
- package/dist/{ChatPdfThumbnail-ISkJYLY9.js → ChatPdfThumbnail-DftUFjlF.js} +1 -1
- package/dist/{ChatPostComposerDialog-DxbHdZxW.js → ChatPostComposerDialog-Gj1gd5ED.js} +3 -3
- package/dist/{ChatSheetThumbnail-B2lUZoSi.js → ChatSheetThumbnail-BKCy7BGq.js} +1 -1
- package/dist/{CoachmarkProvider-DqWyppW-.js → CoachmarkProvider-CsqkzlOs.js} +66867 -19860
- package/dist/{DocumentToolbar-BcDACwRP.js → DocumentToolbar-DeE70FQ2.js} +5 -5
- package/dist/{DocxViewer-D-5449ha.js → DocxViewer-bEu4jZnY.js} +3 -3
- package/dist/F0AiProcessingOverlay-IdMxPTPz.js +5999 -0
- package/dist/{F0Box-DrW7A9gg.js → F0Box-D0fWIRgc.js} +20 -20
- package/dist/{F0CanvasPanel-DCKaKwkK.js → F0CanvasPanel-mMDAtCgu.js} +12993 -9719
- package/dist/F0DocumentViewer-CyCOZ_XC.js +391 -0
- package/dist/F0DocumentViewer-DZSiAv1A.js +3 -0
- package/dist/{F0Map-o0Ni4sbn.js → F0Map-DyOzE_rQ.js} +170 -170
- package/dist/{F0Select-CwkVLiZO.js → F0Select-BrvzcAQQ.js} +2270 -2269
- package/dist/F0VideoPlayer-2XgTkMzT.js +1 -0
- package/dist/{F0VideoPlayer-Iw-SFQqN.js → F0VideoPlayer-CEjGJ_6y.js} +396 -397
- package/dist/{LocationMap-CYwkLWH5.js → LocationMap-Ds0SgBMO.js} +2 -2
- package/dist/{Map-DM9wfTpz.js → Map-DVMFiMrr.js} +55 -55
- package/dist/{SheetViewer-BbDeLWkN.js → SheetViewer-DOPvERv8.js} +5 -5
- package/dist/{TextViewer-CnI7Nabs.js → TextViewer-WRl8atLN.js} +2 -2
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +3 -3
- package/dist/{axe-Z5T0keK7.js → axe-CpDXsSXe.js} +1 -1
- package/dist/component-status.js +54 -9
- package/dist/{dist-DjxhsV9m.js → dist-7YY6sRd4.js} +1 -1
- package/dist/experimental.d.ts +1702 -66
- package/dist/experimental.js +8944 -8185
- package/dist/{exports-CcIlylmm.d.ts → exports-BDFKcDjH.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +3994 -51002
- package/dist/{index-B_My10oo.d.ts → index-C_3CYY4r.d.ts} +1 -1
- package/dist/{index-CAJfRljV.d.ts → index-NaWQyQZT.d.ts} +7 -1
- package/dist/{maplibre-BD2IQLbD.js → maplibre-DYBwcFt1.js} +3 -3
- package/dist/{maplibre-gl-DT2EWG65.js → maplibre-gl-DVldSYfz.js} +1 -1
- package/dist/{papaparse.min-CJow4fNM.js → papaparse.min-BwPbUAd9.js} +1 -1
- package/dist/{pdfWorker-DYQKoZEy.js → pdfWorker-C_6XT3yW.js} +4 -3
- package/dist/{popover-BTxkQ2PV.js → popover-B2hEEubt.js} +2821 -2780
- package/dist/{renderDocx-gCyLwCY2.js → renderDocx-_UmnE-yc.js} +1 -1
- package/dist/rolldown-runtime-BItFwnF5.js +30 -0
- package/dist/{sheetPreview-CcQwSTIl.js → sheetPreview-Ca0kCtSa.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{tooltip-DVXqL5Ri.js → tooltip-TOvfXq9F.js} +1481 -1509
- package/dist/{useData-CiWwYG4W.js → useData-DjJsB0qa.js} +4744 -4743
- package/package.json +1 -1
- package/dist/F0AiProcessingOverlay-CmqXWu0j.js +0 -9183
- package/dist/F0DocumentViewer-CEhoiH_i.js +0 -3
- package/dist/F0DocumentViewer-DpuzMqKE.js +0 -392
- package/dist/F0VideoPlayer-CnrSP5Em.js +0 -1
- package/dist/Printer-snTHysV7.js +0 -34
- package/dist/VolumeMuted-Db9P5djr.js +0 -65
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
1
|
+
import { w as e } from "./CoachmarkProvider-CsqkzlOs.js";
|
|
2
|
+
import { A as t, B as n, F as r, I as i, L as a, U as o, V as s, a as c, an as l, ar as u, b as d, i as f, in as p, j as m, rn as h, rr as g, t as _, z as v } from "./popover-B2hEEubt.js";
|
|
3
|
+
import { I as y, L as b } from "./tooltip-TOvfXq9F.js";
|
|
4
|
+
import { Ao as x, Ji as S, Ki as C, Wa as ee, Za as te, _a as w, ma as T, mo as E, pa as ne, qi as re } from "./F0CanvasPanel-mMDAtCgu.js";
|
|
5
|
+
import { t as D } from "./Check-DAp9gCRh.js";
|
|
6
|
+
import { forwardRef as O, useCallback as k, useEffect as A, useId as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
7
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
9
8
|
//#region src/elements/lib/localized.ts
|
|
10
|
-
function
|
|
9
|
+
function L(e) {
|
|
11
10
|
return Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "locale" in e && "value" in e);
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function R(e, t) {
|
|
14
13
|
if (e !== void 0) {
|
|
15
|
-
if (!
|
|
14
|
+
if (!L(e)) return e;
|
|
16
15
|
if (e.length !== 0) return ((t ? e.find((e) => e.locale === t) : void 0) ?? e[0]).value;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function z(...e) {
|
|
20
19
|
let t = /* @__PURE__ */ new Map();
|
|
21
|
-
for (let n of e) if (
|
|
20
|
+
for (let n of e) if (L(n)) for (let e of n) {
|
|
22
21
|
let n = t.get(e.locale);
|
|
23
22
|
n ? !n.label && e.label && (n.label = e.label) : t.set(e.locale, {
|
|
24
23
|
locale: e.locale,
|
|
@@ -27,7 +26,7 @@ function R(...e) {
|
|
|
27
26
|
}
|
|
28
27
|
return Array.from(t.values());
|
|
29
28
|
}
|
|
30
|
-
function
|
|
29
|
+
function B(e, t) {
|
|
31
30
|
if (e.label) return e.label;
|
|
32
31
|
try {
|
|
33
32
|
let n = t ?? e.locale, r = new Intl.DisplayNames([n], { type: "language" }).of(e.locale) ?? e.locale;
|
|
@@ -36,7 +35,7 @@ function z(e, t) {
|
|
|
36
35
|
return e.locale;
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
|
-
function
|
|
38
|
+
function V(e, t) {
|
|
40
39
|
if (e.length === 0) return;
|
|
41
40
|
let n = e.map((e) => e.locale), r = (e) => e.split("-")[0], i = (e) => n.find((t) => t === e) ?? n.find((t) => r(t) === r(e));
|
|
42
41
|
if (t) {
|
|
@@ -52,29 +51,29 @@ function B(e, t) {
|
|
|
52
51
|
}
|
|
53
52
|
//#endregion
|
|
54
53
|
//#region src/blocks/F0VideoPlayer/utils.ts
|
|
55
|
-
var
|
|
54
|
+
var H = [
|
|
56
55
|
.5,
|
|
57
56
|
.75,
|
|
58
57
|
1,
|
|
59
58
|
1.25,
|
|
60
59
|
1.5
|
|
61
|
-
],
|
|
60
|
+
], U = .1, W = [
|
|
62
61
|
25,
|
|
63
62
|
50,
|
|
64
63
|
75
|
|
65
|
-
],
|
|
66
|
-
function
|
|
64
|
+
], G = 3e5, K = .03;
|
|
65
|
+
function q(e) {
|
|
67
66
|
return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
68
67
|
}
|
|
69
|
-
function
|
|
68
|
+
function J(e) {
|
|
70
69
|
return `${e}x`;
|
|
71
70
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
71
|
+
function Y(e) {
|
|
72
|
+
return H.includes(e);
|
|
74
73
|
}
|
|
75
74
|
//#endregion
|
|
76
75
|
//#region src/blocks/F0VideoPlayer/components/AudioDescriptionToggleIcons.tsx
|
|
77
|
-
var
|
|
76
|
+
var X = {
|
|
78
77
|
x: 12,
|
|
79
78
|
y: 15,
|
|
80
79
|
textAnchor: "middle",
|
|
@@ -82,14 +81,14 @@ var Y = {
|
|
|
82
81
|
fontWeight: 700,
|
|
83
82
|
fontFamily: "inherit",
|
|
84
83
|
letterSpacing: -.4
|
|
85
|
-
},
|
|
84
|
+
}, Z = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
|
|
86
85
|
xmlns: "http://www.w3.org/2000/svg",
|
|
87
86
|
viewBox: "0 0 24 24",
|
|
88
87
|
fill: "none",
|
|
89
88
|
ref: n,
|
|
90
89
|
...t,
|
|
91
90
|
"aria-hidden": "true",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ F("rect", {
|
|
93
92
|
x: 3.5,
|
|
94
93
|
y: 6.5,
|
|
95
94
|
width: 17,
|
|
@@ -97,38 +96,38 @@ var Y = {
|
|
|
97
96
|
rx: 2.5,
|
|
98
97
|
stroke: "currentColor",
|
|
99
98
|
vectorEffect: "non-scaling-stroke"
|
|
100
|
-
}), /* @__PURE__ */
|
|
101
|
-
...
|
|
99
|
+
}), /* @__PURE__ */ F("text", {
|
|
100
|
+
...X,
|
|
102
101
|
fill: "currentColor",
|
|
103
102
|
children: "AD"
|
|
104
103
|
})]
|
|
105
104
|
}));
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
let r = `ad-mask-${
|
|
109
|
-
return /* @__PURE__ */
|
|
105
|
+
Z.displayName = "AudioDescriptionLineIcon";
|
|
106
|
+
var ie = O(({ animate: e, ...t }, n) => {
|
|
107
|
+
let r = `ad-mask-${j().replace(/:/g, "")}`;
|
|
108
|
+
return /* @__PURE__ */ I("svg", {
|
|
110
109
|
xmlns: "http://www.w3.org/2000/svg",
|
|
111
110
|
viewBox: "0 0 24 24",
|
|
112
111
|
fill: "none",
|
|
113
112
|
ref: n,
|
|
114
113
|
...t,
|
|
115
114
|
"aria-hidden": "true",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ I("mask", {
|
|
117
116
|
id: r,
|
|
118
117
|
maskUnits: "userSpaceOnUse",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ F("rect", {
|
|
120
119
|
x: 3,
|
|
121
120
|
y: 6,
|
|
122
121
|
width: 18,
|
|
123
122
|
height: 12,
|
|
124
123
|
rx: 3,
|
|
125
124
|
fill: "white"
|
|
126
|
-
}), /* @__PURE__ */
|
|
127
|
-
...
|
|
125
|
+
}), /* @__PURE__ */ F("text", {
|
|
126
|
+
...X,
|
|
128
127
|
fill: "black",
|
|
129
128
|
children: "AD"
|
|
130
129
|
})]
|
|
131
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ F("rect", {
|
|
132
131
|
x: 3,
|
|
133
132
|
y: 6,
|
|
134
133
|
width: 18,
|
|
@@ -139,17 +138,17 @@ var ae = D(({ animate: e, ...t }, n) => {
|
|
|
139
138
|
})]
|
|
140
139
|
});
|
|
141
140
|
});
|
|
142
|
-
|
|
141
|
+
ie.displayName = "AudioDescriptionFilledIcon";
|
|
143
142
|
//#endregion
|
|
144
143
|
//#region src/blocks/F0VideoPlayer/components/CaptionsToggleIcons.tsx
|
|
145
|
-
var
|
|
144
|
+
var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
|
|
146
145
|
xmlns: "http://www.w3.org/2000/svg",
|
|
147
146
|
fill: "none",
|
|
148
147
|
viewBox: "0 0 24 24",
|
|
149
148
|
ref: n,
|
|
150
149
|
...t,
|
|
151
150
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ F("rect", {
|
|
153
152
|
x: 3.5,
|
|
154
153
|
y: 6.5,
|
|
155
154
|
width: 17,
|
|
@@ -158,13 +157,13 @@ var Z = D(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
|
|
|
158
157
|
stroke: "currentColor",
|
|
159
158
|
vectorEffect: "non-scaling-stroke"
|
|
160
159
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ F("path", {
|
|
162
161
|
stroke: "currentColor",
|
|
163
162
|
strokeLinecap: "round",
|
|
164
163
|
d: "M7 10.75h8",
|
|
165
164
|
vectorEffect: "non-scaling-stroke"
|
|
166
165
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ F("path", {
|
|
168
167
|
stroke: "currentColor",
|
|
169
168
|
strokeLinecap: "round",
|
|
170
169
|
d: "M7 13.75h4.5",
|
|
@@ -172,14 +171,14 @@ var Z = D(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
|
|
|
172
171
|
})
|
|
173
172
|
]
|
|
174
173
|
}));
|
|
175
|
-
|
|
176
|
-
var
|
|
174
|
+
Q.displayName = "CaptionsLineIcon";
|
|
175
|
+
var ae = O(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
|
|
177
176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
178
177
|
fill: "none",
|
|
179
178
|
viewBox: "0 0 24 24",
|
|
180
179
|
ref: n,
|
|
181
180
|
...t,
|
|
182
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ F("path", {
|
|
183
182
|
fill: "currentColor",
|
|
184
183
|
fillRule: "evenodd",
|
|
185
184
|
clipRule: "evenodd",
|
|
@@ -187,30 +186,30 @@ var oe = D(({ animate: e, ...t }, n) => /* @__PURE__ */ P("svg", {
|
|
|
187
186
|
vectorEffect: "non-scaling-stroke"
|
|
188
187
|
})
|
|
189
188
|
}));
|
|
190
|
-
|
|
189
|
+
ae.displayName = "CaptionsFilledIcon";
|
|
191
190
|
//#endregion
|
|
192
191
|
//#region src/blocks/F0VideoPlayer/components/PlaybackRateMenu.tsx
|
|
193
|
-
function
|
|
194
|
-
let { t:
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
open:
|
|
197
|
-
onOpenChange:
|
|
198
|
-
children: [/* @__PURE__ */
|
|
192
|
+
function oe({ value: e, onChange: t, containerRef: n }) {
|
|
193
|
+
let { t: r } = h(), [i, a] = P(!1);
|
|
194
|
+
return /* @__PURE__ */ I(_, {
|
|
195
|
+
open: i,
|
|
196
|
+
onOpenChange: a,
|
|
197
|
+
children: [/* @__PURE__ */ F(c, {
|
|
199
198
|
asChild: !0,
|
|
200
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ F(d, {
|
|
201
200
|
variant: "ghost",
|
|
202
201
|
size: "sm",
|
|
203
|
-
label:
|
|
204
|
-
"aria-label":
|
|
202
|
+
label: J(e),
|
|
203
|
+
"aria-label": r("videoPlayer.playbackSpeed", { rate: J(e) })
|
|
205
204
|
})
|
|
206
|
-
}), /* @__PURE__ */
|
|
207
|
-
container:
|
|
205
|
+
}), /* @__PURE__ */ F(f, {
|
|
206
|
+
container: n.current,
|
|
208
207
|
side: "top",
|
|
209
208
|
align: "end",
|
|
210
209
|
sideOffset: 8,
|
|
211
|
-
className:
|
|
210
|
+
className: y("flex w-auto min-w-[7rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
|
|
212
211
|
role: "menu",
|
|
213
|
-
"aria-label":
|
|
212
|
+
"aria-label": r("videoPlayer.playbackSpeedLabel"),
|
|
214
213
|
onKeyDown: (e) => {
|
|
215
214
|
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"menuitemradio\"]"));
|
|
216
215
|
if (t.length === 0) return;
|
|
@@ -232,183 +231,183 @@ function se({ value: t, onChange: n, containerRef: r }) {
|
|
|
232
231
|
}
|
|
233
232
|
e.preventDefault(), t[r]?.focus();
|
|
234
233
|
},
|
|
235
|
-
children:
|
|
236
|
-
let
|
|
237
|
-
return /* @__PURE__ */
|
|
234
|
+
children: H.map((n) => {
|
|
235
|
+
let r = n === e;
|
|
236
|
+
return /* @__PURE__ */ I("button", {
|
|
238
237
|
type: "button",
|
|
239
238
|
role: "menuitemradio",
|
|
240
|
-
"aria-checked":
|
|
241
|
-
className:
|
|
239
|
+
"aria-checked": r,
|
|
240
|
+
className: y("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
|
|
242
241
|
onClick: () => {
|
|
243
|
-
n
|
|
242
|
+
t(n), a(!1);
|
|
244
243
|
},
|
|
245
|
-
children: [
|
|
244
|
+
children: [r ? /* @__PURE__ */ F("span", {
|
|
246
245
|
className: "absolute left-2.5 inline-flex items-center",
|
|
247
|
-
children: /* @__PURE__ */
|
|
248
|
-
}) : null,
|
|
249
|
-
},
|
|
246
|
+
children: /* @__PURE__ */ F(D, {})
|
|
247
|
+
}) : null, J(n)]
|
|
248
|
+
}, n);
|
|
250
249
|
})
|
|
251
250
|
})]
|
|
252
251
|
});
|
|
253
252
|
}
|
|
254
253
|
//#endregion
|
|
255
254
|
//#region src/blocks/F0VideoPlayer/components/Seekbar.tsx
|
|
256
|
-
function
|
|
257
|
-
let { t:
|
|
258
|
-
let t =
|
|
255
|
+
function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r = !1, onSeek: i }) {
|
|
256
|
+
let { t: a } = h(), o = N(null), [s, c] = P(!1), [l, u] = P(null), d = t > 0 ? Math.min(1, e / t) : 0, f = n !== void 0 && t > 0 ? Math.min(1, n / t) : 0, p = n !== void 0 && t > 0 && n > 0 && n < t - .25 && e < n - .25, m = (e) => {
|
|
257
|
+
let t = o.current;
|
|
259
258
|
if (!t) return 0;
|
|
260
259
|
let n = t.getBoundingClientRect();
|
|
261
260
|
return Math.max(0, Math.min(1, (e - n.left) / n.width));
|
|
261
|
+
}, g = (e) => {
|
|
262
|
+
t && i(m(e) * t);
|
|
263
|
+
}, _ = (e) => {
|
|
264
|
+
t && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), c(!0), g(e.clientX));
|
|
262
265
|
}, v = (e) => {
|
|
263
|
-
|
|
264
|
-
}, y = (e) => {
|
|
265
|
-
r && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), u(!0), v(e.clientX));
|
|
266
|
-
}, b = (e) => {
|
|
267
|
-
r && (f(g(e.clientX)), l && v(e.clientX));
|
|
266
|
+
t && (u(m(e.clientX)), s && g(e.clientX));
|
|
268
267
|
}, x = (e) => {
|
|
269
|
-
|
|
270
|
-
},
|
|
271
|
-
return /* @__PURE__ */
|
|
272
|
-
ref:
|
|
273
|
-
className:
|
|
268
|
+
s && (c(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
269
|
+
}, S = l !== null && r && n !== void 0 && l > f;
|
|
270
|
+
return /* @__PURE__ */ I("div", {
|
|
271
|
+
ref: o,
|
|
272
|
+
className: y("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", b()),
|
|
274
273
|
role: "slider",
|
|
275
274
|
tabIndex: 0,
|
|
276
|
-
"aria-label":
|
|
275
|
+
"aria-label": a("videoPlayer.seekLabel"),
|
|
277
276
|
"aria-valuemin": 0,
|
|
278
|
-
"aria-valuemax":
|
|
279
|
-
"aria-valuenow":
|
|
280
|
-
"aria-valuetext":
|
|
281
|
-
current:
|
|
282
|
-
total:
|
|
277
|
+
"aria-valuemax": t || 0,
|
|
278
|
+
"aria-valuenow": e,
|
|
279
|
+
"aria-valuetext": a("videoPlayer.timeProgress", {
|
|
280
|
+
current: q(e),
|
|
281
|
+
total: q(t)
|
|
283
282
|
}),
|
|
284
|
-
onPointerDown:
|
|
285
|
-
onPointerMove:
|
|
283
|
+
onPointerDown: _,
|
|
284
|
+
onPointerMove: v,
|
|
286
285
|
onPointerUp: x,
|
|
287
286
|
onPointerCancel: x,
|
|
288
|
-
onLostPointerCapture: () =>
|
|
289
|
-
onPointerLeave: () =>
|
|
290
|
-
onKeyDown: (
|
|
291
|
-
if (!
|
|
292
|
-
let
|
|
293
|
-
switch (
|
|
287
|
+
onLostPointerCapture: () => c(!1),
|
|
288
|
+
onPointerLeave: () => u(null),
|
|
289
|
+
onKeyDown: (n) => {
|
|
290
|
+
if (!t) return;
|
|
291
|
+
let r = null;
|
|
292
|
+
switch (n.key) {
|
|
294
293
|
case "ArrowLeft":
|
|
295
|
-
|
|
294
|
+
r = Math.max(0, e - 5);
|
|
296
295
|
break;
|
|
297
296
|
case "ArrowRight":
|
|
298
|
-
|
|
297
|
+
r = Math.min(t, e + 5);
|
|
299
298
|
break;
|
|
300
299
|
case "Home":
|
|
301
|
-
|
|
300
|
+
r = 0;
|
|
302
301
|
break;
|
|
303
302
|
case "End":
|
|
304
|
-
|
|
303
|
+
r = t;
|
|
305
304
|
break;
|
|
306
305
|
default: return;
|
|
307
306
|
}
|
|
308
|
-
|
|
307
|
+
n.preventDefault(), n.stopPropagation(), i(r);
|
|
309
308
|
},
|
|
310
309
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ F("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
|
|
311
|
+
/* @__PURE__ */ F("div", {
|
|
313
312
|
className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
|
|
314
|
-
style: { width: `${
|
|
313
|
+
style: { width: `${d * 100}%` }
|
|
315
314
|
}),
|
|
316
|
-
|
|
315
|
+
p ? /* @__PURE__ */ F("div", {
|
|
317
316
|
className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
|
|
318
|
-
style: { left: `${
|
|
317
|
+
style: { left: `${f * 100}%` },
|
|
319
318
|
"aria-hidden": "true"
|
|
320
319
|
}) : null,
|
|
321
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ F("div", {
|
|
322
321
|
className: "pointer-events-none absolute z-[2] h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
|
|
323
|
-
style: { left: `${
|
|
322
|
+
style: { left: `${d * 100}%` }
|
|
324
323
|
}),
|
|
325
|
-
|
|
324
|
+
S ? /* @__PURE__ */ F("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
|
|
326
325
|
]
|
|
327
326
|
});
|
|
328
327
|
}
|
|
329
328
|
//#endregion
|
|
330
329
|
//#region src/blocks/F0VideoPlayer/components/SettingsMenu.tsx
|
|
331
|
-
var
|
|
332
|
-
function
|
|
333
|
-
let h = p !== void 0, g =
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
className:
|
|
330
|
+
var $ = "off", ce = "py-2 pr-4 text-base font-medium", le = "gap-2 py-2 pl-3 pr-2 text-base font-medium", ue = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
|
|
331
|
+
function de({ icon: e, label: t, container: o, options: c, value: u, onLanguageChange: d, on: f, onOff: p, offLabel: m }) {
|
|
332
|
+
let h = p !== void 0, g = c.find((e) => e.locale === u), _ = h && !f ? m : g ? B(g) : m;
|
|
333
|
+
return /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ I(s, {
|
|
334
|
+
className: le,
|
|
336
335
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ F(l, { icon: e }),
|
|
337
|
+
/* @__PURE__ */ F("span", {
|
|
339
338
|
className: "flex-1",
|
|
340
339
|
children: t
|
|
341
340
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ F("span", {
|
|
343
342
|
className: "text-f1-foreground-secondary",
|
|
344
343
|
children: _
|
|
345
344
|
})
|
|
346
345
|
]
|
|
347
|
-
}), /* @__PURE__ */
|
|
348
|
-
container:
|
|
349
|
-
children: /* @__PURE__ */
|
|
350
|
-
className:
|
|
351
|
-
children: /* @__PURE__ */
|
|
352
|
-
value: h ? f ?
|
|
353
|
-
onValueChange: (e) => h && e ===
|
|
354
|
-
children: [
|
|
346
|
+
}), /* @__PURE__ */ F(r, {
|
|
347
|
+
container: o ?? void 0,
|
|
348
|
+
children: /* @__PURE__ */ F(n, {
|
|
349
|
+
className: ue,
|
|
350
|
+
children: /* @__PURE__ */ I(i, {
|
|
351
|
+
value: h ? f ? u : $ : u,
|
|
352
|
+
onValueChange: (e) => h && e === $ ? p() : d(e),
|
|
353
|
+
children: [c.map((e) => /* @__PURE__ */ F(a, {
|
|
355
354
|
value: e.locale,
|
|
356
|
-
className:
|
|
357
|
-
children:
|
|
358
|
-
}, e.locale)), h ? /* @__PURE__ */
|
|
359
|
-
value:
|
|
360
|
-
className:
|
|
355
|
+
className: ce,
|
|
356
|
+
children: B(e)
|
|
357
|
+
}, e.locale)), h ? /* @__PURE__ */ F(a, {
|
|
358
|
+
value: $,
|
|
359
|
+
className: ce,
|
|
361
360
|
children: m
|
|
362
361
|
}) : null]
|
|
363
362
|
})
|
|
364
363
|
})
|
|
365
364
|
})] });
|
|
366
365
|
}
|
|
367
|
-
function fe({ containerRef: e, audioLanguages:
|
|
368
|
-
let { t: y } =
|
|
369
|
-
return /* @__PURE__ */
|
|
366
|
+
function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: a, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: u, audioDescriptionLanguages: f, audioDescriptionLanguage: p, audioDescriptionOn: g, onAudioDescriptionLanguageChange: _, onAudioDescriptionOff: v }) {
|
|
367
|
+
let { t: y } = h(), b = e.current, x = y("videoPlayer.off");
|
|
368
|
+
return /* @__PURE__ */ I(t, { children: [/* @__PURE__ */ F(o, {
|
|
370
369
|
asChild: !0,
|
|
371
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ F(d, {
|
|
372
371
|
variant: "ghost",
|
|
373
372
|
size: "sm",
|
|
374
373
|
hideLabel: !0,
|
|
375
|
-
icon:
|
|
374
|
+
icon: w,
|
|
376
375
|
label: y("videoPlayer.settings")
|
|
377
376
|
})
|
|
378
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ I(m, {
|
|
379
378
|
container: b,
|
|
380
379
|
side: "top",
|
|
381
380
|
align: "end",
|
|
382
|
-
className:
|
|
381
|
+
className: ue,
|
|
383
382
|
children: [
|
|
384
|
-
|
|
385
|
-
icon:
|
|
383
|
+
n.length > 1 ? /* @__PURE__ */ F(de, {
|
|
384
|
+
icon: E,
|
|
386
385
|
label: y("videoPlayer.audio"),
|
|
387
386
|
container: b,
|
|
388
|
-
options:
|
|
389
|
-
value:
|
|
387
|
+
options: n,
|
|
388
|
+
value: r,
|
|
390
389
|
onLanguageChange: i,
|
|
391
390
|
offLabel: x
|
|
392
391
|
}) : null,
|
|
393
|
-
a.length > 1 ? /* @__PURE__ */
|
|
394
|
-
icon:
|
|
392
|
+
a.length > 1 ? /* @__PURE__ */ F(de, {
|
|
393
|
+
icon: Q,
|
|
395
394
|
label: y("videoPlayer.subtitles"),
|
|
396
395
|
container: b,
|
|
397
396
|
options: a,
|
|
398
|
-
value:
|
|
399
|
-
on:
|
|
397
|
+
value: s,
|
|
398
|
+
on: c,
|
|
400
399
|
onLanguageChange: l,
|
|
401
400
|
onOff: u,
|
|
402
401
|
offLabel: x
|
|
403
402
|
}) : null,
|
|
404
|
-
|
|
405
|
-
icon:
|
|
403
|
+
f.length > 1 ? /* @__PURE__ */ F(de, {
|
|
404
|
+
icon: Z,
|
|
406
405
|
label: y("videoPlayer.audioDescription"),
|
|
407
406
|
container: b,
|
|
408
|
-
options:
|
|
409
|
-
value:
|
|
410
|
-
on:
|
|
411
|
-
onLanguageChange:
|
|
407
|
+
options: f,
|
|
408
|
+
value: p,
|
|
409
|
+
on: g,
|
|
410
|
+
onLanguageChange: _,
|
|
412
411
|
onOff: v,
|
|
413
412
|
offLabel: x
|
|
414
413
|
}) : null
|
|
@@ -421,189 +420,189 @@ function pe(e) {
|
|
|
421
420
|
//#endregion
|
|
422
421
|
//#region src/blocks/F0VideoPlayer/components/VolumeControl.tsx
|
|
423
422
|
function me(e, t) {
|
|
424
|
-
return t || e === 0 ?
|
|
423
|
+
return t || e === 0 ? C : e <= .5 ? re : S;
|
|
425
424
|
}
|
|
426
425
|
function he({ volume: e, isMuted: t, onToggleMute: n, onVolumeChange: r, silent: i = !1 }) {
|
|
427
|
-
let { t: a } =
|
|
428
|
-
return i ? /* @__PURE__ */
|
|
426
|
+
let { t: a } = h(), o = t || e === 0;
|
|
427
|
+
return i ? /* @__PURE__ */ F(d, {
|
|
429
428
|
variant: "ghost",
|
|
430
429
|
size: "sm",
|
|
431
430
|
hideLabel: !0,
|
|
432
431
|
disabled: !0,
|
|
433
|
-
icon:
|
|
432
|
+
icon: C,
|
|
434
433
|
label: a("videoPlayer.noAudio")
|
|
435
|
-
}) : /* @__PURE__ */
|
|
434
|
+
}) : /* @__PURE__ */ I("div", {
|
|
436
435
|
className: "flex items-center gap-1",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ F(d, {
|
|
438
437
|
variant: "ghost",
|
|
439
438
|
size: "sm",
|
|
440
439
|
hideLabel: !0,
|
|
441
440
|
icon: me(e, o),
|
|
442
441
|
label: a(o ? "videoPlayer.unmute" : "videoPlayer.mute"),
|
|
443
442
|
onClick: n
|
|
444
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ F(ge, {
|
|
445
444
|
value: o ? 0 : e,
|
|
446
445
|
onChange: r
|
|
447
446
|
})]
|
|
448
447
|
});
|
|
449
448
|
}
|
|
450
|
-
function ge({ value:
|
|
451
|
-
let { t:
|
|
452
|
-
let t =
|
|
449
|
+
function ge({ value: e, onChange: t }) {
|
|
450
|
+
let { t: n } = h(), r = N(null), [i, a] = P(!1), o = Math.max(0, Math.min(1, e)), s = (e) => {
|
|
451
|
+
let t = r.current;
|
|
453
452
|
if (!t) return 0;
|
|
454
|
-
let n = t.getBoundingClientRect(),
|
|
455
|
-
return
|
|
453
|
+
let n = t.getBoundingClientRect(), i = n.width - 12;
|
|
454
|
+
return i <= 0 ? 0 : Math.max(0, Math.min(1, (e - n.left - 6) / i));
|
|
455
|
+
}, c = (e) => {
|
|
456
|
+
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), a(!0), t(s(e.clientX));
|
|
457
|
+
}, l = (e) => {
|
|
458
|
+
i && t(s(e.clientX));
|
|
456
459
|
}, u = (e) => {
|
|
457
|
-
|
|
458
|
-
}, d = (e) => {
|
|
459
|
-
o && r(l(e.clientX));
|
|
460
|
-
}, f = (e) => {
|
|
461
|
-
o && (s(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
460
|
+
i && (a(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
462
461
|
};
|
|
463
|
-
return /* @__PURE__ */
|
|
464
|
-
ref:
|
|
465
|
-
className:
|
|
462
|
+
return /* @__PURE__ */ I("div", {
|
|
463
|
+
ref: r,
|
|
464
|
+
className: y("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", b()),
|
|
466
465
|
role: "slider",
|
|
467
466
|
tabIndex: 0,
|
|
468
|
-
"aria-label":
|
|
467
|
+
"aria-label": n("videoPlayer.volume"),
|
|
469
468
|
"aria-valuemin": 0,
|
|
470
469
|
"aria-valuemax": 1,
|
|
471
|
-
"aria-valuenow": Number(
|
|
472
|
-
"aria-valuetext": `${Math.round(
|
|
473
|
-
onPointerDown:
|
|
474
|
-
onPointerMove:
|
|
475
|
-
onPointerUp:
|
|
476
|
-
onPointerCancel:
|
|
477
|
-
onLostPointerCapture: () =>
|
|
470
|
+
"aria-valuenow": Number(o.toFixed(2)),
|
|
471
|
+
"aria-valuetext": `${Math.round(o * 100)}%`,
|
|
472
|
+
onPointerDown: c,
|
|
473
|
+
onPointerMove: l,
|
|
474
|
+
onPointerUp: u,
|
|
475
|
+
onPointerCancel: u,
|
|
476
|
+
onLostPointerCapture: () => a(!1),
|
|
478
477
|
onKeyDown: (e) => {
|
|
479
|
-
let
|
|
478
|
+
let n = null;
|
|
480
479
|
switch (e.key) {
|
|
481
480
|
case "ArrowRight":
|
|
482
481
|
case "ArrowUp":
|
|
483
|
-
|
|
482
|
+
n = Math.min(1, o + U);
|
|
484
483
|
break;
|
|
485
484
|
case "ArrowLeft":
|
|
486
485
|
case "ArrowDown":
|
|
487
|
-
|
|
486
|
+
n = Math.max(0, o - U);
|
|
488
487
|
break;
|
|
489
488
|
case "Home":
|
|
490
|
-
|
|
489
|
+
n = 0;
|
|
491
490
|
break;
|
|
492
491
|
case "End":
|
|
493
|
-
|
|
492
|
+
n = 1;
|
|
494
493
|
break;
|
|
495
494
|
default: return;
|
|
496
495
|
}
|
|
497
|
-
e.preventDefault(), e.stopPropagation(),
|
|
496
|
+
e.preventDefault(), e.stopPropagation(), t(n);
|
|
498
497
|
},
|
|
499
498
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ F("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
|
|
500
|
+
/* @__PURE__ */ F("div", {
|
|
502
501
|
className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
|
|
503
|
-
style: { width: `calc(12px + (100% - 12px) * ${
|
|
502
|
+
style: { width: `calc(12px + (100% - 12px) * ${o})` }
|
|
504
503
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ F("div", {
|
|
506
505
|
className: "pointer-events-none absolute h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
|
|
507
|
-
style: { left: `calc(6px + (100% - 12px) * ${
|
|
506
|
+
style: { left: `calc(6px + (100% - 12px) * ${o})` }
|
|
508
507
|
})
|
|
509
508
|
]
|
|
510
509
|
});
|
|
511
510
|
}
|
|
512
511
|
//#endregion
|
|
513
512
|
//#region src/blocks/F0VideoPlayer/components/Controls.tsx
|
|
514
|
-
function _e({ isPlaying:
|
|
515
|
-
let { t:
|
|
516
|
-
audioLanguages:
|
|
513
|
+
function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i, playbackRate: a, isFullscreen: o, markerTime: s, blockSeekPastMarker: c, containerRef: l, captionsAvailable: u, captionsOn: f, audioDescriptionAvailable: p, audioDescriptionOn: m, silent: g, persist: _, audioLanguages: v, audioLanguage: b, onAudioLanguageChange: S, captionLanguages: C, captionLanguage: w, onCaptionLanguageChange: E, onCaptionsOff: re, audioDescriptionLanguages: D, audioDescriptionLanguage: O, onAudioDescriptionLanguageChange: k, onAudioDescriptionOff: A, onTogglePlay: j, onToggleMute: M, onVolumeChange: N, onPlaybackRateChange: P, onToggleFullscreen: L, onToggleCaptions: R, onToggleAudioDescription: z, onSeek: B, download: V }) {
|
|
514
|
+
let { t: H } = h(), U = u && C.length <= 1, W = p && D.length <= 1, G = pe({
|
|
515
|
+
audioLanguages: v.length,
|
|
517
516
|
captionLanguages: C.length,
|
|
518
|
-
audioDescriptionLanguages:
|
|
517
|
+
audioDescriptionLanguages: D.length
|
|
519
518
|
});
|
|
520
|
-
return /* @__PURE__ */
|
|
521
|
-
className:
|
|
519
|
+
return /* @__PURE__ */ I("div", {
|
|
520
|
+
className: y("dark absolute inset-x-0 bottom-0 z-[2] flex select-none items-center gap-2", "rounded-b-[inherit] bg-gradient-to-t from-[#000000f2] via-[#000000b3] to-transparent px-3 py-3", "[text-shadow:0_1px_2px_rgba(0,0,0,0.55)] [&_svg]:drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]", "transition-opacity duration-200 motion-reduce:transition-none", !e || _ ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
|
|
522
521
|
children: [
|
|
523
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ F(d, {
|
|
524
523
|
variant: "ghost",
|
|
525
524
|
size: "sm",
|
|
526
525
|
hideLabel: !0,
|
|
527
|
-
icon:
|
|
528
|
-
label:
|
|
529
|
-
onClick:
|
|
526
|
+
icon: e ? T : ne,
|
|
527
|
+
label: H(e ? "videoPlayer.pause" : "videoPlayer.play"),
|
|
528
|
+
onClick: j
|
|
530
529
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
currentTime:
|
|
533
|
-
duration:
|
|
534
|
-
markerTime:
|
|
535
|
-
blockSeekPastMarker:
|
|
536
|
-
onSeek:
|
|
530
|
+
/* @__PURE__ */ F(se, {
|
|
531
|
+
currentTime: t,
|
|
532
|
+
duration: n,
|
|
533
|
+
markerTime: s,
|
|
534
|
+
blockSeekPastMarker: c,
|
|
535
|
+
onSeek: B
|
|
537
536
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ I("span", {
|
|
539
538
|
className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground",
|
|
540
539
|
children: [
|
|
541
|
-
|
|
540
|
+
q(t),
|
|
542
541
|
" / ",
|
|
543
|
-
|
|
542
|
+
q(n)
|
|
544
543
|
]
|
|
545
544
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
volume:
|
|
548
|
-
isMuted:
|
|
549
|
-
onToggleMute:
|
|
550
|
-
onVolumeChange:
|
|
545
|
+
/* @__PURE__ */ F(he, {
|
|
546
|
+
volume: r,
|
|
547
|
+
isMuted: i,
|
|
548
|
+
onToggleMute: M,
|
|
549
|
+
onVolumeChange: N,
|
|
551
550
|
silent: g
|
|
552
551
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
value:
|
|
555
|
-
onChange:
|
|
556
|
-
containerRef:
|
|
552
|
+
/* @__PURE__ */ F(oe, {
|
|
553
|
+
value: a,
|
|
554
|
+
onChange: P,
|
|
555
|
+
containerRef: l
|
|
557
556
|
}),
|
|
558
|
-
|
|
557
|
+
U ? /* @__PURE__ */ F(d, {
|
|
559
558
|
variant: "ghost",
|
|
560
559
|
size: "sm",
|
|
561
560
|
hideLabel: !0,
|
|
562
|
-
icon: f ?
|
|
563
|
-
label:
|
|
561
|
+
icon: f ? ae : Q,
|
|
562
|
+
label: H("videoPlayer.captions"),
|
|
564
563
|
"aria-pressed": f,
|
|
565
|
-
onClick:
|
|
564
|
+
onClick: R
|
|
566
565
|
}) : null,
|
|
567
|
-
|
|
566
|
+
W ? /* @__PURE__ */ F(d, {
|
|
568
567
|
variant: "ghost",
|
|
569
568
|
size: "sm",
|
|
570
569
|
hideLabel: !0,
|
|
571
|
-
icon:
|
|
572
|
-
label:
|
|
573
|
-
"aria-pressed":
|
|
574
|
-
onClick:
|
|
570
|
+
icon: m ? ie : Z,
|
|
571
|
+
label: H("videoPlayer.audioDescription"),
|
|
572
|
+
"aria-pressed": m,
|
|
573
|
+
onClick: z
|
|
575
574
|
}) : null,
|
|
576
|
-
|
|
577
|
-
containerRef:
|
|
578
|
-
audioLanguages:
|
|
575
|
+
G ? /* @__PURE__ */ F(fe, {
|
|
576
|
+
containerRef: l,
|
|
577
|
+
audioLanguages: v,
|
|
579
578
|
audioLanguage: b,
|
|
580
579
|
onAudioLanguageChange: S,
|
|
581
580
|
captionLanguages: C,
|
|
582
|
-
captionLanguage:
|
|
581
|
+
captionLanguage: w,
|
|
583
582
|
captionsOn: f,
|
|
584
|
-
onCaptionLanguageChange:
|
|
585
|
-
onCaptionsOff:
|
|
586
|
-
audioDescriptionLanguages:
|
|
587
|
-
audioDescriptionLanguage:
|
|
588
|
-
audioDescriptionOn:
|
|
589
|
-
onAudioDescriptionLanguageChange:
|
|
590
|
-
onAudioDescriptionOff:
|
|
583
|
+
onCaptionLanguageChange: E,
|
|
584
|
+
onCaptionsOff: re,
|
|
585
|
+
audioDescriptionLanguages: D,
|
|
586
|
+
audioDescriptionLanguage: O,
|
|
587
|
+
audioDescriptionOn: m,
|
|
588
|
+
onAudioDescriptionLanguageChange: k,
|
|
589
|
+
onAudioDescriptionOff: A
|
|
591
590
|
}) : null,
|
|
592
|
-
|
|
591
|
+
V ? /* @__PURE__ */ F(d, {
|
|
593
592
|
variant: "ghost",
|
|
594
593
|
size: "sm",
|
|
595
594
|
hideLabel: !0,
|
|
596
|
-
icon:
|
|
597
|
-
label:
|
|
598
|
-
onClick:
|
|
595
|
+
icon: x,
|
|
596
|
+
label: V.label,
|
|
597
|
+
onClick: V.onClick
|
|
599
598
|
}) : null,
|
|
600
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ F(d, {
|
|
601
600
|
variant: "ghost",
|
|
602
601
|
size: "sm",
|
|
603
602
|
hideLabel: !0,
|
|
604
|
-
icon:
|
|
605
|
-
label:
|
|
606
|
-
onClick:
|
|
603
|
+
icon: o ? ee : te,
|
|
604
|
+
label: H(o ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
|
|
605
|
+
onClick: L
|
|
607
606
|
})
|
|
608
607
|
]
|
|
609
608
|
});
|
|
@@ -612,8 +611,8 @@ function _e({ isPlaying: t, currentTime: n, duration: r, volume: i, isMuted: a,
|
|
|
612
611
|
//#region src/blocks/F0VideoPlayer/hooks/useVttSource.ts
|
|
613
612
|
var ve = (e) => e.trimStart().startsWith("WEBVTT");
|
|
614
613
|
function ye(e) {
|
|
615
|
-
let t = e !== void 0 && ve(e), [n, r] =
|
|
616
|
-
return
|
|
614
|
+
let t = e !== void 0 && ve(e), [n, r] = P();
|
|
615
|
+
return A(() => {
|
|
617
616
|
if (e === void 0 || !ve(e)) {
|
|
618
617
|
r(void 0);
|
|
619
618
|
return;
|
|
@@ -629,8 +628,8 @@ function ye(e) {
|
|
|
629
628
|
//#region src/blocks/F0VideoPlayer/hooks/useAudioDescription.ts
|
|
630
629
|
var be = "descriptions";
|
|
631
630
|
function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
632
|
-
let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] =
|
|
633
|
-
return
|
|
631
|
+
let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] = P(!1), l = i || r !== void 0 || s, [u, d] = P(), f = N(!1);
|
|
632
|
+
return A(() => {
|
|
634
633
|
if (!e) return;
|
|
635
634
|
let n = e.textTracks, a = typeof window < "u" && "speechSynthesis" in window, o = t && !i && a, s = () => {
|
|
636
635
|
f.current && (f.current = !1, e.play().catch(() => {}));
|
|
@@ -662,7 +661,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
|
662
661
|
i,
|
|
663
662
|
r,
|
|
664
663
|
a
|
|
665
|
-
]),
|
|
664
|
+
]), M(() => ({
|
|
666
665
|
trackSrc: a,
|
|
667
666
|
needsCrossOrigin: o,
|
|
668
667
|
available: l,
|
|
@@ -677,7 +676,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
|
677
676
|
//#endregion
|
|
678
677
|
//#region src/blocks/F0VideoPlayer/hooks/useKeyboardShortcuts.ts
|
|
679
678
|
function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscreen: i, setVolume: a }) {
|
|
680
|
-
return
|
|
679
|
+
return k((o) => {
|
|
681
680
|
let s = o.target;
|
|
682
681
|
if (s instanceof HTMLElement && (s.closest("button, a, input, textarea, select, [role=\"button\"], [contenteditable=\"true\"]") || s.closest("[role=\"menu\"], [role^=\"menuitem\"]") || s.getAttribute("role") === "slider")) return;
|
|
683
682
|
let c = e.current;
|
|
@@ -695,10 +694,10 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
|
|
|
695
694
|
return;
|
|
696
695
|
}
|
|
697
696
|
case "ArrowUp":
|
|
698
|
-
o.preventDefault(), a(Math.min(1, c.volume +
|
|
697
|
+
o.preventDefault(), a(Math.min(1, c.volume + U));
|
|
699
698
|
return;
|
|
700
699
|
case "ArrowDown":
|
|
701
|
-
o.preventDefault(), a(Math.max(0, c.volume -
|
|
700
|
+
o.preventDefault(), a(Math.max(0, c.volume - U));
|
|
702
701
|
return;
|
|
703
702
|
case "m":
|
|
704
703
|
o.preventDefault(), r();
|
|
@@ -720,12 +719,12 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
|
|
|
720
719
|
//#endregion
|
|
721
720
|
//#region src/blocks/F0VideoPlayer/hooks/useRestrictForwardSeek.ts
|
|
722
721
|
function Ce({ video: e, enabled: t, resetKey: n }) {
|
|
723
|
-
let r =
|
|
722
|
+
let r = N(0), i = N(0), a = N(t);
|
|
724
723
|
a.current = t;
|
|
725
|
-
let [o, s] =
|
|
726
|
-
return
|
|
724
|
+
let [o, s] = P(0);
|
|
725
|
+
return A(() => {
|
|
727
726
|
r.current = 0, i.current = 0, s(0);
|
|
728
|
-
}, [n]),
|
|
727
|
+
}, [n]), A(() => {
|
|
729
728
|
if (!e) return;
|
|
730
729
|
let t = () => {
|
|
731
730
|
a.current && e.currentTime > r.current + .25 && (e.currentTime = r.current);
|
|
@@ -747,17 +746,17 @@ function Ce({ video: e, enabled: t, resetKey: n }) {
|
|
|
747
746
|
};
|
|
748
747
|
}, [e]), {
|
|
749
748
|
maxWatchedTime: o,
|
|
750
|
-
clampSeek:
|
|
749
|
+
clampSeek: k((e) => a.current ? Math.min(e, r.current) : e, [])
|
|
751
750
|
};
|
|
752
751
|
}
|
|
753
752
|
//#endregion
|
|
754
753
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoCaptions.ts
|
|
755
754
|
var we = /* @__PURE__ */ new Set(["captions", "subtitles"]), Te = 2, Ee = 3;
|
|
756
755
|
function De(e, t) {
|
|
757
|
-
let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] =
|
|
758
|
-
return
|
|
756
|
+
let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] = P(!1), [o, s] = P(!1), [c, l] = P(!1), u = o || t !== void 0 && !c;
|
|
757
|
+
return A(() => {
|
|
759
758
|
l(!1), s(!1);
|
|
760
|
-
}, [n]),
|
|
759
|
+
}, [n]), A(() => {
|
|
761
760
|
if (!e) return;
|
|
762
761
|
let t = e.textTracks, n = e.querySelector("track[kind=\"captions\"]"), r = () => {
|
|
763
762
|
let e = !1;
|
|
@@ -792,7 +791,7 @@ function De(e, t) {
|
|
|
792
791
|
t,
|
|
793
792
|
i,
|
|
794
793
|
n
|
|
795
|
-
]),
|
|
794
|
+
]), M(() => ({
|
|
796
795
|
trackSrc: n,
|
|
797
796
|
needsCrossOrigin: r,
|
|
798
797
|
available: u,
|
|
@@ -808,15 +807,15 @@ function De(e, t) {
|
|
|
808
807
|
//#endregion
|
|
809
808
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoCompletion.ts
|
|
810
809
|
function Oe(e) {
|
|
811
|
-
return e - Math.min(10, e *
|
|
810
|
+
return e - Math.min(10, e * K);
|
|
812
811
|
}
|
|
813
812
|
function ke({ video: e, onComplete: t, resetKey: n }) {
|
|
814
|
-
let r =
|
|
813
|
+
let r = N(t);
|
|
815
814
|
r.current = t;
|
|
816
|
-
let i =
|
|
817
|
-
|
|
815
|
+
let i = N(!1), a = !!t;
|
|
816
|
+
A(() => {
|
|
818
817
|
i.current = !1;
|
|
819
|
-
}, [n]),
|
|
818
|
+
}, [n]), A(() => {
|
|
820
819
|
if (!e || !a) return;
|
|
821
820
|
let t = () => {
|
|
822
821
|
!i.current && e.duration && e.currentTime >= Oe(e.duration) && (i.current = !0, r.current?.(e));
|
|
@@ -829,17 +828,17 @@ function ke({ video: e, onComplete: t, resetKey: n }) {
|
|
|
829
828
|
//#endregion
|
|
830
829
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoMilestones.ts
|
|
831
830
|
function Ae({ video: e, onMilestone: t, resetKey: n }) {
|
|
832
|
-
let r =
|
|
831
|
+
let r = N(t);
|
|
833
832
|
r.current = t;
|
|
834
|
-
let i =
|
|
835
|
-
|
|
833
|
+
let i = N(/* @__PURE__ */ new Set()), a = !!t;
|
|
834
|
+
A(() => {
|
|
836
835
|
i.current.clear();
|
|
837
|
-
}, [n]),
|
|
836
|
+
}, [n]), A(() => {
|
|
838
837
|
if (!e || !a) return;
|
|
839
838
|
let t = () => {
|
|
840
839
|
if (!e.duration) return;
|
|
841
840
|
let t = Math.round(e.currentTime / e.duration * 100);
|
|
842
|
-
for (let n of
|
|
841
|
+
for (let n of W) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
|
|
843
842
|
};
|
|
844
843
|
return e.addEventListener("timeupdate", t), () => {
|
|
845
844
|
e.removeEventListener("timeupdate", t);
|
|
@@ -849,18 +848,18 @@ function Ae({ video: e, onMilestone: t, resetKey: n }) {
|
|
|
849
848
|
//#endregion
|
|
850
849
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoState.ts
|
|
851
850
|
function je(e) {
|
|
852
|
-
let t =
|
|
851
|
+
let t = N(null), [n, r] = P(null), i = N(0), a = k((e) => {
|
|
853
852
|
t.current = e, r(e);
|
|
854
|
-
}, []), [o, s] =
|
|
855
|
-
return
|
|
853
|
+
}, []), [o, s] = P(!1), [c, l] = P(!1), [u, d] = P(0), [f, p] = P(0), [m, h] = P(1), [g, _] = P(!1), [v, y] = P(1);
|
|
854
|
+
return A(() => {
|
|
856
855
|
i.current = 0, t.current && (t.current.playbackRate = 1), s(!1), l(!1), d(0), p(0), y(1);
|
|
857
|
-
}, [e]),
|
|
856
|
+
}, [e]), A(() => {
|
|
858
857
|
let e = n;
|
|
859
858
|
if (!e) return;
|
|
860
859
|
let t = () => l(!0), r = () => l(!1), a = () => l(!1), o = () => {
|
|
861
860
|
h(e.volume), _(e.muted);
|
|
862
861
|
}, s = () => p(e.duration || 0), c = () => {
|
|
863
|
-
|
|
862
|
+
Y(e.playbackRate) && y(e.playbackRate);
|
|
864
863
|
}, u = () => {
|
|
865
864
|
let t = performance.now();
|
|
866
865
|
t - i.current >= 250 && (i.current = t, d(e.currentTime));
|
|
@@ -880,25 +879,25 @@ function je(e) {
|
|
|
880
879
|
isMuted: g,
|
|
881
880
|
playbackRate: v,
|
|
882
881
|
setVideoLoaded: s,
|
|
883
|
-
togglePlay:
|
|
882
|
+
togglePlay: k(() => {
|
|
884
883
|
let e = t.current;
|
|
885
884
|
e && (e.paused || e.ended ? e.play().catch(() => {}) : e.pause());
|
|
886
885
|
}, []),
|
|
887
|
-
toggleMute:
|
|
886
|
+
toggleMute: k(() => {
|
|
888
887
|
let e = t.current;
|
|
889
888
|
e && (e.muted = !e.muted);
|
|
890
889
|
}, []),
|
|
891
|
-
setVolume:
|
|
890
|
+
setVolume: k((e) => {
|
|
892
891
|
let n = t.current;
|
|
893
892
|
if (!n) return;
|
|
894
893
|
let r = Math.max(0, Math.min(1, e));
|
|
895
894
|
n.volume = r, n.muted = r === 0;
|
|
896
895
|
}, []),
|
|
897
|
-
setPlaybackRate:
|
|
896
|
+
setPlaybackRate: k((e) => {
|
|
898
897
|
let n = t.current;
|
|
899
898
|
n && (n.playbackRate = e);
|
|
900
899
|
}, []),
|
|
901
|
-
seekTo:
|
|
900
|
+
seekTo: k((e) => {
|
|
902
901
|
let n = t.current;
|
|
903
902
|
if (!n) return;
|
|
904
903
|
let r = Math.max(0, Math.min(e, n.duration || e));
|
|
@@ -909,17 +908,17 @@ function je(e) {
|
|
|
909
908
|
//#endregion
|
|
910
909
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoTracking.ts
|
|
911
910
|
function Me({ video: e, onTrackAction: t }) {
|
|
912
|
-
let n =
|
|
911
|
+
let n = N(t);
|
|
913
912
|
n.current = t;
|
|
914
913
|
let r = !!t;
|
|
915
|
-
|
|
914
|
+
A(() => {
|
|
916
915
|
if (!e || !r) return;
|
|
917
916
|
let t = null, i = () => {
|
|
918
917
|
t &&= (clearInterval(t), null);
|
|
919
918
|
}, a = () => {
|
|
920
919
|
n.current?.(), i(), t = setInterval(() => {
|
|
921
920
|
n.current?.();
|
|
922
|
-
},
|
|
921
|
+
}, G);
|
|
923
922
|
}, o = () => {
|
|
924
923
|
n.current?.(), i();
|
|
925
924
|
}, s = () => i();
|
|
@@ -930,185 +929,185 @@ function Me({ video: e, onTrackAction: t }) {
|
|
|
930
929
|
}
|
|
931
930
|
//#endregion
|
|
932
931
|
//#region src/blocks/F0VideoPlayer/internal.tsx
|
|
933
|
-
function Ne({ src:
|
|
934
|
-
let { t:
|
|
935
|
-
enabled:
|
|
936
|
-
describedSrc:
|
|
937
|
-
descriptions:
|
|
938
|
-
}),
|
|
939
|
-
let e =
|
|
932
|
+
function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls: a = !1, content: o, defaultLanguage: s, autoPlay: c = !1, autoFocus: l = !1, download: u, restrictForwardSeek: d = !1, onTrackAction: f, onMilestone: m, onComplete: g, ..._ }) {
|
|
933
|
+
let { t: v } = h(), x = N(null), S = M(() => z(t), [t]), [C, ee] = P(() => V(S, s)), te = S.some((e) => e.locale === C) ? C : V(S, s), w = R(t, te) ?? "", T = M(() => z(o?.captions), [o?.captions]), [E, re] = P(() => V(T, s)), D = T.some((e) => e.locale === E) ? E : V(T, s), O = R(o?.captions, D), j = M(() => z(o?.descriptions, o?.describedSrc), [o?.descriptions, o?.describedSrc]), [L, B] = P(() => V(j, s)), H = j.some((e) => e.locale === L) ? L : V(j, s), U = R(o?.descriptions, H), W = R(o?.describedSrc, H), [G, K] = P(!1), q = G && W ? W : w, J = je(q), Y = De(J.videoElement, O), X = xe(J.videoElement, {
|
|
934
|
+
enabled: G,
|
|
935
|
+
describedSrc: W,
|
|
936
|
+
descriptions: U
|
|
937
|
+
}), Z = k(() => {
|
|
938
|
+
let e = J.videoRef.current;
|
|
940
939
|
if (!e) return;
|
|
941
940
|
let t = e.currentTime, n = !e.paused, r = () => {
|
|
942
941
|
e.currentTime = t, n && e.play().catch(() => {}), e.removeEventListener("loadedmetadata", r);
|
|
943
942
|
};
|
|
944
943
|
e.addEventListener("loadedmetadata", r);
|
|
945
|
-
}, [
|
|
946
|
-
|
|
947
|
-
}, [
|
|
948
|
-
|
|
949
|
-
}, [
|
|
950
|
-
|
|
951
|
-
}, [
|
|
952
|
-
|
|
953
|
-
}, [
|
|
954
|
-
|
|
955
|
-
}, [
|
|
956
|
-
|
|
957
|
-
}, [
|
|
944
|
+
}, [J.videoRef]), ie = k((e) => {
|
|
945
|
+
Z(), ee(e);
|
|
946
|
+
}, [Z]), Q = k(() => {
|
|
947
|
+
W && Z(), K((e) => !e);
|
|
948
|
+
}, [W, Z]), ae = k((e) => {
|
|
949
|
+
re(e), Y.showing || Y.toggle();
|
|
950
|
+
}, [Y]), oe = k(() => {
|
|
951
|
+
Y.showing && Y.toggle();
|
|
952
|
+
}, [Y]), se = k((e) => {
|
|
953
|
+
W && Z(), B(e), K(!0);
|
|
954
|
+
}, [W, Z]), $ = k(() => {
|
|
955
|
+
W && Z(), K(!1);
|
|
956
|
+
}, [W, Z]);
|
|
958
957
|
Me({
|
|
959
|
-
video:
|
|
960
|
-
onTrackAction:
|
|
958
|
+
video: J.videoElement,
|
|
959
|
+
onTrackAction: f
|
|
961
960
|
}), Ae({
|
|
962
|
-
video:
|
|
963
|
-
onMilestone:
|
|
961
|
+
video: J.videoElement,
|
|
962
|
+
onMilestone: m,
|
|
964
963
|
resetKey: w
|
|
965
964
|
}), ke({
|
|
966
|
-
video:
|
|
967
|
-
onComplete:
|
|
965
|
+
video: J.videoElement,
|
|
966
|
+
onComplete: g,
|
|
968
967
|
resetKey: w
|
|
969
968
|
});
|
|
970
|
-
let { maxWatchedTime:
|
|
971
|
-
video:
|
|
972
|
-
enabled:
|
|
969
|
+
let { maxWatchedTime: ce, clampSeek: le } = Ce({
|
|
970
|
+
video: J.videoElement,
|
|
971
|
+
enabled: d,
|
|
973
972
|
resetKey: w
|
|
974
|
-
}),
|
|
975
|
-
|
|
976
|
-
let e =
|
|
977
|
-
|
|
973
|
+
}), ue = k((e) => J.seekTo(le(e)), [J, le]), { isFullscreen: de, toggleFullscreen: fe } = e({ targetRef: x }), pe = k(() => {}, []), me = !!(G && W);
|
|
974
|
+
A(() => {
|
|
975
|
+
let e = J.videoRef.current;
|
|
976
|
+
i && e && (e.muted = !me);
|
|
978
977
|
}, [
|
|
979
|
-
|
|
978
|
+
i,
|
|
980
979
|
me,
|
|
981
|
-
|
|
982
|
-
|
|
980
|
+
J.videoElement,
|
|
981
|
+
J.videoRef
|
|
983
982
|
]);
|
|
984
983
|
let he = Se({
|
|
985
|
-
videoRef:
|
|
986
|
-
seek:
|
|
987
|
-
togglePlay:
|
|
988
|
-
toggleMute:
|
|
984
|
+
videoRef: J.videoRef,
|
|
985
|
+
seek: ue,
|
|
986
|
+
togglePlay: J.togglePlay,
|
|
987
|
+
toggleMute: i ? pe : J.toggleMute,
|
|
989
988
|
toggleFullscreen: fe,
|
|
990
|
-
setVolume:
|
|
989
|
+
setVolume: i ? pe : J.setVolume
|
|
991
990
|
});
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}, [
|
|
991
|
+
A(() => {
|
|
992
|
+
l && x.current?.focus({ preventScroll: !0 });
|
|
993
|
+
}, [l]);
|
|
995
994
|
let ge = (e) => e.preventDefault();
|
|
996
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ I("div", {
|
|
997
996
|
ref: x,
|
|
998
|
-
className:
|
|
997
|
+
className: y("group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background", "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none", b()),
|
|
999
998
|
role: "region",
|
|
1000
|
-
"aria-label":
|
|
999
|
+
"aria-label": r ?? v("videoPlayer.regionLabel"),
|
|
1001
1000
|
tabIndex: 0,
|
|
1002
1001
|
onKeyDown: he,
|
|
1003
|
-
"data-video-captions":
|
|
1004
|
-
...
|
|
1002
|
+
"data-video-captions": i ? "no-audio" : Y.available ? "available" : "missing",
|
|
1003
|
+
..._,
|
|
1005
1004
|
children: [
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
ref:
|
|
1008
|
-
autoPlay:
|
|
1005
|
+
/* @__PURE__ */ I("video", {
|
|
1006
|
+
ref: J.setVideoNode,
|
|
1007
|
+
autoPlay: c,
|
|
1009
1008
|
playsInline: !0,
|
|
1010
1009
|
disablePictureInPicture: !0,
|
|
1011
1010
|
disableRemotePlayback: !0,
|
|
1012
1011
|
draggable: !1,
|
|
1013
1012
|
onContextMenu: ge,
|
|
1014
|
-
onClick:
|
|
1015
|
-
src:
|
|
1016
|
-
poster:
|
|
1017
|
-
crossOrigin:
|
|
1018
|
-
onLoadedData: () =>
|
|
1019
|
-
className:
|
|
1020
|
-
style: { opacity:
|
|
1021
|
-
children: [
|
|
1013
|
+
onClick: J.togglePlay,
|
|
1014
|
+
src: q,
|
|
1015
|
+
poster: n,
|
|
1016
|
+
crossOrigin: Y.needsCrossOrigin || X.needsCrossOrigin ? "anonymous" : void 0,
|
|
1017
|
+
onLoadedData: () => J.setVideoLoaded(!0),
|
|
1018
|
+
className: y("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
|
|
1019
|
+
style: { opacity: J.videoLoaded || n ? 1 : 0 },
|
|
1020
|
+
children: [Y.trackSrc ? /* @__PURE__ */ F("track", {
|
|
1022
1021
|
kind: "captions",
|
|
1023
|
-
src:
|
|
1024
|
-
label:
|
|
1022
|
+
src: Y.trackSrc,
|
|
1023
|
+
label: v("videoPlayer.captions"),
|
|
1025
1024
|
default: !1
|
|
1026
|
-
}) : null,
|
|
1025
|
+
}) : null, X.trackSrc ? /* @__PURE__ */ F("track", {
|
|
1027
1026
|
kind: "descriptions",
|
|
1028
|
-
src:
|
|
1029
|
-
label:
|
|
1027
|
+
src: X.trackSrc,
|
|
1028
|
+
label: v("videoPlayer.audioDescription"),
|
|
1030
1029
|
default: !1
|
|
1031
1030
|
}) : null]
|
|
1032
1031
|
}),
|
|
1033
|
-
|
|
1032
|
+
J.isPlaying ? null : /* @__PURE__ */ F("div", {
|
|
1034
1033
|
"aria-hidden": !0,
|
|
1035
1034
|
"data-video-play-overlay": !0,
|
|
1036
1035
|
className: "pointer-events-none absolute inset-0 z-[1] flex items-center justify-center",
|
|
1037
|
-
children: /* @__PURE__ */
|
|
1036
|
+
children: /* @__PURE__ */ F("button", {
|
|
1038
1037
|
type: "button",
|
|
1039
1038
|
tabIndex: -1,
|
|
1040
|
-
onClick:
|
|
1039
|
+
onClick: J.togglePlay,
|
|
1041
1040
|
className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
|
|
1042
|
-
children: /* @__PURE__ */
|
|
1043
|
-
icon:
|
|
1041
|
+
children: /* @__PURE__ */ F(p, {
|
|
1042
|
+
icon: ne,
|
|
1044
1043
|
size: "lg",
|
|
1045
1044
|
color: "#fff"
|
|
1046
1045
|
})
|
|
1047
1046
|
})
|
|
1048
1047
|
}),
|
|
1049
|
-
|
|
1048
|
+
Y.showing && X.activeCue ? /* @__PURE__ */ F("div", {
|
|
1050
1049
|
"aria-hidden": !0,
|
|
1051
1050
|
className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1051
|
+
children: /* @__PURE__ */ I("p", {
|
|
1053
1052
|
className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]",
|
|
1054
|
-
children: [/* @__PURE__ */
|
|
1053
|
+
children: [/* @__PURE__ */ I("span", {
|
|
1055
1054
|
className: "pr-1 font-medium not-italic opacity-70",
|
|
1056
1055
|
children: [
|
|
1057
1056
|
"[",
|
|
1058
|
-
|
|
1057
|
+
v("videoPlayer.audioDescription"),
|
|
1059
1058
|
"]"
|
|
1060
1059
|
]
|
|
1061
|
-
}),
|
|
1060
|
+
}), X.activeCue]
|
|
1062
1061
|
})
|
|
1063
1062
|
}) : null,
|
|
1064
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ F("span", {
|
|
1065
1064
|
className: "sr-only",
|
|
1066
1065
|
"aria-live": "polite",
|
|
1067
|
-
children:
|
|
1066
|
+
children: J.isPlaying ? v("videoPlayer.playing") : v("videoPlayer.paused")
|
|
1068
1067
|
}),
|
|
1069
|
-
|
|
1070
|
-
isPlaying:
|
|
1071
|
-
currentTime:
|
|
1072
|
-
duration:
|
|
1073
|
-
volume:
|
|
1074
|
-
isMuted:
|
|
1075
|
-
playbackRate:
|
|
1076
|
-
isFullscreen:
|
|
1077
|
-
markerTime:
|
|
1078
|
-
blockSeekPastMarker:
|
|
1068
|
+
J.videoLoaded ? /* @__PURE__ */ F(_e, {
|
|
1069
|
+
isPlaying: J.isPlaying,
|
|
1070
|
+
currentTime: J.currentTime,
|
|
1071
|
+
duration: J.duration,
|
|
1072
|
+
volume: J.volume,
|
|
1073
|
+
isMuted: J.isMuted,
|
|
1074
|
+
playbackRate: J.playbackRate,
|
|
1075
|
+
isFullscreen: de,
|
|
1076
|
+
markerTime: d ? ce : void 0,
|
|
1077
|
+
blockSeekPastMarker: d,
|
|
1079
1078
|
containerRef: x,
|
|
1080
|
-
captionsAvailable:
|
|
1081
|
-
captionsOn:
|
|
1082
|
-
audioDescriptionAvailable:
|
|
1083
|
-
audioDescriptionOn:
|
|
1084
|
-
silent:
|
|
1085
|
-
persist:
|
|
1079
|
+
captionsAvailable: Y.available,
|
|
1080
|
+
captionsOn: Y.showing,
|
|
1081
|
+
audioDescriptionAvailable: X.available,
|
|
1082
|
+
audioDescriptionOn: G,
|
|
1083
|
+
silent: i,
|
|
1084
|
+
persist: a,
|
|
1086
1085
|
audioLanguages: S,
|
|
1087
|
-
audioLanguage:
|
|
1088
|
-
onAudioLanguageChange:
|
|
1086
|
+
audioLanguage: te,
|
|
1087
|
+
onAudioLanguageChange: ie,
|
|
1089
1088
|
captionLanguages: T,
|
|
1090
|
-
captionLanguage:
|
|
1091
|
-
onCaptionLanguageChange:
|
|
1092
|
-
onCaptionsOff:
|
|
1093
|
-
audioDescriptionLanguages:
|
|
1094
|
-
audioDescriptionLanguage:
|
|
1095
|
-
onAudioDescriptionLanguageChange:
|
|
1096
|
-
onAudioDescriptionOff:
|
|
1097
|
-
onTogglePlay:
|
|
1098
|
-
onToggleMute:
|
|
1099
|
-
onVolumeChange:
|
|
1100
|
-
onPlaybackRateChange:
|
|
1089
|
+
captionLanguage: D,
|
|
1090
|
+
onCaptionLanguageChange: ae,
|
|
1091
|
+
onCaptionsOff: oe,
|
|
1092
|
+
audioDescriptionLanguages: j,
|
|
1093
|
+
audioDescriptionLanguage: H,
|
|
1094
|
+
onAudioDescriptionLanguageChange: se,
|
|
1095
|
+
onAudioDescriptionOff: $,
|
|
1096
|
+
onTogglePlay: J.togglePlay,
|
|
1097
|
+
onToggleMute: J.toggleMute,
|
|
1098
|
+
onVolumeChange: J.setVolume,
|
|
1099
|
+
onPlaybackRateChange: J.setPlaybackRate,
|
|
1101
1100
|
onToggleFullscreen: () => void fe(),
|
|
1102
|
-
onToggleCaptions:
|
|
1103
|
-
onToggleAudioDescription:
|
|
1104
|
-
onSeek:
|
|
1105
|
-
download:
|
|
1101
|
+
onToggleCaptions: Y.toggle,
|
|
1102
|
+
onToggleAudioDescription: Q,
|
|
1103
|
+
onSeek: ue,
|
|
1104
|
+
download: u
|
|
1106
1105
|
}) : null
|
|
1107
1106
|
]
|
|
1108
1107
|
});
|
|
1109
1108
|
}
|
|
1110
1109
|
//#endregion
|
|
1111
1110
|
//#region src/blocks/F0VideoPlayer/F0VideoPlayer.tsx
|
|
1112
|
-
var Pe =
|
|
1111
|
+
var Pe = u(g("F0VideoPlayer", Ne));
|
|
1113
1112
|
//#endregion
|
|
1114
|
-
export {
|
|
1113
|
+
export { R as a, B as i, z as n, V as r, Pe as t };
|