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.
Files changed (41) hide show
  1. package/dist/_virtual/index.cjs4.js +1 -1
  2. package/dist/_virtual/index.cjs5.js +1 -1
  3. package/dist/_virtual/index.cjs6.js +1 -1
  4. package/dist/_virtual/index.cjs7.js +1 -1
  5. package/dist/_virtual/index.es4.js +4 -4
  6. package/dist/_virtual/index.es5.js +4 -4
  7. package/dist/_virtual/index.es6.js +2 -5
  8. package/dist/_virtual/index.es6.js.map +1 -1
  9. package/dist/_virtual/index.es7.js +5 -2
  10. package/dist/_virtual/index.es7.js.map +1 -1
  11. package/dist/components/Slide/Player.cjs.js +1 -1
  12. package/dist/components/Slide/Player.cjs.js.map +1 -1
  13. package/dist/components/Slide/Player.d.ts +2 -1
  14. package/dist/components/Slide/Player.es.js +160 -154
  15. package/dist/components/Slide/Player.es.js.map +1 -1
  16. package/dist/components/Slide/Slide.cjs.js +1 -1
  17. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  18. package/dist/components/Slide/Slide.es.js +390 -377
  19. package/dist/components/Slide/Slide.es.js.map +1 -1
  20. package/dist/components/Slide/SubtitleOverlay.cjs.js +1 -1
  21. package/dist/components/Slide/SubtitleOverlay.cjs.js.map +1 -1
  22. package/dist/components/Slide/SubtitleOverlay.d.ts +2 -1
  23. package/dist/components/Slide/SubtitleOverlay.es.js +33 -32
  24. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  25. package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
  26. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
  40. package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
  41. package/package.json +1 -1
@@ -1,24 +1,24 @@
1
1
  import { j as r } from "../../_virtual/jsx-runtime.es.js";
2
- import Ye, { memo as Ge, useRef as a, useState as we, useMemo as H, useEffect as b, useCallback as l } from "react";
3
- import { cn as Me } from "../../lib/utils.es.js";
4
- import Je from "./MobilePlayerSettingsSheet.es.js";
5
- import { DEFAULT_SLIDE_PLAYER_TEXTS as Qe } from "./constants.es.js";
6
- import { DEFAULT_MOBILE_VIEW_MODE as Ie } from "./utils/mobileScreenMode.es.js";
7
- import { toPlayerCustomActionList as er } from "./utils/playerCustomActions.es.js";
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 rr 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 tr 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 nr 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 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-cw.es.js";
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 sr 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 cr 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 je = /* @__PURE__ */ new Map(), Ee = (N) => {
17
- if (typeof window > "u" || !N || je.has(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(), je.set(N, C);
21
- }, ar = () => /* @__PURE__ */ r.jsxs(
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
- ), or = () => /* @__PURE__ */ r.jsxs(
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
- ), ir = ({
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: Ae,
71
- onFullscreen: te,
72
- isFullscreen: ne = !1,
73
- mobileViewMode: Re = Ie,
74
- settingsPortalContainer: Ne,
75
- onMobileViewModeChange: ue,
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: ve,
78
- onInteractionToggle: Te,
79
- hasInteraction: Ce = !1,
78
+ onAutoAdvanceToggle: Te,
79
+ onInteractionToggle: Ce,
80
+ hasInteraction: Le = !1,
80
81
  isInteractionOpen: K = !1,
81
- prevDisabled: Le = !1,
82
- nextDisabled: Ue = !1,
82
+ prevDisabled: Ue = !1,
83
+ nextDisabled: Fe = !1,
83
84
  showControls: J = !0,
84
- customActions: se,
85
- customActionContext: ce,
86
- texts: ae,
87
- ...Fe
85
+ customActions: ce,
86
+ customActionContext: ae,
87
+ texts: oe,
88
+ ...Pe
88
89
  }) => {
89
- const h = a(null), oe = a(K), j = a(null), ie = a(null), S = a(0), c = a(null), q = a(void 0), E = a([]), Z = a(!1), fe = 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] = we(M), [de, W] = we(!1), f = m >= 0 ? N[m] : void 0, B = f?.audioUrl, Pe = f?.element?.subtitle_cues ?? [], k = H(
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
- ), me = H(
95
- () => er(se, ce),
96
- [ce, se]
97
- ), pe = me.length + 5, Ve = H(
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(pe)
100
+ "--slide-player-mobile-control-count": String(he)
100
101
  }),
101
- [pe]
102
+ [he]
102
103
  ), z = H(
103
104
  () => ({
104
- ...Qe,
105
- ...ae
105
+ ...Ie,
106
+ ...oe
106
107
  }),
107
- [ae]
108
- ), ee = H(() => f ? f.audioKey ?? `${String(f.sequenceNumber ?? "none")}:${String(f.audioUrl ?? "")}` : "none", [f]), We = G ? Y : I, Be = G ? Y ? "Pause autoplay" : "Play autoplay" : I ? "Pause" : "Play";
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
- !oe.current && K && W(!1), oe.current = K;
115
+ !ie.current && K && W(!1), ie.current = K;
115
116
  }, [K]), b(() => {
116
- E.current = k;
117
- }, [k]), b(() => {
117
+ E.current = A;
118
+ }, [A]), b(() => {
118
119
  const e = f?.audioUrl, t = m >= 0 ? N[m + 1]?.audioUrl : void 0;
119
- Ee(e), Ee(t);
120
+ Ae(e), Ae(t);
120
121
  }, [N, f?.audioUrl, m]);
