markdown-flow-ui 0.1.108-beta.2 → 0.1.108-beta.3
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/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs7.js +1 -1
- package/dist/_virtual/index.es4.js +4 -4
- package/dist/_virtual/index.es5.js +4 -4
- package/dist/_virtual/index.es6.js +2 -5
- package/dist/_virtual/index.es6.js.map +1 -1
- package/dist/_virtual/index.es7.js +5 -2
- package/dist/_virtual/index.es7.js.map +1 -1
- package/dist/components/Slide/Player.cjs.js +1 -1
- package/dist/components/Slide/Player.cjs.js.map +1 -1
- package/dist/components/Slide/Player.d.ts +2 -1
- package/dist/components/Slide/Player.es.js +160 -154
- package/dist/components/Slide/Player.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.es.js +390 -377
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/SubtitleOverlay.cjs.js +1 -1
- package/dist/components/Slide/SubtitleOverlay.cjs.js.map +1 -1
- package/dist/components/Slide/SubtitleOverlay.d.ts +2 -1
- package/dist/components/Slide/SubtitleOverlay.es.js +33 -32
- package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
import { DEFAULT_SLIDE_PLAYER_TEXTS as
|
|
6
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
7
|
-
import { toPlayerCustomActionList as
|
|
2
|
+
import Ge, { memo as Je, useRef as a, useState as Me, useMemo as H, useEffect as b, useCallback as s } from "react";
|
|
3
|
+
import { cn as je } from "../../lib/utils.es.js";
|
|
4
|
+
import Qe from "./MobilePlayerSettingsSheet.es.js";
|
|
5
|
+
import { DEFAULT_SLIDE_PLAYER_TEXTS as Ie } from "./constants.es.js";
|
|
6
|
+
import { DEFAULT_MOBILE_VIEW_MODE as er } from "./utils/mobileScreenMode.es.js";
|
|
7
|
+
import { toPlayerCustomActionList as rr } from "./utils/playerCustomActions.es.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
import tr from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
|
|
10
|
+
import nr from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
|
|
11
|
+
import ur from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/rotate-ccw.es.js";
|
|
12
|
+
import sr from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.es.js";
|
|
13
13
|
import lr from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
if (typeof window > "u" || !N ||
|
|
14
|
+
import cr from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/maximize.es.js";
|
|
15
|
+
import ar from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js";
|
|
16
|
+
const Ee = /* @__PURE__ */ new Map(), Ae = (N) => {
|
|
17
|
+
if (typeof window > "u" || !N || Ee.has(N))
|
|
18
18
|
return;
|
|
19
19
|
const C = window.document.createElement("audio");
|
|
20
|
-
C.preload = "auto", C.setAttribute("playsinline", "true"), C.src = N, C.load(),
|
|
21
|
-
},
|
|
20
|
+
C.preload = "auto", C.setAttribute("playsinline", "true"), C.src = N, C.load(), Ee.set(N, C);
|
|
21
|
+
}, or = () => /* @__PURE__ */ r.jsxs(
|
|
22
22
|
"svg",
|
|
23
23
|
{
|
|
24
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -37,7 +37,7 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
37
37
|
/* @__PURE__ */ r.jsx("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
|
-
),
|
|
40
|
+
), ir = () => /* @__PURE__ */ r.jsxs(
|
|
41
41
|
"svg",
|
|
42
42
|
{
|
|
43
43
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -56,7 +56,7 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
56
56
|
/* @__PURE__ */ r.jsx("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), fr = ({
|
|
60
60
|
audioList: N = [],
|
|
61
61
|
className: C,
|
|
62
62
|
currentAudioIndex: m = -1,
|
|
@@ -65,87 +65,88 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
65
65
|
isAutoAdvanceEnabled: Y = !0,
|
|
66
66
|
useAutoAdvanceToggle: G = !1,
|
|
67
67
|
onLoadingChange: re,
|
|
68
|
+
onPlaybackStarted: te,
|
|
68
69
|
onPlaybackTimeChange: O,
|
|
69
70
|
onPrev: ke,
|
|
70
|
-
onNext:
|
|
71
|
-
onFullscreen:
|
|
72
|
-
isFullscreen:
|
|
73
|
-
mobileViewMode:
|
|
74
|
-
settingsPortalContainer:
|
|
75
|
-
onMobileViewModeChange:
|
|
71
|
+
onNext: Re,
|
|
72
|
+
onFullscreen: ne,
|
|
73
|
+
isFullscreen: ue = !1,
|
|
74
|
+
mobileViewMode: Ne = er,
|
|
75
|
+
settingsPortalContainer: ve,
|
|
76
|
+
onMobileViewModeChange: se,
|
|
76
77
|
onEnded: le,
|
|
77
|
-
onAutoAdvanceToggle:
|
|
78
|
-
onInteractionToggle:
|
|
79
|
-
hasInteraction:
|
|
78
|
+
onAutoAdvanceToggle: Te,
|
|
79
|
+
onInteractionToggle: Ce,
|
|
80
|
+
hasInteraction: Le = !1,
|
|
80
81
|
isInteractionOpen: K = !1,
|
|
81
|
-
prevDisabled:
|
|
82
|
-
nextDisabled:
|
|
82
|
+
prevDisabled: Ue = !1,
|
|
83
|
+
nextDisabled: Fe = !1,
|
|
83
84
|
showControls: J = !0,
|
|
84
|
-
customActions:
|
|
85
|
-
customActionContext:
|
|
86
|
-
texts:
|
|
87
|
-
...
|
|
85
|
+
customActions: ce,
|
|
86
|
+
customActionContext: ae,
|
|
87
|
+
texts: oe,
|
|
88
|
+
...Pe
|
|
88
89
|
}) => {
|
|
89
|
-
const h = a(null),
|
|
90
|
+
const h = a(null), ie = a(K), j = a(null), fe = a(null), S = a(0), c = a(null), q = a(void 0), E = a([]), Z = a(!1), de = a(!1), y = a(!1), U = a(null), x = a(!1), u = a(!1), p = a(null), w = a(!1), F = a(null), Q = a(0), v = a("unknown"), [I, o] = Me(M), [me, W] = Me(!1), f = m >= 0 ? N[m] : void 0, B = f?.audioUrl, Ve = f?.element?.subtitle_cues ?? [], A = H(
|
|
90
91
|
() => [...f?.audioSegments ?? []].sort(
|
|
91
92
|
(e, t) => e.segment_index - t.segment_index
|
|
92
93
|
),
|
|
93
94
|
[f?.audioSegments]
|
|
94
|
-
),
|
|
95
|
-
() =>
|
|
96
|
-
[
|
|
97
|
-
),
|
|
95
|
+
), pe = H(
|
|
96
|
+
() => rr(ce, ae),
|
|
97
|
+
[ae, ce]
|
|
98
|
+
), he = pe.length + 5, We = H(
|
|
98
99
|
() => ({
|
|
99
|
-
"--slide-player-mobile-control-count": String(
|
|
100
|
+
"--slide-player-mobile-control-count": String(he)
|
|
100
101
|
}),
|
|
101
|
-
[
|
|
102
|
+
[he]
|
|
102
103
|
), z = H(
|
|
103
104
|
() => ({
|
|
104
|
-
...
|
|
105
|
-
...
|
|
105
|
+
...Ie,
|
|
106
|
+
...oe
|
|
106
107
|
}),
|
|
107
|
-
[
|
|
108
|
-
), ee = H(() => f ? f.audioKey ?? `${String(f.sequenceNumber ?? "none")}:${String(f.audioUrl ?? "")}` : "none", [f]),
|
|
108
|
+
[oe]
|
|
109
|
+
), ee = H(() => f ? f.audioKey ?? `${String(f.sequenceNumber ?? "none")}:${String(f.audioUrl ?? "")}` : "none", [f]), Be = G ? Y : I, Ke = G ? Y ? "Pause autoplay" : "Play autoplay" : I ? "Pause" : "Play";
|
|
109
110
|
b(() => {
|
|
110
111
|
q.current = f;
|
|
111
112
|
}, [f]), b(() => {
|
|
112
113
|
J || W(!1);
|
|
113
114
|
}, [J]), b(() => {
|
|
114
|
-
!
|
|
115
|
+
!ie.current && K && W(!1), ie.current = K;
|
|
115
116
|
}, [K]), b(() => {
|
|
116
|
-
E.current =
|
|
117
|
-
}, [
|
|
117
|
+
E.current = A;
|
|
118
|
+
}, [A]), b(() => {
|
|
118
119
|
const e = f?.audioUrl, t = m >= 0 ? N[m + 1]?.audioUrl : void 0;
|
|
119
|
-
|
|
120
|
+
Ae(e), Ae(t);
|
|
120
121
|
}, [N, f?.audioUrl, m]);
|
|
121
|
-
const n =
|
|
122
|
+
const n = s(
|
|
122
123
|
(e) => {
|
|
123
|
-
|
|
124
|
+
de.current !== e && (de.current = e, re?.(e));
|
|
124
125
|
},
|
|
125
126
|
[re]
|
|
126
|
-
),
|
|
127
|
+
), ye = s((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), T = s(() => M && !L && !y.current && v.current !== "blocked", [M, L]), ge = s((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), _e = s(() => {
|
|
127
128
|
const e = c.current;
|
|
128
129
|
return e == null || e <= 0 ? 0 : E.current.slice(0, e).reduce(
|
|
129
|
-
(t,
|
|
130
|
+
(t, l) => t + Math.max(Number(l.duration_ms ?? 0), 0),
|
|
130
131
|
0
|
|
131
132
|
) / 1e3;
|
|
132
|
-
}, []), P =
|
|
133
|
-
(t,
|
|
133
|
+
}, []), P = s((e) => e <= 0 ? 0 : E.current.slice(0, e).reduce(
|
|
134
|
+
(t, l) => t + Math.max(Number(l.duration_ms ?? 0), 0),
|
|
134
135
|
0
|
|
135
|
-
), []),
|
|
136
|
+
), []), be = s(() => {
|
|
136
137
|
const e = h.current;
|
|
137
138
|
return e ? U.current === "segment" ? P(S.current) + Math.max(e.currentTime, 0) * 1e3 : p.current !== null && e.readyState === 0 ? p.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : c.current != null ? P(c.current) : 0;
|
|
138
|
-
}, [P]), g =
|
|
139
|
+
}, [P]), g = s(
|
|
139
140
|
(e) => {
|
|
140
141
|
const t = Math.max(e, 0);
|
|
141
142
|
Q.current !== t && (Q.current = t, O?.(t));
|
|
142
143
|
},
|
|
143
144
|
[O]
|
|
144
|
-
), i =
|
|
145
|
-
g(
|
|
146
|
-
}, [
|
|
145
|
+
), i = s(() => {
|
|
146
|
+
g(be());
|
|
147
|
+
}, [be, g]), d = s(() => {
|
|
147
148
|
typeof window > "u" || F.current === null || (window.cancelAnimationFrame(F.current), F.current = null);
|
|
148
|
-
}, []),
|
|
149
|
+
}, []), Se = s(() => {
|
|
149
150
|
if (typeof window > "u" || F.current !== null)
|
|
150
151
|
return;
|
|
151
152
|
const e = () => {
|
|
@@ -158,43 +159,43 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
158
159
|
F.current = window.requestAnimationFrame(e);
|
|
159
160
|
};
|
|
160
161
|
F.current = window.requestAnimationFrame(e);
|
|
161
|
-
}, [i]), $ =
|
|
162
|
+
}, [i]), $ = s(() => {
|
|
162
163
|
const e = h.current;
|
|
163
164
|
e && (d(), u.current = !1, y.current = !1, Z.current = !1, U.current = null, p.current = null, x.current = !1, w.current = !1, e.pause(), e.removeAttribute("src"), e.load(), j.current = null, S.current = 0, c.current = null, g(0), o(!1), n(!1));
|
|
164
|
-
}, [g, d, n]), _ =
|
|
165
|
+
}, [g, d, n]), _ = s(
|
|
165
166
|
(e) => {
|
|
166
167
|
const t = h.current;
|
|
167
168
|
if (!t)
|
|
168
169
|
return !1;
|
|
169
|
-
const
|
|
170
|
-
return
|
|
170
|
+
const l = t.play();
|
|
171
|
+
return l && typeof l.then == "function" && l.then(() => {
|
|
171
172
|
v.current === "unknown" && (v.current = "auto"), u.current = !1, w.current = !1;
|
|
172
173
|
}).catch((V) => {
|
|
173
|
-
v.current === "unknown" &&
|
|
174
|
+
v.current === "unknown" && ye(V) && (v.current = "blocked", u.current = !1, n(!1)), w.current = !1, o(!1);
|
|
174
175
|
}), !0;
|
|
175
176
|
},
|
|
176
|
-
[
|
|
177
|
-
),
|
|
177
|
+
[ye, n]
|
|
178
|
+
), k = s(
|
|
178
179
|
(e, t) => {
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
180
|
+
const l = h.current, V = E.current[e];
|
|
181
|
+
if (!l || !V)
|
|
181
182
|
return !1;
|
|
182
|
-
const R =
|
|
183
|
+
const R = ge(V.audio_data);
|
|
183
184
|
S.current = e, c.current = null, x.current = !1, w.current = !0, g(P(e));
|
|
184
185
|
const X = T();
|
|
185
186
|
u.current = X, n(!1);
|
|
186
|
-
const
|
|
187
|
-
return U.current = "segment",
|
|
187
|
+
const Ye = j.current !== R;
|
|
188
|
+
return U.current = "segment", Ye && (l.pause(), l.removeAttribute("src"), l.load(), j.current = R, l.src = R, l.load()), p.current = 0, l.readyState > 0 && (l.currentTime = 0, p.current = null), X ? _(`start-segment:${t}`) : (u.current = !1, w.current = !1, l.pause(), o(!1), !0);
|
|
188
189
|
},
|
|
189
190
|
[
|
|
190
191
|
T,
|
|
191
|
-
|
|
192
|
+
ge,
|
|
192
193
|
P,
|
|
193
194
|
g,
|
|
194
195
|
_,
|
|
195
196
|
n
|
|
196
197
|
]
|
|
197
|
-
), D =
|
|
198
|
+
), D = s(
|
|
198
199
|
(e) => {
|
|
199
200
|
d(), u.current = !1, x.current = !1, w.current = !1, i(), o(!1), n(!1), m >= 0 && le?.(m);
|
|
200
201
|
},
|
|
@@ -205,10 +206,10 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
205
206
|
i,
|
|
206
207
|
n
|
|
207
208
|
]
|
|
208
|
-
),
|
|
209
|
-
const e = S.current + 1, t = E.current,
|
|
210
|
-
if (
|
|
211
|
-
|
|
209
|
+
), xe = s(() => {
|
|
210
|
+
const e = S.current + 1, t = E.current, l = t[e], V = q.current, R = t.some((X) => X.is_final);
|
|
211
|
+
if (l) {
|
|
212
|
+
k(e, "ended");
|
|
212
213
|
return;
|
|
213
214
|
}
|
|
214
215
|
if (V?.isAudioStreaming || !R) {
|
|
@@ -221,19 +222,19 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
221
222
|
D,
|
|
222
223
|
P,
|
|
223
224
|
g,
|
|
224
|
-
|
|
225
|
+
k,
|
|
225
226
|
n
|
|
226
227
|
]);
|
|
227
228
|
b(() => {
|
|
228
|
-
if (
|
|
229
|
+
if (fe.current === ee)
|
|
229
230
|
return;
|
|
230
|
-
|
|
231
|
+
fe.current = ee, S.current = 0, c.current = null, x.current = !1, y.current = !1, Z.current = !1, u.current = !1, w.current = !1, U.current = null, j.current = null, d(), g(0), n(!1);
|
|
231
232
|
const e = h.current;
|
|
232
233
|
e && (e.pause(), e.removeAttribute("src"), e.load(), o(!1));
|
|
233
234
|
}, [
|
|
234
235
|
m,
|
|
235
236
|
ee,
|
|
236
|
-
|
|
237
|
+
A.length,
|
|
237
238
|
B,
|
|
238
239
|
g,
|
|
239
240
|
d,
|
|
@@ -248,14 +249,14 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
248
249
|
if (!(!Z.current || !q.current || y.current)) {
|
|
249
250
|
if (Z.current = !1, c.current !== null) {
|
|
250
251
|
if (c.current < E.current.length) {
|
|
251
|
-
|
|
252
|
+
k(c.current, "external-resume");
|
|
252
253
|
return;
|
|
253
254
|
}
|
|
254
255
|
u.current = !0, n(!0);
|
|
255
256
|
return;
|
|
256
257
|
}
|
|
257
258
|
if (!j.current && E.current.length > 0) {
|
|
258
|
-
|
|
259
|
+
k(
|
|
259
260
|
Math.min(
|
|
260
261
|
S.current,
|
|
261
262
|
E.current.length - 1
|
|
@@ -269,7 +270,7 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
269
270
|
}
|
|
270
271
|
}, [
|
|
271
272
|
L,
|
|
272
|
-
|
|
273
|
+
k,
|
|
273
274
|
_,
|
|
274
275
|
n
|
|
275
276
|
]), b(() => {
|
|
@@ -284,9 +285,9 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
284
285
|
return;
|
|
285
286
|
}
|
|
286
287
|
if (B) {
|
|
287
|
-
const t = j.current !== B,
|
|
288
|
+
const t = j.current !== B, l = T();
|
|
288
289
|
if (U.current === "segment" && !!j.current && c.current === null) {
|
|
289
|
-
if (!
|
|
290
|
+
if (!l) {
|
|
290
291
|
u.current = !1, e.pause(), o(!1);
|
|
291
292
|
return;
|
|
292
293
|
}
|
|
@@ -294,10 +295,10 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
294
295
|
return;
|
|
295
296
|
}
|
|
296
297
|
if (t) {
|
|
297
|
-
const R = c.current !== null ?
|
|
298
|
+
const R = c.current !== null ? _e() : 0;
|
|
298
299
|
e.pause(), e.removeAttribute("src"), e.load(), j.current = B, U.current = "url", e.src = B, e.load(), p.current = R, g(R * 1e3), e.readyState > 0 && (e.currentTime = R, p.current = null);
|
|
299
300
|
}
|
|
300
|
-
if (u.current =
|
|
301
|
+
if (u.current = l, x.current = !1, w.current = !1, n(!1), !l) {
|
|
301
302
|
u.current = !1, e.pause(), o(!1);
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
@@ -305,18 +306,18 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
305
306
|
return;
|
|
306
307
|
}
|
|
307
308
|
if (c.current !== null) {
|
|
308
|
-
if (c.current <
|
|
309
|
+
if (c.current < A.length) {
|
|
309
310
|
if (y.current) {
|
|
310
311
|
o(!1), n(!1);
|
|
311
312
|
return;
|
|
312
313
|
}
|
|
313
|
-
|
|
314
|
+
k(c.current, "wait-resume");
|
|
314
315
|
return;
|
|
315
316
|
}
|
|
316
317
|
x.current = !0, u.current = T(), o(!1), n(T());
|
|
317
318
|
return;
|
|
318
319
|
}
|
|
319
|
-
if (!
|
|
320
|
+
if (!A.length) {
|
|
320
321
|
if (f.isAudioStreaming) {
|
|
321
322
|
c.current = S.current, x.current = !0, u.current = T(), o(!1), n(T());
|
|
322
323
|
return;
|
|
@@ -325,10 +326,10 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
325
326
|
return;
|
|
326
327
|
}
|
|
327
328
|
if (!j.current) {
|
|
328
|
-
|
|
329
|
+
k(
|
|
329
330
|
Math.min(
|
|
330
331
|
S.current,
|
|
331
|
-
|
|
332
|
+
A.length - 1
|
|
332
333
|
),
|
|
333
334
|
"effect-init"
|
|
334
335
|
);
|
|
@@ -343,23 +344,28 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
343
344
|
}, [
|
|
344
345
|
f,
|
|
345
346
|
m,
|
|
346
|
-
|
|
347
|
+
A,
|
|
347
348
|
B,
|
|
348
349
|
M,
|
|
349
350
|
L,
|
|
350
351
|
T,
|
|
351
352
|
g,
|
|
352
353
|
$,
|
|
353
|
-
|
|
354
|
+
k,
|
|
354
355
|
_,
|
|
355
|
-
|
|
356
|
+
_e,
|
|
356
357
|
n
|
|
357
358
|
]), b(() => $, [$]), b(() => d, [d]);
|
|
358
|
-
const
|
|
359
|
-
i(),
|
|
360
|
-
}, [
|
|
359
|
+
const Ze = s(() => {
|
|
360
|
+
i(), Se(), o(!0), n(!1), te?.();
|
|
361
|
+
}, [
|
|
362
|
+
te,
|
|
363
|
+
Se,
|
|
364
|
+
i,
|
|
365
|
+
n
|
|
366
|
+
]), $e = s(() => {
|
|
361
367
|
x.current || w.current || (d(), i(), o(!1));
|
|
362
|
-
}, [m, d, i]),
|
|
368
|
+
}, [m, d, i]), He = s(() => {
|
|
363
369
|
const e = h.current;
|
|
364
370
|
e && p.current !== null && (e.currentTime = p.current, p.current = null), i(), !(!u.current || !M) && _("canplay");
|
|
365
371
|
}, [
|
|
@@ -367,53 +373,53 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
367
373
|
M,
|
|
368
374
|
i,
|
|
369
375
|
_
|
|
370
|
-
]),
|
|
376
|
+
]), Oe = s(() => {
|
|
371
377
|
const e = h.current;
|
|
372
378
|
e && p.current !== null && (e.currentTime = p.current, p.current = null), i();
|
|
373
|
-
}, [m, i]),
|
|
379
|
+
}, [m, i]), qe = s(() => {
|
|
374
380
|
i();
|
|
375
|
-
}, [i]),
|
|
381
|
+
}, [i]), we = s(() => {
|
|
376
382
|
i();
|
|
377
|
-
}, [i]),
|
|
383
|
+
}, [i]), ze = s(() => {
|
|
378
384
|
const e = U.current === "url" || E.current.length === 0;
|
|
379
385
|
if (d(), w.current = !1, e) {
|
|
380
386
|
D("url-ended");
|
|
381
387
|
return;
|
|
382
388
|
}
|
|
383
|
-
|
|
384
|
-
}, [D,
|
|
389
|
+
xe();
|
|
390
|
+
}, [D, xe, d]), De = s(() => {
|
|
385
391
|
d(), i(), o(!1), n(!1);
|
|
386
|
-
}, [d, i, n]),
|
|
392
|
+
}, [d, i, n]), Xe = s(
|
|
387
393
|
(e) => {
|
|
388
|
-
|
|
394
|
+
se?.(e), W(!1);
|
|
389
395
|
},
|
|
390
|
-
[
|
|
396
|
+
[se]
|
|
391
397
|
);
|
|
392
|
-
return console.log("SubtitleOverlay",
|
|
398
|
+
return console.log("SubtitleOverlay", Ve), b(() => {
|
|
393
399
|
O?.(Q.current);
|
|
394
|
-
}, [O]), /* @__PURE__ */ r.jsxs("div", { className:
|
|
400
|
+
}, [O]), /* @__PURE__ */ r.jsxs("div", { className: je("slide-player", C), ...Pe, children: [
|
|
395
401
|
/* @__PURE__ */ r.jsx(
|
|
396
402
|
"audio",
|
|
397
403
|
{
|
|
398
404
|
ref: h,
|
|
399
405
|
preload: "auto",
|
|
400
406
|
playsInline: !0,
|
|
401
|
-
onLoadedMetadata:
|
|
402
|
-
onCanPlay:
|
|
403
|
-
onPlay:
|
|
404
|
-
onPause:
|
|
405
|
-
onSeeking:
|
|
406
|
-
onSeeked:
|
|
407
|
-
onTimeUpdate:
|
|
408
|
-
onEnded:
|
|
409
|
-
onError:
|
|
407
|
+
onLoadedMetadata: Oe,
|
|
408
|
+
onCanPlay: He,
|
|
409
|
+
onPlay: Ze,
|
|
410
|
+
onPause: $e,
|
|
411
|
+
onSeeking: we,
|
|
412
|
+
onSeeked: we,
|
|
413
|
+
onTimeUpdate: qe,
|
|
414
|
+
onEnded: ze,
|
|
415
|
+
onError: De
|
|
410
416
|
}
|
|
411
417
|
),
|
|
412
418
|
J ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
413
419
|
/* @__PURE__ */ r.jsx(
|
|
414
|
-
|
|
420
|
+
Qe,
|
|
415
421
|
{
|
|
416
|
-
container:
|
|
422
|
+
container: ve,
|
|
417
423
|
labels: {
|
|
418
424
|
fullscreen: z.fullscreenLabel,
|
|
419
425
|
nonFullscreen: z.nonFullscreenLabel,
|
|
@@ -422,17 +428,17 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
422
428
|
},
|
|
423
429
|
onClose: () => W(!1),
|
|
424
430
|
onOpenChange: W,
|
|
425
|
-
onViewModeChange:
|
|
426
|
-
open:
|
|
427
|
-
viewMode:
|
|
431
|
+
onViewModeChange: Xe,
|
|
432
|
+
open: me,
|
|
433
|
+
viewMode: Ne
|
|
428
434
|
}
|
|
429
435
|
),
|
|
430
|
-
/* @__PURE__ */ r.jsxs("div", { className: "slide-player__controls", style:
|
|
436
|
+
/* @__PURE__ */ r.jsxs("div", { className: "slide-player__controls", style: We, children: [
|
|
431
437
|
/* @__PURE__ */ r.jsxs("div", { className: "slide-player__group", children: [
|
|
432
438
|
/* @__PURE__ */ r.jsx(
|
|
433
439
|
"button",
|
|
434
440
|
{
|
|
435
|
-
"aria-expanded":
|
|
441
|
+
"aria-expanded": me,
|
|
436
442
|
"aria-haspopup": "dialog",
|
|
437
443
|
"aria-label": "More options",
|
|
438
444
|
className: "slide-player__action slide-player__action--mobile-more",
|
|
@@ -441,7 +447,7 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
441
447
|
},
|
|
442
448
|
type: "button",
|
|
443
449
|
children: /* @__PURE__ */ r.jsx(
|
|
444
|
-
|
|
450
|
+
tr,
|
|
445
451
|
{
|
|
446
452
|
className: "slide-player__icon",
|
|
447
453
|
strokeWidth: 2.25
|
|
@@ -449,26 +455,26 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
449
455
|
)
|
|
450
456
|
}
|
|
451
457
|
),
|
|
452
|
-
/* @__PURE__ */ r.jsx("button", { "aria-label": "Volume", className: "hidden", type: "button", children: /* @__PURE__ */ r.jsx(
|
|
458
|
+
/* @__PURE__ */ r.jsx("button", { "aria-label": "Volume", className: "hidden", type: "button", children: /* @__PURE__ */ r.jsx(nr, { className: "slide-player__icon", strokeWidth: 2.25 }) }),
|
|
453
459
|
/* @__PURE__ */ r.jsx(
|
|
454
460
|
"button",
|
|
455
461
|
{
|
|
456
462
|
"aria-label": "Rewind",
|
|
457
463
|
className: "slide-player__action slide-player__action--prev",
|
|
458
|
-
disabled:
|
|
464
|
+
disabled: Ue,
|
|
459
465
|
onClick: ke,
|
|
460
466
|
type: "button",
|
|
461
|
-
children: /* @__PURE__ */ r.jsx(
|
|
467
|
+
children: /* @__PURE__ */ r.jsx(ur, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
462
468
|
}
|
|
463
469
|
),
|
|
464
470
|
/* @__PURE__ */ r.jsx(
|
|
465
471
|
"button",
|
|
466
472
|
{
|
|
467
|
-
"aria-label":
|
|
473
|
+
"aria-label": Ke,
|
|
468
474
|
className: "slide-player__toggle slide-player__toggle--playback",
|
|
469
475
|
onClick: () => {
|
|
470
476
|
if (G) {
|
|
471
|
-
|
|
477
|
+
Te?.(!Y);
|
|
472
478
|
return;
|
|
473
479
|
}
|
|
474
480
|
const e = h.current;
|
|
@@ -481,11 +487,11 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
481
487
|
v.current = "manual", y.current = !1, u.current = !0, n(!0);
|
|
482
488
|
return;
|
|
483
489
|
}
|
|
484
|
-
if (!e.src &&
|
|
485
|
-
v.current = "manual", y.current = !1,
|
|
490
|
+
if (!e.src && A.length > 0) {
|
|
491
|
+
v.current = "manual", y.current = !1, k(
|
|
486
492
|
Math.min(
|
|
487
493
|
S.current,
|
|
488
|
-
|
|
494
|
+
A.length - 1
|
|
489
495
|
),
|
|
490
496
|
"toggle"
|
|
491
497
|
);
|
|
@@ -499,7 +505,7 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
499
505
|
}
|
|
500
506
|
},
|
|
501
507
|
type: "button",
|
|
502
|
-
children:
|
|
508
|
+
children: Be ? /* @__PURE__ */ r.jsx(or, {}) : /* @__PURE__ */ r.jsx(ir, {})
|
|
503
509
|
}
|
|
504
510
|
),
|
|
505
511
|
/* @__PURE__ */ r.jsx(
|
|
@@ -507,27 +513,27 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
507
513
|
{
|
|
508
514
|
"aria-label": "Forward",
|
|
509
515
|
className: "slide-player__action slide-player__action--next",
|
|
510
|
-
disabled:
|
|
511
|
-
onClick:
|
|
516
|
+
disabled: Fe,
|
|
517
|
+
onClick: Re,
|
|
512
518
|
type: "button",
|
|
513
|
-
children: /* @__PURE__ */ r.jsx(
|
|
519
|
+
children: /* @__PURE__ */ r.jsx(sr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
514
520
|
}
|
|
515
521
|
),
|
|
516
|
-
|
|
522
|
+
ne ? /* @__PURE__ */ r.jsx(
|
|
517
523
|
"button",
|
|
518
524
|
{
|
|
519
|
-
"aria-label":
|
|
525
|
+
"aria-label": ue ? "Exit fullscreen" : "Enter fullscreen",
|
|
520
526
|
className: "slide-player__action slide-player__action--fullscreen",
|
|
521
|
-
onClick:
|
|
527
|
+
onClick: ne,
|
|
522
528
|
type: "button",
|
|
523
|
-
children:
|
|
529
|
+
children: ue ? /* @__PURE__ */ r.jsx(
|
|
524
530
|
lr,
|
|
525
531
|
{
|
|
526
532
|
className: "slide-player__icon",
|
|
527
533
|
strokeWidth: 2.25
|
|
528
534
|
}
|
|
529
535
|
) : /* @__PURE__ */ r.jsx(
|
|
530
|
-
|
|
536
|
+
cr,
|
|
531
537
|
{
|
|
532
538
|
className: "slide-player__icon",
|
|
533
539
|
strokeWidth: 2.25
|
|
@@ -538,20 +544,20 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
538
544
|
] }),
|
|
539
545
|
/* @__PURE__ */ r.jsx("div", { className: "slide-player__separator" }),
|
|
540
546
|
/* @__PURE__ */ r.jsxs("div", { className: "slide-player__group", children: [
|
|
541
|
-
|
|
547
|
+
pe.map((e, t) => /* @__PURE__ */ r.jsx(Ge.Fragment, { children: e }, `custom-action-${t}`)),
|
|
542
548
|
/* @__PURE__ */ r.jsx(
|
|
543
549
|
"button",
|
|
544
550
|
{
|
|
545
551
|
"aria-label": "Notes",
|
|
546
|
-
className:
|
|
552
|
+
className: je(
|
|
547
553
|
"slide-player__action slide-player__action--notes",
|
|
548
554
|
K && "slide-player__action--active"
|
|
549
555
|
),
|
|
550
|
-
disabled: !
|
|
551
|
-
onClick:
|
|
556
|
+
disabled: !Le,
|
|
557
|
+
onClick: Ce,
|
|
552
558
|
type: "button",
|
|
553
559
|
children: /* @__PURE__ */ r.jsx(
|
|
554
|
-
|
|
560
|
+
ar,
|
|
555
561
|
{
|
|
556
562
|
className: "slide-player__icon",
|
|
557
563
|
strokeWidth: 2.25
|
|
@@ -563,9 +569,9 @@ const je = /* @__PURE__ */ new Map(), Ee = (N) => {
|
|
|
563
569
|
] })
|
|
564
570
|
] }) : null
|
|
565
571
|
] });
|
|
566
|
-
},
|
|
567
|
-
|
|
572
|
+
}, dr = Je(fr);
|
|
573
|
+
dr.displayName = "Player";
|
|
568
574
|
export {
|
|
569
|
-
|
|
575
|
+
dr as default
|
|
570
576
|
};
|
|
571
577
|
//# sourceMappingURL=Player.es.js.map
|