121
- const n = l(
122
+ const n = s(
122
123
  (e) => {
123
- fe.current !== e && (fe.current = e, re?.(e));
124
+ de.current !== e && (de.current = e, re?.(e));
124
125
  },
125
126
  [re]
126
- ), he = l((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), T = l(() => M && !L && !y.current && v.current !== "blocked", [M, L]), ye = l((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), ge = l(() => {
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, s) => t + Math.max(Number(s.duration_ms ?? 0), 0),
130
+ (t, l) => t + Math.max(Number(l.duration_ms ?? 0), 0),
130
131
  0
131
132
  ) / 1e3;
132
- }, []), P = l((e) => e <= 0 ? 0 : E.current.slice(0, e).reduce(
133
- (t, s) => t + Math.max(Number(s.duration_ms ?? 0), 0),
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
- ), []), _e = l(() => {
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 = l(
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 = l(() => {
145
- g(_e());
146
- }, [_e, g]), d = l(() => {
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
- }, []), be = l(() => {
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]), $ = l(() => {
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]), _ = l(
165
+ }, [g, d, n]), _ = s(
165
166
  (e) => {
166
167
  const t = h.current;
167
168
  if (!t)
168
169
  return !1;
169
- const s = t.play();
170
- return s && typeof s.then == "function" && s.then(() => {
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" && he(V) && (v.current = "blocked", u.current = !1, n(!1)), w.current = !1, o(!1);
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
- [he, n]
177
- ), A = l(
177
+ [ye, n]
178
+ ), k = s(
178
179
  (e, t) => {
179
- const s = h.current, V = E.current[e];
180
- if (!s || !V)
180
+ const l = h.current, V = E.current[e];
181
+ if (!l || !V)
181
182
  return !1;
182
- const R = ye(V.audio_data);
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 Xe = j.current !== R;
187
- return U.current = "segment", Xe && (s.pause(), s.removeAttribute("src"), s.load(), j.current = R, s.src = R, s.load()), p.current = 0, s.readyState > 0 && (s.currentTime = 0, p.current = null), X ? _(`start-segment:${t}`) : (u.current = !1, w.current = !1, s.pause(), o(!1), !0);
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
- ye,
192
+ ge,
192
193
  P,
193
194
  g,
194
195
  _,
195
196
  n
196
197
  ]
197
- ), D = l(
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
- ), Se = l(() => {
209
- const e = S.current + 1, t = E.current, s = t[e], V = q.current, R = t.some((X) => X.is_final);
210
- if (s) {
211
- A(e, "ended");
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
- A,
225
+ k,
225
226
  n
226
227
  ]);
227
228
  b(() => {
228
- if (ie.current === ee)
229
+ if (fe.current === ee)
229
230
  return;
230
- ie.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
+ 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
- k.length,
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
- A(c.current, "external-resume");
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
- A(
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
- A,
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, s = T();
288
+ const t = j.current !== B, l = T();
288
289
  if (U.current === "segment" && !!j.current && c.current === null) {
289
- if (!s) {
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 ? ge() : 0;
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 = s, x.current = !1, w.current = !1, n(!1), !s) {
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 < k.length) {
309
+ if (c.current < A.length) {
309
310
  if (y.current) {
310
311
  o(!1), n(!1);
311
312
  return;
312
313
  }
313
- A(c.current, "wait-resume");
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 (!k.length) {
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
- A(
329
+ k(
329
330
  Math.min(
330
331
  S.current,
331
- k.length - 1
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
- k,
347
+ A,
347
348
  B,
348
349
  M,
349
350
  L,
350
351
  T,
351
352
  g,
352
353
  $,
353
- A,
354
+ k,
354
355
  _,
355
- ge,
356
+ _e,
356
357
  n
357
358
  ]), b(() => $, [$]), b(() => d, [d]);
358
- const Ke = l(() => {
359
- i(), be(), o(!0), n(!1);
360
- }, [be, i, n]), Ze = l(() => {
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]), $e = l(() => {
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
- ]), He = l(() => {
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]), Oe = l(() => {
379
+ }, [m, i]), qe = s(() => {
374
380
  i();
375
- }, [i]), xe = l(() => {
381
+ }, [i]), we = s(() => {
376
382
  i();
377
- }, [i]), qe = l(() => {
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
- Se();
384
- }, [D, Se, d]), ze = l(() => {
389
+ xe();
390
+ }, [D, xe, d]), De = s(() => {
385
391
  d(), i(), o(!1), n(!1);
386
- }, [d, i, n]), De = l(
392
+ }, [d, i, n]), Xe = s(
387
393
  (e) => {
388
- ue?.(e), W(!1);
394
+ se?.(e), W(!1);
389
395
  },
390
- [ue]
396
+ [se]
391
397
  );
392
- return console.log("SubtitleOverlay", Pe), b(() => {
398
+ return console.log("SubtitleOverlay", Ve), b(() => {
393
399
  O?.(Q.current);
394
- }, [O]), /* @__PURE__ */ r.jsxs("div", { className: Me("slide-player", C), ...Fe, children: [
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: He,
402
- onCanPlay: $e,
403
- onPlay: Ke,
404
- onPause: Ze,
405
- onSeeking: xe,
406
- onSeeked: xe,
407
- onTimeUpdate: Oe,
408
- onEnded: qe,
409
- onError: ze
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
- Je,
420
+ Qe,
415
421
  {
416
- container: Ne,
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: De,
426
- open: de,
427
- viewMode: Re
431
+ onViewModeChange: Xe,
432
+ open: me,
433
+ viewMode: Ne
428
434
  }
429
435
  ),
430
- /* @__PURE__ */ r.jsxs("div", { className: "slide-player__controls", style: Ve, children: [
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": de,
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
- rr,
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(tr, { className: "slide-player__icon", strokeWidth: 2.25 }) }),
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: Le,
464
+ disabled: Ue,
459
465
  onClick: ke,
460
466
  type: "button",
461
- children: /* @__PURE__ */ r.jsx(nr, { className: "slide-player__icon", strokeWidth: 2.25 })
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": Be,
473
+ "aria-label": Ke,
468
474
  className: "slide-player__toggle slide-player__toggle--playback",
469
475
  onClick: () => {
470
476
  if (G) {
471
- ve?.(!Y);
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 && k.length > 0) {
485
- v.current = "manual", y.current = !1, A(
490
+ if (!e.src && A.length > 0) {
491
+ v.current = "manual", y.current = !1, k(
486
492
  Math.min(
487
493
  S.current,
488
- k.length - 1
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: We ? /* @__PURE__ */ r.jsx(ar, {}) : /* @__PURE__ */ r.jsx(or, {})
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: Ue,
511
- onClick: Ae,
516
+ disabled: Fe,
517
+ onClick: Re,
512
518
  type: "button",
513
- children: /* @__PURE__ */ r.jsx(ur, { className: "slide-player__icon", strokeWidth: 2.25 })
519
+ children: /* @__PURE__ */ r.jsx(sr, { className: "slide-player__icon", strokeWidth: 2.25 })
514
520
  }
515
521
  ),
516
- te ? /* @__PURE__ */ r.jsx(
522
+ ne ? /* @__PURE__ */ r.jsx(
517
523
  "button",
518
524
  {
519
- "aria-label": ne ? "Exit fullscreen" : "Enter fullscreen",
525
+ "aria-label": ue ? "Exit fullscreen" : "Enter fullscreen",
520
526
  className: "slide-player__action slide-player__action--fullscreen",
521
- onClick: te,
527
+ onClick: ne,
522
528
  type: "button",
523
- children: ne ? /* @__PURE__ */ r.jsx(
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
- sr,
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
- me.map((e, t) => /* @__PURE__ */ r.jsx(Ye.Fragment, { children: e }, `custom-action-${t}`)),
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: Me(
552
+ className: je(
547
553
  "slide-player__action slide-player__action--notes",
548
554
  K && "slide-player__action--active"
549
555
  ),
550
- disabled: !Ce,
551
- onClick: Te,
556
+ disabled: !Le,
557
+ onClick: Ce,
552
558
  type: "button",
553
559
  children: /* @__PURE__ */ r.jsx(
554
- cr,
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
- }, fr = Ge(ir);
567
- fr.displayName = "Player";
572
+ }, dr = Je(fr);
573
+ dr.displayName = "Player";
568
574
  export {
569
- fr as default
575
+ dr as default
570
576
  };
571
577
  //# sourceMappingURL=Player.es.js.map